1. If you are claiming bit 9, please put a note in jtype.h indicating your plans. Bits of the type field are an incredibly precious resource and liable to be fought over.

I have added types to distinguish local/global assignment, and fixed/variable assignment, but I did it by using the ASGN bit along with a higher bit, so as not to reserve another bit.

2. Type promotion is not by taking the max of the type, but by a calculation. The bits are not quite in priority order.

3. Changing existing types is out of the question as user code depends on them.

4. Combining some of the types that have not been documented is a fine idea. VERB/ADV/CONJ/MARK/SYMB/CONW/NAME/LPAR/RPAR could be squeezed into 4 or so bits, saving 5 precious flag bits.

Henry


On 8/2/2016 7:14 PM, bill lam wrote:
I think nouns type should not be touched at all but other types such as
verb adverb can be grouped as a miscellaneous type with a new subtype since
it is quite rare that those types will be used in user codes.

type promotion is another issue since current J implementation assumes max
type.

On Jul 30, 2016 3:06 AM, "Henry Rich" <henryhr...@gmail.com> wrote:

It wouldn't be necessary to change VRESX to 29; we would put in bit-by-bit
tests as needed.  I wanted to eliminate as much bit-testing as possible for
the usual cases.

I don't think reordering the type bits is possible, since user code
depends on the assignment.

Henry Rich

On 7/29/2016 3:00 PM, Thomas Costigliola wrote:

Are the changes to the bit patterns at the top of va.h supposed to
eliminate an extra lookup later?

#define VBB             B01         /* convert arguments to B
   */
#define VII             INT         /* convert arguments to I
   */
#define VDD             FL          /* convert arguments to D
   */
#define VZZ             CMPX        /* convert arguments to Z
   */
#define Vxx             XNUM        /* convert arguments to XNUM
  */
#define VQQ             RAT         /* convert arguments to RAT
   */
#define VARGMSK         (VBB|VII|VDD|VZZ|Vxx|VQQ)  // mask for argument
requested type
#define VRESX           8           // bit position for result flags

But what happens if the extended floating point type (XD) gets
implemented? That would push VRESX to 29 and leave no room for VXCVTTYPEX
on 32 bit machines. I do have custom types beyond bit 29 and I would like
to conform to the official source, what is the recommendation? Reorder the
type bit patterns?

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to