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

Unified Diff: runtime/vm/object.h

Issue 2781483005: Improve internal compiler API so that OSR code is never installed on function. (Closed)
Patch Set: cosmetics Created 3 years, 9 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 | « runtime/vm/dart_entry.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 2239799140a8983cd3d7bf3ae7e781314fe23db2..0314d770120306de871a98e63cb2b55bb1f069fe 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -2293,7 +2293,7 @@ class Function : public Object {
// Not thread-safe; must be called in the main thread.
// Sets function's code and code's function.
- void InstallOptimizedCode(const Code& code, bool is_osr) const;
+ void InstallOptimizedCode(const Code& code) const;
void AttachCode(const Code& value) const;
void SetInstructions(const Code& value) const;
void ClearCode() const;
@@ -2301,6 +2301,12 @@ class Function : public Object {
// Disables optimized code and switches to unoptimized code.
void SwitchToUnoptimizedCode() const;
+ // Ensures that the function has code. If there is no code it compiles the
+ // unoptimized version of the code. If the code contains errors, it calls
+ // Exceptions::PropagateError and does not return. Normally returns the
+ // current code, whether it is optimized or unoptimized.
+ RawCode* EnsureHasCode() const;
+
// Disables optimized code and switches to unoptimized code (or the lazy
// compilation stub).
void SwitchToLazyCompiledUnoptimizedCode() const;
« no previous file with comments | « runtime/vm/dart_entry.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698