| 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 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1249 ParseSourceElements(i::Token::RBRACE, ok); | 1249 ParseSourceElements(i::Token::RBRACE, ok); |
| 1250 log_->ResumeRecording(); | 1250 log_->ResumeRecording(); |
| 1251 if (!*ok) Expression::Default(); | 1251 if (!*ok) Expression::Default(); |
| 1252 | 1252 |
| 1253 Expect(i::Token::RBRACE, CHECK_OK); | 1253 Expect(i::Token::RBRACE, CHECK_OK); |
| 1254 | 1254 |
| 1255 // Position right after terminal '}'. | 1255 // Position right after terminal '}'. |
| 1256 int end_pos = scanner_->location().end_pos; | 1256 int end_pos = scanner_->location().end_pos; |
| 1257 log_->LogFunction(function_block_pos, end_pos, | 1257 log_->LogFunction(function_block_pos, end_pos, |
| 1258 function_scope.materialized_literal_count(), | 1258 function_scope.materialized_literal_count(), |
| 1259 function_scope.expected_properties()); | 1259 function_scope.expected_properties(), |
| 1260 strict_mode() ? 1 : 0); |
| 1260 } else { | 1261 } else { |
| 1261 ParseSourceElements(i::Token::RBRACE, CHECK_OK); | 1262 ParseSourceElements(i::Token::RBRACE, CHECK_OK); |
| 1262 Expect(i::Token::RBRACE, CHECK_OK); | 1263 Expect(i::Token::RBRACE, CHECK_OK); |
| 1263 } | 1264 } |
| 1264 | 1265 |
| 1265 if (strict_mode()) { | 1266 if (strict_mode()) { |
| 1266 int end_position = scanner_->location().end_pos; | 1267 int end_position = scanner_->location().end_pos; |
| 1267 CheckOctalLiteral(start_position, end_position, CHECK_OK); | 1268 CheckOctalLiteral(start_position, end_position, CHECK_OK); |
| 1268 CheckDelayedStrictModeViolation(start_position, end_position, CHECK_OK); | 1269 CheckDelayedStrictModeViolation(start_position, end_position, CHECK_OK); |
| 1269 return Expression::StrictFunction(); | 1270 return Expression::StrictFunction(); |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1441 } | 1442 } |
| 1442 return result; | 1443 return result; |
| 1443 } | 1444 } |
| 1444 | 1445 |
| 1445 bool PreParser::peek_any_identifier() { | 1446 bool PreParser::peek_any_identifier() { |
| 1446 i::Token::Value next = peek(); | 1447 i::Token::Value next = peek(); |
| 1447 return next == i::Token::IDENTIFIER || | 1448 return next == i::Token::IDENTIFIER || |
| 1448 next == i::Token::FUTURE_RESERVED_WORD; | 1449 next == i::Token::FUTURE_RESERVED_WORD; |
| 1449 } | 1450 } |
| 1450 } } // v8::preparser | 1451 } } // v8::preparser |
| OLD | NEW |