OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/arm64/lithium-arm64.h" | 5 #include "src/crankshaft/arm64/lithium-arm64.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" | 9 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" |
10 #include "src/crankshaft/hydrogen-osr.h" | 10 #include "src/crankshaft/hydrogen-osr.h" |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 | 282 |
283 void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) { | 283 void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) { |
284 object()->PrintTo(stream); | 284 object()->PrintTo(stream); |
285 stream->Add("["); | 285 stream->Add("["); |
286 key()->PrintTo(stream); | 286 key()->PrintTo(stream); |
287 stream->Add("] <- "); | 287 stream->Add("] <- "); |
288 value()->PrintTo(stream); | 288 value()->PrintTo(stream); |
289 } | 289 } |
290 | 290 |
291 | 291 |
292 void LLoadGlobalViaContext::PrintDataTo(StringStream* stream) { | |
293 stream->Add("depth:%d slot:%d", depth(), slot_index()); | |
294 } | |
295 | |
296 | |
297 void LStoreNamedField::PrintDataTo(StringStream* stream) { | 292 void LStoreNamedField::PrintDataTo(StringStream* stream) { |
298 object()->PrintTo(stream); | 293 object()->PrintTo(stream); |
299 std::ostringstream os; | 294 std::ostringstream os; |
300 os << hydrogen()->access(); | 295 os << hydrogen()->access(); |
301 stream->Add(os.str().c_str()); | 296 stream->Add(os.str().c_str()); |
302 stream->Add(" <- "); | 297 stream->Add(" <- "); |
303 value()->PrintTo(stream); | 298 value()->PrintTo(stream); |
304 } | 299 } |
305 | 300 |
306 | 301 |
307 void LStoreNamedGeneric::PrintDataTo(StringStream* stream) { | 302 void LStoreNamedGeneric::PrintDataTo(StringStream* stream) { |
308 object()->PrintTo(stream); | 303 object()->PrintTo(stream); |
309 stream->Add("."); | 304 stream->Add("."); |
310 stream->Add(String::cast(*name())->ToCString().get()); | 305 stream->Add(String::cast(*name())->ToCString().get()); |
311 stream->Add(" <- "); | 306 stream->Add(" <- "); |
312 value()->PrintTo(stream); | 307 value()->PrintTo(stream); |
313 } | 308 } |
314 | 309 |
315 | 310 |
316 void LStoreGlobalViaContext::PrintDataTo(StringStream* stream) { | |
317 stream->Add("depth:%d slot:%d <- ", depth(), slot_index()); | |
318 value()->PrintTo(stream); | |
319 } | |
320 | |
321 | |
322 void LStringCompareAndBranch::PrintDataTo(StringStream* stream) { | 311 void LStringCompareAndBranch::PrintDataTo(StringStream* stream) { |
323 stream->Add("if string_compare("); | 312 stream->Add("if string_compare("); |
324 left()->PrintTo(stream); | 313 left()->PrintTo(stream); |
325 right()->PrintTo(stream); | 314 right()->PrintTo(stream); |
326 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); | 315 stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); |
327 } | 316 } |
328 | 317 |
329 | 318 |
330 void LTransitionElementsKind::PrintDataTo(StringStream* stream) { | 319 void LTransitionElementsKind::PrintDataTo(StringStream* stream) { |
331 object()->PrintTo(stream); | 320 object()->PrintTo(stream); |
(...skipping 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1680 if (instr->HasVectorAndSlot()) { | 1669 if (instr->HasVectorAndSlot()) { |
1681 vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister()); | 1670 vector = FixedTemp(LoadWithVectorDescriptor::VectorRegister()); |
1682 } | 1671 } |
1683 | 1672 |
1684 LLoadGlobalGeneric* result = | 1673 LLoadGlobalGeneric* result = |
1685 new(zone()) LLoadGlobalGeneric(context, global_object, vector); | 1674 new(zone()) LLoadGlobalGeneric(context, global_object, vector); |
1686 return MarkAsCall(DefineFixed(result, x0), instr); | 1675 return MarkAsCall(DefineFixed(result, x0), instr); |
1687 } | 1676 } |
1688 | 1677 |
1689 | 1678 |
1690 LInstruction* LChunkBuilder::DoLoadGlobalViaContext( | |
1691 HLoadGlobalViaContext* instr) { | |
1692 LOperand* context = UseFixed(instr->context(), cp); | |
1693 DCHECK(instr->slot_index() > 0); | |
1694 LLoadGlobalViaContext* result = new (zone()) LLoadGlobalViaContext(context); | |
1695 return MarkAsCall(DefineFixed(result, x0), instr); | |
1696 } | |
1697 | |
1698 | |
1699 LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) { | 1679 LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) { |
1700 DCHECK(instr->key()->representation().IsSmiOrInteger32()); | 1680 DCHECK(instr->key()->representation().IsSmiOrInteger32()); |
1701 ElementsKind elements_kind = instr->elements_kind(); | 1681 ElementsKind elements_kind = instr->elements_kind(); |
1702 LOperand* elements = UseRegister(instr->elements()); | 1682 LOperand* elements = UseRegister(instr->elements()); |
1703 LOperand* key = UseRegisterOrConstant(instr->key()); | 1683 LOperand* key = UseRegisterOrConstant(instr->key()); |
1704 | 1684 |
1705 if (!instr->is_fixed_typed_array()) { | 1685 if (!instr->is_fixed_typed_array()) { |
1706 if (instr->representation().IsDouble()) { | 1686 if (instr->representation().IsDouble()) { |
1707 LOperand* temp = (!instr->key()->IsConstant() || | 1687 LOperand* temp = (!instr->key()->IsConstant() || |
1708 instr->RequiresHoleCheck()) | 1688 instr->RequiresHoleCheck()) |
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2441 slot = FixedTemp(VectorStoreICDescriptor::SlotRegister()); | 2421 slot = FixedTemp(VectorStoreICDescriptor::SlotRegister()); |
2442 vector = FixedTemp(VectorStoreICDescriptor::VectorRegister()); | 2422 vector = FixedTemp(VectorStoreICDescriptor::VectorRegister()); |
2443 } | 2423 } |
2444 | 2424 |
2445 LStoreNamedGeneric* result = | 2425 LStoreNamedGeneric* result = |
2446 new (zone()) LStoreNamedGeneric(context, object, value, slot, vector); | 2426 new (zone()) LStoreNamedGeneric(context, object, value, slot, vector); |
2447 return MarkAsCall(result, instr); | 2427 return MarkAsCall(result, instr); |
2448 } | 2428 } |
2449 | 2429 |
2450 | 2430 |
2451 LInstruction* LChunkBuilder::DoStoreGlobalViaContext( | |
2452 HStoreGlobalViaContext* instr) { | |
2453 LOperand* context = UseFixed(instr->context(), cp); | |
2454 LOperand* value = UseFixed(instr->value(), | |
2455 StoreGlobalViaContextDescriptor::ValueRegister()); | |
2456 DCHECK(instr->slot_index() > 0); | |
2457 | |
2458 LStoreGlobalViaContext* result = | |
2459 new (zone()) LStoreGlobalViaContext(context, value); | |
2460 return MarkAsCall(result, instr); | |
2461 } | |
2462 | |
2463 | |
2464 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { | 2431 LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) { |
2465 LOperand* context = UseFixed(instr->context(), cp); | 2432 LOperand* context = UseFixed(instr->context(), cp); |
2466 LOperand* left = UseFixed(instr->left(), x1); | 2433 LOperand* left = UseFixed(instr->left(), x1); |
2467 LOperand* right = UseFixed(instr->right(), x0); | 2434 LOperand* right = UseFixed(instr->right(), x0); |
2468 | 2435 |
2469 LStringAdd* result = new(zone()) LStringAdd(context, left, right); | 2436 LStringAdd* result = new(zone()) LStringAdd(context, left, right); |
2470 return MarkAsCall(DefineFixed(result, x0), instr); | 2437 return MarkAsCall(DefineFixed(result, x0), instr); |
2471 } | 2438 } |
2472 | 2439 |
2473 | 2440 |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2787 LOperand* context = UseFixed(instr->context(), cp); | 2754 LOperand* context = UseFixed(instr->context(), cp); |
2788 LOperand* function = UseRegisterAtStart(instr->function()); | 2755 LOperand* function = UseRegisterAtStart(instr->function()); |
2789 LAllocateBlockContext* result = | 2756 LAllocateBlockContext* result = |
2790 new(zone()) LAllocateBlockContext(context, function); | 2757 new(zone()) LAllocateBlockContext(context, function); |
2791 return MarkAsCall(DefineFixed(result, cp), instr); | 2758 return MarkAsCall(DefineFixed(result, cp), instr); |
2792 } | 2759 } |
2793 | 2760 |
2794 | 2761 |
2795 } // namespace internal | 2762 } // namespace internal |
2796 } // namespace v8 | 2763 } // namespace v8 |
OLD | NEW |