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

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

Issue 6880204: Refactor lithium classes to reduce the number of virtual functions. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 7 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
« no previous file with comments | « src/arm/lithium-codegen-arm.h ('k') | src/ia32/lithium-codegen-ia32.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 732
733 733
734 void LCodeGen::DoLabel(LLabel* label) { 734 void LCodeGen::DoLabel(LLabel* label) {
735 if (label->is_loop_header()) { 735 if (label->is_loop_header()) {
736 Comment(";;; B%d - LOOP entry", label->block_id()); 736 Comment(";;; B%d - LOOP entry", label->block_id());
737 } else { 737 } else {
738 Comment(";;; B%d", label->block_id()); 738 Comment(";;; B%d", label->block_id());
739 } 739 }
740 __ bind(label->label()); 740 __ bind(label->label());
741 current_block_ = label->block_id(); 741 current_block_ = label->block_id();
742 LCodeGen::DoGap(label); 742 DoGap(label);
743 } 743 }
744 744
745 745
746 void LCodeGen::DoParallelMove(LParallelMove* move) { 746 void LCodeGen::DoParallelMove(LParallelMove* move) {
747 resolver_.Resolve(move); 747 resolver_.Resolve(move);
748 } 748 }
749 749
750 750
751 void LCodeGen::DoGap(LGap* gap) { 751 void LCodeGen::DoGap(LGap* gap) {
752 for (int i = LGap::FIRST_INNER_POSITION; 752 for (int i = LGap::FIRST_INNER_POSITION;
753 i <= LGap::LAST_INNER_POSITION; 753 i <= LGap::LAST_INNER_POSITION;
754 i++) { 754 i++) {
755 LGap::InnerPosition inner_pos = static_cast<LGap::InnerPosition>(i); 755 LGap::InnerPosition inner_pos = static_cast<LGap::InnerPosition>(i);
756 LParallelMove* move = gap->GetParallelMove(inner_pos); 756 LParallelMove* move = gap->GetParallelMove(inner_pos);
757 if (move != NULL) DoParallelMove(move); 757 if (move != NULL) DoParallelMove(move);
758 } 758 }
759 759
760 LInstruction* next = GetNextInstruction(); 760 LInstruction* next = GetNextInstruction();
761 if (next != NULL && next->IsLazyBailout()) { 761 if (next != NULL && next->IsLazyBailout()) {
762 int pc = masm()->pc_offset(); 762 int pc = masm()->pc_offset();
763 safepoints_.SetPcAfterGap(pc); 763 safepoints_.SetPcAfterGap(pc);
764 } 764 }
765 } 765 }
766 766
767 767
768 void LCodeGen::DoInstructionGap(LInstructionGap* instr) {
769 DoGap(instr);
770 }
771
772
768 void LCodeGen::DoParameter(LParameter* instr) { 773 void LCodeGen::DoParameter(LParameter* instr) {
769 // Nothing to do. 774 // Nothing to do.
770 } 775 }
771 776
772 777
773 void LCodeGen::DoCallStub(LCallStub* instr) { 778 void LCodeGen::DoCallStub(LCallStub* instr) {
774 ASSERT(ToRegister(instr->result()).is(r0)); 779 ASSERT(ToRegister(instr->result()).is(r0));
775 switch (instr->hydrogen()->major_key()) { 780 switch (instr->hydrogen()->major_key()) {
776 case CodeStub::RegExpConstructResult: { 781 case CodeStub::RegExpConstructResult: {
777 RegExpConstructResultStub stub; 782 RegExpConstructResultStub stub;
(...skipping 3504 matching lines...) Expand 10 before | Expand all | Expand 10 after
4282 ASSERT(!environment->HasBeenRegistered()); 4287 ASSERT(!environment->HasBeenRegistered());
4283 RegisterEnvironmentForDeoptimization(environment); 4288 RegisterEnvironmentForDeoptimization(environment);
4284 ASSERT(osr_pc_offset_ == -1); 4289 ASSERT(osr_pc_offset_ == -1);
4285 osr_pc_offset_ = masm()->pc_offset(); 4290 osr_pc_offset_ = masm()->pc_offset();
4286 } 4291 }
4287 4292
4288 4293
4289 #undef __ 4294 #undef __
4290 4295
4291 } } // namespace v8::internal 4296 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.h ('k') | src/ia32/lithium-codegen-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698