aboutsummaryrefslogtreecommitdiff
path: root/snapshots
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2023-07-30 17:08:57 +0100
committerMichael Williamson <mike@zwobble.org>2023-07-30 17:08:57 +0100
commitc4bd013b53d3d00db54844573c8254bfbb504cde (patch)
treeccfb3d8cd18ea9031bc7ed0f4267d0e25489eddd /snapshots
parent3227422c3f62cba3c414b5ce0bf71137553cdf6b (diff)
Add var-load and var-store to Stack IR
Diffstat (limited to 'snapshots')
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenVarLoadTests]/[method:canGenerateCodeForVarLoad(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected15
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenVarStoreTests]/[method:canGenerateCodeForVarStore(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected14
-rw-r--r--snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenVarStoreTests]/[method:canStoreIntoVarMultipleTimes(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected14
3 files changed, 43 insertions, 0 deletions
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: