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

Unified Diff: runtime/vm/object.h

Issue 10796004: Consolidate a few fields in RawFunction using bitfields. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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/dart_api_impl.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 10086)
+++ runtime/vm/object.h (working copy)
@@ -1400,22 +1400,19 @@
// If none exists yet, create one and remember it.
RawFunction* ImplicitClosureFunction() const;
- RawFunction::Kind kind() const { return raw_ptr()->kind_; }
+ RawFunction::Kind kind() const { return raw()->GetKind(); }
- bool is_static() const { return raw_ptr()->is_static_; }
- bool is_const() const { return raw_ptr()->is_const_; }
- bool is_external() const { return raw_ptr()->is_external_; }
+ bool is_static() const { return raw()->IsStatic(); }
+ bool is_const() const { return raw()->IsConst(); }
+ bool is_external() const { return raw()->IsExternal(); }
bool IsConstructor() const {
return (kind() == RawFunction::kConstructor) && !is_static();
}
bool IsFactory() const {
return (kind() == RawFunction::kConstructor) && is_static();
}
- bool IsAbstract() const {
- return kind() == RawFunction::kAbstract;
- }
bool IsDynamicFunction() const {
- if (is_static()) {
+ if (is_static() || is_abstract()) {
return false;
}
switch (kind()) {
@@ -1428,7 +1425,6 @@
case RawFunction::kClosureFunction:
case RawFunction::kConstructor:
case RawFunction::kConstImplicitGetter:
- case RawFunction::kAbstract:
return false;
default:
UNREACHABLE();
@@ -1497,14 +1493,15 @@
raw_ptr()->deoptimization_counter_ = value;
}
- bool is_optimizable() const {
- return raw_ptr()->is_optimizable_;
- }
+ bool is_optimizable() const { return raw()->IsOptimizable(); }
void set_is_optimizable(bool value) const;
- bool is_native() const { return raw_ptr()->is_native_; }
+ bool is_native() const { return raw()->IsNative(); }
void set_is_native(bool value) const;
+ bool is_abstract() const { return raw()->IsAbstract(); }
+ void set_is_abstract(bool value) const;
+
bool HasOptimizedCode() const;
intptr_t NumberOfParameters() const;
@@ -1603,6 +1600,7 @@
RawFunction::Kind kind,
bool is_static,
bool is_const,
+ bool is_abstract,
bool is_external,
intptr_t token_pos);
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698