Dynamic-extent support for x86. Use boot16.lisp for
bootstrapping. * src/bootfiles/18e/boot16.lisp: New file. * src/docs/cmu-user/extensions.tex (Dynamic-Extent Declarations): New section. * src/compiler/x86/macros.lisp (dynamic-extent-allocation): Rename from stack-allocation, save an instruction. (allocation): Don't call trust-dynamic-extent-declaration-p. * src/compiler/x86/alloc.lisp (%dynamic-extent-start) (%dynamic-extent-end): New vops. (list-or-list*): Add constant arg dynamic-extent. (fixed-alloc): Likewise. * src/compiler/generic/vm-ir2tran.lisp (do-fixed-alloc): Call fixed-alloc with dynamic-extent arg. * src/compiler/hppa/alloc.lisp (%dynamic-extent-start) (%dynamic-extent-end): Add dummy vops. * src/compiler/mips/alloc.lisp: * src/compiler/ppc/alloc.lisp: * src/compiler/alpha/alloc.lisp: * src/compiler/rt/alloc.lisp: Likewise. * src/compiler/seqtran.lisp (mapper-transform): Add dynamic-extent declarations. * src/compiler/node.lisp (continuation): Add slot dynamic-extent. (cleanup): Add :dynamic-extent to type of slot kind. * src/compiler/knownfun.lisp (dynamic-extent-closure-safe): New attribute. * src/compiler/ir2tran.lisp (ir2-stack-allocate): New function. (ir2-convert-closure): Handle dynamic-extent case differently. (%dynamic-extent, %dynamic-extent-start, %dynamic-extent-end) <ir2-convert>: New optimizers. (list, list*): Handle dynamic-extent. * src/compiler/ir1tran.lisp (*trust-dynamic-extent-declarations*) (*dynamic-extent-trace*): New variables. (trust-dynamic-extent-declaration-p): New function. (process-dynamic-extent-declaration) (dynamic-extent-allocation-p, dynamic-extent-closure-args) (gen-%dynamic-extent, with-dynamic-extent): New functions/macros. (ir1-convert-combination): Handle dynamic-extent closure args. (ir1-convert-combination-args): Add arg dynamic-extent-args. Set continuation-dynamic-extent for these args. (process-dynamic-extent-declaration): Rewritten. (ir1-convert-dynamic-extent-bindings): New function. (ir1-convert-special-bindings): Call it. (ir1-convert-lambda-body): Handle dynamic-extent rest lists. (let): Handle dynamic-extent vars. (let*): Call ir1-convert-dynamic-extent-bindings. * src/compiler/globaldb.lisp (*trust-dynamic-extent-declarations*) (trust-dynamic-extent-declaration-p): Remove. * src/compiler/fndb.lisp: Add dynamic-extent-closure-safe attribute to assorted functions. * src/compiler/envanal.lisp (environment-analyze): Call find-dynamic-extent-safe-closures. (emit-cleanups): Handle :dynamic-extent cleanups. (*suppress-dynamic-extent-closure-safe*): New variable. (mark-dynamic-extent-safe-closures) (find-dynamic-extent-safe-closures): New functions. * src/compiler/byte-comp.lisp (compute-produces-and-consumes): Treat :dynamic-extent like :tagbody cleanups. * src/code/exports.lisp ("C"): Export ir2-stack-allocate, %dynamic-extent, %dynamic-extent-start, %dynamic-extent-end. * src/code/byte-interp.lisp (%dynamic-extent): (%dynamic-extent-start, %dynamic-extent-end): New functions. (toplevel): Enable block compilation.
Showing
- bootfiles/18e/boot16.lisp 23 additions, 0 deletionsbootfiles/18e/boot16.lisp
- code/byte-interp.lisp 16 additions, 4 deletionscode/byte-interp.lisp
- code/exports.lisp 4 additions, 2 deletionscode/exports.lisp
- compiler/alpha/alloc.lisp 18 additions, 3 deletionscompiler/alpha/alloc.lisp
- compiler/byte-comp.lisp 2 additions, 2 deletionscompiler/byte-comp.lisp
- compiler/envanal.lisp 83 additions, 3 deletionscompiler/envanal.lisp
- compiler/fndb.lisp 48 additions, 42 deletionscompiler/fndb.lisp
- compiler/generic/vm-ir2tran.lisp 3 additions, 2 deletionscompiler/generic/vm-ir2tran.lisp
- compiler/globaldb.lisp 1 addition, 27 deletionscompiler/globaldb.lisp
- compiler/hppa/alloc.lisp 19 additions, 3 deletionscompiler/hppa/alloc.lisp
- compiler/ir1tran.lisp 233 additions, 99 deletionscompiler/ir1tran.lisp
- compiler/ir2tran.lisp 54 additions, 26 deletionscompiler/ir2tran.lisp
- compiler/knownfun.lisp 5 additions, 2 deletionscompiler/knownfun.lisp
- compiler/mips/alloc.lisp 18 additions, 3 deletionscompiler/mips/alloc.lisp
- compiler/node.lisp 8 additions, 3 deletionscompiler/node.lisp
- compiler/ppc/alloc.lisp 18 additions, 3 deletionscompiler/ppc/alloc.lisp
- compiler/seqtran.lisp 3 additions, 1 deletioncompiler/seqtran.lisp
- compiler/x86/alloc.lisp 34 additions, 10 deletionscompiler/x86/alloc.lisp
- compiler/x86/macros.lisp 7 additions, 11 deletionscompiler/x86/macros.lisp
- docs/cmu-user/extensions.tex 110 additions, 7 deletionsdocs/cmu-user/extensions.tex
Loading
Please register or sign in to comment