| 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/ast/ast.h" | 8 #include "src/ast/ast.h" |
| 9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
| 10 #include "src/base/compiler-specific.h" | 10 #include "src/base/compiler-specific.h" |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) { | 199 class V8_EXPORT_PRIVATE Parser : public NON_EXPORTED_BASE(ParserBase<Parser>) { |
| 200 public: | 200 public: |
| 201 explicit Parser(ParseInfo* info); | 201 explicit Parser(ParseInfo* info); |
| 202 ~Parser() { | 202 ~Parser() { |
| 203 delete reusable_preparser_; | 203 delete reusable_preparser_; |
| 204 reusable_preparser_ = NULL; | 204 reusable_preparser_ = NULL; |
| 205 delete cached_parse_data_; | 205 delete cached_parse_data_; |
| 206 cached_parse_data_ = NULL; | 206 cached_parse_data_ = NULL; |
| 207 } | 207 } |
| 208 | 208 |
| 209 static bool const IsPreParser() { return false; } | 209 static bool IsPreParser() { return false; } |
| 210 | 210 |
| 211 void ParseOnBackground(ParseInfo* info); | 211 void ParseOnBackground(ParseInfo* info); |
| 212 | 212 |
| 213 // Deserialize the scope chain prior to parsing in which the script is going | 213 // Deserialize the scope chain prior to parsing in which the script is going |
| 214 // to be executed. If the script is a top-level script, or the scope chain | 214 // to be executed. If the script is a top-level script, or the scope chain |
| 215 // consists of only a native context, maybe_outer_scope_info should be an | 215 // consists of only a native context, maybe_outer_scope_info should be an |
| 216 // empty handle. | 216 // empty handle. |
| 217 // | 217 // |
| 218 // This only deserializes the scope chain, but doesn't connect the scopes to | 218 // This only deserializes the scope chain, but doesn't connect the scopes to |
| 219 // their corresponding scope infos. Therefore, looking up variables in the | 219 // their corresponding scope infos. Therefore, looking up variables in the |
| (...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1230 | 1230 |
| 1231 private: | 1231 private: |
| 1232 ParserTarget** variable_; | 1232 ParserTarget** variable_; |
| 1233 ParserTarget* previous_; | 1233 ParserTarget* previous_; |
| 1234 }; | 1234 }; |
| 1235 | 1235 |
| 1236 } // namespace internal | 1236 } // namespace internal |
| 1237 } // namespace v8 | 1237 } // namespace v8 |
| 1238 | 1238 |
| 1239 #endif // V8_PARSING_PARSER_H_ | 1239 #endif // V8_PARSING_PARSER_H_ |
| OLD | NEW |