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

Unified Diff: src/preparse-data.h

Issue 376223002: Refactor ScriptData class for cached compile data. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | « src/parser.cc ('k') | src/preparse-data.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparse-data.h
diff --git a/src/preparse-data.h b/src/preparse-data.h
index 36c481cb3626ffd2d01e2184d3e6d93cd46c4a67..c9d4f330bd2e61b3d185e7e5116970bdc1a3f161 100644
--- a/src/preparse-data.h
+++ b/src/preparse-data.h
@@ -119,6 +119,9 @@ class SingletonLogger : public ParserRecorder {
};
+class ScriptData;
vogelheim 2014/07/10 10:05:32 stlye nitpick: Forward declarations near always fo
Yang 2014/07/10 10:27:58 Done.
+
+
class CompleteParserRecorder : public ParserRecorder {
public:
struct Key {
@@ -149,13 +152,17 @@ class CompleteParserRecorder : public ParserRecorder {
const char* message,
const char* argument_opt,
bool is_reference_error_);
- Vector<unsigned> ExtractData();
+ ScriptData* GetScriptData();
- private:
- bool has_error() {
+ bool HasError() {
return static_cast<bool>(preamble_[PreparseDataConstants::kHasErrorOffset]);
}
+ Vector<unsigned> ErrorMessageData() {
+ ASSERT(HasError());
+ return function_store_.ToVector();
+ }
+ private:
void WriteString(Vector<const char> str);
// Write a non-negative number to the symbol store.
« no previous file with comments | « src/parser.cc ('k') | src/preparse-data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698