lib/strings,wcc,w6l: collapse nested-if to &&/|| at named sites (Wave-2 structural)
strings.bytesub two endpoint guards, wcc cgdot/cgassign 4-deep allptr/N_IDENT/localfindnode pyramids, and w6l isarchive's 8 sequential magic-byte rejects. The isarchive len<8 read-guard stays a separate statement before the || chain so the byte reads remain bounded. Not byte-id-neutral (short-circuit emits tighter branches / renumbered labels) but functionally identical; cs==ww stage-parity holds. Regenerated all embedding combined.ww.
This commit is contained in:
@@ -2926,11 +2926,10 @@ fn cgdot(c: *cgen, n: *node) void = {
|
||||
croot = croot.lhs;
|
||||
};
|
||||
let it: *tinfo = nil;
|
||||
if (allptr) { if (croot != nil) { if (croot.kind == nkind.N_IDENT) {
|
||||
if (localfindnode(c, croot.str) != nil) {
|
||||
it = lhs.type_: *tinfo;
|
||||
};
|
||||
}; }; };
|
||||
if (allptr && croot != nil && croot.kind == nkind.N_IDENT &&
|
||||
localfindnode(c, croot.str) != nil) {
|
||||
it = lhs.type_: *tinfo;
|
||||
};
|
||||
for (it != nil && it.kind == tykind.TY_NAMED) { it = it.under; };
|
||||
if (it != nil) { if (it.kind == tykind.TY_PTR) {
|
||||
let st: *tinfo = it.sub;
|
||||
@@ -6702,11 +6701,10 @@ fn cgassign(c: *cgen, n: *node) void = {
|
||||
croot = croot.lhs;
|
||||
};
|
||||
let it: *tinfo = nil;
|
||||
if (allptr) { if (croot != nil) { if (croot.kind == nkind.N_IDENT) {
|
||||
if (localfindnode(c, croot.str) != nil) {
|
||||
it = base.type_: *tinfo;
|
||||
};
|
||||
}; }; };
|
||||
if (allptr && croot != nil && croot.kind == nkind.N_IDENT &&
|
||||
localfindnode(c, croot.str) != nil) {
|
||||
it = base.type_: *tinfo;
|
||||
};
|
||||
for (it != nil && it.kind == tykind.TY_NAMED) { it = it.under; };
|
||||
if (it != nil) { if (it.kind == tykind.TY_PTR) {
|
||||
let st: *tinfo = it.sub;
|
||||
|
||||
Reference in New Issue
Block a user