Skip to content

Commit 6c1c8ed

Browse files
committed
Merge branch 'master' of jsoftware.com:jsource
Allow empty {{)? }}
2 parents 83ab771 + ce73fdf commit 6c1c8ed

7 files changed

Lines changed: 157 additions & 26 deletions

File tree

.github/workflows/emuavx.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
# linux no pyxes -------------------------------------------------------
1818
jelinuxpyx0:
1919
name: JE (Linux no pyxes)
20-
if: ${{ false }}
20+
if: ${{ true }}
2121
runs-on: ubuntu-22.04
2222
steps:
2323
- name: Checkout Git repository
@@ -56,7 +56,7 @@ jobs:
5656
# linux no emu ---------------------------------------------------------
5757
jelinuxemu0:
5858
name: JE (Linux no emu)
59-
if: ${{ false }}
59+
if: ${{ true }}
6060
runs-on: ubuntu-22.04
6161
steps:
6262
- name: Checkout Git repository
@@ -95,7 +95,7 @@ jobs:
9595
# linux no pyxes/emu ---------------------------------------------------
9696
jelinuxpyxemu0:
9797
name: JE (Linux no pyxes/emu)
98-
if: ${{ false }}
98+
if: ${{ true }}
9999
runs-on: ubuntu-22.04
100100
steps:
101101
- name: Checkout Git repository
@@ -134,7 +134,7 @@ jobs:
134134
# macOS arm64 no pyxes -------------------------------------------------
135135
jemacosarmpyx0:
136136
name: JE (macOS arm64 no pyxes)
137-
if: ${{ false }}
137+
if: ${{ true }}
138138
runs-on: macos-15
139139
steps:
140140
- name: Checkout Git repository
@@ -164,7 +164,7 @@ jobs:
164164
# macOS arm64 no emu ---------------------------------------------------
165165
jemacosarmemu0:
166166
name: JE (macOS arm64 no emu)
167-
if: ${{ false }}
167+
if: ${{ true }}
168168
runs-on: macos-15
169169
steps:
170170
- name: Checkout Git repository
@@ -194,7 +194,7 @@ jobs:
194194
# macOS arm64 no pyxes/emu ---------------------------------------------
195195
jemacosarmpyxemu0:
196196
name: JE (macOS arm64 no pyxes/emu)
197-
if: ${{ false }}
197+
if: ${{ true }}
198198
runs-on: macos-15
199199
steps:
200200
- name: Checkout Git repository
@@ -224,7 +224,7 @@ jobs:
224224
# rpi64arm no pyxes ----------------------------------------------------
225225
jerpi64armpyx0:
226226
name: JE (Linux arm64 no pyxes)
227-
if: ${{ false }}
227+
if: ${{ true }}
228228
runs-on: ubuntu-24.04-arm
229229
steps:
230230
- name: Checkout Git repository
@@ -256,7 +256,7 @@ jobs:
256256
# rpi64arm no emu ------------------------------------------------------
257257
jerpi64armemu0:
258258
name: JE (Linux arm64 no emu)
259-
if: ${{ false }}
259+
if: ${{ true }}
260260
runs-on: ubuntu-24.04-arm
261261
steps:
262262
- name: Checkout Git repository
@@ -288,7 +288,7 @@ jobs:
288288
# rpi64arm no pyxes/emu ------------------------------------------------
289289
jerpi64armpyxemu0:
290290
name: JE (Linux arm64 no pyxes/emu)
291-
if: ${{ false }}
291+
if: ${{ true }}
292292
runs-on: ubuntu-24.04-arm
293293
steps:
294294
- name: Checkout Git repository
@@ -336,7 +336,7 @@ jobs:
336336
env:
337337
USE_PYXES: 0
338338
USE_EMU_AVX: 1
339-
_DEBUG: 3
339+
_DEBUG: 0
340340
run: |
341341
script\buildga.cmd x64
342342
@@ -345,7 +345,7 @@ jobs:
345345
env:
346346
USE_PYXES: 0
347347
USE_EMU_AVX: 1
348-
_DEBUG: 3
348+
_DEBUG: 0
349349
run: |
350350
script\testga.cmd x64
351351
@@ -368,7 +368,7 @@ jobs:
368368
env:
369369
USE_PYXES: 1
370370
USE_EMU_AVX: 0
371-
_DEBUG: 3
371+
_DEBUG: 0
372372
run: |
373373
script\buildga.cmd x64
374374
@@ -377,7 +377,7 @@ jobs:
377377
env:
378378
USE_PYXES: 1
379379
USE_EMU_AVX: 0
380-
_DEBUG: 3
380+
_DEBUG: 0
381381
run: |
382382
script\testga.cmd x64
383383
@@ -400,7 +400,7 @@ jobs:
400400
env:
401401
USE_PYXES: 0
402402
USE_EMU_AVX: 0
403-
_DEBUG: 3
403+
_DEBUG: 0
404404
run: |
405405
script\buildga.cmd x64
406406
@@ -409,7 +409,7 @@ jobs:
409409
env:
410410
USE_PYXES: 0
411411
USE_EMU_AVX: 0
412-
_DEBUG: 3
412+
_DEBUG: 0
413413
run: |
414414
script\testga.cmd x64
415415
@@ -432,7 +432,7 @@ jobs:
432432
env:
433433
USE_PYXES: 0
434434
USE_EMU_AVX: 1
435-
_DEBUG: 3
435+
_DEBUG: 0
436436
run: |
437437
script\buildga.cmd arm64
438438
@@ -441,7 +441,7 @@ jobs:
441441
env:
442442
USE_PYXES: 0
443443
USE_EMU_AVX: 1
444-
_DEBUG: 3
444+
_DEBUG: 0
445445
run: |
446446
script\testga.cmd arm64
447447
@@ -464,7 +464,7 @@ jobs:
464464
env:
465465
USE_PYXES: 1
466466
USE_EMU_AVX: 0
467-
_DEBUG: 3
467+
_DEBUG: 0
468468
run: |
469469
script\buildga.cmd arm64
470470
@@ -473,7 +473,7 @@ jobs:
473473
env:
474474
USE_PYXES: 1
475475
USE_EMU_AVX: 0
476-
_DEBUG: 3
476+
_DEBUG: 0
477477
run: |
478478
script\testga.cmd arm64
479479
@@ -496,7 +496,7 @@ jobs:
496496
env:
497497
USE_PYXES: 0
498498
USE_EMU_AVX: 0
499-
_DEBUG: 3
499+
_DEBUG: 0
500500
run: |
501501
script\buildga.cmd arm64
502502
@@ -505,7 +505,7 @@ jobs:
505505
env:
506506
USE_PYXES: 0
507507
USE_EMU_AVX: 0
508-
_DEBUG: 3
508+
_DEBUG: 0
509509
run: |
510510
script\testga.cmd arm64
511511

script/testga.cmd

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,17 @@ IF "%~1"=="arm64" GOTO L0
1111
IF "%~1" NEQ "x64" EXIT /b 1
1212
:L0
1313

14-
copy "C:\Program Files\LLVM\bin\liblldb.dll" "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\Llvm\x64\bin\"
1514
systeminfo
16-
lldb --version
1715

1816
IF "%~1"=="x86" GOTO L01A
1917
IF "%~1"=="arm64" GOTO L01B
2018
IF "%~1" NEQ "x64" EXIT /b 1
19+
@rem copy "C:\Program Files\LLVM\bin\liblldb.dll" "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\Llvm\x64\bin\"
20+
@rem curl --output-dir "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/Llvm/x64/bin/" -o "liblldb.dll" "https://www.jsoftware.com/download/winlib/x64/liblldb.dll"
21+
@rem curl --output-dir "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/Llvm/x64/bin/" -o "lldb.exe" "https://www.jsoftware.com/download/winlib/x64/lldb.exe"
22+
@rem "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\Llvm\x64\bin\lldb" --version
23+
@rem lldb --version
24+
2125
dir j64
2226
IF "%USE_EMU_AVX%"=="0" GOTO L01F
2327
IF "%USE_PYXES%"=="0" GOTO L01F

script/testga.ijs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ exit^:(*@#RES) *@#RES
108108
echo '>>> testing gxco1.ijs'
109109
RES=: RUN4 (<testpath),each <'gxco1.ijs'
110110
exit^:(*@#RES) *@#RES
111+
echo '>>> testing gdic2.ijs'
112+
RES=: RUN4 (<testpath),each <'gdic2.ijs'
113+
exit^:(*@#RES) *@#RES
111114
echo '>>> testing gdic.ijs'
112115
RES=: RUN4 (<testpath),each <'gdic.ijs'
113116
exit^:(*@#RES) *@#RES

test/g131.ijs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ thr=: (9!:58)"0 i.3
1111

1212
NB. mdiv failed on small ct
1313
ct =: 9!:18''
14-
9!:19[2^_40
14+
9!:19[2^_38
1515

1616
X =: +/ . *
1717
en =: 1&{@(,&1 1)@$

test/g131cb.ijs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ thr=: (9!:58)"0 i.3
66

77
NB. mdiv failed on small ct
88
ct =: 9!:18''
9-
9!:19[2^_40
9+
9!:19[2^_38
1010

1111
X =: +/ . *
1212
en =: 1&{@(,&1 1)@$

test/gdic.ijs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ INDEX_TYPES_CONCURRENT test_multithreading2 1 10000 3
642642
{{ for. i. 10 do. INDEX_TYPES_CONCURRENT test_multithreading3 1000 3 end. }} ''
643643
set_threads 0
644644
EMPTY
645-
}}^:((2 *@(17 b.) 9!:56'MEMAUDIT') < 9!:56'PYXES') ''
645+
}}^:((2 *@(17 b.) 9!:56'MEMAUDIT') < (9!:56'PYXES') *. 0=dbq'') ''
646646

647647

648648
epilog''

test/gdic2.ijs

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
prolog './gdic2.ijs'
2+
NB. addon/dictionary
3+
4+
dumpchk=: 4 : 0
5+
echo x,':'
6+
echo 'count: ', ":count__y''
7+
(1) 16!:_7 dict__y
8+
EMPTY
9+
)
10+
11+
require 'data/dictionary'
12+
13+
coclass 'naivedictionary'
14+
15+
create=: {{
16+
keys=: 0 $ a:
17+
vals=: 0 $ a:
18+
}}
19+
20+
destroy=: codestroy
21+
22+
has=: {{ keys e.~ < y }}
23+
24+
put=: {{
25+
del y
26+
keys=: keys , < y
27+
vals=: vals , < x
28+
EMPTY
29+
}}
30+
31+
get=: {{ > vals {~ keys i. < y }}
32+
33+
del=: {{
34+
idx=. keys i. < y
35+
if. idx < # keys do.
36+
keys=: keys -. < y
37+
vals=: (idx {. vals) , (>: idx) }. vals
38+
end.
39+
assert. (# keys) -: # vals
40+
EMPTY
41+
}}
42+
43+
count=: {{ # keys }}
44+
45+
cocurrent 'base'
46+
47+
rand_integer=: {{ >: ? <. 3 }}
48+
rand_boolean=: {{ ? 2 }}
49+
50+
test_type=: {{)m
51+
batchshape=. 1
52+
keyshape=. 3
53+
valshape=. 5
54+
params=. y , <,. ('keytype' ; 'boolean') , ('keyshape' ; keyshape) ,: ('valueshape' ; valshape)
55+
echo params
56+
mydict=. params conew 'jdictionary'
57+
58+
naivedict=. '' conew 'naivedictionary'
59+
keyrank=. # keyshape
60+
valrank=. # valshape
61+
62+
assert. (count__mydict '') -: count__naivedict ''
63+
NB. Put.
64+
keys=. 0 0 0
65+
vals=. 2 1 2 2 2
66+
echo 'put'
67+
echo 'keys'
68+
echo keys
69+
echo 'vals'
70+
echo vals
71+
72+
vals put__naivedict"(valrank , keyrank) keys
73+
assert. EMPTY -: vals put__mydict keys
74+
'put'dumpchk mydict
75+
assert. (count__mydict '') -: count__naivedict ''
76+
NB. Get.
77+
keys=. 0 0 0
78+
vals=. 2 2 3 1 3
79+
echo 'get'
80+
echo 'keys'
81+
echo keys
82+
echo 'vals'
83+
echo vals
84+
naivemask=. has__naivedict"keyrank keys
85+
jhasans=. has__mydict keys
86+
assert. jhasans -: naivemask
87+
'get'dumpchk mydict
88+
if. -. valshape -: 0 do.
89+
fillatom=. {. valuetype__mydict c. ''
90+
jgetans=. (valshape $ fillatom) get__mydict keys
91+
jmask=. +./@,"valrank ] fillatom ~: jgetans
92+
assert. jmask -: naivemask
93+
naivegetans=. get__naivedict"keyrank (, naivemask) # (_ , keyshape) ($ ,) keys
94+
if. 1 -: +./ , naivemask do.
95+
assert. naivegetans -: (, jmask) # (_ , valshape) ($ ,) jgetans
96+
end.
97+
end.
98+
NB. Delete.
99+
batchshapefordel=. <. -: batchshape
100+
keys=. (batchshapefordel , keyshape) $ 0
101+
echo 'delete'
102+
echo 'keys shape: ',":$keys
103+
echo 'keys'
104+
echo keys
105+
naivemask=. has__naivedict"keyrank keys
106+
del__naivedict"keyrank keys
107+
jdelans=. del__mydict keys
108+
'del'dumpchk mydict
109+
echo 'count mydict ',": count__mydict ''
110+
echo 'count naivedict ',": count__naivedict ''
111+
assert. (count__mydict '') -: count__naivedict ''
112+
echo 'count ok'
113+
assert. jdelans -: naivemask *. batchshapefordel ($ ,) ~:&.|. (_ , keyshape) ($ ,) keys
114+
echo 'jdelans ok'
115+
destroy__naivedict ''
116+
destroy__mydict ''
117+
echo 'finish test_type'
118+
EMPTY
119+
}}"0 'tree concurrent';'tree'
120+
121+
122+
123+
epilog''
124+

0 commit comments

Comments
 (0)