From c4bd013b53d3d00db54844573c8254bfbb504cde Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 30 Jul 2023 17:08:57 +0100 Subject: Add var-load and var-store to Stack IR --- ...lang.compiler.testing.snapshots.Snapshotter)].expected | 15 +++++++++++++++ ...lang.compiler.testing.snapshots.Snapshotter)].expected | 14 ++++++++++++++ ...lang.compiler.testing.snapshots.Snapshotter)].expected | 14 ++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenVarLoadTests]/[method:canGenerateCodeForVarLoad(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected create mode 100644 snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenVarStoreTests]/[method:canGenerateCodeForVarStore(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected create mode 100644 snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenVarStoreTests]/[method:canStoreIntoVarMultipleTimes(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected (limited to 'snapshots') diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenVarLoadTests]/[method:canGenerateCodeForVarLoad(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenVarLoadTests]/[method:canGenerateCodeForVarLoad(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected new file mode 100644 index 00000000..3a660563 --- /dev/null +++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenVarLoadTests]/[method:canGenerateCodeForVarLoad(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected @@ -0,0 +1,15 @@ +Compilation unit elements: + + +Locals: + * (var "local__x" int) + * (val "varValue__x__0" int) + +Instructions: + +( + (var-load (local "varValue__x__0") (local "local__x")) +) + +Temporary stack: + * varValue__x__0 diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenVarStoreTests]/[method:canGenerateCodeForVarStore(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenVarStoreTests]/[method:canGenerateCodeForVarStore(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected new file mode 100644 index 00000000..88b3bd52 --- /dev/null +++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenVarStoreTests]/[method:canGenerateCodeForVarStore(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected @@ -0,0 +1,14 @@ +Compilation unit elements: + + +Locals: + * (var "local__x" int) + +Instructions: + +( + (var-store (local "local__x") (local "b")) +) + +Temporary stack: + * a diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenVarStoreTests]/[method:canStoreIntoVarMultipleTimes(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenVarStoreTests]/[method:canStoreIntoVarMultipleTimes(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected new file mode 100644 index 00000000..b2bd5d58 --- /dev/null +++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenVarStoreTests]/[method:canStoreIntoVarMultipleTimes(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected @@ -0,0 +1,14 @@ +Compilation unit elements: + + +Locals: + * (var "local__x" int) + +Instructions: + +( + (var-store (local "local__x") (local "b")) + (var-store (local "local__x") (local "a")) +) + +Temporary stack: -- cgit v1.2.3