| 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 "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/ast.h" | 9 #include "src/ast.h" |
| 10 #include "src/compiler.h" // For CachedDataMode | 10 #include "src/compiler.h" // For CachedDataMode |
| (...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 846 HistogramTimer* pre_parse_timer_; | 846 HistogramTimer* pre_parse_timer_; |
| 847 | 847 |
| 848 // Temporary; for debugging. See Parser::SkipLazyFunctionBody. TODO(marja): | 848 // Temporary; for debugging. See Parser::SkipLazyFunctionBody. TODO(marja): |
| 849 // remove this once done. | 849 // remove this once done. |
| 850 ScriptCompiler::CompileOptions debug_saved_compile_options_; | 850 ScriptCompiler::CompileOptions debug_saved_compile_options_; |
| 851 }; | 851 }; |
| 852 | 852 |
| 853 | 853 |
| 854 bool ParserTraits::IsFutureStrictReserved( | 854 bool ParserTraits::IsFutureStrictReserved( |
| 855 const AstRawString* identifier) const { | 855 const AstRawString* identifier) const { |
| 856 return identifier->IsOneByteEqualTo("yield") || | 856 return parser_->scanner()->IdentifierIsFutureStrictReserved(identifier); |
| 857 parser_->scanner()->IdentifierIsFutureStrictReserved(identifier); | |
| 858 } | 857 } |
| 859 | 858 |
| 860 | 859 |
| 861 Scope* ParserTraits::NewScope(Scope* parent_scope, ScopeType scope_type) { | 860 Scope* ParserTraits::NewScope(Scope* parent_scope, ScopeType scope_type) { |
| 862 return parser_->NewScope(parent_scope, scope_type); | 861 return parser_->NewScope(parent_scope, scope_type); |
| 863 } | 862 } |
| 864 | 863 |
| 865 | 864 |
| 866 const AstRawString* ParserTraits::EmptyIdentifierString() { | 865 const AstRawString* ParserTraits::EmptyIdentifierString() { |
| 867 return parser_->ast_value_factory()->empty_string(); | 866 return parser_->ast_value_factory()->empty_string(); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 919 private: | 918 private: |
| 920 static const int kLiteralTypeSlot = 0; | 919 static const int kLiteralTypeSlot = 0; |
| 921 static const int kElementsSlot = 1; | 920 static const int kElementsSlot = 1; |
| 922 | 921 |
| 923 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); | 922 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); |
| 924 }; | 923 }; |
| 925 | 924 |
| 926 } } // namespace v8::internal | 925 } } // namespace v8::internal |
| 927 | 926 |
| 928 #endif // V8_PARSER_H_ | 927 #endif // V8_PARSER_H_ |
| OLD | NEW |