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

Unified Diff: src/objects-inl.h

Issue 8677008: Relax inlining limits for simple leaf functions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Save/restore node count in FunctionState, add comments. Created 9 years, 1 month 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
« src/hydrogen.cc ('K') | « src/objects.h ('k') | src/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index f3a7fd3ce72bf9feeeba4c58f0fd4280abde914b..712aa6d6490b64d684264a55ec3a1d575b460d13 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -3554,6 +3554,23 @@ BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints,
kNameShouldPrintAsAnonymous)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, bound, kBoundFunction)
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_anonymous, kIsAnonymous)
+BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_primitive, kIsPrimitive)
+
+
+int SharedFunctionInfo::ast_node_count() {
+ return (compiler_hints() >> kAstNodeCountShift) & kAstNodeCountMask;
+}
+
+
+void SharedFunctionInfo::set_ast_node_count(int ast_node_count) {
+ if (ast_node_count > kAstNodeCountMask) {
+ ast_node_count = kAstNodeCountMask;
+ }
+ set_compiler_hints((compiler_hints() &
+ (~(kAstNodeCountMask << kAstNodeCountShift))) |
+ (ast_node_count << kAstNodeCountShift));
+}
+
ACCESSORS(CodeCache, default_cache, FixedArray, kDefaultCacheOffset)
ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset)
« src/hydrogen.cc ('K') | « src/objects.h ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698