Skip to content

Commit

Permalink
Inline the short function callFlat in its only caller
Browse files Browse the repository at this point in the history
  • Loading branch information
apt1002 committed Aug 21, 2024
1 parent 5e2a3f6 commit d92604a
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/ark/interpreter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class ArkFlatClosure extends ArkClosure {
}

async call(locals: ArkValRef[]) {
return callFlat(this, locals)
return evalFlat(new ArkState(this.body, new ArkFrame(locals, this.captures)))
}
}
class ArkFlatGeneratorClosure extends ArkFlatClosure {}
Expand Down Expand Up @@ -412,8 +412,3 @@ export async function pushLets(ark: ArkState, boundVars: [string, ArkInst][]) {
}
return lets.length
}

async function callFlat(callable: ArkFlatClosure, locals: ArkValRef[]): Promise<ArkVal> {
const ark = new ArkState(callable.body, new ArkFrame(locals, callable.captures))
return evalFlat(ark)
}

0 comments on commit d92604a

Please sign in to comment.