| OLD | NEW |
| 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 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 void ReportMessage(const char* message, Vector<const char*> args); | 585 void ReportMessage(const char* message, Vector<const char*> args); |
| 586 void ReportMessage(const char* message, Vector<Handle<String> > args); | 586 void ReportMessage(const char* message, Vector<Handle<String> > args); |
| 587 | 587 |
| 588 void set_pre_parse_data(ScriptDataImpl *data) { | 588 void set_pre_parse_data(ScriptDataImpl *data) { |
| 589 pre_parse_data_ = data; | 589 pre_parse_data_ = data; |
| 590 symbol_cache_.Initialize(data ? data->symbol_count() : 0, zone()); | 590 symbol_cache_.Initialize(data ? data->symbol_count() : 0, zone()); |
| 591 } | 591 } |
| 592 | 592 |
| 593 bool inside_with() const { return top_scope_->inside_with(); } | 593 bool inside_with() const { return top_scope_->inside_with(); } |
| 594 Scanner& scanner() { return scanner_; } | 594 Scanner& scanner() { return scanner_; } |
| 595 int position() { return scanner_.location().beg_pos; } |
| 596 int peek_position() { return scanner_.peek_location().beg_pos; } |
| 595 Mode mode() const { return mode_; } | 597 Mode mode() const { return mode_; } |
| 596 ScriptDataImpl* pre_parse_data() const { return pre_parse_data_; } | 598 ScriptDataImpl* pre_parse_data() const { return pre_parse_data_; } |
| 597 bool is_extended_mode() { | 599 bool is_extended_mode() { |
| 598 ASSERT(top_scope_ != NULL); | 600 ASSERT(top_scope_ != NULL); |
| 599 return top_scope_->is_extended_mode(); | 601 return top_scope_->is_extended_mode(); |
| 600 } | 602 } |
| 601 Scope* DeclarationScope(VariableMode mode) { | 603 Scope* DeclarationScope(VariableMode mode) { |
| 602 return IsLexicalVariableMode(mode) | 604 return IsLexicalVariableMode(mode) |
| 603 ? top_scope_ : top_scope_->DeclarationScope(); | 605 ? top_scope_ : top_scope_->DeclarationScope(); |
| 604 } | 606 } |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 scanner().next_literal_ascii_string(), tenured); | 763 scanner().next_literal_ascii_string(), tenured); |
| 762 } else { | 764 } else { |
| 763 return isolate_->factory()->NewStringFromTwoByte( | 765 return isolate_->factory()->NewStringFromTwoByte( |
| 764 scanner().next_literal_utf16_string(), tenured); | 766 scanner().next_literal_utf16_string(), tenured); |
| 765 } | 767 } |
| 766 } | 768 } |
| 767 | 769 |
| 768 Handle<String> GetSymbol(); | 770 Handle<String> GetSymbol(); |
| 769 | 771 |
| 770 // Get odd-ball literals. | 772 // Get odd-ball literals. |
| 771 Literal* GetLiteralUndefined(); | 773 Literal* GetLiteralUndefined(int position); |
| 772 Literal* GetLiteralTheHole(); | 774 Literal* GetLiteralTheHole(int position); |
| 773 | 775 |
| 774 Handle<String> ParseIdentifier(bool* ok); | 776 Handle<String> ParseIdentifier(bool* ok); |
| 775 Handle<String> ParseIdentifierOrStrictReservedWord( | 777 Handle<String> ParseIdentifierOrStrictReservedWord( |
| 776 bool* is_strict_reserved, bool* ok); | 778 bool* is_strict_reserved, bool* ok); |
| 777 Handle<String> ParseIdentifierName(bool* ok); | 779 Handle<String> ParseIdentifierName(bool* ok); |
| 778 Handle<String> ParseIdentifierNameOrGetOrSet(bool* is_get, | 780 Handle<String> ParseIdentifierNameOrGetOrSet(bool* is_get, |
| 779 bool* is_set, | 781 bool* is_set, |
| 780 bool* ok); | 782 bool* ok); |
| 781 | 783 |
| 782 // Determine if the expression is a variable proxy and mark it as being used | 784 // Determine if the expression is a variable proxy and mark it as being used |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 906 private: | 908 private: |
| 907 static const int kLiteralTypeSlot = 0; | 909 static const int kLiteralTypeSlot = 0; |
| 908 static const int kElementsSlot = 1; | 910 static const int kElementsSlot = 1; |
| 909 | 911 |
| 910 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); | 912 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); |
| 911 }; | 913 }; |
| 912 | 914 |
| 913 } } // namespace v8::internal | 915 } } // namespace v8::internal |
| 914 | 916 |
| 915 #endif // V8_PARSER_H_ | 917 #endif // V8_PARSER_H_ |
| OLD | NEW |