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

Unified Diff: dart/runtime/vm/class_finalizer.cc

Issue 119673004: Version 1.1.0-dev.5.2 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 11 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 | « dart/runtime/vm/class_finalizer.h ('k') | dart/runtime/vm/code_descriptors_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/runtime/vm/class_finalizer.cc
===================================================================
--- dart/runtime/vm/class_finalizer.cc (revision 31530)
+++ dart/runtime/vm/class_finalizer.cc (working copy)
@@ -121,9 +121,7 @@
return true;
}
- LongJump* base = isolate->long_jump_base();
- LongJump jump;
- isolate->set_long_jump_base(&jump);
+ LongJumpScope jump;
if (setjmp(*jump.Set()) == 0) {
GrowableObjectArray& class_array = GrowableObjectArray::Handle();
class_array = object_store->pending_classes();
@@ -153,7 +151,6 @@
} else {
retval = false;
}
- isolate->set_long_jump_base(base);
return retval;
}
@@ -320,7 +317,7 @@
OS::Print("Resolving redirecting factory: %s\n",
String::Handle(factory.name()).ToCString());
}
- ResolveType(cls, type, kCanonicalize);
+ ResolveType(cls, type);
type ^= FinalizeType(cls, type, kCanonicalize);
factory.SetRedirectionType(type);
if (type.IsMalformedOrMalbounded()) {
@@ -437,9 +434,7 @@
}
-void ClassFinalizer::ResolveType(const Class& cls,
- const AbstractType& type,
- FinalizationKind finalization) {
+void ClassFinalizer::ResolveType(const Class& cls, const AbstractType& type) {
if (type.IsResolved() || type.IsFinalized()) {
return;
}
@@ -485,7 +480,7 @@
AbstractType& type_argument = AbstractType::Handle();
for (intptr_t i = 0; i < num_arguments; i++) {
type_argument = arguments.TypeAt(i);
- ResolveType(cls, type_argument, finalization);
+ ResolveType(cls, type_argument);
}
}
}
@@ -993,7 +988,7 @@
AbstractType& type = AbstractType::Handle(function.result_type());
// It is not a compile time error if this name does not resolve to a class or
// interface.
- ResolveType(cls, type, kCanonicalize);
+ ResolveType(cls, type);
type = FinalizeType(cls, type, kCanonicalize);
// The result type may be malformed or malbounded.
function.set_result_type(type);
@@ -1001,7 +996,7 @@
const intptr_t num_parameters = function.NumParameters();
for (intptr_t i = 0; i < num_parameters; i++) {
type = function.ParameterTypeAt(i);
- ResolveType(cls, type, kCanonicalize);
+ ResolveType(cls, type);
type = FinalizeType(cls, type, kCanonicalize);
// The parameter type may be malformed or malbounded.
function.SetParameterTypeAt(i, type);
@@ -1070,7 +1065,7 @@
for (intptr_t i = 0; i < num_type_params; i++) {
type_param ^= type_params.TypeAt(i);
bound = type_param.bound();
- ResolveType(cls, bound, kCanonicalize);
+ ResolveType(cls, bound);
}
}
@@ -1130,7 +1125,7 @@
for (intptr_t i = 0; i < num_fields; i++) {
field ^= array.At(i);
type = field.type();
- ResolveType(cls, type, kCanonicalize);
+ ResolveType(cls, type);
type = FinalizeType(cls, type, kCanonicalize);
field.set_type(type);
name = field.name();
@@ -2156,7 +2151,7 @@
const AbstractType& type,
GrowableArray<intptr_t>* visited) {
ASSERT(visited != NULL);
- ResolveType(cls, type, kCanonicalize);
+ ResolveType(cls, type);
if (type.IsType() && !type.IsMalformed()) {
const Class& type_class = Class::Handle(type.type_class());
if (!type_class.is_type_finalized() &&
@@ -2316,7 +2311,7 @@
GrowableObjectArray::Handle(GrowableObjectArray::New());
AbstractType& mixin_super_type =
AbstractType::Handle(mixin_app_type.super_type());
- ResolveType(cls, mixin_super_type, kCanonicalizeWellFormed);
+ ResolveType(cls, mixin_super_type);
ASSERT(mixin_super_type.HasResolvedTypeClass());
// TODO(14453): May need to handle BoundedType here.
ASSERT(mixin_super_type.IsType());
@@ -2331,7 +2326,7 @@
for (intptr_t i = 0; i < depth; i++) {
mixin_type = mixin_app_type.MixinTypeAt(i);
ASSERT(!mixin_type.IsNull());
- ResolveType(cls, mixin_type, kCanonicalizeWellFormed);
+ ResolveType(cls, mixin_type);
ASSERT(mixin_type.HasResolvedTypeClass());
ASSERT(mixin_type.IsType());
CollectTypeArguments(cls, Type::Cast(mixin_type), type_args);
@@ -2446,7 +2441,7 @@
Class& interface_class = Class::Handle();
// Resolve super type. Failures lead to a longjmp.
- ResolveType(cls, super_type, kCanonicalizeWellFormed);
+ ResolveType(cls, super_type);
if (super_type.IsMalformedOrMalbounded()) {
ReportError(Error::Handle(super_type.error()));
}
@@ -2523,7 +2518,7 @@
// Resolve interfaces. Failures lead to a longjmp.
for (intptr_t i = 0; i < super_interfaces.Length(); i++) {
interface ^= super_interfaces.At(i);
- ResolveType(cls, interface, kCanonicalizeWellFormed);
+ ResolveType(cls, interface);
ASSERT(!interface.IsTypeParameter()); // Should be detected by parser.
// A malbounded interface is only reported when involved in a type test.
if (interface.IsMalformed()) {
« no previous file with comments | « dart/runtime/vm/class_finalizer.h ('k') | dart/runtime/vm/code_descriptors_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698