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

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
Index: runtime/vm/object.h
===================================================================
--- runtime/vm/object.h (revision 28803)
+++ runtime/vm/object.h (working copy)
@@ -1477,6 +1477,9 @@
// 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.
+ void DetachCode() const;
+
// Disables optimized code and switches to unoptimized code.
void SwitchToUnoptimizedCode() const;
@@ -1487,6 +1490,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 +2667,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_);

Powered by Google App Engine
This is Rietveld 408576698