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 1510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1521 } | 1521 } |
1522 } | 1522 } |
1523 } | 1523 } |
1524 | 1524 |
1525 | 1525 |
1526 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { | 1526 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
1527 Comment cmnt(masm_, "[ ObjectLiteral"); | 1527 Comment cmnt(masm_, "[ ObjectLiteral"); |
1528 | 1528 |
1529 Handle<FixedArray> constant_properties = expr->constant_properties(); | 1529 Handle<FixedArray> constant_properties = expr->constant_properties(); |
1530 __ lw(a3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 1530 __ lw(a3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
1531 __ lw(a3, FieldMemOperand(a3, JSFunction::kLiteralsOffset)); | |
1532 __ li(a2, Operand(Smi::FromInt(expr->literal_index()))); | 1531 __ li(a2, Operand(Smi::FromInt(expr->literal_index()))); |
1533 __ li(a1, Operand(constant_properties)); | 1532 __ li(a1, Operand(constant_properties)); |
1534 __ li(a0, Operand(Smi::FromInt(expr->ComputeFlags()))); | 1533 __ li(a0, Operand(Smi::FromInt(expr->ComputeFlags()))); |
1535 if (MustCreateObjectLiteralWithRuntime(expr)) { | 1534 if (MustCreateObjectLiteralWithRuntime(expr)) { |
1536 __ Push(a3, a2, a1, a0); | 1535 __ Push(a3, a2, a1, a0); |
1537 __ CallRuntime(Runtime::kCreateObjectLiteral, 4); | 1536 __ CallRuntime(Runtime::kCreateObjectLiteral, 4); |
1538 } else { | 1537 } else { |
1539 FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); | 1538 FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); |
1540 __ CallStub(&stub); | 1539 __ CallStub(&stub); |
1541 } | 1540 } |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1727 | 1726 |
1728 AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; | 1727 AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; |
1729 if (has_fast_elements && !FLAG_allocation_site_pretenuring) { | 1728 if (has_fast_elements && !FLAG_allocation_site_pretenuring) { |
1730 // If the only customer of allocation sites is transitioning, then | 1729 // If the only customer of allocation sites is transitioning, then |
1731 // we can turn it off if we don't have anywhere else to transition to. | 1730 // we can turn it off if we don't have anywhere else to transition to. |
1732 allocation_site_mode = DONT_TRACK_ALLOCATION_SITE; | 1731 allocation_site_mode = DONT_TRACK_ALLOCATION_SITE; |
1733 } | 1732 } |
1734 | 1733 |
1735 __ mov(a0, result_register()); | 1734 __ mov(a0, result_register()); |
1736 __ lw(a3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 1735 __ lw(a3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
1737 __ lw(a3, FieldMemOperand(a3, JSFunction::kLiteralsOffset)); | |
1738 __ li(a2, Operand(Smi::FromInt(expr->literal_index()))); | 1736 __ li(a2, Operand(Smi::FromInt(expr->literal_index()))); |
1739 __ li(a1, Operand(constant_elements)); | 1737 __ li(a1, Operand(constant_elements)); |
1740 if (MustCreateArrayLiteralWithRuntime(expr)) { | 1738 if (MustCreateArrayLiteralWithRuntime(expr)) { |
1741 __ li(a0, Operand(Smi::FromInt(expr->ComputeFlags()))); | 1739 __ li(a0, Operand(Smi::FromInt(expr->ComputeFlags()))); |
1742 __ Push(a3, a2, a1, a0); | 1740 __ Push(a3, a2, a1, a0); |
1743 __ CallRuntime(Runtime::kCreateArrayLiteral, 4); | 1741 __ CallRuntime(Runtime::kCreateArrayLiteral, 4); |
1744 } else { | 1742 } else { |
1745 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); | 1743 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); |
1746 __ CallStub(&stub); | 1744 __ CallStub(&stub); |
1747 } | 1745 } |
(...skipping 3266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5014 reinterpret_cast<uint32_t>( | 5012 reinterpret_cast<uint32_t>( |
5015 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5013 isolate->builtins()->OsrAfterStackCheck()->entry())); |
5016 return OSR_AFTER_STACK_CHECK; | 5014 return OSR_AFTER_STACK_CHECK; |
5017 } | 5015 } |
5018 | 5016 |
5019 | 5017 |
5020 } // namespace internal | 5018 } // namespace internal |
5021 } // namespace v8 | 5019 } // namespace v8 |
5022 | 5020 |
5023 #endif // V8_TARGET_ARCH_MIPS | 5021 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |