| 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_X87 | 7 #if V8_TARGET_ARCH_X87 |
| 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 1788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1799 __ push(Immediate(Smi::FromInt(flags))); | 1799 __ push(Immediate(Smi::FromInt(flags))); |
| 1800 __ CallRuntime(Runtime::kCreateArrayLiteral, 4); | 1800 __ CallRuntime(Runtime::kCreateArrayLiteral, 4); |
| 1801 } else { | 1801 } else { |
| 1802 __ mov(ebx, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); | 1802 __ mov(ebx, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); |
| 1803 __ mov(eax, FieldOperand(ebx, JSFunction::kLiteralsOffset)); | 1803 __ mov(eax, FieldOperand(ebx, JSFunction::kLiteralsOffset)); |
| 1804 __ mov(ebx, Immediate(Smi::FromInt(expr->literal_index()))); | 1804 __ mov(ebx, Immediate(Smi::FromInt(expr->literal_index()))); |
| 1805 __ mov(ecx, Immediate(constant_elements)); | 1805 __ mov(ecx, Immediate(constant_elements)); |
| 1806 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); | 1806 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); |
| 1807 __ CallStub(&stub); | 1807 __ CallStub(&stub); |
| 1808 } | 1808 } |
| 1809 PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); |
| 1809 | 1810 |
| 1810 bool result_saved = false; // Is the result saved to the stack? | 1811 bool result_saved = false; // Is the result saved to the stack? |
| 1811 | 1812 |
| 1812 // Emit code to evaluate all the non-constant subexpressions and to store | 1813 // Emit code to evaluate all the non-constant subexpressions and to store |
| 1813 // them into the newly cloned array. | 1814 // them into the newly cloned array. |
| 1814 for (int i = 0; i < length; i++) { | 1815 for (int i = 0; i < length; i++) { |
| 1815 Expression* subexpr = subexprs->at(i); | 1816 Expression* subexpr = subexprs->at(i); |
| 1816 // If the subexpression is a literal or a simple materialized literal it | 1817 // If the subexpression is a literal or a simple materialized literal it |
| 1817 // is already set in the cloned array. | 1818 // is already set in the cloned array. |
| 1818 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue; | 1819 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue; |
| (...skipping 3401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5220 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5221 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 5221 Assembler::target_address_at(call_target_address, | 5222 Assembler::target_address_at(call_target_address, |
| 5222 unoptimized_code)); | 5223 unoptimized_code)); |
| 5223 return OSR_AFTER_STACK_CHECK; | 5224 return OSR_AFTER_STACK_CHECK; |
| 5224 } | 5225 } |
| 5225 | 5226 |
| 5226 | 5227 |
| 5227 } } // namespace v8::internal | 5228 } } // namespace v8::internal |
| 5228 | 5229 |
| 5229 #endif // V8_TARGET_ARCH_X87 | 5230 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |