| 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/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
| (...skipping 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1051 | 1051 |
| 1052 __ bind(&no_descriptors); | 1052 __ bind(&no_descriptors); |
| 1053 __ add(esp, Immediate(kPointerSize)); | 1053 __ add(esp, Immediate(kPointerSize)); |
| 1054 __ jmp(&exit); | 1054 __ jmp(&exit); |
| 1055 | 1055 |
| 1056 // We got a fixed array in register eax. Iterate through that. | 1056 // We got a fixed array in register eax. Iterate through that. |
| 1057 Label non_proxy; | 1057 Label non_proxy; |
| 1058 __ bind(&fixed_array); | 1058 __ bind(&fixed_array); |
| 1059 | 1059 |
| 1060 // No need for a write barrier, we are storing a Smi in the feedback vector. | 1060 // No need for a write barrier, we are storing a Smi in the feedback vector. |
| 1061 __ LoadHeapObject(ebx, FeedbackVector()); | 1061 __ EmitLoadTypeFeedbackVector(ebx); |
| 1062 int vector_index = FeedbackVector()->GetIndex(slot); | 1062 int vector_index = SmiFromSlot(slot)->value(); |
| 1063 __ mov(FieldOperand(ebx, FixedArray::OffsetOfElementAt(vector_index)), | 1063 __ mov(FieldOperand(ebx, FixedArray::OffsetOfElementAt(vector_index)), |
| 1064 Immediate(TypeFeedbackVector::MegamorphicSentinel(isolate()))); | 1064 Immediate(TypeFeedbackVector::MegamorphicSentinel(isolate()))); |
| 1065 | 1065 |
| 1066 __ mov(ebx, Immediate(Smi::FromInt(1))); // Smi indicates slow check | 1066 __ mov(ebx, Immediate(Smi::FromInt(1))); // Smi indicates slow check |
| 1067 __ mov(ecx, Operand(esp, 0 * kPointerSize)); // Get enumerated object | 1067 __ mov(ecx, Operand(esp, 0 * kPointerSize)); // Get enumerated object |
| 1068 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); | 1068 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); |
| 1069 __ CmpObjectType(ecx, LAST_JS_PROXY_TYPE, ecx); | 1069 __ CmpObjectType(ecx, LAST_JS_PROXY_TYPE, ecx); |
| 1070 __ j(above, &non_proxy); | 1070 __ j(above, &non_proxy); |
| 1071 __ Move(ebx, Immediate(Smi::FromInt(0))); // Zero indicates proxy | 1071 __ Move(ebx, Immediate(Smi::FromInt(0))); // Zero indicates proxy |
| 1072 __ bind(&non_proxy); | 1072 __ bind(&non_proxy); |
| (...skipping 1994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3067 | 3067 |
| 3068 // Call the construct call builtin that handles allocation and | 3068 // Call the construct call builtin that handles allocation and |
| 3069 // constructor invocation. | 3069 // constructor invocation. |
| 3070 SetConstructCallPosition(expr); | 3070 SetConstructCallPosition(expr); |
| 3071 | 3071 |
| 3072 // Load function and argument count into edi and eax. | 3072 // Load function and argument count into edi and eax. |
| 3073 __ Move(eax, Immediate(arg_count)); | 3073 __ Move(eax, Immediate(arg_count)); |
| 3074 __ mov(edi, Operand(esp, arg_count * kPointerSize)); | 3074 __ mov(edi, Operand(esp, arg_count * kPointerSize)); |
| 3075 | 3075 |
| 3076 // Record call targets in unoptimized code. | 3076 // Record call targets in unoptimized code. |
| 3077 __ LoadHeapObject(ebx, FeedbackVector()); | 3077 __ EmitLoadTypeFeedbackVector(ebx); |
| 3078 __ mov(edx, Immediate(SmiFromSlot(expr->CallNewFeedbackSlot()))); | 3078 __ mov(edx, Immediate(SmiFromSlot(expr->CallNewFeedbackSlot()))); |
| 3079 | 3079 |
| 3080 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); | 3080 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); |
| 3081 __ call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); | 3081 __ call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); |
| 3082 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); | 3082 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); |
| 3083 // Restore context register. | 3083 // Restore context register. |
| 3084 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | 3084 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
| 3085 context()->Plug(eax); | 3085 context()->Plug(eax); |
| 3086 } | 3086 } |
| 3087 | 3087 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 3107 | 3107 |
| 3108 // Load original constructor into ecx. | 3108 // Load original constructor into ecx. |
| 3109 VisitForAccumulatorValue(super_call_ref->new_target_var()); | 3109 VisitForAccumulatorValue(super_call_ref->new_target_var()); |
| 3110 __ mov(ecx, result_register()); | 3110 __ mov(ecx, result_register()); |
| 3111 | 3111 |
| 3112 // Load function and argument count into edi and eax. | 3112 // Load function and argument count into edi and eax. |
| 3113 __ Move(eax, Immediate(arg_count)); | 3113 __ Move(eax, Immediate(arg_count)); |
| 3114 __ mov(edi, Operand(esp, arg_count * kPointerSize)); | 3114 __ mov(edi, Operand(esp, arg_count * kPointerSize)); |
| 3115 | 3115 |
| 3116 // Record call targets in unoptimized code. | 3116 // Record call targets in unoptimized code. |
| 3117 __ LoadHeapObject(ebx, FeedbackVector()); | 3117 __ EmitLoadTypeFeedbackVector(ebx); |
| 3118 __ mov(edx, Immediate(SmiFromSlot(expr->CallFeedbackSlot()))); | 3118 __ mov(edx, Immediate(SmiFromSlot(expr->CallFeedbackSlot()))); |
| 3119 | 3119 |
| 3120 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET); | 3120 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET); |
| 3121 __ call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); | 3121 __ call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); |
| 3122 | 3122 |
| 3123 RecordJSReturnSite(expr); | 3123 RecordJSReturnSite(expr); |
| 3124 | 3124 |
| 3125 // Restore context register. | 3125 // Restore context register. |
| 3126 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | 3126 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
| 3127 context()->Plug(eax); | 3127 context()->Plug(eax); |
| (...skipping 1998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5126 Assembler::target_address_at(call_target_address, | 5126 Assembler::target_address_at(call_target_address, |
| 5127 unoptimized_code)); | 5127 unoptimized_code)); |
| 5128 return OSR_AFTER_STACK_CHECK; | 5128 return OSR_AFTER_STACK_CHECK; |
| 5129 } | 5129 } |
| 5130 | 5130 |
| 5131 | 5131 |
| 5132 } // namespace internal | 5132 } // namespace internal |
| 5133 } // namespace v8 | 5133 } // namespace v8 |
| 5134 | 5134 |
| 5135 #endif // V8_TARGET_ARCH_IA32 | 5135 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |