From 86f7fa2960fe0eaa49f0cebdedd8cc04f31ebd76 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Mon, 20 Nov 2023 22:27:15 +0000 Subject: Implement stack IR vars using alloc-stack in Patio --- ...g.compiler.testing.snapshots.Snapshotter)].expected | 10 ++++++++-- ...g.compiler.testing.snapshots.Snapshotter)].expected | 10 ++++++++-- ...g.compiler.testing.snapshots.Snapshotter)].expected | 18 +++++++++++++++--- 3 files changed, 31 insertions(+), 7 deletions(-) (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 index 3a660563..499b6c36 100644 --- 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 @@ -2,13 +2,19 @@ Compilation unit elements: Locals: - * (var "local__x" int) + * (val "local__x" data-ptr) * (val "varValue__x__0" int) Instructions: ( - (var-load (local "varValue__x__0") (local "local__x")) + ( + memory-load + (local "varValue__x__0") + pointer=(local "local__x") + layout=int + offset=() + ) ) Temporary stack: 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 index 88b3bd52..c6e9335d 100644 --- 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 @@ -2,12 +2,18 @@ Compilation unit elements: Locals: - * (var "local__x" int) + * (val "local__x" data-ptr) Instructions: ( - (var-store (local "local__x") (local "b")) + ( + memory-store + pointer=(local "local__x") + layout=int + offset=() + value=(local "b") + ) ) Temporary stack: 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 index b2bd5d58..d299f1ae 100644 --- 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 @@ -2,13 +2,25 @@ Compilation unit elements: Locals: - * (var "local__x" int) + * (val "local__x" data-ptr) Instructions: ( - (var-store (local "local__x") (local "b")) - (var-store (local "local__x") (local "a")) + ( + memory-store + pointer=(local "local__x") + layout=int + offset=() + value=(local "b") + ) + ( + memory-store + pointer=(local "local__x") + layout=int + offset=() + value=(local "a") + ) ) Temporary stack: -- cgit v1.2.3