Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: src/objects.h

Issue 2668613002: [inspector] added Debugger.moduleRequested notification
Patch Set: report existing resolved module on Debugger.enable Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/inspector/v8-debugger-agent-impl.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 6727 matching lines...) Expand 10 before | Expand all | Expand 10 after
6738 // [source_url]: sourceURL from magic comment 6738 // [source_url]: sourceURL from magic comment
6739 DECL_ACCESSORS(source_url, Object) 6739 DECL_ACCESSORS(source_url, Object)
6740 6740
6741 // [source_mapping_url]: sourceMappingURL magic comment 6741 // [source_mapping_url]: sourceMappingURL magic comment
6742 DECL_ACCESSORS(source_mapping_url, Object) 6742 DECL_ACCESSORS(source_mapping_url, Object)
6743 6743
6744 // [wasm_compiled_module]: the compiled wasm module this script belongs to. 6744 // [wasm_compiled_module]: the compiled wasm module this script belongs to.
6745 // This must only be called if the type of this script is TYPE_WASM. 6745 // This must only be called if the type of this script is TYPE_WASM.
6746 DECL_ACCESSORS(wasm_compiled_module, Object) 6746 DECL_ACCESSORS(wasm_compiled_module, Object)
6747 6747
6748 // [module]: es module this script belongs to.
6749 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.
6750
6748 // [compilation_type]: how the the script was compiled. Encoded in the 6751 // [compilation_type]: how the the script was compiled. Encoded in the
6749 // 'flags' field. 6752 // 'flags' field.
6750 inline CompilationType compilation_type(); 6753 inline CompilationType compilation_type();
6751 inline void set_compilation_type(CompilationType type); 6754 inline void set_compilation_type(CompilationType type);
6752 6755
6753 // [compilation_state]: determines whether the script has already been 6756 // [compilation_state]: determines whether the script has already been
6754 // compiled. Encoded in the 'flags' field. 6757 // compiled. Encoded in the 'flags' field.
6755 inline CompilationState compilation_state(); 6758 inline CompilationState compilation_state();
6756 inline void set_compilation_state(CompilationState state); 6759 inline void set_compilation_state(CompilationState state);
6757 6760
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
6843 static const int kLineEndsOffset = kTypeOffset + kPointerSize; 6846 static const int kLineEndsOffset = kTypeOffset + kPointerSize;
6844 static const int kIdOffset = kLineEndsOffset + kPointerSize; 6847 static const int kIdOffset = kLineEndsOffset + kPointerSize;
6845 static const int kEvalFromSharedOffset = kIdOffset + kPointerSize; 6848 static const int kEvalFromSharedOffset = kIdOffset + kPointerSize;
6846 static const int kEvalFromPositionOffset = 6849 static const int kEvalFromPositionOffset =
6847 kEvalFromSharedOffset + kPointerSize; 6850 kEvalFromSharedOffset + kPointerSize;
6848 static const int kSharedFunctionInfosOffset = 6851 static const int kSharedFunctionInfosOffset =
6849 kEvalFromPositionOffset + kPointerSize; 6852 kEvalFromPositionOffset + kPointerSize;
6850 static const int kFlagsOffset = kSharedFunctionInfosOffset + kPointerSize; 6853 static const int kFlagsOffset = kSharedFunctionInfosOffset + kPointerSize;
6851 static const int kSourceUrlOffset = kFlagsOffset + kPointerSize; 6854 static const int kSourceUrlOffset = kFlagsOffset + kPointerSize;
6852 static const int kSourceMappingUrlOffset = kSourceUrlOffset + kPointerSize; 6855 static const int kSourceMappingUrlOffset = kSourceUrlOffset + kPointerSize;
6853 static const int kSize = kSourceMappingUrlOffset + kPointerSize; 6856 static const int kModuleOffset = kSourceMappingUrlOffset + kPointerSize;
6857 static const int kSize = kModuleOffset + kPointerSize;
6854 6858
6855 private: 6859 private:
6856 // Bit positions in the flags field. 6860 // Bit positions in the flags field.
6857 static const int kCompilationTypeBit = 0; 6861 static const int kCompilationTypeBit = 0;
6858 static const int kCompilationStateBit = 1; 6862 static const int kCompilationStateBit = 1;
6859 static const int kOriginOptionsShift = 2; 6863 static const int kOriginOptionsShift = 2;
6860 static const int kOriginOptionsSize = 4; 6864 static const int kOriginOptionsSize = 4;
6861 static const int kOriginOptionsMask = ((1 << kOriginOptionsSize) - 1) 6865 static const int kOriginOptionsMask = ((1 << kOriginOptionsSize) - 1)
6862 << kOriginOptionsShift; 6866 << kOriginOptionsShift;
6863 6867
(...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after
7914 DECL_INT_ACCESSORS(hash) 7918 DECL_INT_ACCESSORS(hash)
7915 7919
7916 // The namespace object (or undefined). 7920 // The namespace object (or undefined).
7917 DECL_ACCESSORS(module_namespace, HeapObject) 7921 DECL_ACCESSORS(module_namespace, HeapObject)
7918 7922
7919 // Modules imported or re-exported by this module. 7923 // Modules imported or re-exported by this module.
7920 // Corresponds 1-to-1 to the module specifier strings in 7924 // Corresponds 1-to-1 to the module specifier strings in
7921 // ModuleInfo::module_requests. 7925 // ModuleInfo::module_requests.
7922 DECL_ACCESSORS(requested_modules, FixedArray) 7926 DECL_ACCESSORS(requested_modules, FixedArray)
7923 7927
7928 // [script]: Script from which the module originates.
7929 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,
7930
7924 // Get the ModuleInfo associated with the code. 7931 // Get the ModuleInfo associated with the code.
7925 inline ModuleInfo* info() const; 7932 inline ModuleInfo* info() const;
7926 7933
7927 inline bool instantiated() const; 7934 inline bool instantiated() const;
7928 inline bool evaluated() const; 7935 inline bool evaluated() const;
7929 inline void set_evaluated(); 7936 inline void set_evaluated();
7930 7937
7931 // Implementation of spec operation ModuleDeclarationInstantiation. 7938 // Implementation of spec operation ModuleDeclarationInstantiation.
7932 // Returns false if an exception occurred during instantiation, true 7939 // Returns false if an exception occurred during instantiation, true
7933 // otherwise. 7940 // otherwise.
(...skipping 14 matching lines...) Expand all
7948 int module_request); 7955 int module_request);
7949 7956
7950 static const int kCodeOffset = HeapObject::kHeaderSize; 7957 static const int kCodeOffset = HeapObject::kHeaderSize;
7951 static const int kExportsOffset = kCodeOffset + kPointerSize; 7958 static const int kExportsOffset = kCodeOffset + kPointerSize;
7952 static const int kRegularExportsOffset = kExportsOffset + kPointerSize; 7959 static const int kRegularExportsOffset = kExportsOffset + kPointerSize;
7953 static const int kRegularImportsOffset = kRegularExportsOffset + kPointerSize; 7960 static const int kRegularImportsOffset = kRegularExportsOffset + kPointerSize;
7954 static const int kHashOffset = kRegularImportsOffset + kPointerSize; 7961 static const int kHashOffset = kRegularImportsOffset + kPointerSize;
7955 static const int kModuleNamespaceOffset = kHashOffset + kPointerSize; 7962 static const int kModuleNamespaceOffset = kHashOffset + kPointerSize;
7956 static const int kRequestedModulesOffset = 7963 static const int kRequestedModulesOffset =
7957 kModuleNamespaceOffset + kPointerSize; 7964 kModuleNamespaceOffset + kPointerSize;
7958 static const int kSize = kRequestedModulesOffset + kPointerSize; 7965 static const int kScriptOffset = kRequestedModulesOffset + kPointerSize;
7966 static const int kSize = kScriptOffset + kPointerSize;
7959 7967
7960 private: 7968 private:
7961 static void CreateExport(Handle<Module> module, int cell_index, 7969 static void CreateExport(Handle<Module> module, int cell_index,
7962 Handle<FixedArray> names); 7970 Handle<FixedArray> names);
7963 static void CreateIndirectExport(Handle<Module> module, Handle<String> name, 7971 static void CreateIndirectExport(Handle<Module> module, Handle<String> name,
7964 Handle<ModuleInfoEntry> entry); 7972 Handle<ModuleInfoEntry> entry);
7965 7973
7966 // Get the namespace object for [module]. If it doesn't exist yet, it is 7974 // Get the namespace object for [module]. If it doesn't exist yet, it is
7967 // created. 7975 // created.
7968 static Handle<JSModuleNamespace> GetModuleNamespace(Handle<Module> module); 7976 static Handle<JSModuleNamespace> GetModuleNamespace(Handle<Module> module);
(...skipping 3660 matching lines...) Expand 10 before | Expand all | Expand 10 after
11629 } 11637 }
11630 }; 11638 };
11631 11639
11632 11640
11633 } // NOLINT, false-positive due to second-order macros. 11641 } // NOLINT, false-positive due to second-order macros.
11634 } // NOLINT, false-positive due to second-order macros. 11642 } // NOLINT, false-positive due to second-order macros.
11635 11643
11636 #include "src/objects/object-macros-undef.h" 11644 #include "src/objects/object-macros-undef.h"
11637 11645
11638 #endif // V8_OBJECTS_H_ 11646 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/inspector/v8-debugger-agent-impl.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698