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 #if V8_TARGET_ARCH_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 2723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2734 | 2734 |
2735 // If the object is not a JSReceiver, we return null. | 2735 // If the object is not a JSReceiver, we return null. |
2736 __ JumpIfSmi(x0, &null); | 2736 __ JumpIfSmi(x0, &null); |
2737 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); | 2737 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); |
2738 __ CompareObjectType(x0, x10, x11, FIRST_JS_RECEIVER_TYPE); | 2738 __ CompareObjectType(x0, x10, x11, FIRST_JS_RECEIVER_TYPE); |
2739 // x10: object's map. | 2739 // x10: object's map. |
2740 // x11: object's type. | 2740 // x11: object's type. |
2741 __ B(lt, &null); | 2741 __ B(lt, &null); |
2742 | 2742 |
2743 // Return 'Function' for JSFunction objects. | 2743 // Return 'Function' for JSFunction objects. |
2744 __ Cmp(x11, JS_FUNCTION_TYPE); | 2744 __ Cmp(x11, FIRST_FUNCTION_TYPE); |
2745 __ B(eq, &function); | 2745 STATIC_ASSERT(LAST_FUNCTION_TYPE == LAST_TYPE); |
| 2746 __ B(hs, &function); |
2746 | 2747 |
2747 // Check if the constructor in the map is a JS function. | 2748 // Check if the constructor in the map is a JS function. |
2748 Register instance_type = x14; | 2749 Register instance_type = x14; |
2749 __ GetMapConstructor(x12, x10, x13, instance_type); | 2750 __ GetMapConstructor(x12, x10, x13, instance_type); |
2750 __ Cmp(instance_type, JS_FUNCTION_TYPE); | 2751 __ Cmp(instance_type, JS_FUNCTION_TYPE); |
2751 __ B(ne, &non_function_constructor); | 2752 __ B(ne, &non_function_constructor); |
2752 | 2753 |
2753 // x12 now contains the constructor function. Grab the | 2754 // x12 now contains the constructor function. Grab the |
2754 // instance class name from there. | 2755 // instance class name from there. |
2755 __ Ldr(x13, FieldMemOperand(x12, JSFunction::kSharedFunctionInfoOffset)); | 2756 __ Ldr(x13, FieldMemOperand(x12, JSFunction::kSharedFunctionInfoOffset)); |
(...skipping 1235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3991 } | 3992 } |
3992 | 3993 |
3993 return INTERRUPT; | 3994 return INTERRUPT; |
3994 } | 3995 } |
3995 | 3996 |
3996 | 3997 |
3997 } // namespace internal | 3998 } // namespace internal |
3998 } // namespace v8 | 3999 } // namespace v8 |
3999 | 4000 |
4000 #endif // V8_TARGET_ARCH_ARM64 | 4001 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |