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

Side by Side Diff: src/lithium.cc

Issue 6132002: Crankshaft: Move LParallelMove to lithium.h, add LGap to lithium-x64.h. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 11 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/lithium.h ('k') | src/x64/lithium-x64.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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 if (nodes_[i]->operand()->Equals(operand)) return nodes_[i]; 169 if (nodes_[i]->operand()->Equals(operand)) return nodes_[i];
170 } 170 }
171 171
172 // No node found => create a new one. 172 // No node found => create a new one.
173 LGapNode* result = new LGapNode(operand); 173 LGapNode* result = new LGapNode(operand);
174 nodes_.Add(result); 174 nodes_.Add(result);
175 return result; 175 return result;
176 } 176 }
177 177
178 178
179 bool LParallelMove::IsRedundant() const {
180 for (int i = 0; i < move_operands_.length(); ++i) {
181 if (!move_operands_[i].IsRedundant()) return false;
182 }
183 return true;
184 }
185
186
187 void LParallelMove::PrintDataTo(StringStream* stream) const {
188 for (int i = move_operands_.length() - 1; i >= 0; --i) {
189 if (!move_operands_[i].IsEliminated()) {
190 LOperand* from = move_operands_[i].from();
191 LOperand* to = move_operands_[i].to();
192 if (from->Equals(to)) {
193 to->PrintTo(stream);
194 } else {
195 to->PrintTo(stream);
196 stream->Add(" = ");
197 from->PrintTo(stream);
198 }
199 stream->Add("; ");
200 }
201 }
202 }
203
204
179 } } // namespace v8::internal 205 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/lithium.h ('k') | src/x64/lithium-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698