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

Side by Side Diff: src/preparser.cc

Issue 220233006: PreParser fix: propagate reference erros properly. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/preparse-data-format.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 message, 76 message,
77 args.length() > 0 ? args[0] : NULL, 77 args.length() > 0 ? args[0] : NULL,
78 is_reference_error); 78 is_reference_error);
79 } 79 }
80 80
81 81
82 void PreParserTraits::ReportMessageAt(Scanner::Location location, 82 void PreParserTraits::ReportMessageAt(Scanner::Location location,
83 const char* type, 83 const char* type,
84 const char* name_opt, 84 const char* name_opt,
85 bool is_reference_error) { 85 bool is_reference_error) {
86 pre_parser_->log_ 86 pre_parser_->log_->LogMessage(location.beg_pos, location.end_pos, type,
87 ->LogMessage(location.beg_pos, location.end_pos, type, name_opt); 87 name_opt, is_reference_error);
88 } 88 }
89 89
90 90
91 void PreParserTraits::ReportMessageAt(int start_pos, 91 void PreParserTraits::ReportMessageAt(int start_pos,
92 int end_pos, 92 int end_pos,
93 const char* type, 93 const char* type,
94 const char* name_opt, 94 const char* name_opt,
95 bool is_reference_error) { 95 bool is_reference_error) {
96 pre_parser_->log_->LogMessage(start_pos, end_pos, type, name_opt); 96 pre_parser_->log_->LogMessage(start_pos, end_pos, type, name_opt,
97 is_reference_error);
97 } 98 }
98 99
99 100
100 PreParserIdentifier PreParserTraits::GetSymbol(Scanner* scanner) { 101 PreParserIdentifier PreParserTraits::GetSymbol(Scanner* scanner) {
101 pre_parser_->LogSymbol(); 102 pre_parser_->LogSymbol();
102 if (scanner->current_token() == Token::FUTURE_RESERVED_WORD) { 103 if (scanner->current_token() == Token::FUTURE_RESERVED_WORD) {
103 return PreParserIdentifier::FutureReserved(); 104 return PreParserIdentifier::FutureReserved();
104 } else if (scanner->current_token() == 105 } else if (scanner->current_token() ==
105 Token::FUTURE_STRICT_RESERVED_WORD) { 106 Token::FUTURE_STRICT_RESERVED_WORD) {
106 return PreParserIdentifier::FutureStrictReserved(); 107 return PreParserIdentifier::FutureStrictReserved();
(...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 978
978 979
979 void PreParser::LogSymbol() { 980 void PreParser::LogSymbol() {
980 if (log_->ShouldLogSymbols()) { 981 if (log_->ShouldLogSymbols()) {
981 scanner()->LogSymbol(log_, position()); 982 scanner()->LogSymbol(log_, position());
982 } 983 }
983 } 984 }
984 985
985 986
986 } } // v8::internal 987 } } // v8::internal
OLDNEW
« no previous file with comments | « src/preparse-data-format.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698