OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/debugger.h" | 5 #include "vm/debugger.h" |
6 | 6 |
7 #include "vm/code_generator.h" | 7 #include "vm/code_generator.h" |
8 #include "vm/code_patcher.h" | 8 #include "vm/code_patcher.h" |
9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
(...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1196 | 1196 |
1197 | 1197 |
1198 RawArray* Debugger::GetGlobalFields(const Library& lib) { | 1198 RawArray* Debugger::GetGlobalFields(const Library& lib) { |
1199 const GrowableObjectArray& field_list = | 1199 const GrowableObjectArray& field_list = |
1200 GrowableObjectArray::Handle(GrowableObjectArray::New(8)); | 1200 GrowableObjectArray::Handle(GrowableObjectArray::New(8)); |
1201 String& prefix_name = String::Handle(isolate_); | 1201 String& prefix_name = String::Handle(isolate_); |
1202 CollectLibraryFields(field_list, lib, prefix_name, true); | 1202 CollectLibraryFields(field_list, lib, prefix_name, true); |
1203 Library& imported = Library::Handle(isolate_); | 1203 Library& imported = Library::Handle(isolate_); |
1204 intptr_t num_imports = lib.num_imports(); | 1204 intptr_t num_imports = lib.num_imports(); |
1205 for (int i = 0; i < num_imports; i++) { | 1205 for (int i = 0; i < num_imports; i++) { |
1206 imported = lib.ImportAt(i); | 1206 imported = lib.ImportLibraryAt(i); |
1207 ASSERT(!imported.IsNull()); | 1207 ASSERT(!imported.IsNull()); |
1208 CollectLibraryFields(field_list, imported, prefix_name, false); | 1208 CollectLibraryFields(field_list, imported, prefix_name, false); |
1209 } | 1209 } |
1210 LibraryPrefix& prefix = LibraryPrefix::Handle(isolate_); | 1210 LibraryPrefix& prefix = LibraryPrefix::Handle(isolate_); |
1211 LibraryPrefixIterator it(lib); | 1211 LibraryPrefixIterator it(lib); |
1212 while (it.HasNext()) { | 1212 while (it.HasNext()) { |
1213 prefix = it.GetNext(); | 1213 prefix = it.GetNext(); |
1214 prefix_name = prefix.name(); | 1214 prefix_name = prefix.name(); |
1215 ASSERT(!prefix_name.IsNull()); | 1215 ASSERT(!prefix_name.IsNull()); |
1216 prefix_name = String::Concat(prefix_name, | 1216 prefix_name = String::Concat(prefix_name, |
1217 String::Handle(isolate_, Symbols::Dot())); | 1217 String::Handle(isolate_, Symbols::Dot())); |
1218 for (int i = 0; i < prefix.num_libs(); i++) { | 1218 for (int i = 0; i < prefix.num_imports(); i++) { |
1219 imported = prefix.GetLibrary(i); | 1219 imported = prefix.GetLibrary(i); |
1220 CollectLibraryFields(field_list, imported, prefix_name, false); | 1220 CollectLibraryFields(field_list, imported, prefix_name, false); |
1221 } | 1221 } |
1222 } | 1222 } |
1223 return Array::MakeArray(field_list); | 1223 return Array::MakeArray(field_list); |
1224 } | 1224 } |
1225 | 1225 |
1226 | 1226 |
1227 void Debugger::VisitObjectPointers(ObjectPointerVisitor* visitor) { | 1227 void Debugger::VisitObjectPointers(ObjectPointerVisitor* visitor) { |
1228 ASSERT(visitor != NULL); | 1228 ASSERT(visitor != NULL); |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1571 } | 1571 } |
1572 | 1572 |
1573 | 1573 |
1574 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 1574 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |
1575 ASSERT(bpt->next() == NULL); | 1575 ASSERT(bpt->next() == NULL); |
1576 bpt->set_next(code_breakpoints_); | 1576 bpt->set_next(code_breakpoints_); |
1577 code_breakpoints_ = bpt; | 1577 code_breakpoints_ = bpt; |
1578 } | 1578 } |
1579 | 1579 |
1580 } // namespace dart | 1580 } // namespace dart |
OLD | NEW |