className=className.toLowerCase();if(opt_parentConstructor&&!opt_parentConstructor.tagName){throw new Error('opt_parentConstructor was not '+'created by tr.ui.b.define');}
let tagName=className;let tagNS=undefined;if(opt_parentConstructor){if(opt_tagNS){throw new Error('Must not specify tagNS if parentConstructor is given');}
let parent=opt_parentConstructor;while(parent&&parent.tagName){tagName=parent.tagName;tagNS=parent.tagNS;parent=parent.parentConstructor;}}else{tagNS=opt_tagNS;}
-function f(){if(opt_parentConstructor&&f.prototype.__proto__!==opt_parentConstructor.prototype){throw new Error(className+' prototye\'s __proto__ field is messed up. '+'It MUST be the prototype of '+opt_parentConstructor.tagName);}
+function f(){if(opt_parentConstructor&&f.prototype.__proto__!==opt_parentConstructor.prototype){throw new Error(className+' prototype\'s __proto__ field is messed up. '+'It MUST be the prototype of '+opt_parentConstructor.tagName);}
let el;if(tagNS===undefined){el=tr.doc.createElement(tagName);}else{el=tr.doc.createElementNS(tagNS,tagName);}
f.decorate.call(this,el,arguments);return el;}
f.decorate=function(el){el.__proto__=f.prototype;el.decorate.apply(el,arguments[1]);el.constructor=f;};f.className=className;f.tagName=tagName;f.tagNS=tagNS;f.parentConstructor=(opt_parentConstructor?opt_parentConstructor:undefined);f.toString=function(){if(!f.parentConstructor){return f.tagName;}
)
// untype returns the "pseudo" untyped type for a Ctype (import/export use only).
-// (we can't use an pre-initialized array because we must be sure all types are
+// (we can't use a pre-initialized array because we must be sure all types are
// set up)
func untype(ctype Ctype) *types.Type {
switch ctype {
lv.unsafePoints = bvalloc(int32(lv.f.NumValues()))
- // Mark architecture-specific unsafe pointes.
+ // Mark architecture-specific unsafe points.
for _, b := range lv.f.Blocks {
for _, v := range b.Values {
if v.Op.UnsafePoint() {
v2 = n.List.Second()
}
- // this is not only a optimization but also a requirement in the spec.
+ // this is not only an optimization but also a requirement in the spec.
// "if the second iteration variable is the blank identifier, the range
// clause is equivalent to the same clause with only the first variable
// present."
}
// Reset sets the block to the provided kind and clears all the blocks control
-// and auxilliary values. Other properties of the block, such as its successors,
+// and auxiliary values. Other properties of the block, such as its successors,
// predecessors and values are left unmodified.
func (b *Block) Reset(kind BlockKind) {
b.Kind = kind
(Geq32U x y) -> (GreaterEqualU (CMPW x y))
(Geq64U x y) -> (GreaterEqualU (CMP x y))
-// Optimize comparision between a floating-point value and 0.0 with "FCMP $(0.0), Fn"
+// Optimize comparison between a floating-point value and 0.0 with "FCMP $(0.0), Fn"
(FCMPS x (FMOVSconst [0])) -> (FCMPS0 x)
(FCMPS (FMOVSconst [0]) x) -> (InvertFlags (FCMPS0 x))
(FCMPD x (FMOVDconst [0])) -> (FCMPD0 x)
// Divisibility checks x%c == 0 convert to multiply and rotate.
// Note, x%c == 0 is rewritten as x == c*(x/c) during the opt pass
-// where (x/c) is peformed using multiplication with magic constants.
+// where (x/c) is performed using multiplication with magic constants.
// To rewrite x%c == 0 requires pattern matching the rewritten expression
// and checking that the division by the same constant wasn't already calculated.
// This check is made by counting uses of the magic constant multiplication.
}
}
-// TestNilcheckInFalseBranch tests that nil checks in the false branch of an nilcheck
+// TestNilcheckInFalseBranch tests that nil checks in the false branch of a nilcheck
// block are *not* removed.
func TestNilcheckInFalseBranch(t *testing.T) {
c := testConfig(t)
lastAddr = addr
// Output the line table.
- // TODO: Now that we have all the debug information in seperate
+ // TODO: Now that we have all the debug information in separate
// symbols, it would make sense to use a rope, and concatenate them all
// together rather then the append() below. This would allow us to have
// the compiler emit the DW_LNE_set_address and a rope data structure
case sys.AMD64:
if name == "__imp___acrt_iob_func" {
// Do not rename __imp___acrt_iob_func into __acrt_iob_func,
- // becasue __imp___acrt_iob_func symbol is real
- // (see commit b295099 from git://git.code.sf.net/p/mingw-w64/mingw-w64 for detials).
+ // because __imp___acrt_iob_func symbol is real
+ // (see commit b295099 from git://git.code.sf.net/p/mingw-w64/mingw-w64 for details).
} else {
name = strings.TrimPrefix(name, "__imp_") // __imp_Name => Name
}
case sys.I386:
if name == "__imp____acrt_iob_func" {
// Do not rename __imp____acrt_iob_func into ___acrt_iob_func,
- // becasue __imp____acrt_iob_func symbol is real
- // (see commit b295099 from git://git.code.sf.net/p/mingw-w64/mingw-w64 for detials).
+ // because __imp____acrt_iob_func symbol is real
+ // (see commit b295099 from git://git.code.sf.net/p/mingw-w64/mingw-w64 for details).
} else {
name = strings.TrimPrefix(name, "__imp_") // __imp_Name => Name
}
}
if Verify(&pub, []byte("testing"), fromHex("2"), fromHex("4")) {
- t.Errorf("Verify unexpected success with non-existant mod inverse of Q")
+ t.Errorf("Verify unexpected success with non-existent mod inverse of Q")
}
}
// Field elements are represented as nine, unsigned 32-bit words.
//
-// The value of an field element is:
+// The value of a field element is:
// x[0] + (x[1] * 2**29) + (x[2] * 2**57) + ... + (x[8] * 2**228)
//
// That is, each limb is alternately 29 or 28-bits wide in little-endian
hs.ecdheOk = supportsECDHE(c.config, hs.clientHello.supportedCurves, hs.clientHello.supportedPoints)
if hs.ecdheOk {
- // Although omiting the ec_point_formats extension is permitted, some
+ // Although omitting the ec_point_formats extension is permitted, some
// old OpenSSL version will refuse to handshake if not present.
//
// Per RFC 4492, section 5.1.2, implementations MUST support the
}
func TestTLSPointFormats(t *testing.T) {
- // Test that a Server returns the ec_point_format extention when ECC is
+ // Test that a Server returns the ec_point_format extension when ECC is
// negotiated, and not returned on RSA handshake.
tests := []struct {
name string
"0000")
_, err := NewFile(bytes.NewReader(data))
if err == nil {
- t.Fatalf("opening invalid ELF file unexpectedly suceeded")
+ t.Fatalf("opening invalid ELF file unexpectedly succeeded")
}
}
var (
oh32 OptionalHeader32
// There can be 0 or more data directories. So the minimum size of optional
- // header is calculated by substracting oh32.DataDirectory size from oh32 size.
+ // header is calculated by subtracting oh32.DataDirectory size from oh32 size.
oh32MinSz = binary.Size(oh32) - binary.Size(oh32.DataDirectory)
)
var (
oh64 OptionalHeader64
// There can be 0 or more data directories. So the minimum size of optional
- // header is calculated by substracting oh64.DataDirectory size from oh64 size.
+ // header is calculated by subtracting oh64.DataDirectory size from oh64 size.
oh64MinSz = binary.Size(oh64) - binary.Size(oh64.DataDirectory)
)
vxchunks:
// Load 0x01 into every byte element in the 16-byte mask vector.
VREPIB $1, V_MASK // V_MASK = [16]byte{1, 1, ..., 1, 1}
- VZERO V_CNT // intial uint128 count of 0
+ VZERO V_CNT // initial uint128 count of 0
vxloop:
// Load input bytes in 16-byte chunks.
// u = q̂ (v - v_l) + rh << s + u_l
// After the above step, u contains a remainder:
// u = rh << s + u_l
- // and we need to substract q̂ v_l
+ // and we need to subtract q̂ v_l
//
// But it may be a bit too large, in which case q̂ needs to be smaller.
qhatv := tmp.make(3 * n)
// This verifies that a handler can Flush and then Hijack.
//
-// An similar test crashed once during development, but it was only
+// A similar test crashed once during development, but it was only
// testing this tangentially and temporarily until another TODO was
// fixed.
//
// implicitlyChunked is a helper to check for implicity of chunked, because
// RFC 7230 Section 3.3.1 says that the sender MUST apply chunked as the final
// payload body to ensure that the message is framed for both the request
-// and the body. Since "identity" is incompatabile with any other transformational
+// and the body. Since "identity" is incompatible with any other transformational
// encoding cannot co-exist, the presence of "identity" will cause implicitlyChunked
// to return false.
func implicitlyChunked(te []string) bool {
- if len(te) == 0 { // No transfer-encodings passed in, so not implicity chunked.
+ if len(te) == 0 { // No transfer-encodings passed in, so not implicitly chunked.
return false
}
for _, tei := range te {
// Request.GetBody defined. HTTP requests are considered idempotent if
// they have HTTP methods GET, HEAD, OPTIONS, or TRACE; or if their
// Header map contains an "Idempotency-Key" or "X-Idempotency-Key"
-// entry. If the idempotency key value is an zero-length slice, the
+// entry. If the idempotency key value is a zero-length slice, the
// request is treated as idempotent but the header is not sent on the
// wire.
type Transport struct {
}
}
-// This tests that an client requesting a content range won't also
+// This tests that a client requesting a content range won't also
// implicitly ask for gzip support. If they want that, they need to do it
// on their own.
// golang.org/issue/8923
// of IP node.
//
// When the IP node supports IPv4-mapped IPv6 address,
- // we allow an listener to listen to the wildcard
+ // we allow a listener to listen to the wildcard
// address of both IP addressing spaces by specifying
// IPv6 wildcard address.
if len(ip) == 0 || ip.Equal(IPv4zero) {
// returns the last CNAME in chain
func resolveCNAME(name *uint16, r *syscall.DNSRecord) *uint16 {
- // limit cname resolving to 10 in case of a infinite CNAME loop
+ // limit cname resolving to 10 in case of an infinite CNAME loop
Cname:
for cnameloop := 0; cnameloop < 10; cnameloop++ {
for p := r; p != nil; p = p.Next {
Input to cgo -godefs
GOARCH=ppc64 go tool cgo -godefs defs_aix.go > defs_aix_ppc64_tmp.go
-This is only an helper to create defs_aix_ppc64.go
+This is only a helper to create defs_aix_ppc64.go
Go runtime functions require the "linux" name of fields (ss_sp, si_addr, etc)
However, AIX structures don't provide such names and must be modified.
return string(e)
}
-// An boundsError represents a an indexing or slicing operation gone wrong.
+// A boundsError represents an indexing or slicing operation gone wrong.
type boundsError struct {
x int64
y int
// "[It] works by first zeroing the high bits of the [8]
// bytes in the word. Subsequently, it adds a number that
// will result in an overflow to the high bit of a byte if
- // any of the low bits were initialy set. Next the high
+ // any of the low bits were initially set. Next the high
// bits of the original word are ORed with these values;
// thus, the high bit of a byte is set iff any bit in the
// byte was set. Finally, we determine if any of these high
// unscav and adds it into scav before continuing.
func (h *mheap) scavengeAll() {
// Disallow malloc or panic while holding the heap lock. We do
- // this here because this is an non-mallocgc entry-point to
+ // this here because this is a non-mallocgc entry-point to
// the mheap API.
gp := getg()
gp.m.mallocing++
}
// findInlinedCall returns the PC of an inlined function call within
-// the funtion body for the function f if any.
+// the function body for the function f if any.
func findInlinedCall(f interface{}, maxBytes int) (pc uint64, found bool) {
fFunc := runtime.FuncForPC(uintptr(funcPC(f)))
if fFunc == nil || fFunc.Entry() == 0 {
cap int
}
-// An notInHeapSlice is a slice backed by go:notinheap memory.
+// A notInHeapSlice is a slice backed by go:notinheap memory.
type notInHeapSlice struct {
array *notInHeap
len int
print(" adjusting ", funcname(f), " frame=[", hex(frame.sp), ",", hex(frame.fp), "] pc=", hex(frame.pc), " continpc=", hex(frame.continpc), "\n")
}
if f.funcID == funcID_systemstack_switch {
- // A special routine at the bottom of stack of a goroutine that does an systemstack call.
+ // A special routine at the bottom of stack of a goroutine that does a systemstack call.
// We will allow it to be copied even though we don't
// have full GC info for it (because it is written in asm).
return true