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

Unified Diff: runtime/vm/object.h

Issue 9475031: Cleaned up usage of Function::code, since it may be misunderstood that it points to the only Code o… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 10 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/native_entry_test.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 4655)
+++ runtime/vm/object.h (working copy)
@@ -1232,9 +1232,13 @@
void SetParameterNameAt(intptr_t index, const String& value) const;
void set_parameter_names(const Array& value) const;
- RawCode* code() const { return raw_ptr()->code_; }
// Sets function's code and code's function.
void SetCode(const Code& value) const;
+
+ // 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* 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_); }
@@ -1358,6 +1362,8 @@
}
void set_is_optimizable(bool value) const;
+ bool HasOptimizedCode() const;
+
intptr_t NumberOfParameters() const;
bool AreValidArgumentCounts(int num_arguments, int num_named_arguments) const;
@@ -3718,7 +3724,7 @@
bool Function::HasCode() const {
- return code() != Code::null();
+ return raw_ptr()->code_ != Code::null();
}
« no previous file with comments | « runtime/vm/native_entry_test.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698