From 9b9464229a4ba24b36eabbd7ed6fca5c439f648a Mon Sep 17 00:00:00 2001 From: Abdulaziz Ghuloum Date: Wed, 13 Aug 2008 22:28:22 -0700 Subject: [PATCH] - fixed how stack overflow check is performed (now using unsigned arithmetic to compare the stack pointer with the redline). - disabled stack overflow check elimination due to a bug in the logic that assumes primitive calls are not recursive. --- scheme/ikarus.compiler.altcogen.ss | 4 ++-- scheme/pass-specify-rep-primops.ss | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scheme/ikarus.compiler.altcogen.ss b/scheme/ikarus.compiler.altcogen.ss index cdf736e..7b01b13 100644 --- a/scheme/ikarus.compiler.altcogen.ss +++ b/scheme/ikarus.compiler.altcogen.ss @@ -276,11 +276,11 @@ [(funcall rator arg*) #t] [(jmpcall label rator arg*) #t] [(mvcall rator k) #t] + [(primcall op arg*) #t] ;;; (ormap A arg*)] PUNT!!! FIXME! [(bind lhs* rhs* body) (or (ormap NonTail rhs*) (NonTail body))] [(fix lhs* rhs* body) (NonTail body)] [(conditional e0 e1 e2) (or (NonTail e0) (NonTail e1) (NonTail e2))] [(seq e0 e1) (or (NonTail e0) (NonTail e1))] - [(primcall op arg*) (ormap A arg*)] [(forcall op arg*) (ormap NonTail arg*)] [(known x t v) (NonTail x)] [else (error who "invalid expr" x)])) @@ -310,7 +310,7 @@ [(clambda label case* cp free* name) (make-clambda label (map ClambdaCase case*) cp free* name)])) (define (Main x) - (if (Tail x) + (if (Tail x) (insert-check x) x)) (define (Program x) diff --git a/scheme/pass-specify-rep-primops.ss b/scheme/pass-specify-rep-primops.ss index 876e952..ef173fc 100644 --- a/scheme/pass-specify-rep-primops.ss +++ b/scheme/pass-specify-rep-primops.ss @@ -2339,7 +2339,7 @@ [(E) (make-shortcut (make-conditional - (make-primcall '< + (make-primcall 'u< (list esp (make-primcall 'mref (list pcr (make-constant pcb-frame-redline))))) (make-primcall 'interrupt '())