Skip to content

chore: dead-code deletion + two zero-risk emitter dedups (−2,001 lines)#1265

Merged
nickna merged 4 commits into
mainfrom
worktree-misc-hygine
Jul 11, 2026
Merged

chore: dead-code deletion + two zero-risk emitter dedups (−2,001 lines)#1265
nickna merged 4 commits into
mainfrom
worktree-misc-hygine

Conversation

@nickna

@nickna nickna commented Jul 10, 2026

Copy link
Copy Markdown
Owner

@-

nickna added 4 commits July 10, 2026 16:04
…emitters

RuntimeEmitter.UrlHelpers.cs was orphaned when url moved to
stdlib/node/url.ts; RuntimeEmitter.PrivateMembers.cs was superseded by
inline private-member emission via ClassRegistry.GetPrivateFieldStorage;
ILEmitter.Calls.Async.cs was superseded by PromiseStaticEmitter and the
AsyncFunctionMoveNextEmitter family. Their entry points had zero
references (including Type.GetType string-literal reflection). Also
removes the EmittedRuntime MethodBuilder holders only those files
touched (Url x4, private-member x6, EcdhDecompressY/DecodePoint/
FieldLength x3 which were never assigned).
Each symbol was verified to have exactly one repo-wide occurrence (its
definition), including string-literal reflection names, before removal:
EmitBuildChildProcessObject, EmitYieldStarSyncFromStack,
EmitReturnValueTaskFromTask + SetStack* wrappers, EmitNullableIntFromObject,
EmitExtractResponseHeaders, EmitLibCCreateHardLinkHelper (+ its
LibCCreateHardLink holder, never read), EmitDgramEmitEvent, DeclareToNumber
(stranded pre-split duplicate of the RuntimeClassPhase1 declaration),
EmitTSReadableClass/EmitTSDuplexClass back-compat wrappers,
GetExpressionStackType, TSFunctionInvoke1Arg; interpreter dead cores
EvaluateUnaryOperation, EvaluateLogical/NullishCoalescing/TernaryCore,
ExecuteSwitchAsync/ExecuteTryCatchAsync wrappers, GetRuntimeTypeName,
TryGet/TrySetPropertyByName, GetDescriptorFromDictionary; type-checker
PreRegisterClass + GetPropertyNarrowing; parser string-type remnant
ParseFunctionTypeDefinition (#1111 leftover); ConsoleBuiltIns.ResetState;
SharpTSProcess.HasExpando.
The helper already existed in ExpressionEmitterBase.Constructors.cs with a
byte-identical body; 20 hand-inlined copies of the idiom in CallHelpers.cs
(parseInt/parseFloat/isNaN/isFinite, structuredClone, set/clearTimeout,
set/clearInterval, queueMicrotask, fetch, Promise then/catch/finally, and
the ambiguous includes/indexOf list arms) now call it. Emitted IL is
unchanged; sites with non-null defaults (parseInt radix, string-path
includes/indexOf) are intentionally untouched.
…mitter

The generator and async-generator copies were byte-identical (docs aside):
same null/$Undefined check, default evaluation, hoisted-field store, and
DC-field mirror (#737/#792). The shared base already exposes every seam the
body needs — GetHoistedVariableField (which both subclasses map to
_builder.GetVariableField), TryGetFunctionDCField/StoreToDCField, and the
IL/Ctx/Types accessors — so the hoist is dispatch-identical and the emitted
IL is unchanged. The async-function and async-arrow emitters keep their own
variants (skip-on-resume / Starg-based), which are not duplicates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant