| Index: src/parser.cc
|
| diff --git a/src/parser.cc b/src/parser.cc
|
| index d5f7f93e98fd1af56af2f1ed0a0a4b1265165e90..bdd9348ec41807662484b107c1bde98d9e8e56f1 100644
|
| --- a/src/parser.cc
|
| +++ b/src/parser.cc
|
| @@ -3491,99 +3491,6 @@ Handle<FixedArray> CompileTimeValue::GetElements(Handle<FixedArray> value) {
|
| }
|
|
|
|
|
| -class SingletonLogger : public ParserRecorder {
|
| - public:
|
| - SingletonLogger() : has_error_(false), start_(-1), end_(-1) { }
|
| - virtual ~SingletonLogger() { }
|
| -
|
| - void Reset() { has_error_ = false; }
|
| -
|
| - virtual void LogFunction(int start,
|
| - int end,
|
| - int literals,
|
| - int properties,
|
| - StrictMode strict_mode) {
|
| - ASSERT(!has_error_);
|
| - start_ = start;
|
| - end_ = end;
|
| - literals_ = literals;
|
| - properties_ = properties;
|
| - strict_mode_ = strict_mode;
|
| - };
|
| -
|
| - // Logs a symbol creation of a literal or identifier.
|
| - virtual void LogOneByteSymbol(int start, Vector<const uint8_t> literal) { }
|
| - virtual void LogTwoByteSymbol(int start, Vector<const uint16_t> literal) { }
|
| -
|
| - // 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,
|
| - const char* argument_opt) {
|
| - if (has_error_) return;
|
| - has_error_ = true;
|
| - start_ = start;
|
| - end_ = end;
|
| - message_ = message;
|
| - argument_opt_ = argument_opt;
|
| - }
|
| -
|
| - virtual int function_position() { return 0; }
|
| -
|
| - virtual int symbol_position() { return 0; }
|
| -
|
| - virtual int symbol_ids() { return -1; }
|
| -
|
| - virtual Vector<unsigned> ExtractData() {
|
| - UNREACHABLE();
|
| - return Vector<unsigned>();
|
| - }
|
| -
|
| - virtual void PauseRecording() { }
|
| -
|
| - virtual void ResumeRecording() { }
|
| -
|
| - bool has_error() { return has_error_; }
|
| -
|
| - int start() { return start_; }
|
| - int end() { return end_; }
|
| - int literals() {
|
| - ASSERT(!has_error_);
|
| - return literals_;
|
| - }
|
| - int properties() {
|
| - ASSERT(!has_error_);
|
| - return properties_;
|
| - }
|
| - StrictMode strict_mode() {
|
| - ASSERT(!has_error_);
|
| - return strict_mode_;
|
| - }
|
| - const char* message() {
|
| - ASSERT(has_error_);
|
| - return message_;
|
| - }
|
| - const char* argument_opt() {
|
| - ASSERT(has_error_);
|
| - return argument_opt_;
|
| - }
|
| -
|
| - private:
|
| - bool has_error_;
|
| - int start_;
|
| - int end_;
|
| - // For function entries.
|
| - int literals_;
|
| - int properties_;
|
| - StrictMode strict_mode_;
|
| - // For error messages.
|
| - const char* message_;
|
| - const char* argument_opt_;
|
| -};
|
| -
|
| -
|
| FunctionLiteral* Parser::ParseFunctionLiteral(
|
| Handle<String> function_name,
|
| Scanner::Location function_name_location,
|
|
|