| 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 #include "src/arm/lithium-codegen-arm.h" | 7 #include "src/arm/lithium-codegen-arm.h" |
| 8 #include "src/arm/lithium-gap-resolver-arm.h" | 8 #include "src/arm/lithium-gap-resolver-arm.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/hydrogen-osr.h" | 10 #include "src/hydrogen-osr.h" |
| (...skipping 5504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5515 __ JumpIfSmi(input, false_label); | 5515 __ JumpIfSmi(input, false_label); |
| 5516 __ CompareObjectType(input, scratch, no_reg, SYMBOL_TYPE); | 5516 __ CompareObjectType(input, scratch, no_reg, SYMBOL_TYPE); |
| 5517 final_branch_condition = eq; | 5517 final_branch_condition = eq; |
| 5518 | 5518 |
| 5519 } else if (String::Equals(type_name, factory->boolean_string())) { | 5519 } else if (String::Equals(type_name, factory->boolean_string())) { |
| 5520 __ CompareRoot(input, Heap::kTrueValueRootIndex); | 5520 __ CompareRoot(input, Heap::kTrueValueRootIndex); |
| 5521 __ b(eq, true_label); | 5521 __ b(eq, true_label); |
| 5522 __ CompareRoot(input, Heap::kFalseValueRootIndex); | 5522 __ CompareRoot(input, Heap::kFalseValueRootIndex); |
| 5523 final_branch_condition = eq; | 5523 final_branch_condition = eq; |
| 5524 | 5524 |
| 5525 } else if (FLAG_harmony_typeof && | |
| 5526 String::Equals(type_name, factory->null_string())) { | |
| 5527 __ CompareRoot(input, Heap::kNullValueRootIndex); | |
| 5528 final_branch_condition = eq; | |
| 5529 | |
| 5530 } else if (String::Equals(type_name, factory->undefined_string())) { | 5525 } else if (String::Equals(type_name, factory->undefined_string())) { |
| 5531 __ CompareRoot(input, Heap::kUndefinedValueRootIndex); | 5526 __ CompareRoot(input, Heap::kUndefinedValueRootIndex); |
| 5532 __ b(eq, true_label); | 5527 __ b(eq, true_label); |
| 5533 __ JumpIfSmi(input, false_label); | 5528 __ JumpIfSmi(input, false_label); |
| 5534 // Check for undetectable objects => true. | 5529 // Check for undetectable objects => true. |
| 5535 __ ldr(scratch, FieldMemOperand(input, HeapObject::kMapOffset)); | 5530 __ ldr(scratch, FieldMemOperand(input, HeapObject::kMapOffset)); |
| 5536 __ ldrb(scratch, FieldMemOperand(scratch, Map::kBitFieldOffset)); | 5531 __ ldrb(scratch, FieldMemOperand(scratch, Map::kBitFieldOffset)); |
| 5537 __ tst(scratch, Operand(1 << Map::kIsUndetectable)); | 5532 __ tst(scratch, Operand(1 << Map::kIsUndetectable)); |
| 5538 final_branch_condition = ne; | 5533 final_branch_condition = ne; |
| 5539 | 5534 |
| 5540 } else if (String::Equals(type_name, factory->function_string())) { | 5535 } else if (String::Equals(type_name, factory->function_string())) { |
| 5541 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2); | 5536 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2); |
| 5542 Register type_reg = scratch; | 5537 Register type_reg = scratch; |
| 5543 __ JumpIfSmi(input, false_label); | 5538 __ JumpIfSmi(input, false_label); |
| 5544 __ CompareObjectType(input, scratch, type_reg, JS_FUNCTION_TYPE); | 5539 __ CompareObjectType(input, scratch, type_reg, JS_FUNCTION_TYPE); |
| 5545 __ b(eq, true_label); | 5540 __ b(eq, true_label); |
| 5546 __ cmp(type_reg, Operand(JS_FUNCTION_PROXY_TYPE)); | 5541 __ cmp(type_reg, Operand(JS_FUNCTION_PROXY_TYPE)); |
| 5547 final_branch_condition = eq; | 5542 final_branch_condition = eq; |
| 5548 | 5543 |
| 5549 } else if (String::Equals(type_name, factory->object_string())) { | 5544 } else if (String::Equals(type_name, factory->object_string())) { |
| 5550 Register map = scratch; | 5545 Register map = scratch; |
| 5551 __ JumpIfSmi(input, false_label); | 5546 __ JumpIfSmi(input, false_label); |
| 5552 if (!FLAG_harmony_typeof) { | 5547 __ CompareRoot(input, Heap::kNullValueRootIndex); |
| 5553 __ CompareRoot(input, Heap::kNullValueRootIndex); | 5548 __ b(eq, true_label); |
| 5554 __ b(eq, true_label); | |
| 5555 } | |
| 5556 __ CheckObjectTypeRange(input, | 5549 __ CheckObjectTypeRange(input, |
| 5557 map, | 5550 map, |
| 5558 FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, | 5551 FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, |
| 5559 LAST_NONCALLABLE_SPEC_OBJECT_TYPE, | 5552 LAST_NONCALLABLE_SPEC_OBJECT_TYPE, |
| 5560 false_label); | 5553 false_label); |
| 5561 // Check for undetectable objects => false. | 5554 // Check for undetectable objects => false. |
| 5562 __ ldrb(scratch, FieldMemOperand(map, Map::kBitFieldOffset)); | 5555 __ ldrb(scratch, FieldMemOperand(map, Map::kBitFieldOffset)); |
| 5563 __ tst(scratch, Operand(1 << Map::kIsUndetectable)); | 5556 __ tst(scratch, Operand(1 << Map::kIsUndetectable)); |
| 5564 final_branch_condition = eq; | 5557 final_branch_condition = eq; |
| 5565 | 5558 |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5879 __ Push(scope_info); | 5872 __ Push(scope_info); |
| 5880 __ push(ToRegister(instr->function())); | 5873 __ push(ToRegister(instr->function())); |
| 5881 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5874 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5882 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5875 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5883 } | 5876 } |
| 5884 | 5877 |
| 5885 | 5878 |
| 5886 #undef __ | 5879 #undef __ |
| 5887 | 5880 |
| 5888 } } // namespace v8::internal | 5881 } } // namespace v8::internal |
| OLD | NEW |