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 830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
841 } | 841 } |
842 block->set_argument_count(argument_count_); | 842 block->set_argument_count(argument_count_); |
843 next_block_ = NULL; | 843 next_block_ = NULL; |
844 current_block_ = NULL; | 844 current_block_ = NULL; |
845 } | 845 } |
846 | 846 |
847 | 847 |
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(); | |
852 | 851 |
853 LInstruction* instr = NULL; | 852 LInstruction* instr = NULL; |
854 if (current->CanReplaceWithDummyUses()) { | 853 if (current->CanReplaceWithDummyUses()) { |
855 if (current->OperandCount() == 0) { | 854 if (current->OperandCount() == 0) { |
856 instr = DefineAsRegister(new(zone()) LDummy()); | 855 instr = DefineAsRegister(new(zone()) LDummy()); |
857 } else { | 856 } else { |
858 ASSERT(!current->OperandAt(0)->IsControlInstruction()); | 857 ASSERT(!current->OperandAt(0)->IsControlInstruction()); |
859 instr = DefineAsRegister(new(zone()) | 858 instr = DefineAsRegister(new(zone()) |
860 LDummyUse(UseAny(current->OperandAt(0)))); | 859 LDummyUse(UseAny(current->OperandAt(0)))); |
861 } | 860 } |
(...skipping 1537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2399 | 2398 |
2400 | 2399 |
2401 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2400 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2402 LOperand* object = UseRegister(instr->object()); | 2401 LOperand* object = UseRegister(instr->object()); |
2403 LOperand* index = UseRegister(instr->index()); | 2402 LOperand* index = UseRegister(instr->index()); |
2404 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2403 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2405 } | 2404 } |
2406 | 2405 |
2407 | 2406 |
2408 } } // namespace v8::internal | 2407 } } // namespace v8::internal |
OLD | NEW |