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