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

Side by Side Diff: src/parser.h

Issue 1409253007: Scope cleanup: remove unused bits and accessors (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | src/pattern-rewriter.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_PARSER_H_ 5 #ifndef V8_PARSER_H_
6 #define V8_PARSER_H_ 6 #define V8_PARSER_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/ast.h" 9 #include "src/ast.h"
10 #include "src/compiler.h" // TODO(titzer): remove this include dependency 10 #include "src/compiler.h" // TODO(titzer): remove this include dependency
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 920
921 FunctionLiteral* ParseLazy(Isolate* isolate, ParseInfo* info); 921 FunctionLiteral* ParseLazy(Isolate* isolate, ParseInfo* info);
922 FunctionLiteral* ParseLazy(Isolate* isolate, ParseInfo* info, 922 FunctionLiteral* ParseLazy(Isolate* isolate, ParseInfo* info,
923 Utf16CharacterStream* source); 923 Utf16CharacterStream* source);
924 924
925 // Called by ParseProgram after setting up the scanner. 925 // Called by ParseProgram after setting up the scanner.
926 FunctionLiteral* DoParseProgram(ParseInfo* info); 926 FunctionLiteral* DoParseProgram(ParseInfo* info);
927 927
928 void SetCachedData(ParseInfo* info); 928 void SetCachedData(ParseInfo* info);
929 929
930 bool inside_with() const { return scope_->inside_with(); }
931 ScriptCompiler::CompileOptions compile_options() const { 930 ScriptCompiler::CompileOptions compile_options() const {
932 return compile_options_; 931 return compile_options_;
933 } 932 }
934 bool consume_cached_parse_data() const { 933 bool consume_cached_parse_data() const {
935 return compile_options_ == ScriptCompiler::kConsumeParserCache && 934 return compile_options_ == ScriptCompiler::kConsumeParserCache &&
936 cached_parse_data_ != NULL; 935 cached_parse_data_ != NULL;
937 } 936 }
938 bool produce_cached_parse_data() const { 937 bool produce_cached_parse_data() const {
939 return compile_options_ == ScriptCompiler::kProduceParserCache; 938 return compile_options_ == ScriptCompiler::kProduceParserCache;
940 } 939 }
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 pattern->Accept(this); 1041 pattern->Accept(this);
1043 current_value_ = old_value; 1042 current_value_ = old_value;
1044 } 1043 }
1045 1044
1046 Variable* CreateTempVar(Expression* value = nullptr); 1045 Variable* CreateTempVar(Expression* value = nullptr);
1047 1046
1048 AstNodeFactory* factory() const { return descriptor_->parser->factory(); } 1047 AstNodeFactory* factory() const { return descriptor_->parser->factory(); }
1049 AstValueFactory* ast_value_factory() const { 1048 AstValueFactory* ast_value_factory() const {
1050 return descriptor_->parser->ast_value_factory(); 1049 return descriptor_->parser->ast_value_factory();
1051 } 1050 }
1052 bool inside_with() const { return descriptor_->parser->inside_with(); }
1053 Zone* zone() const { return descriptor_->parser->zone(); } 1051 Zone* zone() const { return descriptor_->parser->zone(); }
1054 1052
1055 Expression* pattern_; 1053 Expression* pattern_;
1056 int initializer_position_; 1054 int initializer_position_;
1057 Block* block_; 1055 Block* block_;
1058 const DeclarationDescriptor* descriptor_; 1056 const DeclarationDescriptor* descriptor_;
1059 ZoneList<const AstRawString*>* names_; 1057 ZoneList<const AstRawString*>* names_;
1060 Expression* current_value_; 1058 Expression* current_value_;
1061 bool* ok_; 1059 bool* ok_;
1062 }; 1060 };
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
1387 1385
1388 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { 1386 DoExpression* ParserTraits::ParseDoExpression(bool* ok) {
1389 return parser_->ParseDoExpression(ok); 1387 return parser_->ParseDoExpression(ok);
1390 } 1388 }
1391 1389
1392 1390
1393 } // namespace internal 1391 } // namespace internal
1394 } // namespace v8 1392 } // namespace v8
1395 1393
1396 #endif // V8_PARSER_H_ 1394 #endif // V8_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | src/pattern-rewriter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698