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 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
848 void LChunkBuilder::VisitInstruction(HInstruction* current) { | 848 void LChunkBuilder::VisitInstruction(HInstruction* current) { |
849 HInstruction* old_current = current_instruction_; | 849 HInstruction* old_current = current_instruction_; |
850 current_instruction_ = current; | 850 current_instruction_ = current; |
851 if (current->has_position()) position_ = current->position(); | 851 if (current->has_position()) position_ = current->position(); |
852 | 852 |
853 LInstruction* instr = NULL; | 853 LInstruction* instr = NULL; |
854 if (current->CanReplaceWithDummyUses()) { | 854 if (current->CanReplaceWithDummyUses()) { |
855 if (current->OperandCount() == 0) { | 855 if (current->OperandCount() == 0) { |
856 instr = DefineAsRegister(new(zone()) LDummy()); | 856 instr = DefineAsRegister(new(zone()) LDummy()); |
857 } else { | 857 } else { |
| 858 ASSERT(!current->OperandAt(0)->IsControlInstruction()); |
858 instr = DefineAsRegister(new(zone()) | 859 instr = DefineAsRegister(new(zone()) |
859 LDummyUse(UseAny(current->OperandAt(0)))); | 860 LDummyUse(UseAny(current->OperandAt(0)))); |
860 } | 861 } |
861 for (int i = 1; i < current->OperandCount(); ++i) { | 862 for (int i = 1; i < current->OperandCount(); ++i) { |
| 863 if (current->OperandAt(i)->IsControlInstruction()) continue; |
862 LInstruction* dummy = | 864 LInstruction* dummy = |
863 new(zone()) LDummyUse(UseAny(current->OperandAt(i))); | 865 new(zone()) LDummyUse(UseAny(current->OperandAt(i))); |
864 dummy->set_hydrogen_value(current); | 866 dummy->set_hydrogen_value(current); |
865 chunk_->AddInstruction(dummy, current_block_); | 867 chunk_->AddInstruction(dummy, current_block_); |
866 } | 868 } |
867 } else { | 869 } else { |
868 instr = current->CompileToLithium(this); | 870 instr = current->CompileToLithium(this); |
869 } | 871 } |
870 | 872 |
871 argument_count_ += current->argument_delta(); | 873 argument_count_ += current->argument_delta(); |
(...skipping 1544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2416 | 2418 |
2417 | 2419 |
2418 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2420 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2419 LOperand* object = UseRegister(instr->object()); | 2421 LOperand* object = UseRegister(instr->object()); |
2420 LOperand* index = UseRegister(instr->index()); | 2422 LOperand* index = UseRegister(instr->index()); |
2421 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2423 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2422 } | 2424 } |
2423 | 2425 |
2424 | 2426 |
2425 } } // namespace v8::internal | 2427 } } // namespace v8::internal |
OLD | NEW |