diff options
author | 2023-08-21 21:24:49 -0700 | |
---|---|---|
committer | 2023-08-21 21:24:49 -0700 | |
commit | ed14b64e657de1446a65da58f51d431d3a915bdf (patch) | |
tree | a349e8bbdf12dcd798a0e472e06f61c030f20367 /src/bun.js/scripts/generate-classes.ts | |
parent | bca1bcf29c3bf925299b89dc75523c65549ca1fb (diff) | |
download | bun-ed14b64e657de1446a65da58f51d431d3a915bdf.tar.gz bun-ed14b64e657de1446a65da58f51d431d3a915bdf.tar.zst bun-ed14b64e657de1446a65da58f51d431d3a915bdf.zip |
Make the code generator less duplicative
Diffstat (limited to 'src/bun.js/scripts/generate-classes.ts')
-rw-r--r-- | src/bun.js/scripts/generate-classes.ts | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/bun.js/scripts/generate-classes.ts b/src/bun.js/scripts/generate-classes.ts index 0b88a3eb1..b6fbe0915 100644 --- a/src/bun.js/scripts/generate-classes.ts +++ b/src/bun.js/scripts/generate-classes.ts @@ -1033,7 +1033,6 @@ void ${name}::visitChildrenImpl(JSCell* cell, Visitor& visitor) ${name}* thisObject = jsCast<${name}*>(cell); ASSERT_GC_OBJECT_INHERITS(thisObject, info()); Base::visitChildren(thisObject, visitor); - ${values} ${ estimatedSize ? `if (auto* ptr = thisObject->wrapped()) { @@ -1041,8 +1040,7 @@ visitor.reportExtraMemoryVisited(${symbolName(obj.name, "estimatedSize")}(ptr)); }` : "" } -${DEFINE_VISIT_CHILDREN_LIST} -${hasPendingActivity ? `visitor.addOpaqueRoot(thisObject->wrapped());` : ""} + thisObject->visitAdditionalChildren<Visitor>(visitor); } DEFINE_VISIT_CHILDREN(${name}); |