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_ARM | 5 #if V8_TARGET_ARCH_ARM |
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 3257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3268 __ ldrb(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset)); | 3268 __ ldrb(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset)); |
3269 __ sub(type_reg, type_reg, Operand(FIRST_JS_PROXY_TYPE)); | 3269 __ sub(type_reg, type_reg, Operand(FIRST_JS_PROXY_TYPE)); |
3270 __ cmp(type_reg, Operand(LAST_JS_PROXY_TYPE - FIRST_JS_PROXY_TYPE)); | 3270 __ cmp(type_reg, Operand(LAST_JS_PROXY_TYPE - FIRST_JS_PROXY_TYPE)); |
3271 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 3271 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
3272 Split(ls, if_true, if_false, fall_through); | 3272 Split(ls, if_true, if_false, fall_through); |
3273 | 3273 |
3274 context()->Plug(if_true, if_false); | 3274 context()->Plug(if_true, if_false); |
3275 } | 3275 } |
3276 | 3276 |
3277 | 3277 |
3278 void FullCodeGenerator::EmitIsConstructCall(CallRuntime* expr) { | |
3279 DCHECK(expr->arguments()->length() == 0); | |
3280 | |
3281 Label materialize_true, materialize_false; | |
3282 Label* if_true = NULL; | |
3283 Label* if_false = NULL; | |
3284 Label* fall_through = NULL; | |
3285 context()->PrepareTest(&materialize_true, &materialize_false, | |
3286 &if_true, &if_false, &fall_through); | |
3287 | |
3288 // Get the frame pointer for the calling frame. | |
3289 __ ldr(r2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | |
3290 | |
3291 // Skip the arguments adaptor frame if it exists. | |
3292 __ ldr(r1, MemOperand(r2, StandardFrameConstants::kContextOffset)); | |
3293 __ cmp(r1, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); | |
3294 __ ldr(r2, MemOperand(r2, StandardFrameConstants::kCallerFPOffset), eq); | |
3295 | |
3296 // Check the marker in the calling frame. | |
3297 __ ldr(r1, MemOperand(r2, StandardFrameConstants::kMarkerOffset)); | |
3298 __ cmp(r1, Operand(Smi::FromInt(StackFrame::CONSTRUCT))); | |
3299 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | |
3300 Split(eq, if_true, if_false, fall_through); | |
3301 | |
3302 context()->Plug(if_true, if_false); | |
3303 } | |
3304 | |
3305 | |
3306 void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) { | 3278 void FullCodeGenerator::EmitObjectEquals(CallRuntime* expr) { |
3307 ZoneList<Expression*>* args = expr->arguments(); | 3279 ZoneList<Expression*>* args = expr->arguments(); |
3308 DCHECK(args->length() == 2); | 3280 DCHECK(args->length() == 2); |
3309 | 3281 |
3310 // Load the two objects into registers and perform the comparison. | 3282 // Load the two objects into registers and perform the comparison. |
3311 VisitForStackValue(args->at(0)); | 3283 VisitForStackValue(args->at(0)); |
3312 VisitForAccumulatorValue(args->at(1)); | 3284 VisitForAccumulatorValue(args->at(1)); |
3313 | 3285 |
3314 Label materialize_true, materialize_false; | 3286 Label materialize_true, materialize_false; |
3315 Label* if_true = NULL; | 3287 Label* if_true = NULL; |
(...skipping 1685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5001 DCHECK(interrupt_address == | 4973 DCHECK(interrupt_address == |
5002 isolate->builtins()->OsrAfterStackCheck()->entry()); | 4974 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5003 return OSR_AFTER_STACK_CHECK; | 4975 return OSR_AFTER_STACK_CHECK; |
5004 } | 4976 } |
5005 | 4977 |
5006 | 4978 |
5007 } // namespace internal | 4979 } // namespace internal |
5008 } // namespace v8 | 4980 } // namespace v8 |
5009 | 4981 |
5010 #endif // V8_TARGET_ARCH_ARM | 4982 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |