OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
8 | 8 |
9 #include "codegen.h" | 9 #include "codegen.h" |
10 #include "heap.h" | 10 #include "heap.h" |
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 | 519 |
520 // Handle external strings. | 520 // Handle external strings. |
521 Label ascii_external, done; | 521 Label ascii_external, done; |
522 if (FLAG_debug_code) { | 522 if (FLAG_debug_code) { |
523 // Assert that we do not have a cons or slice (indirect strings) here. | 523 // Assert that we do not have a cons or slice (indirect strings) here. |
524 // Sequential strings have already been ruled out. | 524 // Sequential strings have already been ruled out. |
525 __ test(result, Immediate(kIsIndirectStringMask)); | 525 __ test(result, Immediate(kIsIndirectStringMask)); |
526 __ Assert(zero, kExternalStringExpectedButNotFound); | 526 __ Assert(zero, kExternalStringExpectedButNotFound); |
527 } | 527 } |
528 // Rule out short external strings. | 528 // Rule out short external strings. |
529 STATIC_CHECK(kShortExternalStringTag != 0); | 529 STATIC_ASSERT(kShortExternalStringTag != 0); |
530 __ test_b(result, kShortExternalStringMask); | 530 __ test_b(result, kShortExternalStringMask); |
531 __ j(not_zero, call_runtime); | 531 __ j(not_zero, call_runtime); |
532 // Check encoding. | 532 // Check encoding. |
533 STATIC_ASSERT(kTwoByteStringTag == 0); | 533 STATIC_ASSERT(kTwoByteStringTag == 0); |
534 __ test_b(result, kStringEncodingMask); | 534 __ test_b(result, kStringEncodingMask); |
535 __ mov(result, FieldOperand(string, ExternalString::kResourceDataOffset)); | 535 __ mov(result, FieldOperand(string, ExternalString::kResourceDataOffset)); |
536 __ j(not_equal, &ascii_external, Label::kNear); | 536 __ j(not_equal, &ascii_external, Label::kNear); |
537 // Two-byte string. | 537 // Two-byte string. |
538 __ movzx_w(result, Operand(result, index, times_2, 0)); | 538 __ movzx_w(result, Operand(result, index, times_2, 0)); |
539 __ jmp(&done, Label::kNear); | 539 __ jmp(&done, Label::kNear); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 Code* stub = GetCodeAgeStub(isolate, age, parity); | 623 Code* stub = GetCodeAgeStub(isolate, age, parity); |
624 CodePatcher patcher(sequence, young_length); | 624 CodePatcher patcher(sequence, young_length); |
625 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32); | 625 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32); |
626 } | 626 } |
627 } | 627 } |
628 | 628 |
629 | 629 |
630 } } // namespace v8::internal | 630 } } // namespace v8::internal |
631 | 631 |
632 #endif // V8_TARGET_ARCH_X87 | 632 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |