| 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 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 } | 824 } |
| 825 block->set_argument_count(argument_count_); | 825 block->set_argument_count(argument_count_); |
| 826 next_block_ = NULL; | 826 next_block_ = NULL; |
| 827 current_block_ = NULL; | 827 current_block_ = NULL; |
| 828 } | 828 } |
| 829 | 829 |
| 830 | 830 |
| 831 void LChunkBuilder::VisitInstruction(HInstruction* current) { | 831 void LChunkBuilder::VisitInstruction(HInstruction* current) { |
| 832 HInstruction* old_current = current_instruction_; | 832 HInstruction* old_current = current_instruction_; |
| 833 current_instruction_ = current; | 833 current_instruction_ = current; |
| 834 if (current->has_position()) position_ = current->position(); | |
| 835 | 834 |
| 836 LInstruction* instr = NULL; | 835 LInstruction* instr = NULL; |
| 837 if (current->CanReplaceWithDummyUses()) { | 836 if (current->CanReplaceWithDummyUses()) { |
| 838 if (current->OperandCount() == 0) { | 837 if (current->OperandCount() == 0) { |
| 839 instr = DefineAsRegister(new(zone()) LDummy()); | 838 instr = DefineAsRegister(new(zone()) LDummy()); |
| 840 } else { | 839 } else { |
| 841 ASSERT(!current->OperandAt(0)->IsControlInstruction()); | 840 ASSERT(!current->OperandAt(0)->IsControlInstruction()); |
| 842 instr = DefineAsRegister(new(zone()) | 841 instr = DefineAsRegister(new(zone()) |
| 843 LDummyUse(UseAny(current->OperandAt(0)))); | 842 LDummyUse(UseAny(current->OperandAt(0)))); |
| 844 } | 843 } |
| (...skipping 1620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2465 } | 2464 } |
| 2466 | 2465 |
| 2467 | 2466 |
| 2468 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2467 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
| 2469 LOperand* object = UseRegister(instr->object()); | 2468 LOperand* object = UseRegister(instr->object()); |
| 2470 LOperand* index = UseRegister(instr->index()); | 2469 LOperand* index = UseRegister(instr->index()); |
| 2471 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2470 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
| 2472 } | 2471 } |
| 2473 | 2472 |
| 2474 } } // namespace v8::internal | 2473 } } // namespace v8::internal |
| OLD | NEW |