From c9ef1ef7860340ff87c051622d0d226791fa296a Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 19 Jul 2023 17:22:38 +0100 Subject: Store references sources in free variables --- .../compiler/backends/llvm/LlvmCodeGenDefineFunctionTests.java | 4 ++-- .../compiler/backends/wasm/WasmCodeGenDefineFunctionTests.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/test/java/org/shedlang/compiler/backends') diff --git a/src/test/java/org/shedlang/compiler/backends/llvm/LlvmCodeGenDefineFunctionTests.java b/src/test/java/org/shedlang/compiler/backends/llvm/LlvmCodeGenDefineFunctionTests.java index 885306b3..7f008681 100644 --- a/src/test/java/org/shedlang/compiler/backends/llvm/LlvmCodeGenDefineFunctionTests.java +++ b/src/test/java/org/shedlang/compiler/backends/llvm/LlvmCodeGenDefineFunctionTests.java @@ -41,7 +41,7 @@ public class LlvmCodeGenDefineFunctionTests { "f", List.of(), List.of(), - FreeVariables.of("a", "b"), + FreeVariables.builder().plus("a", Sources.NULL).plus("b", Sources.NULL).build(), List.of( Instructions.localLoad("a"), Instructions.return_() @@ -63,7 +63,7 @@ public class LlvmCodeGenDefineFunctionTests { "f", List.of(Instructions.param("param1"), Instructions.param("param2")), List.of(Instructions.param("paramA"), Instructions.param("paramB")), - FreeVariables.of("a", "b"), + FreeVariables.builder().plus("a", Sources.NULL).plus("b", Sources.NULL).build(), List.of( Instructions.localLoad("a"), Instructions.localLoad("param1"), diff --git a/src/test/java/org/shedlang/compiler/backends/wasm/WasmCodeGenDefineFunctionTests.java b/src/test/java/org/shedlang/compiler/backends/wasm/WasmCodeGenDefineFunctionTests.java index a996dbcc..2a3fcab2 100644 --- a/src/test/java/org/shedlang/compiler/backends/wasm/WasmCodeGenDefineFunctionTests.java +++ b/src/test/java/org/shedlang/compiler/backends/wasm/WasmCodeGenDefineFunctionTests.java @@ -42,7 +42,7 @@ public class WasmCodeGenDefineFunctionTests { "f", List.of(), List.of(), - FreeVariables.of("a", "b"), + FreeVariables.builder().plus("a", Sources.NULL).plus("b", Sources.NULL).build(), List.of( Instructions.localLoad("a"), Instructions.return_() @@ -65,7 +65,7 @@ public class WasmCodeGenDefineFunctionTests { "f", List.of(Instructions.param("param1"), Instructions.param("param2")), List.of(Instructions.param("paramA"), Instructions.param("paramB")), - FreeVariables.of("a", "b"), + FreeVariables.builder().plus("a", Sources.NULL).plus("b", Sources.NULL).build(), List.of( Instructions.localLoad("a"), Instructions.localLoad("param1"), -- cgit v1.2.3