| 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 | 323 |
| 324 void LAccessArgumentsAt::PrintDataTo(StringStream* stream) { | 324 void LAccessArgumentsAt::PrintDataTo(StringStream* stream) { |
| 325 arguments()->PrintTo(stream); | 325 arguments()->PrintTo(stream); |
| 326 stream->Add(" length "); | 326 stream->Add(" length "); |
| 327 length()->PrintTo(stream); | 327 length()->PrintTo(stream); |
| 328 stream->Add(" index "); | 328 stream->Add(" index "); |
| 329 index()->PrintTo(stream); | 329 index()->PrintTo(stream); |
| 330 } | 330 } |
| 331 | 331 |
| 332 | 332 |
| 333 void LLoadGlobalViaContext::PrintDataTo(StringStream* stream) { | |
| 334 stream->Add("depth:%d slot:%d", depth(), slot_index()); | |
| 335 } | |
| 336 | |
| 337 | |
| 338 void LStoreNamedField::PrintDataTo(StringStream* stream) { | 333 void LStoreNamedField::PrintDataTo(StringStream* stream) { |
| 339 object()->PrintTo(stream); | 334 object()->PrintTo(stream); |
| 340 std::ostringstream os; | 335 std::ostringstream os; |
| 341 os << hydrogen()->access() << " <- "; | 336 os << hydrogen()->access() << " <- "; |
| 342 stream->Add(os.str().c_str()); | 337 stream->Add(os.str().c_str()); |
| 343 value()->PrintTo(stream); | 338 value()->PrintTo(stream); |
| 344 } | 339 } |
| 345 | 340 |
| 346 | 341 |
| 347 void LStoreNamedGeneric::PrintDataTo(StringStream* stream) { | 342 void LStoreNamedGeneric::PrintDataTo(StringStream* stream) { |
| 348 object()->PrintTo(stream); | 343 object()->PrintTo(stream); |
| 349 stream->Add("."); | 344 stream->Add("."); |
| 350 stream->Add(String::cast(*name())->ToCString().get()); | 345 stream->Add(String::cast(*name())->ToCString().get()); |
| 351 stream->Add(" <- "); | 346 stream->Add(" <- "); |
| 352 value()->PrintTo(stream); | 347 value()->PrintTo(stream); |
| 353 } | 348 } |
| 354 | 349 |
| 355 | 350 |
| 356 void LStoreGlobalViaContext::PrintDataTo(StringStream* stream) { | |
| 357 stream->Add("depth:%d slot:%d <- ", depth(), slot_index()); | |
| 358 value()->PrintTo(stream); | |
| 359 } | |
| 360 | |
| 361 | |
| 362 void LLoadKeyed::PrintDataTo(StringStream* stream) { | 351 void LLoadKeyed::PrintDataTo(StringStream* stream) { |
| 363 elements()->PrintTo(stream); | 352 elements()->PrintTo(stream); |
| 364 stream->Add("["); | 353 stream->Add("["); |
| 365 key()->PrintTo(stream); | 354 key()->PrintTo(stream); |
| 366 if (hydrogen()->IsDehoisted()) { | 355 if (hydrogen()->IsDehoisted()) { |
| 367 stream->Add(" + %d]", base_offset()); | 356 stream->Add(" + %d]", base_offset()); |
| 368 } else { | 357 } else { |
| 369 stream->Add("]"); | 358 stream->Add("]"); |
| 370 } | 359 } |
| 371 } | 360 } |
| (...skipping 1708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2080 LOperand* vector = NULL; | 2069 LOperand* vector = NULL; |
| 2081 if (instr->HasVectorAndSlot()) { | 2070 if (instr->HasVectorAndSlot()) { |
| 2082 vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister()); | 2071 vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister()); |
| 2083 } | 2072 } |
| 2084 LLoadGlobalGeneric* result = | 2073 LLoadGlobalGeneric* result = |
| 2085 new(zone()) LLoadGlobalGeneric(context, global_object, vector); | 2074 new(zone()) LLoadGlobalGeneric(context, global_object, vector); |
| 2086 return MarkAsCall(DefineFixed(result, v0), instr); | 2075 return MarkAsCall(DefineFixed(result, v0), instr); |
| 2087 } | 2076 } |
| 2088 | 2077 |
| 2089 | 2078 |
| 2090 LInstruction* LChunkBuilder::DoLoadGlobalViaContext( | |
| 2091 HLoadGlobalViaContext* instr) { | |
| 2092 LOperand* context = UseFixed(instr->context(), cp); | |
| 2093 DCHECK(instr->slot_index() > 0); | |
| 2094 LLoadGlobalViaContext* result = new (zone()) LLoadGlobalViaContext(context); | |
| 2095 return MarkAsCall(DefineFixed(result, v0), instr); | |
| 2096 } | |
| 2097 | |
| 2098 | |
| 2099 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { | 2079 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { |
| 2100 LOperand* context = UseRegisterAtStart(instr->value()); | 2080 LOperand* context = UseRegisterAtStart(instr->value()); |
| 2101 LInstruction* result = | 2081 LInstruction* result = |
| 2102 DefineAsRegister(new(zone()) LLoadContextSlot(context)); | 2082 DefineAsRegister(new(zone()) LLoadContextSlot(context)); |
| 2103 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { | 2083 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { |
| 2104 result = AssignEnvironment(result); | 2084 result = AssignEnvironment(result); |
| 2105 } | 2085 } |
| 2106 return result; | 2086 return result; |
| 2107 } | 2087 } |
| 2108 | 2088 |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2372 slot = FixedTemp(VectorStoreICDescriptor::SlotRegister()); | 2352 slot = FixedTemp(VectorStoreICDescriptor::SlotRegister()); |
| 2373 vector = FixedTemp(VectorStoreICDescriptor::VectorRegister()); | 2353 vector = FixedTemp(VectorStoreICDescriptor::VectorRegister()); |
| 2374 } | 2354 } |
| 2375 | 2355 |
| 2376 LStoreNamedGeneric* result = | 2356 LStoreNamedGeneric* result = |
| 2377 new (zone()) LStoreNamedGeneric(context, obj, val, slot, vector); | 2357 new (zone()) LStoreNamedGeneric(context, obj, val, slot, vector); |
| 2378 return MarkAsCall(result, instr); | 2358 return MarkAsCall(result, instr); |
| 2379 } | 2359 } |
| 2380 | 2360 |
| 2381 | 2361 |
| 2382 LInstruction* LChunkBuilder::DoStoreGlobalViaContext( | |
| 2383 HStoreGlobalViaContext* instr) { | |
| 2384 LOperand* context = UseFixed(instr->context(), cp); | |
| 2385 LOperand* value = UseFixed(instr->value(), | |
| 2386 StoreGlobalViaContextDescriptor::ValueRegister()); | |
| 2387 DCHECK(instr->slot_index() > 0); | |
| 2388 | |
| 2389 LStoreGlobalViaContext* result = | |
| 2390 new (zone()) LStoreGlobalViaContext(context, value); | |
| 2391 return MarkAsCall(result, instr); | |
| 2392 } | |
| 2393 | |
| 2394 | |
| 2395 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { | 2362 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { |
| 2396 LOperand* context = UseFixed(instr->context(), cp); | 2363 LOperand* context = UseFixed(instr->context(), cp); |
| 2397 LOperand* left = UseFixed(instr->left(), a1); | 2364 LOperand* left = UseFixed(instr->left(), a1); |
| 2398 LOperand* right = UseFixed(instr->right(), a0); | 2365 LOperand* right = UseFixed(instr->right(), a0); |
| 2399 return MarkAsCall( | 2366 return MarkAsCall( |
| 2400 DefineFixed(new(zone()) LStringAdd(context, left, right), v0), | 2367 DefineFixed(new(zone()) LStringAdd(context, left, right), v0), |
| 2401 instr); | 2368 instr); |
| 2402 } | 2369 } |
| 2403 | 2370 |
| 2404 | 2371 |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2641 LOperand* function = UseRegisterAtStart(instr->function()); | 2608 LOperand* function = UseRegisterAtStart(instr->function()); |
| 2642 LAllocateBlockContext* result = | 2609 LAllocateBlockContext* result = |
| 2643 new(zone()) LAllocateBlockContext(context, function); | 2610 new(zone()) LAllocateBlockContext(context, function); |
| 2644 return MarkAsCall(DefineFixed(result, cp), instr); | 2611 return MarkAsCall(DefineFixed(result, cp), instr); |
| 2645 } | 2612 } |
| 2646 | 2613 |
| 2647 } // namespace internal | 2614 } // namespace internal |
| 2648 } // namespace v8 | 2615 } // namespace v8 |
| 2649 | 2616 |
| 2650 #endif // V8_TARGET_ARCH_MIPS | 2617 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |