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

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

Issue 2399833002: Teach Scopes whether they will end up being lazily compiled or not (Closed)
Patch Set: rebase Created 4 years, 2 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') | no next file » | 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/parsing/parser-base.h" 9 #include "src/parsing/parser-base.h"
10 10
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 bool IsBinaryOperation() const { 306 bool IsBinaryOperation() const {
307 return TypeField::decode(code_) == kBinaryOperationExpression; 307 return TypeField::decode(code_) == kBinaryOperationExpression;
308 } 308 }
309 309
310 // Dummy implementation for making expression->somefunc() work in both Parser 310 // Dummy implementation for making expression->somefunc() work in both Parser
311 // and PreParser. 311 // and PreParser.
312 PreParserExpression* operator->() { return this; } 312 PreParserExpression* operator->() { return this; }
313 313
314 // More dummy implementations of things PreParser doesn't need to track: 314 // More dummy implementations of things PreParser doesn't need to track:
315 void set_index(int index) {} // For YieldExpressions 315 void set_index(int index) {} // For YieldExpressions
316 void set_should_eager_compile() {} 316 void SetShouldEagerCompile() {}
317 void set_should_be_used_once_hint() {} 317 void set_should_be_used_once_hint() {}
318 318
319 int position() const { return kNoSourcePosition; } 319 int position() const { return kNoSourcePosition; }
320 void set_function_token_position(int position) {} 320 void set_function_token_position(int position) {}
321 321
322 void set_is_class_field_initializer(bool is_class_field_initializer) {} 322 void set_is_class_field_initializer(bool is_class_field_initializer) {}
323 323
324 private: 324 private:
325 enum Type { 325 enum Type {
326 kEmpty, 326 kEmpty,
(...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after
1479 function_state_->NextMaterializedLiteralIndex(); 1479 function_state_->NextMaterializedLiteralIndex();
1480 function_state_->NextMaterializedLiteralIndex(); 1480 function_state_->NextMaterializedLiteralIndex();
1481 } 1481 }
1482 return EmptyExpression(); 1482 return EmptyExpression();
1483 } 1483 }
1484 1484
1485 } // namespace internal 1485 } // namespace internal
1486 } // namespace v8 1486 } // namespace v8
1487 1487
1488 #endif // V8_PARSING_PREPARSER_H 1488 #endif // V8_PARSING_PREPARSER_H
OLDNEW
« no previous file with comments | « src/parsing/parser-base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698