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_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
8 | 8 |
9 // Note on Mips implementation: | 9 // Note on Mips implementation: |
10 // | 10 // |
(...skipping 1863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1874 __ li(a2, Operand(Smi::FromInt(expr->literal_index()))); | 1874 __ li(a2, Operand(Smi::FromInt(expr->literal_index()))); |
1875 __ li(a1, Operand(constant_elements)); | 1875 __ li(a1, Operand(constant_elements)); |
1876 if (expr->depth() > 1 || length > JSObject::kInitialMaxFastElementArray) { | 1876 if (expr->depth() > 1 || length > JSObject::kInitialMaxFastElementArray) { |
1877 __ li(a0, Operand(Smi::FromInt(flags))); | 1877 __ li(a0, Operand(Smi::FromInt(flags))); |
1878 __ Push(a3, a2, a1, a0); | 1878 __ Push(a3, a2, a1, a0); |
1879 __ CallRuntime(Runtime::kCreateArrayLiteral, 4); | 1879 __ CallRuntime(Runtime::kCreateArrayLiteral, 4); |
1880 } else { | 1880 } else { |
1881 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); | 1881 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); |
1882 __ CallStub(&stub); | 1882 __ CallStub(&stub); |
1883 } | 1883 } |
| 1884 PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); |
1884 | 1885 |
1885 bool result_saved = false; // Is the result saved to the stack? | 1886 bool result_saved = false; // Is the result saved to the stack? |
1886 | 1887 |
1887 // Emit code to evaluate all the non-constant subexpressions and to store | 1888 // Emit code to evaluate all the non-constant subexpressions and to store |
1888 // them into the newly cloned array. | 1889 // them into the newly cloned array. |
1889 for (int i = 0; i < length; i++) { | 1890 for (int i = 0; i < length; i++) { |
1890 Expression* subexpr = subexprs->at(i); | 1891 Expression* subexpr = subexprs->at(i); |
1891 // If the subexpression is a literal or a simple materialized literal it | 1892 // If the subexpression is a literal or a simple materialized literal it |
1892 // is already set in the cloned array. | 1893 // is already set in the cloned array. |
1893 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue; | 1894 if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue; |
(...skipping 3454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5348 Assembler::target_address_at(pc_immediate_load_address)) == | 5349 Assembler::target_address_at(pc_immediate_load_address)) == |
5349 reinterpret_cast<uint32_t>( | 5350 reinterpret_cast<uint32_t>( |
5350 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5351 isolate->builtins()->OsrAfterStackCheck()->entry())); |
5351 return OSR_AFTER_STACK_CHECK; | 5352 return OSR_AFTER_STACK_CHECK; |
5352 } | 5353 } |
5353 | 5354 |
5354 | 5355 |
5355 } } // namespace v8::internal | 5356 } } // namespace v8::internal |
5356 | 5357 |
5357 #endif // V8_TARGET_ARCH_MIPS | 5358 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |