* Fixed bug 160483: described as "incorrect number of arguments" reported as "not a function"

- The real reason was in the register allocator, where one live
    variable (the memmory size of the bytevector) was not marked live 
    across the call to do-overflow.  When the overflow returned, the 
    value of that variable (which was in the %ebx register) was
    trashed, leading to an incorrect bump in the allocation pointer.
  - Note to self, never blame anything on cache coherency again!
This commit is contained in:
Abdulaziz Ghuloum 2007-11-06 17:04:27 -05:00
parent 217dff5d3e
commit 327e6e9371
3 changed files with 7 additions and 6 deletions

Binary file not shown.

View File

@ -420,11 +420,9 @@
(make-primcall 'nop '())
(make-funcall
(make-primcall 'mref
(list (make-constant
(make-object
(primref->symbol
'do-overflow)))
(make-constant (- disp-symbol-record-proc symbol-ptag))))
(list
(make-constant (make-object (primref->symbol 'do-overflow)))
(make-constant (- disp-symbol-record-proc symbol-ptag))))
(list size)))))
;;; impose value
(define (V d x)
@ -531,7 +529,8 @@
(lambda (x)
(make-seq
(make-set return-value-register x)
(make-primcall 'return (list return-value-register))))))
(make-primcall 'return
(list pcr esp apr return-value-register))))))
;;; impose effect
(define (E x)
(struct-case x
@ -1482,6 +1481,7 @@
[(reg? d)
(cond
[(not (mem-reg? d rs))
(set-asm-instr-op! x 'nop)
(values vs rs fs ns)]
[else
(let ([rs (rem-reg d rs)])

View File

@ -1467,6 +1467,7 @@
(let f ([fml* (cdr fml*)] [rand* rand*])
(cond
[(null? fml*)
;;; FIXME: construct list afterwards
(list (make-funcall (make-primref 'list) rand*))]
[else
(cons (car rand*)