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

Unified Diff: runtime/vm/class_finalizer.cc

Issue 10693071: Use VM type cast and save handles. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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/benchmark_test.cc ('k') | 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 9315)
+++ runtime/vm/class_finalizer.cc (working copy)
@@ -496,9 +496,7 @@
Class::Handle(ResolveClass(cls, unresolved_class));
// Replace unresolved class with resolved type class.
- ASSERT(type.IsType());
- Type& parameterized_type = Type::Handle();
- parameterized_type ^= type.raw();
+ const Type& parameterized_type = Type::Cast(type);
if (!type_class.IsNull()) {
parameterized_type.set_type_class(Object::Handle(type_class.raw()));
} else {
@@ -624,8 +622,7 @@
}
if (type.IsTypeParameter()) {
- TypeParameter& type_parameter = TypeParameter::Handle();
- type_parameter ^= type.raw();
+ const TypeParameter& type_parameter = TypeParameter::Cast(type);
const Class& parameterized_class =
Class::Handle(type_parameter.parameterized_class());
ASSERT(!parameterized_class.IsNull());
@@ -643,8 +640,7 @@
}
// At this point, we can only have a parameterized_type.
- Type& parameterized_type = Type::Handle();
- parameterized_type ^= type.raw();
+ const Type& parameterized_type = Type::Cast(type);
if (parameterized_type.IsBeingFinalized()) {
// Self reference detected. The type is malformed.
« no previous file with comments | « runtime/vm/benchmark_test.cc ('k') | runtime/vm/code_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698