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 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 1711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2083 LOperand* vector = NULL; | 2072 LOperand* vector = NULL; |
2084 if (instr->HasVectorAndSlot()) { | 2073 if (instr->HasVectorAndSlot()) { |
2085 vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister()); | 2074 vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister()); |
2086 } | 2075 } |
2087 LLoadGlobalGeneric* result = | 2076 LLoadGlobalGeneric* result = |
2088 new(zone()) LLoadGlobalGeneric(context, global_object, vector); | 2077 new(zone()) LLoadGlobalGeneric(context, global_object, vector); |
2089 return MarkAsCall(DefineFixed(result, v0), instr); | 2078 return MarkAsCall(DefineFixed(result, v0), instr); |
2090 } | 2079 } |
2091 | 2080 |
2092 | 2081 |
2093 LInstruction* LChunkBuilder::DoLoadGlobalViaContext( | |
2094 HLoadGlobalViaContext* instr) { | |
2095 LOperand* context = UseFixed(instr->context(), cp); | |
2096 DCHECK(instr->slot_index() > 0); | |
2097 LLoadGlobalViaContext* result = new (zone()) LLoadGlobalViaContext(context); | |
2098 return MarkAsCall(DefineFixed(result, v0), instr); | |
2099 } | |
2100 | |
2101 | |
2102 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { | 2082 LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) { |
2103 LOperand* context = UseRegisterAtStart(instr->value()); | 2083 LOperand* context = UseRegisterAtStart(instr->value()); |
2104 LInstruction* result = | 2084 LInstruction* result = |
2105 DefineAsRegister(new(zone()) LLoadContextSlot(context)); | 2085 DefineAsRegister(new(zone()) LLoadContextSlot(context)); |
2106 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { | 2086 if (instr->RequiresHoleCheck() && instr->DeoptimizesOnHole()) { |
2107 result = AssignEnvironment(result); | 2087 result = AssignEnvironment(result); |
2108 } | 2088 } |
2109 return result; | 2089 return result; |
2110 } | 2090 } |
2111 | 2091 |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2377 slot = FixedTemp(VectorStoreICDescriptor::SlotRegister()); | 2357 slot = FixedTemp(VectorStoreICDescriptor::SlotRegister()); |
2378 vector = FixedTemp(VectorStoreICDescriptor::VectorRegister()); | 2358 vector = FixedTemp(VectorStoreICDescriptor::VectorRegister()); |
2379 } | 2359 } |
2380 | 2360 |
2381 LStoreNamedGeneric* result = | 2361 LStoreNamedGeneric* result = |
2382 new (zone()) LStoreNamedGeneric(context, obj, val, slot, vector); | 2362 new (zone()) LStoreNamedGeneric(context, obj, val, slot, vector); |
2383 return MarkAsCall(result, instr); | 2363 return MarkAsCall(result, instr); |
2384 } | 2364 } |
2385 | 2365 |
2386 | 2366 |
2387 LInstruction* LChunkBuilder::DoStoreGlobalViaContext( | |
2388 HStoreGlobalViaContext* instr) { | |
2389 LOperand* context = UseFixed(instr->context(), cp); | |
2390 LOperand* value = UseFixed(instr->value(), | |
2391 StoreGlobalViaContextDescriptor::ValueRegister()); | |
2392 DCHECK(instr->slot_index() > 0); | |
2393 | |
2394 LStoreGlobalViaContext* result = | |
2395 new (zone()) LStoreGlobalViaContext(context, value); | |
2396 return MarkAsCall(result, instr); | |
2397 } | |
2398 | |
2399 | |
2400 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { | 2367 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { |
2401 LOperand* context = UseFixed(instr->context(), cp); | 2368 LOperand* context = UseFixed(instr->context(), cp); |
2402 LOperand* left = UseFixed(instr->left(), a1); | 2369 LOperand* left = UseFixed(instr->left(), a1); |
2403 LOperand* right = UseFixed(instr->right(), a0); | 2370 LOperand* right = UseFixed(instr->right(), a0); |
2404 return MarkAsCall( | 2371 return MarkAsCall( |
2405 DefineFixed(new(zone()) LStringAdd(context, left, right), v0), | 2372 DefineFixed(new(zone()) LStringAdd(context, left, right), v0), |
2406 instr); | 2373 instr); |
2407 } | 2374 } |
2408 | 2375 |
2409 | 2376 |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2646 LAllocateBlockContext* result = | 2613 LAllocateBlockContext* result = |
2647 new(zone()) LAllocateBlockContext(context, function); | 2614 new(zone()) LAllocateBlockContext(context, function); |
2648 return MarkAsCall(DefineFixed(result, cp), instr); | 2615 return MarkAsCall(DefineFixed(result, cp), instr); |
2649 } | 2616 } |
2650 | 2617 |
2651 | 2618 |
2652 } // namespace internal | 2619 } // namespace internal |
2653 } // namespace v8 | 2620 } // namespace v8 |
2654 | 2621 |
2655 #endif // V8_TARGET_ARCH_MIPS64 | 2622 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |