| 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/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 3353 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3364                          &if_true, &if_false, &fall_through); | 3364                          &if_true, &if_false, &fall_through); | 
| 3365 | 3365 | 
| 3366   PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 3366   PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 
| 3367   __ NonNegativeSmiTst(r0); | 3367   __ NonNegativeSmiTst(r0); | 
| 3368   Split(eq, if_true, if_false, fall_through); | 3368   Split(eq, if_true, if_false, fall_through); | 
| 3369 | 3369 | 
| 3370   context()->Plug(if_true, if_false); | 3370   context()->Plug(if_true, if_false); | 
| 3371 } | 3371 } | 
| 3372 | 3372 | 
| 3373 | 3373 | 
| 3374 void FullCodeGenerator::EmitIsObject(CallRuntime* expr) { |  | 
| 3375   ZoneList<Expression*>* args = expr->arguments(); |  | 
| 3376   DCHECK(args->length() == 1); |  | 
| 3377 |  | 
| 3378   VisitForAccumulatorValue(args->at(0)); |  | 
| 3379 |  | 
| 3380   Label materialize_true, materialize_false; |  | 
| 3381   Label* if_true = NULL; |  | 
| 3382   Label* if_false = NULL; |  | 
| 3383   Label* fall_through = NULL; |  | 
| 3384   context()->PrepareTest(&materialize_true, &materialize_false, |  | 
| 3385                          &if_true, &if_false, &fall_through); |  | 
| 3386 |  | 
| 3387   __ JumpIfSmi(r0, if_false); |  | 
| 3388   __ LoadRoot(ip, Heap::kNullValueRootIndex); |  | 
| 3389   __ cmp(r0, ip); |  | 
| 3390   __ b(eq, if_true); |  | 
| 3391   __ ldr(r2, FieldMemOperand(r0, HeapObject::kMapOffset)); |  | 
| 3392   // Undetectable objects behave like undefined when tested with typeof. |  | 
| 3393   __ ldrb(r1, FieldMemOperand(r2, Map::kBitFieldOffset)); |  | 
| 3394   __ tst(r1, Operand(1 << Map::kIsUndetectable)); |  | 
| 3395   __ b(ne, if_false); |  | 
| 3396   __ ldrb(r1, FieldMemOperand(r2, Map::kInstanceTypeOffset)); |  | 
| 3397   __ cmp(r1, Operand(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)); |  | 
| 3398   __ b(lt, if_false); |  | 
| 3399   __ cmp(r1, Operand(LAST_NONCALLABLE_SPEC_OBJECT_TYPE)); |  | 
| 3400   PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |  | 
| 3401   Split(le, if_true, if_false, fall_through); |  | 
| 3402 |  | 
| 3403   context()->Plug(if_true, if_false); |  | 
| 3404 } |  | 
| 3405 |  | 
| 3406 |  | 
| 3407 void FullCodeGenerator::EmitIsSpecObject(CallRuntime* expr) { | 3374 void FullCodeGenerator::EmitIsSpecObject(CallRuntime* expr) { | 
| 3408   ZoneList<Expression*>* args = expr->arguments(); | 3375   ZoneList<Expression*>* args = expr->arguments(); | 
| 3409   DCHECK(args->length() == 1); | 3376   DCHECK(args->length() == 1); | 
| 3410 | 3377 | 
| 3411   VisitForAccumulatorValue(args->at(0)); | 3378   VisitForAccumulatorValue(args->at(0)); | 
| 3412 | 3379 | 
| 3413   Label materialize_true, materialize_false; | 3380   Label materialize_true, materialize_false; | 
| 3414   Label* if_true = NULL; | 3381   Label* if_true = NULL; | 
| 3415   Label* if_false = NULL; | 3382   Label* if_false = NULL; | 
| 3416   Label* fall_through = NULL; | 3383   Label* fall_through = NULL; | 
| (...skipping 1996 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 5413   DCHECK(interrupt_address == | 5380   DCHECK(interrupt_address == | 
| 5414          isolate->builtins()->OsrAfterStackCheck()->entry()); | 5381          isolate->builtins()->OsrAfterStackCheck()->entry()); | 
| 5415   return OSR_AFTER_STACK_CHECK; | 5382   return OSR_AFTER_STACK_CHECK; | 
| 5416 } | 5383 } | 
| 5417 | 5384 | 
| 5418 | 5385 | 
| 5419 }  // namespace internal | 5386 }  // namespace internal | 
| 5420 }  // namespace v8 | 5387 }  // namespace v8 | 
| 5421 | 5388 | 
| 5422 #endif  // V8_TARGET_ARCH_ARM | 5389 #endif  // V8_TARGET_ARCH_ARM | 
| OLD | NEW | 
|---|