OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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/parse-info.h" | 5 #include "src/parsing/parse-info.h" |
6 | 6 |
7 #include "src/ast/ast-value-factory.h" | 7 #include "src/ast/ast-value-factory.h" |
8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 29 matching lines...) Expand all Loading... |
40 set_hash_seed(isolate_->heap()->HashSeed()); | 40 set_hash_seed(isolate_->heap()->HashSeed()); |
41 set_is_named_expression(shared->is_named_expression()); | 41 set_is_named_expression(shared->is_named_expression()); |
42 set_calls_eval(shared->scope_info()->CallsEval()); | 42 set_calls_eval(shared->scope_info()->CallsEval()); |
43 set_compiler_hints(shared->compiler_hints()); | 43 set_compiler_hints(shared->compiler_hints()); |
44 set_start_position(shared->start_position()); | 44 set_start_position(shared->start_position()); |
45 set_end_position(shared->end_position()); | 45 set_end_position(shared->end_position()); |
46 set_stack_limit(isolate_->stack_guard()->real_climit()); | 46 set_stack_limit(isolate_->stack_guard()->real_climit()); |
47 set_unicode_cache(isolate_->unicode_cache()); | 47 set_unicode_cache(isolate_->unicode_cache()); |
48 set_language_mode(shared->language_mode()); | 48 set_language_mode(shared->language_mode()); |
49 set_shared_info(shared); | 49 set_shared_info(shared); |
| 50 set_module(shared->kind() == FunctionKind::kModule); |
50 | 51 |
51 Handle<Script> script(Script::cast(shared->script())); | 52 Handle<Script> script(Script::cast(shared->script())); |
52 set_script(script); | 53 set_script(script); |
53 set_native(script->type() == Script::TYPE_NATIVE); | 54 set_native(script->type() == Script::TYPE_NATIVE); |
54 set_eval(script->compilation_type() == Script::COMPILATION_TYPE_EVAL); | 55 set_eval(script->compilation_type() == Script::COMPILATION_TYPE_EVAL); |
55 | 56 |
56 Handle<HeapObject> scope_info(shared->outer_scope_info()); | 57 Handle<HeapObject> scope_info(shared->outer_scope_info()); |
57 if (!scope_info->IsTheHole(isolate()) && | 58 if (!scope_info->IsTheHole(isolate()) && |
58 Handle<ScopeInfo>::cast(scope_info)->length() > 0) { | 59 Handle<ScopeInfo>::cast(scope_info)->length() > 0) { |
59 set_outer_scope_info(Handle<ScopeInfo>::cast(scope_info)); | 60 set_outer_scope_info(Handle<ScopeInfo>::cast(scope_info)); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 } | 103 } |
103 | 104 |
104 #ifdef DEBUG | 105 #ifdef DEBUG |
105 bool ParseInfo::script_is_native() const { | 106 bool ParseInfo::script_is_native() const { |
106 return script_->type() == Script::TYPE_NATIVE; | 107 return script_->type() == Script::TYPE_NATIVE; |
107 } | 108 } |
108 #endif // DEBUG | 109 #endif // DEBUG |
109 | 110 |
110 } // namespace internal | 111 } // namespace internal |
111 } // namespace v8 | 112 } // namespace v8 |
OLD | NEW |