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/service.h" | 5 #include "vm/service.h" |
6 | 6 |
7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
8 | 8 |
9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
10 #include "vm/coverage.h" | 10 #include "vm/coverage.h" |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 const String& url_str = String::Handle(Symbols::DartVMService().raw()); | 290 const String& url_str = String::Handle(Symbols::DartVMService().raw()); |
291 library ^= Library::LookupLibrary(url_str); | 291 library ^= Library::LookupLibrary(url_str); |
292 ASSERT(library.IsNull()); | 292 ASSERT(library.IsNull()); |
293 // Setup library. | 293 // Setup library. |
294 library = Library::New(url_str); | 294 library = Library::New(url_str); |
295 library.Register(); | 295 library.Register(); |
296 const Script& script = Script::Handle( | 296 const Script& script = Script::Handle( |
297 isolate, Script::New(url_str, source_str, RawScript::kLibraryTag)); | 297 isolate, Script::New(url_str, source_str, RawScript::kLibraryTag)); |
298 library.SetLoadInProgress(); | 298 library.SetLoadInProgress(); |
299 Dart_EnterScope(); // Need to enter scope for tag handler. | 299 Dart_EnterScope(); // Need to enter scope for tag handler. |
300 const Error& error = Error::Handle(isolate, | 300 { |
301 Compiler::Compile(library, script)); | 301 NativeToVmTimerScope timer(isolate); |
302 ASSERT(error.IsNull()); | 302 const Error& error = Error::Handle(isolate, |
| 303 Compiler::Compile(library, script)); |
| 304 ASSERT(error.IsNull()); |
| 305 } |
303 Dart_ExitScope(); | 306 Dart_ExitScope(); |
304 library.SetLoaded(); | 307 library.SetLoaded(); |
305 // Install embedder default library tag handler again. | 308 // Install embedder default library tag handler again. |
306 isolate->set_library_tag_handler(default_handler_); | 309 isolate->set_library_tag_handler(default_handler_); |
307 default_handler_ = NULL; | 310 default_handler_ = NULL; |
308 library.set_native_entry_resolver(VmServiceNativeResolver); | 311 library.set_native_entry_resolver(VmServiceNativeResolver); |
309 } | 312 } |
310 { | 313 { |
311 // Boot the dart:vmservice library. | 314 // Boot the dart:vmservice library. |
312 Dart_EnterScope(); | 315 Dart_EnterScope(); |
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1308 while (current != NULL) { | 1311 while (current != NULL) { |
1309 if (!strcmp(name, current->name())) { | 1312 if (!strcmp(name, current->name())) { |
1310 return current; | 1313 return current; |
1311 } | 1314 } |
1312 current = current->next(); | 1315 current = current->next(); |
1313 } | 1316 } |
1314 return NULL; | 1317 return NULL; |
1315 } | 1318 } |
1316 | 1319 |
1317 } // namespace dart | 1320 } // namespace dart |
OLD | NEW |