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_ARM | 5 #if V8_TARGET_ARCH_ARM |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/debug/debug.h" | 10 #include "src/debug/debug.h" |
(...skipping 1512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1523 } | 1523 } |
1524 } | 1524 } |
1525 } | 1525 } |
1526 | 1526 |
1527 | 1527 |
1528 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { | 1528 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
1529 Comment cmnt(masm_, "[ ObjectLiteral"); | 1529 Comment cmnt(masm_, "[ ObjectLiteral"); |
1530 | 1530 |
1531 Handle<FixedArray> constant_properties = expr->constant_properties(); | 1531 Handle<FixedArray> constant_properties = expr->constant_properties(); |
1532 __ ldr(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 1532 __ ldr(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
1533 __ ldr(r3, FieldMemOperand(r3, JSFunction::kLiteralsOffset)); | |
1534 __ mov(r2, Operand(Smi::FromInt(expr->literal_index()))); | 1533 __ mov(r2, Operand(Smi::FromInt(expr->literal_index()))); |
1535 __ mov(r1, Operand(constant_properties)); | 1534 __ mov(r1, Operand(constant_properties)); |
1536 int flags = expr->ComputeFlags(); | 1535 int flags = expr->ComputeFlags(); |
1537 __ mov(r0, Operand(Smi::FromInt(flags))); | 1536 __ mov(r0, Operand(Smi::FromInt(flags))); |
1538 if (MustCreateObjectLiteralWithRuntime(expr)) { | 1537 if (MustCreateObjectLiteralWithRuntime(expr)) { |
1539 __ Push(r3, r2, r1, r0); | 1538 __ Push(r3, r2, r1, r0); |
1540 __ CallRuntime(Runtime::kCreateObjectLiteral, 4); | 1539 __ CallRuntime(Runtime::kCreateObjectLiteral, 4); |
1541 } else { | 1540 } else { |
1542 FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); | 1541 FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); |
1543 __ CallStub(&stub); | 1542 __ CallStub(&stub); |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1731 FixedArrayBase::cast(constant_elements->get(1))); | 1730 FixedArrayBase::cast(constant_elements->get(1))); |
1732 | 1731 |
1733 AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; | 1732 AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; |
1734 if (has_fast_elements && !FLAG_allocation_site_pretenuring) { | 1733 if (has_fast_elements && !FLAG_allocation_site_pretenuring) { |
1735 // If the only customer of allocation sites is transitioning, then | 1734 // If the only customer of allocation sites is transitioning, then |
1736 // we can turn it off if we don't have anywhere else to transition to. | 1735 // we can turn it off if we don't have anywhere else to transition to. |
1737 allocation_site_mode = DONT_TRACK_ALLOCATION_SITE; | 1736 allocation_site_mode = DONT_TRACK_ALLOCATION_SITE; |
1738 } | 1737 } |
1739 | 1738 |
1740 __ ldr(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 1739 __ ldr(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
1741 __ ldr(r3, FieldMemOperand(r3, JSFunction::kLiteralsOffset)); | |
1742 __ mov(r2, Operand(Smi::FromInt(expr->literal_index()))); | 1740 __ mov(r2, Operand(Smi::FromInt(expr->literal_index()))); |
1743 __ mov(r1, Operand(constant_elements)); | 1741 __ mov(r1, Operand(constant_elements)); |
1744 if (MustCreateArrayLiteralWithRuntime(expr)) { | 1742 if (MustCreateArrayLiteralWithRuntime(expr)) { |
1745 __ mov(r0, Operand(Smi::FromInt(expr->ComputeFlags()))); | 1743 __ mov(r0, Operand(Smi::FromInt(expr->ComputeFlags()))); |
1746 __ Push(r3, r2, r1, r0); | 1744 __ Push(r3, r2, r1, r0); |
1747 __ CallRuntime(Runtime::kCreateArrayLiteral, 4); | 1745 __ CallRuntime(Runtime::kCreateArrayLiteral, 4); |
1748 } else { | 1746 } else { |
1749 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); | 1747 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); |
1750 __ CallStub(&stub); | 1748 __ CallStub(&stub); |
1751 } | 1749 } |
(...skipping 3298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5050 DCHECK(interrupt_address == | 5048 DCHECK(interrupt_address == |
5051 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5049 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5052 return OSR_AFTER_STACK_CHECK; | 5050 return OSR_AFTER_STACK_CHECK; |
5053 } | 5051 } |
5054 | 5052 |
5055 | 5053 |
5056 } // namespace internal | 5054 } // namespace internal |
5057 } // namespace v8 | 5055 } // namespace v8 |
5058 | 5056 |
5059 #endif // V8_TARGET_ARCH_ARM | 5057 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |