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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
6 | 6 |
7 // Note on Mips implementation: | 7 // Note on Mips implementation: |
8 // | 8 // |
9 // The result_register() for mips is the 'v0' register, which is defined | 9 // The result_register() for mips is the 'v0' register, which is defined |
10 // by the ABI to contain function return values. However, the first | 10 // by the ABI to contain function return values. However, the first |
(...skipping 2979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2990 Label done, null, function, non_function_constructor; | 2990 Label done, null, function, non_function_constructor; |
2991 | 2991 |
2992 VisitForAccumulatorValue(args->at(0)); | 2992 VisitForAccumulatorValue(args->at(0)); |
2993 | 2993 |
2994 // If the object is not a JSReceiver, we return null. | 2994 // If the object is not a JSReceiver, we return null. |
2995 __ JumpIfSmi(v0, &null); | 2995 __ JumpIfSmi(v0, &null); |
2996 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); | 2996 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); |
2997 __ GetObjectType(v0, v0, a1); // Map is now in v0. | 2997 __ GetObjectType(v0, v0, a1); // Map is now in v0. |
2998 __ Branch(&null, lt, a1, Operand(FIRST_JS_RECEIVER_TYPE)); | 2998 __ Branch(&null, lt, a1, Operand(FIRST_JS_RECEIVER_TYPE)); |
2999 | 2999 |
3000 // Return 'Function' for JSFunction objects. | 3000 // Return 'Function' for JSFunction and JSBoundFunction objects. |
3001 __ Branch(&function, eq, a1, Operand(JS_FUNCTION_TYPE)); | 3001 STATIC_ASSERT(LAST_FUNCTION_TYPE == LAST_TYPE); |
| 3002 __ Branch(&function, hs, a1, Operand(FIRST_FUNCTION_TYPE)); |
3002 | 3003 |
3003 // Check if the constructor in the map is a JS function. | 3004 // Check if the constructor in the map is a JS function. |
3004 Register instance_type = a2; | 3005 Register instance_type = a2; |
3005 __ GetMapConstructor(v0, v0, a1, instance_type); | 3006 __ GetMapConstructor(v0, v0, a1, instance_type); |
3006 __ Branch(&non_function_constructor, ne, instance_type, | 3007 __ Branch(&non_function_constructor, ne, instance_type, |
3007 Operand(JS_FUNCTION_TYPE)); | 3008 Operand(JS_FUNCTION_TYPE)); |
3008 | 3009 |
3009 // v0 now contains the constructor function. Grab the | 3010 // v0 now contains the constructor function. Grab the |
3010 // instance class name from there. | 3011 // instance class name from there. |
3011 __ lw(v0, FieldMemOperand(v0, JSFunction::kSharedFunctionInfoOffset)); | 3012 __ lw(v0, FieldMemOperand(v0, JSFunction::kSharedFunctionInfoOffset)); |
(...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4102 reinterpret_cast<uint32_t>( | 4103 reinterpret_cast<uint32_t>( |
4103 isolate->builtins()->OnStackReplacement()->entry())); | 4104 isolate->builtins()->OnStackReplacement()->entry())); |
4104 return ON_STACK_REPLACEMENT; | 4105 return ON_STACK_REPLACEMENT; |
4105 } | 4106 } |
4106 | 4107 |
4107 | 4108 |
4108 } // namespace internal | 4109 } // namespace internal |
4109 } // namespace v8 | 4110 } // namespace v8 |
4110 | 4111 |
4111 #endif // V8_TARGET_ARCH_MIPS | 4112 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |