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

Unified Diff: src/hydrogen.cc

Issue 7015039: Removed a "feature envy" bad smell: Moved AssumeRepresentation method to where (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/hydrogen-instructions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
===================================================================
--- src/hydrogen.cc (revision 7884)
+++ src/hydrogen.cc (working copy)
@@ -4636,7 +4636,7 @@
TypeInfo info = oracle()->UnaryType(expr);
Representation rep = ToRepresentation(info);
TraceRepresentation(expr->op(), info, instr, rep);
- AssumeRepresentation(instr, rep);
+ instr->AssumeRepresentation(rep);
ast_context()->ReturnInstruction(instr, expr->id());
}
@@ -4707,7 +4707,7 @@
rep = Representation::Integer32();
}
TraceRepresentation(expr->op(), info, instr, rep);
- AssumeRepresentation(instr, rep);
+ instr->AssumeRepresentation(rep);
return instr;
}
@@ -4885,7 +4885,7 @@
rep = Representation::Integer32();
}
TraceRepresentation(expr->op(), info, instr, rep);
- AssumeRepresentation(instr, rep);
+ instr->AssumeRepresentation(rep);
return instr;
}
@@ -5073,16 +5073,6 @@
}
-void HGraphBuilder::AssumeRepresentation(HValue* value, Representation rep) {
- if (value->CheckFlag(HValue::kFlexibleRepresentation)) {
- value->ChangeRepresentation(rep);
- // The representation of the value is dictated by type feedback and
- // will not be changed later.
- value->ClearFlag(HValue::kFlexibleRepresentation);
- }
-}
-
-
Representation HGraphBuilder::ToRepresentation(TypeInfo info) {
if (info.IsSmi()) return Representation::Integer32();
if (info.IsInteger32()) return Representation::Integer32();
« no previous file with comments | « no previous file | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698