| 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-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
| 9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
| 10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
| (...skipping 2645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2656 __ j(not_equal, &next_prototype, Label::kNear); | 2656 __ j(not_equal, &next_prototype, Label::kNear); |
| 2657 | 2657 |
| 2658 // Otherwise load the parent function template and iterate. | 2658 // Otherwise load the parent function template and iterate. |
| 2659 __ mov(scratch0, | 2659 __ mov(scratch0, |
| 2660 FieldOperand(scratch0, FunctionTemplateInfo::kParentTemplateOffset)); | 2660 FieldOperand(scratch0, FunctionTemplateInfo::kParentTemplateOffset)); |
| 2661 __ jmp(&function_template_loop, Label::kNear); | 2661 __ jmp(&function_template_loop, Label::kNear); |
| 2662 | 2662 |
| 2663 // Load the next prototype. | 2663 // Load the next prototype. |
| 2664 __ bind(&next_prototype); | 2664 __ bind(&next_prototype); |
| 2665 __ mov(receiver, FieldOperand(receiver, HeapObject::kMapOffset)); | 2665 __ mov(receiver, FieldOperand(receiver, HeapObject::kMapOffset)); |
| 2666 __ test(FieldOperand(receiver, Map::kBitField3Offset), |
| 2667 Immediate(Map::HasHiddenPrototype::kMask)); |
| 2668 __ j(zero, receiver_check_failed); |
| 2669 |
| 2666 __ mov(receiver, FieldOperand(receiver, Map::kPrototypeOffset)); | 2670 __ mov(receiver, FieldOperand(receiver, Map::kPrototypeOffset)); |
| 2667 // End if the prototype is null or not hidden. | |
| 2668 __ CompareRoot(receiver, Heap::kNullValueRootIndex); | |
| 2669 __ j(equal, receiver_check_failed); | |
| 2670 __ mov(scratch0, FieldOperand(receiver, HeapObject::kMapOffset)); | 2671 __ mov(scratch0, FieldOperand(receiver, HeapObject::kMapOffset)); |
| 2671 __ test(FieldOperand(scratch0, Map::kBitField3Offset), | |
| 2672 Immediate(Map::IsHiddenPrototype::kMask)); | |
| 2673 __ j(zero, receiver_check_failed); | |
| 2674 // Iterate. | 2672 // Iterate. |
| 2675 __ jmp(&prototype_loop_start, Label::kNear); | 2673 __ jmp(&prototype_loop_start, Label::kNear); |
| 2676 | 2674 |
| 2677 __ bind(&receiver_check_passed); | 2675 __ bind(&receiver_check_passed); |
| 2678 } | 2676 } |
| 2679 | 2677 |
| 2680 | 2678 |
| 2681 void Builtins::Generate_HandleFastApiCall(MacroAssembler* masm) { | 2679 void Builtins::Generate_HandleFastApiCall(MacroAssembler* masm) { |
| 2682 // ----------- S t a t e ------------- | 2680 // ----------- S t a t e ------------- |
| 2683 // -- eax : number of arguments (not including the receiver) | 2681 // -- eax : number of arguments (not including the receiver) |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2775 | 2773 |
| 2776 __ bind(&ok); | 2774 __ bind(&ok); |
| 2777 __ ret(0); | 2775 __ ret(0); |
| 2778 } | 2776 } |
| 2779 | 2777 |
| 2780 #undef __ | 2778 #undef __ |
| 2781 } // namespace internal | 2779 } // namespace internal |
| 2782 } // namespace v8 | 2780 } // namespace v8 |
| 2783 | 2781 |
| 2784 #endif // V8_TARGET_ARCH_IA32 | 2782 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |