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_X87 | 5 #if V8_TARGET_ARCH_X87 |
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 2671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2682 __ j(not_equal, &next_prototype, Label::kNear); | 2682 __ j(not_equal, &next_prototype, Label::kNear); |
2683 | 2683 |
2684 // Otherwise load the parent function template and iterate. | 2684 // Otherwise load the parent function template and iterate. |
2685 __ mov(scratch0, | 2685 __ mov(scratch0, |
2686 FieldOperand(scratch0, FunctionTemplateInfo::kParentTemplateOffset)); | 2686 FieldOperand(scratch0, FunctionTemplateInfo::kParentTemplateOffset)); |
2687 __ jmp(&function_template_loop, Label::kNear); | 2687 __ jmp(&function_template_loop, Label::kNear); |
2688 | 2688 |
2689 // Load the next prototype. | 2689 // Load the next prototype. |
2690 __ bind(&next_prototype); | 2690 __ bind(&next_prototype); |
2691 __ mov(receiver, FieldOperand(receiver, HeapObject::kMapOffset)); | 2691 __ mov(receiver, FieldOperand(receiver, HeapObject::kMapOffset)); |
| 2692 __ test(FieldOperand(receiver, Map::kBitField3Offset), |
| 2693 Immediate(Map::HasHiddenPrototype::kMask)); |
| 2694 __ j(zero, receiver_check_failed); |
| 2695 |
2692 __ mov(receiver, FieldOperand(receiver, Map::kPrototypeOffset)); | 2696 __ mov(receiver, FieldOperand(receiver, Map::kPrototypeOffset)); |
2693 // End if the prototype is null or not hidden. | |
2694 __ CompareRoot(receiver, Heap::kNullValueRootIndex); | |
2695 __ j(equal, receiver_check_failed); | |
2696 __ mov(scratch0, FieldOperand(receiver, HeapObject::kMapOffset)); | 2697 __ mov(scratch0, FieldOperand(receiver, HeapObject::kMapOffset)); |
2697 __ test(FieldOperand(scratch0, Map::kBitField3Offset), | |
2698 Immediate(Map::IsHiddenPrototype::kMask)); | |
2699 __ j(zero, receiver_check_failed); | |
2700 // Iterate. | 2698 // Iterate. |
2701 __ jmp(&prototype_loop_start, Label::kNear); | 2699 __ jmp(&prototype_loop_start, Label::kNear); |
2702 | 2700 |
2703 __ bind(&receiver_check_passed); | 2701 __ bind(&receiver_check_passed); |
2704 } | 2702 } |
2705 | 2703 |
2706 | 2704 |
2707 void Builtins::Generate_HandleFastApiCall(MacroAssembler* masm) { | 2705 void Builtins::Generate_HandleFastApiCall(MacroAssembler* masm) { |
2708 // ----------- S t a t e ------------- | 2706 // ----------- S t a t e ------------- |
2709 // -- eax : number of arguments (not including the receiver) | 2707 // -- eax : number of arguments (not including the receiver) |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2801 | 2799 |
2802 __ bind(&ok); | 2800 __ bind(&ok); |
2803 __ ret(0); | 2801 __ ret(0); |
2804 } | 2802 } |
2805 | 2803 |
2806 #undef __ | 2804 #undef __ |
2807 } // namespace internal | 2805 } // namespace internal |
2808 } // namespace v8 | 2806 } // namespace v8 |
2809 | 2807 |
2810 #endif // V8_TARGET_ARCH_X87 | 2808 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |