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

Side by Side Diff: src/parser.h

Issue 6714040: Merge TemporaryScope with LexicalScope. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 9 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 | 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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 24 matching lines...) Expand all
35 #include "preparse-data.h" 35 #include "preparse-data.h"
36 36
37 namespace v8 { 37 namespace v8 {
38 namespace internal { 38 namespace internal {
39 39
40 class CompilationInfo; 40 class CompilationInfo;
41 class FuncNameInferrer; 41 class FuncNameInferrer;
42 class ParserLog; 42 class ParserLog;
43 class PositionStack; 43 class PositionStack;
44 class Target; 44 class Target;
45 class TemporaryScope; 45 class LexicalScope;
46 46
47 template <typename T> class ZoneListWrapper; 47 template <typename T> class ZoneListWrapper;
48 48
49 49
50 class ParserMessage : public Malloced { 50 class ParserMessage : public Malloced {
51 public: 51 public:
52 ParserMessage(Scanner::Location loc, const char* message, 52 ParserMessage(Scanner::Location loc, const char* message,
53 Vector<const char*> args) 53 Vector<const char*> args)
54 : loc_(loc), 54 : loc_(loc),
55 message_(message), 55 message_(message),
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 693
694 Isolate* isolate_; 694 Isolate* isolate_;
695 ZoneList<Handle<String> > symbol_cache_; 695 ZoneList<Handle<String> > symbol_cache_;
696 696
697 Handle<Script> script_; 697 Handle<Script> script_;
698 V8JavaScriptScanner scanner_; 698 V8JavaScriptScanner scanner_;
699 699
700 Scope* top_scope_; 700 Scope* top_scope_;
701 int with_nesting_level_; 701 int with_nesting_level_;
702 702
703 TemporaryScope* temp_scope_; 703 LexicalScope* lexical_scope_;
704 Mode mode_; 704 Mode mode_;
705 705
706 Target* target_stack_; // for break, continue statements 706 Target* target_stack_; // for break, continue statements
707 bool allow_natives_syntax_; 707 bool allow_natives_syntax_;
708 v8::Extension* extension_; 708 v8::Extension* extension_;
709 bool is_pre_parsing_; 709 bool is_pre_parsing_;
710 ScriptDataImpl* pre_data_; 710 ScriptDataImpl* pre_data_;
711 FuncNameInferrer* fni_; 711 FuncNameInferrer* fni_;
712 bool stack_overflow_; 712 bool stack_overflow_;
713 // If true, the next (and immediately following) function literal is 713 // If true, the next (and immediately following) function literal is
714 // preceded by a parenthesis. 714 // preceded by a parenthesis.
715 // Heuristically that means that the function will be called immediately, 715 // Heuristically that means that the function will be called immediately,
716 // so never lazily compile it. 716 // so never lazily compile it.
717 bool parenthesized_function_; 717 bool parenthesized_function_;
718
719 friend class LexicalScope;
Martin Maly 2011/03/21 03:48:13 Making LexicalScope friend so that it doesn't have
718 }; 720 };
719 721
720 722
721 // Support for handling complex values (array and object literals) that 723 // Support for handling complex values (array and object literals) that
722 // can be fully handled at compile time. 724 // can be fully handled at compile time.
723 class CompileTimeValue: public AllStatic { 725 class CompileTimeValue: public AllStatic {
724 public: 726 public:
725 enum Type { 727 enum Type {
726 OBJECT_LITERAL_FAST_ELEMENTS, 728 OBJECT_LITERAL_FAST_ELEMENTS,
727 OBJECT_LITERAL_SLOW_ELEMENTS, 729 OBJECT_LITERAL_SLOW_ELEMENTS,
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 // Converts the currently parsed literal to a JavaScript String. 804 // Converts the currently parsed literal to a JavaScript String.
803 Handle<String> GetString(); 805 Handle<String> GetString();
804 806
805 Isolate* isolate_; 807 Isolate* isolate_;
806 JsonScanner scanner_; 808 JsonScanner scanner_;
807 bool stack_overflow_; 809 bool stack_overflow_;
808 }; 810 };
809 } } // namespace v8::internal 811 } } // namespace v8::internal
810 812
811 #endif // V8_PARSER_H_ 813 #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