| 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 "v8.h" | 5 #include "v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 8 | 8 |
| 9 #include "code-stubs.h" | 9 #include "code-stubs.h" |
| 10 #include "codegen.h" | 10 #include "codegen.h" |
| (...skipping 1758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1769 Handle<FixedArrayBase> constant_elements_values( | 1769 Handle<FixedArrayBase> constant_elements_values( |
| 1770 FixedArrayBase::cast(constant_elements->get(1))); | 1770 FixedArrayBase::cast(constant_elements->get(1))); |
| 1771 | 1771 |
| 1772 AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; | 1772 AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; |
| 1773 if (has_constant_fast_elements && !FLAG_allocation_site_pretenuring) { | 1773 if (has_constant_fast_elements && !FLAG_allocation_site_pretenuring) { |
| 1774 // If the only customer of allocation sites is transitioning, then | 1774 // If the only customer of allocation sites is transitioning, then |
| 1775 // we can turn it off if we don't have anywhere else to transition to. | 1775 // we can turn it off if we don't have anywhere else to transition to. |
| 1776 allocation_site_mode = DONT_TRACK_ALLOCATION_SITE; | 1776 allocation_site_mode = DONT_TRACK_ALLOCATION_SITE; |
| 1777 } | 1777 } |
| 1778 | 1778 |
| 1779 if (expr->depth() > 1) { | 1779 if (expr->depth() > 1 || length > JSObject::kInitialMaxFastElementArray) { |
| 1780 __ movp(rbx, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); | 1780 __ movp(rbx, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); |
| 1781 __ Push(FieldOperand(rbx, JSFunction::kLiteralsOffset)); | 1781 __ Push(FieldOperand(rbx, JSFunction::kLiteralsOffset)); |
| 1782 __ Push(Smi::FromInt(expr->literal_index())); | 1782 __ Push(Smi::FromInt(expr->literal_index())); |
| 1783 __ Push(constant_elements); | 1783 __ Push(constant_elements); |
| 1784 __ Push(Smi::FromInt(flags)); | 1784 __ Push(Smi::FromInt(flags)); |
| 1785 __ CallRuntime(Runtime::kHiddenCreateArrayLiteral, 4); | 1785 __ CallRuntime(Runtime::kHiddenCreateArrayLiteral, 4); |
| 1786 } else { | 1786 } else { |
| 1787 __ movp(rbx, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); | 1787 __ movp(rbx, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); |
| 1788 __ movp(rax, FieldOperand(rbx, JSFunction::kLiteralsOffset)); | 1788 __ movp(rax, FieldOperand(rbx, JSFunction::kLiteralsOffset)); |
| 1789 __ Move(rbx, Smi::FromInt(expr->literal_index())); | 1789 __ Move(rbx, Smi::FromInt(expr->literal_index())); |
| (...skipping 3020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4810 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 4810 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 4811 Assembler::target_address_at(call_target_address, | 4811 Assembler::target_address_at(call_target_address, |
| 4812 unoptimized_code)); | 4812 unoptimized_code)); |
| 4813 return OSR_AFTER_STACK_CHECK; | 4813 return OSR_AFTER_STACK_CHECK; |
| 4814 } | 4814 } |
| 4815 | 4815 |
| 4816 | 4816 |
| 4817 } } // namespace v8::internal | 4817 } } // namespace v8::internal |
| 4818 | 4818 |
| 4819 #endif // V8_TARGET_ARCH_X64 | 4819 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |