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

Unified Diff: src/parser.h

Issue 225743002: Update tests to use the new compilation API. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 6 years, 9 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 | « no previous file | test/cctest/cctest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.h
diff --git a/src/parser.h b/src/parser.h
index cf7d2a5905b1e3f12d472b4e9033275c394ac142..cb13f716e985a0b9200f21bd1cd49b39a601c0a6 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -114,6 +114,13 @@ class ScriptDataImpl : public ScriptData {
? store_[PreparseDataConstants::kSymbolCountOffset]
: 0;
}
+ int function_count() {
+ int functions_size =
+ static_cast<int>(store_[PreparseDataConstants::kFunctionsSizeOffset]);
+ if (functions_size < 0) return 0;
+ if (functions_size % FunctionEntry::kSize != 0) return 0;
+ return functions_size / FunctionEntry::kSize;
+ }
// The following functions should only be called if SanityCheck has
// returned true.
bool has_error() { return store_[PreparseDataConstants::kHasErrorOffset]; }
« no previous file with comments | « no previous file | test/cctest/cctest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698