| 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 1214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1225 CheckOctalLiteral(start_position, end_position, CHECK_OK); | 1225 CheckOctalLiteral(start_position, end_position, CHECK_OK); |
| 1226 return Expression::StrictFunction(); | 1226 return Expression::StrictFunction(); |
| 1227 } | 1227 } |
| 1228 | 1228 |
| 1229 return Expression::Default(); | 1229 return Expression::Default(); |
| 1230 } | 1230 } |
| 1231 | 1231 |
| 1232 | 1232 |
| 1233 void PreParser::ParseLazyFunctionLiteralBody(bool* ok) { | 1233 void PreParser::ParseLazyFunctionLiteralBody(bool* ok) { |
| 1234 int body_start = position(); | 1234 int body_start = position(); |
| 1235 log_->PauseRecording(); | 1235 bool is_logging = log_->ShouldLogSymbols(); |
| 1236 if (is_logging) log_->PauseRecording(); |
| 1236 ParseSourceElements(Token::RBRACE, ok); | 1237 ParseSourceElements(Token::RBRACE, ok); |
| 1237 log_->ResumeRecording(); | 1238 if (is_logging) log_->ResumeRecording(); |
| 1238 if (!*ok) return; | 1239 if (!*ok) return; |
| 1239 | 1240 |
| 1240 // Position right after terminal '}'. | 1241 // Position right after terminal '}'. |
| 1241 ASSERT_EQ(Token::RBRACE, scanner()->peek()); | 1242 ASSERT_EQ(Token::RBRACE, scanner()->peek()); |
| 1242 int body_end = scanner()->peek_location().end_pos; | 1243 int body_end = scanner()->peek_location().end_pos; |
| 1243 log_->LogFunction(body_start, body_end, | 1244 log_->LogFunction(body_start, body_end, |
| 1244 function_state_->materialized_literal_count(), | 1245 function_state_->materialized_literal_count(), |
| 1245 function_state_->expected_property_count(), | 1246 function_state_->expected_property_count(), |
| 1246 strict_mode()); | 1247 strict_mode()); |
| 1247 } | 1248 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1259 ParseIdentifier(kAllowEvalOrArguments, CHECK_OK); | 1260 ParseIdentifier(kAllowEvalOrArguments, CHECK_OK); |
| 1260 ParseArguments(ok); | 1261 ParseArguments(ok); |
| 1261 | 1262 |
| 1262 return Expression::Default(); | 1263 return Expression::Default(); |
| 1263 } | 1264 } |
| 1264 | 1265 |
| 1265 #undef CHECK_OK | 1266 #undef CHECK_OK |
| 1266 | 1267 |
| 1267 | 1268 |
| 1268 void PreParser::LogSymbol() { | 1269 void PreParser::LogSymbol() { |
| 1269 scanner()->LogSymbol(log_, position()); | 1270 if (log_->ShouldLogSymbols()) { |
| 1271 scanner()->LogSymbol(log_, position()); |
| 1272 } |
| 1270 } | 1273 } |
| 1271 | 1274 |
| 1272 | 1275 |
| 1273 } } // v8::internal | 1276 } } // v8::internal |
| OLD | NEW |