Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(326)

Side by Side Diff: runtime/vm/bootstrap.cc

Issue 2931813002: [kernel] Stream kernel_reader (Closed)
Patch Set: Feedback Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/kernel/lib/binary/ast_to_binary.dart ('k') | runtime/vm/bootstrap_nocore.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/bootstrap.h" 5 #include "vm/bootstrap.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "vm/bootstrap_natives.h" 9 #include "vm/bootstrap_natives.h"
10 #include "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 String& dart_name = String::Handle(zone); 332 String& dart_name = String::Handle(zone);
333 for (intptr_t i = 0; i < kBootstrapLibraryCount; ++i) { 333 for (intptr_t i = 0; i < kBootstrapLibraryCount; ++i) {
334 ObjectStore::BootstrapLibraryId id = bootstrap_libraries[i].index; 334 ObjectStore::BootstrapLibraryId id = bootstrap_libraries[i].index;
335 library = isolate->object_store()->bootstrap_library(id); 335 library = isolate->object_store()->bootstrap_library(id);
336 dart_name = library.url(); 336 dart_name = library.url();
337 for (intptr_t j = 0; j < program->libraries().length(); ++j) { 337 for (intptr_t j = 0; j < program->libraries().length(); ++j) {
338 kernel::Library* kernel_library = program->libraries()[j]; 338 kernel::Library* kernel_library = program->libraries()[j];
339 kernel::StringIndex uri_index = kernel_library->import_uri(); 339 kernel::StringIndex uri_index = kernel_library->import_uri();
340 const String& kernel_name = reader.DartSymbol(uri_index); 340 const String& kernel_name = reader.DartSymbol(uri_index);
341 if (kernel_name.Equals(dart_name)) { 341 if (kernel_name.Equals(dart_name)) {
342 reader.ReadLibrary(kernel_library); 342 reader.ReadLibrary(kernel_library->kernel_offset());
343 library.SetLoaded(); 343 library.SetLoaded();
344 break; 344 break;
345 } 345 }
346 } 346 }
347 } 347 }
348 348
349 // Finish bootstrapping, including class finalization. 349 // Finish bootstrapping, including class finalization.
350 Finish(thread, /*from_kernel=*/true); 350 Finish(thread, /*from_kernel=*/true);
351 351
352 // The platform binary may contain other libraries (e.g., dart:_builtin or 352 // The platform binary may contain other libraries (e.g., dart:_builtin or
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 lib.Register(thread); 389 lib.Register(thread);
390 isolate->object_store()->set_bootstrap_library(id, lib); 390 isolate->object_store()->set_bootstrap_library(id, lib);
391 } 391 }
392 } 392 }
393 393
394 return (kernel_program == NULL) ? BootstrapFromSource(thread) 394 return (kernel_program == NULL) ? BootstrapFromSource(thread)
395 : BootstrapFromKernel(thread, kernel_program); 395 : BootstrapFromKernel(thread, kernel_program);
396 } 396 }
397 397
398 } // namespace dart 398 } // namespace dart
OLDNEW
« no previous file with comments | « pkg/kernel/lib/binary/ast_to_binary.dart ('k') | runtime/vm/bootstrap_nocore.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698