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

Side by Side Diff: runtime/vm/dart_api_impl.cc

Issue 81333003: Do not eagerly finalize classes in CHA, instead regard unfinalized classes as ’non-existent’ an… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "include/dart_api.h" 5 #include "include/dart_api.h"
6 #include "include/dart_mirrors_api.h" 6 #include "include/dart_mirrors_api.h"
7 #include "include/dart_native_api.h" 7 #include "include/dart_native_api.h"
8 8
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "vm/bigint_operations.h" 10 #include "vm/bigint_operations.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 object)); 153 object));
154 return reinterpret_cast<FinalizablePersistentHandle*>(object); 154 return reinterpret_cast<FinalizablePersistentHandle*>(object);
155 } 155 }
156 156
157 157
158 Dart_Handle Api::CheckIsolateState(Isolate* isolate) { 158 Dart_Handle Api::CheckIsolateState(Isolate* isolate) {
159 if (!isolate->AllowClassFinalization()) { 159 if (!isolate->AllowClassFinalization()) {
160 // Class finalization is blocked for the isolate. Do nothing. 160 // Class finalization is blocked for the isolate. Do nothing.
161 return Api::Success(); 161 return Api::Success();
162 } 162 }
163 if (ClassFinalizer::FinalizePendingClasses()) { 163 if (ClassFinalizer::FinalizeTypeHierarchy()) {
164 return Api::Success(); 164 return Api::Success();
165 } 165 }
166 ASSERT(isolate->object_store()->sticky_error() != Object::null()); 166 ASSERT(isolate->object_store()->sticky_error() != Object::null());
167 return Api::NewHandle(isolate, isolate->object_store()->sticky_error()); 167 return Api::NewHandle(isolate, isolate->object_store()->sticky_error());
168 } 168 }
169 169
170 170
171 Dart_Isolate Api::CastIsolate(Isolate* isolate) { 171 Dart_Isolate Api::CastIsolate(Isolate* isolate) {
172 return reinterpret_cast<Dart_Isolate>(isolate); 172 return reinterpret_cast<Dart_Isolate>(isolate);
173 } 173 }
(...skipping 4269 matching lines...) Expand 10 before | Expand all | Expand 10 after
4443 } 4443 }
4444 { 4444 {
4445 NoGCScope no_gc; 4445 NoGCScope no_gc;
4446 RawObject* raw_obj = obj.raw(); 4446 RawObject* raw_obj = obj.raw();
4447 isolate->heap()->SetPeer(raw_obj, peer); 4447 isolate->heap()->SetPeer(raw_obj, peer);
4448 } 4448 }
4449 return Api::Success(); 4449 return Api::Success();
4450 } 4450 }
4451 4451
4452 } // namespace dart 4452 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698