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

Side by Side Diff: src/parser.h

Issue 8384003: Merged Scanner and JavaScriptScanner. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 bool in_global_context, 479 bool in_global_context,
480 StrictModeFlag strict_mode, 480 StrictModeFlag strict_mode,
481 ZoneScope* zone_scope); 481 ZoneScope* zone_scope);
482 482
483 // Report syntax error 483 // Report syntax error
484 void ReportUnexpectedToken(Token::Value token); 484 void ReportUnexpectedToken(Token::Value token);
485 void ReportInvalidPreparseData(Handle<String> name, bool* ok); 485 void ReportInvalidPreparseData(Handle<String> name, bool* ok);
486 void ReportMessage(const char* message, Vector<const char*> args); 486 void ReportMessage(const char* message, Vector<const char*> args);
487 487
488 bool inside_with() const { return top_scope_->inside_with(); } 488 bool inside_with() const { return top_scope_->inside_with(); }
489 JavaScriptScanner& scanner() { return scanner_; } 489 Scanner& scanner() { return scanner_; }
490 Mode mode() const { return mode_; } 490 Mode mode() const { return mode_; }
491 ScriptDataImpl* pre_data() const { return pre_data_; } 491 ScriptDataImpl* pre_data() const { return pre_data_; }
492 492
493 // Check if the given string is 'eval' or 'arguments'. 493 // Check if the given string is 'eval' or 'arguments'.
494 bool IsEvalOrArguments(Handle<String> string); 494 bool IsEvalOrArguments(Handle<String> string);
495 495
496 // All ParseXXX functions take as the last argument an *ok parameter 496 // All ParseXXX functions take as the last argument an *ok parameter
497 // which is set to false if parsing failed; it is unchanged otherwise. 497 // which is set to false if parsing failed; it is unchanged otherwise.
498 // By making the 'exception handling' explicit, we are forced to check 498 // By making the 'exception handling' explicit, we are forced to check
499 // for failure at the call sites. 499 // for failure at the call sites.
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 719
720 // Generic AST generator for throwing errors from compiled code. 720 // Generic AST generator for throwing errors from compiled code.
721 Expression* NewThrowError(Handle<String> constructor, 721 Expression* NewThrowError(Handle<String> constructor,
722 Handle<String> type, 722 Handle<String> type,
723 Vector< Handle<Object> > arguments); 723 Vector< Handle<Object> > arguments);
724 724
725 Isolate* isolate_; 725 Isolate* isolate_;
726 ZoneList<Handle<String> > symbol_cache_; 726 ZoneList<Handle<String> > symbol_cache_;
727 727
728 Handle<Script> script_; 728 Handle<Script> script_;
729 JavaScriptScanner scanner_; 729 Scanner scanner_;
730 730
731 Scope* top_scope_; 731 Scope* top_scope_;
732 732
733 LexicalScope* lexical_scope_; 733 LexicalScope* lexical_scope_;
734 Mode mode_; 734 Mode mode_;
735 735
736 Target* target_stack_; // for break, continue statements 736 Target* target_stack_; // for break, continue statements
737 bool allow_natives_syntax_; 737 bool allow_natives_syntax_;
738 v8::Extension* extension_; 738 v8::Extension* extension_;
739 bool is_pre_parsing_; 739 bool is_pre_parsing_;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 private: 778 private:
779 static const int kTypeSlot = 0; 779 static const int kTypeSlot = 0;
780 static const int kElementsSlot = 1; 780 static const int kElementsSlot = 1;
781 781
782 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); 782 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue);
783 }; 783 };
784 784
785 } } // namespace v8::internal 785 } } // namespace v8::internal
786 786
787 #endif // V8_PARSER_H_ 787 #endif // V8_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698