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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 10911057: Add check for non-smi to the IL and use it for class checks. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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 | « runtime/vm/code_generator.h ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_optimizer.cc
===================================================================
--- runtime/vm/flow_graph_optimizer.cc (revision 11768)
+++ runtime/vm/flow_graph_optimizer.cc (working copy)
@@ -313,8 +313,11 @@
// Type propagation has not run yet, we cannot eliminate the check.
const ICData& unary_checks =
ICData::ZoneHandle(comp->ic_data()->AsUnaryClassChecks());
- CheckClassComp* check = new CheckClassComp(value, comp, unary_checks);
- InsertBefore(instr, check, instr->env(), Definition::kEffect);
+ CheckNonSmiComp* check_non_smi = new CheckNonSmiComp(value->Copy(),
+ comp->deopt_id());
+ InsertBefore(instr, check_non_smi, instr->env(), Definition::kEffect);
+ CheckClassComp* check_class = new CheckClassComp(value, comp, unary_checks);
+ InsertBefore(instr, check_class, instr->env(), Definition::kEffect);
}
« no previous file with comments | « runtime/vm/code_generator.h ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698