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 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
654 if (needs_environment && !instr->HasEnvironment()) { | 654 if (needs_environment && !instr->HasEnvironment()) { |
655 instr = AssignEnvironment(instr); | 655 instr = AssignEnvironment(instr); |
656 } | 656 } |
657 | 657 |
658 return instr; | 658 return instr; |
659 } | 659 } |
660 | 660 |
661 | 661 |
662 LInstruction* LChunkBuilder::AssignPointerMap(LInstruction* instr) { | 662 LInstruction* LChunkBuilder::AssignPointerMap(LInstruction* instr) { |
663 ASSERT(!instr->HasPointerMap()); | 663 ASSERT(!instr->HasPointerMap()); |
664 instr->set_pointer_map(new(zone()) LPointerMap(position_, zone())); | 664 instr->set_pointer_map(new(zone()) LPointerMap(zone())); |
665 return instr; | 665 return instr; |
666 } | 666 } |
667 | 667 |
668 | 668 |
669 LUnallocated* LChunkBuilder::TempRegister() { | 669 LUnallocated* LChunkBuilder::TempRegister() { |
670 LUnallocated* operand = | 670 LUnallocated* operand = |
671 new(zone()) LUnallocated(LUnallocated::MUST_HAVE_REGISTER); | 671 new(zone()) LUnallocated(LUnallocated::MUST_HAVE_REGISTER); |
672 int vreg = allocator_->GetVirtualRegister(); | 672 int vreg = allocator_->GetVirtualRegister(); |
673 if (!allocator_->AllocationOk()) { | 673 if (!allocator_->AllocationOk()) { |
674 Abort(kOutOfVirtualRegistersWhileTryingToAllocateTempRegister); | 674 Abort(kOutOfVirtualRegistersWhileTryingToAllocateTempRegister); |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
912 if (LUnallocated::cast(instr->Output())->HasFixedPolicy()) ++fixed; | 912 if (LUnallocated::cast(instr->Output())->HasFixedPolicy()) ++fixed; |
913 } | 913 } |
914 for (TempIterator it(instr); !it.Done(); it.Advance()) { | 914 for (TempIterator it(instr); !it.Done(); it.Advance()) { |
915 LUnallocated* operand = LUnallocated::cast(it.Current()); | 915 LUnallocated* operand = LUnallocated::cast(it.Current()); |
916 if (operand->HasFixedPolicy()) ++fixed; | 916 if (operand->HasFixedPolicy()) ++fixed; |
917 } | 917 } |
918 ASSERT(fixed == 0 || used_at_start == 0); | 918 ASSERT(fixed == 0 || used_at_start == 0); |
919 } | 919 } |
920 #endif | 920 #endif |
921 | 921 |
922 instr->set_position(position_); | |
923 if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) { | 922 if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) { |
924 instr = AssignPointerMap(instr); | 923 instr = AssignPointerMap(instr); |
925 } | 924 } |
926 if (FLAG_stress_environments && !instr->HasEnvironment()) { | 925 if (FLAG_stress_environments && !instr->HasEnvironment()) { |
927 instr = AssignEnvironment(instr); | 926 instr = AssignEnvironment(instr); |
928 } | 927 } |
929 chunk_->AddInstruction(instr, current_block_); | 928 chunk_->AddInstruction(instr, current_block_); |
930 } | 929 } |
931 current_instruction_ = old_current; | 930 current_instruction_ = old_current; |
932 } | 931 } |
(...skipping 1648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2581 | 2580 |
2582 | 2581 |
2583 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2582 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2584 LOperand* object = UseRegister(instr->object()); | 2583 LOperand* object = UseRegister(instr->object()); |
2585 LOperand* index = UseRegister(instr->index()); | 2584 LOperand* index = UseRegister(instr->index()); |
2586 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); | 2585 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); |
2587 } | 2586 } |
2588 | 2587 |
2589 | 2588 |
2590 } } // namespace v8::internal | 2589 } } // namespace v8::internal |
OLD | NEW |