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

Unified Diff: runtime/vm/parser.cc

Issue 8772009: Address Regis' comments, replace AbstractType with Type where possible. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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
Index: runtime/vm/parser.cc
===================================================================
--- runtime/vm/parser.cc (revision 1988)
+++ runtime/vm/parser.cc (working copy)
@@ -873,11 +873,10 @@
signature_function.set_signature_class(signature_class);
}
ASSERT(signature_function.signature_class() == signature_class.raw());
- AbstractType& signature_type =
- AbstractType::ZoneHandle(signature_class.SignatureType());
+ Type& signature_type = Type::ZoneHandle(signature_class.SignatureType());
if (!is_top_level_ && !signature_type.IsFinalized()) {
String& errmsg = String::Handle();
- signature_type =
+ signature_type ^=
regis 2011/12/01 19:20:43 ^= not necessary if you change ClassFinalizer::Fin
srdjan 2011/12/01 20:04:09 Done.
ClassFinalizer::FinalizeAndCanonicalizeType(signature_type,
&errmsg);
if (!errmsg.IsNull()) {
@@ -2474,10 +2473,10 @@
ASSERT(cls.functions() == Array::Empty());
set_current_class(cls);
ParseTypeParameters(cls);
- AbstractType& super_type = AbstractType::Handle();
+ Type& super_type = Type::Handle();
if (CurrentToken() == Token::kEXTENDS) {
ConsumeToken();
- super_type = ParseType(kCanResolve);
+ super_type ^= ParseType(kCanResolve);
if (super_type.IsInterfaceType()) {
ErrorMsg("class '%s' may implement, but cannot extend interface '%s'",
class_name.ToCString(),
@@ -3729,8 +3728,7 @@
// Patch the function type now that the signature is known.
// We need to create a new type for proper finalization, since the existing
// type is already marked as finalized.
- AbstractType& signature_type =
- AbstractType::Handle(signature_class.SignatureType());
+ Type& signature_type = Type::Handle(signature_class.SignatureType());
const TypeArguments& signature_type_arguments = TypeArguments::Handle(
signature_type.arguments());
@@ -3738,7 +3736,7 @@
// been finalized already.
if (!signature_type.IsFinalized()) {
String& errmsg = String::Handle();
- signature_type =
+ signature_type ^=
regis 2011/12/01 19:20:43 ditto
srdjan 2011/12/01 20:04:09 Done.
ClassFinalizer::FinalizeAndCanonicalizeType(signature_type, &errmsg);
if (!errmsg.IsNull()) {
ErrorMsg(errmsg.ToCString());
@@ -6574,12 +6572,12 @@
}
TypeArguments& type_arguments =
TypeArguments::Handle(ParseTypeArguments(type_resolution));
- AbstractType& type = AbstractType::Handle(
+ Type& type = Type::Handle(
Type::NewParameterizedType(type_class, type_arguments));
if (type_resolution == kMustResolve) {
ASSERT(type_class.IsClass()); // Must be resolved.
String& errmsg = String::Handle();
- type = ClassFinalizer::FinalizeAndCanonicalizeType(type, &errmsg);
+ type ^= ClassFinalizer::FinalizeAndCanonicalizeType(type, &errmsg);
regis 2011/12/01 19:20:43 ditto
srdjan 2011/12/01 20:04:09 Done.
if (!errmsg.IsNull()) {
ErrorMsg(errmsg.ToCString());
}
@@ -7118,10 +7116,10 @@
ASSERT(signature_class.raw() == type_class.raw());
}
// TODO(regis): Temporary type should be allocated in new gen heap.
- AbstractType& type = Type::Handle(
+ Type& type = Type::Handle(
Type::NewParameterizedType(signature_class, type_arguments));
String& errmsg = String::Handle();
- type = ClassFinalizer::FinalizeAndCanonicalizeType(type, &errmsg);
+ type ^= ClassFinalizer::FinalizeAndCanonicalizeType(type, &errmsg);
regis 2011/12/01 19:20:43 ditto
srdjan 2011/12/01 20:04:09 Done.
if (!errmsg.IsNull()) {
ErrorMsg(errmsg.ToCString());
}

Powered by Google App Engine
This is Rietveld 408576698