| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 | 67 |
| 68 int PreParserTraits::NextMaterializedLiteralIndex() { | 68 int PreParserTraits::NextMaterializedLiteralIndex() { |
| 69 return pre_parser_->scope_->NextMaterializedLiteralIndex(); | 69 return pre_parser_->scope_->NextMaterializedLiteralIndex(); |
| 70 } | 70 } |
| 71 | 71 |
| 72 | 72 |
| 73 void PreParserTraits::ReportMessageAt(Scanner::Location location, | 73 void PreParserTraits::ReportMessageAt(Scanner::Location location, |
| 74 const char* message, | 74 const char* message, |
| 75 Vector<const char*> args) { | 75 Vector<const char*> args) { |
| 76 fprintf(stderr, "PreParserTraits::ReportMessageAt\n"); |
| 76 ReportMessageAt(location.beg_pos, | 77 ReportMessageAt(location.beg_pos, |
| 77 location.end_pos, | 78 location.end_pos, |
| 78 message, | 79 message, |
| 79 args.length() > 0 ? args[0] : NULL); | 80 args.length() > 0 ? args[0] : NULL); |
| 81 fprintf(stderr, "PreParserTraits::ReportMessageAt returns\n"); |
| 80 } | 82 } |
| 81 | 83 |
| 82 | 84 |
| 83 void PreParserTraits::ReportMessageAt(Scanner::Location location, | 85 void PreParserTraits::ReportMessageAt(Scanner::Location location, |
| 84 const char* type, | 86 const char* type, |
| 85 const char* name_opt) { | 87 const char* name_opt) { |
| 88 fprintf(stderr, "PreParserTraits::ReportMessageAtB\n"); |
| 86 pre_parser_->log_ | 89 pre_parser_->log_ |
| 87 ->LogMessage(location.beg_pos, location.end_pos, type, name_opt); | 90 ->LogMessage(location.beg_pos, location.end_pos, type, name_opt); |
| 91 fprintf(stderr, "PreParserTraits::ReportMessageAtB returns\n"); |
| 88 } | 92 } |
| 89 | 93 |
| 90 | 94 |
| 91 void PreParserTraits::ReportMessageAt(int start_pos, | 95 void PreParserTraits::ReportMessageAt(int start_pos, |
| 92 int end_pos, | 96 int end_pos, |
| 93 const char* type, | 97 const char* type, |
| 94 const char* name_opt) { | 98 const char* name_opt) { |
| 99 fprintf(stderr, "PreParserTraits::ReportMessageAtC\n"); |
| 95 pre_parser_->log_->LogMessage(start_pos, end_pos, type, name_opt); | 100 pre_parser_->log_->LogMessage(start_pos, end_pos, type, name_opt); |
| 101 fprintf(stderr, "PreParserTraits::ReportMessageAtC returns\n"); |
| 96 } | 102 } |
| 97 | 103 |
| 98 | 104 |
| 99 PreParserIdentifier PreParserTraits::GetSymbol() { | 105 PreParserIdentifier PreParserTraits::GetSymbol() { |
| 100 Scanner* scanner = pre_parser_->scanner(); | 106 Scanner* scanner = pre_parser_->scanner(); |
| 101 pre_parser_->LogSymbol(); | 107 pre_parser_->LogSymbol(); |
| 102 if (scanner->current_token() == Token::FUTURE_RESERVED_WORD) { | 108 if (scanner->current_token() == Token::FUTURE_RESERVED_WORD) { |
| 103 return PreParserIdentifier::FutureReserved(); | 109 return PreParserIdentifier::FutureReserved(); |
| 104 } else if (scanner->current_token() == | 110 } else if (scanner->current_token() == |
| 105 Token::FUTURE_STRICT_RESERVED_WORD) { | 111 Token::FUTURE_STRICT_RESERVED_WORD) { |
| (...skipping 1387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1493 !scanner()->literal_contains_escapes() && | 1499 !scanner()->literal_contains_escapes() && |
| 1494 !strncmp(scanner()->literal_ascii_string().start(), kUseStrictChars, | 1500 !strncmp(scanner()->literal_ascii_string().start(), kUseStrictChars, |
| 1495 kUseStrictLength)) { | 1501 kUseStrictLength)) { |
| 1496 return Expression::UseStrictStringLiteral(); | 1502 return Expression::UseStrictStringLiteral(); |
| 1497 } | 1503 } |
| 1498 return Expression::StringLiteral(); | 1504 return Expression::StringLiteral(); |
| 1499 } | 1505 } |
| 1500 | 1506 |
| 1501 | 1507 |
| 1502 } } // v8::internal | 1508 } } // v8::internal |
| OLD | NEW |