Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: src/arm/lithium-arm.cc

Issue 24957003: Add tool to visualize machine code/lithium. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Final polish before review Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 if (needs_environment && !instr->HasEnvironment()) { 649 if (needs_environment && !instr->HasEnvironment()) {
650 instr = AssignEnvironment(instr); 650 instr = AssignEnvironment(instr);
651 } 651 }
652 652
653 return instr; 653 return instr;
654 } 654 }
655 655
656 656
657 LInstruction* LChunkBuilder::AssignPointerMap(LInstruction* instr) { 657 LInstruction* LChunkBuilder::AssignPointerMap(LInstruction* instr) {
658 ASSERT(!instr->HasPointerMap()); 658 ASSERT(!instr->HasPointerMap());
659 instr->set_pointer_map(new(zone()) LPointerMap(position_, zone())); 659 instr->set_pointer_map(new(zone()) LPointerMap(zone()));
660 return instr; 660 return instr;
661 } 661 }
662 662
663 663
664 LUnallocated* LChunkBuilder::TempRegister() { 664 LUnallocated* LChunkBuilder::TempRegister() {
665 LUnallocated* operand = 665 LUnallocated* operand =
666 new(zone()) LUnallocated(LUnallocated::MUST_HAVE_REGISTER); 666 new(zone()) LUnallocated(LUnallocated::MUST_HAVE_REGISTER);
667 int vreg = allocator_->GetVirtualRegister(); 667 int vreg = allocator_->GetVirtualRegister();
668 if (!allocator_->AllocationOk()) { 668 if (!allocator_->AllocationOk()) {
669 Abort(kOutOfVirtualRegistersWhileTryingToAllocateTempRegister); 669 Abort(kOutOfVirtualRegistersWhileTryingToAllocateTempRegister);
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 if (LUnallocated::cast(instr->Output())->HasFixedPolicy()) ++fixed; 907 if (LUnallocated::cast(instr->Output())->HasFixedPolicy()) ++fixed;
908 } 908 }
909 for (TempIterator it(instr); !it.Done(); it.Advance()) { 909 for (TempIterator it(instr); !it.Done(); it.Advance()) {
910 LUnallocated* operand = LUnallocated::cast(it.Current()); 910 LUnallocated* operand = LUnallocated::cast(it.Current());
911 if (operand->HasFixedPolicy()) ++fixed; 911 if (operand->HasFixedPolicy()) ++fixed;
912 } 912 }
913 ASSERT(fixed == 0 || used_at_start == 0); 913 ASSERT(fixed == 0 || used_at_start == 0);
914 } 914 }
915 #endif 915 #endif
916 916
917 instr->set_position(position_);
918 if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) { 917 if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) {
919 instr = AssignPointerMap(instr); 918 instr = AssignPointerMap(instr);
920 } 919 }
921 if (FLAG_stress_environments && !instr->HasEnvironment()) { 920 if (FLAG_stress_environments && !instr->HasEnvironment()) {
922 instr = AssignEnvironment(instr); 921 instr = AssignEnvironment(instr);
923 } 922 }
924 chunk_->AddInstruction(instr, current_block_); 923 chunk_->AddInstruction(instr, current_block_);
925 } 924 }
926 current_instruction_ = old_current; 925 current_instruction_ = old_current;
927 } 926 }
(...skipping 1731 matching lines...) Expand 10 before | Expand all | Expand 10 after
2659 2658
2660 2659
2661 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2660 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2662 LOperand* object = UseRegister(instr->object()); 2661 LOperand* object = UseRegister(instr->object());
2663 LOperand* index = UseRegister(instr->index()); 2662 LOperand* index = UseRegister(instr->index());
2664 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2663 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2665 } 2664 }
2666 2665
2667 2666
2668 } } // namespace v8::internal 2667 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/arm/lithium-codegen-arm.h » ('j') | src/codegen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698