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

Unified Diff: runtime/vm/parser.cc

Issue 12473002: Complete implementation of bounds checking in the vm, by introducing a vm object (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
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 | « runtime/vm/object_store.h ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
===================================================================
--- runtime/vm/parser.cc (revision 19513)
+++ runtime/vm/parser.cc (working copy)
@@ -3462,7 +3462,7 @@
const Class& anon_mixin_app_class =
Class::Handle(mixin_application_type.type_class());
mixin_application.set_super_type(
- Type::Handle(anon_mixin_app_class.super_type()));
+ AbstractType::Handle(anon_mixin_app_class.super_type()));
mixin_application.set_mixin(Type::Handle(anon_mixin_app_class.mixin()));
const Array& interfaces = Array::Handle(anon_mixin_app_class.interfaces());
mixin_application.set_interfaces(interfaces);
@@ -3471,7 +3471,8 @@
if (CurrentToken() == Token::kIMPLEMENTS) {
Array& interfaces = Array::Handle();
const intptr_t interfaces_pos = TokenPos();
- const Type& super_type = Type::Handle(mixin_application.super_type());
+ Type& super_type = Type::Handle();
+ super_type ^= mixin_application.super_type();
interfaces = ParseInterfaceList(super_type);
AddInterfaces(interfaces_pos, mixin_application, interfaces);
}
@@ -9332,12 +9333,16 @@
if (!redirect_type.IsMalformed() && !redirect_type.IsInstantiated()) {
// The type arguments of the redirection type are instantiated from the
// type arguments of the parsed type of the 'new' or 'const' expression.
- redirect_type ^= redirect_type.InstantiateFrom(type_arguments);
+ Error& malformed_error = Error::Handle();
+ redirect_type ^= redirect_type.InstantiateFrom(type_arguments,
+ &malformed_error);
+ if (!malformed_error.IsNull()) {
+ redirect_type.set_malformed_error(malformed_error);
+ }
}
if (redirect_type.IsMalformed()) {
if (is_const) {
- const Error& error = Error::Handle(redirect_type.malformed_error());
- ErrorMsg(error);
+ ErrorMsg(Error::Handle(redirect_type.malformed_error()));
}
return ThrowTypeError(redirect_type.token_pos(), redirect_type);
}
« no previous file with comments | « runtime/vm/object_store.h ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698