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/class_finalizer.h" | 7 #include "vm/class_finalizer.h" |
8 #include "vm/compiler.h" | 8 #include "vm/compiler.h" |
9 #include "vm/dart_api_impl.h" | 9 #include "vm/dart_api_impl.h" |
10 #include "vm/dart_api_state.h" | 10 #include "vm/dart_api_state.h" |
(...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
909 ASSERT(Smi::IsValid(imported.index())); | 909 ASSERT(Smi::IsValid(imported.index())); |
910 import_list.Add(Smi::Handle(Smi::New(imported.index()))); | 910 import_list.Add(Smi::Handle(Smi::New(imported.index()))); |
911 } | 911 } |
912 LibraryPrefixIterator it(lib); | 912 LibraryPrefixIterator it(lib); |
913 LibraryPrefix& prefix = LibraryPrefix::Handle(isolate); | 913 LibraryPrefix& prefix = LibraryPrefix::Handle(isolate); |
914 while (it.HasNext()) { | 914 while (it.HasNext()) { |
915 prefix = it.GetNext(); | 915 prefix = it.GetNext(); |
916 prefix_name = prefix.name(); | 916 prefix_name = prefix.name(); |
917 ASSERT(!prefix_name.IsNull()); | 917 ASSERT(!prefix_name.IsNull()); |
918 prefix_name = String::Concat(prefix_name, Symbols::Dot()); | 918 prefix_name = String::Concat(prefix_name, Symbols::Dot()); |
919 for (int i = 0; i < prefix.num_imports(); i++) { | 919 for (int32_t i = 0; i < prefix.num_imports(); i++) { |
920 imported = prefix.GetLibrary(i); | 920 imported = prefix.GetLibrary(i); |
921 import_list.Add(prefix_name); | 921 import_list.Add(prefix_name); |
922 import_list.Add(Smi::Handle(Smi::New(imported.index()))); | 922 import_list.Add(Smi::Handle(Smi::New(imported.index()))); |
923 } | 923 } |
924 } | 924 } |
925 return Api::NewHandle(isolate, Array::MakeArray(import_list)); | 925 return Api::NewHandle(isolate, Array::MakeArray(import_list)); |
926 } | 926 } |
927 | 927 |
928 | 928 |
929 DART_EXPORT Dart_Handle Dart_GetLibraryURL(intptr_t library_id) { | 929 DART_EXPORT Dart_Handle Dart_GetLibraryURL(intptr_t library_id) { |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
975 return Api::CastIsolate(isolate); | 975 return Api::CastIsolate(isolate); |
976 } | 976 } |
977 | 977 |
978 | 978 |
979 DART_EXPORT Dart_IsolateId Dart_GetIsolateId(Dart_Isolate dart_isolate) { | 979 DART_EXPORT Dart_IsolateId Dart_GetIsolateId(Dart_Isolate dart_isolate) { |
980 Isolate* isolate = reinterpret_cast<Isolate*>(dart_isolate); | 980 Isolate* isolate = reinterpret_cast<Isolate*>(dart_isolate); |
981 return isolate->debugger()->GetIsolateId(); | 981 return isolate->debugger()->GetIsolateId(); |
982 } | 982 } |
983 | 983 |
984 } // namespace dart | 984 } // namespace dart |
OLD | NEW |