fix handling of code compiled to ignore
When the compiler sees `(if #f A B)`, it compiles A in a throwaway mode, but the throwaway mode need to produce a slightly more plausible result than it was so that further throwaway transformation is not confused.
This commit is contained in:
parent
40f3bf1810
commit
6182541889
|
@ -3375,6 +3375,20 @@
|
|||
(call-with-continuation-prompt g p)
|
||||
(call-with-continuation-prompt g p)))
|
||||
|
||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Make sure the compiler isn't confused by
|
||||
;; throwaway internal-definition expansion:
|
||||
|
||||
(test #t procedure?
|
||||
(eval '(lambda (db)
|
||||
(if #f
|
||||
(let ()
|
||||
(define matches
|
||||
(let loop ()
|
||||
(define s db)
|
||||
null))
|
||||
5)
|
||||
(void)))))
|
||||
|
||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
|
|
|
@ -1777,7 +1777,7 @@ scheme_lookup_binding(Scheme_Object *find_id, Scheme_Comp_Env *env, int flags,
|
|||
*_lexical_binding_id = val;
|
||||
}
|
||||
if (flags & SCHEME_DONT_MARK_USE)
|
||||
return scheme_make_local(scheme_local_type, 0, 0);
|
||||
return scheme_make_local(scheme_local_type, p+i, 0);
|
||||
else
|
||||
return (Scheme_Object *)get_frame_loc(frame, i, j, p, flags);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user