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

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: addressed comments, refactored test cases. 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
Index: src/preparse-data.h
diff --git a/src/preparse-data.h b/src/preparse-data.h
index 36c481cb3626ffd2d01e2184d3e6d93cd46c4a67..5280c47c79657bda51ed119a06a32f14028c7155 100644
--- a/src/preparse-data.h
+++ b/src/preparse-data.h
@@ -119,6 +119,10 @@ class SingletonLogger : public ParserRecorder {
};
+// Forward declaration for CompleteParserRecorder::GetScriptData.
marja 2014/07/10 08:48:11 Nit: This comment is unnecessary.
Yang 2014/07/10 10:27:58 Done.
+class ScriptData;
+
+
class CompleteParserRecorder : public ParserRecorder {
public:
struct Key {
@@ -149,13 +153,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.

Powered by Google App Engine
This is Rietveld 408576698