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

Unified Diff: src/hydrogen.cc

Issue 12390026: In the absence of type feedback, pessimistically force Tagged representation for UnaryAdd (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Created 7 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 4d9bc9bc64ef3b693e59c4d66645873af43a0cbf..d45f320db35d9d2fd0d5108a4aa9ea0587054cb4 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -8613,6 +8613,11 @@ void HOptimizedGraphBuilder::VisitAdd(UnaryOperation* expr) {
HValue* context = environment()->LookupContext();
HInstruction* instr =
HMul::New(zone(), context, value, graph()->GetConstant1());
+ if (instr->IsBinaryOperation()) {
+ // Since we don't have type feedback, we must be cautious/pessimistic.
+ HBinaryOperation::cast(instr)->set_observed_input_representation(
+ Representation::Tagged(), Representation::Tagged());
+ }
return ast_context()->ReturnInstruction(instr, expr->id());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698