|
|
@@ -173,10 +173,17 @@ BEGIN
|
|
|
END;
|
|
|
END;
|
|
|
END EmitAddress;
|
|
|
-(* proc22 stub — ~CheckAndStore (VALUE ADDRESS: proc20 passes ADR(sel),
|
|
|
- proc15 passes curDesc pointer; TBD by MCD audit). *)
|
|
|
-PROCEDURE CheckAndStore(a: ADDRESS);
|
|
|
-BEGIN HALT; END CheckAndStore;
|
|
|
+(* proc22 @0057 — ~CheckAndStore: unwrap typ to typ^.w2 when kind=6 and
|
|
|
+ w2 nonzero (nested IF for jpfalse shape; store is d^.typ := NodePtr(w2),
|
|
|
+ zero-cost transfer, no call). *)
|
|
|
+PROCEDURE CheckAndStore(d: HeadPtr);
|
|
|
+BEGIN
|
|
|
+ IF d^.typ^.w4 = 6 THEN
|
|
|
+ IF CARDINAL(d^.typ^.w2) <> 0 THEN
|
|
|
+ d^.typ := NodePtr(d^.typ^.w2);
|
|
|
+ END;
|
|
|
+ END;
|
|
|
+END CheckAndStore;
|
|
|
|
|
|
PROCEDURE PushExprDesc(dst: HeadPtr; src: DescPtr);
|
|
|
VAR aligned: CARDINAL; (* local word-2 *)
|
|
|
@@ -470,7 +477,7 @@ BEGIN
|
|
|
CentralError(sel = curDesc^.typ, 64);
|
|
|
END;
|
|
|
ELSE (*{0659}*) (* not-found path *)
|
|
|
- CheckAndStore(sel);
|
|
|
+ CheckAndStore(HeadPtr(sel));
|
|
|
IF needVal THEN
|
|
|
CentralError((sel = t)
|
|
|
OR ((RecordPtr(sel) = Compiler.AddressType) AND (t^.w4 = 5))
|