| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <cmath> | 5 #include <cmath> |
| 6 | 6 |
| 7 #include "src/allocation.h" | 7 #include "src/allocation.h" |
| 8 #include "src/base/logging.h" | 8 #include "src/base/logging.h" |
| 9 #include "src/conversions-inl.h" | 9 #include "src/conversions-inl.h" |
| 10 #include "src/conversions.h" | 10 #include "src/conversions.h" |
| (...skipping 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1251 &property_classifier, &name, CHECK_OK); | 1251 &property_classifier, &name, CHECK_OK); |
| 1252 ValidateExpression(&property_classifier, CHECK_OK); | 1252 ValidateExpression(&property_classifier, CHECK_OK); |
| 1253 if (classifier != nullptr) { | 1253 if (classifier != nullptr) { |
| 1254 classifier->Accumulate(&property_classifier, | 1254 classifier->Accumulate(&property_classifier, |
| 1255 ExpressionClassifier::ExpressionProductions); | 1255 ExpressionClassifier::ExpressionProductions); |
| 1256 } | 1256 } |
| 1257 } | 1257 } |
| 1258 | 1258 |
| 1259 Expect(Token::RBRACE, CHECK_OK); | 1259 Expect(Token::RBRACE, CHECK_OK); |
| 1260 | 1260 |
| 1261 // We desugar class literals into a runtime function call which takes three |
| 1262 // new array literals as arguments, so we need to reserve indices for them. |
| 1263 function_state_->NextMaterializedLiteralIndex(); |
| 1264 function_state_->NextMaterializedLiteralIndex(); |
| 1265 function_state_->NextMaterializedLiteralIndex(); |
| 1266 |
| 1261 return Expression::Default(); | 1267 return Expression::Default(); |
| 1262 } | 1268 } |
| 1263 | 1269 |
| 1264 | 1270 |
| 1265 PreParser::Expression PreParser::ParseV8Intrinsic(bool* ok) { | 1271 PreParser::Expression PreParser::ParseV8Intrinsic(bool* ok) { |
| 1266 // CallRuntime :: | 1272 // CallRuntime :: |
| 1267 // '%' Identifier Arguments | 1273 // '%' Identifier Arguments |
| 1268 Expect(Token::MOD, CHECK_OK); | 1274 Expect(Token::MOD, CHECK_OK); |
| 1269 if (!allow_natives()) { | 1275 if (!allow_natives()) { |
| 1270 *ok = false; | 1276 *ok = false; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1306 if (!*ok) return; | 1312 if (!*ok) return; |
| 1307 | 1313 |
| 1308 body->Add(PreParserStatement::ExpressionStatement(return_value), zone()); | 1314 body->Add(PreParserStatement::ExpressionStatement(return_value), zone()); |
| 1309 } | 1315 } |
| 1310 | 1316 |
| 1311 #undef CHECK_OK | 1317 #undef CHECK_OK |
| 1312 | 1318 |
| 1313 | 1319 |
| 1314 } // namespace internal | 1320 } // namespace internal |
| 1315 } // namespace v8 | 1321 } // namespace v8 |
| OLD | NEW |