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/crankshaft/mips/lithium-mips.h" | 5 #include "src/crankshaft/mips/lithium-mips.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #if V8_TARGET_ARCH_MIPS | 9 #if V8_TARGET_ARCH_MIPS |
10 | 10 |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 | 304 |
305 void LStoreNamedField::PrintDataTo(StringStream* stream) { | 305 void LStoreNamedField::PrintDataTo(StringStream* stream) { |
306 object()->PrintTo(stream); | 306 object()->PrintTo(stream); |
307 std::ostringstream os; | 307 std::ostringstream os; |
308 os << hydrogen()->access() << " <- "; | 308 os << hydrogen()->access() << " <- "; |
309 stream->Add(os.str().c_str()); | 309 stream->Add(os.str().c_str()); |
310 value()->PrintTo(stream); | 310 value()->PrintTo(stream); |
311 } | 311 } |
312 | 312 |
313 | 313 |
314 void LStoreNamedGeneric::PrintDataTo(StringStream* stream) { | |
315 object()->PrintTo(stream); | |
316 stream->Add("."); | |
317 stream->Add(String::cast(*name())->ToCString().get()); | |
318 stream->Add(" <- "); | |
319 value()->PrintTo(stream); | |
320 } | |
321 | |
322 | |
323 void LLoadKeyed::PrintDataTo(StringStream* stream) { | 314 void LLoadKeyed::PrintDataTo(StringStream* stream) { |
324 elements()->PrintTo(stream); | 315 elements()->PrintTo(stream); |
325 stream->Add("["); | 316 stream->Add("["); |
326 key()->PrintTo(stream); | 317 key()->PrintTo(stream); |
327 if (hydrogen()->IsDehoisted()) { | 318 if (hydrogen()->IsDehoisted()) { |
328 stream->Add(" + %d]", base_offset()); | 319 stream->Add(" + %d]", base_offset()); |
329 } else { | 320 } else { |
330 stream->Add("]"); | 321 stream->Add("]"); |
331 } | 322 } |
332 } | 323 } |
(...skipping 1883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2216 val = UseRegister(instr->value()); | 2207 val = UseRegister(instr->value()); |
2217 } | 2208 } |
2218 | 2209 |
2219 // We need a temporary register for write barrier of the map field. | 2210 // We need a temporary register for write barrier of the map field. |
2220 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL; | 2211 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL; |
2221 | 2212 |
2222 return new(zone()) LStoreNamedField(obj, val, temp); | 2213 return new(zone()) LStoreNamedField(obj, val, temp); |
2223 } | 2214 } |
2224 | 2215 |
2225 | 2216 |
2226 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { | |
2227 LOperand* context = UseFixed(instr->context(), cp); | |
2228 LOperand* obj = | |
2229 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); | |
2230 LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); | |
2231 LOperand* slot = FixedTemp(StoreWithVectorDescriptor::SlotRegister()); | |
2232 LOperand* vector = FixedTemp(StoreWithVectorDescriptor::VectorRegister()); | |
2233 | |
2234 LStoreNamedGeneric* result = | |
2235 new (zone()) LStoreNamedGeneric(context, obj, val, slot, vector); | |
2236 return MarkAsCall(result, instr); | |
2237 } | |
2238 | |
2239 | |
2240 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { | 2217 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { |
2241 LOperand* context = UseFixed(instr->context(), cp); | 2218 LOperand* context = UseFixed(instr->context(), cp); |
2242 LOperand* left = UseFixed(instr->left(), a1); | 2219 LOperand* left = UseFixed(instr->left(), a1); |
2243 LOperand* right = UseFixed(instr->right(), a0); | 2220 LOperand* right = UseFixed(instr->right(), a0); |
2244 return MarkAsCall( | 2221 return MarkAsCall( |
2245 DefineFixed(new(zone()) LStringAdd(context, left, right), v0), | 2222 DefineFixed(new(zone()) LStringAdd(context, left, right), v0), |
2246 instr); | 2223 instr); |
2247 } | 2224 } |
2248 | 2225 |
2249 | 2226 |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2446 LOperand* index = UseTempRegister(instr->index()); | 2423 LOperand* index = UseTempRegister(instr->index()); |
2447 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2424 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
2448 LInstruction* result = DefineSameAsFirst(load); | 2425 LInstruction* result = DefineSameAsFirst(load); |
2449 return AssignPointerMap(result); | 2426 return AssignPointerMap(result); |
2450 } | 2427 } |
2451 | 2428 |
2452 } // namespace internal | 2429 } // namespace internal |
2453 } // namespace v8 | 2430 } // namespace v8 |
2454 | 2431 |
2455 #endif // V8_TARGET_ARCH_MIPS | 2432 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |