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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
8 | 8 |
9 // Note on Mips implementation: | 9 // Note on Mips implementation: |
10 // | 10 // |
(...skipping 3740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3751 FIRST_SPEC_OBJECT_TYPE + 1); | 3751 FIRST_SPEC_OBJECT_TYPE + 1); |
3752 __ Branch(&function, eq, a1, Operand(FIRST_SPEC_OBJECT_TYPE)); | 3752 __ Branch(&function, eq, a1, Operand(FIRST_SPEC_OBJECT_TYPE)); |
3753 | 3753 |
3754 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == | 3754 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == |
3755 LAST_SPEC_OBJECT_TYPE - 1); | 3755 LAST_SPEC_OBJECT_TYPE - 1); |
3756 __ Branch(&function, eq, a1, Operand(LAST_SPEC_OBJECT_TYPE)); | 3756 __ Branch(&function, eq, a1, Operand(LAST_SPEC_OBJECT_TYPE)); |
3757 // Assume that there is no larger type. | 3757 // Assume that there is no larger type. |
3758 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == LAST_TYPE - 1); | 3758 STATIC_ASSERT(LAST_NONCALLABLE_SPEC_OBJECT_TYPE == LAST_TYPE - 1); |
3759 | 3759 |
3760 // Check if the constructor in the map is a JS function. | 3760 // Check if the constructor in the map is a JS function. |
3761 __ ld(v0, FieldMemOperand(v0, Map::kConstructorOffset)); | 3761 Register instance_type = a2; |
3762 __ GetObjectType(v0, a1, a1); | 3762 __ GetMapConstructor(v0, v0, a1, instance_type); |
3763 __ Branch(&non_function_constructor, ne, a1, Operand(JS_FUNCTION_TYPE)); | 3763 __ Branch(&non_function_constructor, ne, instance_type, |
| 3764 Operand(JS_FUNCTION_TYPE)); |
3764 | 3765 |
3765 // v0 now contains the constructor function. Grab the | 3766 // v0 now contains the constructor function. Grab the |
3766 // instance class name from there. | 3767 // instance class name from there. |
3767 __ ld(v0, FieldMemOperand(v0, JSFunction::kSharedFunctionInfoOffset)); | 3768 __ ld(v0, FieldMemOperand(v0, JSFunction::kSharedFunctionInfoOffset)); |
3768 __ ld(v0, FieldMemOperand(v0, SharedFunctionInfo::kInstanceClassNameOffset)); | 3769 __ ld(v0, FieldMemOperand(v0, SharedFunctionInfo::kInstanceClassNameOffset)); |
3769 __ Branch(&done); | 3770 __ Branch(&done); |
3770 | 3771 |
3771 // Functions have class 'Function'. | 3772 // Functions have class 'Function'. |
3772 __ bind(&function); | 3773 __ bind(&function); |
3773 __ LoadRoot(v0, Heap::kFunction_stringRootIndex); | 3774 __ LoadRoot(v0, Heap::kFunction_stringRootIndex); |
(...skipping 1675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5449 Assembler::target_address_at(pc_immediate_load_address)) == | 5450 Assembler::target_address_at(pc_immediate_load_address)) == |
5450 reinterpret_cast<uint64_t>( | 5451 reinterpret_cast<uint64_t>( |
5451 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5452 isolate->builtins()->OsrAfterStackCheck()->entry())); |
5452 return OSR_AFTER_STACK_CHECK; | 5453 return OSR_AFTER_STACK_CHECK; |
5453 } | 5454 } |
5454 | 5455 |
5455 | 5456 |
5456 } } // namespace v8::internal | 5457 } } // namespace v8::internal |
5457 | 5458 |
5458 #endif // V8_TARGET_ARCH_MIPS64 | 5459 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |