diff options
author | isaacs <i@izs.me> | 2012-01-23 16:16:42 -0800 |
---|---|---|
committer | isaacs <i@izs.me> | 2012-01-23 17:16:27 -0800 |
commit | 40879f33cd083ad8e16860a19cce03a0126e12a5 (patch) | |
tree | 010f16d83e398481e074f35a1900ee6c9e011e16 /deps/v8/src/ia32/code-stubs-ia32.cc | |
parent | b1b16d117e6fe2ca889d10e7e0b62a5a60997d57 (diff) | |
download | node-40879f33cd083ad8e16860a19cce03a0126e12a5.tar.gz |
Upgrade V8 to 3.8.8
Diffstat (limited to 'deps/v8/src/ia32/code-stubs-ia32.cc')
-rw-r--r-- | deps/v8/src/ia32/code-stubs-ia32.cc | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/deps/v8/src/ia32/code-stubs-ia32.cc b/deps/v8/src/ia32/code-stubs-ia32.cc index b654390c2..eded335e7 100644 --- a/deps/v8/src/ia32/code-stubs-ia32.cc +++ b/deps/v8/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. @@ -5585,11 +5585,11 @@ void StringAddStub::Generate(MacroAssembler* masm) { __ bind(&longer_than_two); // Check if resulting string will be flat. - __ cmp(ebx, Immediate(Smi::FromInt(String::kMinNonFlatLength))); + __ cmp(ebx, Immediate(Smi::FromInt(ConsString::kMinLength))); __ 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)); @@ -5633,7 +5633,7 @@ void StringAddStub::Generate(MacroAssembler* masm) { __ jmp(&allocated); // We cannot encounter sliced strings or cons strings here since: - STATIC_ASSERT(SlicedString::kMinLength >= String::kMinNonFlatLength); + STATIC_ASSERT(SlicedString::kMinLength >= ConsString::kMinLength); // Handle creating a flat result from either external or sequential strings. // Locate the first characters' locations. // eax: first string @@ -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( @@ -6042,6 +6042,7 @@ void StringHelper::GenerateHashInit(MacroAssembler* masm, __ mov(scratch, Operand::StaticArray(scratch, times_pointer_size, roots_array_start)); + __ SmiUntag(scratch); __ add(scratch, character); __ mov(hash, scratch); __ shl(scratch, 10); @@ -6280,7 +6281,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 +6494,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)); |