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

Unified Diff: runtime/vm/flow_graph_compiler_ia32.cc

Issue 25898002: Skip AssertAssignable in code generator if optimizer could establish that (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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 | tests/co19/co19-runtime.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler_ia32.cc
===================================================================
--- runtime/vm/flow_graph_compiler_ia32.cc (revision 28233)
+++ runtime/vm/flow_graph_compiler_ia32.cc (working copy)
@@ -663,9 +663,12 @@
ASSERT(token_pos >= 0);
ASSERT(!dst_type.IsNull());
ASSERT(dst_type.IsFinalized());
- // Assignable check is skipped in FlowGraphBuilder, not here.
- ASSERT(dst_type.IsMalformed() || dst_type.IsMalbounded() ||
- (!dst_type.IsDynamicType() && !dst_type.IsObjectType()));
+ // Assignable check is skipped in FlowGraphBuilder, when possible.
+ // The optimizer may have instantiated dst_type to dynamic or Object.
+ if (!dst_type.IsMalformed() && !dst_type.IsMalbounded() &&
+ (dst_type.IsDynamicType() || dst_type.IsObjectType())) {
+ return;
+ }
srdjan 2013/10/03 18:00:09 This elimination belongs in AssertAssignableInstr:
regis 2013/10/03 18:20:53 Done.
__ pushl(ECX); // Store instantiator.
__ pushl(EDX); // Store instantiator type arguments.
// A null object is always assignable and is returned as result.
« no previous file with comments | « no previous file | tests/co19/co19-runtime.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698