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 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1172 int offset = property->kind() == ObjectLiteral::Property::GETTER ? 2 : 3; | 1172 int offset = property->kind() == ObjectLiteral::Property::GETTER ? 2 : 3; |
1173 EmitSetHomeObject(expression, offset, property->GetSlot()); | 1173 EmitSetHomeObject(expression, offset, property->GetSlot()); |
1174 } | 1174 } |
1175 } | 1175 } |
1176 } | 1176 } |
1177 | 1177 |
1178 | 1178 |
1179 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { | 1179 void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) { |
1180 Comment cmnt(masm_, "[ ObjectLiteral"); | 1180 Comment cmnt(masm_, "[ ObjectLiteral"); |
1181 | 1181 |
1182 Handle<FixedArray> constant_properties = expr->constant_properties(); | 1182 Handle<FixedArray> constant_properties = |
| 1183 expr->GetOrBuildConstantProperties(isolate()); |
1183 __ ld(a3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | 1184 __ ld(a3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
1184 __ li(a2, Operand(Smi::FromInt(expr->literal_index()))); | 1185 __ li(a2, Operand(Smi::FromInt(expr->literal_index()))); |
1185 __ li(a1, Operand(constant_properties)); | 1186 __ li(a1, Operand(constant_properties)); |
1186 __ li(a0, Operand(Smi::FromInt(expr->ComputeFlags()))); | 1187 __ li(a0, Operand(Smi::FromInt(expr->ComputeFlags()))); |
1187 if (MustCreateObjectLiteralWithRuntime(expr)) { | 1188 if (MustCreateObjectLiteralWithRuntime(expr)) { |
1188 __ Push(a3, a2, a1, a0); | 1189 __ Push(a3, a2, a1, a0); |
1189 __ CallRuntime(Runtime::kCreateObjectLiteral); | 1190 __ CallRuntime(Runtime::kCreateObjectLiteral); |
1190 } else { | 1191 } else { |
1191 Callable callable = CodeFactory::FastCloneShallowObject( | 1192 Callable callable = CodeFactory::FastCloneShallowObject( |
1192 isolate(), expr->properties_count()); | 1193 isolate(), expr->properties_count()); |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1302 context()->PlugTOS(); | 1303 context()->PlugTOS(); |
1303 } else { | 1304 } else { |
1304 context()->Plug(v0); | 1305 context()->Plug(v0); |
1305 } | 1306 } |
1306 } | 1307 } |
1307 | 1308 |
1308 | 1309 |
1309 void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { | 1310 void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { |
1310 Comment cmnt(masm_, "[ ArrayLiteral"); | 1311 Comment cmnt(masm_, "[ ArrayLiteral"); |
1311 | 1312 |
1312 Handle<ConstantElementsPair> constant_elements = expr->constant_elements(); | 1313 Handle<ConstantElementsPair> constant_elements = |
| 1314 expr->GetOrBuildConstantElements(isolate()); |
1313 bool has_fast_elements = | 1315 bool has_fast_elements = |
1314 IsFastObjectElementsKind(expr->constant_elements_kind()); | 1316 IsFastObjectElementsKind(expr->constant_elements_kind()); |
1315 | 1317 |
1316 AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; | 1318 AllocationSiteMode allocation_site_mode = TRACK_ALLOCATION_SITE; |
1317 if (has_fast_elements && !FLAG_allocation_site_pretenuring) { | 1319 if (has_fast_elements && !FLAG_allocation_site_pretenuring) { |
1318 // If the only customer of allocation sites is transitioning, then | 1320 // If the only customer of allocation sites is transitioning, then |
1319 // we can turn it off if we don't have anywhere else to transition to. | 1321 // we can turn it off if we don't have anywhere else to transition to. |
1320 allocation_site_mode = DONT_TRACK_ALLOCATION_SITE; | 1322 allocation_site_mode = DONT_TRACK_ALLOCATION_SITE; |
1321 } | 1323 } |
1322 | 1324 |
(...skipping 1476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2799 reinterpret_cast<uint64_t>( | 2801 reinterpret_cast<uint64_t>( |
2800 isolate->builtins()->OnStackReplacement()->entry())); | 2802 isolate->builtins()->OnStackReplacement()->entry())); |
2801 return ON_STACK_REPLACEMENT; | 2803 return ON_STACK_REPLACEMENT; |
2802 } | 2804 } |
2803 | 2805 |
2804 | 2806 |
2805 } // namespace internal | 2807 } // namespace internal |
2806 } // namespace v8 | 2808 } // namespace v8 |
2807 | 2809 |
2808 #endif // V8_TARGET_ARCH_MIPS64 | 2810 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |