OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2588 | 2588 |
2589 | 2589 |
2590 void HPhi::AddIndirectUsesTo(int* dest) { | 2590 void HPhi::AddIndirectUsesTo(int* dest) { |
2591 for (int i = 0; i < Representation::kNumRepresentations; i++) { | 2591 for (int i = 0; i < Representation::kNumRepresentations; i++) { |
2592 dest[i] += indirect_uses_[i]; | 2592 dest[i] += indirect_uses_[i]; |
2593 } | 2593 } |
2594 } | 2594 } |
2595 | 2595 |
2596 | 2596 |
2597 void HSimulate::MergeWith(ZoneList<HSimulate*>* list) { | 2597 void HSimulate::MergeWith(ZoneList<HSimulate*>* list) { |
2598 if (!list->is_empty() && !HasAstId()) { | |
titzer
2014/04/24 14:34:11
Do we still need the !HasAstId() check now?
Toon Verwaest
2014/04/24 15:06:36
Yes, this is used to merge the simulate of the las
| |
2599 set_ast_id(list->last()->ast_id()); | |
2600 } | |
2598 while (!list->is_empty()) { | 2601 while (!list->is_empty()) { |
2599 HSimulate* from = list->RemoveLast(); | 2602 HSimulate* from = list->RemoveLast(); |
2600 ZoneList<HValue*>* from_values = &from->values_; | 2603 ZoneList<HValue*>* from_values = &from->values_; |
2601 for (int i = 0; i < from_values->length(); ++i) { | 2604 for (int i = 0; i < from_values->length(); ++i) { |
2602 if (from->HasAssignedIndexAt(i)) { | 2605 if (from->HasAssignedIndexAt(i)) { |
2603 int index = from->GetAssignedIndexAt(i); | 2606 int index = from->GetAssignedIndexAt(i); |
2604 if (HasValueForIndex(index)) continue; | 2607 if (HasValueForIndex(index)) continue; |
2605 AddAssignedValue(index, from_values->at(i)); | 2608 AddAssignedValue(index, from_values->at(i)); |
2606 } else { | 2609 } else { |
2607 if (pop_count_ > 0) { | 2610 if (pop_count_ > 0) { |
(...skipping 1889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4497 HBasicBlock* defining_block = value->block(); | 4500 HBasicBlock* defining_block = value->block(); |
4498 HBasicBlock* predecessor_block = block()->predecessors()->at(i); | 4501 HBasicBlock* predecessor_block = block()->predecessors()->at(i); |
4499 ASSERT(defining_block == predecessor_block || | 4502 ASSERT(defining_block == predecessor_block || |
4500 defining_block->Dominates(predecessor_block)); | 4503 defining_block->Dominates(predecessor_block)); |
4501 } | 4504 } |
4502 } | 4505 } |
4503 | 4506 |
4504 | 4507 |
4505 void HSimulate::Verify() { | 4508 void HSimulate::Verify() { |
4506 HInstruction::Verify(); | 4509 HInstruction::Verify(); |
4507 ASSERT(HasAstId()); | 4510 ASSERT(HasAstId() || next()->IsEnterInlined()); |
titzer
2014/04/24 14:34:11
Yay
| |
4508 } | 4511 } |
4509 | 4512 |
4510 | 4513 |
4511 void HCheckHeapObject::Verify() { | 4514 void HCheckHeapObject::Verify() { |
4512 HInstruction::Verify(); | 4515 HInstruction::Verify(); |
4513 ASSERT(HasNoUses()); | 4516 ASSERT(HasNoUses()); |
4514 } | 4517 } |
4515 | 4518 |
4516 | 4519 |
4517 void HCheckValue::Verify() { | 4520 void HCheckValue::Verify() { |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4744 break; | 4747 break; |
4745 case kExternalMemory: | 4748 case kExternalMemory: |
4746 stream->Add("[external-memory]"); | 4749 stream->Add("[external-memory]"); |
4747 break; | 4750 break; |
4748 } | 4751 } |
4749 | 4752 |
4750 stream->Add("@%d", offset()); | 4753 stream->Add("@%d", offset()); |
4751 } | 4754 } |
4752 | 4755 |
4753 } } // namespace v8::internal | 4756 } } // namespace v8::internal |
OLD | NEW |