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

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
Index: runtime/vm/object.h
===================================================================
--- runtime/vm/object.h (revision 4638)
+++ runtime/vm/object.h (working copy)
@@ -1232,7 +1232,6 @@
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;
RawCode* unoptimized_code() const { return raw_ptr()->unoptimized_code_; }
@@ -1358,6 +1357,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;
@@ -1453,7 +1454,12 @@
static const int kCtorPhaseBody = 1 << 1;
static const int kCtorPhaseAll = (kCtorPhaseInit | kCtorPhaseBody);
+ // Return the most recently compiled and installed code for this function.
+ // It is not the only Code object that point to this function.
hausner 2012/02/28 00:37:09 points
srdjan 2012/02/28 01:18:59 Done.
+ RawCode* CurrentCode() const { return raw_ptr()->code_; }
+
private:
+ RawCode* code() const { return raw_ptr()->code_; }
siva 2012/02/28 00:52:20 Why do you want to retain this accessor. There see
srdjan 2012/02/28 01:18:59 Done.
void set_name(const String& value) const;
void set_kind(RawFunction::Kind value) const;
void set_is_static(bool is_static) const;

Powered by Google App Engine
This is Rietveld 408576698