Permalink
Browse files

I am getting incorrect results from run-more-tests. Not good.

  • Loading branch information...
Danny Yoo
Danny Yoo committed Feb 14, 2012
1 parent fb4332d commit cdd360474579adea4adf0a204b03769e5b979aad
Showing with 16 additions and 13 deletions.
  1. +14 −12 compiler/compiler.rkt
  2. +1 −0 tests/run-more-tests.rkt
  3. +1 −1 version.rkt
View
@@ -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
@@ -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
@@ -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
View
@@ -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")
View
@@ -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.