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 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
904 | 904 |
905 void LChunkBuilder::VisitInstruction(HInstruction* current) { | 905 void LChunkBuilder::VisitInstruction(HInstruction* current) { |
906 HInstruction* old_current = current_instruction_; | 906 HInstruction* old_current = current_instruction_; |
907 current_instruction_ = current; | 907 current_instruction_ = current; |
908 | 908 |
909 LInstruction* instr = NULL; | 909 LInstruction* instr = NULL; |
910 if (current->CanReplaceWithDummyUses()) { | 910 if (current->CanReplaceWithDummyUses()) { |
911 if (current->OperandCount() == 0) { | 911 if (current->OperandCount() == 0) { |
912 instr = DefineAsRegister(new(zone()) LDummy()); | 912 instr = DefineAsRegister(new(zone()) LDummy()); |
913 } else { | 913 } else { |
| 914 ASSERT(!current->OperandAt(0)->IsControlInstruction()); |
914 instr = DefineAsRegister(new(zone()) | 915 instr = DefineAsRegister(new(zone()) |
915 LDummyUse(UseAny(current->OperandAt(0)))); | 916 LDummyUse(UseAny(current->OperandAt(0)))); |
916 } | 917 } |
917 for (int i = 1; i < current->OperandCount(); ++i) { | 918 for (int i = 1; i < current->OperandCount(); ++i) { |
| 919 if (current->OperandAt(i)->IsControlInstruction()) continue; |
918 LInstruction* dummy = | 920 LInstruction* dummy = |
919 new(zone()) LDummyUse(UseAny(current->OperandAt(i))); | 921 new(zone()) LDummyUse(UseAny(current->OperandAt(i))); |
920 dummy->set_hydrogen_value(current); | 922 dummy->set_hydrogen_value(current); |
921 chunk_->AddInstruction(dummy, current_block_); | 923 chunk_->AddInstruction(dummy, current_block_); |
922 } | 924 } |
923 } else { | 925 } else { |
924 instr = current->CompileToLithium(this); | 926 instr = current->CompileToLithium(this); |
925 } | 927 } |
926 | 928 |
927 argument_count_ += current->argument_delta(); | 929 argument_count_ += current->argument_delta(); |
(...skipping 1671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2599 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2601 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2600 LOperand* object = UseRegister(instr->object()); | 2602 LOperand* object = UseRegister(instr->object()); |
2601 LOperand* index = UseTempRegister(instr->index()); | 2603 LOperand* index = UseTempRegister(instr->index()); |
2602 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2604 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2603 } | 2605 } |
2604 | 2606 |
2605 | 2607 |
2606 } } // namespace v8::internal | 2608 } } // namespace v8::internal |
2607 | 2609 |
2608 #endif // V8_TARGET_ARCH_IA32 | 2610 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |