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

Side by Side Diff: src/parsing/preparser.h

Issue 1772423002: Don't do any special normalization if a boilerplate contains function literals. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: mark osr-one/osr-two as skip on ignition/arm Created 4 years, 9 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
« no previous file with comments | « src/parsing/parser-base.h ('k') | src/runtime/runtime-literals.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #ifndef V8_PARSING_PREPARSER_H 5 #ifndef V8_PARSING_PREPARSER_H
6 #define V8_PARSING_PREPARSER_H 6 #define V8_PARSING_PREPARSER_H
7 7
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/bailout-reason.h" 9 #include "src/bailout-reason.h"
10 #include "src/hashmap.h" 10 #include "src/hashmap.h"
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 } 447 }
448 PreParserExpression NewObjectLiteralProperty(PreParserExpression key, 448 PreParserExpression NewObjectLiteralProperty(PreParserExpression key,
449 PreParserExpression value, 449 PreParserExpression value,
450 bool is_static, 450 bool is_static,
451 bool is_computed_name) { 451 bool is_computed_name) {
452 return PreParserExpression::Default(); 452 return PreParserExpression::Default();
453 } 453 }
454 PreParserExpression NewObjectLiteral(PreParserExpressionList properties, 454 PreParserExpression NewObjectLiteral(PreParserExpressionList properties,
455 int literal_index, 455 int literal_index,
456 int boilerplate_properties, 456 int boilerplate_properties,
457 bool has_function,
458 int pos) { 457 int pos) {
459 return PreParserExpression::ObjectLiteral(); 458 return PreParserExpression::ObjectLiteral();
460 } 459 }
461 PreParserExpression NewVariableProxy(void* variable) { 460 PreParserExpression NewVariableProxy(void* variable) {
462 return PreParserExpression::Default(); 461 return PreParserExpression::Default();
463 } 462 }
464 PreParserExpression NewProperty(PreParserExpression obj, 463 PreParserExpression NewProperty(PreParserExpression obj,
465 PreParserExpression key, 464 PreParserExpression key,
466 int pos) { 465 int pos) {
467 if (obj.IsThis()) { 466 if (obj.IsThis()) {
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 // PreParser should not use FuncNameInferrer. 673 // PreParser should not use FuncNameInferrer.
675 UNREACHABLE(); 674 UNREACHABLE();
676 } 675 }
677 676
678 static void InferFunctionName(FuncNameInferrer* fni, 677 static void InferFunctionName(FuncNameInferrer* fni,
679 PreParserExpression expression) { 678 PreParserExpression expression) {
680 // PreParser should not use FuncNameInferrer. 679 // PreParser should not use FuncNameInferrer.
681 UNREACHABLE(); 680 UNREACHABLE();
682 } 681 }
683 682
684 static void CheckFunctionLiteralInsideTopLevelObjectLiteral(
685 Scope* scope, PreParserExpression property, bool* has_function) {}
686
687 static void CheckAssigningFunctionLiteralToProperty( 683 static void CheckAssigningFunctionLiteralToProperty(
688 PreParserExpression left, PreParserExpression right) {} 684 PreParserExpression left, PreParserExpression right) {}
689 685
690 static PreParserExpression MarkExpressionAsAssigned( 686 static PreParserExpression MarkExpressionAsAssigned(
691 PreParserExpression expression) { 687 PreParserExpression expression) {
692 // TODO(marja): To be able to produce the same errors, the preparser needs 688 // TODO(marja): To be able to produce the same errors, the preparser needs
693 // to start tracking which expressions are variables and which are assigned. 689 // to start tracking which expressions are variables and which are assigned.
694 return expression; 690 return expression;
695 } 691 }
696 692
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
1171 const PreParserFormalParameters& parameters, FunctionKind kind, 1167 const PreParserFormalParameters& parameters, FunctionKind kind,
1172 FunctionLiteral::FunctionType function_type, bool* ok) { 1168 FunctionLiteral::FunctionType function_type, bool* ok) {
1173 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters, 1169 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters,
1174 kind, function_type, ok); 1170 kind, function_type, ok);
1175 } 1171 }
1176 1172
1177 } // namespace internal 1173 } // namespace internal
1178 } // namespace v8 1174 } // namespace v8
1179 1175
1180 #endif // V8_PARSING_PREPARSER_H 1176 #endif // V8_PARSING_PREPARSER_H
OLDNEW
« no previous file with comments | « src/parsing/parser-base.h ('k') | src/runtime/runtime-literals.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698