invalid_syntax ("#&...", 5);
}
if (c == '[')
- /* `function vector' objects, including byte-compiled functions. */
- return read_vector (readcharfun, 1);
+ {
+ /* Accept compiled functions at read-time so that we don't have to
+ build them using function calls. */
+ Lisp_Object tmp;
+ tmp = read_vector (readcharfun, 1);
+ return Fmake_byte_code (XVECTOR (tmp)->size,
+ XVECTOR (tmp)->contents);
+ }
if (c == '(')
{
Lisp_Object tmp;
\f
static Lisp_Object
-read_vector (Lisp_Object readcharfun, int read_funvec)
+read_vector (Lisp_Object readcharfun, int bytecodeflag)
{
register int i;
register int size;
register Lisp_Object tem, item, vector;
register struct Lisp_Cons *otem;
Lisp_Object len;
- /* If we're reading a funvec object we start out assuming it's also a
- byte-code object (a subset of funvecs), so we can do any special
- processing needed. If it's just an ordinary funvec object, we'll
- realize that as soon as we've read the first element. */
- int read_bytecode = read_funvec;
tem = read_list (1, readcharfun);
len = Flength (tem);
{
item = Fcar (tem);
- /* If READ_BYTECODE is set, check whether this is really a byte-code
- object, or just an ordinary `funvec' object -- non-byte-code
- funvec objects use the same reader syntax. We can tell from the
- first element which one it is. */
- if (read_bytecode && i == 0 && ! FUNVEC_COMPILED_TAG_P (item))
- read_bytecode = 0; /* Nope. */
-
/* If `load-force-doc-strings' is t when reading a lazily-loaded
bytecode object, the docstring containing the bytecode and
constants values must be treated as unibyte and passed to
Fread, to get the actual bytecode string and constants vector. */
- if (read_bytecode && load_force_doc_strings)
+ if (bytecodeflag && load_force_doc_strings)
{
if (i == COMPILED_BYTECODE)
{
free_cons (otem);
}
- if (read_bytecode && size >= 4)
- /* Convert this vector to a bytecode object. */
- vector = Fmake_byte_code (size, XVECTOR (vector)->contents);
- else if (read_funvec && size >= 1)
- /* Convert this vector to an ordinary funvec object. */
- XSETFUNVEC (vector, XVECTOR (vector));
-
return vector;
}