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

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

Issue 2105023007: More live edit timeline events. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/isolate_reload.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "vm/class_finalizer.h" 5 #include "vm/class_finalizer.h"
6 6
7 #include "vm/code_generator.h" 7 #include "vm/code_generator.h"
8 #include "vm/flags.h" 8 #include "vm/flags.h"
9 #include "vm/heap.h" 9 #include "vm/heap.h"
10 #include "vm/isolate.h" 10 #include "vm/isolate.h"
11 #include "vm/longjump.h" 11 #include "vm/longjump.h"
12 #include "vm/log.h" 12 #include "vm/log.h"
13 #include "vm/object_store.h" 13 #include "vm/object_store.h"
14 #include "vm/symbols.h" 14 #include "vm/symbols.h"
15 #include "vm/timeline.h"
15 16
16 namespace dart { 17 namespace dart {
17 18
18 DEFINE_FLAG(bool, print_classes, false, "Prints details about loaded classes."); 19 DEFINE_FLAG(bool, print_classes, false, "Prints details about loaded classes.");
19 DEFINE_FLAG(bool, reify, true, "Reify type arguments of generic types."); 20 DEFINE_FLAG(bool, reify, true, "Reify type arguments of generic types.");
20 DEFINE_FLAG(bool, trace_class_finalization, false, "Trace class finalization."); 21 DEFINE_FLAG(bool, trace_class_finalization, false, "Trace class finalization.");
21 DEFINE_FLAG(bool, trace_type_finalization, false, "Trace type finalization."); 22 DEFINE_FLAG(bool, trace_type_finalization, false, "Trace type finalization.");
22 23
23 24
24 bool ClassFinalizer::AllClassesFinalized() { 25 bool ClassFinalizer::AllClassesFinalized() {
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 cids->Add(ifc.id()); 112 cids->Add(ifc.id());
112 } 113 }
113 } 114 }
114 115
115 116
116 // Processing ObjectStore::pending_classes_ occurs: 117 // Processing ObjectStore::pending_classes_ occurs:
117 // a) when bootstrap process completes (VerifyBootstrapClasses). 118 // a) when bootstrap process completes (VerifyBootstrapClasses).
118 // b) after the user classes are loaded (dart_api). 119 // b) after the user classes are loaded (dart_api).
119 bool ClassFinalizer::ProcessPendingClasses() { 120 bool ClassFinalizer::ProcessPendingClasses() {
120 Thread* thread = Thread::Current(); 121 Thread* thread = Thread::Current();
122 NOT_IN_PRODUCT(TimelineDurationScope tds(thread, Timeline::GetIsolateStream(),
123 "ProcessPendingClasses"));
121 Isolate* isolate = thread->isolate(); 124 Isolate* isolate = thread->isolate();
122 ASSERT(isolate != NULL); 125 ASSERT(isolate != NULL);
123 HANDLESCOPE(thread); 126 HANDLESCOPE(thread);
124 ObjectStore* object_store = isolate->object_store(); 127 ObjectStore* object_store = isolate->object_store();
125 const Error& error = Error::Handle(thread->zone(), thread->sticky_error()); 128 const Error& error = Error::Handle(thread->zone(), thread->sticky_error());
126 if (!error.IsNull()) { 129 if (!error.IsNull()) {
127 return false; 130 return false;
128 } 131 }
129 if (AllClassesFinalized()) { 132 if (AllClassesFinalized()) {
130 return true; 133 return true;
(...skipping 3190 matching lines...) Expand 10 before | Expand all | Expand 10 after
3321 ASSERT(fields_array.Length() == ByteBuffer::NumberOfFields()); 3324 ASSERT(fields_array.Length() == ByteBuffer::NumberOfFields());
3322 field ^= fields_array.At(0); 3325 field ^= fields_array.At(0);
3323 ASSERT(field.Offset() == ByteBuffer::data_offset()); 3326 ASSERT(field.Offset() == ByteBuffer::data_offset());
3324 name ^= field.name(); 3327 name ^= field.name();
3325 expected_name ^= String::New("_data"); 3328 expected_name ^= String::New("_data");
3326 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); 3329 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name));
3327 #endif 3330 #endif
3328 } 3331 }
3329 3332
3330 } // namespace dart 3333 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/isolate_reload.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698