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 #if V8_TARGET_ARCH_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
6 | 6 |
7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
8 #include "src/api-arguments.h" | 8 #include "src/api-arguments.h" |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 // With careful management, we won't have to save slot and vector on | 636 // With careful management, we won't have to save slot and vector on |
637 // the stack. Simply handle the possibly missing case first. | 637 // the stack. Simply handle the possibly missing case first. |
638 // TODO(mvstanton): this code can be more efficient. | 638 // TODO(mvstanton): this code can be more efficient. |
639 __ cmp(FieldOperand(receiver, JSFunction::kPrototypeOrInitialMapOffset), | 639 __ cmp(FieldOperand(receiver, JSFunction::kPrototypeOrInitialMapOffset), |
640 Immediate(isolate()->factory()->the_hole_value())); | 640 Immediate(isolate()->factory()->the_hole_value())); |
641 __ j(equal, &miss); | 641 __ j(equal, &miss); |
642 __ TryGetFunctionPrototype(receiver, eax, ebx, &miss); | 642 __ TryGetFunctionPrototype(receiver, eax, ebx, &miss); |
643 __ ret(0); | 643 __ ret(0); |
644 | 644 |
645 __ bind(&miss); | 645 __ bind(&miss); |
646 PropertyAccessCompiler::TailCallBuiltin( | 646 PropertyAccessCompiler::TailCallMissHandler(masm, Code::LOAD_IC); |
647 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC)); | |
648 } | 647 } |
649 | 648 |
650 | 649 |
651 void LoadIndexedStringStub::Generate(MacroAssembler* masm) { | 650 void LoadIndexedStringStub::Generate(MacroAssembler* masm) { |
652 // Return address is on the stack. | 651 // Return address is on the stack. |
653 Label miss; | 652 Label miss; |
654 | 653 |
655 Register receiver = LoadDescriptor::ReceiverRegister(); | 654 Register receiver = LoadDescriptor::ReceiverRegister(); |
656 Register index = LoadDescriptor::NameRegister(); | 655 Register index = LoadDescriptor::NameRegister(); |
657 Register scratch = edi; | 656 Register scratch = edi; |
(...skipping 11 matching lines...) Expand all Loading... |
669 &miss, // When not a number. | 668 &miss, // When not a number. |
670 &miss, // When index out of range. | 669 &miss, // When index out of range. |
671 RECEIVER_IS_STRING); | 670 RECEIVER_IS_STRING); |
672 char_at_generator.GenerateFast(masm); | 671 char_at_generator.GenerateFast(masm); |
673 __ ret(0); | 672 __ ret(0); |
674 | 673 |
675 StubRuntimeCallHelper call_helper; | 674 StubRuntimeCallHelper call_helper; |
676 char_at_generator.GenerateSlow(masm, PART_OF_IC_HANDLER, call_helper); | 675 char_at_generator.GenerateSlow(masm, PART_OF_IC_HANDLER, call_helper); |
677 | 676 |
678 __ bind(&miss); | 677 __ bind(&miss); |
679 PropertyAccessCompiler::TailCallBuiltin( | 678 PropertyAccessCompiler::TailCallMissHandler(masm, Code::KEYED_LOAD_IC); |
680 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC)); | |
681 } | 679 } |
682 | 680 |
683 | 681 |
684 void RegExpExecStub::Generate(MacroAssembler* masm) { | 682 void RegExpExecStub::Generate(MacroAssembler* masm) { |
685 // Just jump directly to runtime if native RegExp is not selected at compile | 683 // Just jump directly to runtime if native RegExp is not selected at compile |
686 // time or if regexp entry in generated code is turned off runtime switch or | 684 // time or if regexp entry in generated code is turned off runtime switch or |
687 // at compilation. | 685 // at compilation. |
688 #ifdef V8_INTERPRETED_REGEXP | 686 #ifdef V8_INTERPRETED_REGEXP |
689 __ TailCallRuntime(Runtime::kRegExpExec); | 687 __ TailCallRuntime(Runtime::kRegExpExec); |
690 #else // V8_INTERPRETED_REGEXP | 688 #else // V8_INTERPRETED_REGEXP |
(...skipping 5026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5717 kStackUnwindSpace, nullptr, return_value_operand, | 5715 kStackUnwindSpace, nullptr, return_value_operand, |
5718 NULL); | 5716 NULL); |
5719 } | 5717 } |
5720 | 5718 |
5721 #undef __ | 5719 #undef __ |
5722 | 5720 |
5723 } // namespace internal | 5721 } // namespace internal |
5724 } // namespace v8 | 5722 } // namespace v8 |
5725 | 5723 |
5726 #endif // V8_TARGET_ARCH_IA32 | 5724 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |