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

Unified Diff: runtime/vm/object.h

Issue 311963002: In class Function replace current code field with current instruction field, that way we save one l… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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/intermediate_language_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 36916)
+++ runtime/vm/object.h (working copy)
@@ -1576,7 +1576,7 @@
// Sets function's code and code's function.
void AttachCode(const Code& value) const;
- void set_code(const Code& value) const;
+ void SetInstructions(const Code& value) const;
void ClearCode() const;
// Disables optimized code and switches to unoptimized code.
@@ -1584,16 +1584,21 @@
// Return the most recently compiled and installed code for this function.
// It is not the only Code object that points to this function.
- RawCode* CurrentCode() const { return raw_ptr()->code_; }
+ RawCode* CurrentCode() const {
+ return raw_ptr()->instructions_->ptr()->code_;
+ }
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_);
}
bool HasCode() const;
+ static intptr_t instructions_offset() {
+ return OFFSET_OF(RawFunction, instructions_);
+ }
+
// Returns true if there is at least one debugger breakpoint
// set in this function.
bool HasBreakpoint() const;
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698