OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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/isolate.h" | 5 #include "vm/isolate.h" |
6 | 6 |
7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
8 | 8 |
9 #include "vm/assert.h" | 9 #include "vm/assert.h" |
10 #include "vm/bigint_store.h" | 10 #include "vm/bigint_store.h" |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 void Isolate::PrintInvokedFunctions() { | 164 void Isolate::PrintInvokedFunctions() { |
165 Zone zone; | 165 Zone zone; |
166 HandleScope handle_scope; | 166 HandleScope handle_scope; |
167 Library& library = Library::Handle(); | 167 Library& library = Library::Handle(); |
168 library = object_store()->registered_libraries(); | 168 library = object_store()->registered_libraries(); |
169 GrowableArray<const Function*> invoked_functions; | 169 GrowableArray<const Function*> invoked_functions; |
170 while (!library.IsNull()) { | 170 while (!library.IsNull()) { |
171 Class& cls = Class::Handle(); | 171 Class& cls = Class::Handle(); |
172 ClassDictionaryIterator iter(library); | 172 ClassDictionaryIterator iter(library); |
173 while (iter.HasNext()) { | 173 while (iter.HasNext()) { |
174 cls = iter.GetNext(); | 174 cls = iter.GetNextClass(); |
175 const Array& functions = Array::Handle(cls.functions()); | 175 const Array& functions = Array::Handle(cls.functions()); |
176 for (int j = 0; j < functions.Length(); j++) { | 176 for (int j = 0; j < functions.Length(); j++) { |
177 Function& function = Function::Handle(); | 177 Function& function = Function::Handle(); |
178 function ^= functions.At(j); | 178 function ^= functions.At(j); |
179 if (function.invocation_counter() > 0) { | 179 if (function.invocation_counter() > 0) { |
180 invoked_functions.Add(&function); | 180 invoked_functions.Add(&function); |
181 } | 181 } |
182 } | 182 } |
183 } | 183 } |
184 library = library.next_registered(); | 184 library = library.next_registered(); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 // Visit all objects in the code index table. | 279 // Visit all objects in the code index table. |
280 if (code_index_table() != NULL) { | 280 if (code_index_table() != NULL) { |
281 code_index_table()->VisitObjectPointers(visitor); | 281 code_index_table()->VisitObjectPointers(visitor); |
282 } | 282 } |
283 | 283 |
284 // Visit the top context which is stored in the isolate. | 284 // Visit the top context which is stored in the isolate. |
285 visitor->VisitPointer(reinterpret_cast<RawObject**>(&top_context_)); | 285 visitor->VisitPointer(reinterpret_cast<RawObject**>(&top_context_)); |
286 } | 286 } |
287 | 287 |
288 } // namespace dart | 288 } // namespace dart |
OLD | NEW |