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

Unified Diff: runtime/vm/class_finalizer.cc

Issue 10143004: Map malformed function result type and malformed function parameter type to (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | « no previous file | runtime/vm/code_generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/class_finalizer.cc
===================================================================
--- runtime/vm/class_finalizer.cc (revision 6776)
+++ runtime/vm/class_finalizer.cc (working copy)
@@ -750,6 +750,10 @@
}
ResolveType(cls, type, result_finalization);
type = FinalizeType(cls, type, result_finalization);
+ // In production mode, a malformed result type is mapped to Dynamic.
+ if (!FLAG_enable_type_checks && type.IsMalformed()) {
+ type = Type::DynamicType();
+ }
function.set_result_type(type);
// Resolve formal parameter types.
const intptr_t num_parameters = function.NumberOfParameters();
@@ -757,6 +761,10 @@
type = function.ParameterTypeAt(i);
ResolveType(cls, type, kFinalize);
type = FinalizeType(cls, type, kFinalize);
+ // In production mode, a malformed parameter type is mapped to Dynamic.
+ if (!FLAG_enable_type_checks && type.IsMalformed()) {
+ type = Type::DynamicType();
+ }
function.SetParameterTypeAt(i, type);
}
}
« no previous file with comments | « no previous file | runtime/vm/code_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698