From 70da367f6b780aec904b7dd711733f73b0f1a739 Mon Sep 17 00:00:00 2001 From: "erik.corry@gmail.com" Date: Mon, 16 Jan 2012 12:38:59 +0000 Subject: [PATCH] More spelling changes. Review URL: http://codereview.chromium.org/9231009 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10407 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/arm/code-stubs-arm.cc | 4 ++-- src/arm/constants-arm.h | 10 ++++----- src/arm/disasm-arm.cc | 2 +- src/arm/full-codegen-arm.cc | 6 +++--- src/arm/lithium-codegen-arm.cc | 2 +- src/arm/macro-assembler-arm.cc | 2 +- src/arm/macro-assembler-arm.h | 10 ++++----- src/arm/stub-cache-arm.cc | 10 ++++----- src/array.js | 2 +- src/assembler.h | 2 +- src/bignum-dtoa.h | 2 +- src/dtoa.h | 2 +- src/execution.cc | 2 +- src/factory.h | 2 +- src/full-codegen.h | 4 ++-- src/global-handles.cc | 2 +- src/heap.cc | 12 +++++------ src/heap.h | 4 ++-- src/ia32/code-stubs-ia32.cc | 38 ++++++++++++++++----------------- src/ia32/full-codegen-ia32.cc | 4 ++-- src/ia32/macro-assembler-ia32.cc | 6 +++--- src/ia32/macro-assembler-ia32.h | 4 ++-- src/ia32/regexp-macro-assembler-ia32.cc | 2 +- src/ia32/stub-cache-ia32.cc | 2 +- src/isolate.cc | 2 +- src/isolate.h | 6 +++--- src/json-parser.h | 4 ++-- src/jsregexp.cc | 2 +- src/jsregexp.h | 2 +- src/list.h | 2 +- src/liveedit-debugger.js | 2 +- src/liveobjectlist.cc | 2 +- src/macros.py | 2 +- src/mark-compact.cc | 4 ++-- src/mark-compact.h | 2 +- src/mips/assembler-mips.h | 2 +- src/mips/builtins-mips.cc | 6 +++--- src/mips/code-stubs-mips.cc | 16 +++++++------- src/mips/constants-mips.cc | 4 ++-- src/mips/constants-mips.h | 2 +- src/mips/full-codegen-mips.cc | 6 +++--- src/mips/lithium-codegen-mips.cc | 2 +- src/mips/macro-assembler-mips.cc | 2 +- src/mips/macro-assembler-mips.h | 6 +++--- src/mips/simulator-mips.cc | 4 ++-- src/mips/stub-cache-mips.cc | 8 +++---- src/objects-printer.cc | 2 +- src/objects.cc | 2 +- src/objects.h | 16 +++++++------- src/parser.cc | 2 +- src/parser.h | 2 +- src/platform-cygwin.cc | 2 +- src/platform-freebsd.cc | 2 +- src/platform-linux.cc | 2 +- src/platform-macos.cc | 4 ++-- src/platform-openbsd.cc | 2 +- src/platform-solaris.cc | 2 +- src/platform-win32.cc | 4 ++-- src/regexp-macro-assembler.cc | 2 +- src/regexp.js | 4 ++-- src/runtime.cc | 28 ++++++++++++------------ src/serialize.h | 8 +++---- src/spaces-inl.h | 2 +- src/spaces.h | 12 +++++------ src/unicode.cc | 10 ++++----- src/v8threads.cc | 2 +- src/v8utils.cc | 6 +++--- src/x64/code-stubs-x64.cc | 32 +++++++++++++-------------- src/x64/full-codegen-x64.cc | 4 ++-- src/x64/macro-assembler-x64.cc | 6 +++--- src/x64/macro-assembler-x64.h | 6 +++--- src/x64/regexp-macro-assembler-x64.cc | 2 +- src/x64/stub-cache-x64.cc | 2 +- 73 files changed, 196 insertions(+), 196 deletions(-) diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc index 15ef9bc..67952f7 100644 --- a/src/arm/code-stubs-arm.cc +++ b/src/arm/code-stubs-arm.cc @@ -5821,7 +5821,7 @@ void SubStringStub::Generate(MacroAssembler* masm) { __ b(eq, &return_r0); Label result_longer_than_two; - // Check for special case of two character ascii string, in which case + // Check for special case of two character ASCII string, in which case // we do a lookup in the symbol table first. __ cmp(r2, Operand(2)); __ b(gt, &result_longer_than_two); @@ -5951,7 +5951,7 @@ void SubStringStub::Generate(MacroAssembler* masm) { __ tst(r1, Operand(kStringEncodingMask)); __ b(eq, &two_byte_sequential); - // Allocate and copy the resulting ascii string. + // Allocate and copy the resulting ASCII string. __ AllocateAsciiString(r0, r2, r4, r6, r7, &runtime); // Locate first character of substring to copy. diff --git a/src/arm/constants-arm.h b/src/arm/constants-arm.h index 49b8db7..e767001 100644 --- a/src/arm/constants-arm.h +++ b/src/arm/constants-arm.h @@ -573,13 +573,13 @@ class Instruction { // The naming of these accessor corresponds to figure A3-1. // // Two kind of accessors are declared: - // - Field() will return the raw field, ie the field's bits at their + // - Field() will return the raw field, i.e. the field's bits at their // original place in the instruction encoding. - // eg. if instr is the 'addgt r0, r1, r2' instruction, encoded as 0xC0810002 - // ConditionField(instr) will return 0xC0000000. + // e.g. if instr is the 'addgt r0, r1, r2' instruction, encoded as + // 0xC0810002 ConditionField(instr) will return 0xC0000000. // - Value() will return the field value, shifted back to bit 0. - // eg. if instr is the 'addgt r0, r1, r2' instruction, encoded as 0xC0810002 - // ConditionField(instr) will return 0xC. + // e.g. if instr is the 'addgt r0, r1, r2' instruction, encoded as + // 0xC0810002 ConditionField(instr) will return 0xC. // Generally applicable fields diff --git a/src/arm/disasm-arm.cc b/src/arm/disasm-arm.cc index 603b3cf..16b568c 100644 --- a/src/arm/disasm-arm.cc +++ b/src/arm/disasm-arm.cc @@ -473,7 +473,7 @@ int Decoder::FormatOption(Instruction* instr, const char* format) { return 1; } case 'i': { // 'i: immediate value from adjacent bits. - // Expects tokens in the form imm%02d@%02d, ie. imm05@07, imm10@16 + // Expects tokens in the form imm%02d@%02d, i.e. imm05@07, imm10@16 int width = (format[3] - '0') * 10 + (format[4] - '0'); int lsb = (format[6] - '0') * 10 + (format[7] - '0'); diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc index 38999a8..6654263 100644 --- a/src/arm/full-codegen-arm.cc +++ b/src/arm/full-codegen-arm.cc @@ -115,7 +115,7 @@ class JumpPatchSite BASE_EMBEDDED { // function. // // The live registers are: -// o r1: the JS function object being called (ie, ourselves) +// o r1: the JS function object being called (i.e., ourselves) // o cp: our context // o fp: our caller's frame pointer // o sp: stack pointer @@ -3618,7 +3618,7 @@ void FullCodeGenerator::EmitFastAsciiArrayJoin(CallRuntime* expr) { // One-character separator case __ bind(&one_char_separator); - // Replace separator with its ascii character value. + // Replace separator with its ASCII character value. __ ldrb(separator, FieldMemOperand(separator, SeqAsciiString::kHeaderSize)); // Jump into the loop after the code that copies the separator, so the first // element is not preceded by a separator @@ -3629,7 +3629,7 @@ void FullCodeGenerator::EmitFastAsciiArrayJoin(CallRuntime* expr) { // result_pos: the position to which we are currently copying characters. // element: Current array element. // elements_end: Array end. - // separator: Single separator ascii char (in lower byte). + // separator: Single separator ASCII char (in lower byte). // Copy the separator character to the result. __ strb(separator, MemOperand(result_pos, 1, PostIndex)); diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc index b5ed517..af1c3b2 100644 --- a/src/arm/lithium-codegen-arm.cc +++ b/src/arm/lithium-codegen-arm.cc @@ -262,7 +262,7 @@ bool LCodeGen::GenerateDeferredCode() { bool LCodeGen::GenerateDeoptJumpTable() { // Check that the jump table is accessible from everywhere in the function - // code, ie that offsets to the table can be encoded in the 24bit signed + // code, i.e. that offsets to the table can be encoded in the 24bit signed // immediate of a branch instruction. // To simplify we consider the code size from the first instruction to the // end of the jump table. We also don't consider the pc load delta. diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc index fa97611..d3d85db 100644 --- a/src/arm/macro-assembler-arm.cc +++ b/src/arm/macro-assembler-arm.cc @@ -2387,7 +2387,7 @@ void MacroAssembler::ConvertToInt32(Register source, b(gt, not_int32); // We know the exponent is smaller than 30 (biased). If it is less than - // 0 (biased) then the number is smaller in magnitude than 1.0 * 2^0, ie + // 0 (biased) then the number is smaller in magnitude than 1.0 * 2^0, i.e. // it rounds to zero. const uint32_t zero_exponent = HeapNumber::kExponentBias + 0; sub(scratch2, scratch2, Operand(zero_exponent - fudge_factor), SetCC); diff --git a/src/arm/macro-assembler-arm.h b/src/arm/macro-assembler-arm.h index 4b55a3b..2c89a34 100644 --- a/src/arm/macro-assembler-arm.h +++ b/src/arm/macro-assembler-arm.h @@ -243,7 +243,7 @@ class MacroAssembler: public Assembler { Register scratch3, Label* object_is_white_and_not_data); - // Detects conservatively whether an object is data-only, ie it does need to + // Detects conservatively whether an object is data-only, i.e. it does need to // be scanned by the garbage collector. void JumpIfDataObject(Register value, Register scratch, @@ -606,7 +606,7 @@ class MacroAssembler: public Assembler { } // Check if the given instruction is a 'type' marker. - // ie. check if is is a mov r, r (referenced as nop(type)) + // i.e. check if is is a mov r, r (referenced as nop(type)) // These instructions are generated to mark special location in the code, // like some special IC code. static inline bool IsMarkedCode(Instr instr, int type) { @@ -810,7 +810,7 @@ class MacroAssembler: public Assembler { // Check if the map of an object is equal to a specified map and branch to // label if not. Skip the smi check if not required (object is known to be a // heap object). If mode is ALLOW_ELEMENT_TRANSITION_MAPS, then also match - // against maps that are ElementsKind transition maps of the specificed map. + // against maps that are ElementsKind transition maps of the specified map. void CheckMap(Register obj, Register scratch, Handle map, @@ -908,7 +908,7 @@ class MacroAssembler: public Assembler { // Truncates a double using a specific rounding mode. // Clears the z flag (ne condition) if an overflow occurs. // If exact_conversion is true, the z flag is also cleared if the conversion - // was inexact, ie. if the double value could not be converted exactly + // was inexact, i.e. if the double value could not be converted exactly // to a 32bit integer. void EmitVFPTruncate(VFPRoundingMode rounding_mode, SwVfpRegister result, @@ -1025,7 +1025,7 @@ class MacroAssembler: public Assembler { // Calls an API function. Allocates HandleScope, extracts returned value // from handle and propagates exceptions. Restores context. stack_space - // - space to be unwound on exit (includes the call js arguments space and + // - space to be unwound on exit (includes the call JS arguments space and // the additional space allocated for the fast call). void CallApiFunctionAndReturn(ExternalReference function, int stack_space); diff --git a/src/arm/stub-cache-arm.cc b/src/arm/stub-cache-arm.cc index c3a82ff..e4f3dcd 100644 --- a/src/arm/stub-cache-arm.cc +++ b/src/arm/stub-cache-arm.cc @@ -562,11 +562,11 @@ static void GenerateFastApiDirectCall(MacroAssembler* masm, int argc) { // ----------- S t a t e ------------- // -- sp[0] : holder (set by CheckPrototypes) - // -- sp[4] : callee js function + // -- sp[4] : callee JS function // -- sp[8] : call data - // -- sp[12] : last js argument + // -- sp[12] : last JS argument // -- ... - // -- sp[(argc + 3) * 4] : first js argument + // -- sp[(argc + 3) * 4] : first JS argument // -- sp[(argc + 4) * 4] : receiver // ----------------------------------- // Get the function and setup the context. @@ -583,7 +583,7 @@ static void GenerateFastApiDirectCall(MacroAssembler* masm, } else { __ Move(r6, call_data); } - // Store js function and call data. + // Store JS function and call data. __ stm(ib, sp, r5.bit() | r6.bit()); // r2 points to call data as expected by Arguments @@ -1983,7 +1983,7 @@ Handle CallStubCompiler::CompileMathFloorCall( __ vmrs(r3); // Set custom FPCSR: // - Set rounding mode to "Round towards Minus Infinity" - // (ie bits [23:22] = 0b10). + // (i.e. bits [23:22] = 0b10). // - Clear vfp cumulative exception flags (bits [3:0]). // - Make sure Flush-to-zero mode control bit is unset (bit 22). __ bic(r9, r3, diff --git a/src/array.js b/src/array.js index 3d8e278..16e37c5 100644 --- a/src/array.js +++ b/src/array.js @@ -204,7 +204,7 @@ function ConvertToLocaleString(e) { if (IS_NULL_OR_UNDEFINED(e)) { return ''; } else { - // According to ES5, seciton 15.4.4.3, the toLocaleString conversion + // According to ES5, section 15.4.4.3, the toLocaleString conversion // must throw a TypeError if ToObject(e).toLocaleString isn't // callable. var e_obj = ToObject(e); diff --git a/src/assembler.h b/src/assembler.h index 8c705a8..540c15a 100644 --- a/src/assembler.h +++ b/src/assembler.h @@ -271,7 +271,7 @@ class RelocInfo BASE_EMBEDDED { INLINE(void apply(intptr_t delta)); // Is the pointer this relocation info refers to coded like a plain pointer - // or is it strange in some way (eg relative or patched into a series of + // or is it strange in some way (e.g. relative or patched into a series of // instructions). bool IsCodedSpecially(); diff --git a/src/bignum-dtoa.h b/src/bignum-dtoa.h index ea1acbb..93ec1f7 100644 --- a/src/bignum-dtoa.h +++ b/src/bignum-dtoa.h @@ -44,7 +44,7 @@ enum BignumDtoaMode { BIGNUM_DTOA_PRECISION }; -// Converts the given double 'v' to ascii. +// Converts the given double 'v' to ASCII. // The result should be interpreted as buffer * 10^(point-length). // The buffer will be null-terminated. // diff --git a/src/dtoa.h b/src/dtoa.h index a2d6fde..948a079 100644 --- a/src/dtoa.h +++ b/src/dtoa.h @@ -49,7 +49,7 @@ enum DtoaMode { // be at least kBase10MaximalLength + 1 characters long. const int kBase10MaximalLength = 17; -// Converts the given double 'v' to ascii. +// Converts the given double 'v' to ASCII. // The result should be interpreted as buffer * 10^(point-length). // // The output depends on the given mode: diff --git a/src/execution.cc b/src/execution.cc index 125241c..8a0242f 100644 --- a/src/execution.cc +++ b/src/execution.cc @@ -356,7 +356,7 @@ void StackGuard::EnableInterrupts() { void StackGuard::SetStackLimit(uintptr_t limit) { ExecutionAccess access(isolate_); - // If the current limits are special (eg due to a pending interrupt) then + // If the current limits are special (e.g. due to a pending interrupt) then // leave them alone. uintptr_t jslimit = SimulatorStack::JsLimitFromCLimit(isolate_, limit); if (thread_local_.jslimit_ == thread_local_.real_jslimit_) { diff --git a/src/factory.h b/src/factory.h index 8725b67..e68cc7e 100644 --- a/src/factory.h +++ b/src/factory.h @@ -233,7 +233,7 @@ class Factory { Handle CopyFixedDoubleArray( Handle array); - // Numbers (eg, literals) are pretenured by the parser. + // Numbers (e.g. literals) are pretenured by the parser. Handle NewNumber(double value, PretenureFlag pretenure = NOT_TENURED); diff --git a/src/full-codegen.h b/src/full-codegen.h index fbb6979..a1368c2 100644 --- a/src/full-codegen.h +++ b/src/full-codegen.h @@ -618,8 +618,8 @@ class FullCodeGenerator: public AstVisitor { Label** if_false, Label** fall_through) const = 0; - // Returns true if we are evaluating only for side effects (ie if the result - // will be discarded). + // Returns true if we are evaluating only for side effects (i.e. if the + // result will be discarded). virtual bool IsEffect() const { return false; } // Returns true if we are evaluating for the value (in accu/on stack). diff --git a/src/global-handles.cc b/src/global-handles.cc index 87066fa..471f5a3 100644 --- a/src/global-handles.cc +++ b/src/global-handles.cc @@ -232,7 +232,7 @@ class GlobalHandles::Node { VMState state(isolate, EXTERNAL); func(object, par); } - // Absense of explicit cleanup or revival of weak handle + // Absence of explicit cleanup or revival of weak handle // in most of the cases would lead to memory leak. ASSERT(state_ != NEAR_DEATH); return true; diff --git a/src/heap.cc b/src/heap.cc index 3c871e2..c9c866a 100644 --- a/src/heap.cc +++ b/src/heap.cc @@ -2923,8 +2923,8 @@ MaybeObject* Heap::AllocateConsString(String* first, String* second) { bool is_ascii_data_in_two_byte_string = false; if (!is_ascii) { // At least one of the strings uses two-byte representation so we - // can't use the fast case code for short ascii strings below, but - // we can try to save memory if all chars actually fit in ascii. + // can't use the fast case code for short ASCII strings below, but + // we can try to save memory if all chars actually fit in ASCII. is_ascii_data_in_two_byte_string = first->HasOnlyAsciiChars() && second->HasOnlyAsciiChars(); if (is_ascii_data_in_two_byte_string) { @@ -3635,8 +3635,8 @@ void Heap::InitializeJSObjectFromMap(JSObject* obj, // TODO(1240798): Initialize the object's body using valid initial values // according to the object's initial map. For example, if the map's // instance type is JS_ARRAY_TYPE, the length field should be initialized - // to a number (eg, Smi::FromInt(0)) and the elements initialized to a - // fixed array (eg, Heap::empty_fixed_array()). Currently, the object + // to a number (e.g. Smi::FromInt(0)) and the elements initialized to a + // fixed array (e.g. Heap::empty_fixed_array()). Currently, the object // verification code has to cope with (temporarily) invalid objects. See // for example, JSArray::JSArrayVerify). Object* filler; @@ -4103,7 +4103,7 @@ MaybeObject* Heap::AllocateInternalSymbol(unibrow::CharacterStream* buffer, ASSERT(chars >= 0); // Ensure the chars matches the number of characters in the buffer. ASSERT(static_cast(chars) == buffer->Length()); - // Determine whether the string is ascii. + // Determine whether the string is ASCII. bool is_ascii = true; while (buffer->has_more()) { if (buffer->GetNext() > unibrow::Utf8::kMaxOneByteChar) { @@ -5596,7 +5596,7 @@ bool Heap::SetUp(bool create_heap_objects) { // goes wrong, just return false. The caller should check the results and // call Heap::TearDown() to release allocated memory. // - // If the heap is not yet configured (eg, through the API), configure it. + // If the heap is not yet configured (e.g. through the API), configure it. // Configuration is based on the flags new-space-size (really the semispace // size) and old-space-size if set or the initial values of semispace_size_ // and old_generation_size_ otherwise. diff --git a/src/heap.h b/src/heap.h index a1a53db..0ac76c9 100644 --- a/src/heap.h +++ b/src/heap.h @@ -690,7 +690,7 @@ class Heap { PretenureFlag pretenure = NOT_TENURED); // Computes a single character string where the character has code. - // A cache is used for ascii codes. + // A cache is used for ASCII codes. // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation // failed. Please note this does not perform a garbage collection. MUST_USE_RESULT MaybeObject* LookupSingleCharacterStringFromCode( @@ -2376,7 +2376,7 @@ class GCTracer BASE_EMBEDDED { intptr_t start_size_; // Size of objects in heap set in constructor. GarbageCollector collector_; // Type of collector. - // A count (including this one, eg, the first collection is 1) of the + // A count (including this one, e.g. the first collection is 1) of the // number of garbage collections. unsigned int gc_count_; diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc index b654390..4545b06 100644 --- a/src/ia32/code-stubs-ia32.cc +++ b/src/ia32/code-stubs-ia32.cc @@ -749,7 +749,7 @@ static void IntegerConvert(MacroAssembler* masm, // Exponent word in scratch, exponent part of exponent word in scratch2. // Zero in ecx. // We know the exponent is smaller than 30 (biased). If it is less than - // 0 (biased) then the number is smaller in magnitude than 1.0 * 2^0, ie + // 0 (biased) then the number is smaller in magnitude than 1.0 * 2^0, i.e. // it rounds to zero. const uint32_t zero_exponent = (HeapNumber::kExponentBias + 0) << HeapNumber::kExponentShift; @@ -3723,7 +3723,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) { kShortExternalStringMask); STATIC_ASSERT((kStringTag | kSeqStringTag | kTwoByteStringTag) == 0); __ j(zero, &seq_two_byte_string, Label::kNear); - // Any other flat string must be a flat ascii string. None of the following + // Any other flat string must be a flat ASCII string. None of the following // string type tests will succeed if subject is not a string or a short // external string. __ and_(ebx, Immediate(kIsNotStringMask | @@ -3772,16 +3772,16 @@ void RegExpExecStub::Generate(MacroAssembler* masm) { kStringRepresentationMask | kStringEncodingMask); STATIC_ASSERT((kSeqStringTag | kTwoByteStringTag) == 0); __ j(zero, &seq_two_byte_string, Label::kNear); - // Any other flat string must be sequential ascii or external. + // Any other flat string must be sequential ASCII or external. __ test_b(FieldOperand(ebx, Map::kInstanceTypeOffset), kStringRepresentationMask); __ j(not_zero, &external_string); __ bind(&seq_ascii_string); - // eax: subject string (flat ascii) + // eax: subject string (flat ASCII) // ecx: RegExp data (FixedArray) __ mov(edx, FieldOperand(ecx, JSRegExp::kDataAsciiCodeOffset)); - __ Set(ecx, Immediate(1)); // Type is ascii. + __ Set(ecx, Immediate(1)); // Type is ASCII. __ jmp(&check_code, Label::kNear); __ bind(&seq_two_byte_string); @@ -3798,7 +3798,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) { // eax: subject string // edx: code - // ecx: encoding of subject string (1 if ascii, 0 if two_byte); + // ecx: encoding of subject string (1 if ASCII, 0 if two_byte); // Load used arguments before starting to push arguments for call to native // RegExp code to avoid handling changing stack height. __ mov(ebx, Operand(esp, kPreviousIndexOffset)); @@ -3807,7 +3807,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) { // eax: subject string // ebx: previous index // edx: code - // ecx: encoding of subject string (1 if ascii 0 if two_byte); + // ecx: encoding of subject string (1 if ASCII 0 if two_byte); // All checks done. Now push arguments for native regexp code. Counters* counters = masm->isolate()->counters(); __ IncrementCounter(counters->regexp_entry_native(), 1); @@ -3847,7 +3847,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) { // esi: original subject string // eax: underlying subject string // ebx: previous index - // ecx: encoding of subject string (1 if ascii 0 if two_byte); + // ecx: encoding of subject string (1 if ASCII 0 if two_byte); // edx: code // Argument 4: End of string data // Argument 3: Start of string data @@ -4475,7 +4475,7 @@ void CompareStub::Generate(MacroAssembler* masm) { __ JumpIfNotBothSequentialAsciiStrings(edx, eax, ecx, ebx, &check_unequal_objects); - // Inline comparison of ascii strings. + // Inline comparison of ASCII strings. if (cc_ == equal) { StringCompareStub::GenerateFlatAsciiStringEquals(masm, edx, @@ -5428,7 +5428,7 @@ void StringCharFromCodeGenerator::GenerateFast(MacroAssembler* masm) { STATIC_ASSERT(kSmiTag == 0); STATIC_ASSERT(kSmiTagSize == 1); STATIC_ASSERT(kSmiShiftSize == 0); - // At this point code register contains smi tagged ascii char code. + // At this point code register contains smi tagged ASCII char code. __ mov(result_, FieldOperand(result_, code_, times_half_pointer_size, FixedArray::kHeaderSize)); @@ -5548,7 +5548,7 @@ void StringAddStub::Generate(MacroAssembler* masm) { __ cmp(ebx, Immediate(Smi::FromInt(2))); __ j(not_equal, &longer_than_two); - // Check that both strings are non-external ascii strings. + // Check that both strings are non-external ASCII strings. __ JumpIfNotBothSequentialAsciiStrings(eax, edx, ebx, ecx, &call_runtime); // Get the two characters forming the new string. @@ -5589,7 +5589,7 @@ void StringAddStub::Generate(MacroAssembler* masm) { __ j(below, &string_add_flat_result); // If result is not supposed to be flat allocate a cons string object. If both - // strings are ascii the result is an ascii cons string. + // strings are ASCII the result is an ASCII cons string. Label non_ascii, allocated, ascii_data; __ mov(edi, FieldOperand(eax, HeapObject::kMapOffset)); __ movzx_b(ecx, FieldOperand(edi, Map::kInstanceTypeOffset)); @@ -5601,7 +5601,7 @@ void StringAddStub::Generate(MacroAssembler* masm) { __ test(ecx, Immediate(kStringEncodingMask)); __ j(zero, &non_ascii); __ bind(&ascii_data); - // Allocate an acsii cons string. + // Allocate an ASCII cons string. __ AllocateAsciiConsString(ecx, edi, no_reg, &call_runtime); __ bind(&allocated); // Fill the fields of the cons string. @@ -5616,7 +5616,7 @@ void StringAddStub::Generate(MacroAssembler* masm) { __ ret(2 * kPointerSize); __ bind(&non_ascii); // At least one of the strings is two-byte. Check whether it happens - // to contain only ascii characters. + // to contain only ASCII characters. // ecx: first instance type AND second instance type. // edi: second instance type. __ test(ecx, Immediate(kAsciiDataHintMask)); @@ -5691,7 +5691,7 @@ void StringAddStub::Generate(MacroAssembler* masm) { __ test_b(edi, kStringEncodingMask); __ j(zero, &non_ascii_string_add_flat_result); - // Both strings are ascii strings. + // Both strings are ASCII strings. // ebx: length of resulting flat string as a smi __ SmiUntag(ebx); __ AllocateAsciiString(eax, ebx, ecx, edx, edi, &call_runtime_drop_two); @@ -6001,7 +6001,7 @@ void StringHelper::GenerateTwoCharacterSymbolTableProbe(MacroAssembler* masm, __ push(mask); Register temp = mask; - // Check that the candidate is a non-external ascii string. + // Check that the candidate is a non-external ASCII string. __ mov(temp, FieldOperand(candidate, HeapObject::kMapOffset)); __ movzx_b(temp, FieldOperand(temp, Map::kInstanceTypeOffset)); __ JumpIfInstanceTypeIsNotSequentialAscii( @@ -6280,7 +6280,7 @@ void SubStringStub::Generate(MacroAssembler* masm) { __ test_b(ebx, kStringEncodingMask); __ j(zero, &two_byte_sequential); - // Sequential ascii string. Allocate the result. + // Sequential ASCII string. Allocate the result. __ AllocateAsciiString(eax, ecx, ebx, edx, edi, &runtime_drop_two); // eax: result string @@ -6493,10 +6493,10 @@ void StringCompareStub::Generate(MacroAssembler* masm) { __ bind(¬_same); - // Check that both objects are sequential ascii strings. + // Check that both objects are sequential ASCII strings. __ JumpIfNotBothSequentialAsciiStrings(edx, eax, ecx, ebx, &runtime); - // Compare flat ascii strings. + // Compare flat ASCII strings. // Drop arguments from the stack. __ pop(ecx); __ add(esp, Immediate(2 * kPointerSize)); diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc index 4f32744..48e07d9 100644 --- a/src/ia32/full-codegen-ia32.cc +++ b/src/ia32/full-codegen-ia32.cc @@ -106,7 +106,7 @@ class JumpPatchSite BASE_EMBEDDED { // formal parameter count expected by the function. // // The live registers are: -// o edi: the JS function object being called (ie, ourselves) +// o edi: the JS function object being called (i.e. ourselves) // o esi: our context // o ebp: our caller's frame pointer // o esp: stack pointer (pointing to return address) @@ -3571,7 +3571,7 @@ void FullCodeGenerator::EmitFastAsciiArrayJoin(CallRuntime* expr) { // One-character separator case __ bind(&one_char_separator); - // Replace separator with its ascii character value. + // Replace separator with its ASCII character value. __ mov_b(scratch, FieldOperand(string, SeqAsciiString::kHeaderSize)); __ mov_b(separator_operand, scratch); diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc index 43f265c..36291ea 100644 --- a/src/ia32/macro-assembler-ia32.cc +++ b/src/ia32/macro-assembler-ia32.cc @@ -1387,7 +1387,7 @@ void MacroAssembler::AllocateAsciiString(Register result, add(scratch1, Immediate(kObjectAlignmentMask)); and_(scratch1, Immediate(~kObjectAlignmentMask)); - // Allocate ascii string in new space. + // Allocate ASCII string in new space. AllocateInNewSpace(SeqAsciiString::kHeaderSize, times_1, scratch1, @@ -1415,7 +1415,7 @@ void MacroAssembler::AllocateAsciiString(Register result, Label* gc_required) { ASSERT(length > 0); - // Allocate ascii string in new space. + // Allocate ASCII string in new space. AllocateInNewSpace(SeqAsciiString::SizeFor(length), result, scratch1, @@ -2464,7 +2464,7 @@ void MacroAssembler::JumpIfNotBothSequentialAsciiStrings(Register object1, movzx_b(scratch1, FieldOperand(scratch1, Map::kInstanceTypeOffset)); movzx_b(scratch2, FieldOperand(scratch2, Map::kInstanceTypeOffset)); - // Check that both are flat ascii strings. + // Check that both are flat ASCII strings. const int kFlatAsciiStringMask = kIsNotStringMask | kStringRepresentationMask | kStringEncodingMask; const int kFlatAsciiStringTag = ASCII_STRING_TYPE; diff --git a/src/ia32/macro-assembler-ia32.h b/src/ia32/macro-assembler-ia32.h index c969a6f..2cb8743 100644 --- a/src/ia32/macro-assembler-ia32.h +++ b/src/ia32/macro-assembler-ia32.h @@ -368,7 +368,7 @@ class MacroAssembler: public Assembler { // Check if the map of an object is equal to a specified map and branch to // label if not. Skip the smi check if not required (object is known to be a // heap object). If mode is ALLOW_ELEMENT_TRANSITION_MAPS, then also match - // against maps that are ElementsKind transition maps of the specificed map. + // against maps that are ElementsKind transition maps of the specified map. void CheckMap(Register obj, Handle map, Label* fail, @@ -791,7 +791,7 @@ class MacroAssembler: public Assembler { // --------------------------------------------------------------------------- // String utilities. - // Check whether the instance type represents a flat ascii string. Jump to the + // Check whether the instance type represents a flat ASCII string. Jump to the // label if not. If the instance type can be scratched specify same register // for both instance type and scratch. void JumpIfInstanceTypeIsNotSequentialAscii(Register instance_type, diff --git a/src/ia32/regexp-macro-assembler-ia32.cc b/src/ia32/regexp-macro-assembler-ia32.cc index dbf01ab..e613a06 100644 --- a/src/ia32/regexp-macro-assembler-ia32.cc +++ b/src/ia32/regexp-macro-assembler-ia32.cc @@ -210,7 +210,7 @@ void RegExpMacroAssemblerIA32::CheckCharacters(Vector str, bool check_end_of_string) { #ifdef DEBUG // If input is ASCII, don't even bother calling here if the string to - // match contains a non-ascii character. + // match contains a non-ASCII character. if (mode_ == ASCII) { ASSERT(String::IsAscii(str.start(), str.length())); } diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc index 0da51c8..0adb101 100644 --- a/src/ia32/stub-cache-ia32.cc +++ b/src/ia32/stub-cache-ia32.cc @@ -992,7 +992,7 @@ void StubCompiler::GenerateLoadCallback(Handle object, __ push(scratch3); // Restore return address. - // 3 elements array for v8::Agruments::values_, handler for name and pointer + // 3 elements array for v8::Arguments::values_, handler for name and pointer // to the values (it considered as smi in GC). const int kStackSpace = 5; const int kApiArgc = 2; diff --git a/src/isolate.cc b/src/isolate.cc index 35e9e28..f66a22d 100644 --- a/src/isolate.cc +++ b/src/isolate.cc @@ -1219,7 +1219,7 @@ bool Isolate::OptionalRescheduleException(bool is_bottom_call) { ASSERT(has_pending_exception()); PropagatePendingExceptionToExternalTryCatch(); - // Allways reschedule out of memory exceptions. + // Always reschedule out of memory exceptions. if (!is_out_of_memory()) { bool is_termination_exception = pending_exception() == heap_.termination_exception(); diff --git a/src/isolate.h b/src/isolate.h index 4e5c7db..898c178 100644 --- a/src/isolate.h +++ b/src/isolate.h @@ -258,7 +258,7 @@ class ThreadLocalTop BASE_EMBEDDED { #endif #endif // USE_SIMULATOR - Address js_entry_sp_; // the stack pointer of the bottom js entry frame + Address js_entry_sp_; // the stack pointer of the bottom JS entry frame Address external_callback_; // the external callback we're currently in StateTag current_vm_state_; @@ -485,7 +485,7 @@ class Isolate { bool IsDefaultIsolate() const { return this == default_isolate_; } // Ensures that process-wide resources and the default isolate have been - // allocated. It is only necessary to call this method in rare casses, for + // allocated. It is only necessary to call this method in rare cases, for // example if you are using V8 from within the body of a static initializer. // Safe to call multiple times. static void EnsureDefaultIsolate(); @@ -635,7 +635,7 @@ class Isolate { void* formal_count_address() { return &thread_local_top_.formal_count_; } // Returns the global object of the current context. It could be - // a builtin object, or a js global object. + // a builtin object, or a JS global object. Handle global() { return Handle(context()->global()); } diff --git a/src/json-parser.h b/src/json-parser.h index 2b7077e..d22cd0d 100644 --- a/src/json-parser.h +++ b/src/json-parser.h @@ -130,7 +130,7 @@ class JsonParser BASE_EMBEDDED { // An object literal is a squiggly-braced and comma separated sequence // (possibly empty) of key/value pairs, where the key is a JSON string // literal, the value is a JSON value, and the two are separated by a colon. - // A JSON array dosn't allow numbers and identifiers as keys, like a + // A JSON array doesn't allow numbers and identifiers as keys, like a // JavaScript array. Handle ParseJsonObject(); @@ -177,7 +177,7 @@ Handle JsonParser::ParseJson(Handle source) { // Set initial position right before the string. position_ = -1; - // Advance to the first character (posibly EOS) + // Advance to the first character (possibly EOS) AdvanceSkipWhitespace(); Handle result = ParseJsonValue(); if (result.is_null() || c0_ != kEndOfString) { diff --git a/src/jsregexp.cc b/src/jsregexp.cc index 15b80d9..18b86ba 100644 --- a/src/jsregexp.cc +++ b/src/jsregexp.cc @@ -704,7 +704,7 @@ Handle RegExpImpl::IrregexpExec(Handle jsregexp, // the virtualized backtrack stack and some register changes. When a node is // to be emitted it can flush the Trace or update it. Flushing the Trace // will emit code to bring the actual state into line with the virtual state. -// Avoiding flushing the state can postpone some work (eg updates of capture +// Avoiding flushing the state can postpone some work (e.g. updates of capture // registers). Postponing work can save time when executing the regular // expression since it may be found that the work never has to be done as a // failure to match can occur. In addition it is much faster to jump to a diff --git a/src/jsregexp.h b/src/jsregexp.h index df110d1..0e01849 100644 --- a/src/jsregexp.h +++ b/src/jsregexp.h @@ -634,7 +634,7 @@ class RegExpNode: public ZoneObject { static const int kNodeIsTooComplexForGreedyLoops = -1; virtual int GreedyLoopTextLength() { return kNodeIsTooComplexForGreedyLoops; } Label* label() { return &label_; } - // If non-generic code is generated for a node (ie the node is not at the + // If non-generic code is generated for a node (i.e. the node is not at the // start of the trace) then it cannot be reused. This variable sets a limit // on how often we allow that to happen before we insist on starting a new // trace and generating generic code for a node that can be reused by flushing diff --git a/src/list.h b/src/list.h index 57504e0..adddea4 100644 --- a/src/list.h +++ b/src/list.h @@ -67,7 +67,7 @@ class List { // Returns a reference to the element at index i. This reference is // not safe to use after operations that can change the list's - // backing store (eg, Add). + // backing store (e.g. Add). inline T& operator[](int i) const { ASSERT(0 <= i); ASSERT(i < length_); diff --git a/src/liveedit-debugger.js b/src/liveedit-debugger.js index c94a3ee..abfb0f6 100644 --- a/src/liveedit-debugger.js +++ b/src/liveedit-debugger.js @@ -581,7 +581,7 @@ Debug.LiveEdit = new function() { // children of unchanged functions are ignored. function MarkChangedFunctions(code_info_tree, chunks) { - // A convenient interator over diff chunks that also translates + // A convenient iterator over diff chunks that also translates // positions from old to new in a current non-changed part of script. var chunk_it = new function() { var chunk_index = 0; diff --git a/src/liveobjectlist.cc b/src/liveobjectlist.cc index 436204e..1aabc59 100644 --- a/src/liveobjectlist.cc +++ b/src/liveobjectlist.cc @@ -462,7 +462,7 @@ static int CompactString(char* str) { char prev_ch = 0; while (*dst != '\0') { char ch = *src++; - // We will treat non-ascii chars as '?'. + // We will treat non-ASCII chars as '?'. if ((ch & 0x80) != 0) { ch = '?'; } diff --git a/src/macros.py b/src/macros.py index 34b07ab..8e9c62d 100644 --- a/src/macros.py +++ b/src/macros.py @@ -26,7 +26,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # Dictionary that is passed as defines for js2c.py. -# Used for defines that must be defined for all native js files. +# Used for defines that must be defined for all native JS files. const NONE = 0; const READ_ONLY = 1; diff --git a/src/mark-compact.cc b/src/mark-compact.cc index 6d7fbdf..b9e1639 100644 --- a/src/mark-compact.cc +++ b/src/mark-compact.cc @@ -737,7 +737,7 @@ static inline HeapObject* ShortCircuitConsString(Object** p) { // it in place to its left substring. Return the updated value. // // Here we assume that if we change *p, we replace it with a heap object - // (ie, the left substring of a cons string is always a heap object). + // (i.e., the left substring of a cons string is always a heap object). // // The check performed is: // object->IsConsString() && !object->IsSymbol() && @@ -1196,7 +1196,7 @@ class StaticMarkingVisitor : public StaticVisitorBase { return; } JSRegExp* re = reinterpret_cast(object); - // Flush code or set age on both ascii and two byte code. + // Flush code or set age on both ASCII and two byte code. UpdateRegExpCodeAgeAndFlush(heap, re, true); UpdateRegExpCodeAgeAndFlush(heap, re, false); // Visit the fields of the RegExp, including the updated FixedArray. diff --git a/src/mark-compact.h b/src/mark-compact.h index e0a7d94..486be68 100644 --- a/src/mark-compact.h +++ b/src/mark-compact.h @@ -407,7 +407,7 @@ class MarkCompactCollector { // object from the forwarding address of the previous live object in the // page as input, and is updated to contain the offset to be used for the // next live object in the same page. For spaces using a different - // encoding (ie, contiguous spaces), the offset parameter is ignored. + // encoding (i.e., contiguous spaces), the offset parameter is ignored. typedef void (*EncodingFunction)(Heap* heap, HeapObject* old_object, int object_size, diff --git a/src/mips/assembler-mips.h b/src/mips/assembler-mips.h index b66ea0d..0cfd146 100644 --- a/src/mips/assembler-mips.h +++ b/src/mips/assembler-mips.h @@ -667,7 +667,7 @@ class Assembler : public AssemblerBase { // Never use the int16_t b(l)cond version with a branch offset // instead of using the Label* version. - // Jump targets must be in the current 256 MB-aligned region. ie 28 bits. + // Jump targets must be in the current 256 MB-aligned region. i.e. 28 bits. void j(int32_t target); void jal(int32_t target); void jalr(Register rs, Register rd = ra); diff --git a/src/mips/builtins-mips.cc b/src/mips/builtins-mips.cc index 9e108c9..8461342 100644 --- a/src/mips/builtins-mips.cc +++ b/src/mips/builtins-mips.cc @@ -895,7 +895,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, // Initialize the FixedArray. // a1: constructor - // a3: number of elements in properties array (un-tagged) + // a3: number of elements in properties array (untagged) // t4: JSObject // t5: start of next object __ LoadRoot(t6, Heap::kFixedArrayMapRootIndex); @@ -1099,7 +1099,7 @@ static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm, // ----------- S t a t e ------------- // -- a0: code entry // -- a1: function - // -- a2: reveiver_pointer + // -- a2: receiver_pointer // -- a3: argc // -- s0: argv // ----------------------------------- @@ -1121,7 +1121,7 @@ static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm, // Copy arguments to the stack in a loop. // a3: argc - // s0: argv, ie points to first arg + // s0: argv, i.e. points to first arg Label loop, entry; __ sll(t0, a3, kPointerSizeLog2); __ addu(t2, s0, t0); diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc index 57091ef..0571ab8 100644 --- a/src/mips/code-stubs-mips.cc +++ b/src/mips/code-stubs-mips.cc @@ -4061,7 +4061,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) { // Registers: // a0: entry address // a1: function - // a2: reveiver + // a2: receiver // a3: argc // // Stack: @@ -4103,7 +4103,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) { // Registers: // a0: entry_address // a1: function - // a2: reveiver_pointer + // a2: receiver_pointer // a3: argc // s0: argv // @@ -4170,7 +4170,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) { // Registers: // a0: entry_address // a1: function - // a2: reveiver_pointer + // a2: receiver_pointer // a3: argc // s0: argv // @@ -5006,9 +5006,9 @@ void RegExpExecStub::Generate(MacroAssembler* masm) { STATIC_ASSERT(kAsciiStringTag == 4); STATIC_ASSERT(kTwoByteStringTag == 0); // Find the code object based on the assumptions above. - __ And(a0, a0, Operand(kStringEncodingMask)); // Non-zero for ascii. + __ And(a0, a0, Operand(kStringEncodingMask)); // Non-zero for ASCII. __ lw(t9, FieldMemOperand(regexp_data, JSRegExp::kDataAsciiCodeOffset)); - __ sra(a3, a0, 2); // a3 is 1 for ascii, 0 for UC16 (usyed below). + __ sra(a3, a0, 2); // a3 is 1 for ASCII, 0 for UC16 (used below). __ lw(t1, FieldMemOperand(regexp_data, JSRegExp::kDataUC16CodeOffset)); __ movz(t9, t1, a0); // If UC16 (a0 is 0), replace t9 w/kDataUC16CodeOffset. @@ -6033,7 +6033,7 @@ void SubStringStub::Generate(MacroAssembler* masm) { Label result_longer_than_two; - // Check for special case of two character ascii string, in which case + // Check for special case of two character ASCII string, in which case // we do a lookup in the symbol table first. __ li(t0, 2); __ Branch(&result_longer_than_two, gt, a2, Operand(t0)); @@ -6164,7 +6164,7 @@ void SubStringStub::Generate(MacroAssembler* masm) { __ And(t0, a1, Operand(kStringEncodingMask)); __ Branch(&two_byte_sequential, eq, t0, Operand(zero_reg)); - // Allocate and copy the resulting ascii string. + // Allocate and copy the resulting ASCII string. __ AllocateAsciiString(v0, a2, t0, t2, t3, &runtime); // Locate first character of substring to copy. @@ -6508,7 +6508,7 @@ void StringAddStub::Generate(MacroAssembler* masm) { } Label non_ascii, allocated, ascii_data; STATIC_ASSERT(kTwoByteStringTag == 0); - // Branch to non_ascii if either string-encoding field is zero (non-ascii). + // Branch to non_ascii if either string-encoding field is zero (non-ASCII). __ And(t4, t0, Operand(t1)); __ And(t4, t4, Operand(kStringEncodingMask)); __ Branch(&non_ascii, eq, t4, Operand(zero_reg)); diff --git a/src/mips/constants-mips.cc b/src/mips/constants-mips.cc index d0a7af5..7d654f6 100644 --- a/src/mips/constants-mips.cc +++ b/src/mips/constants-mips.cc @@ -302,7 +302,7 @@ Instruction::Type Instruction::InstructionType() const { return kRegisterType; }; break; - // 16 bits Immediate type instructions. eg: addi dest, src, imm16. + // 16 bits Immediate type instructions. e.g.: addi dest, src, imm16. case REGIMM: case BEQ: case BNE: @@ -337,7 +337,7 @@ Instruction::Type Instruction::InstructionType() const { case SWC1: case SDC1: return kImmediateType; - // 26 bits immediate type instructions. eg: j imm26. + // 26 bits immediate type instructions. e.g.: j imm26. case J: case JAL: return kJumpType; diff --git a/src/mips/constants-mips.h b/src/mips/constants-mips.h index 210becb..d62a890 100644 --- a/src/mips/constants-mips.h +++ b/src/mips/constants-mips.h @@ -747,7 +747,7 @@ class Instruction { // Say if the instruction should not be used in a branch delay slot. bool IsForbiddenInBranchDelay() const; - // Say if the instruction 'links'. eg: jal, bal. + // Say if the instruction 'links'. e.g. jal, bal. bool IsLinkingInstruction() const; // Say if the instruction is a break or a trap. bool IsTrap() const; diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc index 7394077..da3be4c 100644 --- a/src/mips/full-codegen-mips.cc +++ b/src/mips/full-codegen-mips.cc @@ -125,7 +125,7 @@ class JumpPatchSite BASE_EMBEDDED { // function. // // The live registers are: -// o a1: the JS function object being called (ie, ourselves) +// o a1: the JS function object being called (i.e. ourselves) // o cp: our context // o fp: our caller's frame pointer // o sp: stack pointer @@ -3655,7 +3655,7 @@ void FullCodeGenerator::EmitFastAsciiArrayJoin(CallRuntime* expr) { // One-character separator case. __ bind(&one_char_separator); - // Replace separator with its ascii character value. + // Replace separator with its ASCII character value. __ lbu(separator, FieldMemOperand(separator, SeqAsciiString::kHeaderSize)); // Jump into the loop after the code that copies the separator, so the first // element is not preceded by a separator. @@ -3666,7 +3666,7 @@ void FullCodeGenerator::EmitFastAsciiArrayJoin(CallRuntime* expr) { // result_pos: the position to which we are currently copying characters. // element: Current array element. // elements_end: Array end. - // separator: Single separator ascii char (in lower byte). + // separator: Single separator ASCII char (in lower byte). // Copy the separator character to the result. __ sb(separator, MemOperand(result_pos)); diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc index de64007..796e61d 100644 --- a/src/mips/lithium-codegen-mips.cc +++ b/src/mips/lithium-codegen-mips.cc @@ -2884,7 +2884,7 @@ void LCodeGen::EmitIntegerMathAbs(LUnaryMathOperation* instr) { __ mov(result, input); ASSERT_EQ(2, masm()->InstructionsGeneratedSince(&done)); __ subu(result, zero_reg, input); - // Overflow if result is still negative, ie 0x80000000. + // Overflow if result is still negative, i.e. 0x80000000. DeoptimizeIf(lt, instr->environment(), result, Operand(zero_reg)); __ bind(&done); } diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc index 4517fe1..5693069 100644 --- a/src/mips/macro-assembler-mips.cc +++ b/src/mips/macro-assembler-mips.cc @@ -1176,7 +1176,7 @@ void MacroAssembler::ConvertToInt32(Register source, Branch(not_int32, gt, scratch2, Operand(non_smi_exponent)); // We know the exponent is smaller than 30 (biased). If it is less than - // 0 (biased) then the number is smaller in magnitude than 1.0 * 2^0, ie + // 0 (biased) then the number is smaller in magnitude than 1.0 * 2^0, i.e. // it rounds to zero. const uint32_t zero_exponent = (HeapNumber::kExponentBias + 0) << HeapNumber::kExponentShift; diff --git a/src/mips/macro-assembler-mips.h b/src/mips/macro-assembler-mips.h index eb9cf6e..94e9547 100644 --- a/src/mips/macro-assembler-mips.h +++ b/src/mips/macro-assembler-mips.h @@ -340,7 +340,7 @@ class MacroAssembler: public Assembler { Register scratch3, Label* object_is_white_and_not_data); - // Detects conservatively whether an object is data-only, ie it does need to + // Detects conservatively whether an object is data-only, i.e. it does need to // be scanned by the garbage collector. void JumpIfDataObject(Register value, Register scratch, @@ -421,7 +421,7 @@ class MacroAssembler: public Assembler { } // Check if the given instruction is a 'type' marker. - // ie. check if it is a sll zero_reg, zero_reg, (referenced as + // i.e. check if it is a sll zero_reg, zero_reg, (referenced as // nop(type)). These instructions are generated to mark special location in // the code, like some special IC code. static inline bool IsMarkedCode(Instr instr, int type) { @@ -1132,7 +1132,7 @@ class MacroAssembler: public Assembler { // Calls an API function. Allocates HandleScope, extracts returned value // from handle and propagates exceptions. Restores context. stack_space - // - space to be unwound on exit (includes the call js arguments space and + // - space to be unwound on exit (includes the call JS arguments space and // the additional space allocated for the fast call). void CallApiFunctionAndReturn(ExternalReference function, int stack_space); diff --git a/src/mips/simulator-mips.cc b/src/mips/simulator-mips.cc index 191c2ca..a158f04 100644 --- a/src/mips/simulator-mips.cc +++ b/src/mips/simulator-mips.cc @@ -2291,7 +2291,7 @@ void Simulator::DecodeTypeRegister(Instruction* instr) { } -// Type 2: instructions using a 16 bytes immediate. (eg: addi, beq). +// Type 2: instructions using a 16 bytes immediate. (e.g. addi, beq). void Simulator::DecodeTypeImmediate(Instruction* instr) { // Instruction fields. Opcode op = instr->OpcodeFieldRaw(); @@ -2614,7 +2614,7 @@ void Simulator::DecodeTypeImmediate(Instruction* instr) { } -// Type 3: instructions using a 26 bytes immediate. (eg: j, jal). +// Type 3: instructions using a 26 bytes immediate. (e.g. j, jal). void Simulator::DecodeTypeJump(Instruction* instr) { // Get current pc. int32_t current_pc = get_pc(); diff --git a/src/mips/stub-cache-mips.cc b/src/mips/stub-cache-mips.cc index bf01861..97a58c7 100644 --- a/src/mips/stub-cache-mips.cc +++ b/src/mips/stub-cache-mips.cc @@ -565,11 +565,11 @@ static void GenerateFastApiDirectCall(MacroAssembler* masm, int argc) { // ----------- S t a t e ------------- // -- sp[0] : holder (set by CheckPrototypes) - // -- sp[4] : callee js function + // -- sp[4] : callee JS function // -- sp[8] : call data - // -- sp[12] : last js argument + // -- sp[12] : last JS argument // -- ... - // -- sp[(argc + 3) * 4] : first js argument + // -- sp[(argc + 3) * 4] : first JS argument // -- sp[(argc + 4) * 4] : receiver // ----------------------------------- // Get the function and setup the context. @@ -587,7 +587,7 @@ static void GenerateFastApiDirectCall(MacroAssembler* masm, __ li(t2, call_data); } - // Store js function and call data. + // Store JS function and call data. __ sw(t1, MemOperand(sp, 1 * kPointerSize)); __ sw(t2, MemOperand(sp, 2 * kPointerSize)); diff --git a/src/objects-printer.cc b/src/objects-printer.cc index e558e58..eca9bab 100644 --- a/src/objects-printer.cc +++ b/src/objects-printer.cc @@ -627,7 +627,7 @@ void String::StringPrint(FILE* out) { // This method is only meant to be called from gdb for debugging purposes. -// Since the string can also be in two-byte encoding, non-ascii characters +// Since the string can also be in two-byte encoding, non-ASCII characters // will be ignored in the output. char* String::ToAsciiArray() { // Static so that subsequent calls frees previously allocated space. diff --git a/src/objects.cc b/src/objects.cc index abeeec9..cb627ff 100644 --- a/src/objects.cc +++ b/src/objects.cc @@ -10885,7 +10885,7 @@ int StringDictionary::FindEntry(String* key) { // Optimized for symbol key. Knowledge of the key type allows: // 1. Move the check if the key is a symbol out of the loop. - // 2. Avoid comparing hash codes in symbol to symbol comparision. + // 2. Avoid comparing hash codes in symbol to symbol comparison. // 3. Detect a case when a dictionary key is not a symbol but the key is. // In case of positive result the dictionary key may be replaced by // the symbol with minimal performance penalty. It gives a chance to diff --git a/src/objects.h b/src/objects.h index 791aeb3..d1d184d 100644 --- a/src/objects.h +++ b/src/objects.h @@ -217,7 +217,7 @@ const int kVariableSizeSentinel = 0; // encoding is considered TWO_BYTE. It is not mentioned in the name. ASCII // encoding is mentioned explicitly in the name. Likewise, the default // representation is considered sequential. It is not mentioned in the -// name. The other representations (eg, CONS, EXTERNAL) are explicitly +// name. The other representations (e.g. CONS, EXTERNAL) are explicitly // mentioned. Finally, the string is either a SYMBOL_TYPE (if it is a // symbol) or a STRING_TYPE (if it is not a symbol). // @@ -492,7 +492,7 @@ const uint32_t kSlicedNotConsMask = kSlicedStringTag & ~kConsStringTag; STATIC_ASSERT(IS_POWER_OF_TWO(kSlicedNotConsMask) && kSlicedNotConsMask != 0); // If bit 7 is clear, then bit 3 indicates whether this two-byte -// string actually contains ascii data. +// string actually contains ASCII data. const uint32_t kAsciiDataHintMask = 0x08; const uint32_t kAsciiDataHintTag = 0x08; @@ -1086,7 +1086,7 @@ class Failure: public MaybeObject { // Heap objects typically have a map pointer in their first word. However, -// during GC other data (eg, mark bits, forwarding addresses) is sometimes +// during GC other data (e.g. mark bits, forwarding addresses) is sometimes // encoded in the first word. The class MapWord is an abstraction of the // value in a heap object's first word. class MapWord BASE_EMBEDDED { @@ -1105,7 +1105,7 @@ class MapWord BASE_EMBEDDED { // True if this map word is a forwarding address for a scavenge // collection. Only valid during a scavenge collection (specifically, - // when all map words are heap object pointers, ie. not during a full GC). + // when all map words are heap object pointers, i.e. not during a full GC). inline bool IsForwardingAddress(); // Create a map word from a forwarding address. @@ -6489,7 +6489,7 @@ class String: public HeapObject { inline String* GetUnderlying(); // Mark the string as an undetectable object. It only applies to - // ascii and two byte string types. + // ASCII and two byte string types. bool MarkAsUndetectable(); // Return a substring. @@ -6586,7 +6586,7 @@ class String: public HeapObject { // value into an array index. static const int kMaxArrayIndexSize = 10; - // Max ascii char code. + // Max ASCII char code. static const int kMaxAsciiCharCode = unibrow::Utf8::kMaxOneByteChar; static const unsigned kMaxAsciiCharCodeU = unibrow::Utf8::kMaxOneByteChar; static const int kMaxUC16CharCode = 0xffff; @@ -6772,8 +6772,8 @@ class SeqString: public String { }; -// The AsciiString class captures sequential ascii string objects. -// Each character in the AsciiString is an ascii character. +// The AsciiString class captures sequential ASCII string objects. +// Each character in the AsciiString is an ASCII character. class SeqAsciiString: public SeqString { public: static const bool kHasAsciiEncoding = true; diff --git a/src/parser.cc b/src/parser.cc index 777436e..35cc1c9 100644 --- a/src/parser.cc +++ b/src/parser.cc @@ -3757,7 +3757,7 @@ ObjectLiteral::Property* Parser::ParseObjectLiteralGetSet(bool is_getter, RelocInfo::kNoPosition, FunctionLiteral::ANONYMOUS_EXPRESSION, CHECK_OK); - // Allow any number of parameters for compatiabilty with JSC. + // Allow any number of parameters for compatibilty with JSC. // Specification only allows zero parameters for get and one for set. ObjectLiteral::Property* property = new(zone()) ObjectLiteral::Property(is_getter, value); diff --git a/src/parser.h b/src/parser.h index 146d7bb..16c2eff 100644 --- a/src/parser.h +++ b/src/parser.h @@ -186,7 +186,7 @@ class ParserApi { // ---------------------------------------------------------------------------- // REGEXP PARSING -// A BuffferedZoneList is an automatically growing list, just like (and backed +// A BufferedZoneList is an automatically growing list, just like (and backed // by) a ZoneList, that is optimized for the case of adding and removing // a single element. The last element added is stored outside the backing list, // and if no more than one element is ever added, the ZoneList isn't even diff --git a/src/platform-cygwin.cc b/src/platform-cygwin.cc index 9b34de9..f4c20ae 100644 --- a/src/platform-cygwin.cc +++ b/src/platform-cygwin.cc @@ -114,7 +114,7 @@ double OS::LocalTimeOffset() { // We keep the lowest and highest addresses mapped as a quick way of // determining that pointers are outside the heap (used mostly in assertions -// and verification). The estimate is conservative, ie, not all addresses in +// and verification). The estimate is conservative, i.e., not all addresses in // 'allocated' space are actually allocated to our heap. The range is // [lowest, highest), inclusive on the low and and exclusive on the high end. static void* lowest_ever_allocated = reinterpret_cast(-1); diff --git a/src/platform-freebsd.cc b/src/platform-freebsd.cc index 7d0d8d0..65bd720 100644 --- a/src/platform-freebsd.cc +++ b/src/platform-freebsd.cc @@ -128,7 +128,7 @@ double OS::LocalTimeOffset() { // We keep the lowest and highest addresses mapped as a quick way of // determining that pointers are outside the heap (used mostly in assertions -// and verification). The estimate is conservative, ie, not all addresses in +// and verification). The estimate is conservative, i.e., not all addresses in // 'allocated' space are actually allocated to our heap. The range is // [lowest, highest), inclusive on the low and and exclusive on the high end. static void* lowest_ever_allocated = reinterpret_cast(-1); diff --git a/src/platform-linux.cc b/src/platform-linux.cc index a3cdc03..68670e0 100644 --- a/src/platform-linux.cc +++ b/src/platform-linux.cc @@ -326,7 +326,7 @@ double OS::LocalTimeOffset() { // We keep the lowest and highest addresses mapped as a quick way of // determining that pointers are outside the heap (used mostly in assertions -// and verification). The estimate is conservative, ie, not all addresses in +// and verification). The estimate is conservative, i.e., not all addresses in // 'allocated' space are actually allocated to our heap. The range is // [lowest, highest), inclusive on the low and and exclusive on the high end. static void* lowest_ever_allocated = reinterpret_cast(-1); diff --git a/src/platform-macos.cc b/src/platform-macos.cc index 417fb11..369c3e4 100644 --- a/src/platform-macos.cc +++ b/src/platform-macos.cc @@ -75,7 +75,7 @@ extern "C" { namespace v8 { namespace internal { -// 0 is never a valid thread id on MacOSX since a ptread_t is +// 0 is never a valid thread id on MacOSX since a pthread_t is // a pointer. static const pthread_t kNoThread = (pthread_t) 0; @@ -103,7 +103,7 @@ void OS::SetUp() { // We keep the lowest and highest addresses mapped as a quick way of // determining that pointers are outside the heap (used mostly in assertions -// and verification). The estimate is conservative, ie, not all addresses in +// and verification). The estimate is conservative, i.e., not all addresses in // 'allocated' space are actually allocated to our heap. The range is // [lowest, highest), inclusive on the low and and exclusive on the high end. static void* lowest_ever_allocated = reinterpret_cast(-1); diff --git a/src/platform-openbsd.cc b/src/platform-openbsd.cc index 6f582d4..a01c08d 100644 --- a/src/platform-openbsd.cc +++ b/src/platform-openbsd.cc @@ -146,7 +146,7 @@ double OS::LocalTimeOffset() { // We keep the lowest and highest addresses mapped as a quick way of // determining that pointers are outside the heap (used mostly in assertions -// and verification). The estimate is conservative, ie, not all addresses in +// and verification). The estimate is conservative, i.e., not all addresses in // 'allocated' space are actually allocated to our heap. The range is // [lowest, highest), inclusive on the low and and exclusive on the high end. static void* lowest_ever_allocated = reinterpret_cast(-1); diff --git a/src/platform-solaris.cc b/src/platform-solaris.cc index d55ea89..08bec93 100644 --- a/src/platform-solaris.cc +++ b/src/platform-solaris.cc @@ -139,7 +139,7 @@ double OS::LocalTimeOffset() { // We keep the lowest and highest addresses mapped as a quick way of // determining that pointers are outside the heap (used mostly in assertions -// and verification). The estimate is conservative, ie, not all addresses in +// and verification). The estimate is conservative, i.e., not all addresses in // 'allocated' space are actually allocated to our heap. The range is // [lowest, highest), inclusive on the low and and exclusive on the high end. static void* lowest_ever_allocated = reinterpret_cast(-1); diff --git a/src/platform-win32.cc b/src/platform-win32.cc index c439ab9..5c000e6 100644 --- a/src/platform-win32.cc +++ b/src/platform-win32.cc @@ -198,7 +198,7 @@ double modulo(double x, double y) { // ---------------------------------------------------------------------------- // The Time class represents time on win32. A timestamp is represented as -// a 64-bit integer in 100 nano-seconds since January 1, 1601 (UTC). JavaScript +// a 64-bit integer in 100 nanoseconds since January 1, 1601 (UTC). JavaScript // timestamps are represented as a doubles in milliseconds since 00:00:00 UTC, // January 1, 1970. @@ -776,7 +776,7 @@ void OS::StrNCpy(Vector dest, const char* src, size_t n) { // We keep the lowest and highest addresses mapped as a quick way of // determining that pointers are outside the heap (used mostly in assertions -// and verification). The estimate is conservative, ie, not all addresses in +// and verification). The estimate is conservative, i.e., not all addresses in // 'allocated' space are actually allocated to our heap. The range is // [lowest, highest), inclusive on the low and and exclusive on the high end. static void* lowest_ever_allocated = reinterpret_cast(-1); diff --git a/src/regexp-macro-assembler.cc b/src/regexp-macro-assembler.cc index 99f3a37..b6fb3c5 100644 --- a/src/regexp-macro-assembler.cc +++ b/src/regexp-macro-assembler.cc @@ -133,7 +133,7 @@ NativeRegExpMacroAssembler::Result NativeRegExpMacroAssembler::Match( subject_ptr = slice->parent(); slice_offset = slice->offset(); } - // Ensure that an underlying string has the same ascii-ness. + // Ensure that an underlying string has the same ASCII-ness. bool is_ascii = subject_ptr->IsAsciiRepresentation(); ASSERT(subject_ptr->IsExternalString() || subject_ptr->IsSeqString()); // String is now either Sequential or External diff --git a/src/regexp.js b/src/regexp.js index 596c185..00dd7f1 100644 --- a/src/regexp.js +++ b/src/regexp.js @@ -436,8 +436,8 @@ function SetUpRegExp() { // value is set in SpiderMonkey, the value it is set to is coerced to a // boolean. We mimic that behavior with a slight difference: in SpiderMonkey // the value of the expression 'RegExp.multiline = null' (for instance) is the - // boolean false (ie, the value after coercion), while in V8 it is the value - // null (ie, the value before coercion). + // boolean false (i.e., the value after coercion), while in V8 it is the value + // null (i.e., the value before coercion). // Getter and setter for multiline. var multiline = false; diff --git a/src/runtime.cc b/src/runtime.cc index fb36213..f5b2e64 100644 --- a/src/runtime.cc +++ b/src/runtime.cc @@ -5926,8 +5926,8 @@ MUST_USE_RESULT static MaybeObject* ConvertCaseHelper( // // Allocate the resulting string. // - // NOTE: This assumes that the upper/lower case of an ascii - // character is also ascii. This is currently the case, but it + // NOTE: This assumes that the upper/lower case of an ASCII + // character is also ASCII. This is currently the case, but it // might break in the future if we implement more context and locale // dependent upper/lower conversions. Object* o; @@ -6027,9 +6027,9 @@ static const uintptr_t kOneInEveryByte = kUintptrAllBitsSet / 0xFF; // This function is only useful when it can be inlined and the // boundaries are statically known. // Requires: all bytes in the input word and the boundaries must be -// ascii (less than 0x7F). +// ASCII (less than 0x7F). static inline uintptr_t AsciiRangeMask(uintptr_t w, char m, char n) { - // Every byte in an ascii string is less than or equal to 0x7F. + // Every byte in an ASCII string is less than or equal to 0x7F. ASSERT((w & (kOneInEveryByte * 0x7F)) == w); // Use strict inequalities since in edge cases the function could be // further simplified. @@ -6157,10 +6157,10 @@ MUST_USE_RESULT static MaybeObject* ConvertCase( // Assume that the string is not empty; we need this assumption later if (length == 0) return s; - // Simpler handling of ascii strings. + // Simpler handling of ASCII strings. // - // NOTE: This assumes that the upper/lower case of an ascii - // character is also ascii. This is currently the case, but it + // NOTE: This assumes that the upper/lower case of an ASCII + // character is also ASCII. This is currently the case, but it // might break in the future if we implement more context and locale // dependent upper/lower conversions. if (s->IsSeqAsciiString()) { @@ -6323,7 +6323,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_StringSplit) { } -// Copies ascii characters to the given fixed array looking up +// Copies ASCII characters to the given fixed array looking up // one-char strings in the cache. Gives up on the first char that is // not in the cache and fills the remainder with smi zeros. Returns // the length of the successfully copied prefix. @@ -7422,7 +7422,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_pow) { } // Fast version of Math.pow if we know that y is not an integer and y is not -// -0.5 or 0.5. Used as slow case from fullcodegen. +// -0.5 or 0.5. Used as slow case from full codegen. RUNTIME_FUNCTION(MaybeObject*, Runtime_Math_pow_cfunction) { NoHandleAllocation ha; ASSERT(args.length() == 2); @@ -7465,7 +7465,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_RoundNumber) { // We compare with kSmiValueSize - 2 because (2^30 - 0.1) has exponent 29 and // should be rounded to 2^30, which is not smi (for 31-bit smis, similar - // agument holds for 32-bit smis). + // argument holds for 32-bit smis). if (!sign && exponent < kSmiValueSize - 2) { return Smi::FromInt(static_cast(value + 0.5)); } @@ -9355,7 +9355,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_ParseJson) { CONVERT_ARG_CHECKED(String, source, 0); source = Handle(source->TryFlattenGetString()); - // Optimized fast case where we only have ascii characters. + // Optimized fast case where we only have ASCII characters. Handle result; if (source->IsSeqAsciiString()) { result = JsonParser::Parse(source); @@ -10257,7 +10257,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_GetArrayKeys) { // DefineAccessor takes an optional final argument which is the -// property attributes (eg, DONT_ENUM, DONT_DELETE). IMPORTANT: due +// property attributes (e.g. DONT_ENUM, DONT_DELETE). IMPORTANT: due // to the way accessors are implemented, it is set for both the getter // and setter on the first call to DefineAccessor and ignored on // subsequent calls. @@ -11089,7 +11089,7 @@ static Handle MaterializeClosure(Isolate* isolate, Handle shared(context->closure()->shared()); Handle scope_info(shared->scope_info()); - // Allocate and initialize a JSObject with all the content of theis function + // Allocate and initialize a JSObject with all the content of this function // closure. Handle closure_scope = isolate->factory()->NewJSObject(isolate->object_function()); @@ -12257,7 +12257,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_DebugGetLoadedScripts) { // because using // instances->set(i, *GetScriptWrapper(script)) // is unsafe as GetScriptWrapper might call GC and the C++ compiler might - // already have deferenced the instances handle. + // already have dereferenced the instances handle. Handle wrapper = GetScriptWrapper(script); instances->set(i, *wrapper); } diff --git a/src/serialize.h b/src/serialize.h index ff10905..6efb8ee 100644 --- a/src/serialize.h +++ b/src/serialize.h @@ -228,7 +228,7 @@ class SerializerDeserializer: public ObjectVisitor { kFromStart = 0x20, // Object is described relative to start. // 0x21-0x28 One per space. // 0x29-0x2f Free. - // 0x30-0x3f Used by misc tags below. + // 0x30-0x3f Used by misc. tags below. kPointedToMask = 0x3f }; @@ -359,8 +359,8 @@ class Deserializer: public SerializerDeserializer { // Fills in some heap data in an area from start to end (non-inclusive). The // space id is used for the write barrier. The object_address is the address // of the object we are writing into, or NULL if we are not writing into an - // object, ie if we are writing a series of tagged values that are not on the - // heap. + // object, i.e. if we are writing a series of tagged values that are not on + // the heap. void ReadChunk( Object** start, Object** end, int space, Address object_address); HeapObject* GetAddressFromStart(int space); @@ -632,7 +632,7 @@ class StartupSerializer : public Serializer { // Serialize the current state of the heap. The order is: // 1) Strong references. // 2) Partial snapshot cache. - // 3) Weak references (eg the symbol table). + // 3) Weak references (e.g. the symbol table). virtual void SerializeStrongReferences(); virtual void SerializeObject(Object* o, HowToCode how_to_code, diff --git a/src/spaces-inl.h b/src/spaces-inl.h index 1cfdc13..bd544ce 100644 --- a/src/spaces-inl.h +++ b/src/spaces-inl.h @@ -248,7 +248,7 @@ void Page::set_prev_page(Page* page) { // Try linear allocation in the page of alloc_info's allocation top. Does -// not contain slow case logic (eg, move to the next page or try free list +// not contain slow case logic (e.g. move to the next page or try free list // allocation) so it can be used by all the allocation functions and for all // the paged spaces. HeapObject* PagedSpace::AllocateLinearly(int size_in_bytes) { diff --git a/src/spaces.h b/src/spaces.h index 41c3ef9..b3963d6 100644 --- a/src/spaces.h +++ b/src/spaces.h @@ -295,7 +295,7 @@ class SlotsBuffer; // MemoryChunk represents a memory region owned by a specific space. // It is divided into the header and the body. Chunk start is always -// 1MB aligned. Start of the body is aligned so it can accomodate +// 1MB aligned. Start of the body is aligned so it can accommodate // any heap object. class MemoryChunk { public: @@ -1181,11 +1181,11 @@ class AllocationInfo { // An abstraction of the accounting statistics of a page-structured space. -// The 'capacity' of a space is the number of object-area bytes (ie, not +// The 'capacity' of a space is the number of object-area bytes (i.e., not // including page bookkeeping structures) currently in the space. The 'size' // of a space is the number of allocated bytes, the 'waste' in the space is // the number of bytes that are not allocated and not available to -// allocation without reorganizing the space via a GC (eg, small blocks due +// allocation without reorganizing the space via a GC (e.g. small blocks due // to internal fragmentation, top of page areas in map space), and the bytes // 'available' is the number of unallocated bytes that are not waste. The // capacity is the sum of size, waste, and available. @@ -1198,7 +1198,7 @@ class AllocationStats BASE_EMBEDDED { public: AllocationStats() { Clear(); } - // Zero out all the allocation statistics (ie, no capacity). + // Zero out all the allocation statistics (i.e., no capacity). void Clear() { capacity_ = 0; size_ = 0; @@ -1210,7 +1210,7 @@ class AllocationStats BASE_EMBEDDED { waste_ = 0; } - // Reset the allocation statistics (ie, available = capacity with no + // Reset the allocation statistics (i.e., available = capacity with no // wasted or allocated bytes). void Reset() { size_ = 0; @@ -1341,7 +1341,7 @@ class FreeList BASE_EMBEDDED { // starting at 'start' is placed on the free list. The return value is the // number of bytes that have been lost due to internal fragmentation by // freeing the block. Bookkeeping information will be written to the block, - // ie, its contents will be destroyed. The start address should be word + // i.e., its contents will be destroyed. The start address should be word // aligned, and the size should be a non-zero multiple of the word size. int Free(Address start, int size_in_bytes); diff --git a/src/unicode.cc b/src/unicode.cc index 6e0ac1a..147f716 100644 --- a/src/unicode.cc +++ b/src/unicode.cc @@ -210,7 +210,7 @@ static int LookupMapping(const int32_t* table, uchar Utf8::CalculateValue(const byte* str, unsigned length, unsigned* cursor) { - // We only get called for non-ascii characters. + // We only get called for non-ASCII characters. if (length == 1) { *cursor += 1; return kBadChar; @@ -286,8 +286,8 @@ const byte* Utf8::ReadBlock(Buffer str, byte* buffer, } const byte* data = reinterpret_cast(str.data()); if (data[offset] <= kMaxOneByteChar) { - // The next character is an ascii char so we scan forward over - // the following ascii characters and return the next pure ascii + // The next character is an ASCII char so we scan forward over + // the following ASCII characters and return the next pure ASCII // substring const byte* result = data + offset; offset++; @@ -297,13 +297,13 @@ const byte* Utf8::ReadBlock(Buffer str, byte* buffer, *offset_ptr = offset; return result; } else { - // The next character is non-ascii so we just fill the buffer + // The next character is non-ASCII so we just fill the buffer unsigned cursor = 0; unsigned chars_read = 0; while (offset < str.length()) { uchar c = data[offset]; if (c <= kMaxOneByteChar) { - // Fast case for ascii characters + // Fast case for ASCII characters if (!CharacterStream::EncodeAsciiCharacter(c, buffer, capacity, diff --git a/src/v8threads.cc b/src/v8threads.cc index 3881d66..fd8d536 100644 --- a/src/v8threads.cc +++ b/src/v8threads.cc @@ -154,7 +154,7 @@ namespace internal { bool ThreadManager::RestoreThread() { ASSERT(IsLockedByCurrentThread()); - // First check whether the current thread has been 'lazily archived', ie + // First check whether the current thread has been 'lazily archived', i.e. // not archived at all. If that is the case we put the state storage we // had prepared back in the free list, since we didn't need it after all. if (lazily_archived_thread_.Equals(ThreadId::Current())) { diff --git a/src/v8utils.cc b/src/v8utils.cc index bf0e05d..042a60f 100644 --- a/src/v8utils.cc +++ b/src/v8utils.cc @@ -316,7 +316,7 @@ bool MemoryMappedExternalResource::EnsureIsAscii(bool abort_if_failed) const { for (const char* p = data_; p < end; p++) { char c = *p; if ((c & 0x80) != 0) { - // Non-ascii detected: + // Non-ASCII detected: is_ascii = false; // Report the error and abort if appropriate: @@ -329,7 +329,7 @@ bool MemoryMappedExternalResource::EnsureIsAscii(bool abort_if_failed) const { c, filename_, line_no, char_no); // Allow for some context up to kNumberOfLeadingContextChars chars - // before the offending non-ascii char to help the user see where + // before the offending non-ASCII char to help the user see where // the offending char is. const int kNumberOfLeadingContextChars = 10; const char* err_context = p - kNumberOfLeadingContextChars; @@ -345,7 +345,7 @@ bool MemoryMappedExternalResource::EnsureIsAscii(bool abort_if_failed) const { OS::Abort(); } - break; // Non-ascii detected. No need to continue scanning. + break; // Non-ASCII detected. No need to continue scanning. } if (c == '\n') { start_of_line = p; diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc index 03a5170..e0581dd 100644 --- a/src/x64/code-stubs-x64.cc +++ b/src/x64/code-stubs-x64.cc @@ -2771,7 +2771,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) { kShortExternalStringMask)); STATIC_ASSERT((kStringTag | kSeqStringTag | kTwoByteStringTag) == 0); __ j(zero, &seq_two_byte_string, Label::kNear); - // Any other flat string must be a flat ascii string. None of the following + // Any other flat string must be a flat ASCII string. None of the following // string type tests will succeed if subject is not a string or a short // external string. __ andb(rbx, Immediate(kIsNotStringMask | @@ -2822,16 +2822,16 @@ void RegExpExecStub::Generate(MacroAssembler* masm) { Immediate(kStringRepresentationMask | kStringEncodingMask)); STATIC_ASSERT((kSeqStringTag | kTwoByteStringTag) == 0); __ j(zero, &seq_two_byte_string, Label::kNear); - // Any other flat string must be sequential ascii or external. + // Any other flat string must be sequential ASCII or external. __ testb(FieldOperand(rbx, Map::kInstanceTypeOffset), Immediate(kStringRepresentationMask)); __ j(not_zero, &external_string); __ bind(&seq_ascii_string); - // rdi: subject string (sequential ascii) + // rdi: subject string (sequential ASCII) // rax: RegExp data (FixedArray) __ movq(r11, FieldOperand(rax, JSRegExp::kDataAsciiCodeOffset)); - __ Set(rcx, 1); // Type is ascii. + __ Set(rcx, 1); // Type is ASCII. __ jmp(&check_code, Label::kNear); __ bind(&seq_two_byte_string); @@ -2847,7 +2847,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) { __ JumpIfSmi(r11, &runtime); // rdi: subject string - // rcx: encoding of subject string (1 if ascii, 0 if two_byte); + // rcx: encoding of subject string (1 if ASCII, 0 if two_byte); // r11: code // Load used arguments before starting to push arguments for call to native // RegExp code to avoid handling changing stack height. @@ -2855,7 +2855,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) { // rdi: subject string // rbx: previous index - // rcx: encoding of subject string (1 if ascii 0 if two_byte); + // rcx: encoding of subject string (1 if ASCII 0 if two_byte); // r11: code // All checks done. Now push arguments for native regexp code. Counters* counters = masm->isolate()->counters(); @@ -2912,7 +2912,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) { // Keep track on aliasing between argX defined above and the registers used. // rdi: subject string // rbx: previous index - // rcx: encoding of subject string (1 if ascii 0 if two_byte); + // rcx: encoding of subject string (1 if ASCII 0 if two_byte); // r11: code // r14: slice offset // r15: original subject string @@ -3483,7 +3483,7 @@ void CompareStub::Generate(MacroAssembler* masm) { __ JumpIfNotBothSequentialAsciiStrings( rdx, rax, rcx, rbx, &check_unequal_objects); - // Inline comparison of ascii strings. + // Inline comparison of ASCII strings. if (cc_ == equal) { StringCompareStub::GenerateFlatAsciiStringEquals(masm, rdx, @@ -4518,7 +4518,7 @@ void StringAddStub::Generate(MacroAssembler* masm) { __ SmiCompare(rbx, Smi::FromInt(2)); __ j(not_equal, &longer_than_two); - // Check that both strings are non-external ascii strings. + // Check that both strings are non-external ASCII strings. __ JumpIfBothInstanceTypesAreNotSequentialAscii(r8, r9, rbx, rcx, &call_runtime); @@ -4558,7 +4558,7 @@ void StringAddStub::Generate(MacroAssembler* masm) { __ j(above, &call_runtime); // If result is not supposed to be flat, allocate a cons string object. If - // both strings are ascii the result is an ascii cons string. + // both strings are ASCII the result is an ASCII cons string. // rax: first string // rbx: length of resulting flat string // rdx: second string @@ -4572,7 +4572,7 @@ void StringAddStub::Generate(MacroAssembler* masm) { __ testl(rcx, Immediate(kStringEncodingMask)); __ j(zero, &non_ascii); __ bind(&ascii_data); - // Allocate an acsii cons string. + // Allocate an ASCII cons string. __ AllocateAsciiConsString(rcx, rdi, no_reg, &call_runtime); __ bind(&allocated); // Fill the fields of the cons string. @@ -4586,7 +4586,7 @@ void StringAddStub::Generate(MacroAssembler* masm) { __ ret(2 * kPointerSize); __ bind(&non_ascii); // At least one of the strings is two-byte. Check whether it happens - // to contain only ascii characters. + // to contain only ASCII characters. // rcx: first instance type AND second instance type. // r8: first instance type. // r9: second instance type. @@ -4660,7 +4660,7 @@ void StringAddStub::Generate(MacroAssembler* masm) { __ j(zero, &non_ascii_string_add_flat_result); __ bind(&make_flat_ascii_string); - // Both strings are ascii strings. As they are short they are both flat. + // Both strings are ASCII strings. As they are short they are both flat. __ AllocateAsciiString(rax, rbx, rdi, r8, r9, &call_runtime); // rax: result string // Locate first character of result. @@ -4677,7 +4677,7 @@ void StringAddStub::Generate(MacroAssembler* masm) { __ ret(2 * kPointerSize); __ bind(&non_ascii_string_add_flat_result); - // Both strings are ascii strings. As they are short they are both flat. + // Both strings are ASCII strings. As they are short they are both flat. __ AllocateTwoByteString(rax, rbx, rdi, r8, r9, &call_runtime); // rax: result string // Locate first character of result. @@ -4931,7 +4931,7 @@ void StringHelper::GenerateTwoCharacterSymbolTableProbe(MacroAssembler* masm, // JumpIfInstanceTypeIsNotSequentialAscii does not use it implicitly Register temp = kScratchRegister; - // Check that the candidate is a non-external ascii string. + // Check that the candidate is a non-external ASCII string. __ movzxbl(temp, FieldOperand(map, Map::kInstanceTypeOffset)); __ JumpIfInstanceTypeIsNotSequentialAscii( temp, temp, &next_probe[i]); @@ -5411,7 +5411,7 @@ void StringCompareStub::Generate(MacroAssembler* masm) { // Check that both are sequential ASCII strings. __ JumpIfNotBothSequentialAsciiStrings(rdx, rax, rcx, rbx, &runtime); - // Inline comparison of ascii strings. + // Inline comparison of ASCII strings. __ IncrementCounter(counters->string_compare_native(), 1); // Drop arguments from the stack __ pop(rcx); diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc index eeef0e9..34f9490 100644 --- a/src/x64/full-codegen-x64.cc +++ b/src/x64/full-codegen-x64.cc @@ -106,7 +106,7 @@ class JumpPatchSite BASE_EMBEDDED { // formal parameter count expected by the function. // // The live registers are: -// o rdi: the JS function object being called (ie, ourselves) +// o rdi: the JS function object being called (i.e. ourselves) // o rsi: our context // o rbp: our caller's frame pointer // o rsp: stack pointer (pointing to return address) @@ -3530,7 +3530,7 @@ void FullCodeGenerator::EmitFastAsciiArrayJoin(CallRuntime* expr) { // One-character separator case __ bind(&one_char_separator); - // Get the separator ascii character value. + // Get the separator ASCII character value. // Register "string" holds the separator. __ movzxbl(scratch, FieldOperand(string, SeqAsciiString::kHeaderSize)); __ Set(index, 0); diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc index 4755369..2f1c3fe 100644 --- a/src/x64/macro-assembler-x64.cc +++ b/src/x64/macro-assembler-x64.cc @@ -2114,7 +2114,7 @@ void MacroAssembler::JumpIfNotBothSequentialAsciiStrings( movzxbl(scratch1, FieldOperand(scratch1, Map::kInstanceTypeOffset)); movzxbl(scratch2, FieldOperand(scratch2, Map::kInstanceTypeOffset)); - // Check that both are flat ascii strings. + // Check that both are flat ASCII strings. ASSERT(kNotStringTag != 0); const int kFlatAsciiStringMask = kIsNotStringMask | kStringRepresentationMask | kStringEncodingMask; @@ -2160,7 +2160,7 @@ void MacroAssembler::JumpIfBothInstanceTypesAreNotSequentialAscii( movq(scratch1, first_object_instance_type); movq(scratch2, second_object_instance_type); - // Check that both are flat ascii strings. + // Check that both are flat ASCII strings. ASSERT(kNotStringTag != 0); const int kFlatAsciiStringMask = kIsNotStringMask | kStringRepresentationMask | kStringEncodingMask; @@ -3825,7 +3825,7 @@ void MacroAssembler::AllocateAsciiString(Register result, subq(scratch1, Immediate(kHeaderAlignment)); } - // Allocate ascii string in new space. + // Allocate ASCII string in new space. AllocateInNewSpace(SeqAsciiString::kHeaderSize, times_1, scratch1, diff --git a/src/x64/macro-assembler-x64.h b/src/x64/macro-assembler-x64.h index 8596852..09e4a06 100644 --- a/src/x64/macro-assembler-x64.h +++ b/src/x64/macro-assembler-x64.h @@ -203,7 +203,7 @@ class MacroAssembler: public Assembler { Label* on_black, Label::Distance on_black_distance = Label::kFar); - // Detects conservatively whether an object is data-only, ie it does need to + // Detects conservatively whether an object is data-only, i.e. it does need to // be scanned by the garbage collector. void JumpIfDataObject(Register value, Register scratch, @@ -745,7 +745,7 @@ class MacroAssembler: public Assembler { Label* on_not_both_flat_ascii, Label::Distance near_jump = Label::kFar); - // Check whether the instance type represents a flat ascii string. Jump to the + // Check whether the instance type represents a flat ASCII string. Jump to the // label if not. If the instance type can be scratched specify same register // for both instance type and scratch. void JumpIfInstanceTypeIsNotSequentialAscii( @@ -901,7 +901,7 @@ class MacroAssembler: public Assembler { // Check if the map of an object is equal to a specified map and branch to // label if not. Skip the smi check if not required (object is known to be a // heap object). If mode is ALLOW_ELEMENT_TRANSITION_MAPS, then also match - // against maps that are ElementsKind transition maps of the specificed map. + // against maps that are ElementsKind transition maps of the specified map. void CheckMap(Register obj, Handle map, Label* fail, diff --git a/src/x64/regexp-macro-assembler-x64.cc b/src/x64/regexp-macro-assembler-x64.cc index 1e0cd6a..16730d2 100644 --- a/src/x64/regexp-macro-assembler-x64.cc +++ b/src/x64/regexp-macro-assembler-x64.cc @@ -226,7 +226,7 @@ void RegExpMacroAssemblerX64::CheckCharacters(Vector str, bool check_end_of_string) { #ifdef DEBUG // If input is ASCII, don't even bother calling here if the string to - // match contains a non-ascii character. + // match contains a non-ASCII character. if (mode_ == ASCII) { ASSERT(String::IsAscii(str.start(), str.length())); } diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc index 3633fbb..47c2177 100644 --- a/src/x64/stub-cache-x64.cc +++ b/src/x64/stub-cache-x64.cc @@ -982,7 +982,7 @@ void StubCompiler::GenerateLoadCallback(Handle object, __ movq(name_arg, rsp); __ push(scratch2); // Restore return address. - // 3 elements array for v8::Agruments::values_ and handler for name. + // 3 elements array for v8::Arguments::values_ and handler for name. const int kStackSpace = 4; // Allocate v8::AccessorInfo in non-GCed stack space. -- 2.7.4