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

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

Issue 1980483003: [es6] Reintroduce the instanceof operator in the backends. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Igors comments. Created 4 years, 7 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.h » ('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 974 matching lines...) Expand 10 before | Expand all | Expand 10 after
985 bool* ok); 985 bool* ok);
986 986
987 inline PreParserExpression RewriteAwaitExpression(PreParserExpression value, 987 inline PreParserExpression RewriteAwaitExpression(PreParserExpression value,
988 int pos); 988 int pos);
989 989
990 V8_INLINE Zone* zone() const; 990 V8_INLINE Zone* zone() const;
991 V8_INLINE ZoneList<PreParserExpression>* GetNonPatternList() const; 991 V8_INLINE ZoneList<PreParserExpression>* GetNonPatternList() const;
992 992
993 inline PreParserExpression RewriteYieldStar( 993 inline PreParserExpression RewriteYieldStar(
994 PreParserExpression generator, PreParserExpression expr, int pos); 994 PreParserExpression generator, PreParserExpression expr, int pos);
995 inline PreParserExpression RewriteInstanceof(PreParserExpression lhs,
996 PreParserExpression rhs,
997 int pos);
998 995
999 private: 996 private:
1000 PreParser* pre_parser_; 997 PreParser* pre_parser_;
1001 }; 998 };
1002 999
1003 1000
1004 // Preparsing checks a JavaScript program and emits preparse-data that helps 1001 // Preparsing checks a JavaScript program and emits preparse-data that helps
1005 // a later parsing to be faster. 1002 // a later parsing to be faster.
1006 // See preparse-data-format.h for the data format. 1003 // See preparse-data-format.h for the data format.
1007 1004
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
1225 ZoneList<PreParserExpression>* PreParserTraits::GetNonPatternList() const { 1222 ZoneList<PreParserExpression>* PreParserTraits::GetNonPatternList() const {
1226 return pre_parser_->function_state_->non_patterns_to_rewrite(); 1223 return pre_parser_->function_state_->non_patterns_to_rewrite();
1227 } 1224 }
1228 1225
1229 1226
1230 PreParserExpression PreParserTraits::RewriteYieldStar( 1227 PreParserExpression PreParserTraits::RewriteYieldStar(
1231 PreParserExpression generator, PreParserExpression expression, int pos) { 1228 PreParserExpression generator, PreParserExpression expression, int pos) {
1232 return PreParserExpression::Default(); 1229 return PreParserExpression::Default();
1233 } 1230 }
1234 1231
1235 PreParserExpression PreParserTraits::RewriteInstanceof(PreParserExpression lhs,
1236 PreParserExpression rhs,
1237 int pos) {
1238 return PreParserExpression::Default();
1239 }
1240
1241 PreParserStatementList PreParser::ParseEagerFunctionBody( 1232 PreParserStatementList PreParser::ParseEagerFunctionBody(
1242 PreParserIdentifier function_name, int pos, 1233 PreParserIdentifier function_name, int pos,
1243 const PreParserFormalParameters& parameters, FunctionKind kind, 1234 const PreParserFormalParameters& parameters, FunctionKind kind,
1244 FunctionLiteral::FunctionType function_type, bool* ok) { 1235 FunctionLiteral::FunctionType function_type, bool* ok) {
1245 ParsingModeScope parsing_mode(this, PARSE_EAGERLY); 1236 ParsingModeScope parsing_mode(this, PARSE_EAGERLY);
1246 1237
1247 Scope* inner_scope = scope_; 1238 Scope* inner_scope = scope_;
1248 if (!parameters.is_simple) inner_scope = NewScope(scope_, BLOCK_SCOPE); 1239 if (!parameters.is_simple) inner_scope = NewScope(scope_, BLOCK_SCOPE);
1249 1240
1250 { 1241 {
(...skipping 12 matching lines...) Expand all
1263 const PreParserFormalParameters& parameters, FunctionKind kind, 1254 const PreParserFormalParameters& parameters, FunctionKind kind,
1264 FunctionLiteral::FunctionType function_type, bool* ok) { 1255 FunctionLiteral::FunctionType function_type, bool* ok) {
1265 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters, 1256 return pre_parser_->ParseEagerFunctionBody(function_name, pos, parameters,
1266 kind, function_type, ok); 1257 kind, function_type, ok);
1267 } 1258 }
1268 1259
1269 } // namespace internal 1260 } // namespace internal
1270 } // namespace v8 1261 } // namespace v8
1271 1262
1272 #endif // V8_PARSING_PREPARSER_H 1263 #endif // V8_PARSING_PREPARSER_H
OLDNEW
« no previous file with comments | « src/parsing/parser-base.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698