Skip to content

Commit dc161a5

Browse files
committed
Rename setStackFrame to setScopeStackFrame
1 parent 22296fb commit dc161a5

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

src/builder/builder.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,12 @@ describe("ScopeInfoBuilder", () => {
9292
});
9393
});
9494

95-
describe("setStackFrame", () => {
95+
describe("setScopeStackFrame", () => {
9696
it("sets the isStackFrame flag", () => {
97-
const info = builder.startScope(0, 0).setStackFrame(true).endScope(10, 0)
97+
const info = builder.startScope(0, 0).setScopeStackFrame(true).endScope(
98+
10,
99+
0,
100+
)
98101
.build();
99102

100103
assertStrictEquals(info.scopes[0]?.isStackFrame, true);

src/builder/builder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export class ScopeInfoBuilder {
6969
return this;
7070
}
7171

72-
setStackFrame(isStackFrame: boolean): this {
72+
setScopeStackFrame(isStackFrame: boolean): this {
7373
const scope = this.#scopeStack.at(-1);
7474
if (scope) scope.isStackFrame = isStackFrame;
7575
return this;

src/builder/safe_builder.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,15 @@ describe("SafeScopeInfoBuilder", () => {
8787
});
8888
});
8989

90-
describe("setStackFrame", () => {
90+
describe("setScopeStackFrame", () => {
9191
it("throws when no scope is on open", () => {
92-
assertThrows(() => builder.setStackFrame(true));
92+
assertThrows(() => builder.setScopeStackFrame(true));
9393
});
9494

9595
it("throws while building a range", () => {
9696
builder.startRange(0, 0);
9797

98-
assertThrows(() => builder.setStackFrame(true));
98+
assertThrows(() => builder.setScopeStackFrame(true));
9999
});
100100
});
101101

src/builder/safe_builder.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ export class SafeScopeInfoBuilder extends ScopeInfoBuilder {
6666
return this;
6767
}
6868

69-
override setStackFrame(isStackFrame: boolean): this {
70-
this.#verifyScopePresent("setStackFrame");
71-
this.#verifyEmptyRangeStack("setStackFrame");
69+
override setScopeStackFrame(isStackFrame: boolean): this {
70+
this.#verifyScopePresent("setScopeStackFrame");
71+
this.#verifyEmptyRangeStack("setScopeStackFrame");
7272

73-
super.setStackFrame(isStackFrame);
73+
super.setScopeStackFrame(isStackFrame);
7474
return this;
7575
}
7676

0 commit comments

Comments
 (0)