/[cmucl]/src/compiler/array-tran.lisp
ViewVC logotype

Log of /src/compiler/array-tran.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Links to HEAD: (view) (annotate)
Links to snapshot-2008-06: (view) (annotate)
Sticky Tag:

Revision 1.42 - (view) (annotate) - [select for diffs]
Wed Mar 5 14:31:30 2008 UTC (6 years, 1 month ago) by rtoy
Branch: MAIN
CVS Tags: RELEASE_19f, label-2009-03-16, label-2009-03-25, merge-sse2-packed, merge-with-19f, release-19f-base, release-19f-pre1, snapshot-2008-04, snapshot-2008-05, snapshot-2008-06, snapshot-2008-07, snapshot-2008-08, snapshot-2008-09, snapshot-2008-10, snapshot-2008-11, snapshot-2008-12, snapshot-2009-01, snapshot-2009-02, snapshot-2009-04, snapshot-2009-05, sse2-base, sse2-checkpoint-2008-10-01, sse2-merge-with-2008-10, sse2-merge-with-2008-11, sse2-packed-2008-11-12, sse2-packed-base, unicode-utf16-base
Branch point for: RELEASE-19F-BRANCH, sse2-branch, sse2-packed-branch, unicode-utf16-branch
Changes since 1.41: +14 -2 lines
Diff to previous 1.41
Try to derive the rank of the array even if the resulting array is not
simple.  Can't derive the actual dimensions because a subsequent
adjust-array could change the dimensions.

Revision 1.41 - (view) (annotate) - [select for diffs]
Fri Jun 30 18:41:23 2006 UTC (7 years, 9 months ago) by rtoy
Branch: MAIN
CVS Tags: pre-telent-clx, release-19d, release-19d-base, release-19d-pre1, release-19d-pre2, release-19e, release-19e-base, release-19e-pre1, release-19e-pre2, snapshot-2006-07, snapshot-2006-08, snapshot-2006-09, snapshot-2006-10, snapshot-2006-11, snapshot-2006-12, snapshot-2007-01, snapshot-2007-02, snapshot-2007-03, snapshot-2007-04, snapshot-2007-05, snapshot-2007-06, snapshot-2007-07, snapshot-2007-08, snapshot-2007-09, snapshot-2007-10, snapshot-2007-11, snapshot-2007-12, snapshot-2008-01, snapshot-2008-02, snapshot-2008-03
Branch point for: release-19d-branch, release-19e-branch
Changes since 1.40: +7 -1 lines
Diff to previous 1.40
This large checkin merges the double-double float support to HEAD.
The merge is from the tag "double-double-irrat-end".  The
double-double branch is now obsolete.

The code should build without double-double support (tested on sparc)
as well as build with double-double support (tested also on sparc).

Revision 1.40 - (view) (annotate) - [select for diffs]
Mon May 9 13:06:59 2005 UTC (8 years, 11 months ago) by rtoy
Branch: MAIN
CVS Tags: double-double-array-base, double-double-base, double-double-init-%make-sparc, double-double-init-checkpoint-1, double-double-init-ppc, double-double-init-sparc, double-double-init-sparc-2, double-double-init-x86, double-double-reader-base, double-double-reader-checkpoint-1, release-19b-base, release-19b-pre1, release-19b-pre2, release-19c, release-19c-base, release-19c-pre1, snapshot-2005-06, snapshot-2005-07, snapshot-2005-08, snapshot-2005-09, snapshot-2005-10, snapshot-2005-11, snapshot-2005-12, snapshot-2006-01, snapshot-2006-02, snapshot-2006-03, snapshot-2006-04, snapshot-2006-05, snapshot-2006-06
Branch point for: double-double-array-branch, double-double-branch, double-double-reader-branch, release-19b-branch, release-19c-branch
Changes since 1.39: +2 -2 lines
Diff to previous 1.39
Use array-dimension instead of length when creating the result array,
in case the source array has a fill pointer.

Revision 1.39 - (view) (annotate) - [select for diffs]
Mon May 2 13:55:50 2005 UTC (8 years, 11 months ago) by rtoy
Branch: MAIN
CVS Tags: snapshot-2005-05
Changes since 1.38: +2 -2 lines
Diff to previous 1.38
Fix typo. * should be :maybe since array-type-complexp slot can only
be T, NIL, or :MAYBE.

