| 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 2787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2798 | 2798 |
| 2799 // If the object is not a JSReceiver, we return null. | 2799 // If the object is not a JSReceiver, we return null. |
| 2800 __ JumpIfSmi(x0, &null); | 2800 __ JumpIfSmi(x0, &null); |
| 2801 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); | 2801 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); |
| 2802 __ CompareObjectType(x0, x10, x11, FIRST_JS_RECEIVER_TYPE); | 2802 __ CompareObjectType(x0, x10, x11, FIRST_JS_RECEIVER_TYPE); |
| 2803 // x10: object's map. | 2803 // x10: object's map. |
| 2804 // x11: object's type. | 2804 // x11: object's type. |
| 2805 __ B(lt, &null); | 2805 __ B(lt, &null); |
| 2806 | 2806 |
| 2807 // Return 'Function' for JSFunction objects. | 2807 // Return 'Function' for JSFunction objects. |
| 2808 __ Cmp(x11, JS_FUNCTION_TYPE); | 2808 __ Cmp(x11, FIRST_FUNCTION_TYPE); |
| 2809 __ B(eq, &function); | 2809 STATIC_ASSERT(LAST_FUNCTION_TYPE == LAST_TYPE); |
| 2810 __ B(hs, &function); |
| 2810 | 2811 |
| 2811 // Check if the constructor in the map is a JS function. | 2812 // Check if the constructor in the map is a JS function. |
| 2812 Register instance_type = x14; | 2813 Register instance_type = x14; |
| 2813 __ GetMapConstructor(x12, x10, x13, instance_type); | 2814 __ GetMapConstructor(x12, x10, x13, instance_type); |
| 2814 __ Cmp(instance_type, JS_FUNCTION_TYPE); | 2815 __ Cmp(instance_type, JS_FUNCTION_TYPE); |
| 2815 __ B(ne, &non_function_constructor); | 2816 __ B(ne, &non_function_constructor); |
| 2816 | 2817 |
| 2817 // x12 now contains the constructor function. Grab the | 2818 // x12 now contains the constructor function. Grab the |
| 2818 // instance class name from there. | 2819 // instance class name from there. |
| 2819 __ Ldr(x13, FieldMemOperand(x12, JSFunction::kSharedFunctionInfoOffset)); | 2820 __ Ldr(x13, FieldMemOperand(x12, JSFunction::kSharedFunctionInfoOffset)); |
| (...skipping 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4153 } | 4154 } |
| 4154 | 4155 |
| 4155 return INTERRUPT; | 4156 return INTERRUPT; |
| 4156 } | 4157 } |
| 4157 | 4158 |
| 4158 | 4159 |
| 4159 } // namespace internal | 4160 } // namespace internal |
| 4160 } // namespace v8 | 4161 } // namespace v8 |
| 4161 | 4162 |
| 4162 #endif // V8_TARGET_ARCH_ARM64 | 4163 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |