chore: dead-code deletion + two zero-risk emitter dedups (−2,001 lines)#1265
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@-