Revision 1.38 - (view) (annotate) - [select for diffs]
Fri Feb 25 17:14:38 2005 UTC (9 years, 1 month ago) by rtoy
Branch: MAIN
CVS Tags: snapshot-2005-03, snapshot-2005-04
Changes since 1.37: +15 -3 lines
Diff to previous 1.37
Workaround for bug reported by Lynn Quam, cmucl-imp, 2005-02-25.  The
derived type of %aset is the array element type if it's an array.
Otherwise, we return the type of the new value.

This is a hack and should be fixed in some other way.

Revision 1.37 - (view) (annotate) - [select for diffs]
Fri Jan 7 21:47:18 2005 UTC (9 years, 3 months ago) by rtoy
Branch: MAIN
CVS Tags: ppc_gencgc_snap_2005-05-14, snapshot-2005-02
Branch point for: ppc_gencgc_branch
Changes since 1.36: +19 -2 lines
Diff to previous 1.36
This function from the misc.492 test from ansi-tests:

(defun fn-492 (r p1)
  (declare (optimize speed (safety 1))
	   (type (simple-array (signed-byte 8) nil) r) (type (integer * 22050378) p1))
  (setf (aref r) (lognand (the (integer 19464371) p1) 2257))
  (values))

confuses the compiler and causes (values) to be deleted, and also
deletes the return from the function so we just run past the end into
junk.

I think it's caused by confusion in type derivation.  I changed the
defoptimizer for %aset so it returns the specialized element-type of
the array instead of the new-value.

This is a workaround, not a solution.

Revision 1.36 - (view) (annotate) - [select for diffs]
Wed May 5 16:37:22 2004 UTC (9 years, 11 months ago) by rtoy
Branch: MAIN
CVS Tags: amd64-merge-start, prm-before-macosx-merge-tag, snapshot-2004-06, snapshot-2004-07, snapshot-2004-08, snapshot-2004-09, snapshot-2004-10, snapshot-2004-11, snapshot-2004-12, snapshot-2005-01
Changes since 1.35: +3 -3 lines
Diff to previous 1.35
Fix typo.  0s0 is not a single-float. (Well, it is in CMUCL, but not
in general.)

Revision 1.35 - (view) (annotate) - [select for diffs]
Thu Apr 1 17:52:30 2004 UTC (10 years ago) by rtoy
Branch: MAIN
CVS Tags: mod-arith-base, release-19a, release-19a-base, release-19a-pre1, release-19a-pre2, release-19a-pre3, snapshot-2004-04, snapshot-2004-05
Branch point for: mod-arith-branch, release-19a-branch
Changes since 1.34: +15 -1 lines
Diff to previous 1.34
Lynn Quam on cmucl-imp on 2004-03-30 says

(defun foo (f d)
  (declare (type (simple-array single-float (*)) f)
           (type (simple-array double-float (*)) d))
  (setf (aref f 0) (aref d 0)))

doesn't produce any warnings and generates completely bogus code.

Don't know what the real answer solution is, but turning off the
assert-continuation-type for a single-use continuation fixes this,
which is what 18a used to do.  There are probably other bugs that this
hides.

Revision 1.34 - (view) (annotate) - [select for diffs]
Tue Jul 1 09:38:07 2003 UTC (10 years, 9 months ago) by gerd
Branch: MAIN
CVS Tags: dynamic-extent-base, lisp-executable-base, snapshot-2003-10, snapshot-2003-11, snapshot-2003-12, sparc_gencgc, sparc_gencgc_merge
Branch point for: dynamic-extent, lisp-executable, sparc_gencgc_branch
Changes since 1.33: +2 -2 lines
Diff to previous 1.33
	* src/compiler/array-tran.lisp (%check-bound): Fix an off-by-1
	error in bounds checking.  Observed by Christophe Rhodes on
	cmucl-imp.

Revision 1.33 - (view) (annotate) - [select for diffs]
Sun Apr 27 11:43:43 2003 UTC (10 years, 11 months ago) by gerd
Branch: MAIN
CVS Tags: remove_negative_zero_not_zero
Changes since 1.32: +15 -4 lines
Diff to previous 1.32
	* src/compiler/array-tran.lisp (svref, schar, char): Define
	source transforms so that they don't accept more than one
	index, for better error messages.

Revision 1.32 - (view) (annotate) - [select for diffs]
Sun Apr 13 11:57:17 2003 UTC (11 years ago) by gerd
Branch: MAIN
Changes since 1.31: +2 -2 lines
Diff to previous 1.31
  	The SEQUENCE-COUNT type was previously used in c:fndb, but since
	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.

Revision 1.31 - (view) (annotate) - [select for diffs]
Sat Feb 22 16:11:12 2003 UTC (11 years, 2 months ago) by gerd
Branch: MAIN
CVS Tags: cold-pcl-base, release-18e, release-18e-base, release-18e-pre1, release-18e-pre2
Branch point for: cold-pcl, release-18e-branch
Changes since 1.30: +2 -2 lines
Diff to previous 1.30
	* src/compiler/array-tran.lisp (make-string): Remove a
	spurious quote.

Revision 1.30 - (view) (annotate) - [select for diffs]
Sat Feb 22 13:34:02 2003 UTC (11 years, 2 months ago) by gerd
Branch: MAIN
Changes since 1.29: +6 -8 lines
Diff to previous 1.29
	* src/compiler/array-tran.lisp (make-string): Change the
	def-source-transform to a deftransform to ensure
	argument evaluation order.

Revision 1.29 - (view) (annotate) - [select for diffs]
Tue Oct 15 21:23:13 2002 UTC (11 years, 6 months ago) by toy
Branch: MAIN
Changes since 1.28: +3 -3 lines
Diff to previous 1.28
Port over SBCL's fix for the Entomotomy bug

array-element-type-treated-as-declaration

wherein the compiler believes type declarations on array elements
without checking them, e.g.

	(DECLAIM (OPTIMIZE (SAFETY 3) (SPEED 1) (SPACE 1)))
	(DEFSTRUCT FOO A B)
	(DEFUN BAR (X)
	  (DECLARE (TYPE (SIMPLE-ARRAY CONS 1) X))
	  (WHEN (CONSP (AREF X 0))
	    (PRINT (AREF X 0))))
	(BAR (VECTOR (MAKE-FOO :A 11 :B 12)))

prints a structure out.

This patch makes the compiler use the specialized (upgraded) element
type instead of the declared element type for aref.

Revision 1.28 - (view) (annotate) - [select for diffs]
Thu Jul 6 18:37:00 2000 UTC (13 years, 9 months ago) by dtc
Branch: MAIN
CVS Tags: LINKAGE_TABLE, PRE_LINKAGE_TABLE, UNICODE-BASE
Branch point for: UNICODE-BRANCH
Changes since 1.27: +4 -3 lines
Diff to previous 1.27
Reworking of the values-type system to overcome a number of inconsistencies
causing problems:

o Redefine coerce-to-values to convert a single value type into (values type),
  rather than the former definition (values type &rest t). A single value
  type such as fixnum is now equivalent to (values fixnum). Values-type-union
  and values-type-intersection will canonicalise values types with a
  single value such as (values fixnum) back to a single value type
  such as fixnum.

o Now when the compiler makes assertions for the first value of
  continuations that may be generating multiple values it asserts the
  type as (values type &rest t), or as (value &optional type &rest t) if
  it is not sure that the continuation does generate a value.

o Enhance the type check generation to better handle the now common
  values types with optional and rest arguments. Add the new function
  Values-types-asserted which converts asserted optional and rest
  arguments to required arguments that have been proven to be delivered,
  Thus an assertion such as (values &optional fixnum &rest t) will
  generate a fixnum type check if the proven type if (values t).

o The compiler is now far more likely to pickup attempts to use an
  assertion to select a subset of values. For example
  (the (values fixnum) (values x y)) will generated a compiler warning.

o Update single values type assertions where appropriate to clarify that
  the received values may be optional or that multiple values may be
  received. For example, a macro argument which had been asserted to be
  a list via (the list ,...) would now be asserted to be
  (the (values &optional list &rest t)) etc.

o Have the IR1 translator for THE convert single value types into
  (values &optional type &rest t) so that code such as
  (the fixnum (values x y)) will still work acceptably. This does not
  restrict the possible type assertions as the values types may be used
  and are not modified.

Revision 1.27 - (view) (annotate) - [select for diffs]
Fri Jul 24 17:22:26 1998 UTC (15 years, 9 months ago) by dtc
Branch: MAIN
Changes since 1.26: +10 -10 lines
Diff to previous 1.26
The complex-float and signed-array features are  now standard, so
remove unnecessary conditionals.

Revision 1.26 - (view) (annotate) - [select for diffs]
Sat Mar 21 08:08:31 1998 UTC (16 years, 1 month ago) by dtc
Branch: MAIN
Changes since 1.25: +6 -1 lines
Diff to previous 1.25
Long-float support.

Revision 1.25 - (view) (annotate) - [select for diffs]
Tue Feb 24 19:14:04 1998 UTC (16 years, 2 months ago) by dtc
Branch: MAIN
Changes since 1.24: +2 -2 lines
Diff to previous 1.24
Have the aref derive-type optimizer check for exactly one node
continuation use before asserting the type.

Revision 1.24 - (view) (annotate) - [select for diffs]
Fri Feb 13 16:09:48 1998 UTC (16 years, 2 months ago) by dtc
Branch: MAIN
Changes since 1.23: +4 -3 lines
Diff to previous 1.23
ANSI CL compat. changes:
o Add an optional environment argument to constantp; ignored by CMUCL.
o Add the :element-type keyword to make-string.

Revision 1.23 - (view) (annotate) - [select for diffs]
Sat Jan 10 05:02:26 1998 UTC (16 years, 3 months ago) by dtc
Branch: MAIN
Changes since 1.22: +22 -7 lines
Diff to previous 1.22
The aref derive type optimiser should have been returning the upgraded
element type rather than a possibly more specific declared element
type. When there is only a single use of the continuation the type is
also asserted to be the declared element type. This can pickup errors
such as reading an uninitialised element type is not of the declared
type.

Revision 1.22 - (view) (annotate) - [select for diffs]
Fri Jan 9 10:07:48 1998 UTC (16 years, 3 months ago) by dtc
Branch: MAIN
Changes since 1.21: +13 -8 lines
Diff to previous 1.21
Generate a compiler note if the default initial element for make-array
is not a subtype of the element-type. According to ANSI CL the result
of accessing uninitialised elements is undefined, and currently in
CMUCL it can cause problems not detect in safe code when the default
element not a subtype of the element-type - at least a compiler note
is generated now.

Revision 1.21 - (view) (annotate) - [select for diffs]
Sat Nov 1 22:58:26 1997 UTC (16 years, 5 months ago) by dtc
Branch: MAIN
Changes since 1.20: +5 -1 lines
Diff to previous 1.20
Improved support for (complex single-float) and (complex double-float)
types. Adds storage classes to the backend for these so they can be
stored in registers or on the stack without consing; new primitive
types etc. Also adds (simple-array (complex {single,double}-float))
array types to avoid consing and speed vectors operations.  All
these changes are conditional on the :complex-float feature. More work
is needed to exploit these changes: improving the type dispatch in the
various function; maybe compiler transforms or more VOPs to handle
common functions inline.

Revision 1.20 - (view) (annotate) - [select for diffs]
Sun Aug 24 03:46:45 1997 UTC (16 years, 8 months ago) by dtc
Branch: MAIN
Changes since 1.19: +21 -1 lines
Diff to previous 1.19
Add a source transform for array-header-p to handle some cases in
which the result can be determined from the argument type. This stops
compiler warning messages produced by the with-array-data macro when
the array is known not to be a subtype of (simple-array * (*)).

Revision 1.19 - (view) (annotate) - [select for diffs]
Tue Apr 1 19:23:56 1997 UTC (17 years ago) by dtc
Branch: MAIN
Branch point for: RELENG_18
Changes since 1.18: +5 -1 lines
Diff to previous 1.18
Support for some specialised signed array types: (signed-byte 8),
(signed-byte 16), (signed-byte 30), (signed-byte 32).  These patches
include the general support and the x86 backend support; more to
follow. The important changes are conditional on the :signed-array
feature so shouldn't affect the source without this feature. This work
has been driven by Raymond Toy.

Revision 1.18 - (view) (annotate) - [select for diffs]
Mon Oct 31 04:27:28 1994 UTC (19 years, 5 months ago) by ram
Branch: MAIN
Changes since 1.17: +1 -3 lines
Diff to previous 1.17
Fix headed boilerplate.

Revision 1.17 - (view) (annotate) - [select for diffs]
Wed Aug 25 00:14:32 1993 UTC (20 years, 8 months ago) by ram
Branch: MAIN
Changes since 1.16: +2 -2 lines
Diff to previous 1.16
Fix compiler warnings.

Revision 1.16 - (view) (annotate) - [select for diffs]
Wed May 12 11:10:18 1993 UTC (20 years, 11 months ago) by ram
Branch: MAIN
Changes since 1.15: +5 -5 lines
Diff to previous 1.15
Changed *byte-compiling* to (byte-compiling), since during IR1 conversion we're
not sure yet.

Revision 1.15 - (view) (annotate) - [select for diffs]
Tue May 11 13:49:57 1993 UTC (20 years, 11 months ago) by ram
Branch: MAIN
Changes since 1.14: +25 -16 lines
Diff to previous 1.14
Update transforms to inhibit ones which pessimize byte code.

Revision 1.14 - (view) (annotate) - [select for diffs]
Tue Nov 12 14:14:14 1991 UTC (22 years, 5 months ago) by ram
Branch: MAIN
Changes since 1.13: +3 -5 lines
Diff to previous 1.13
Quoted arg/result types in :EVAL-NAME DEFTRANSFORMs.

Revision 1.13 - (view) (annotate) - [select for diffs]
Sat Nov 9 18:57:19 1991 UTC (22 years, 5 months ago) by wlott
Branch: MAIN
Changes since 1.12: +3 -3 lines
Diff to previous 1.12
When converting MAKE-STRING into a MAKE-ARRAY, wrap the length with (the
index ...) so that MAKE-ARRAY can tell that it's a vector.

Revision 1.12 - (view) (annotate) - [select for diffs]
Sat Nov 9 02:42:34 1991 UTC (22 years, 5 months ago) by wlott
Branch: MAIN
Changes since 1.11: +4 -4 lines
Diff to previous 1.11
Changed BASE-CHARACTER to BASE-CHAR

Revision 1.11 - (view) (annotate) - [select for diffs]
Wed Jun 5 10:58:50 1991 UTC (22 years, 10 months ago) by wlott
Branch: MAIN
Branch point for: patch_15
Changes since 1.10: +22 -21 lines
Diff to previous 1.10
Fixed the make-array derive type optimizer to only spec the dimensions
if the created array is known to be simple.  Otherwise, someone might
adjust it, which would cause the type to be wrong.

Revision 1.10 - (view) (annotate) - [select for diffs]
Wed Apr 24 23:51:00 1991 UTC (23 years ago) by ram
Branch: MAIN
Changes since 1.9: +17 -2 lines
Diff to previous 1.9
Added derive-type method for %WITH-ARRAY-DATA

Revision 1.9 - (view) (annotate) - [select for diffs]
Wed Feb 20 14:56:29 1991 UTC (23 years, 2 months ago) by ram
Branch: MAIN
Changes since 1.8: +9 -5 lines
Diff to previous 1.8
New file header with RCS stuff.

Revision 1.8 - (view) (annotate) - [select for diffs]
Mon Jan 14 10:52:45 1991 UTC (23 years, 3 months ago) by ram
Branch: MAIN
Changes since 1.7: +2 -2 lines
Diff to previous 1.7
Fixed bit-array canonicalizing for the T case to have the right type.

Revision 1.7 - (view) (annotate) - [select for diffs]
Sun Jan 13 23:08:25 1991 UTC (23 years, 3 months ago) by ram
Branch: MAIN
Changes since 1.6: +49 -1 lines
Diff to previous 1.6
Added transforms to canonicalize the result arg to bit-vector ops.
Added transform for VECTOR-LENGTH that returns the constant result
when the type has specified dimensions.

Revision 1.6 - (view) (annotate) - [select for diffs]
Fri Nov 23 16:21:05 1990 UTC (23 years, 5 months ago) by wlott
Branch: MAIN
Changes since 1.5: +14 -14 lines
Diff to previous 1.5
Changed the make-array transform to simplify the nwords computation as
much as possible instead of relying on (nonexistent) optimizers to simpilfy
it later down the line.  Also fixed a spelling error.

Revision 1.5 - (view) (annotate) - [select for diffs]
Fri Nov 16 06:01:07 1990 UTC (23 years, 5 months ago) by wlott
Branch: MAIN
Changes since 1.4: +2 -2 lines
Diff to previous 1.4
The make-string source transform was quoting the initial element, even if
it wasn't a constant.  Ooops.

Revision 1.4 - (view) (annotate) - [select for diffs]
Tue Nov 13 06:16:57 1990 UTC (23 years, 5 months ago) by wlott
Branch: MAIN
Changes since 1.3: +2 -2 lines
Diff to previous 1.3
Forgot to call length on the indices &rest arg in the aref derive-type
optimizer.

Revision 1.3 - (view) (annotate) - [select for diffs]
Sat Nov 10 19:39:06 1990 UTC (23 years, 5 months ago) by wlott
Branch: MAIN
Changes since 1.2: +4 -4 lines
Diff to previous 1.2
Ack, more typos.

Revision 1.2 - (view) (annotate) - [select for diffs]
Sat Nov 10 19:20:54 1990 UTC (23 years, 5 months ago) by wlott
Branch: MAIN
Changes since 1.1: +8 -8 lines
Diff to previous 1.1
typo.

Revision 1.1 - (view) (annotate) - [select for diffs]
Sat Nov 10 18:39:33 1990 UTC (23 years, 5 months ago) by wlott
Branch: MAIN
Initial revision

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.

  Diffs between and
  Type of Diff should be a

Sort log by:

  ViewVC Help
Powered by ViewVC 1.1.5