| OLD | NEW |
| 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 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 bool in_global_context, | 459 bool in_global_context, |
| 460 StrictModeFlag strict_mode, | 460 StrictModeFlag strict_mode, |
| 461 ZoneScope* zone_scope); | 461 ZoneScope* zone_scope); |
| 462 | 462 |
| 463 // Report syntax error | 463 // Report syntax error |
| 464 void ReportUnexpectedToken(Token::Value token); | 464 void ReportUnexpectedToken(Token::Value token); |
| 465 void ReportInvalidPreparseData(Handle<String> name, bool* ok); | 465 void ReportInvalidPreparseData(Handle<String> name, bool* ok); |
| 466 void ReportMessage(const char* message, Vector<const char*> args); | 466 void ReportMessage(const char* message, Vector<const char*> args); |
| 467 | 467 |
| 468 bool inside_with() const { return with_nesting_level_ > 0; } | 468 bool inside_with() const { return with_nesting_level_ > 0; } |
| 469 V8JavaScriptScanner& scanner() { return scanner_; } | 469 JavaScriptScanner& scanner() { return scanner_; } |
| 470 Mode mode() const { return mode_; } | 470 Mode mode() const { return mode_; } |
| 471 ScriptDataImpl* pre_data() const { return pre_data_; } | 471 ScriptDataImpl* pre_data() const { return pre_data_; } |
| 472 | 472 |
| 473 // Check if the given string is 'eval' or 'arguments'. | 473 // Check if the given string is 'eval' or 'arguments'. |
| 474 bool IsEvalOrArguments(Handle<String> string); | 474 bool IsEvalOrArguments(Handle<String> string); |
| 475 | 475 |
| 476 // All ParseXXX functions take as the last argument an *ok parameter | 476 // All ParseXXX functions take as the last argument an *ok parameter |
| 477 // which is set to false if parsing failed; it is unchanged otherwise. | 477 // which is set to false if parsing failed; it is unchanged otherwise. |
| 478 // By making the 'exception handling' explicit, we are forced to check | 478 // By making the 'exception handling' explicit, we are forced to check |
| 479 // for failure at the call sites. | 479 // for failure at the call sites. |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 688 | 688 |
| 689 // Generic AST generator for throwing errors from compiled code. | 689 // Generic AST generator for throwing errors from compiled code. |
| 690 Expression* NewThrowError(Handle<String> constructor, | 690 Expression* NewThrowError(Handle<String> constructor, |
| 691 Handle<String> type, | 691 Handle<String> type, |
| 692 Vector< Handle<Object> > arguments); | 692 Vector< Handle<Object> > arguments); |
| 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 JavaScriptScanner scanner_; |
| 699 | 699 |
| 700 Scope* top_scope_; | 700 Scope* top_scope_; |
| 701 int with_nesting_level_; | 701 int with_nesting_level_; |
| 702 | 702 |
| 703 LexicalScope* lexical_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_; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 private: | 746 private: |
| 747 static const int kTypeSlot = 0; | 747 static const int kTypeSlot = 0; |
| 748 static const int kElementsSlot = 1; | 748 static const int kElementsSlot = 1; |
| 749 | 749 |
| 750 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); | 750 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); |
| 751 }; | 751 }; |
| 752 | 752 |
| 753 } } // namespace v8::internal | 753 } } // namespace v8::internal |
| 754 | 754 |
| 755 #endif // V8_PARSER_H_ | 755 #endif // V8_PARSER_H_ |
| OLD | NEW |