OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_ARM | 5 #if V8_TARGET_ARCH_ARM |
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 2982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2993 | 2993 |
2994 VisitForAccumulatorValue(args->at(0)); | 2994 VisitForAccumulatorValue(args->at(0)); |
2995 | 2995 |
2996 // If the object is not a JSReceiver, we return null. | 2996 // If the object is not a JSReceiver, we return null. |
2997 __ JumpIfSmi(r0, &null); | 2997 __ JumpIfSmi(r0, &null); |
2998 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); | 2998 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); |
2999 __ CompareObjectType(r0, r0, r1, FIRST_JS_RECEIVER_TYPE); | 2999 __ CompareObjectType(r0, r0, r1, FIRST_JS_RECEIVER_TYPE); |
3000 // Map is now in r0. | 3000 // Map is now in r0. |
3001 __ b(lt, &null); | 3001 __ b(lt, &null); |
3002 | 3002 |
3003 // Return 'Function' for JSFunction objects. | 3003 // Return 'Function' for JSFunction and JSBoundFunction objects. |
3004 __ cmp(r1, Operand(JS_FUNCTION_TYPE)); | 3004 __ cmp(r1, Operand(FIRST_FUNCTION_TYPE)); |
3005 __ b(eq, &function); | 3005 STATIC_ASSERT(LAST_FUNCTION_TYPE == LAST_TYPE); |
| 3006 __ b(hs, &function); |
3006 | 3007 |
3007 // Check if the constructor in the map is a JS function. | 3008 // Check if the constructor in the map is a JS function. |
3008 Register instance_type = r2; | 3009 Register instance_type = r2; |
3009 __ GetMapConstructor(r0, r0, r1, instance_type); | 3010 __ GetMapConstructor(r0, r0, r1, instance_type); |
3010 __ cmp(instance_type, Operand(JS_FUNCTION_TYPE)); | 3011 __ cmp(instance_type, Operand(JS_FUNCTION_TYPE)); |
3011 __ b(ne, &non_function_constructor); | 3012 __ b(ne, &non_function_constructor); |
3012 | 3013 |
3013 // r0 now contains the constructor function. Grab the | 3014 // r0 now contains the constructor function. Grab the |
3014 // instance class name from there. | 3015 // instance class name from there. |
3015 __ ldr(r0, FieldMemOperand(r0, JSFunction::kSharedFunctionInfoOffset)); | 3016 __ ldr(r0, FieldMemOperand(r0, JSFunction::kSharedFunctionInfoOffset)); |
(...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4156 DCHECK(interrupt_address == | 4157 DCHECK(interrupt_address == |
4157 isolate->builtins()->OnStackReplacement()->entry()); | 4158 isolate->builtins()->OnStackReplacement()->entry()); |
4158 return ON_STACK_REPLACEMENT; | 4159 return ON_STACK_REPLACEMENT; |
4159 } | 4160 } |
4160 | 4161 |
4161 | 4162 |
4162 } // namespace internal | 4163 } // namespace internal |
4163 } // namespace v8 | 4164 } // namespace v8 |
4164 | 4165 |
4165 #endif // V8_TARGET_ARCH_ARM | 4166 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |