@@ -17086,6 +17086,9 @@ function isSetActionStateType(id) {
1708617086function isDispatcherType(id) {
1708717087 return id.type.kind === 'Function' && id.type.shapeId === 'BuiltInDispatch';
1708817088}
17089+ function isFireFunctionType(id) {
17090+ return (id.type.kind === 'Function' && id.type.shapeId === 'BuiltInFireFunction');
17091+ }
1708917092function isStableType(id) {
1709017093 return (isSetStateType(id) ||
1709117094 isSetActionStateType(id) ||
@@ -28703,6 +28706,7 @@ const BuiltInUseContextHookId = 'BuiltInUseContextHook';
2870328706const BuiltInUseTransitionId = 'BuiltInUseTransition';
2870428707const BuiltInStartTransitionId = 'BuiltInStartTransition';
2870528708const BuiltInFireId = 'BuiltInFire';
28709+ const BuiltInFireFunctionId = 'BuiltInFireFunction';
2870628710const BUILTIN_SHAPES = new Map();
2870728711addObject(BUILTIN_SHAPES, BuiltInPropsId, [
2870828712 ['ref', { kind: 'Object', shapeId: BuiltInUseRefId }],
@@ -37053,7 +37057,12 @@ const REACT_APIS = [
3705337057 addFunction(DEFAULT_SHAPES, [], {
3705437058 positionalParams: [],
3705537059 restParam: null,
37056- returnType: { kind: 'Primitive' },
37060+ returnType: {
37061+ kind: 'Function',
37062+ return: { kind: 'Poly' },
37063+ shapeId: BuiltInFireFunctionId,
37064+ isConstructor: false,
37065+ },
3705737066 calleeEffect: Effect.Read,
3705837067 returnValueKind: ValueKind.Frozen,
3705937068 }, BuiltInFireId),
@@ -48290,9 +48299,10 @@ function inferEffectDependencies(fn) {
4829048299 });
4829148300 }
4829248301 for (const dep of scopeInfo.deps) {
48293- if ((isUseRefType(dep.identifier) ||
48302+ if ((( isUseRefType(dep.identifier) ||
4829448303 isSetStateType(dep.identifier)) &&
48295- !reactiveIds.has(dep.identifier.id)) {
48304+ !reactiveIds.has(dep.identifier.id)) ||
48305+ isFireFunctionType(dep.identifier)) {
4829648306 continue;
4829748307 }
4829848308 const { place, instructions } = writeDependencyToInstructions(dep, reactiveIds.has(dep.identifier.id), fn.env, fnExpr.loc);
@@ -53607,6 +53617,12 @@ class Context {
5360753617 }
5360853618 getOrGenerateFireFunctionBinding(callee, fireLoc) {
5360953619 const fireFunctionBinding = getOrInsertWith(__classPrivateFieldGet(this, _Context_fireCalleesToFireFunctions, "f"), callee.identifier.id, () => createTemporaryPlace(__classPrivateFieldGet(this, _Context_env, "f"), GeneratedSource));
53620+ fireFunctionBinding.identifier.type = {
53621+ kind: 'Function',
53622+ shapeId: BuiltInFireFunctionId,
53623+ return: { kind: 'Poly' },
53624+ isConstructor: false,
53625+ };
5361053626 __classPrivateFieldGet(this, _Context_capturedCalleeIdentifierIds, "f").set(callee.identifier.id, {
5361153627 fireFunctionBinding,
5361253628 capturedCalleeIdentifier: callee.identifier,
0 commit comments