[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

record, datatype



New RECORD, DATATYPE and RECORD.COM on <NEWLISP>. Changes:

(a) I fixed a bug in the path-finding code which happened when
the desired field was in a separate declaration and there
was a field with the same name in an embedded declaration.

(b) I re-wrote almost all of the DATATYPE code: the format of
a "field descriptor" is no longer a list (BITS n1 n2 ..) or
(POINTER ...) etc but rather is a large number. Expressions
involving datatype expressions should compile as before.
Interpreted code using datatypes should be much faster.
The format of a field descriptor is as follows (for the record):

the field-descriptor resembles a byte pointer

bits 0-5 (from the left) contains the number of bits to the right
	of the given field
bits 6-11 contains the number of bits in the field
bits 13-14 contain the "field type":
	0 is a pointer field
	1 is a number field
	2 is a floating-point field
	3 is a "flag" field
Bits 15-19 are currently unused
Bits 21-26 contain the datatype number (or 0 if fetch/replace should not
	check)
Bits 27-36 contain the word offset of this field

bit 20 is set if the field is either floating or flag; it
signifies that this field-descriptor is not implemented in microcode
on Maxc.

Larry
-------