| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 expression.AsIdentifier().IsEvalOrArguments()) { | 62 expression.AsIdentifier().IsEvalOrArguments()) { |
| 63 pre_parser_->ReportMessage("strict_eval_arguments", | 63 pre_parser_->ReportMessage("strict_eval_arguments", |
| 64 Vector<const char*>::empty()); | 64 Vector<const char*>::empty()); |
| 65 *ok = false; | 65 *ok = false; |
| 66 } | 66 } |
| 67 } | 67 } |
| 68 | 68 |
| 69 | 69 |
| 70 void PreParserTraits::ReportMessageAt(Scanner::Location location, | 70 void PreParserTraits::ReportMessageAt(Scanner::Location location, |
| 71 const char* message, | 71 const char* message, |
| 72 Vector<const char*> args) { | 72 Vector<const char*> args, |
| 73 bool is_reference_error) { |
| 73 ReportMessageAt(location.beg_pos, | 74 ReportMessageAt(location.beg_pos, |
| 74 location.end_pos, | 75 location.end_pos, |
| 75 message, | 76 message, |
| 76 args.length() > 0 ? args[0] : NULL); | 77 args.length() > 0 ? args[0] : NULL, |
| 78 is_reference_error); |
| 77 } | 79 } |
| 78 | 80 |
| 79 | 81 |
| 80 void PreParserTraits::ReportMessageAt(Scanner::Location location, | 82 void PreParserTraits::ReportMessageAt(Scanner::Location location, |
| 81 const char* type, | 83 const char* type, |
| 82 const char* name_opt) { | 84 const char* name_opt, |
| 85 bool is_reference_error) { |
| 83 pre_parser_->log_ | 86 pre_parser_->log_ |
| 84 ->LogMessage(location.beg_pos, location.end_pos, type, name_opt); | 87 ->LogMessage(location.beg_pos, location.end_pos, type, name_opt); |
| 85 } | 88 } |
| 86 | 89 |
| 87 | 90 |
| 88 void PreParserTraits::ReportMessageAt(int start_pos, | 91 void PreParserTraits::ReportMessageAt(int start_pos, |
| 89 int end_pos, | 92 int end_pos, |
| 90 const char* type, | 93 const char* type, |
| 91 const char* name_opt) { | 94 const char* name_opt, |
| 95 bool is_reference_error) { |
| 92 pre_parser_->log_->LogMessage(start_pos, end_pos, type, name_opt); | 96 pre_parser_->log_->LogMessage(start_pos, end_pos, type, name_opt); |
| 93 } | 97 } |
| 94 | 98 |
| 95 | 99 |
| 96 PreParserIdentifier PreParserTraits::GetSymbol(Scanner* scanner) { | 100 PreParserIdentifier PreParserTraits::GetSymbol(Scanner* scanner) { |
| 97 pre_parser_->LogSymbol(); | 101 pre_parser_->LogSymbol(); |
| 98 if (scanner->current_token() == Token::FUTURE_RESERVED_WORD) { | 102 if (scanner->current_token() == Token::FUTURE_RESERVED_WORD) { |
| 99 return PreParserIdentifier::FutureReserved(); | 103 return PreParserIdentifier::FutureReserved(); |
| 100 } else if (scanner->current_token() == | 104 } else if (scanner->current_token() == |
| 101 Token::FUTURE_STRICT_RESERVED_WORD) { | 105 Token::FUTURE_STRICT_RESERVED_WORD) { |
| (...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1212 | 1216 |
| 1213 | 1217 |
| 1214 void PreParser::LogSymbol() { | 1218 void PreParser::LogSymbol() { |
| 1215 if (log_->ShouldLogSymbols()) { | 1219 if (log_->ShouldLogSymbols()) { |
| 1216 scanner()->LogSymbol(log_, position()); | 1220 scanner()->LogSymbol(log_, position()); |
| 1217 } | 1221 } |
| 1218 } | 1222 } |
| 1219 | 1223 |
| 1220 | 1224 |
| 1221 } } // v8::internal | 1225 } } // v8::internal |
| OLD | NEW |