Skip to content

Commit

Permalink
I am getting incorrect results from run-more-tests. Not good.
Browse files Browse the repository at this point in the history
  • Loading branch information
Danny Yoo committed Feb 14, 2012
1 parent fb4332d commit cdd3604
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
26 changes: 14 additions & 12 deletions compiler/compiler.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
before-pop-prompt)
(compile exp '() 'val return-linkage/nontail)
before-pop-prompt-multiple
(make-PopEnvironment (make-Reg 'argcount) (make-Const 0))
(make-PopEnvironment (new-SubtractArg (make-Reg 'argcount) (make-Const 1))
(make-Const 0))
before-pop-prompt
(if (eq? target 'val)
empty-instruction-sequence
Expand Down Expand Up @@ -1554,14 +1555,7 @@
[on-return/multiple (make-label 'procReturnMultiple)]

[on-return (make-LinkedLabel (make-label 'procReturn)
on-return/multiple)]

;; This code does the initial jump into the procedure. Clients of this code
;; are expected to generate the proc-return-multiple and proc-return code afterwards.
[nontail-jump-into-procedure
(append-instruction-sequences
(make-PushControlFrame/Call on-return)
(make-GotoStatement entry-point-target))])
on-return/multiple)])

(cond [(ReturnLinkage? linkage)
(cond
Expand All @@ -1586,18 +1580,26 @@
;; we shouldn't pop the environment.
(make-GotoStatement entry-point-target)])]
[else
(cond [(ReturnLinkage-tail? linkage)
(error 'compile "return linkage, target not val: ~s" target)]
(error 'compile "return linkage, target not val: ~s" target)
#;(cond [(ReturnLinkage-tail? linkage)
]
[else
(make-GotoStatement entry-point-target)])])]


[(or (NextLinkage? linkage) (LabelLinkage? linkage))
(let* ([context (linkage-context linkage)]

;; This code does the initial jump into the procedure. Clients of this code
;; are expected to generate the proc-return-multiple and proc-return code afterwards.
[nontail-jump-into-procedure
(append-instruction-sequences
(make-PushControlFrame/Call on-return)
(make-GotoStatement entry-point-target))]

[check-values-context-on-procedure-return
(emit-values-context-check-on-procedure-return context on-return/multiple on-return)]

;; If the target isn't val, migrate the value from val into it.
[maybe-migrate-val-to-target
(cond
Expand Down
1 change: 1 addition & 0 deletions tests/run-more-tests.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
(test "more-tests/weird-cc.rkt")
(test "more-tests/hashes.rkt")
(test "more-tests/hash-code.rkt")
(test "more-tests/cont-marks-1.rkt")

(test "more-tests/booleans-cs019.rkt")
(test "more-tests/checking-cs019.rkt")
Expand Down
2 changes: 1 addition & 1 deletion version.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
(provide version)
(: version String)

(define version "1.122")
(define version "1.125")

0 comments on commit cdd3604

Please sign in to comment.