diff options
| author | Michael Williamson <mike@zwobble.org> | 2023-07-30 17:08:57 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2023-07-30 17:08:57 +0100 |
| commit | c4bd013b53d3d00db54844573c8254bfbb504cde (patch) | |
| tree | ccfb3d8cd18ea9031bc7ed0f4267d0e25489eddd /snapshots | |
| parent | 3227422c3f62cba3c414b5ce0bf71137553cdf6b (diff) | |
Add var-load and var-store to Stack IR
Diffstat (limited to 'snapshots')
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: |
