Chromium Code Reviews| Index: src/parsing/parser.cc |
| diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc |
| index 7808551c4ecbb3aacf111e7cee0fbf5a1e8d941d..d18b641d64a9b60f5405a72fa918ced4217611be 100644 |
| --- a/src/parsing/parser.cc |
| +++ b/src/parsing/parser.cc |
| @@ -75,6 +75,13 @@ ParseInfo::ParseInfo(Zone* zone, Handle<SharedFunctionInfo> shared) |
| Handle<Script> script(Script::cast(shared->script())); |
| set_script(script); |
| + |
| + if (script->is_module()) { |
| + set_module(); |
| + } else { |
| + set_global(); |
|
mike3
2016/06/12 19:54:48
Since ParseInfo keeps a reference to its Script, t
vogelheim
2016/06/14 15:20:50
Removing the bit would also be ok; not sure if it'
vogelheim
2016/06/14 15:20:50
How do we know it's not an eval? (See more elabora
mike3
2016/06/19 16:59:00
Acknowledged.
|
| + } |
| + |
| if (!script.is_null() && script->type() == Script::TYPE_NATIVE) { |
| set_native(); |
| } |
| @@ -89,6 +96,12 @@ ParseInfo::ParseInfo(Zone* zone, Handle<Script> script) : ParseInfo(zone) { |
| set_unicode_cache(isolate_->unicode_cache()); |
| set_script(script); |
| + if (script->is_module()) { |
| + set_module(); |
| + } else { |
| + set_global(); |
|
vogelheim
2016/06/14 15:20:49
as above...
mike3
2016/06/19 16:59:00
Acknowledged.
|
| + } |
| + |
| if (script->type() == Script::TYPE_NATIVE) { |
| set_native(); |
| } |