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" // TODO(titzer): remove this include dependency | 10 #include "src/compiler.h" // TODO(titzer): remove this include dependency |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 } | 97 } |
98 | 98 |
99 Scope* script_scope() { return script_scope_; } | 99 Scope* script_scope() { return script_scope_; } |
100 void set_script_scope(Scope* script_scope) { script_scope_ = script_scope; } | 100 void set_script_scope(Scope* script_scope) { script_scope_ = script_scope; } |
101 | 101 |
102 AstValueFactory* ast_value_factory() { return ast_value_factory_; } | 102 AstValueFactory* ast_value_factory() { return ast_value_factory_; } |
103 void set_ast_value_factory(AstValueFactory* ast_value_factory) { | 103 void set_ast_value_factory(AstValueFactory* ast_value_factory) { |
104 ast_value_factory_ = ast_value_factory; | 104 ast_value_factory_ = ast_value_factory; |
105 } | 105 } |
106 | 106 |
107 FunctionLiteral* function() { // TODO(titzer): temporary name adapter | |
108 return literal_; | |
109 } | |
110 FunctionLiteral* literal() { return literal_; } | 107 FunctionLiteral* literal() { return literal_; } |
111 void set_literal(FunctionLiteral* literal) { literal_ = literal; } | 108 void set_literal(FunctionLiteral* literal) { literal_ = literal; } |
112 | 109 |
113 Scope* scope() { return scope_; } | 110 Scope* scope() { return scope_; } |
114 void set_scope(Scope* scope) { scope_ = scope; } | 111 void set_scope(Scope* scope) { scope_ = scope; } |
115 | 112 |
116 UnicodeCache* unicode_cache() { return unicode_cache_; } | 113 UnicodeCache* unicode_cache() { return unicode_cache_; } |
117 void set_unicode_cache(UnicodeCache* unicode_cache) { | 114 void set_unicode_cache(UnicodeCache* unicode_cache) { |
118 unicode_cache_ = unicode_cache; | 115 unicode_cache_ = unicode_cache; |
119 } | 116 } |
(...skipping 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1363 parser_->BuildParameterInitializationBlock(parameters, ok); | 1360 parser_->BuildParameterInitializationBlock(parameters, ok); |
1364 if (!*ok) return; | 1361 if (!*ok) return; |
1365 if (init_block != nullptr) { | 1362 if (init_block != nullptr) { |
1366 body->Add(init_block, parser_->zone()); | 1363 body->Add(init_block, parser_->zone()); |
1367 } | 1364 } |
1368 } | 1365 } |
1369 } | 1366 } |
1370 } } // namespace v8::internal | 1367 } } // namespace v8::internal |
1371 | 1368 |
1372 #endif // V8_PARSER_H_ | 1369 #endif // V8_PARSER_H_ |
OLD | NEW |