| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 8 | 8 |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 2597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2608 __ movp(temp, FieldOperand(input, HeapObject::kMapOffset)); | 2608 __ movp(temp, FieldOperand(input, HeapObject::kMapOffset)); |
| 2609 __ movzxbl(temp2, FieldOperand(temp, Map::kInstanceTypeOffset)); | 2609 __ movzxbl(temp2, FieldOperand(temp, Map::kInstanceTypeOffset)); |
| 2610 __ subp(temp2, Immediate(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)); | 2610 __ subp(temp2, Immediate(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)); |
| 2611 __ cmpp(temp2, Immediate(LAST_NONCALLABLE_SPEC_OBJECT_TYPE - | 2611 __ cmpp(temp2, Immediate(LAST_NONCALLABLE_SPEC_OBJECT_TYPE - |
| 2612 FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)); | 2612 FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)); |
| 2613 __ j(above, is_false); | 2613 __ j(above, is_false); |
| 2614 } | 2614 } |
| 2615 | 2615 |
| 2616 // Now we are in the FIRST-LAST_NONCALLABLE_SPEC_OBJECT_TYPE range. | 2616 // Now we are in the FIRST-LAST_NONCALLABLE_SPEC_OBJECT_TYPE range. |
| 2617 // Check if the constructor in the map is a function. | 2617 // Check if the constructor in the map is a function. |
| 2618 __ movp(temp, FieldOperand(temp, Map::kConstructorOffset)); | 2618 __ GetMapConstructor(temp, temp, kScratchRegister); |
| 2619 | 2619 |
| 2620 // Objects with a non-function constructor have class 'Object'. | 2620 // Objects with a non-function constructor have class 'Object'. |
| 2621 __ CmpObjectType(temp, JS_FUNCTION_TYPE, kScratchRegister); | 2621 __ CmpInstanceType(kScratchRegister, JS_FUNCTION_TYPE); |
| 2622 if (String::Equals(class_name, isolate()->factory()->Object_string())) { | 2622 if (String::Equals(class_name, isolate()->factory()->Object_string())) { |
| 2623 __ j(not_equal, is_true); | 2623 __ j(not_equal, is_true); |
| 2624 } else { | 2624 } else { |
| 2625 __ j(not_equal, is_false); | 2625 __ j(not_equal, is_false); |
| 2626 } | 2626 } |
| 2627 | 2627 |
| 2628 // temp now contains the constructor function. Grab the | 2628 // temp now contains the constructor function. Grab the |
| 2629 // instance class name from there. | 2629 // instance class name from there. |
| 2630 __ movp(temp, FieldOperand(temp, JSFunction::kSharedFunctionInfoOffset)); | 2630 __ movp(temp, FieldOperand(temp, JSFunction::kSharedFunctionInfoOffset)); |
| 2631 __ movp(temp, FieldOperand(temp, | 2631 __ movp(temp, FieldOperand(temp, |
| (...skipping 3304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5936 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5936 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5937 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5937 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5938 } | 5938 } |
| 5939 | 5939 |
| 5940 | 5940 |
| 5941 #undef __ | 5941 #undef __ |
| 5942 | 5942 |
| 5943 } } // namespace v8::internal | 5943 } } // namespace v8::internal |
| 5944 | 5944 |
| 5945 #endif // V8_TARGET_ARCH_X64 | 5945 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |