Skip to content

Commit 45e9af7

Browse files
committed
fix(native): remove orphaned protoMethodsMs type and unify timer precision
Remove the `protoMethodsMs` optional field from `BuildResult.phases` that was declared in types.ts but never populated by the orchestrator, report script, or PostPassTimings interface — preventing it from silently appearing as an always-undefined field in IDE autocomplete. Migrate `runPostNativeThisDispatch` from `Date.now()` (integer ms) to `performance.now()` (sub-ms float) so all five post-pass timings in `PostPassTimings` use the same timer API and resolution.
1 parent 8b3aa3d commit 45e9af7

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

src/domain/graph/builder/stages/native-orchestrator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ async function runPostNativeThisDispatch(
702702
changedFiles: string[] | undefined,
703703
isFullBuild: boolean,
704704
): Promise<{ elapsedMs: number; targetIds: Set<number>; affectedFiles: Set<string> }> {
705-
const t0 = Date.now();
705+
const t0 = performance.now();
706706
const targetIds = new Set<number>();
707707
// Files containing endpoints of newly inserted edges — lets the caller scope
708708
// role re-classification to the nodes whose fan-in/out actually changed.
@@ -934,7 +934,7 @@ async function runPostNativeThisDispatch(
934934
(symbols as { _tree?: unknown; _langId?: unknown })._langId = undefined;
935935
}
936936

937-
return { elapsedMs: Date.now() - t0, targetIds, affectedFiles };
937+
return { elapsedMs: performance.now() - t0, targetIds, affectedFiles };
938938
}
939939

940940
interface PostPassTimings {

src/types.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,8 +1268,6 @@ export interface BuildResult {
12681268
edgesMs: number;
12691269
structureMs: number;
12701270
rolesMs: number;
1271-
/** Wall-clock time for the prototype-method post-pass (native path only). */
1272-
protoMethodsMs?: number;
12731271
/** Wall-clock time for the CHA expansion post-pass (native path only). */
12741272
chaMs?: number;
12751273
/** Wall-clock time for the this/super dispatch WASM post-pass (native path only). */

0 commit comments

Comments
 (0)