From 541da68b824b8c128053e650c157c735be88d7eb Mon Sep 17 00:00:00 2001 From: Danny Yoo Date: Sat, 19 Mar 2011 19:48:06 -0400 Subject: [PATCH] let* test --- test-parse.rkt | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/test-parse.rkt b/test-parse.rkt index 4407096..e2b1b45 100644 --- a/test-parse.rkt +++ b/test-parse.rkt @@ -230,4 +230,28 @@ (make-Seq (list (make-LocalRef 0) (make-LocalRef 1))))))) - \ No newline at end of file + + +(test (parse '(let* ([x 3] + [x (add1 x)]) + (add1 x))) + (make-Top (make-Prefix '(add1)) + + ;; stack layout: [prefix] + + (make-Let1 (make-Constant 3) + + ;; stack layout: [x_0, prefix] + + (make-Let1 + + ;; stack layout: [???, x_0, prefix] + + (make-App + + ;; stack layout: [???, ???, x_0, prefix] + (make-ToplevelRef 3 0) (list (make-LocalRef 2))) + + ;; stack layout [???, x_1, x_0, prefix] + (make-App (make-ToplevelRef 3 0) + (list (make-LocalRef 1))))))) \ No newline at end of file