aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorCamil Staps2017-07-24 18:22:04 +0200
committerCamil Staps2017-07-24 18:22:04 +0200
commitdcc9dd17186907d105cf01358b39e1551c0fc874 (patch)
tree7806814445ee9b7b7a7992882866445bea746e71 /examples
parentOptimisations (diff)
Use B-stack for basic arguments (not locals): resolve #9
Diffstat (limited to 'examples')
-rw-r--r--examples/while.sil9
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/while.sil b/examples/while.sil
index fb2778b..08f27f0 100644
--- a/examples/while.sil
+++ b/examples/while.sil
@@ -1,11 +1,12 @@
-Void sleep(Int n) {
- |~ pushI_a 0
+Int sleep(Int n) {
+ |~ push_b 0
|~ ccall sleep "I:I"
- |~ pop_b 1
+ |~ update_b 0 1
}
Void print(Int n) {
- |~ push_a 0
+ |~ create
+ |~ fillI_b 0 0
|~.d 1 0
|~ jsr _print_graph
|~.o 0 0