| 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/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 3135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3146 __ CmpInstanceType(map, FIRST_JS_PROXY_TYPE); | 3146 __ CmpInstanceType(map, FIRST_JS_PROXY_TYPE); |
| 3147 __ j(less, if_false); | 3147 __ j(less, if_false); |
| 3148 __ CmpInstanceType(map, LAST_JS_PROXY_TYPE); | 3148 __ CmpInstanceType(map, LAST_JS_PROXY_TYPE); |
| 3149 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 3149 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 3150 Split(less_equal, if_true, if_false, fall_through); | 3150 Split(less_equal, if_true, if_false, fall_through); |
| 3151 | 3151 |
| 3152 context()->Plug(if_true, if_false); | 3152 context()->Plug(if_true, if_false); |
| 3153 } | 3153 } |
| 3154 | 3154 |
| 3155 | 3155 |
| 3156 void FullCodeGenerator::EmitIsConstructCall(CallRuntime* expr) { | |
| 3157 DCHECK(expr->arguments()->length() == 0); | |
| 3158 | |
| 3159 Label materialize_true, materialize_false; | |
| 3160 Label* if_true = NULL; | |
| 3161 Label* if_false = NULL; | |
| 3162 Label* fall_through = NULL; | |
| 3163 context()->PrepareTest(&materialize_true, &materialize_false, | |
| 3164 &if_true, &if_false, &fall_through); | |
| 3165 | |
| 3166 // Get the frame pointer for the calling frame. | |
| 3167 __ mov(eax, Operand(ebp, StandardFrameConstants::kCallerFPOffset)); | |
| 3168 | |
| 3169 // Skip the arguments adaptor frame if it exists. | |
| 3170 Label check_frame_marker; | |
| 3171 __ cmp(Operand(eax, StandardFrameConstants::kContextOffset), | |
| 3172 Immediate(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); | |
| 3173 __ j(not_equal, &check_frame_marker); | |
| 3174 __ mov(eax, Operand(eax, StandardFrameConstants::kCallerFPOffset)); | |
| 3175 | |
| 3176 // Check the marker in the calling frame. | |
| 3177 __ bind(&check_frame_marker); | |
| 3178 __ cmp(Operand(eax, StandardFrameConstants::kMarkerOffset), | |
| 3179 Immediate(Smi::FromInt(StackFrame::CONSTRUCT))); | |
| 3180 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | |
| 3181 Split(equal, if_true, if_false, fall_through); | |
| 3182 | |
| 3183 context()->Plug(if_true, if_false); | |
| 3184 } | |
| 3185 | |
| 3186 | |
| 3187 void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) { | 3156 void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) { |
| 3188 ZoneList<Expression*>* args = expr->arguments(); | 3157 ZoneList<Expression*>* args = expr->arguments(); |
| 3189 DCHECK(args->length() == 2); | 3158 DCHECK(args->length() == 2); |
| 3190 | 3159 |
| 3191 // Load the two objects into registers and perform the comparison. | 3160 // Load the two objects into registers and perform the comparison. |
| 3192 VisitForStackValue(args->at(0)); | 3161 VisitForStackValue(args->at(0)); |
| 3193 VisitForAccumulatorValue(args->at(1)); | 3162 VisitForAccumulatorValue(args->at(1)); |
| 3194 | 3163 |
| 3195 Label materialize_true, materialize_false; | 3164 Label materialize_true, materialize_false; |
| 3196 Label* if_true = NULL; | 3165 Label* if_true = NULL; |
| (...skipping 1667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4864 Assembler::target_address_at(call_target_address, | 4833 Assembler::target_address_at(call_target_address, |
| 4865 unoptimized_code)); | 4834 unoptimized_code)); |
| 4866 return OSR_AFTER_STACK_CHECK; | 4835 return OSR_AFTER_STACK_CHECK; |
| 4867 } | 4836 } |
| 4868 | 4837 |
| 4869 | 4838 |
| 4870 } // namespace internal | 4839 } // namespace internal |
| 4871 } // namespace v8 | 4840 } // namespace v8 |
| 4872 | 4841 |
| 4873 #endif // V8_TARGET_ARCH_X87 | 4842 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |