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

Unified Diff: runtime/bin/dfe.h

Issue 2927493002: Restructure code to enable reloading when a kernel dill file is specified on the command line inste… (Closed)
Patch Set: fix format error. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/bin/dfe.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/dfe.h
diff --git a/runtime/bin/dfe.h b/runtime/bin/dfe.h
index b91568552f0132e7e429e669c65c437f2ee8ef8b..2f61329d9a546c420f430d4b51f8658d0686fcfd 100644
--- a/runtime/bin/dfe.h
+++ b/runtime/bin/dfe.h
@@ -30,12 +30,32 @@ class DFE {
}
bool UsePlatformBinary() const { return platform_binary_filename_ != NULL; }
+ void* kernel_platform() const { return kernel_platform_; }
+
// Method to reload a script into a running a isolate.
// If the specified script [url] is not a kernel IR, compile it first using
// DFE and then reload the resulting kernel IR into the isolate.
// Returns Dart_Null if successful, otherwise an error object is returned.
- Dart_Handle ReloadScript(Dart_Isolate isolate, Dart_Handle url);
+ Dart_Handle ReloadScript(Dart_Isolate isolate, const char* url_string);
+
+ // Compiles a script and reads the resulting kernel file.
+ // If the compilation is successful, returns a valid in memory kernel
+ // representation of the script, NULL otherwise
+ // 'error' and 'exit_code' have the error values in case of errors.
+ void* CompileAndReadScript(const char* script_uri,
+ char** error,
+ int* exit_code);
+
+ // Reads the platform kernel file.
+ // Returns an in memory kernel representation of the platform kernel file.
+ void* ReadPlatform();
+ // Reads the script kernel file if specified 'script_uri' is a kernel file.
+ // Returns an in memory kernel representation of the specified script is a
+ // valid kernel file, false otherwise.
+ void* ReadScript(const char* script_uri);
+
+ private:
// Tries to read [script_uri] as a Kernel IR file.
// Returns `true` if successful and sets [kernel_file] and [kernel_length]
// to be the kernel IR contents.
@@ -45,9 +65,9 @@ class DFE {
const uint8_t** kernel_ir,
intptr_t* kernel_ir_size);
- private:
const char* frontend_filename_;
const char* platform_binary_filename_;
+ void* kernel_platform_;
DISALLOW_COPY_AND_ASSIGN(DFE);
};
« no previous file with comments | « no previous file | runtime/bin/dfe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698