Commit bc35251f authored by marja's avatar marja Committed by Commit bot

objects.h splitting: Move ModuleInfoEntry

BUG=v8:5402

Review-Url: https://codereview.chromium.org/2638893002
Cr-Commit-Position: refs/heads/master@{#42405}
parent 0389df51
......@@ -169,7 +169,6 @@
namespace v8 {
namespace internal {
class ModuleInfo;
struct InliningPosition;
enum KeyedAccessStoreMode {
......@@ -984,12 +983,6 @@ class TemplateList;
// A template-ized version of the IsXXX functions.
template <class C> inline bool Is(Object* obj);
#ifdef VERIFY_HEAP
#define DECLARE_VERIFIER(Name) void Name##Verify();
#else
#define DECLARE_VERIFIER(Name)
#endif
#ifdef OBJECT_PRINT
#define DECLARE_PRINTER(Name) void Name##Print(std::ostream& os); // NOLINT
#else
......@@ -7906,40 +7899,6 @@ class JSGeneratorObject: public JSObject {
DISALLOW_IMPLICIT_CONSTRUCTORS(JSGeneratorObject);
};
class ModuleInfoEntry : public Struct {
public:
DECLARE_CAST(ModuleInfoEntry)
DECLARE_PRINTER(ModuleInfoEntry)
DECLARE_VERIFIER(ModuleInfoEntry)
DECL_ACCESSORS(export_name, Object)
DECL_ACCESSORS(local_name, Object)
DECL_ACCESSORS(import_name, Object)
DECL_INT_ACCESSORS(module_request)
DECL_INT_ACCESSORS(cell_index)
DECL_INT_ACCESSORS(beg_pos)
DECL_INT_ACCESSORS(end_pos)
static Handle<ModuleInfoEntry> New(Isolate* isolate,
Handle<Object> export_name,
Handle<Object> local_name,
Handle<Object> import_name,
int module_request, int cell_index,
int beg_pos, int end_pos);
static const int kExportNameOffset = HeapObject::kHeaderSize;
static const int kLocalNameOffset = kExportNameOffset + kPointerSize;
static const int kImportNameOffset = kLocalNameOffset + kPointerSize;
static const int kModuleRequestOffset = kImportNameOffset + kPointerSize;
static const int kCellIndexOffset = kModuleRequestOffset + kPointerSize;
static const int kBegPosOffset = kCellIndexOffset + kPointerSize;
static const int kEndPosOffset = kBegPosOffset + kPointerSize;
static const int kSize = kEndPosOffset + kPointerSize;
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(ModuleInfoEntry);
};
// When importing a module namespace (import * as foo from "bar"), a
// JSModuleNamespace object (representing module "bar") is created and bound to
// the declared variable (foo). A module can have at most one namespace object.
......@@ -11576,11 +11535,6 @@ class BreakPointInfo: public Struct {
};
#undef DECL_BOOLEAN_ACCESSORS
#undef DECL_ACCESSORS
#undef DECLARE_CAST
#undef DECLARE_VERIFIER
#define VISITOR_SYNCHRONIZATION_TAGS_LIST(V) \
V(kStringTable, "string_table", "(Internalized strings)") \
V(kExternalStringsTable, "external_strings_table", "(External strings)") \
......
......@@ -87,6 +87,40 @@ class ModuleInfo : public FixedArray {
DISALLOW_IMPLICIT_CONSTRUCTORS(ModuleInfo);
};
class ModuleInfoEntry : public Struct {
public:
DECLARE_CAST(ModuleInfoEntry)
DECLARE_PRINTER(ModuleInfoEntry)
DECLARE_VERIFIER(ModuleInfoEntry)
DECL_ACCESSORS(export_name, Object)
DECL_ACCESSORS(local_name, Object)
DECL_ACCESSORS(import_name, Object)
DECL_INT_ACCESSORS(module_request)
DECL_INT_ACCESSORS(cell_index)
DECL_INT_ACCESSORS(beg_pos)
DECL_INT_ACCESSORS(end_pos)
static Handle<ModuleInfoEntry> New(Isolate* isolate,
Handle<Object> export_name,
Handle<Object> local_name,
Handle<Object> import_name,
int module_request, int cell_index,
int beg_pos, int end_pos);
static const int kExportNameOffset = HeapObject::kHeaderSize;
static const int kLocalNameOffset = kExportNameOffset + kPointerSize;
static const int kImportNameOffset = kLocalNameOffset + kPointerSize;
static const int kModuleRequestOffset = kImportNameOffset + kPointerSize;
static const int kCellIndexOffset = kModuleRequestOffset + kPointerSize;
static const int kBegPosOffset = kCellIndexOffset + kPointerSize;
static const int kEndPosOffset = kBegPosOffset + kPointerSize;
static const int kSize = kEndPosOffset + kPointerSize;
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(ModuleInfoEntry);
};
} // namespace internal
} // namespace v8
......
......@@ -6,3 +6,4 @@
#undef DECL_INT_ACCESSORS
#undef DECL_ACCESSORS
#undef DECLARE_CAST
#undef DECLARE_VERIFIER
......@@ -24,3 +24,9 @@
#define DECLARE_CAST(type) \
INLINE(static type* cast(Object* object)); \
INLINE(static const type* cast(const Object* object));
#ifdef VERIFY_HEAP
#define DECLARE_VERIFIER(Name) void Name##Verify();
#else
#define DECLARE_VERIFIER(Name)
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment