| OLD | NEW |
| 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 "vm/class_finalizer.h" | 5 #include "vm/class_finalizer.h" |
| 6 | 6 |
| 7 #include "vm/flags.h" | 7 #include "vm/flags.h" |
| 8 #include "vm/heap.h" | 8 #include "vm/heap.h" |
| 9 #include "vm/isolate.h" | 9 #include "vm/isolate.h" |
| 10 #include "vm/longjump.h" | 10 #include "vm/longjump.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 108 |
| 109 // Class finalization occurs: | 109 // Class finalization occurs: |
| 110 // a) when bootstrap process completes (VerifyBootstrapClasses). | 110 // a) when bootstrap process completes (VerifyBootstrapClasses). |
| 111 // b) after the user classes are loaded (dart_api). | 111 // b) after the user classes are loaded (dart_api). |
| 112 bool ClassFinalizer::FinalizePendingClasses() { | 112 bool ClassFinalizer::FinalizePendingClasses() { |
| 113 bool retval = true; | 113 bool retval = true; |
| 114 Isolate* isolate = Isolate::Current(); | 114 Isolate* isolate = Isolate::Current(); |
| 115 ASSERT(isolate != NULL); | 115 ASSERT(isolate != NULL); |
| 116 HANDLESCOPE(isolate); | 116 HANDLESCOPE(isolate); |
| 117 ObjectStore* object_store = isolate->object_store(); | 117 ObjectStore* object_store = isolate->object_store(); |
| 118 const Error& error = Error::Handle(object_store->sticky_error()); | 118 const Error& error = Error::Handle(isolate, object_store->sticky_error()); |
| 119 if (!error.IsNull()) { | 119 if (!error.IsNull()) { |
| 120 return false; | 120 return false; |
| 121 } | 121 } |
| 122 if (AllClassesFinalized()) { | 122 if (AllClassesFinalized()) { |
| 123 return true; | 123 return true; |
| 124 } | 124 } |
| 125 | 125 |
| 126 GrowableArray<intptr_t> added_subclasses_to_cids; | 126 GrowableArray<intptr_t> added_subclasses_to_cids; |
| 127 LongJump* base = isolate->long_jump_base(); | 127 LongJump* base = isolate->long_jump_base(); |
| 128 LongJump jump; | 128 LongJump jump; |
| (...skipping 1862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1991 expected_name ^= String::New("_offset"); | 1991 expected_name ^= String::New("_offset"); |
| 1992 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); | 1992 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); |
| 1993 field ^= fields_array.At(2); | 1993 field ^= fields_array.At(2); |
| 1994 ASSERT(field.Offset() == TypedDataView::length_offset()); | 1994 ASSERT(field.Offset() == TypedDataView::length_offset()); |
| 1995 name ^= field.name(); | 1995 name ^= field.name(); |
| 1996 ASSERT(name.Equals("length")); | 1996 ASSERT(name.Equals("length")); |
| 1997 #endif | 1997 #endif |
| 1998 } | 1998 } |
| 1999 | 1999 |
| 2000 } // namespace dart | 2000 } // namespace dart |
| OLD | NEW |