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_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 3466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3477 __ B(eq, &function); | 3477 __ B(eq, &function); |
3478 | 3478 |
3479 __ Cmp(x11, LAST_SPEC_OBJECT_TYPE); | 3479 __ Cmp(x11, LAST_SPEC_OBJECT_TYPE); |
3480 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == | 3480 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == |
3481 LAST_SPEC_OBJECT_TYPE - 1); | 3481 LAST_SPEC_OBJECT_TYPE - 1); |
3482 __ B(eq, &function); | 3482 __ B(eq, &function); |
3483 // Assume that there is no larger type. | 3483 // Assume that there is no larger type. |
3484 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == LAST_TYPE - 1); | 3484 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == LAST_TYPE - 1); |
3485 | 3485 |
3486 // Check if the constructor in the map is a JS function. | 3486 // Check if the constructor in the map is a JS function. |
3487 __ Ldr(x12, FieldMemOperand(x10, Map::kConstructorOffset)); | 3487 Register instance_type = x14; |
3488 __ JumpIfNotObjectType(x12, x13, x14, JS_FUNCTION_TYPE, | 3488 __ GetMapConstructor(x12, x10, x13, instance_type); |
3489 &non_function_constructor); | 3489 __ Cmp(instance_type, JS_FUNCTION_TYPE); |
| 3490 __ B(ne, &non_function_constructor); |
3490 | 3491 |
3491 // x12 now contains the constructor function. Grab the | 3492 // x12 now contains the constructor function. Grab the |
3492 // instance class name from there. | 3493 // instance class name from there. |
3493 __ Ldr(x13, FieldMemOperand(x12, JSFunction::kSharedFunctionInfoOffset)); | 3494 __ Ldr(x13, FieldMemOperand(x12, JSFunction::kSharedFunctionInfoOffset)); |
3494 __ Ldr(x0, | 3495 __ Ldr(x0, |
3495 FieldMemOperand(x13, SharedFunctionInfo::kInstanceClassNameOffset)); | 3496 FieldMemOperand(x13, SharedFunctionInfo::kInstanceClassNameOffset)); |
3496 __ B(&done); | 3497 __ B(&done); |
3497 | 3498 |
3498 // Functions have class 'Function'. | 3499 // Functions have class 'Function'. |
3499 __ Bind(&function); | 3500 __ Bind(&function); |
(...skipping 1980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5480 return previous_; | 5481 return previous_; |
5481 } | 5482 } |
5482 | 5483 |
5483 | 5484 |
5484 #undef __ | 5485 #undef __ |
5485 | 5486 |
5486 | 5487 |
5487 } } // namespace v8::internal | 5488 } } // namespace v8::internal |
5488 | 5489 |
5489 #endif // V8_TARGET_ARCH_ARM64 | 5490 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |