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 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 4731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4742 | 4742 |
4743 // Verify that the new target is a JSFunction. | 4743 // Verify that the new target is a JSFunction. |
4744 Label new_object; | 4744 Label new_object; |
4745 __ GetObjectType(a3, a2, a2); | 4745 __ GetObjectType(a3, a2, a2); |
4746 __ Branch(&new_object, ne, a2, Operand(JS_FUNCTION_TYPE)); | 4746 __ Branch(&new_object, ne, a2, Operand(JS_FUNCTION_TYPE)); |
4747 | 4747 |
4748 // Load the initial map and verify that it's in fact a map. | 4748 // Load the initial map and verify that it's in fact a map. |
4749 __ lw(a2, FieldMemOperand(a3, JSFunction::kPrototypeOrInitialMapOffset)); | 4749 __ lw(a2, FieldMemOperand(a3, JSFunction::kPrototypeOrInitialMapOffset)); |
4750 __ JumpIfSmi(a2, &new_object); | 4750 __ JumpIfSmi(a2, &new_object); |
4751 __ GetObjectType(a2, a0, a0); | 4751 __ GetObjectType(a2, a0, a0); |
4752 __ Branch(&new_object, ne, a2, Operand(MAP_TYPE)); | 4752 __ Branch(&new_object, ne, a0, Operand(MAP_TYPE)); |
4753 | 4753 |
4754 // Fall back to runtime if the target differs from the new target's | 4754 // Fall back to runtime if the target differs from the new target's |
4755 // initial map constructor. | 4755 // initial map constructor. |
4756 __ lw(a0, FieldMemOperand(a2, Map::kConstructorOrBackPointerOffset)); | 4756 __ lw(a0, FieldMemOperand(a2, Map::kConstructorOrBackPointerOffset)); |
4757 __ Branch(&new_object, ne, a0, Operand(a1)); | 4757 __ Branch(&new_object, ne, a0, Operand(a1)); |
4758 | 4758 |
4759 // Allocate the JSObject on the heap. | 4759 // Allocate the JSObject on the heap. |
4760 Label allocate, done_allocate; | 4760 Label allocate, done_allocate; |
4761 __ lbu(t0, FieldMemOperand(a2, Map::kInstanceSizeOffset)); | 4761 __ lbu(t0, FieldMemOperand(a2, Map::kInstanceSizeOffset)); |
4762 __ Allocate(t0, v0, t1, a0, &allocate, SIZE_IN_WORDS); | 4762 __ Allocate(t0, v0, t1, a0, &allocate, SIZE_IN_WORDS); |
(...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5769 return_value_operand, NULL); | 5769 return_value_operand, NULL); |
5770 } | 5770 } |
5771 | 5771 |
5772 | 5772 |
5773 #undef __ | 5773 #undef __ |
5774 | 5774 |
5775 } // namespace internal | 5775 } // namespace internal |
5776 } // namespace v8 | 5776 } // namespace v8 |
5777 | 5777 |
5778 #endif // V8_TARGET_ARCH_MIPS | 5778 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |