Skip to content

Commit 044becf

Browse files
committed
name:: final
1 parent 381f3d3 commit 044becf

6 files changed

Lines changed: 128 additions & 41 deletions

File tree

jsrc/j.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1606,7 +1606,7 @@ if(likely(z<3)){_zzt+=z; z=(I)&oneone; _zzt=_i&3?_zzt:(I*)z; z=_i&2?(I)_zzt:z; z
16061606
#endif
16071607
#define REPSGN(x) ((x)>>(BW-1)) // replicate sign bit of x to entire word (assuming x is signed type - if unsigned, just move sign to bit 0)
16081608
#define SGNTO0(x) ((UI)(x)>>(BW-1)) // move sign bit to bit 0, clear other bits
1609-
#define SGNTO0I4(x) ((UI4)(x)>>(32-1)) // move sign bit to bit 0, clear other bits
1609+
#define SGNTO0US(x) ((US)(x)>>(16-1)) // move sign bit to bit 0, clear other bits
16101610
// In the original JE many verbs returned a clone of the input, i. e. R ca(w). We have changed these to avoid the clone, but we preserve the memory in case we need to go back
16111611
#define RCA(w) R w
16121612
#define RE(exp) {if(unlikely(((exp),jt->jerr!=0)))R 0;}

jsrc/ja.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,7 @@
769769
#define ovs0(x0,x1,x2,x3) jtovs0(jt,(x0),(x1),(x2),(x3))
770770
#define pad(x,y,z) jtpad(jt,(x),(y),(z))
771771
#define parse(x) jtparse(jt,(x))
772+
#define parseforexec(x) jtparse((J)((I)jt|JTFROMEXEC),(x))
772773
#define parsea(x,y) jtparsea(jt,(x),(y))
773774
#define parsex(x0,x1,x2,x3) jtparsex(jt,(x0),(x1),(x2),(x3))
774775
#define partfscan(x0,x1,x2,x3,x4,x5) jtpartfscan(jt,(x0),(x1),(x2),(x3),(x4),(x5))

jsrc/jtype.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ typedef AD *A;
7676
#define JTINPLACEW (((I)1)<<JTINPLACEWX)
7777
#define JTINPLACEAX 1 // turn this on in jt to indicate that a can be inplaced. Must be 1+JTINPLACEWX
7878
#define JTINPLACEA (((I)1)<<JTINPLACEAX)
79+
// following bit used as arg to parse
80+
#define JTFROMEXECX 0 // parser call from ". - makes some features unavailable
81+
#define JTFROMEXEC (((I)1)<<JTFROMEXECX)
7982
// following bit used as arg to jtfolk
8083
#define JTFOLKNOHFNX 2 // set to get the generic fork that does not expect the hfn in localuse
8184
#define JTFOLKNOHFN (((I)1)<<JTFOLKNOHFNX)
@@ -1044,12 +1047,13 @@ typedef struct {DX re;DX im;} ZX;
10441047
/* im - imaginary part */
10451048

10461049

1047-
// parser stack - this MUST have size equal a power of 2!!
1050+
// parser stack - should be a qword for fast copying
10481051
typedef struct {
10491052
// Because the parse decode looks mostly at pt, make that the first thing so that it is always aligned to the beginning
10501053
// of whatever block is usd to copy one stack element to another.
10511054
UI4 pt; // parser type: code for one of the 9 variants recognized.
1052-
UI4 t; // token number for this block
1055+
S filler;
1056+
US t; // token number for this block - 16 bits of token. After assignment, set to -1 if final assignment
10531057
A a; // pointer to block
10541058
} PSTK;
10551059

0 commit comments

Comments
 (0)