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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 246293008: Do not ignore side effects of a type test or type cast as expression, such (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 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/flow_graph_builder.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.cc
===================================================================
--- runtime/vm/intermediate_language.cc (revision 35282)
+++ runtime/vm/intermediate_language.cc (working copy)
@@ -34,7 +34,6 @@
DECLARE_FLAG(bool, trace_optimization);
DECLARE_FLAG(bool, trace_constant_propagation);
DECLARE_FLAG(bool, throw_on_javascript_int_overflow);
-DECLARE_FLAG(bool, enable_type_checks);
Definition::Definition()
: range_(NULL),
@@ -1524,10 +1523,11 @@
constant_type_args->value().IsTypeArguments()) {
const TypeArguments& instantiator_type_args =
TypeArguments::Cast(constant_type_args->value());
+ Error& bound_error = Error::Handle();
const AbstractType& new_dst_type = AbstractType::Handle(
- dst_type().InstantiateFrom(instantiator_type_args, NULL));
+ dst_type().InstantiateFrom(instantiator_type_args, &bound_error));
// If dst_type is instantiated to dynamic or Object, skip the test.
- if (!new_dst_type.IsMalformedOrMalbounded() &&
+ if (!new_dst_type.IsMalformedOrMalbounded() && bound_error.IsNull() &&
(new_dst_type.IsDynamicType() || new_dst_type.IsObjectType())) {
return value()->definition();
}
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698