OLD | NEW |
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/isolate.h" | 5 #include "vm/isolate.h" |
6 | 6 |
7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
9 #include "platform/json.h" | 9 #include "platform/json.h" |
10 #include "lib/mirrors.h" | 10 #include "lib/mirrors.h" |
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
961 ASSERT(!error.IsNull()); | 961 ASSERT(!error.IsNull()); |
962 jsobj.AddProperty("error", error, false); | 962 jsobj.AddProperty("error", error, false); |
963 } | 963 } |
964 | 964 |
965 { | 965 { |
966 JSONObject typeargsRef(&jsobj, "canonicalTypeArguments"); | 966 JSONObject typeargsRef(&jsobj, "canonicalTypeArguments"); |
967 typeargsRef.AddProperty("type", "@TypeArgumentsList"); | 967 typeargsRef.AddProperty("type", "@TypeArgumentsList"); |
968 typeargsRef.AddProperty("id", "typearguments"); | 968 typeargsRef.AddProperty("id", "typearguments"); |
969 typeargsRef.AddProperty("name", "canonical type arguments"); | 969 typeargsRef.AddProperty("name", "canonical type arguments"); |
970 } | 970 } |
| 971 { |
| 972 const GrowableObjectArray& libs = |
| 973 GrowableObjectArray::Handle(object_store()->libraries()); |
| 974 intptr_t num_libs = libs.Length(); |
| 975 Library &lib = Library::Handle(); |
| 976 |
| 977 JSONArray lib_array(&jsobj, "libraries"); |
| 978 for (intptr_t i = 0; i < num_libs; i++) { |
| 979 lib ^= libs.At(i); |
| 980 ASSERT(!lib.IsNull()); |
| 981 lib_array.AddValue(lib); |
| 982 } |
| 983 } |
971 } | 984 } |
972 | 985 |
973 | 986 |
974 void Isolate::ProfileInterrupt() { | 987 void Isolate::ProfileInterrupt() { |
975 InterruptableThreadState* state = thread_state(); | 988 InterruptableThreadState* state = thread_state(); |
976 if (state == NULL) { | 989 if (state == NULL) { |
977 // Isolate is not scheduled on a thread. | 990 // Isolate is not scheduled on a thread. |
978 ProfileIdle(); | 991 ProfileIdle(); |
979 return; | 992 return; |
980 } | 993 } |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1168 return func.raw(); | 1181 return func.raw(); |
1169 } | 1182 } |
1170 | 1183 |
1171 | 1184 |
1172 void IsolateSpawnState::Cleanup() { | 1185 void IsolateSpawnState::Cleanup() { |
1173 SwitchIsolateScope switch_scope(isolate()); | 1186 SwitchIsolateScope switch_scope(isolate()); |
1174 Dart::ShutdownIsolate(); | 1187 Dart::ShutdownIsolate(); |
1175 } | 1188 } |
1176 | 1189 |
1177 } // namespace dart | 1190 } // namespace dart |
OLD | NEW |