Skip to content
Snippets Groups Projects
  1. Dec 16, 2004
    • rtoy's avatar
      Enable loop analysis code. But the default is loop analysis is not · be26c9f9
      rtoy authored
      done, because we don't do anything with the loop results.
      
      ir1util.lisp:
      	o Make sure component initializes the outer-loop slot of the
      	  component.
      
      main.lisp:
      	o Add defvar *loop-analyze*, defaulting to NIL.
      	o Run loop analysis code when *loop-analyze* is T.
      
      node.lisp:
      	o Make the outer-loop slot of a component a required arg and
      	  adjust the declared type appropriately.
      
      represent.lisp:
      	o Add ASSIGN-TN-DEPTHS function to assign loop depths to TNs.
      
      vop.lisp:
      	o Forgot to add the loop-depth slot for TNs.
      be26c9f9
  2. Nov 05, 2004
    • rtoy's avatar
      Incorporate the loop analysis code into cmucl, based on similar work · b3435e84
      rtoy authored
      done in SBCL:
      
      node.lisp:
        o Add new slots to cblock and component structures that are needed
          for loop analysis.
      
      vop.lisp:
        o Enable the cloop structure.
      
      loadcom.lisp:
        o Load loop
      
      comcom.lisp:
        o Compile loop
      
      No cross-compile needed.  When building, select the CLOBBER-IT restart
      when asked.
      b3435e84
  3. Oct 02, 2003
    • gerd's avatar
      (compile nil · 5d00555f
      gerd authored
      	  '(lambda (c) (declare (optimize (speed 3) (debug 1)))
      	     (flet ((%f18 () -36))
      	        (flet ((%f13 () (let () (block b8 (return-from b8 c)))))
      	          (%f18)))))
      	 => error nil is not an integer, in dump-1-variable
      
      	Found by Paul Dietz.
      
      	This is caused by a lambda-var being passed to dump-1-variable
      	which hasn't been packed, and so has a null tn-offset.  A ref to
      	this lambda-var remains at this point because it is referenced
      	from a different component.  The ref is deleted when that
      	component is compiled.  The problem is that there shouldn't have
      	been two components to begin with, which we prevent by recording
      	additional DFO dependencies for closed-over variables and entries.
      
      	Port from SBCL, basically.
      
      	Does not require a bootstrap file, but a full build is necessary
      	due to the renamed clambda structure slot.
      
      	* src/compiler/dfo.lisp (dfo-walk-call-graph): Process
      	new dfo dependencies.
      
      	* src/compiler/node.lisp (clambda): Rename slot `calls'
      	to `dfo-dependencies'.
      
      	* src/compiler/locall.lisp (convert-call, convert-mv-call):
      	Call note-dfo-dependency.
      	(merge-lets): Change for new clambda slot name.
      	(unconvert-tail-calls): Handle the case of non-clambdas in
      	the dfo dependencies.
      
      	* src/compiler/ir1util.lisp (continuation-home-lambda)
      	(note-dfo-dependency): New functions.
      
      	* src/compiler/ir1tran.lisp (ir1-convert-variable)
      	(return-from, go, setq): Call note-dfo-dependency.
      
      	* src/compiler/xref.lisp (lambda-called-p): New function.
      	(prettiest-caller-name): Use lambda-called-p instead of
      	lambda-calls.
      5d00555f
  4. Aug 25, 2003
    • gerd's avatar
      Dynamic-extent support for x86. Use boot16.lisp for · f3fe0b8d
      gerd authored
      	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.
      f3fe0b8d
  5. Aug 06, 2003
    • gerd's avatar
      Dynamic-extent closures for x86. Use boot15.lisp for · 5ac014db
      gerd authored
      	bootstrapping.
      
      	(defun prn (fn)
      	  (print (funcall fn)))
      
      	(defun foo (x)
      	  (flet ((bar () x))
      	    (declare (dynamic-extent #'bar))
      	    (prn #'bar)))
      
      	=> The closure for BAR is allocated from the stack
      
      	* src/compiler/node.lisp (lexenv): Add slot dynamic-extent.
      
      	* src/compiler/ir1util.lisp (make-lexenv): Add keyword
      	arg for dynamic-extent.
      
      	* src/code/defstruct.lisp (%redefine-defstruct)
      	[#+bootstrap-dynamic-extent]: Definition that corresponds
      	to to the clobber-it restart.
      
      	* src/compiler/ir1tran.lisp (process-dynamic-extent-declaration):
      	Rewritten.
      
      	* src/compiler/x86/alloc.lisp (make-closure): Add constant
      	arg dynamic-extent, and use it for allocation.
      
      	* src/compiler/ir2tran.lisp (ir2-convert-closure) [#+x86]:
      	Pass dynamic-extent to the make-closure vop.
      5ac014db
  6. Aug 05, 2003
    • gerd's avatar
      DYNAMIC-EXTENT rest args. Currently for x86 only. Speed must be · 88a53c80
      gerd authored
      	greater than safety for stack-allocation to actually happen, which
      	is what ACL defaults to.  Use boot15.lisp to bootstrap.
      
      	* src/bootfiles/18e/boot15.lisp: New file.
      
      	* src/compiler/node.lisp (leaf): Add slot dynamic-extent.
      
      	* src/compiler/x86/macros.lisp (load-size, inline-allocation)
      	(not-inline-allocation): Extract from function allocation.
      	(stack-allocation): New function.
      	(allocation): Add arg dynamic-extent.  Call stack-allocation
      	if dynamic-extent is true, and speed > safety.
      
      	* src/compiler/x86/call.lisp (listify-rest-args): Add
      	constant third arg, and pass it to allocation.
      
      	* src/code/class.lisp (find-layout): Put part in
      	#-bootstrap-dynamic-extent.
      
      	* src/compiler/ir1tran.lisp (process-dynamic-extent-declaration):
      	New function.
      	(*suppress-dynamic-extent-declaration*): New variable.
      	(process-1-declaration): Call process-dynamic-extent-declaration.
      	(convert-more-entry) [#+x86]: Call %listify-rest-args with
      	third arg dynamic-extent.
      
      	* src/compiler/eval-comp.lisp (%listify-rest-args) [#+x86]:
      	* src/compiler/fndb.lisp (%listify-rest-args) [#+x86]: Add
      	third arg for dynamic-extent.
      
      	Possibly temporary workaround for SBCL build problems caused by a
      	situation like
      
      	  (defvar *foo*)
      	  (declaim (type foo *foo*))
      	  (defstruct foo)
      	  (defun foo ()
      	    (let ((*foo* (some-unknown-function)))
      	       ...))
      
      	When a type check is being generated for the local binding of
      	*foo*, *foo*'s type in the info database is still an unknown-type.
      	The typep transform generates a call to %instance-typep, because
      	it knows that foo is an instance.  The deftransform for
      	%instance-typep does not run, so an actual call to %instance-typep
      	is being generated.  A function %instance-typep doesn't exist at
      	run time, though.
      
      	* src/compiler/ir1tran.lisp (find-free-variable): If the
      	variable's type is an unknown-type, reparse it, and change the
      	type in the info database.
      88a53c80
  7. Apr 13, 2003
    • gerd's avatar
      The SEQUENCE-COUNT type was previously used in c:fndb, but since · c1effa7a
      gerd authored
      	C::SEQUENCE-COUNT /= KERNEL::SEQUENCE-COUNT, it was an unknown
      	type.  Please read boot4.lisp.
      
      	* src/code/exports.lisp ("KERNEL"): Export sequence-count.
      
      	* src-types/bootfiles/18e/boot4.lisp: New file.
      
      
      	Make compute-effective-slot-definition AMOP compliant.
      	Patch from Kevin Rosenberg.
      
      	* src/pcl/std-class.lisp (compute-slots): Pass slot name
      	to compute-effective-slot-definition.
      	(compute-slots): Likewise.
      	(compute-effective-slot-definition): Add parameter slot-name.
      
      	* src/pcl/generic-functions.lisp (compute-effective-slot-definition):
      	Add second parameter slot-name.
      
      
      	Allow non-keyword keyword names in lambda lists.  This fixes test
      	cases STRUCTURE-BOA-TEST-15/[1-8], and FLET.30.
      
      	* src/compiler/node.lisp (arg-info): Accept non-keyword
      	keyword names.
      
      	* src/code/type.lisp (key-info): Likewise.
      
      
      	Fix type system bugs detected by Paul Dietz' test suite
      	This is to a large extent a port from SBCL.
      
      	* src/code/type.lisp: Mostly rewritten with code ported from
      	SBCL.
      
      	* src/compiler/typetran.lisp (ir1-transform-type-predicate):
      	Return nil if type is *empty-type*.
      	(source-transform-negation-typep)
      	(source-transform-intersection-typep): New functions.
      	(source-transform-array-typep): Handle unknown array element types.
      	(typep): Add handling of negation and intersection types.
      
      	* src/compiler/srctran.lisp (make-canonical-union-type):
      	Simplify, now that #'type-union is smarter.
      	(ir1-transform-<-helper): Give up on non-numeric, non-member
      	types.
      
      	* src/compiler/checkgen.lisp (type-test-cost): Add a case
      	for intersection-type.
      	(values-types-asserted): Don't use coerce-to-values, see
      	the comment there.
      
      	* src/compiler/array-tran.lisp (array-dimension): Accept
      	:maybe as array-type-complexp.
      
      	* src/code/pred.lisp (%%typep): Add handling of
      	negation-types and intersection-types.  Change cases of
      	hairy-types, union-types, and arrays with unknown element type.
      
      	* src/code/exports.lisp ("KERNEL"): Export negation-type,
      	negation-type-type, intersection-type, intersection-type-types.
      
      	* src/code/class.lisp (sealed-class-intersection):
      	Return one value.
      	(class :simple-intersection): Return one value, return nil in
      	the default case.
      	(class :complex-subtypep-arg2): New type method.
      c1effa7a
  8. Apr 11, 2003
    • emarsden's avatar
      * Change the way that the compiler searches for function names in the · e790920a
      emarsden authored
         lexical environment to take into account generalized function names, and
         in particular inline declarations for FLET or LABELS functions. New
         function called FUNCTION-NAME-EQV-P that knows that a name like (FLET
         INNER OUTER) is equivalent to a name like INNER.
      
       * Include any context information in undefined-function warnings. Forms like
      
              (defun bogus (x)
                (declare (ftype (function (t) *) no-ftype))
                  (flet ((foo (x) (random (1+ x))))
                      (declare (inline almost-foo))
              	    (foo (+ x 1))))
      
         will now generate warnings of the form
      
            Warning: Undefined function almost-foo in an inline or notinline
            declaration
      
            Warning: Undefined function no-ftype in a function type declaration
      e790920a
  9. Mar 22, 2003
    • gerd's avatar
      * bootfiles/18e/boot[12].lisp: Bootstrap files for the lisp:class · a1e3ed93
      gerd authored
      = pcl:class part.  To get it booted from 18e, cross-compile using
      boot1.lisp as bootstrap.lisp in pmai's build scripts, then do a
      normal compile with boot2.lisp as bootstrap.lisp with the
      resulting Lisp.
      
      * code/byte-interp.lisp, code/defstruct.lisp, code/describe.lisp:
      * code/error.lisp, code/exports.lisp, code/hash-new.lisp:
      * code/hash.lisp, code/macros.lisp, code/misc.lisp:
      * code/package.lisp, code/pred.lisp, code/sharpm.lisp, code/type.lisp:
      * compiler/dump.lisp, compiler/fndb.lisp, compiler/globaldb.lisp:
      * compiler/proclaim.lisp, compiler/typetran.lisp, compiler/xref.lisp:
      * compiler/generic/primtype.lisp, compiler/generic/vm-type.lisp:
      Changes for to use kernel::class etc.
      
      * code/class.lisp (toplevel): Shadow class, built-in-class etc.
      (class): Give it conc-name %class-.
      (toplevel) [#+bootstrap-lisp-class=pcl-class]: Define old accessors.
      (everywhere): Use new class accessors.
      
      * compiler/generic/vm-fndb.lisp (%make-instance): Change from
      unsafe to flushable and movable.
      
      * code/ntrace.lisp (expand-trace, untrace): Changes for method
      tracing.
      
      * code/profile.lisp (profile, profile-all, unprofile): Method
      profiling.
      
      * pcl/*.text, pcl/bench.lisp, pcl/extensions.lisp:
      * pcl/fast-init.lisp, pcl/precom1.lisp, pcl/precom4.lisp:
      * pcl/structure-class.lisp, pcl/user-instances.lisp:
      Removed.
      
      * tools/pclcom.lisp: Changes for my PCL and lisp:class =
      pcl::class.
      a1e3ed93
  10. Mar 04, 2001
  11. Jun 18, 2000
    • dtc's avatar
      Ensure that continuation references stored within the lexical · bfbe4f7e
      dtc authored
      environment, for block exits and tagbody entries, are updated when
      continuations are substituted. Add a cont-ref structure, and a new
      slot to continuations which holds the list of these references to be
      be updated when the continuation is substituted. Based on the work of
      Tim Moore.
      bfbe4f7e
  12. Feb 25, 1999
  13. Oct 31, 1994
  14. Feb 11, 1994
  15. Jan 05, 1994
  16. Sep 10, 1993
  17. Aug 21, 1993
  18. Aug 19, 1993
  19. May 06, 1993
  20. Mar 12, 1993
  21. Feb 26, 1993
  22. Feb 08, 1993
  23. Sep 22, 1992
  24. Sep 07, 1992
    • ram's avatar
      Changes to handling of inline expansion/inlinep information. · 82e3ca56
      ram authored
      LEXENV-INLINES is gone.  Instead, :NOTINLINE references are changed
      to refer to :NOTINLINE DEFINED-FUNCTION leafs.  The previous use
      in e.g. locall where we set LEAF-INLINEP to NIL to inhibit further
      optimization in the case of an error is now handed by the :ERROR
      combination-kind.
      Moved *failed-optimizations* to COMPONENT-FAILED-OPTIMIZATIONS.  Added
      COMPONENT-INLINE-EXPANSIONS which stops infinite (or very frequent) inline
      expansions.
      Added :COMPLEX-TOP-LEVEL functional kind used to represent components
      with mixed top-level and run-time code.
      The DEFINED-FUNCTION leaf stores information about functions where we 
      either know the actual definition, inline expansion, or have a non-default
      inlinep.  This allows us to clean up the semantics of block compilation
      and inline expansion a bit, since we can keep track of both the GLOBAL-VAR
      and FUNCTIONAL versions of a function.
      82e3ca56
  25. Apr 21, 1992
  26. Feb 23, 1992
  27. Dec 15, 1991
  28. Dec 14, 1991
  29. Dec 11, 1991
  30. Nov 09, 1991
  31. Nov 05, 1991
  32. Jul 18, 1991
  33. Apr 20, 1991
  34. Feb 20, 1991
  35. Jan 02, 1991
    • ram's avatar
      Added new CALL-LEXENV slot to CLAMBDA so that we can remember what · 6ce8aec6
      ram authored
      the calling environment of a LET was even if the BIND gets deleted (due 
      to all variables being deleted.)
      Also added many uses of REQUIRED-ARGUMENT to suppress type warnings.
      Added a use of FREEZE-TYPE to speed type tests for these types.
      6ce8aec6
  36. Nov 03, 1990
  37. Oct 12, 1990
  38. Jul 23, 1990
    • ram's avatar
      Lexenv changes. New lexenv structure. In the node, there is a new · 6b452bb2
      ram authored
      lexenv slot that replaces the old cookie, default-cookie slots.  Also
      the node-source-path now includes the info that used to be in node-source.
      The block-flags structure replaces all of the block boolean attribute
      slots.  Block start-cleanup, end-cleanup and lambda are gone.  The
      :entry cleanup kind is now broken down into :block and :tagbody kinds.
      Cleanup-Mess-Up is now a non-messed-up node.  Entry-Exits is now a list
      of exits.
      6b452bb2
  39. Jun 06, 1990
  40. May 30, 1990
Loading