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

Unified Diff: runtime/vm/object.h

Issue 27802002: Disconnects code objects from infrequently used unoptimized functions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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/flow_graph_compiler_x64.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
===================================================================
--- runtime/vm/object.h (revision 29013)
+++ runtime/vm/object.h (working copy)
@@ -1477,6 +1477,13 @@
// Sets function's code and code's function.
void SetCode(const Code& value) const;
+ // Detaches code from the function by setting the code to null, and patches
+ // the code to be non-entrant.
+ void DetachCode() const;
+
+ // Reattaches code to the function, and patches the code to be entrant.
+ void ReattachCode(const Code& code) const;
+
// Disables optimized code and switches to unoptimized code.
void SwitchToUnoptimizedCode() const;
@@ -1487,6 +1494,9 @@
RawCode* unoptimized_code() const { return raw_ptr()->unoptimized_code_; }
void set_unoptimized_code(const Code& value) const;
static intptr_t code_offset() { return OFFSET_OF(RawFunction, code_); }
+ static intptr_t unoptimized_code_offset() {
+ return OFFSET_OF(RawFunction, unoptimized_code_);
+ }
inline bool HasCode() const;
// Returns true if there is at least one debugger breakpoint
@@ -2661,6 +2671,9 @@
public:
intptr_t size() const { return raw_ptr()->size_; } // Excludes HeaderSize().
RawCode* code() const { return raw_ptr()->code_; }
+ static intptr_t code_offset() {
+ return OFFSET_OF(RawInstructions, code_);
+ }
RawArray* object_pool() const { return raw_ptr()->object_pool_; }
static intptr_t object_pool_offset() {
return OFFSET_OF(RawInstructions, object_pool_);
@@ -3123,6 +3136,8 @@
// Returns null if there is no static call at 'pc'.
RawFunction* GetStaticCallTargetFunctionAt(uword pc) const;
+ // Returns null if there is no static call at 'pc'.
+ RawCode* GetStaticCallTargetCodeAt(uword pc) const;
// Aborts if there is no static call at 'pc'.
void SetStaticCallTargetCodeAt(uword pc, const Code& code) const;
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698