| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
| 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 1855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1866 __ Mov(x2, Smi::FromInt(expr->literal_index())); | 1866 __ Mov(x2, Smi::FromInt(expr->literal_index())); |
| 1867 __ Mov(x1, Operand(constant_elements)); | 1867 __ Mov(x1, Operand(constant_elements)); |
| 1868 if (expr->depth() > 1 || length > JSObject::kInitialMaxFastElementArray) { | 1868 if (expr->depth() > 1 || length > JSObject::kInitialMaxFastElementArray) { |
| 1869 __ Mov(x0, Smi::FromInt(flags)); | 1869 __ Mov(x0, Smi::FromInt(flags)); |
| 1870 __ Push(x3, x2, x1, x0); | 1870 __ Push(x3, x2, x1, x0); |
| 1871 __ CallRuntime(Runtime::kCreateArrayLiteral, 4); | 1871 __ CallRuntime(Runtime::kCreateArrayLiteral, 4); |
| 1872 } else { | 1872 } else { |
| 1873 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); | 1873 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); |
| 1874 __ CallStub(&stub); | 1874 __ CallStub(&stub); |
| 1875 } | 1875 } |
| 1876 PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); |
| 1876 | 1877 |
| 1877 bool result_saved = false; // Is the result saved to the stack? | 1878 bool result_saved = false; // Is the result saved to the stack? |
| 1878 | 1879 |
| 1879 // Emit code to evaluate all the non-constant subexpressions and to store | 1880 // Emit code to evaluate all the non-constant subexpressions and to store |
| 1880 // them into the newly cloned array. | 1881 // them into the newly cloned array. |
| 1881 for (int i = 0; i < length; i++) { | 1882 for (int i = 0; i < length; i++) { |
| 1882 Expression* subexpr = subexprs->at(i); | 1883 Expression* subexpr = subexprs->at(i); |
| 1883 // If the subexpression is a literal or a simple materialized literal it | 1884 // If the subexpression is a literal or a simple materialized literal it |
| 1884 // is already set in the cloned array. | 1885 // is already set in the cloned array. |
| 1885 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue; | 1886 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue; |
| (...skipping 3504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5390 return previous_; | 5391 return previous_; |
| 5391 } | 5392 } |
| 5392 | 5393 |
| 5393 | 5394 |
| 5394 #undef __ | 5395 #undef __ |
| 5395 | 5396 |
| 5396 | 5397 |
| 5397 } } // namespace v8::internal | 5398 } } // namespace v8::internal |
| 5398 | 5399 |
| 5399 #endif // V8_TARGET_ARCH_ARM64 | 5400 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |