| 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 #if V8_TARGET_ARCH_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
| 6 | 6 |
| 7 // Note on Mips implementation: | 7 // Note on Mips implementation: |
| 8 // | 8 // |
| 9 // The result_register() for mips is the 'v0' register, which is defined | 9 // The result_register() for mips is the 'v0' register, which is defined |
| 10 // by the ABI to contain function return values. However, the first | 10 // by the ABI to contain function return values. However, the first |
| (...skipping 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1212 | 1212 |
| 1213 Handle<FixedArray> constant_properties = expr->constant_properties(); | 1213 Handle<FixedArray> constant_properties = expr->constant_properties(); |
| 1214 __ ld(a3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 1214 __ ld(a3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
| 1215 __ li(a2, Operand(Smi::FromInt(expr->literal_index()))); | 1215 __ li(a2, Operand(Smi::FromInt(expr->literal_index()))); |
| 1216 __ li(a1, Operand(constant_properties)); | 1216 __ li(a1, Operand(constant_properties)); |
| 1217 __ li(a0, Operand(Smi::FromInt(expr->ComputeFlags()))); | 1217 __ li(a0, Operand(Smi::FromInt(expr->ComputeFlags()))); |
| 1218 if (MustCreateObjectLiteralWithRuntime(expr)) { | 1218 if (MustCreateObjectLiteralWithRuntime(expr)) { |
| 1219 __ Push(a3, a2, a1, a0); | 1219 __ Push(a3, a2, a1, a0); |
| 1220 __ CallRuntime(Runtime::kCreateObjectLiteral); | 1220 __ CallRuntime(Runtime::kCreateObjectLiteral); |
| 1221 } else { | 1221 } else { |
| 1222 FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); | 1222 Callable callable = CodeFactory::FastCloneShallowObject( |
| 1223 __ CallStub(&stub); | 1223 isolate(), expr->properties_count()); |
| 1224 __ Call(callable.code(), RelocInfo::CODE_TARGET); |
| 1224 RestoreContext(); | 1225 RestoreContext(); |
| 1225 } | 1226 } |
| 1226 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); | 1227 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); |
| 1227 | 1228 |
| 1228 // If result_saved is true the result is on top of the stack. If | 1229 // If result_saved is true the result is on top of the stack. If |
| 1229 // result_saved is false the result is in v0. | 1230 // result_saved is false the result is in v0. |
| 1230 bool result_saved = false; | 1231 bool result_saved = false; |
| 1231 | 1232 |
| 1232 AccessorTable accessor_table(zone()); | 1233 AccessorTable accessor_table(zone()); |
| 1233 for (int i = 0; i < expr->properties()->length(); i++) { | 1234 for (int i = 0; i < expr->properties()->length(); i++) { |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1351 | 1352 |
| 1352 __ mov(a0, result_register()); | 1353 __ mov(a0, result_register()); |
| 1353 __ ld(a3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 1354 __ ld(a3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
| 1354 __ li(a2, Operand(Smi::FromInt(expr->literal_index()))); | 1355 __ li(a2, Operand(Smi::FromInt(expr->literal_index()))); |
| 1355 __ li(a1, Operand(constant_elements)); | 1356 __ li(a1, Operand(constant_elements)); |
| 1356 if (MustCreateArrayLiteralWithRuntime(expr)) { | 1357 if (MustCreateArrayLiteralWithRuntime(expr)) { |
| 1357 __ li(a0, Operand(Smi::FromInt(expr->ComputeFlags()))); | 1358 __ li(a0, Operand(Smi::FromInt(expr->ComputeFlags()))); |
| 1358 __ Push(a3, a2, a1, a0); | 1359 __ Push(a3, a2, a1, a0); |
| 1359 __ CallRuntime(Runtime::kCreateArrayLiteral); | 1360 __ CallRuntime(Runtime::kCreateArrayLiteral); |
| 1360 } else { | 1361 } else { |
| 1361 FastCloneShallowArrayStub stub(isolate(), allocation_site_mode); | 1362 Callable callable = |
| 1362 __ CallStub(&stub); | 1363 CodeFactory::FastCloneShallowArray(isolate(), allocation_site_mode); |
| 1364 __ Call(callable.code(), RelocInfo::CODE_TARGET); |
| 1363 RestoreContext(); | 1365 RestoreContext(); |
| 1364 } | 1366 } |
| 1365 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); | 1367 PrepareForBailoutForId(expr->CreateLiteralId(), BailoutState::TOS_REGISTER); |
| 1366 | 1368 |
| 1367 bool result_saved = false; // Is the result saved to the stack? | 1369 bool result_saved = false; // Is the result saved to the stack? |
| 1368 ZoneList<Expression*>* subexprs = expr->values(); | 1370 ZoneList<Expression*>* subexprs = expr->values(); |
| 1369 int length = subexprs->length(); | 1371 int length = subexprs->length(); |
| 1370 | 1372 |
| 1371 // Emit code to evaluate all the non-constant subexpressions and to store | 1373 // Emit code to evaluate all the non-constant subexpressions and to store |
| 1372 // them into the newly cloned array. | 1374 // them into the newly cloned array. |
| (...skipping 1517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2890 reinterpret_cast<uint64_t>( | 2892 reinterpret_cast<uint64_t>( |
| 2891 isolate->builtins()->OnStackReplacement()->entry())); | 2893 isolate->builtins()->OnStackReplacement()->entry())); |
| 2892 return ON_STACK_REPLACEMENT; | 2894 return ON_STACK_REPLACEMENT; |
| 2893 } | 2895 } |
| 2894 | 2896 |
| 2895 | 2897 |
| 2896 } // namespace internal | 2898 } // namespace internal |
| 2897 } // namespace v8 | 2899 } // namespace v8 |
| 2898 | 2900 |
| 2899 #endif // V8_TARGET_ARCH_MIPS64 | 2901 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |