Skip to content
  1. May 25, 2013
    • Raymond Toy's avatar
      Remove all the extensions to string-upcase and friends. The extended · 49f041ad
      Raymond Toy authored
      functions now live in the new UNICODE package.
      
       src/code/exports.lisp::
       * Export some unicode functions and constants.
      
       src/code/string.lisp::
       * Removed the extended versions of string-upcase and friends.
       * Export surrogates function.
       * Make sure with-one-string is defined so the unicode package can use
         it.
      
       src/code/unicode.lisp:;
       * New file with extended versions of string-upcase and friends.
      
       src/code/unidata.lisp::
       * Export some unicode functions and constants.
      
       src/compiler/fndb.lisp::
       * Update defknowns for string-upcase and friends.
      
       src/tools/worldbuild.lisp::
       * Build unicode.lisp
      
       src/tools/worldcom.lisp::
       * Load unicode.lisp
      49f041ad
  2. May 26, 2012
  3. Nov 17, 2011
  4. Nov 04, 2011
  5. Oct 20, 2011
  6. Sep 25, 2011
  7. Feb 17, 2011
  8. Sep 24, 2010
    • rtoy's avatar
      Add :decoding-error arg to compile-file to specify how decoding errors · 0b17eeac
      rtoy authored
      should be handled.
      
      compiler/main.lisp:
      o Add DECODING-ERROR slot to SOURCE-INFO structure.
      o MAKE-FILE-SOURCE-INFO requires a decoding error argument so the
        SOURCE-INFO structure can be properly initialized.
      o Add :DECODING-ERROR keyword arg to COMPILE-FILE to specify how
        decoding errors are handled.  Default is T, which means to signal an
        error.
      
      compiler/fndb.lisp:
      o Tell compiler about the new parameter.
      
      general-info/release-20c.txt:
      o Document change.
      0b17eeac
  9. Jul 26, 2010
    • rtoy's avatar
      compiler/fndb.lisp: · 2164678a
      rtoy authored
      o Tell compiler that the :allocation option to make-array only takes
        nil and :malloc.
      
      code/array.lisp:
      o Add declaration for :allocation to make-array so that we can catch
        invalid values for :allocation.
      o Add variable *debug-static-array-p* to enable debugging messages
        when GC'ing static arrays.
      2164678a
  10. Jul 03, 2010
  11. Mar 19, 2010
  12. Nov 30, 2009
    • rtoy's avatar
      Add support for static arrays that are not moved by GC. This is based · 7badf899
      rtoy authored
      on an idea from Carl and Lynn Quam's foreign vector code that he sent
      many years ago.  The static arrays will be GCed if nothing references
      them.
      
      The static arrays are currently limited to strings, 8, 16, and 32-bit
      integers (signed and unsigned), single and double floats, and complex
      single and double floats.  Static arrays are not adjustable because
      adjusting an array can change the address if the array grows.  (Ok
      if the array shrinks, but not implemented.)
      
      To indicate a static array, the data portion of the vector header word
      is set to 1.  It is normally 0 for all other Lisp vectors.
      
      code/array.lisp:
      o Add :ALLOCATION keyword arg to MAKE-ARRAY to allow allocation of
        static vectors.  Do the appropriate thing for static arrays.
      o Add MAKE-STATIC-VECTOR.  This is Lynn's foreign vector stuff
        rewritten in Lisp instead of the original mix of Lisp and C.
      o Add STATIC-ARRAY-P to tell if an array is static or not.
      o Signal errors in M...
      7badf899
  13. Sep 28, 2009
  14. Sep 15, 2009
    • rtoy's avatar
      Add support for the Unicode word break algorithm for · fc0eb65b
      rtoy authored
      STRING-CAPITALIZE.  Not sure about the appropriate interface, though.
      
      code/string.lisp:
      o Add Unicode word break algorithm.  Based on Scheme code by William
        Clinger.  Used with permission.
      o Update STRING-CAPITALIZE to take another keyword arg to indicate if
        we should use the Unicode word break algorithm.  Default is not to
        use the Unicode algorithm.
      
      compiler/fndb.lisp:
      o Update defknown for string-capitalize.
      
      i18n/tests/WordBreakTest.txt:
      o New test file for the word break algorithm
      
      i18n/tests/word-break-test.lisp:
      o New file to run the word break test.
      fc0eb65b
  15. Aug 10, 2009
    • rtoy's avatar
      Fixes from Paul Foley: · 94ed0111
      rtoy authored
      o Standard streams no longer change formats when
        *default-external-format* changes.  Use
        stream:set-system-external-format instead, or (setf
        external-format).
      o char-to-octets properly handles surrogate characters being written.
      o Makes simple-streams work again.
      
      This change needs to be cross-compiled.  2009-07 binaries work for
      cross-compiling using the 19e/boot-2008-05-cross-unicode-*.lisp
      cross-compile script.
      94ed0111
  16. Jul 02, 2009
    • rtoy's avatar
      boot-2009-07.lisp: · 67fc4ac5
      rtoy authored
      o Bootstrap file needed to compile this change (because the current
        shrink-vector derive-type optimizer didn't handle union types).
      
      compiler/fndb.lisp:
      o Make the compiler warn if the result of lisp::shrink-vector is not
        used.  This is a problem because the compiler doesn't know that
        shrink-vector destructively modifies the length of a vector.  As a
        partial solution, warn the user if the result of shrink-vector is
        not.
      
      code/hash-new.lisp:
      code/seq.lisp:
      o Make sure the result of shrink-vector is used, to get rid of a new
        compiler warning.
      
      code/unidata.lisp:
      o Modify %unicode-full-case so that it doesn't use shrink-vector
        anymore.
      
      compiler/seqtran.lisp:
      o Fix shrink-vector derive-type optimizer to handle union types.
      
      tools/build-unidata.lisp:
      o Fix typo that someone got in.
      o Make sure the result of shrink-vector is used, to get rid of a new
        compiler warning.
      67fc4ac5
  17. Jun 11, 2009
  18. Mar 28, 2007
  19. Nov 09, 2005
    • rtoy's avatar
      Add more precise checking for results not used for functions like · 26acdd0b
      rtoy authored
      NREVERSE and DELETE.  When given vectors, the vectors are modified
      in-place, so we don't have to use the result.
      
      compiler/fndb.lisp:
      o Functions like NREVERSE and DELETE that take sequences need to check
        to see if the sequence might be a list or not before warning about
        if the result is not used.
      o MERGE needs a fancier :result-not-used function, so disable that for
        now.
      
      compiler/knownfun.lisp:
      o LIST-FUNCTION-RESULT-NOT-USED creates a function to check is the
        specified arg is a list and determines if the result is used or not.
      26acdd0b
    • rtoy's avatar
      Change how the important-result stuff is implemented. We no longer · ec85d432
      rtoy authored
      use an IR1 attribute but allow arbitrary functions to determine if the
      result is used or not.  This allows us to handle SORT and ADJUST-ARRAY
      depending on the args.
      
      Use 19c/boot-2005-11-1.lisp to bootstrap this change.
      
      compiler/knownfun.lisp:
      o Remove IMPORTANT-RESULT attribute.
      o Add new slot to function-info the hold the function to indicate if
        the result is not used.
      o Adjust %defknown with a new keyword arg :result-not-used for the new
        slot.
      o Add functions for the result-not-used arg for
        o SORT-RESULT-NOT-USED-P: non-NIL if the sequence might be a list.
        o ADJUST-ARRAY-RESULT-NOT-USED-P: non-NIL if the array is not known
          to be adjustable.
        o FUNCTION-RESULT-NOT-USED-P:  non-NIL if function result must be
          used (for functions like nreverse).
      
      compiler/ir1opt.lisp:
      o Remove now unused function CHECK-IMPORTANT-RESULT
      o Add check in IR1-OPTIMIZE-COMBINATION to see if function result
        should be used.
      
      compiler/fndb.lisp:
      o Remove IMPORTANT-RESULT attribute and replace with :result-not-used.
      ec85d432
  20. Oct 19, 2005
    • rtoy's avatar
      Port SBCL'S support for detecting when destructive functions (such as · 31ddb605
      rtoy authored
      nreverse) modify constant args and for warning when the result of
      destructive functions is not used.
      
      Detecting modification of constant args is done by adding a new IR1
      transformation that checks that a function is not destructively
      modifying constants or literals.
      
      A new IR1 attribute, important-result, is used to determine if the
      result of a function should be used instead of discarded.  (Note:
      this means some functions are not detected.  This should probably be
      implemented as another transform so the compiler can detect those cases.)
      
      code/error.lisp:
      o Add new condition CONSTANT-MODIFIED.
      
      compiler/fndb.lisp:
      o Note destructive functions that should not modify constant args
      o Note destructive functions whose results should be used.
      
      compiler/ir1opt.lisp:
      o Add new function CHECK-IMPORTANT-RESULT to check if the result is
        used.
      o Update IR1-OPTIMIZE-COMBINATION to check if a function destructively
        modifies constant args or if the result of a destructive function is
        not used.
      
      compiler/knownfun.lisp:
      o Add new IR1 attribute, IMPORTANT-RESULT, to indicate that the result
        of a function should be used.
      o Add new FUNCTION-INFO slot, DESTROYED-CONSTANT-ARGS.  This holds a
        function for computing the constant or literal arguments which are
        destructively modified by the function.
      o Add support functions for DESTROYED-CONSTANT-ARGS functions.
      31ddb605
  21. Jun 13, 2005
    • rtoy's avatar
      Save xref information to fasls. · 624c3dc2
      rtoy authored
      This is done by faking it.  The file being compiled is compiled as
      usual, but we append fake forms to the file as if they came from the
      file.  These fake forms insert the necessary information into the xref
      databases when the fasl is loaded.
      
      To support this feature, we also updated COMPILE-FILE to recognize the
      :xref keyword arg.  Set this to non-NIL to enable computing and saving
      xref information.
      
      code/exports.lisp:
      o Update XREF exports
      
      compiler/fndb.lisp:
      o Update with new definition of COMPILE-FILE.
      
      compiler/main.lisp:
      o Append fake forms to the file being compiled to save xref
        information to the fasl.  This clears out any xref info we might
        have for the file, and inserts the necessary xref information into
        the database.
      o Add :XREF keyword arg to COMPILE-FILE.  Default value of :XREF is
        C::*RECORD-XREF-INFO*.
      
      compiler/xref.lisp:
      o Add function to invalidate xref info for a given namestring, so we
        can reset the info when a fasl with xref info is loaded.
      o Add a function to find all xref information for a given pathname.
        Used for saving xref info to a fasl.
      624c3dc2
  22. Apr 22, 2005
  23. Dec 23, 2004
  24. Dec 14, 2004
    • rtoy's avatar
      o Remove the :derive-type option from the defknowns for concatenate · 796b1dc3
      rtoy authored
        and make-sequence
      o Add derive-type optimizers for concatenate and make-sequence that
        only derives the type when the output sequence specifier is a
        subtype of sequence.  (Only done for constant specifiers.)
      
      These changes fix the bug where the compiler deletes all code,
      including the return for (defun foo () (concatenate 'fixnum '(1 2 3))).
      
      This is caused by confusion in the compiler where derive-node-type
      conflicts with the declared return type and causes all trailing blocks
      to be deleted.
      796b1dc3
  25. Dec 09, 2004
    • rtoy's avatar
      o As a stop-gap for (concatenate 'fixnum '(a b c)) sometimes causing · d4e81917
      rtoy authored
        all following code (including function return) to be deleted, change
        the result-type of concatenate from consed-sequence to t.
      o Do the same for make-sequence.
      
      I think this is because the derived type from the derive-typ optimizer
      conflicts with the declared result type.
      d4e81917
  26. Sep 11, 2003
  27. 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
  28. Aug 16, 2003
    • gerd's avatar
      Format string checking for ERROR, WARN, and others. · a66297f9
      gerd authored
      	* src/compiler/srctran.lisp (check-format-args-1)
      	(check-format-args-2): Extracted from check-format-args.
      	(check-format-args): Take a continuation argument for the control
      	string.
      	(format): Use the new check- functions.
      	(error, warn, compiler-error, compiler-warning)
      	(compiler-note, compiler-mumble): Add format-checking
      	deftransforms.
      
      	* src/compiler/fndb.lisp (compiler-warning, compiler-note)
      	(compiler-mumble, compiler-error): Add defknowns.
      
      	* src/compiler/ir1util.lisp (compiler-mumble, compiler-warning)
      	(compiler-note): Return no values.
      
      	* src/code/parse-time.lisp (deal-with-am-pm): Add a missing
      	arg to error.
      	* src/compiler/saptran.lisp (foreign-symbol-address):
      	* src/compiler/new-assem.lisp (emit-annotation): Likewise.
      a66297f9
  29. Aug 05, 2003
    • toy's avatar
      Remove the x86 conditionalization of the dynamic-extent arg to · b359933a
      toy authored
      listify-rest-args.
      b359933a
    • 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
  30. Aug 02, 2003
    • gerd's avatar
      (deftype string-and-number () '(cons string (cons number null))) · 63c1a0fe
      gerd authored
      	(defun bug1 (x)
      	  (declare (type string-and-number x))
         	  (the number (car (reverse x))))
      
      	(bug1 (list "one" 1))
      	 => Type error 1 is not of type number.
      
      	Reported by Luke Gorrie on cmucl-imp.
      
      	* src/compiler/knownfun.lisp (result-type-first-arg/reverse)
      	(reversed-cons-type): New functions.
      
      	* src/compiler/fndb.lisp (nreverse, reverse): Use
      	result-type-first-arg/reverse.
      63c1a0fe
  31. Jul 30, 2003
  32. Jul 19, 2003
  33. Jul 16, 2003
  34. Jul 01, 2003
  35. Jun 06, 2003