Chromium Code Reviews| Index: src/objects.h |
| diff --git a/src/objects.h b/src/objects.h |
| index 5fc6d61016197f8c89251400c2c62d7d5abb2051..b90a41f1df64a1ba528aed33ae573cf4b438fb00 100644 |
| --- a/src/objects.h |
| +++ b/src/objects.h |
| @@ -6745,6 +6745,9 @@ class Script: public Struct { |
| // This must only be called if the type of this script is TYPE_WASM. |
| DECL_ACCESSORS(wasm_compiled_module, Object) |
| + // [module]: es module this script belongs to. |
| + DECL_ACCESSORS(module, Object) |
|
Yang
2017/01/31 07:53:00
This field is so we can iterate the script list to
kozy
2017/01/31 22:14:46
Done.
|
| + |
| // [compilation_type]: how the the script was compiled. Encoded in the |
| // 'flags' field. |
| inline CompilationType compilation_type(); |
| @@ -6850,7 +6853,8 @@ class Script: public Struct { |
| static const int kFlagsOffset = kSharedFunctionInfosOffset + kPointerSize; |
| static const int kSourceUrlOffset = kFlagsOffset + kPointerSize; |
| static const int kSourceMappingUrlOffset = kSourceUrlOffset + kPointerSize; |
| - static const int kSize = kSourceMappingUrlOffset + kPointerSize; |
| + static const int kModuleOffset = kSourceMappingUrlOffset + kPointerSize; |
| + static const int kSize = kModuleOffset + kPointerSize; |
| private: |
| // Bit positions in the flags field. |
| @@ -7921,6 +7925,9 @@ class Module : public Struct { |
| // ModuleInfo::module_requests. |
| DECL_ACCESSORS(requested_modules, FixedArray) |
| + // [script]: Script from which the module originates. |
| + DECL_ACCESSORS(script, Object) |
|
Yang
2017/01/31 07:53:00
Can't we get the script through module->code()->sc
kozy
2017/01/31 22:14:46
We couldn't use it for reporting existing module,
|
| + |
| // Get the ModuleInfo associated with the code. |
| inline ModuleInfo* info() const; |
| @@ -7955,7 +7962,8 @@ class Module : public Struct { |
| static const int kModuleNamespaceOffset = kHashOffset + kPointerSize; |
| static const int kRequestedModulesOffset = |
| kModuleNamespaceOffset + kPointerSize; |
| - static const int kSize = kRequestedModulesOffset + kPointerSize; |
| + static const int kScriptOffset = kRequestedModulesOffset + kPointerSize; |
| + static const int kSize = kScriptOffset + kPointerSize; |
| private: |
| static void CreateExport(Handle<Module> module, int cell_index, |