Skip to content

Commit d21dcfd

Browse files
committed
comment
1 parent 23cf614 commit d21dcfd

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/builtins.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10674,11 +10674,12 @@ builtinFunctions.set(BuiltinNames.i32x4_relaxed_dot_i8x16_i7x16_add_s, builtin_i
1067410674

1067510675
// === Internal helpers =======================================================================
1067610676

10677+
// When no visit is needed, null is returned, otherwise the name of the visit function is returned.
1067710678
function getVisitInstanceName(visitInstance: Function, classReference: Class): string | null {
1067810679
if (classReference.hasDecorator(DecoratorFlags.Final)) {
1067910680
if (classReference.visitRef != 0) {
1068010681
return classReference.visitorFunctionName;
10681-
} else if (classReference.isPointerfree) {
10682+
} else if (classReference.isPointerfree) {
1068210683
return null; // no visitor for pointerfree classes
1068310684
}
1068410685
}

src/compiler.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,8 @@ export class Compiler extends DiagnosticEmitter {
647647
// finalize runtime features
648648
module.removeGlobal(BuiltinNames.rtti_base);
649649
if (this.runtimeFeatures & RuntimeFeatures.Rtti) compileRTTI(this);
650+
// visit globals can rely on the result of visit members to visit globals of
651+
// certain type directly thought the visit of the class.
650652
if (this.runtimeFeatures & RuntimeFeatures.visitMembers) compileVisitMembers(this);
651653
if (this.runtimeFeatures & RuntimeFeatures.visitGlobals) compileVisitGlobals(this);
652654

0 commit comments

Comments
 (0)