| 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_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 8 | 8 |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 1833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1844 __ Push(Smi::FromInt(flags)); | 1844 __ Push(Smi::FromInt(flags)); |
| 1845 __ CallRuntime(Runtime::kCreateArrayLiteral, 4); | 1845 __ CallRuntime(Runtime::kCreateArrayLiteral, 4); |
| 1846 } else { | 1846 } else { |
| 1847 __ movp(rbx, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); | 1847 __ movp(rbx, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); |
| 1848 __ movp(rax, FieldOperand(rbx, JSFunction::kLiteralsOffset)); | 1848 __ movp(rax, FieldOperand(rbx, JSFunction::kLiteralsOffset)); |
| 1849 __ Move(rbx, Smi::FromInt(expr->literal_index())); | 1849 __ Move(rbx, Smi::FromInt(expr->literal_index())); |
| 1850 __ Move(rcx, constant_elements); | 1850 __ Move(rcx, constant_elements); |
| 1851 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); | 1851 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); |
| 1852 __ CallStub(&stub); | 1852 __ CallStub(&stub); |
| 1853 } | 1853 } |
| 1854 PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); |
| 1854 | 1855 |
| 1855 bool result_saved = false; // Is the result saved to the stack? | 1856 bool result_saved = false; // Is the result saved to the stack? |
| 1856 | 1857 |
| 1857 // Emit code to evaluate all the non-constant subexpressions and to store | 1858 // Emit code to evaluate all the non-constant subexpressions and to store |
| 1858 // them into the newly cloned array. | 1859 // them into the newly cloned array. |
| 1859 for (int i = 0; i < length; i++) { | 1860 for (int i = 0; i < length; i++) { |
| 1860 Expression* subexpr = subexprs->at(i); | 1861 Expression* subexpr = subexprs->at(i); |
| 1861 // If the subexpression is a literal or a simple materialized literal it | 1862 // If the subexpression is a literal or a simple materialized literal it |
| 1862 // is already set in the cloned array. | 1863 // is already set in the cloned array. |
| 1863 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue; | 1864 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue; |
| (...skipping 3438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5302 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5303 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 5303 Assembler::target_address_at(call_target_address, | 5304 Assembler::target_address_at(call_target_address, |
| 5304 unoptimized_code)); | 5305 unoptimized_code)); |
| 5305 return OSR_AFTER_STACK_CHECK; | 5306 return OSR_AFTER_STACK_CHECK; |
| 5306 } | 5307 } |
| 5307 | 5308 |
| 5308 | 5309 |
| 5309 } } // namespace v8::internal | 5310 } } // namespace v8::internal |
| 5310 | 5311 |
| 5311 #endif // V8_TARGET_ARCH_X64 | 5312 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |