source: trunk/source/level-0/l0-error.lisp @ 15093

Last change on this file since 15093 was 15093, checked in by gb, 8 years ago

New Linux ARM binaries.

The image and FASL versions changed on the ARM, but (if I did it right)
not on other platforms.

(The image and FASL versions are now architecture-specific. This may
make it somewhat easier and less disruptive to change them, since the
motivation for such a change is often also architecture-specific.)
The FASL and current image version are defined (in the "TARGET" package)
in the architecture-specific *-arch.lisp files; the min, max, and current
image versions are defined in the *constants*.h file for the architecture.

Most of the changes are ARM-specific.

Each TCR now contains a 256-word table at byte offset 256. (We've
been using about 168 bytes in the TCR, so there are still 88 bytes/22
words left for expansion.) The table is initialized at TCR-creation
time to contain the absolute addresses of the subprims (there are
currently around 130 defined); we try otherwise not to reference
subprims by absolute address. Jumping to a subprim is:

(ldr pc (:@ rcontext (:$ offset-of-subprim-in-tcr-table)))

and calling one involves loading its address from that table into a
register and doing (blx reg). We canonically use LR as the register,
since it's going to be clobbered by the blx anyway and there doesn't
seem to be a performance hazard there. The old scheme (which involved
using BA and BLA pseudoinstructions to jump to/call a hidden jump table
at the end of the function) is no longer supported.

ARM Subprims no longer need to be aligned (on anything more than an
instruction boundary.) Some remnants of the consequences of an old
scheme (where subprims had to "fit" in small regions and sometimes
had to jump out of line if they would overflow that region's bounds)
still remain, but we can repair that (and it'll be a bit more straightforward
to add new ARM subprims.) We no longer care (much) about where subprims
are mapped in memory, and don't have to bias suprimitive addresses by
a platform-specific constant (and have to figure out whether or not we've
already done so) on (e.g.) Android.

Rather than setting the first element (fn.entrypoint) of a
newly-created function to the (absolute) address of a subprim that updates
that entrypoint on the first call, we use a little LAP function to correct
the address before the function can be called.

Non-function objects that can be stored in symbols' function cells
(the UNDEFINED-FUNCTION object, the things that encapsulate
special-operator names and global macro-functions) need to be
structured like FUNCTIONS: the need to have a word-aligned entrypoint
in element 0 that tracks the CODE-VECTOR object in element 1. We
don't want these things to be of type FUNCTION, but do want the GC to
adjust the entrypoint if the codevector moves. We've been essentially
out of GVECTOR subtags on 32-bit platforms, largely because of the
constraints that vector/array subtags must be greater than other
subtags and numeric types be less. The first constraint is probably
reasonable, but the second isn't: other typecodes (tag-list, etc) may
be less than the maximum numeric typecode, so tests like NUMBERP can't
reliably involve a simple comparison. (As long as a mask of all
numeric typecodes will fit in a machine word/FIXNUM, a simple LOGBITP
test can be used instead.) Removed all portable and ARM-specific code
that made assumptions about numeric typecode ordering, made a few more
gvector typecodes available, and used one of them to define a new
"pseudofunction" type. Made the GC update the entrypoints of
pseudofunctions and used them for the undefined-function object and
for the function cells of macros/special-operators.

Since we don't need the subprim jump table at the end of each function
anymore, we can more easily revive the idea of embedded pc-relative
constant data ("constant pools") and initialize FPRs from constant
data, avoiding most remaining traffic between FPRs and GPRs.

I've had a fairly-reproducible cache-coherency problem: on the first
GC in the cold load, the thread misbehaves mysteriously when it
resumes. The GC tries to synchronize the I and D caches on the entire
range of addresses that may contain newly-moved code-vectors. I'm not
at all sure why, but walking that range and flushing the cache for
each code-vector individually seems to avoid the problem (and may actually
be faster.)

Fix ticket:894

Fixed a few typos in error messages/comments/etc.

I -think- that the non-ARM-specific changes (how FASL/image versions are
defined) should bootstrap cleanly, but won't know for sure until this is
committed. (I imagine that the buildbot will complain if not.)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.7 KB
Line 
1;;;
2;;;   Copyright (C) 2009 Clozure Associates
3;;;   Copyright (C) 1994-2001 Digitool, Inc
4;;;   This file is part of Clozure CL. 
5;;;
6;;;   Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
7;;;   License , known as the LLGPL and distributed with Clozure CL as the
8;;;   file "LICENSE".  The LLGPL consists of a preamble and the LGPL,
9;;;   which is distributed with Clozure CL as the file "LGPL".  Where these
10;;;   conflict, the preamble takes precedence. 
11;;;
12;;;   Clozure CL is referenced in the preamble as the "LIBRARY."
13;;;
14;;;   The LLGPL is also available online at
15;;;   http://opensource.franz.com/preamble.html
16
17(in-package "CCL")
18
19(defparameter *error-format-strings* 
20  '((1 . "Unbound variable: ~S .")
21    (2 . "Invalid reference to ~s at index ~s.")
22    (3 . "Too many arguments.")
23    (4 . "Too few arguments.")
24    (5 . "Argument ~S is not of the required type.")
25    (6 . "Undefined function: ~S .")
26    (7 . "Invalid assignment of ~s at index ~s, to ~s.")
27    (8 . "Can't coerce ~S to ~S")
28    (9 . "Funcallable instance ~S was called with args ~s, but has no FUNCALLABLE-INSTANCE-FUNCTION")
29    (10 . "Out of memory.")
30    (11 . "Default image file not found.")
31    (12 . "No translation for ~S")
32    (13 . "~S can't be FUNCALLed or APPLYed.")
33    (14 . "~S is not a symbol or lambda expression")
34    (15 . "Declaration ~S in unexpected position")
35    (16 . "Can't setq constant ~S")
36    (17 . "Odd number of forms to setq in ~S")
37    (18 . "Illegal arg to setq ~S")
38    (19 . "~S is not a symbol.")
39    (20 . "~S is a constant.")
40    (21 . "Bad initialization form: ~S")
41    (22 . "Symbol macro ~S is declared or proclaimed special")
42    (23 . "Too many arguments in ~S")
43    (24 . "Local macro cannot reference lexically defined variable ~S")
44    (25 . "Local macro cannot reference lexically defined function ~S")
45    (26 . "Local macro cannot reference lexically defined tag ~S")
46    (27 . "Local macro cannot reference lexically defined block ~S")
47    (28 . "Can't find tag ~S")
48    (29 . "Duplicate tag ~S")
49    (30 . "Can't find block ~S")
50    (31 . "Bad lambda list  ~S.")
51    (32 . "~S is not a valid lambda expression.")
52    (33 . "Can't throw to tag ~S .")
53    (34 . "Object ~S is not of type ~S.")
54    (35 . "FUNCTION can't reference lexically defined macro ~S")
55    (36 . "Unimplemented FPU instruction ~^~S.")
56    (41 . "Unmatched ')'.")
57    (42 . "~S and ~S must be on the same volume.")
58    (43 . "Filename ~S contains illegal character ~S")
59    (44 . "Illegal use of wildcarded filename ~S")
60    (45 . "~S is not a FASL or TEXT file.")
61    (46 . "Cannot rename directory to file ~S")
62    (47 . "Found a directory instead of a file or vice versa ~S")
63    (48 . "Cannot copy directories: ~S")
64    (49 . "String too long for pascal record")
65    (50 . "Cannot create ~S")
66    (64 . "Floating point overflow")
67    (66 . "Can't divide by zero.")
68    (75 . "Stack overflow. Bytes requested: ~d")
69    (76 . "Memory allocation request failed.")
70    (77 . "~S exceeds array size limit of ~S bytes.")
71    (94. "Printer error.")
72    (95. "Can't load printer.")
73    (96. "Can't get printer parameters.")
74    (97. "Can't start up printer job.")
75    (98. "Floating point exception.")
76    (111 . "Unexpected end of file encountered.")
77    (112 . "Array index ~S out of bounds for ~S .")
78    (113 . "Reader error: ~S encountered.")
79    (114 . "Reader error: Unknown reader macro character ~S .")
80    (115 . "Can't redefine constant ~S .")
81    (116 . "Reader error: Illegal character ~S .")
82    (117 . "Reader error: Illegal symbol syntax.")
83    (118 . "Reader error: Dot context error.")
84    (119 . "Reader error: Bad value ~S for *READ-BASE*.")
85    (120 . "Can't construct argument list from ~S.")
86    (121 . "Wrong FASL version.")
87    (122 . "Not a FASL file.")
88    (123 . "Undefined function ~s called with arguments ~s.")
89    (124 . "Image file incompatible with current version of Lisp.")
90    (127 .   "Using ~S in ~S ~%would cause name conflicts with symbols inherited by that package: ~%~:{~S  ~S~%~}")
91    (128 .   "Importing ~S to ~S would conflict with inherited symbol ~S ." )
92    (129 .   "Reader error: Malformed number in a #b/#o/#x/#r macro." )
93    (130 .   "There is no package named ~S ." )
94    (131 .   "Reader error: No external symbol named ~S in package ~S ." )
95    (132 .   "Bad FASL file: internal inconsistency detected." )
96    (133 .   "Importing ~S to ~S would conflict with symbol ~S ." )
97    (134 .   "Uninterning ~S from ~S would cause conflicts among ~S ." )
98    (135 .   "~S is not accessible in ~S ." )
99    (136 .   "Exporting ~S in ~S would cause a name conflict with ~S in ~S ." )
100    (137 .   "Using ~S in ~S ~%would cause name conflicts with symbols already present in that package: ~%~:{~S  ~S~%~}")
101    (139 .   "Reader macro function ~S called outside of reader." )
102    (140 .   "Reader error: undefined character ~S in a ~S dispatch macro." )
103    (141 .   "Reader dispatch macro character ~S doesn't take an argument." )
104    (142 .   "Reader dispatch macro character ~S requires an argument." )
105    (143 .   "Reader error: Bad radix in #R macro." )
106    (144 .   "Reader error: Duplicate #~S= label." )
107    (145 .   "Reader error: Missing #~S# label." )
108    (146 .   "Reader error: Illegal font number in #\\ macro." )
109    (147 .   "Unknown character name ~S in #\\ macro." )
110    (148 .   "~S cannot be accessed with ~S subscripts." )
111    (149 .   "Requested size is too large to displace to ~S ." )
112    (150 .   "Too many elements in argument list ~S ." )
113    (151 .    "Arrays are not of the same size" )
114    (152 . "Conflicting keyword arguments : ~S ~S, ~S ~S .")
115    (153 . "Incorrect keyword arguments in ~S .")
116    (154 . "Two few arguments in form ~S .")
117    (155 . "Too many arguments in form ~S .")
118    (157 . "value ~S is not of the expected type ~S.")
119    (158 . "~S is not a structure.")
120    (159 . "Access to slot ~S of structure ~S is out of bounds.")
121    (160 . "Form ~S does not match lambda list ~A .")
122    (161 . "Temporary number space exhausted.")
123    (163 . "Illegal #+/- expression ~S.")
124    (164 . "File ~S does not exist.")
125    (165 . "~S argument ~S is not of the required type.")
126    (166 . "~S argument ~S is not of type ~S.")
127    (167 . "Too many arguments in ~S.")
128    (168 . "Too few arguments in ~S.")
129    (169 . "Arguments don't match lambda list in ~S.")
130    (170 . "~S is not a proper list.")
131    (171 . "~S is not an array with a fill pointer.")
132    (172 . "~S is not an adjustable array.")
133    (173 . "Can't access component ~D of ~S.")
134    (174 . "~S doesn't match array element type of ~S.")
135    (175 . "Stack group ~S is exhausted.")
136    (176 . "Stack group ~S called with arguments ~:S; exactly 1 argument accepted.")
137    (177 . "Attempt to return too many values.")
138    (178 . "Can't dynamically bind ~S. ")
139    (200 . "Foreign exception: ~S. ")))
140 
141
Note: See TracBrowser for help on using the repository browser.