| 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 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 850 | 850 |
| 851 void LChunkBuilder::VisitInstruction(HInstruction* current) { | 851 void LChunkBuilder::VisitInstruction(HInstruction* current) { |
| 852 HInstruction* old_current = current_instruction_; | 852 HInstruction* old_current = current_instruction_; |
| 853 current_instruction_ = current; | 853 current_instruction_ = current; |
| 854 | 854 |
| 855 LInstruction* instr = NULL; | 855 LInstruction* instr = NULL; |
| 856 if (current->CanReplaceWithDummyUses()) { | 856 if (current->CanReplaceWithDummyUses()) { |
| 857 if (current->OperandCount() == 0) { | 857 if (current->OperandCount() == 0) { |
| 858 instr = DefineAsRegister(new(zone()) LDummy()); | 858 instr = DefineAsRegister(new(zone()) LDummy()); |
| 859 } else { | 859 } else { |
| 860 ASSERT(!current->OperandAt(0)->IsControlInstruction()); |
| 860 instr = DefineAsRegister(new(zone()) | 861 instr = DefineAsRegister(new(zone()) |
| 861 LDummyUse(UseAny(current->OperandAt(0)))); | 862 LDummyUse(UseAny(current->OperandAt(0)))); |
| 862 } | 863 } |
| 863 for (int i = 1; i < current->OperandCount(); ++i) { | 864 for (int i = 1; i < current->OperandCount(); ++i) { |
| 865 if (current->OperandAt(i)->IsControlInstruction()) continue; |
| 864 LInstruction* dummy = | 866 LInstruction* dummy = |
| 865 new(zone()) LDummyUse(UseAny(current->OperandAt(i))); | 867 new(zone()) LDummyUse(UseAny(current->OperandAt(i))); |
| 866 dummy->set_hydrogen_value(current); | 868 dummy->set_hydrogen_value(current); |
| 867 chunk_->AddInstruction(dummy, current_block_); | 869 chunk_->AddInstruction(dummy, current_block_); |
| 868 } | 870 } |
| 869 } else { | 871 } else { |
| 870 instr = current->CompileToLithium(this); | 872 instr = current->CompileToLithium(this); |
| 871 } | 873 } |
| 872 | 874 |
| 873 argument_count_ += current->argument_delta(); | 875 argument_count_ += current->argument_delta(); |
| (...skipping 1571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2445 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2447 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2446 LOperand* object = UseRegister(instr->object()); | 2448 LOperand* object = UseRegister(instr->object()); |
| 2447 LOperand* index = UseTempRegister(instr->index()); | 2449 LOperand* index = UseTempRegister(instr->index()); |
| 2448 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2450 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
| 2449 } | 2451 } |
| 2450 | 2452 |
| 2451 | 2453 |
| 2452 } } // namespace v8::internal | 2454 } } // namespace v8::internal |
| 2453 | 2455 |
| 2454 #endif // V8_TARGET_ARCH_X64 | 2456 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |