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 3032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3043 | 3043 |
3044 // Check that the object is a JS object but take special care of JS | 3044 // Check that the object is a JS object but take special care of JS |
3045 // functions to make sure they have 'Function' as their class. | 3045 // functions to make sure they have 'Function' as their class. |
3046 // Assume that there are only two callable types, and one of them is at | 3046 // Assume that there are only two callable types, and one of them is at |
3047 // either end of the type range for JS object types. Saves extra comparisons. | 3047 // either end of the type range for JS object types. Saves extra comparisons. |
3048 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2); | 3048 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2); |
3049 __ CompareObjectType(x0, x10, x11, FIRST_JS_RECEIVER_TYPE); | 3049 __ CompareObjectType(x0, x10, x11, FIRST_JS_RECEIVER_TYPE); |
3050 // x10: object's map. | 3050 // x10: object's map. |
3051 // x11: object's type. | 3051 // x11: object's type. |
3052 __ B(lt, &null); | 3052 __ B(lt, &null); |
3053 STATIC_ASSERT(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE == | |
3054 FIRST_JS_RECEIVER_TYPE + 1); | |
3055 __ B(eq, &function); | |
3056 | 3053 |
3057 __ Cmp(x11, LAST_JS_RECEIVER_TYPE); | 3054 __ Cmp(x11, LAST_JS_RECEIVER_TYPE); |
3058 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == | 3055 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == |
3059 LAST_JS_RECEIVER_TYPE - 1); | 3056 LAST_JS_RECEIVER_TYPE - 1); |
3060 __ B(eq, &function); | 3057 __ B(eq, &function); |
3061 // Assume that there is no larger type. | 3058 // Assume that there is no larger type. |
3062 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == LAST_TYPE - 1); | 3059 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == LAST_TYPE - 1); |
3063 | 3060 |
3064 // Check if the constructor in the map is a JS function. | 3061 // Check if the constructor in the map is a JS function. |
3065 Register instance_type = x14; | 3062 Register instance_type = x14; |
(...skipping 1868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4934 } | 4931 } |
4935 | 4932 |
4936 return INTERRUPT; | 4933 return INTERRUPT; |
4937 } | 4934 } |
4938 | 4935 |
4939 | 4936 |
4940 } // namespace internal | 4937 } // namespace internal |
4941 } // namespace v8 | 4938 } // namespace v8 |
4942 | 4939 |
4943 #endif // V8_TARGET_ARCH_ARM64 | 4940 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |