MCPcopy Create free account
hub / github.com/nodejs/node / setInlinings

Method setInlinings

deps/v8/tools/turbolizer/src/source-resolver.ts:68–82  ·  view source on GitHub ↗
(inliningsJson)

Source from the content-addressed store, hash-verified

66 }
67
68 public setInlinings(inliningsJson): void {
69 if (inliningsJson) {
70 for (const [inliningIdStr, inlining] of Object.entries<InliningPosition>(inliningsJson)) {
71 const scriptOffset = inlining.inliningPosition.scriptOffset;
72 const inliningId = inlining.inliningPosition.inliningId;
73 const inl = new InliningPosition(inlining.sourceId,
74 new SourcePosition(scriptOffset, inliningId));
75 this.inlinings[Number(inliningIdStr)] = inl;
76 this.inliningsMap.set(inl.inliningPosition.toString(), inl);
77 }
78 }
79 // This is a default entry for the script itself that helps
80 // keep other code more uniform.
81 this.inlinings[-1] = new InliningPosition(-1, null);
82 }
83
84 public setSources(sourcesJson, mainFunc: Source): void {
85 if (sourcesJson) {

Callers 1

loadFileFunction · 0.80

Calls 3

entriesMethod · 0.45
setMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected