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

Side by Side Diff: src/arm/lithium-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, 8 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-arm.h ('k') | src/arm/lithium-codegen-arm.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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 for (int i = 0; i < 4; i++) { 143 for (int i = 0; i < 4; i++) {
144 if (parallel_moves_[i] != NULL && !parallel_moves_[i]->IsRedundant()) { 144 if (parallel_moves_[i] != NULL && !parallel_moves_[i]->IsRedundant()) {
145 return false; 145 return false;
146 } 146 }
147 } 147 }
148 148
149 return true; 149 return true;
150 } 150 }
151 151
152 152
153 void LGap::PrintDataTo(StringStream* stream) const { 153 void LGap::PrintDataTo(StringStream* stream) {
154 for (int i = 0; i < 4; i++) { 154 for (int i = 0; i < 4; i++) {
155 stream->Add("("); 155 stream->Add("(");
156 if (parallel_moves_[i] != NULL) { 156 if (parallel_moves_[i] != NULL) {
157 parallel_moves_[i]->PrintDataTo(stream); 157 parallel_moves_[i]->PrintDataTo(stream);
158 } 158 }
159 stream->Add(") "); 159 stream->Add(") ");
160 } 160 }
161 } 161 }
162 162
163 163
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 if (can_eliminate) { 448 if (can_eliminate) {
449 label->set_replacement(GetLabel(goto_instr->block_id())); 449 label->set_replacement(GetLabel(goto_instr->block_id()));
450 } 450 }
451 } 451 }
452 } 452 }
453 } 453 }
454 } 454 }
455 455
456 456
457 void LChunk::AddInstruction(LInstruction* instr, HBasicBlock* block) { 457 void LChunk::AddInstruction(LInstruction* instr, HBasicBlock* block) {
458 LGap* gap = new LGap(block); 458 LInstructionGap* gap = new LInstructionGap(block);
459 int index = -1; 459 int index = -1;
460 if (instr->IsControl()) { 460 if (instr->IsControl()) {
461 instructions_.Add(gap); 461 instructions_.Add(gap);
462 index = instructions_.length(); 462 index = instructions_.length();
463 instructions_.Add(instr); 463 instructions_.Add(instr);
464 } else { 464 } else {
465 index = instructions_.length(); 465 index = instructions_.length();
466 instructions_.Add(instr); 466 instructions_.Add(instr);
467 instructions_.Add(gap); 467 instructions_.Add(gap);
468 } 468 }
(...skipping 1667 matching lines...) Expand 10 before | Expand all | Expand 10 after
2136 2136
2137 2137
2138 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 2138 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
2139 HEnvironment* outer = current_block_->last_environment()->outer(); 2139 HEnvironment* outer = current_block_->last_environment()->outer();
2140 current_block_->UpdateEnvironment(outer); 2140 current_block_->UpdateEnvironment(outer);
2141 return NULL; 2141 return NULL;
2142 } 2142 }
2143 2143
2144 2144
2145 } } // namespace v8::internal 2145 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/arm/lithium-codegen-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698