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_PARSING_PARSER_H_ | 5 #ifndef V8_PARSING_PARSER_H_ |
6 #define V8_PARSING_PARSER_H_ | 6 #define V8_PARSING_PARSER_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/ast/ast.h" | 9 #include "src/ast/ast.h" |
10 #include "src/ast/scopes.h" | 10 #include "src/ast/scopes.h" |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 void set_isolate(Isolate* isolate) { isolate_ = isolate; } | 168 void set_isolate(Isolate* isolate) { isolate_ = isolate; } |
169 void set_shared_info(Handle<SharedFunctionInfo> shared) { shared_ = shared; } | 169 void set_shared_info(Handle<SharedFunctionInfo> shared) { shared_ = shared; } |
170 void set_context(Handle<Context> context) { context_ = context; } | 170 void set_context(Handle<Context> context) { context_ = context; } |
171 void set_script(Handle<Script> script) { script_ = script; } | 171 void set_script(Handle<Script> script) { script_ = script; } |
172 //-------------------------------------------------------------------------- | 172 //-------------------------------------------------------------------------- |
173 | 173 |
174 LanguageMode language_mode() const { | 174 LanguageMode language_mode() const { |
175 return construct_language_mode(is_strict_mode()); | 175 return construct_language_mode(is_strict_mode()); |
176 } | 176 } |
177 void set_language_mode(LanguageMode language_mode) { | 177 void set_language_mode(LanguageMode language_mode) { |
178 STATIC_ASSERT(LANGUAGE_END == 2); | 178 STATIC_ASSERT(LANGUAGE_END == 3); |
179 set_strict_mode(is_strict(language_mode)); | 179 set_strict_mode(is_strict(language_mode)); |
180 } | 180 } |
181 | 181 |
182 void ReopenHandlesInNewHandleScope() { | 182 void ReopenHandlesInNewHandleScope() { |
183 shared_ = Handle<SharedFunctionInfo>(*shared_); | 183 shared_ = Handle<SharedFunctionInfo>(*shared_); |
184 script_ = Handle<Script>(*script_); | 184 script_ = Handle<Script>(*script_); |
185 context_ = Handle<Context>(*context_); | 185 context_ = Handle<Context>(*context_); |
186 } | 186 } |
187 | 187 |
188 #ifdef DEBUG | 188 #ifdef DEBUG |
(...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1377 | 1377 |
1378 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { | 1378 DoExpression* ParserTraits::ParseDoExpression(bool* ok) { |
1379 return parser_->ParseDoExpression(ok); | 1379 return parser_->ParseDoExpression(ok); |
1380 } | 1380 } |
1381 | 1381 |
1382 | 1382 |
1383 } // namespace internal | 1383 } // namespace internal |
1384 } // namespace v8 | 1384 } // namespace v8 |
1385 | 1385 |
1386 #endif // V8_PARSING_PARSER_H_ | 1386 #endif // V8_PARSING_PARSER_H_ |
OLD | NEW |