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

Unified Diff: runtime/vm/kernel_reader.h

Issue 2525623002: VM: [Kernel] Split kernel API into 3 steps: ([read binary], parse-binary, bootstrap, load program) (Closed)
Patch Set: addressed comments Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/kernel_reader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/kernel_reader.h
diff --git a/runtime/vm/kernel_reader.h b/runtime/vm/kernel_reader.h
index 60c8de989380bf21f550a61cadb20c259a395aec..f6b4ffda54713e27c66bc0d1a255316cd37414ce 100644
--- a/runtime/vm/kernel_reader.h
+++ b/runtime/vm/kernel_reader.h
@@ -54,21 +54,7 @@ class Mapping {
class KernelReader {
public:
- KernelReader(const uint8_t* buffer, intptr_t len)
- : thread_(dart::Thread::Current()),
- zone_(thread_->zone()),
- isolate_(thread_->isolate()),
- scripts_(Array::ZoneHandle(zone_)),
- program_(NULL),
- translation_helper_(this, thread_, zone_, isolate_),
- type_translator_(&translation_helper_,
- &active_class_,
- /*finalize=*/false),
- buffer_(buffer),
- buffer_length_(len) {}
-
- // Returns either pointer to a program or null.
- Program* ReadPrecompiledProgram();
+ explicit KernelReader(Program* program);
// Returns either a library or a failure object.
dart::Object& ReadProgram();
@@ -112,18 +98,16 @@ class KernelReader {
dart::RawFunction::Kind GetFunctionType(Procedure* kernel_procedure);
+ Program* program_;
+
dart::Thread* thread_;
dart::Zone* zone_;
dart::Isolate* isolate_;
Array& scripts_;
- Program* program_;
ActiveClass active_class_;
BuildingTranslationHelper translation_helper_;
DartTypeTranslator type_translator_;
- const uint8_t* buffer_;
- intptr_t buffer_length_;
-
Mapping<Library, dart::Library> libraries_;
Mapping<Class, dart::Class> classes_;
};
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/kernel_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698