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

Unified Diff: runtime/vm/object.h

Issue 8234016: Inline allocation of implicit closures. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 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
« no previous file with comments | « runtime/vm/code_generator_ia32.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 355)
+++ runtime/vm/object.h (working copy)
@@ -1071,7 +1071,6 @@
return kind() == RawFunction::kAbstract;
}
bool IsInFactoryScope() const;
- bool IsInStaticScope() const;
intptr_t token_index() const { return raw_ptr()->token_index_; }
@@ -1139,11 +1138,32 @@
return TestType(kIsAssignableTo, dst);
}
- // Returns true if this function represents a closure function.
+ // Returns true if this function represents a (possibly implicit) closure
+ // function.
bool IsClosureFunction() const {
return kind() == RawFunction::kClosureFunction;
}
+ // Returns true if this function represents an implicit closure function.
+ bool IsImplicitClosureFunction() const;
+
+ // Returns true if this function represents a non implicit closure function.
+ bool IsNonImplicitClosureFunction() const {
+ return IsClosureFunction() && !IsImplicitClosureFunction();
+ }
+
+ // Returns true if this function represents an implicit static closure
+ // function.
+ bool IsImplicitStaticClosureFunction() const {
+ return is_static() && IsImplicitClosureFunction();
+ }
+
+ // Returns true if this function represents an implicit instance closure
+ // function.
+ bool IsImplicitInstanceClosureFunction() const {
+ return !is_static() && IsImplicitClosureFunction();
+ }
+
// Returns true if this function represents a local function.
bool IsLocalFunction() const {
return parent_function() != Function::null();
« no previous file with comments | « runtime/vm/code_generator_ia32.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698