[BE] Various linter fixes
Lauren Tan committed
Feb 13, 2023 at 16:52 UTC
985a289a4c0e489f6bdfbdd911e4b1707c234c49
3 files changed
+3
-6
compiler/forget/src/ReactiveScopes/CodegenReactiveFunction.ts
-2
@@ -698,8 +698,6 @@ function codegenInstructionValue(
698
break;
699
}
700
case "FunctionExpression": {
701
- const id =
702
- instrValue.name !== null ? t.identifier(instrValue.name) : null;
701
value = instrValue.expr;
702
break;
703
}
compiler/forget/src/ReactiveScopes/InferReactiveScopeVariables.ts
+1
-2
@@ -15,7 +15,6 @@ import {
15
makeScopeId,
16
Place,
17
ReactiveScope,
18
- ScopeId,
18
} from "../HIR/HIR";
19
import { eachInstructionOperand } from "../HIR/visitors";
20
import DisjointSet from "../Utils/DisjointSet";
@@ -77,7 +76,7 @@ import { assertExhaustive } from "../Utils/utils";
76
* mutate(x); // bc y is aliased here, it should still be considered mutable above
77
* ```
78
*/
80
-export function inferReactiveScopeVariables(fn: HIRFunction) {
79
+export function inferReactiveScopeVariables(fn: HIRFunction): void {
80
// Represents the set of reactive scopes as disjoint sets of identifiers
81
// that mutate together.
82
const scopeIdentifiers = new DisjointSet<Identifier>();
compiler/forget/src/ReactiveScopes/PromoteUsedTemporaries.ts
+2
-2
@@ -20,7 +20,7 @@ type VisitorState = {
20
nextId: number;
21
};
22
class Visitor extends ReactiveFunctionVisitor<VisitorState> {
23
- override visitScope(block: ReactiveScopeBlock, state: VisitorState) {
23
+ override visitScope(block: ReactiveScopeBlock, state: VisitorState): void {
24
this.traverseScope(block, state);
25
for (const dep of block.scope.dependencies) {
26
const { identifier } = dep.place;
@@ -63,7 +63,7 @@ class Visitor extends ReactiveFunctionVisitor<VisitorState> {
63
}
64
}
65
}
66
-export function promoteUsedTemporaries(fn: ReactiveFunction) {
66
+export function promoteUsedTemporaries(fn: ReactiveFunction): void {
67
const state: VisitorState = {
68
nextId: 0,
69
temporaries: new Map(),