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 "include/dart_debugger_api.h" | 5 #include "include/dart_debugger_api.h" |
6 | 6 |
7 #include "vm/dart_api_impl.h" | 7 #include "vm/dart_api_impl.h" |
8 #include "vm/dart_api_state.h" | 8 #include "vm/dart_api_state.h" |
9 #include "vm/debugger.h" | 9 #include "vm/debugger.h" |
10 #include "vm/isolate.h" | 10 #include "vm/isolate.h" |
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
625 ASSERT(!imported.IsNull()); | 625 ASSERT(!imported.IsNull()); |
626 ASSERT(Smi::IsValid(imported.index())); | 626 ASSERT(Smi::IsValid(imported.index())); |
627 import_list.Add(Smi::Handle(Smi::New(imported.index()))); | 627 import_list.Add(Smi::Handle(Smi::New(imported.index()))); |
628 } | 628 } |
629 LibraryPrefixIterator it(lib); | 629 LibraryPrefixIterator it(lib); |
630 LibraryPrefix& prefix = LibraryPrefix::Handle(isolate); | 630 LibraryPrefix& prefix = LibraryPrefix::Handle(isolate); |
631 while (it.HasNext()) { | 631 while (it.HasNext()) { |
632 prefix = it.GetNext(); | 632 prefix = it.GetNext(); |
633 prefix_name = prefix.name(); | 633 prefix_name = prefix.name(); |
634 ASSERT(!prefix_name.IsNull()); | 634 ASSERT(!prefix_name.IsNull()); |
635 prefix_name = String::Concat(prefix_name, | 635 prefix_name = String::Concat(prefix_name, Symbols::Dot()); |
636 String::Handle(isolate, Symbols::Dot())); | |
637 for (int i = 0; i < prefix.num_imports(); i++) { | 636 for (int i = 0; i < prefix.num_imports(); i++) { |
638 imported = prefix.GetLibrary(i); | 637 imported = prefix.GetLibrary(i); |
639 import_list.Add(prefix_name); | 638 import_list.Add(prefix_name); |
640 import_list.Add(Smi::Handle(Smi::New(imported.index()))); | 639 import_list.Add(Smi::Handle(Smi::New(imported.index()))); |
641 } | 640 } |
642 } | 641 } |
643 return Api::NewHandle(isolate, Array::MakeArray(import_list)); | 642 return Api::NewHandle(isolate, Array::MakeArray(import_list)); |
644 } | 643 } |
645 | 644 |
646 | 645 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
710 return Api::True(isolate); | 709 return Api::True(isolate); |
711 } | 710 } |
712 | 711 |
713 | 712 |
714 DART_EXPORT Dart_Isolate Dart_GetIsolate(Dart_IsolateId isolate_id) { | 713 DART_EXPORT Dart_Isolate Dart_GetIsolate(Dart_IsolateId isolate_id) { |
715 Isolate* isolate = PortMap::GetIsolate(isolate_id); | 714 Isolate* isolate = PortMap::GetIsolate(isolate_id); |
716 return Api::CastIsolate(isolate); | 715 return Api::CastIsolate(isolate); |
717 } | 716 } |
718 | 717 |
719 } // namespace dart | 718 } // namespace dart |
OLD | NEW |