Index: src/parsing/preparse-data.cc |
diff --git a/src/parsing/preparse-data.cc b/src/parsing/preparse-data.cc |
index c3eb306c7b6dc60706ab6894810994868cb1d5c0..e9a4e8f4b5600ff9e8851b4b85279caf3afdaa3f 100644 |
--- a/src/parsing/preparse-data.cc |
+++ b/src/parsing/preparse-data.cc |
@@ -33,42 +33,14 @@ ParserLogger::ParserLogger() { |
PreparseDataConstants::kMagicNumber; |
preamble_[PreparseDataConstants::kVersionOffset] = |
PreparseDataConstants::kCurrentVersion; |
- preamble_[PreparseDataConstants::kHasErrorOffset] = false; |
preamble_[PreparseDataConstants::kFunctionsSizeOffset] = 0; |
preamble_[PreparseDataConstants::kSizeOffset] = 0; |
- DCHECK_EQ(5, PreparseDataConstants::kHeaderSize); |
+ DCHECK_EQ(4, PreparseDataConstants::kHeaderSize); |
#ifdef DEBUG |
prev_start_ = -1; |
#endif |
} |
-void ParserLogger::LogMessage(int start_pos, int end_pos, |
- MessageTemplate::Template message, |
- const char* arg_opt, ParseErrorType error_type) { |
- if (HasError()) return; |
- preamble_[PreparseDataConstants::kHasErrorOffset] = true; |
- function_store_.Reset(); |
- STATIC_ASSERT(PreparseDataConstants::kMessageStartPos == 0); |
- function_store_.Add(start_pos); |
- STATIC_ASSERT(PreparseDataConstants::kMessageEndPos == 1); |
- function_store_.Add(end_pos); |
- STATIC_ASSERT(PreparseDataConstants::kMessageArgCountPos == 2); |
- function_store_.Add((arg_opt == NULL) ? 0 : 1); |
- STATIC_ASSERT(PreparseDataConstants::kParseErrorTypePos == 3); |
- function_store_.Add(error_type); |
- STATIC_ASSERT(PreparseDataConstants::kMessageTemplatePos == 4); |
- function_store_.Add(static_cast<unsigned>(message)); |
- STATIC_ASSERT(PreparseDataConstants::kMessageArgPos == 5); |
- if (arg_opt != NULL) WriteString(CStrVector(arg_opt)); |
-} |
- |
-void ParserLogger::WriteString(Vector<const char> str) { |
- function_store_.Add(str.length()); |
- for (int i = 0; i < str.length(); i++) { |
- function_store_.Add(str[i]); |
- } |
-} |
- |
ScriptData* ParserLogger::GetScriptData() { |
int function_size = function_store_.size(); |
int total_size = PreparseDataConstants::kHeaderSize + function_size; |