Skip to content

Commit b641378

Browse files
NFC: Remove instance parameter from InstructionTranslator.translate
1 parent 6bcdc31 commit b641378

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

Sources/WasmKit/Execution/Function.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ struct WasmFunctionEntity {
263263
intercepting: engine.interceptor != nil
264264
)
265265
let iseq = try code.withValue { code in
266-
try translator.translate(code: code, instance: instance)
266+
try translator.translate(code: code)
267267
}
268268
self.code = .compiled(iseq)
269269
return iseq

Sources/WasmKit/Translator.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,10 +1115,7 @@ struct InstructionTranslator<Context: TranslatorContext>: InstructionVisitor {
11151115
// MARK: Main entry point
11161116

11171117
/// Translate a Wasm expression into a sequence of instructions.
1118-
mutating func translate(
1119-
code: Code,
1120-
instance: InternalInstance
1121-
) throws -> InstructionSequence {
1118+
mutating func translate(code: Code) throws -> InstructionSequence {
11221119
if intercepting {
11231120
// Emit `onEnter` instruction at the beginning of the function
11241121
emit(.onEnter(functionIndex))

0 commit comments

Comments
 (0)