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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
8 | 8 |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 4439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4450 Split(eq, if_true, if_false, fall_through); | 4450 Split(eq, if_true, if_false, fall_through); |
4451 } else if (String::Equals(check, factory->symbol_string())) { | 4451 } else if (String::Equals(check, factory->symbol_string())) { |
4452 __ JumpIfSmi(r0, if_false); | 4452 __ JumpIfSmi(r0, if_false); |
4453 __ CompareObjectType(r0, r0, r1, SYMBOL_TYPE); | 4453 __ CompareObjectType(r0, r0, r1, SYMBOL_TYPE); |
4454 Split(eq, if_true, if_false, fall_through); | 4454 Split(eq, if_true, if_false, fall_through); |
4455 } else if (String::Equals(check, factory->boolean_string())) { | 4455 } else if (String::Equals(check, factory->boolean_string())) { |
4456 __ CompareRoot(r0, Heap::kTrueValueRootIndex); | 4456 __ CompareRoot(r0, Heap::kTrueValueRootIndex); |
4457 __ b(eq, if_true); | 4457 __ b(eq, if_true); |
4458 __ CompareRoot(r0, Heap::kFalseValueRootIndex); | 4458 __ CompareRoot(r0, Heap::kFalseValueRootIndex); |
4459 Split(eq, if_true, if_false, fall_through); | 4459 Split(eq, if_true, if_false, fall_through); |
4460 } else if (FLAG_harmony_typeof && | |
4461 String::Equals(check, factory->null_string())) { | |
4462 __ CompareRoot(r0, Heap::kNullValueRootIndex); | |
4463 Split(eq, if_true, if_false, fall_through); | |
4464 } else if (String::Equals(check, factory->undefined_string())) { | 4460 } else if (String::Equals(check, factory->undefined_string())) { |
4465 __ CompareRoot(r0, Heap::kUndefinedValueRootIndex); | 4461 __ CompareRoot(r0, Heap::kUndefinedValueRootIndex); |
4466 __ b(eq, if_true); | 4462 __ b(eq, if_true); |
4467 __ JumpIfSmi(r0, if_false); | 4463 __ JumpIfSmi(r0, if_false); |
4468 // Check for undetectable objects => true. | 4464 // Check for undetectable objects => true. |
4469 __ ldr(r0, FieldMemOperand(r0, HeapObject::kMapOffset)); | 4465 __ ldr(r0, FieldMemOperand(r0, HeapObject::kMapOffset)); |
4470 __ ldrb(r1, FieldMemOperand(r0, Map::kBitFieldOffset)); | 4466 __ ldrb(r1, FieldMemOperand(r0, Map::kBitFieldOffset)); |
4471 __ tst(r1, Operand(1 << Map::kIsUndetectable)); | 4467 __ tst(r1, Operand(1 << Map::kIsUndetectable)); |
4472 Split(ne, if_true, if_false, fall_through); | 4468 Split(ne, if_true, if_false, fall_through); |
4473 | 4469 |
4474 } else if (String::Equals(check, factory->function_string())) { | 4470 } else if (String::Equals(check, factory->function_string())) { |
4475 __ JumpIfSmi(r0, if_false); | 4471 __ JumpIfSmi(r0, if_false); |
4476 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2); | 4472 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2); |
4477 __ CompareObjectType(r0, r0, r1, JS_FUNCTION_TYPE); | 4473 __ CompareObjectType(r0, r0, r1, JS_FUNCTION_TYPE); |
4478 __ b(eq, if_true); | 4474 __ b(eq, if_true); |
4479 __ cmp(r1, Operand(JS_FUNCTION_PROXY_TYPE)); | 4475 __ cmp(r1, Operand(JS_FUNCTION_PROXY_TYPE)); |
4480 Split(eq, if_true, if_false, fall_through); | 4476 Split(eq, if_true, if_false, fall_through); |
4481 } else if (String::Equals(check, factory->object_string())) { | 4477 } else if (String::Equals(check, factory->object_string())) { |
4482 __ JumpIfSmi(r0, if_false); | 4478 __ JumpIfSmi(r0, if_false); |
4483 if (!FLAG_harmony_typeof) { | 4479 __ CompareRoot(r0, Heap::kNullValueRootIndex); |
4484 __ CompareRoot(r0, Heap::kNullValueRootIndex); | 4480 __ b(eq, if_true); |
4485 __ b(eq, if_true); | |
4486 } | |
4487 // Check for JS objects => true. | 4481 // Check for JS objects => true. |
4488 __ CompareObjectType(r0, r0, r1, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE); | 4482 __ CompareObjectType(r0, r0, r1, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE); |
4489 __ b(lt, if_false); | 4483 __ b(lt, if_false); |
4490 __ CompareInstanceType(r0, r1, LAST_NONCALLABLE_SPEC_OBJECT_TYPE); | 4484 __ CompareInstanceType(r0, r1, LAST_NONCALLABLE_SPEC_OBJECT_TYPE); |
4491 __ b(gt, if_false); | 4485 __ b(gt, if_false); |
4492 // Check for undetectable objects => false. | 4486 // Check for undetectable objects => false. |
4493 __ ldrb(r1, FieldMemOperand(r0, Map::kBitFieldOffset)); | 4487 __ ldrb(r1, FieldMemOperand(r0, Map::kBitFieldOffset)); |
4494 __ tst(r1, Operand(1 << Map::kIsUndetectable)); | 4488 __ tst(r1, Operand(1 << Map::kIsUndetectable)); |
4495 Split(eq, if_true, if_false, fall_through); | 4489 Split(eq, if_true, if_false, fall_through); |
4496 } else { | 4490 } else { |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4854 | 4848 |
4855 ASSERT(interrupt_address == | 4849 ASSERT(interrupt_address == |
4856 isolate->builtins()->OsrAfterStackCheck()->entry()); | 4850 isolate->builtins()->OsrAfterStackCheck()->entry()); |
4857 return OSR_AFTER_STACK_CHECK; | 4851 return OSR_AFTER_STACK_CHECK; |
4858 } | 4852 } |
4859 | 4853 |
4860 | 4854 |
4861 } } // namespace v8::internal | 4855 } } // namespace v8::internal |
4862 | 4856 |
4863 #endif // V8_TARGET_ARCH_ARM | 4857 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |