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

Unified Diff: src/preparse-data.h

Issue 1130133003: Migrate error messages, part 12. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@messages_11
Patch Set: Created 5 years, 7 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/pending-compilation-error-handler.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 ce3b2e0d0790d460a8d5a04751db5347849937be..0cfef9125bcb1ecc84170bf6813f771791b58317 100644
--- a/src/preparse-data.h
+++ b/src/preparse-data.h
@@ -7,6 +7,7 @@
#include "src/allocation.h"
#include "src/hashmap.h"
+#include "src/messages.h"
#include "src/preparse-data-format.h"
namespace v8 {
@@ -58,7 +59,7 @@ class ParserRecorder {
// Logs an error message and marks the log as containing an error.
// Further logging will be ignored, and ExtractData will return a vector
// representing the error only.
- virtual void LogMessage(int start, int end, const char* message,
+ virtual void LogMessage(int start, int end, MessageTemplate::Template message,
const char* argument_opt,
ParseErrorType error_type) = 0;
@@ -90,7 +91,7 @@ class SingletonLogger : public ParserRecorder {
// Logs an error message and marks the log as containing an error.
// Further logging will be ignored, and ExtractData will return a vector
// representing the error only.
- virtual void LogMessage(int start, int end, const char* message,
+ virtual void LogMessage(int start, int end, MessageTemplate::Template message,
const char* argument_opt, ParseErrorType error_type) {
if (has_error_) return;
has_error_ = true;
@@ -125,7 +126,7 @@ class SingletonLogger : public ParserRecorder {
DCHECK(has_error_);
return error_type_;
}
- const char* message() {
+ MessageTemplate::Template message() {
DCHECK(has_error_);
return message_;
}
@@ -144,7 +145,7 @@ class SingletonLogger : public ParserRecorder {
LanguageMode language_mode_;
bool scope_uses_super_property_;
// For error messages.
- const char* message_;
+ MessageTemplate::Template message_;
const char* argument_opt_;
ParseErrorType error_type_;
};
@@ -174,7 +175,7 @@ class CompleteParserRecorder : public ParserRecorder {
// Logs an error message and marks the log as containing an error.
// Further logging will be ignored, and ExtractData will return a vector
// representing the error only.
- virtual void LogMessage(int start, int end, const char* message,
+ virtual void LogMessage(int start, int end, MessageTemplate::Template message,
const char* argument_opt, ParseErrorType error_type);
ScriptData* GetScriptData();
@@ -189,9 +190,6 @@ class CompleteParserRecorder : public ParserRecorder {
private:
void WriteString(Vector<const char> str);
- // Write a non-negative number to the symbol store.
- void WriteNumber(int number);
-
Collector<unsigned> function_store_;
unsigned preamble_[PreparseDataConstants::kHeaderSize];
« no previous file with comments | « src/pending-compilation-error-handler.cc ('k') | src/preparse-data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698