Chromium Code Reviews| Index: src/compiler/instruction-selector.cc |
| diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc |
| index f987248bead41d33f3acf4146703ed11daa3ebaf..6679956f9627fa80b162cd010b50a19bf4ca2149 100644 |
| --- a/src/compiler/instruction-selector.cc |
| +++ b/src/compiler/instruction-selector.cc |
| @@ -464,6 +464,7 @@ void InstructionSelector::VisitBlock(BasicBlock* block) { |
| // up". |
| size_t current_node_end = instructions_.size(); |
| VisitNode(node); |
| + // TODO(turbofan): only reverse if > 1 instruction emitted. |
|
Benedikt Meurer
2015/01/11 11:50:22
std::reverse handles that efficiently. No need to
titzer
2015/01/12 10:43:53
Hopefully so, TODO removed.
|
| std::reverse(instructions_.begin() + current_node_end, instructions_.end()); |
| } |
| @@ -543,6 +544,8 @@ MachineType InstructionSelector::GetMachineType(Node* node) { |
| return kMachAnyTagged; |
| case IrOpcode::kParameter: |
| return linkage()->GetParameterType(OpParameter<int>(node)); |
| + case IrOpcode::kOsrValue: |
| + return kMachAnyTagged; |
| case IrOpcode::kPhi: |
| return OpParameter<MachineType>(node); |
| case IrOpcode::kProjection: |
| @@ -681,6 +684,8 @@ void InstructionSelector::VisitNode(Node* node) { |
| MarkAsRepresentation(type, node); |
| return VisitParameter(node); |
| } |
| + case IrOpcode::kOsrValue: |
| + return VisitOsrValue(node); |
|
Benedikt Meurer
2015/01/11 11:50:22
Missing MarkAsReference(node) here.
titzer
2015/01/12 10:43:53
Done.
|
| case IrOpcode::kPhi: { |
| MachineType type = OpParameter<MachineType>(node); |
| MarkAsRepresentation(type, node); |
| @@ -965,6 +970,14 @@ void InstructionSelector::VisitParameter(Node* node) { |
| } |
| +void InstructionSelector::VisitOsrValue(Node* node) { |
| + OperandGenerator g(this); |
| + int index = OpParameter<int>(node); |
| + Emit(kArchNop, g.DefineAsLocation(node, linkage()->GetOsrValueLocation(index), |
| + kMachAnyTagged)); |
| +} |
| + |
| + |
| void InstructionSelector::VisitPhi(Node* node) { |
| const int input_count = node->op()->ValueInputCount(); |
| PhiInstruction* phi = new (instruction_zone()) |