@geastack/compiler 1.0.45 → 1.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5666,7 +5666,31 @@ const closedMemberCallableUses = (checker, flow, member, countedCalls, givenRece
5666
5666
  return true;
5667
5667
  return hasClosedMemberCallableUses(checker, flow, null, new Set(), receiverTypeAt, argumentsUsesAt, onOpenUse, nestedMembers, new Set([...nestedFamilies(), owner]), { roots, terminalUse: () => null });
5668
5668
  });
5669
+ /**
5670
+ * Every source body one call can enter, shared across the proofs of a round
5671
+ * exactly as a provenance answer is (`sharedAnswerOf`): valid wherever the
5672
+ * member and family parks it leaned on are in force again, and replayed
5673
+ * with the open uses and intrinsic obligations its computation reported.
5674
+ *
5675
+ * Target identity is a question about the program and the parks, not about
5676
+ * the proof that asks it: the bodies are declarations, and every proof the
5677
+ * answer rests on -- slot closure, receiver family, caller inventory -- is
5678
+ * a nested proof that reports its parks on the trail. Unshared, each proof
5679
+ * re-derived the same targets from scratch.
5680
+ *
5681
+ * A success found under a park is replayed wherever that park is in force
5682
+ * again, so sharing is order independent only while a family's top-level
5683
+ * walk agrees with the nested ones that meet it parked. It did not for the
5684
+ * clone idiom until an untyped read off the clone closed through the key
5685
+ * plan's carriers; clone-cycle-entry-order.test.ts asks that cycle's six
5686
+ * calls in all 720 orders and requires one answer.
5687
+ */
5669
5688
  const invocationTargetsOf = (call) => {
5689
+ const answer = sharedAnswerOf(`call-targets:${nodePathToken(call)}`, () => invocationTargetsUncached(call));
5690
+ const ledger = deferredIntrinsicProtocolLedgerOf(flow);
5691
+ return answer.requirements.length === 0 || ledger?.include(answer.requirements) === true ? answer.value : null;
5692
+ };
5693
+ const invocationTargetsUncached = (call) => {
5670
5694
  // Ordinary source interface member calls belong to the joint value/storage/use
5671
5695
  // graph. A refusal is final for this domain: the former receiver-origin
5672
5696
  // fallback would reopen the same field in a fresh proof session.
@@ -7438,6 +7462,15 @@ const closedMemberCallableUses = (checker, flow, member, countedCalls, givenRece
7438
7462
  // thousands of reads the selected-data arm already accepted -- one large
7439
7463
  // library compile went from ~3 min to over 8 min at 23 GB before this ordering.
7440
7464
  const key = accessKeyOf(parent);
7465
+ // A receiver the checker types `any` names no declaration, and the
7466
+ // carrier question then falls back to `member`'s own class -- which a
7467
+ // member-less family walk does not have. That refused `rawCopy.uniforms`
7468
+ // off a fresh clone although the plan below had already resolved the
7469
+ // receiver's allocations to the family and the key to the very data
7470
+ // declarations a typed receiver would have named. Those declarations are
7471
+ // the carriers: each one's own family must be closed, exactly as a
7472
+ // resolved `target` requires of its one carrier.
7473
+ const carriedByFamily = (plan) => target === null && plan.carriers.length > 0 && plan.carriers.every(({ declaration }) => ownerOriginsClosed(declaration));
7441
7474
  let readerClosedHeld = null;
7442
7475
  const readerClosed = () => {
7443
7476
  if (readerClosedHeld !== null)
@@ -7456,7 +7489,7 @@ const closedMemberCallableUses = (checker, flow, member, countedCalls, givenRece
7456
7489
  plan.readBodies !== null &&
7457
7490
  !reflectiveDefinitionMayInstallGetterOf(checker, flow, key) &&
7458
7491
  plan.readBodies.every((body) => flow.receiverReferencesToDeclaration(body).every(receiverUse)) &&
7459
- (plan.primitive || ownerOriginsClosed(originsCarrierOf(reference, target)));
7492
+ (plan.primitive || ownerOriginsClosed(originsCarrierOf(reference, target)) || carriedByFamily(plan));
7460
7493
  return readerClosedHeld;
7461
7494
  };
7462
7495
  return traceReceiver(reference, 'member-read', (selectedData && (primitive(value) || ownerOriginsClosed(originsCarrierOf(reference, target)))) || readerClosed(), () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geastack/compiler",
3
- "version": "1.0.45",
3
+ "version": "1.0.46",
4
4
  "description": "The geastack TypeScript-to-C++ compiler: one semantic spine, no source-shaped authority, no boxing of statically typed values.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {