| 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 <sstream> | 5 #include <sstream> |
| 6 | 6 |
| 7 #include "src/v8.h" | 7 #include "src/v8.h" |
| 8 | 8 |
| 9 #if V8_TARGET_ARCH_MIPS64 | 9 #if V8_TARGET_ARCH_MIPS64 |
| 10 | 10 |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 | 330 |
| 331 void LAccessArgumentsAt::PrintDataTo(StringStream* stream) { | 331 void LAccessArgumentsAt::PrintDataTo(StringStream* stream) { |
| 332 arguments()->PrintTo(stream); | 332 arguments()->PrintTo(stream); |
| 333 stream->Add(" length "); | 333 stream->Add(" length "); |
| 334 length()->PrintTo(stream); | 334 length()->PrintTo(stream); |
| 335 stream->Add(" index "); | 335 stream->Add(" index "); |
| 336 index()->PrintTo(stream); | 336 index()->PrintTo(stream); |
| 337 } | 337 } |
| 338 | 338 |
| 339 | 339 |
| 340 void LLoadGlobalViaContext::PrintDataTo(StringStream* stream) { |
| 341 stream->Add(String::cast(*name())->ToCString().get()); |
| 342 stream->Add(" depth:%d slot:%d", depth(), slot_index()); |
| 343 } |
| 344 |
| 345 |
| 340 void LStoreNamedField::PrintDataTo(StringStream* stream) { | 346 void LStoreNamedField::PrintDataTo(StringStream* stream) { |
| 341 object()->PrintTo(stream); | 347 object()->PrintTo(stream); |
| 342 std::ostringstream os; | 348 std::ostringstream os; |
| 343 os << hydrogen()->access() << " <- "; | 349 os << hydrogen()->access() << " <- "; |
| 344 stream->Add(os.str().c_str()); | 350 stream->Add(os.str().c_str()); |
| 345 value()->PrintTo(stream); | 351 value()->PrintTo(stream); |
| 346 } | 352 } |
| 347 | 353 |
| 348 | 354 |
| 349 void LStoreNamedGeneric::PrintDataTo(StringStream* stream) { | 355 void LStoreNamedGeneric::PrintDataTo(StringStream* stream) { |
| 350 object()->PrintTo(stream); | 356 object()->PrintTo(stream); |
| 351 stream->Add("."); | 357 stream->Add("."); |
| 352 stream->Add(String::cast(*name())->ToCString().get()); | 358 stream->Add(String::cast(*name())->ToCString().get()); |
| 353 stream->Add(" <- "); | 359 stream->Add(" <- "); |
| 354 value()->PrintTo(stream); | 360 value()->PrintTo(stream); |
| 355 } | 361 } |
| 356 | 362 |
| 357 | 363 |
| 364 void LStoreGlobalViaContext::PrintDataTo(StringStream* stream) { |
| 365 stream->Add(String::cast(*name())->ToCString().get()); |
| 366 stream->Add(" <- "); |
| 367 value()->PrintTo(stream); |
| 368 stream->Add(" depth:%d slot:%d", depth(), slot_index()); |
| 369 } |
| 370 |
| 371 |
| 358 void LLoadKeyed::PrintDataTo(StringStream* stream) { | 372 void LLoadKeyed::PrintDataTo(StringStream* stream) { |
| 359 elements()->PrintTo(stream); | 373 elements()->PrintTo(stream); |
| 360 stream->Add("["); | 374 stream->Add("["); |
| 361 key()->PrintTo(stream); | 375 key()->PrintTo(stream); |
| 362 if (hydrogen()->IsDehoisted()) { | 376 if (hydrogen()->IsDehoisted()) { |
| 363 stream->Add(" + %d]", base_offset()); | 377 stream->Add(" + %d]", base_offset()); |
| 364 } else { | 378 } else { |
| 365 stream->Add("]"); | 379 stream->Add("]"); |
| 366 } | 380 } |
| 367 } | 381 } |
| (...skipping 1725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2093 LOperand* vector = NULL; | 2107 LOperand* vector = NULL; |
| 2094 if (instr->HasVectorAndSlot()) { | 2108 if (instr->HasVectorAndSlot()) { |
| 2095 vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister()); | 2109 vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister()); |
| 2096 } | 2110 } |
| 2097 LLoadGlobalGeneric* result = | 2111 LLoadGlobalGeneric* result = |
| 2098 new(zone()) LLoadGlobalGeneric(context, global_object, vector); | 2112 new(zone()) LLoadGlobalGeneric(context, global_object, vector); |
| 2099 return MarkAsCall(DefineFixed(result, v0), instr); | 2113 return MarkAsCall(DefineFixed(result, v0), instr); |
| 2100 } | 2114 } |
| 2101 | 2115 |
| 2102 | 2116 |
| 2117 LInstruction* LChunkBuilder::DoLoadGlobalViaContext( |
| 2118 HLoadGlobalViaContext* instr) { |
| 2119 LOperand* context = UseFixed(instr->context(), cp); |
| 2120 DCHECK(instr->slot_index() > 0); |
| 2121 LLoadGlobalViaContext* result = new (zone()) LLoadGlobalViaContext(context); |
| 2122 return MarkAsCall(DefineFixed(result, v0), instr); |
| 2123 } |
| 2124 |
| 2125 |
| 2103 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { | 2126 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { |
| 2104 LOperand* context = UseRegisterAtStart(instr->value()); | 2127 LOperand* context = UseRegisterAtStart(instr->value()); |
| 2105 LInstruction* result = | 2128 LInstruction* result = |
| 2106 DefineAsRegister(new(zone()) LLoadContextSlot(context)); | 2129 DefineAsRegister(new(zone()) LLoadContextSlot(context)); |
| 2107 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { | 2130 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { |
| 2108 result = AssignEnvironment(result); | 2131 result = AssignEnvironment(result); |
| 2109 } | 2132 } |
| 2110 return result; | 2133 return result; |
| 2111 } | 2134 } |
| 2112 | 2135 |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2382 slot = FixedTemp(VectorStoreICDescriptor::SlotRegister()); | 2405 slot = FixedTemp(VectorStoreICDescriptor::SlotRegister()); |
| 2383 vector = FixedTemp(VectorStoreICDescriptor::VectorRegister()); | 2406 vector = FixedTemp(VectorStoreICDescriptor::VectorRegister()); |
| 2384 } | 2407 } |
| 2385 | 2408 |
| 2386 LStoreNamedGeneric* result = | 2409 LStoreNamedGeneric* result = |
| 2387 new (zone()) LStoreNamedGeneric(context, obj, val, slot, vector); | 2410 new (zone()) LStoreNamedGeneric(context, obj, val, slot, vector); |
| 2388 return MarkAsCall(result, instr); | 2411 return MarkAsCall(result, instr); |
| 2389 } | 2412 } |
| 2390 | 2413 |
| 2391 | 2414 |
| 2415 LInstruction* LChunkBuilder::DoStoreGlobalViaContext( |
| 2416 HStoreGlobalViaContext* instr) { |
| 2417 LOperand* context = UseFixed(instr->context(), cp); |
| 2418 LOperand* value = UseFixed(instr->value(), |
| 2419 StoreGlobalViaContextDescriptor::ValueRegister()); |
| 2420 DCHECK(instr->slot_index() > 0); |
| 2421 |
| 2422 LStoreGlobalViaContext* result = |
| 2423 new (zone()) LStoreGlobalViaContext(context, value); |
| 2424 return MarkAsCall(result, instr); |
| 2425 } |
| 2426 |
| 2427 |
| 2392 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { | 2428 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { |
| 2393 LOperand* context = UseFixed(instr->context(), cp); | 2429 LOperand* context = UseFixed(instr->context(), cp); |
| 2394 LOperand* left = UseFixed(instr->left(), a1); | 2430 LOperand* left = UseFixed(instr->left(), a1); |
| 2395 LOperand* right = UseFixed(instr->right(), a0); | 2431 LOperand* right = UseFixed(instr->right(), a0); |
| 2396 return MarkAsCall( | 2432 return MarkAsCall( |
| 2397 DefineFixed(new(zone()) LStringAdd(context, left, right), v0), | 2433 DefineFixed(new(zone()) LStringAdd(context, left, right), v0), |
| 2398 instr); | 2434 instr); |
| 2399 } | 2435 } |
| 2400 | 2436 |
| 2401 | 2437 |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2645 LAllocateBlockContext* result = | 2681 LAllocateBlockContext* result = |
| 2646 new(zone()) LAllocateBlockContext(context, function); | 2682 new(zone()) LAllocateBlockContext(context, function); |
| 2647 return MarkAsCall(DefineFixed(result, cp), instr); | 2683 return MarkAsCall(DefineFixed(result, cp), instr); |
| 2648 } | 2684 } |
| 2649 | 2685 |
| 2650 | 2686 |
| 2651 } // namespace internal | 2687 } // namespace internal |
| 2652 } // namespace v8 | 2688 } // namespace v8 |
| 2653 | 2689 |
| 2654 #endif // V8_TARGET_ARCH_MIPS64 | 2690 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |