- (alloc-size (pad-data-block size))
- (allocation-area-tn (if stack-allocate-p csp-tn alloc-tn)))
- (pseudo-atomic (pa-flag :extra (if stack-allocate-p 0 alloc-size))
- (when stack-allocate-p
- (align-csp result))
- (inst clrrwi. result allocation-area-tn n-lowtag-bits)
- (when stack-allocate-p
- (inst addi csp-tn csp-tn alloc-size))
- (inst ori result result fun-pointer-lowtag)
- (inst lr temp (logior (ash (1- size) n-widetag-bits) closure-header-widetag))
- (storew temp result 0 fun-pointer-lowtag)))
- ;(inst lis temp (ash 18 10))
- ;(storew temp result closure-jump-insn-slot function-pointer-type)
- (storew result result closure-self-slot fun-pointer-lowtag)
- (storew function result closure-fun-slot fun-pointer-lowtag)))
+ (alloc-size (pad-data-block size)))
+ (pseudo-atomic (pa-flag)
+ (if stack-allocate-p
+ (progn
+ (align-csp result)
+ (inst clrrwi. result csp-tn n-lowtag-bits)
+ (inst addi csp-tn csp-tn alloc-size)
+ (inst ori result result fun-pointer-lowtag)
+ (inst lr temp (logior (ash (1- size) n-widetag-bits) closure-header-widetag)))
+ (progn
+ (allocation result (pad-data-block size)
+ fun-pointer-lowtag :temp-tn temp :flag-tn pa-flag)
+ (inst lr temp (logior (ash (1- size) n-widetag-bits) closure-header-widetag))))
+ ;;; should this be closure-fun-slot instead of 0?
+ (storew temp result 0 fun-pointer-lowtag)
+ (storew result result closure-self-slot fun-pointer-lowtag)
+ (storew function result closure-fun-slot fun-pointer-lowtag)))))