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

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

Issue 3010543002: Rename the class "KernelReader" to "KernelLoader". (Closed)
Patch Set: Fix names in few places Created 3 years, 3 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
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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_reload.h" 5 #include "vm/isolate_reload.h"
6 6
7 #include "vm/become.h" 7 #include "vm/become.h"
8 #include "vm/bit_vector.h" 8 #include "vm/bit_vector.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/dart_api_impl.h" 10 #include "vm/dart_api_impl.h"
11 #include "vm/hash_table.h" 11 #include "vm/hash_table.h"
12 #include "vm/isolate.h" 12 #include "vm/isolate.h"
13 #include "vm/kernel_reader.h" 13 #include "vm/kernel_loader.h"
14 #include "vm/log.h" 14 #include "vm/log.h"
15 #include "vm/object.h" 15 #include "vm/object.h"
16 #include "vm/object_store.h" 16 #include "vm/object_store.h"
17 #include "vm/parser.h" 17 #include "vm/parser.h"
18 #include "vm/runtime_entry.h" 18 #include "vm/runtime_entry.h"
19 #include "vm/safepoint.h" 19 #include "vm/safepoint.h"
20 #include "vm/service_event.h" 20 #include "vm/service_event.h"
21 #include "vm/stack_frame.h" 21 #include "vm/stack_frame.h"
22 #include "vm/thread.h" 22 #include "vm/thread.h"
23 #include "vm/timeline.h" 23 #include "vm/timeline.h"
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 intptr_t data_len = 0; 563 intptr_t data_len = 0;
564 Dart_TypedData_Type data_type; 564 Dart_TypedData_Type data_type;
565 ASSERT(Dart_IsTypedData(retval)); 565 ASSERT(Dart_IsTypedData(retval));
566 Dart_Handle val = Dart_TypedDataAcquireData( 566 Dart_Handle val = Dart_TypedDataAcquireData(
567 retval, &data_type, reinterpret_cast<void**>(&data), &data_len); 567 retval, &data_type, reinterpret_cast<void**>(&data), &data_len);
568 ASSERT(!Dart_IsError(val)); 568 ASSERT(!Dart_IsError(val));
569 ASSERT(data_type == Dart_TypedData_kUint64); 569 ASSERT(data_type == Dart_TypedData_kUint64);
570 ASSERT(data_len == 1); 570 ASSERT(data_len == 1);
571 kernel_program = reinterpret_cast<kernel::Program*>(data); 571 kernel_program = reinterpret_cast<kernel::Program*>(data);
572 Dart_TypedDataReleaseData(retval); 572 Dart_TypedDataReleaseData(retval);
573 kernel::KernelReader reader(kernel_program); 573 kernel::KernelLoader loader(kernel_program);
574 reader.FindModifiedLibraries(I, modified_libs_, force_reload); 574 loader.FindModifiedLibraries(I, modified_libs_, force_reload);
575 } 575 }
576 } 576 }
577 if (result.IsError()) { 577 if (result.IsError()) {
578 TIR_Print("---- LOAD FAILED, ABORTING RELOAD\n"); 578 TIR_Print("---- LOAD FAILED, ABORTING RELOAD\n");
579 AddReasonForCancelling(new Aborted(zone_, ApiError::Cast(result))); 579 AddReasonForCancelling(new Aborted(zone_, ApiError::Cast(result)));
580 ReportReasonsForCancelling(); 580 ReportReasonsForCancelling();
581 CommonFinalizeTail(); 581 CommonFinalizeTail();
582 return; 582 return;
583 } 583 }
584 TIR_Print("---- EXITED TAG HANDLER\n"); 584 TIR_Print("---- EXITED TAG HANDLER\n");
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 // 5) Dart_FinalizeLoading invokes Dart code related to deferred libraries. 635 // 5) Dart_FinalizeLoading invokes Dart code related to deferred libraries.
636 // 6) The tag handler returns and we move on. 636 // 6) The tag handler returns and we move on.
637 // 637 //
638 // Even after a successful reload the Dart code invoked in (5) can result 638 // Even after a successful reload the Dart code invoked in (5) can result
639 // in an Unwind error or an UnhandledException error. This error will be 639 // in an Unwind error or an UnhandledException error. This error will be
640 // returned by the tag handler. The tag handler can return other errors, 640 // returned by the tag handler. The tag handler can return other errors,
641 // for example, top level parse errors. We want to capture these errors while 641 // for example, top level parse errors. We want to capture these errors while
642 // propagating the UnwindError or an UnhandledException error. 642 // propagating the UnwindError or an UnhandledException error.
643 643
644 if (isolate()->use_dart_frontend()) { 644 if (isolate()->use_dart_frontend()) {
645 // Read the kernel program. 645 // Load the kernel program.
646 kernel::KernelReader reader(kernel_program); 646 kernel::KernelLoader loader(kernel_program);
647 const Object& tmp = reader.ReadProgram(); 647 const Object& tmp = loader.LoadProgram();
648 if (!tmp.IsError()) { 648 if (!tmp.IsError()) {
649 Library& lib = Library::Handle(thread->zone()); 649 Library& lib = Library::Handle(thread->zone());
650 lib ^= tmp.raw(); 650 lib ^= tmp.raw();
651 isolate()->object_store()->set_root_library(lib); 651 isolate()->object_store()->set_root_library(lib);
652 FinalizeLoading(); 652 FinalizeLoading();
653 result = Object::null(); 653 result = Object::null();
654 } else { 654 } else {
655 result = tmp.raw(); 655 result = tmp.raw();
656 } 656 }
657 } else { 657 } else {
(...skipping 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after
1882 ASSERT(!super_cls.IsNull()); 1882 ASSERT(!super_cls.IsNull());
1883 super_cls.AddDirectSubclass(cls); 1883 super_cls.AddDirectSubclass(cls);
1884 } 1884 }
1885 } 1885 }
1886 } 1886 }
1887 } 1887 }
1888 1888
1889 #endif // !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME) 1889 #endif // !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
1890 1890
1891 } // namespace dart 1891 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/kernel.h » ('j') | runtime/vm/vm_sources.gni » ('J')

Powered by Google App Engine
This is Rietveld 408576698