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