| OLD | NEW | 
|---|
| 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 "allocation.h" | 8 #include "allocation.h" | 
| 9 #include "ast.h" | 9 #include "ast.h" | 
| 10 #include "compiler.h"  // For CachedDataMode | 10 #include "compiler.h"  // For CachedDataMode | 
| (...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 774       SingletonLogger* logger); | 774       SingletonLogger* logger); | 
| 775 | 775 | 
| 776   // Consumes the ending }. | 776   // Consumes the ending }. | 
| 777   ZoneList<Statement*>* ParseEagerFunctionBody(Handle<String> function_name, | 777   ZoneList<Statement*>* ParseEagerFunctionBody(Handle<String> function_name, | 
| 778                                                int pos, | 778                                                int pos, | 
| 779                                                Variable* fvar, | 779                                                Variable* fvar, | 
| 780                                                Token::Value fvar_init_op, | 780                                                Token::Value fvar_init_op, | 
| 781                                                bool is_generator, | 781                                                bool is_generator, | 
| 782                                                bool* ok); | 782                                                bool* ok); | 
| 783 | 783 | 
|  | 784   void ThrowPendingError(); | 
|  | 785 | 
| 784   Isolate* isolate_; | 786   Isolate* isolate_; | 
| 785 | 787 | 
| 786   Handle<Script> script_; | 788   Handle<Script> script_; | 
| 787   Scanner scanner_; | 789   Scanner scanner_; | 
| 788   PreParser* reusable_preparser_; | 790   PreParser* reusable_preparser_; | 
| 789   Scope* original_scope_;  // for ES5 function declarations in sloppy eval | 791   Scope* original_scope_;  // for ES5 function declarations in sloppy eval | 
| 790   Target* target_stack_;  // for break, continue statements | 792   Target* target_stack_;  // for break, continue statements | 
| 791   ScriptData** cached_data_; | 793   ScriptData** cached_data_; | 
| 792   CachedDataMode cached_data_mode_; | 794   CachedDataMode cached_data_mode_; | 
| 793 | 795 | 
| 794   CompilationInfo* info_; | 796   CompilationInfo* info_; | 
|  | 797 | 
|  | 798   // Pending errors. | 
|  | 799   bool has_pending_error_; | 
|  | 800   Scanner::Location pending_error_location_; | 
|  | 801   const char* pending_error_message_; | 
|  | 802   MaybeHandle<String> pending_error_arg_; | 
|  | 803   const char* pending_error_char_arg_; | 
|  | 804   bool pending_error_is_reference_error_; | 
| 795 }; | 805 }; | 
| 796 | 806 | 
| 797 | 807 | 
| 798 // Support for handling complex values (array and object literals) that | 808 // Support for handling complex values (array and object literals) that | 
| 799 // can be fully handled at compile time. | 809 // can be fully handled at compile time. | 
| 800 class CompileTimeValue: public AllStatic { | 810 class CompileTimeValue: public AllStatic { | 
| 801  public: | 811  public: | 
| 802   enum LiteralType { | 812   enum LiteralType { | 
| 803     OBJECT_LITERAL_FAST_ELEMENTS, | 813     OBJECT_LITERAL_FAST_ELEMENTS, | 
| 804     OBJECT_LITERAL_SLOW_ELEMENTS, | 814     OBJECT_LITERAL_SLOW_ELEMENTS, | 
| (...skipping 14 matching lines...) Expand all  Loading... | 
| 819  private: | 829  private: | 
| 820   static const int kLiteralTypeSlot = 0; | 830   static const int kLiteralTypeSlot = 0; | 
| 821   static const int kElementsSlot = 1; | 831   static const int kElementsSlot = 1; | 
| 822 | 832 | 
| 823   DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); | 833   DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); | 
| 824 }; | 834 }; | 
| 825 | 835 | 
| 826 } }  // namespace v8::internal | 836 } }  // namespace v8::internal | 
| 827 | 837 | 
| 828 #endif  // V8_PARSER_H_ | 838 #endif  // V8_PARSER_H_ | 
| OLD | NEW | 
|---|