| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 7 #if V8_TARGET_ARCH_PPC |
| 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 1775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1786 __ LoadSmiLiteral(r5, Smi::FromInt(expr->literal_index())); | 1786 __ LoadSmiLiteral(r5, Smi::FromInt(expr->literal_index())); |
| 1787 __ mov(r4, Operand(constant_elements)); | 1787 __ mov(r4, Operand(constant_elements)); |
| 1788 if (expr->depth() > 1 || length > JSObject::kInitialMaxFastElementArray) { | 1788 if (expr->depth() > 1 || length > JSObject::kInitialMaxFastElementArray) { |
| 1789 __ LoadSmiLiteral(r3, Smi::FromInt(flags)); | 1789 __ LoadSmiLiteral(r3, Smi::FromInt(flags)); |
| 1790 __ Push(r6, r5, r4, r3); | 1790 __ Push(r6, r5, r4, r3); |
| 1791 __ CallRuntime(Runtime::kCreateArrayLiteral, 4); | 1791 __ CallRuntime(Runtime::kCreateArrayLiteral, 4); |
| 1792 } else { | 1792 } else { |
| 1793 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); | 1793 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); |
| 1794 __ CallStub(&stub); | 1794 __ CallStub(&stub); |
| 1795 } | 1795 } |
| 1796 PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); |
| 1796 | 1797 |
| 1797 bool result_saved = false; // Is the result saved to the stack? | 1798 bool result_saved = false; // Is the result saved to the stack? |
| 1798 | 1799 |
| 1799 // Emit code to evaluate all the non-constant subexpressions and to store | 1800 // Emit code to evaluate all the non-constant subexpressions and to store |
| 1800 // them into the newly cloned array. | 1801 // them into the newly cloned array. |
| 1801 for (int i = 0; i < length; i++) { | 1802 for (int i = 0; i < length; i++) { |
| 1802 Expression* subexpr = subexprs->at(i); | 1803 Expression* subexpr = subexprs->at(i); |
| 1803 // If the subexpression is a literal or a simple materialized literal it | 1804 // If the subexpression is a literal or a simple materialized literal it |
| 1804 // is already set in the cloned array. | 1805 // is already set in the cloned array. |
| 1805 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue; | 1806 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue; |
| (...skipping 3476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5282 return ON_STACK_REPLACEMENT; | 5283 return ON_STACK_REPLACEMENT; |
| 5283 } | 5284 } |
| 5284 | 5285 |
| 5285 DCHECK(interrupt_address == | 5286 DCHECK(interrupt_address == |
| 5286 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5287 isolate->builtins()->OsrAfterStackCheck()->entry()); |
| 5287 return OSR_AFTER_STACK_CHECK; | 5288 return OSR_AFTER_STACK_CHECK; |
| 5288 } | 5289 } |
| 5289 } | 5290 } |
| 5290 } // namespace v8::internal | 5291 } // namespace v8::internal |
| 5291 #endif // V8_TARGET_ARCH_PPC | 5292 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |