| 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/mips64/lithium-mips64.h" | 5 #include "src/crankshaft/mips64/lithium-mips64.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #if V8_TARGET_ARCH_MIPS64 | 9 #if V8_TARGET_ARCH_MIPS64 |
| 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 1888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2221 val = UseRegister(instr->value()); | 2212 val = UseRegister(instr->value()); |
| 2222 } | 2213 } |
| 2223 | 2214 |
| 2224 // We need a temporary register for write barrier of the map field. | 2215 // We need a temporary register for write barrier of the map field. |
| 2225 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL; | 2216 LOperand* temp = needs_write_barrier_for_map ? TempRegister() : NULL; |
| 2226 | 2217 |
| 2227 return new(zone()) LStoreNamedField(obj, val, temp); | 2218 return new(zone()) LStoreNamedField(obj, val, temp); |
| 2228 } | 2219 } |
| 2229 | 2220 |
| 2230 | 2221 |
| 2231 LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) { | |
| 2232 LOperand* context = UseFixed(instr->context(), cp); | |
| 2233 LOperand* obj = | |
| 2234 UseFixed(instr->object(), StoreDescriptor::ReceiverRegister()); | |
| 2235 LOperand* val = UseFixed(instr->value(), StoreDescriptor::ValueRegister()); | |
| 2236 LOperand* slot = FixedTemp(StoreWithVectorDescriptor::SlotRegister()); | |
| 2237 LOperand* vector = FixedTemp(StoreWithVectorDescriptor::VectorRegister()); | |
| 2238 | |
| 2239 LStoreNamedGeneric* result = | |
| 2240 new (zone()) LStoreNamedGeneric(context, obj, val, slot, vector); | |
| 2241 return MarkAsCall(result, instr); | |
| 2242 } | |
| 2243 | |
| 2244 | |
| 2245 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { | 2222 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { |
| 2246 LOperand* context = UseFixed(instr->context(), cp); | 2223 LOperand* context = UseFixed(instr->context(), cp); |
| 2247 LOperand* left = UseFixed(instr->left(), a1); | 2224 LOperand* left = UseFixed(instr->left(), a1); |
| 2248 LOperand* right = UseFixed(instr->right(), a0); | 2225 LOperand* right = UseFixed(instr->right(), a0); |
| 2249 return MarkAsCall( | 2226 return MarkAsCall( |
| 2250 DefineFixed(new(zone()) LStringAdd(context, left, right), v0), | 2227 DefineFixed(new(zone()) LStringAdd(context, left, right), v0), |
| 2251 instr); | 2228 instr); |
| 2252 } | 2229 } |
| 2253 | 2230 |
| 2254 | 2231 |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2451 LOperand* index = UseTempRegister(instr->index()); | 2428 LOperand* index = UseTempRegister(instr->index()); |
| 2452 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); | 2429 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); |
| 2453 LInstruction* result = DefineSameAsFirst(load); | 2430 LInstruction* result = DefineSameAsFirst(load); |
| 2454 return AssignPointerMap(result); | 2431 return AssignPointerMap(result); |
| 2455 } | 2432 } |
| 2456 | 2433 |
| 2457 } // namespace internal | 2434 } // namespace internal |
| 2458 } // namespace v8 | 2435 } // namespace v8 |
| 2459 | 2436 |
| 2460 #endif // V8_TARGET_ARCH_MIPS64 | 2437 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |