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

Side by Side Diff: src/parser.h

Issue 98863002: Experimental scanner: fix harmony flag setting. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « src/lexer/lexer-shell.cc ('k') | src/parser.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 407
408 // Forward declaration. 408 // Forward declaration.
409 class SingletonLogger; 409 class SingletonLogger;
410 410
411 class Parser : public ParserBase { 411 class Parser : public ParserBase {
412 public: 412 public:
413 explicit Parser(CompilationInfo* info); 413 explicit Parser(CompilationInfo* info);
414 ~Parser() { 414 ~Parser() {
415 delete reusable_preparser_; 415 delete reusable_preparser_;
416 reusable_preparser_ = NULL; 416 reusable_preparser_ = NULL;
417 delete scanner_;
418 scanner_ = NULL;
419 } 417 }
420 418
421 // Parses the source code represented by the compilation info and sets its 419 // Parses the source code represented by the compilation info and sets its
422 // function literal. Returns false (and deallocates any allocated AST 420 // function literal. Returns false (and deallocates any allocated AST
423 // nodes) if parsing failed. 421 // nodes) if parsing failed.
424 static bool Parse(CompilationInfo* info) { return Parser(info).Parse(); } 422 static bool Parse(CompilationInfo* info) { return Parser(info).Parse(); }
425 bool Parse(); 423 bool Parse();
426 424
427 private: 425 private:
428 static const int kMaxNumFunctionLocals = 131071; // 2^17-1 426 static const int kMaxNumFunctionLocals = 131071; // 2^17-1
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 Handle<String> type, 752 Handle<String> type,
755 Vector< Handle<Object> > arguments); 753 Vector< Handle<Object> > arguments);
756 754
757 PreParser::PreParseResult LazyParseFunctionLiteral( 755 PreParser::PreParseResult LazyParseFunctionLiteral(
758 SingletonLogger* logger); 756 SingletonLogger* logger);
759 757
760 AstNodeFactory<AstConstructionVisitor>* factory() { 758 AstNodeFactory<AstConstructionVisitor>* factory() {
761 return current_function_state_->factory(); 759 return current_function_state_->factory();
762 } 760 }
763 761
762 void SetScannerFlags();
763
764 Isolate* isolate_; 764 Isolate* isolate_;
765 ZoneList<Handle<String> > symbol_cache_; 765 ZoneList<Handle<String> > symbol_cache_;
766 766
767 Handle<Script> script_; 767 Handle<Script> script_;
768 PreParser* reusable_preparser_; 768 PreParser* reusable_preparser_;
769 Scope* top_scope_; 769 Scope* top_scope_;
770 Scope* original_scope_; // for ES5 function declarations in sloppy eval 770 Scope* original_scope_; // for ES5 function declarations in sloppy eval
771 FunctionState* current_function_state_; 771 FunctionState* current_function_state_;
772 Target* target_stack_; // for break, continue statements 772 Target* target_stack_; // for break, continue statements
773 v8::Extension* extension_; 773 v8::Extension* extension_;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 private: 812 private:
813 static const int kLiteralTypeSlot = 0; 813 static const int kLiteralTypeSlot = 0;
814 static const int kElementsSlot = 1; 814 static const int kElementsSlot = 1;
815 815
816 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); 816 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue);
817 }; 817 };
818 818
819 } } // namespace v8::internal 819 } } // namespace v8::internal
820 820
821 #endif // V8_PARSER_H_ 821 #endif // V8_PARSER_H_
OLDNEW
« no previous file with comments | « src/lexer/lexer-shell.cc ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698