| 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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
| 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 2820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2831 Label done, null, function, non_function_constructor; | 2831 Label done, null, function, non_function_constructor; |
| 2832 | 2832 |
| 2833 VisitForAccumulatorValue(args->at(0)); | 2833 VisitForAccumulatorValue(args->at(0)); |
| 2834 | 2834 |
| 2835 // If the object is not a JSReceiver, we return null. | 2835 // If the object is not a JSReceiver, we return null. |
| 2836 __ JumpIfSmi(v0, &null); | 2836 __ JumpIfSmi(v0, &null); |
| 2837 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); | 2837 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); |
| 2838 __ GetObjectType(v0, v0, a1); // Map is now in v0. | 2838 __ GetObjectType(v0, v0, a1); // Map is now in v0. |
| 2839 __ Branch(&null, lt, a1, Operand(FIRST_JS_RECEIVER_TYPE)); | 2839 __ Branch(&null, lt, a1, Operand(FIRST_JS_RECEIVER_TYPE)); |
| 2840 | 2840 |
| 2841 // Return 'Function' for JSFunction objects. | 2841 // Return 'Function' for JSFunction and JSBoundFunction objects. |
| 2842 __ Branch(&function, eq, a1, Operand(JS_FUNCTION_TYPE)); | 2842 STATIC_ASSERT(LAST_FUNCTION_TYPE == LAST_TYPE); |
| 2843 __ Branch(&function, hs, a1, Operand(FIRST_FUNCTION_TYPE)); |
| 2843 | 2844 |
| 2844 // Check if the constructor in the map is a JS function. | 2845 // Check if the constructor in the map is a JS function. |
| 2845 Register instance_type = a2; | 2846 Register instance_type = a2; |
| 2846 __ GetMapConstructor(v0, v0, a1, instance_type); | 2847 __ GetMapConstructor(v0, v0, a1, instance_type); |
| 2847 __ Branch(&non_function_constructor, ne, instance_type, | 2848 __ Branch(&non_function_constructor, ne, instance_type, |
| 2848 Operand(JS_FUNCTION_TYPE)); | 2849 Operand(JS_FUNCTION_TYPE)); |
| 2849 | 2850 |
| 2850 // v0 now contains the constructor function. Grab the | 2851 // v0 now contains the constructor function. Grab the |
| 2851 // instance class name from there. | 2852 // instance class name from there. |
| 2852 __ ld(v0, FieldMemOperand(v0, JSFunction::kSharedFunctionInfoOffset)); | 2853 __ ld(v0, FieldMemOperand(v0, JSFunction::kSharedFunctionInfoOffset)); |
| (...skipping 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3952 reinterpret_cast<uint64_t>( | 3953 reinterpret_cast<uint64_t>( |
| 3953 isolate->builtins()->OnStackReplacement()->entry())); | 3954 isolate->builtins()->OnStackReplacement()->entry())); |
| 3954 return ON_STACK_REPLACEMENT; | 3955 return ON_STACK_REPLACEMENT; |
| 3955 } | 3956 } |
| 3956 | 3957 |
| 3957 | 3958 |
| 3958 } // namespace internal | 3959 } // namespace internal |
| 3959 } // namespace v8 | 3960 } // namespace v8 |
| 3960 | 3961 |
| 3961 #endif // V8_TARGET_ARCH_MIPS64 | 3962 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |