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 #include "src/parsing/parser.h" | 5 #include "src/parsing/parser.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "src/api.h" | 9 #include "src/api.h" |
10 #include "src/ast/ast-expression-rewriter.h" | 10 #include "src/ast/ast-expression-rewriter.h" |
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
764 info->set_ast_value_factory(new AstValueFactory(zone(), info->hash_seed())); | 764 info->set_ast_value_factory(new AstValueFactory(zone(), info->hash_seed())); |
765 info->set_ast_value_factory_owned(); | 765 info->set_ast_value_factory_owned(); |
766 ast_value_factory_ = info->ast_value_factory(); | 766 ast_value_factory_ = info->ast_value_factory(); |
767 ast_node_factory_.set_ast_value_factory(ast_value_factory_); | 767 ast_node_factory_.set_ast_value_factory(ast_value_factory_); |
768 } | 768 } |
769 } | 769 } |
770 | 770 |
771 void Parser::DeserializeScopeChain( | 771 void Parser::DeserializeScopeChain( |
772 ParseInfo* info, Handle<Context> context, | 772 ParseInfo* info, Handle<Context> context, |
773 Scope::DeserializationMode deserialization_mode) { | 773 Scope::DeserializationMode deserialization_mode) { |
| 774 DCHECK(ThreadId::Current().Equals(info->isolate()->thread_id())); |
774 // TODO(wingo): Add an outer SCRIPT_SCOPE corresponding to the native | 775 // TODO(wingo): Add an outer SCRIPT_SCOPE corresponding to the native |
775 // context, which will have the "this" binding for script scopes. | 776 // context, which will have the "this" binding for script scopes. |
776 DeclarationScope* script_scope = NewScriptScope(); | 777 DeclarationScope* script_scope = NewScriptScope(); |
777 info->set_script_scope(script_scope); | 778 info->set_script_scope(script_scope); |
778 Scope* scope = script_scope; | 779 Scope* scope = script_scope; |
779 if (!context.is_null() && !context->IsNativeContext()) { | 780 if (!context.is_null() && !context->IsNativeContext()) { |
780 scope = Scope::DeserializeScopeChain(info->isolate(), zone(), *context, | 781 scope = Scope::DeserializeScopeChain(info->isolate(), zone(), *context, |
781 script_scope, ast_value_factory(), | 782 script_scope, ast_value_factory(), |
782 deserialization_mode); | 783 deserialization_mode); |
783 if (info->context().is_null()) { | 784 if (info->context().is_null()) { |
(...skipping 6149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6933 node->Print(Isolate::Current()); | 6934 node->Print(Isolate::Current()); |
6934 } | 6935 } |
6935 #endif // DEBUG | 6936 #endif // DEBUG |
6936 | 6937 |
6937 #undef CHECK_OK | 6938 #undef CHECK_OK |
6938 #undef CHECK_OK_VOID | 6939 #undef CHECK_OK_VOID |
6939 #undef CHECK_FAILED | 6940 #undef CHECK_FAILED |
6940 | 6941 |
6941 } // namespace internal | 6942 } // namespace internal |
6942 } // namespace v8 | 6943 } // namespace v8 |
OLD | NEW |