on master help sign in
115 files changed+9939−9021
since splitsnapshots
unifiedsplit
TODO.md+11 desk/desk.ship+1 desk/lib/interlist.hoon+79 desk/lib/lua.hoon+1 desk/lib/lua/interpreter.hoon+554 zod/luau/lib/lua/parser.hoon → desk/lib/lua/parser.hoon+237−62 zod/luau/lib/lua/printer.hoon → desk/lib/lua/printer.hoon+18−12 zod/luau/lib/lua.hoon → desk/lib/lua/utils.hoon desk/lib/st.hoon+64 zod/luau/lib/strand.hoon → desk/lib/strand.hoon zod/luau/lib/strandio.hoon → desk/lib/strandio.hoon+21−1 zod/luau/mar/atom.hoon → desk/mar/atom.hoon zod/luau/mar/bill.hoon → desk/mar/bill.hoon zod/luau/mar/docket-0.hoon → desk/mar/docket-0.hoon zod/luau/mar/hoon.hoon → desk/mar/hoon.hoon zod/luau/mar/kelvin.hoon → desk/mar/kelvin.hoon zod/luau/mar/lua.hoon → desk/mar/lua.hoon zod/luau/mar/mime.hoon → desk/mar/mime.hoon zod/luau/mar/noun.hoon → desk/mar/noun.hoon zod/luau/mar/ship.hoon → desk/mar/ship.hoon zod/luau/mar/txt.hoon → desk/mar/txt.hoon zod/luau/res/lua/all.lua → desk/res/lua/all.lua zod/luau/res/lua/api.lua → desk/res/lua/api.lua zod/luau/res/lua/attrib.lua → desk/res/lua/attrib.lua desk/res/lua/bar.lua+23 desk/res/lua/baz.lua+6 zod/luau/res/lua/big.lua → desk/res/lua/big.lua zod/luau/res/lua/bitwise.lua → desk/res/lua/bitwise.lua zod/luau/res/lua/bwcoercion.lua → desk/res/lua/bwcoercion.lua zod/luau/res/lua/calls.lua → desk/res/lua/calls.lua zod/luau/res/lua/closure.lua → desk/res/lua/closure.lua zod/luau/res/lua/code.lua → desk/res/lua/code.lua zod/luau/res/lua/constructs.lua → desk/res/lua/constructs.lua zod/luau/res/lua/coroutine.lua → desk/res/lua/coroutine.lua zod/luau/res/lua/cstack.lua → desk/res/lua/cstack.lua zod/luau/res/lua/cycled/all.lua → desk/res/lua/cycled/all.lua+43−43 zod/luau/res/lua/cycled/api.lua → desk/res/lua/cycled/api.lua+487−487 desk/res/lua/cycled/attrib.lua+431 desk/res/lua/cycled/bar.lua+2 zod/luau/res/lua/cycled/big.lua → desk/res/lua/cycled/big.lua+21−21 desk/res/lua/cycled/bitwise.lua+309 zod/luau/res/lua/cycled/bwcoercion.lua → desk/res/lua/cycled/bwcoercion.lua+11−11 desk/res/lua/cycled/calls.lua+492 desk/res/lua/cycled/closure.lua+327 zod/luau/res/lua/cycled/code.lua → desk/res/lua/cycled/code.lua+215−215 zod/luau/res/lua/cycled/constructs.lua → desk/res/lua/cycled/constructs.lua+164−164 zod/luau/res/lua/cycled/coroutine.lua → desk/res/lua/cycled/coroutine.lua+453−453 zod/luau/res/lua/cycled/cstack.lua → desk/res/lua/cycled/cstack.lua+36−36 zod/luau/res/lua/cycled/db.lua → desk/res/lua/cycled/db.lua+379−379 zod/luau/res/lua/cycled/errors.lua → desk/res/lua/cycled/errors.lua+146−146 desk/res/lua/cycled/events.lua+610 zod/luau/res/lua/cycled/files.lua → desk/res/lua/cycled/files.lua+318−318 desk/res/lua/cycled/foo.lua+82 zod/luau/res/lua/cycled/gc.lua → desk/res/lua/cycled/gc.lua+198−198 desk/res/lua/cycled/gengc.lua+108 zod/luau/res/lua/cycled/goto.lua → desk/res/lua/cycled/goto.lua+57−57 zod/luau/res/lua/cycled/heavy.lua → desk/res/lua/cycled/heavy.lua+35−35 zod/luau/res/lua/cycled/literals.lua → desk/res/lua/cycled/literals.lua+78−78 zod/luau/res/lua/cycled/locals.lua → desk/res/lua/cycled/locals.lua+303−303 zod/luau/res/lua/cycled/main.lua → desk/res/lua/cycled/main.lua+39−39 desk/res/lua/cycled/math.lua+879 desk/res/lua/cycled/nextvar.lua+1055 desk/res/lua/cycled/pm.lua+404 zod/luau/res/lua/cycled/sort.lua → desk/res/lua/cycled/sort.lua+142−142 desk/res/lua/cycled/strings.lua+441 desk/res/lua/cycled/tpack.lua+259 zod/luau/res/lua/cycled/tracegc.lua → desk/res/lua/cycled/tracegc.lua+1−1 desk/res/lua/cycled/utf8.lua+203 desk/res/lua/cycled/vararg.lua+137 zod/luau/res/lua/cycled/verybig.lua → desk/res/lua/cycled/verybig.lua+18−18 zod/luau/res/lua/db.lua → desk/res/lua/db.lua zod/luau/res/lua/errors.lua → desk/res/lua/errors.lua zod/luau/res/lua/events.lua → desk/res/lua/events.lua zod/luau/res/lua/files.lua → desk/res/lua/files.lua zod/luau/res/lua/foo.lua → desk/res/lua/foo.lua+2−5 zod/luau/res/lua/gc.lua → desk/res/lua/gc.lua zod/luau/res/lua/gengc.lua → desk/res/lua/gengc.lua zod/luau/res/lua/goto.lua → desk/res/lua/goto.lua zod/luau/res/lua/heavy.lua → desk/res/lua/heavy.lua zod/luau/res/lua/literals.lua → desk/res/lua/literals.lua zod/luau/res/lua/locals.lua → desk/res/lua/locals.lua zod/luau/res/lua/main.lua → desk/res/lua/main.lua zod/luau/res/lua/math.lua → desk/res/lua/math.lua zod/luau/res/lua/nextvar.lua → desk/res/lua/nextvar.lua zod/luau/res/lua/pm.lua → desk/res/lua/pm.lua zod/luau/res/lua/sort.lua → desk/res/lua/sort.lua zod/luau/res/lua/strings.lua → desk/res/lua/strings.lua zod/luau/res/lua/tpack.lua → desk/res/lua/tpack.lua zod/luau/res/lua/tracegc.lua → desk/res/lua/tracegc.lua zod/luau/res/lua/utf8.lua → desk/res/lua/utf8.lua zod/luau/res/lua/vararg.lua → desk/res/lua/vararg.lua zod/luau/res/lua/verybig.lua → desk/res/lua/verybig.lua desk/sur/interlist.hoon+8 zod/luau/sur/lua.hoon → desk/sur/lua.hoon+4−4 zod/luau/sur/spider.hoon → desk/sur/spider.hoon zod/luau/sys.kelvin → desk/sys.kelvin desk/ted/eval-lua.hoon+19 zod/luau/ted/test-lua.hoon → desk/ted/test-lua.hoon+8−9 zod/luau/TODO.md−6 zod/luau/lib/interlist.hoon−32 zod/luau/res/lua/cycled/attrib.lua−431 zod/luau/res/lua/cycled/bitwise.lua−309 zod/luau/res/lua/cycled/calls.lua−492 zod/luau/res/lua/cycled/closure.lua−327 zod/luau/res/lua/cycled/events.lua−610 zod/luau/res/lua/cycled/foo.lua−82 zod/luau/res/lua/cycled/gengc.lua−108 zod/luau/res/lua/cycled/math.lua−879 zod/luau/res/lua/cycled/nextvar.lua−1055 zod/luau/res/lua/cycled/pm.lua−404 zod/luau/res/lua/cycled/strings.lua−441 zod/luau/res/lua/cycled/tpack.lua−259 zod/luau/res/lua/cycled/utf8.lua−203 zod/luau/res/lua/cycled/vararg.lua−137 zod/luau/tmp.hoon−9
TODO.mdnew file+11
@@ -0,0 +1,11 @@
1+# Parser
2+
3+- [x] functioncall
4+- [x] any string apart from the basic string with no escapes
5+- [x] check if int fits in int or make it a float
6+- [x] should `print-blok` have `do`-`end`? This is fucked.
7+- [x] binary operator priority
8+- [x] ^ should be higher priority than unary ops
9+- [x] Unifiy parened exprs
10+- [ ] pow
11+- [ ] attributes
desk/desk.shipnew file+1
@@ -0,0 +1 @@
1+~racfer-hattes
desk/lib/interlist.hoonnew file+79
@@ -0,0 +1,79 @@
1+/- *interlist
2+=<
3+|%
4+++ new
5+ |* [a=* b=(list [* *])]
6+ ^- (interlist _?<(?=(~ b) -.i.b) _a)
7+ ?~ b single+a
8+ double+[a -.i.b (new +.i.b t.b)]
9+++ turn-inter
10+ |* [l=(interlist) f=$-(* *)]
11+ ^- (interlist _$:f _?>(?=(%single -.l) +.l))
12+ ?- -.l
13+ %single [%single +.l]
14+ %double [%double val.l (f sep.l) $(l tail.l)]
15+ ==
16+++ turn
17+ |* [l=(interlist) f=$-(* *)]
18+ ^- (interlist _?>(?=(%double -.l) sep.l) _$:f)
19+ ?- -.l
20+ %single single+(f +.l)
21+ %double double+[(f val.l) sep.l $(l tail.l)]
22+ ==
23+++ reverse
24+ |* l=(interlist)
25+ ^+ l
26+ =/ tmp=(unit _?>(?=(%double -.l) +>.l)) ~
27+ |-
28+ ^+ l
29+ ?- -.l
30+ %single
31+ ?~ tmp l [%double +.l u.tmp]
32+ %double
33+ %= $
34+ l +>+.l
35+ tmp
36+ ?~ tmp `[+>-.l [%single +<.l]]
37+ `[+>-.l [%double +<.l u.tmp]]
38+ ==
39+ ==
40+++ parse
41+ |* [s=rule v=rule]
42+ =/ val (rule-type v)
43+ =/ sep (rule-type s)
44+ %+ cook
45+ |* [v=* rest=(list [* *])]
46+ ^- (interlist sep val)
47+ =/ rrest (flop rest)
48+ ?~ rrest [%single v]
49+ =/ tail
50+ %+ roll t.rrest
51+ |* [[s=* v=*] _[acc=`(interlist sep val)`[%single +.i.rrest] last-sep=-.i.rrest]]
52+ [[%double v last-sep acc] s]
53+ [%double v +.tail -.tail]
54+ ;~(plug v (star ;~(plug s v)))
55+++ split-left-on
56+ |* [is-pivot=$-(* ?) l=(interlist)]
57+ ^- (unit _[lhs=l pivot=+<.is-pivot rhs=l])
58+ ?- -.l
59+ %single ~
60+ %double
61+ ?: (is-pivot sep.l) `[[%single val.l] sep.l tail.l]
62+ =/ rest $(l tail.l)
63+ ?~ rest ~
64+ `[[%double val.l sep.l lhs.u.rest] pivot.u.rest rhs.u.rest]
65+ ==
66+++ split-right-on
67+ |* [is-pivot=$-(* ?) l=(interlist * *)]
68+ ^- (unit _[lhs=l pivot=+<.is-pivot rhs=l])
69+ %+ bind (split-left-on is-pivot (reverse l))
70+ |* [a=(interlist * *) b=* c=(interlist * *)] [(reverse c) b (reverse a)]
71+--
72+|%
73+++ rule-type
74+ |* =rule
75+ $_
76+ =/ ret q:$:rule
77+ ?> ?=(^ ret)
78+ p.u.ret
79+--
desk/lib/lua.hoonnew file+1
@@ -0,0 +1 @@
1+/+ lua-interpreter
desk/lib/lua/interpreter.hoonnew file+554
@@ -0,0 +1,554 @@
1+/- *lua
2+/+ st
3+=<
4+|= =chunk
5+((eval-chunk chunk) *state)
6+|%
7+++ eval-chunk
8+ |= =chunk
9+ ^- (eval-m value)
10+ ?- -.chunk
11+ %blok (eval-blok +.chunk)
12+ ==
13+++ object-id |$ obj @
14+++ objects
15+ |$ obj [objs=(map (object-id obj) obj) next-id=(object-id obj)]
16++$ value
17+ $%
18+ [%table val=(object-id table) meta=(unit (object-id table))]
19+ [%string string]
20+ [%num numeral]
21+ [%multires (lest value)]
22+ [%true ~]
23+ [%false ~]
24+ [%nil ~]
25+ ==
26++$ lval
27+ $%
28+ [%var name]
29+ [%table-field (object-id table) value]
30+ ==
31++$ table (map value value)
32++$ state
33+ $:
34+ tables=$~([(malt ~[[0 *table]]) 1] (objects table))
35+ global-env=table
36+ local-envs=$~(~[(malt ~[['_ENV' table+[0 ~]]])] (lest (map name value)))
37+ ==
38+++ eval-m
39+ |$ [val]
40+ $-(state [st=state val=val])
41+++ pure
42+ |* x=*
43+ ^- (eval-m _x)
44+ |=(st=state [st x])
45+++ bind
46+ |* =mold
47+ |* [prev=(eval-m) cont=$-(* (eval-m mold))]
48+ ^+ $:cont
49+ |= st=state
50+ =/ [st=state val=_val:$:prev] (prev st)
51+ ((cont val) st)
52+++ get-state
53+ ^- (eval-m state)
54+ |= st=state
55+ [st st]
56+++ set-state
57+ |= st=state
58+ ^- (eval-m ~)
59+ |= state
60+ [st ~]
61+++ eval-blok
62+ =<
63+ |= =blok
64+ ^- (eval-m value)
65+ %- with-local
66+ =/ body body.blok
67+ |-
68+ ^- (eval-m value)
69+ ?~ body
70+ ?~ ret.blok (pure nil+~)
71+ ?~ u.ret.blok (pure nil+~)
72+ ;< rets=(lest value) bind (eval-exprlist u.u.ret.blok)
73+ (pure (multires rets))
74+ ;< ~ bind (eval-stat i.body)
75+ ;< ret=value bind $(body t.body)
76+ (pure ret)
77+ |%
78+ ++ with-local
79+ |* act=(eval-m)
80+ ^- _act
81+ ;< ~ bind push-local
82+ ;< res=_val:$:act bind act
83+ ;< ~ bind pop-local
84+ (pure res)
85+ ++ push-local
86+ ^- (eval-m ~)
87+ |= st=state
88+ =. local-envs.st [*(map name value) local-envs.st]
89+ [st ~]
90+ ++ pop-local
91+ ^- (eval-m ~)
92+ |= st=state
93+ =. local-envs.st
94+ ?~ t.local-envs.st !!
95+ t.local-envs.st
96+ [st ~]
97+ --
98+++ multires
99+ |= vals=(lest value)
100+ ^- value
101+ ?~ t.vals i.vals
102+ multires+vals
103+++ eval-exprlist
104+ |= vals=exprlist
105+ ^- (eval-m (lest value))
106+ ;< val=value bind (eval-expr i.vals)
107+ ?~ t.vals (pure [val ~])
108+ ;< tail=(list value) bind $(vals t.vals)
109+ (pure [val tail])
110+++ eval-stat
111+ |= =stat
112+ ^- (eval-m ~)
113+ ?+ -.stat !!
114+ %asmnt
115+ ;< lhs=(lest lval) bind (process-varlist +<.stat)
116+ ;< rhs=(lest value) bind (eval-exprlist +>.stat)
117+ =/ asmnts (zip lhs (normalize-multires-exprlist rhs))
118+ |-
119+ ?~ asmnts (pure ~)
120+ ;< * bind
121+ ?- -<.i.asmnts
122+ %var ((set-var ->.i.asmnts) +.i.asmnts)
123+ %table-field
124+ ;< tabl=table bind (get-table ->-.i.asmnts)
125+ (set-table ->-.i.asmnts (~(put by tabl) ->+.i.asmnts +.i.asmnts))
126+ ==
127+ $(asmnts t.asmnts)
128+ %local-asmnt
129+ =/ lhs=(list name)
130+ %+ turn attrnamelist.stat
131+ |= [=name attr=(unit attrib)]
132+ ?> ?=(~ attr)
133+ name
134+ ;< actual-values=(list [name value]) bind
135+ ?~ rhs.stat (pure ~)
136+ ;< rhs=(list value) bind (eval-exprlist u.rhs.stat)
137+ (pure (zip lhs rhs))
138+ ;< st=state bind get-state
139+ =. i.local-envs.st
140+ %- ~(uni by i.local-envs.st)
141+ %- malt
142+ (weld (turn lhs |=(=name [name `value`nil+~])) actual-values)
143+ (set-state st)
144+ ==
145+++ set-var
146+ |= var=name
147+ |= val=value
148+ ^- (eval-m ~)
149+ ;< envs=(list (map name value)) bind get-local-envs
150+ =/ new-envs=(unit (lest (map name value)))
151+ |-
152+ ^- (unit (lest (map name value)))
153+ ?~ envs ~
154+ ?. (~(has by i.envs) var)
155+ =/ rest $(envs t.envs)
156+ ?~ rest ~
157+ `[i.envs u.rest]
158+ `[(~(put by i.envs) var val) t.envs]
159+ ^- (eval-m ~)
160+ ?. ?=(~ new-envs)
161+ |= st=state
162+ =. local-envs.st u.new-envs
163+ [st ~]
164+ =/ global-env (need ((get-from-local-envs envs) '_ENV'))
165+ :: TODO: proper error
166+ ?+ -.global-env !!
167+ %table
168+ ;< tabl=table bind (get-table +<.global-env)
169+ (set-table +<.global-env (~(put by tabl) (string-val var) val))
170+ ==
171+++ normalize-multires-exprlist
172+ |= vals=(list value)
173+ ^- (list value)
174+ ?~ vals ~
175+ ?~ t.vals ~[(normalize-multires i.vals)]
176+ [i.vals $(vals t.vals)]
177+++ normalize-multires
178+ |= val=value
179+ ^- value
180+ ?+ -.val val
181+ %multires
182+ =/ res=(lest value)
183+ =/ vals=(lest value) +.val
184+ |-
185+ ?~ t.vals
186+ =/ tail=value (normalize-multires i.vals)
187+ ?: ?=(%multires -.tail) +.tail [tail ~]
188+ [i.vals $(vals t.vals)]
189+ ?~ t.res i.res
190+ multires+res
191+ ==
192+++ process-varlist
193+ =<
194+ |= =varlist
195+ ^- (eval-m (lest lval))
196+ ;< val=lval bind (process-var i.varlist)
197+ ?~ t.varlist (pure ~[val])
198+ ;< tail=(list lval) bind $(varlist t.varlist)
199+ (pure [val tail])
200+ |%
201+ ++ process-var
202+ |= =var
203+ ^- (eval-m lval)
204+ ?- -.var
205+ %name (pure var++.var)
206+ %indexed
207+ ;< prefix=value bind (eval-prefix-expr +<.var)
208+ ;< idx=value bind (eval-expr +>.var)
209+ :: TODO: proper error
210+ ?. ?=(%table -.prefix) !!
211+ (pure table-field+[val.prefix idx])
212+ %dot
213+ ;< prefix=value bind (eval-prefix-expr +<.var)
214+ :: TODO: proper error
215+ ?. ?=(%table -.prefix) !!
216+ (pure table-field+[val.prefix (string-val +>.var)])
217+ ==
218+ --
219+++ eval-expr
220+ |= =expr
221+ ^- (eval-m value)
222+ ?+ -.expr !!
223+ %false (pure expr)
224+ %true (pure expr)
225+ %nil (pure expr)
226+ %string (pure expr)
227+ %num (pure expr)
228+ %binop (eval-binop +.expr)
229+ %prefix-expr (eval-prefix-expr +.expr)
230+ %unop (eval-unop +.expr)
231+ %table
232+ ;< tabl-id=(object-id table) bind (eval-table +.expr)
233+ (pure table+[tabl-id ~])
234+ ==
235+++ eval-table
236+ |= tabl=^table
237+ =<
238+ ^- (eval-m (object-id table))
239+ ;< felds=(list [value value]) bind
240+ =/ counter 1
241+ |-
242+ ?~ tabl (pure ~)
243+ ?- -.i.tabl
244+ %keyed
245+ ;< k=value bind (eval-expr +<.i.tabl)
246+ ;< v=value bind (eval-expr +>.i.tabl)
247+ ;< tail=(list [value value]) bind $(tabl t.tabl)
248+ (pure [[k v] tail])
249+ %unkeyed
250+ ;< v=value bind (eval-expr +.i.tabl)
251+ ?: &(?=(~ t.tabl) ?=(%multires -.v))
252+ =/ vals=(list value) +.v
253+ %- pure
254+ ^- (list [value value])
255+ |-
256+ ?~ vals ~
257+ [[num+int+(new:st counter) i.vals] $(vals t.vals, counter +(counter))]
258+ ;< tail=(list [value value]) bind $(tabl t.tabl, counter +(counter))
259+ (pure [[num+int+(new:st counter) v] tail])
260+ ==
261+ (new-table (malt felds))
262+ |%
263+ --
264+++ eval-unop
265+ |= [op=unop =expr]
266+ ^- (eval-m value)
267+ ?+ op !!
268+ %minus
269+ ;< val=value bind (eval-expr expr)
270+ ;< num=numeral bind (assert-numeral val)
271+ %- pure
272+ ?- -.num
273+ %int num+int+(neg:st +.num)
274+ %float num+float+(sub:rd *@rd +.num)
275+ ==
276+ %not
277+ ;< val=value bind (eval-expr expr)
278+ %- pure
279+ ?: (falsy val) [%false ~] [%true ~]
280+ %sig
281+ ;< val=value bind (eval-expr expr)
282+ ;< n=numeral bind (assert-numeral val)
283+ ;< i=@st bind (to-int n)
284+ %- pure
285+ num+int+(mix i mask:st)
286+ ==
287+++ eval-binop
288+ |= [lhs=expr op=binop rhs=expr]
289+ ^- (eval-m value)
290+ =<
291+ ?+ op !!
292+ %add
293+ ;< lhs=value bind (eval-expr lhs)
294+ ;< rhs=value bind (eval-expr rhs)
295+ ;< unified=unified-numerals bind (unify-numeral-values lhs rhs)
296+ %- pure
297+ :- %num
298+ ?- -.unified
299+ %i :- %int (add:st a.unified b.unified)
300+ %f :- %float (add:rd a.unified b.unified)
301+ ==
302+ %sub
303+ ;< lhs=value bind (eval-expr lhs)
304+ ;< rhs=value bind (eval-expr rhs)
305+ ;< unified=unified-numerals bind (unify-numeral-values lhs rhs)
306+ %- pure
307+ :- %num
308+ ?- -.unified
309+ %i :- %int (sub:st a.unified b.unified)
310+ %f :- %float (sub:rd a.unified b.unified)
311+ ==
312+ %mul
313+ ;< lhs=value bind (eval-expr lhs)
314+ ;< rhs=value bind (eval-expr rhs)
315+ ;< unified=unified-numerals bind (unify-numeral-values lhs rhs)
316+ %- pure
317+ :- %num
318+ ?- -.unified
319+ %i :- %int (mul:st a.unified b.unified)
320+ %f :- %float (mul:rd a.unified b.unified)
321+ ==
322+ %int-div
323+ ;< lhs=value bind (eval-expr lhs)
324+ ;< rhs=value bind (eval-expr rhs)
325+ ;< unified=unified-numerals bind (unify-numeral-values lhs rhs)
326+ %- pure
327+ :- %num
328+ ?- -.unified
329+ %i :- %int (div:st +.unified)
330+ %f :- %float (int-div-float +.unified)
331+ ==
332+ %mod
333+ ;< lhs=value bind (eval-expr lhs)
334+ ;< rhs=value bind (eval-expr rhs)
335+ ;< unified=unified-numerals bind (unify-numeral-values lhs rhs)
336+ %- pure
337+ :- %num
338+ ?- -.unified
339+ %i :- %int (mod:st +.unified)
340+ %f
341+ :- %float
342+ (sub:rd a.unified (mul:rd (int-div-float +.unified) b.unified))
343+ ==
344+ %div
345+ ;< lhs=value bind (eval-expr lhs)
346+ ;< rhs=value bind (eval-expr rhs)
347+ ;< lhs=numeral bind (assert-numeral lhs)
348+ ;< rhs=numeral bind (assert-numeral rhs)
349+ %- pure num+float+(div:rd (to-float lhs) (to-float rhs))
350+ %exp !!
351+ %band
352+ ;< lhs=value bind (eval-expr lhs)
353+ ;< rhs=value bind (eval-expr rhs)
354+ ;< lhs=numeral bind (assert-numeral lhs)
355+ ;< rhs=numeral bind (assert-numeral rhs)
356+ ;< lhs=@st bind (to-int lhs)
357+ ;< rhs=@st bind (to-int rhs)
358+ %- pure
359+ num+int+(dis lhs rhs)
360+ %bor
361+ ;< lhs=value bind (eval-expr lhs)
362+ ;< rhs=value bind (eval-expr rhs)
363+ ;< lhs=numeral bind (assert-numeral lhs)
364+ ;< rhs=numeral bind (assert-numeral rhs)
365+ ;< lhs=@st bind (to-int lhs)
366+ ;< rhs=@st bind (to-int rhs)
367+ %- pure
368+ num+int+(con lhs rhs)
369+ %bxor
370+ ;< lhs=value bind (eval-expr lhs)
371+ ;< rhs=value bind (eval-expr rhs)
372+ ;< lhs=numeral bind (assert-numeral lhs)
373+ ;< rhs=numeral bind (assert-numeral rhs)
374+ ;< lhs=@st bind (to-int lhs)
375+ ;< rhs=@st bind (to-int rhs)
376+ %- pure
377+ num+int+(mix lhs rhs)
378+ %rshft
379+ ;< lhs=value bind (eval-expr lhs)
380+ ;< rhs=value bind (eval-expr rhs)
381+ ;< lhs=numeral bind (assert-numeral lhs)
382+ ;< rhs=numeral bind (assert-numeral rhs)
383+ ;< lhs=@st bind (to-int lhs)
384+ ;< rhs=@st bind (to-int rhs)
385+ %- pure
386+ num+int+(dis mask:st (?:((sig:st rhs) lsh rsh) [0 (abs:st rhs)] lhs))
387+ %lshft
388+ ;< lhs=value bind (eval-expr lhs)
389+ ;< rhs=value bind (eval-expr rhs)
390+ ;< lhs=numeral bind (assert-numeral lhs)
391+ ;< rhs=numeral bind (assert-numeral rhs)
392+ ;< lhs=@st bind (to-int lhs)
393+ ;< rhs=@st bind (to-int rhs)
394+ %- pure
395+ num+int+(dis mask:st (?:((sig:st rhs) rsh lsh) [0 (abs:st rhs)] lhs))
396+ %or
397+ ;< lhs=value bind (eval-expr lhs)
398+ ?. (falsy lhs) (pure lhs)
399+ (eval-expr rhs)
400+ %and
401+ ;< lhs=value bind (eval-expr lhs)
402+ ?: (falsy lhs) (pure lhs)
403+ (eval-expr rhs)
404+ ==
405+ |%
406+ ++ show-numeral
407+ |= n=numeral
408+ ^- tape
409+ ?- -.n
410+ %int (scow %s (to-s:st +.n))
411+ %float (scow %rd +.n)
412+ ==
413+ ++ int-div-float
414+ |= [a=@rd b=@rd]
415+ =/ whole=(unit @s) (~(toi rd %d) (div:rd a b))
416+ ?~ whole (div:rd .~0 .~0)
417+ (san:rd u.whole)
418+ +$ unified-numerals $%([%i a=@st b=@st] [%f a=@rd b=@rd])
419+ ++ unify-numeral-values
420+ |= [a=value b=value]
421+ ^- (eval-m unified-numerals)
422+ ;< a=numeral bind (assert-numeral a)
423+ ;< b=numeral bind (assert-numeral b)
424+ (pure (unify-numerals a b))
425+ ++ unify-numerals
426+ |= [a=numeral b=numeral]
427+ ^- unified-numerals
428+ ?: &(?=(%int -.a) ?=(%int -.b)) [%i +.a +.b]
429+ [%f (to-float a) (to-float b)]
430+ ++ to-float
431+ |= n=numeral
432+ ^- @rd
433+ ?: ?=(%float -.n) +.n
434+ (san:rd (to-s:st +.n))
435+ --
436+++ to-int
437+ |= n=numeral
438+ ^- (eval-m @st)
439+ ?: ?=(%int -.n) (pure +.n)
440+ =/ i=(unit @s) (toi:rd +.n)
441+ :: TODO: proper error
442+ ?~ i !!
443+ =/ i u.i
444+ =/ cycled (san:rd i)
445+ :: TODO: proper error
446+ :: checks that we don't lose any information
447+ ?. =(+.n cycled) !!
448+ (pure (from-s:st i))
449+++ falsy
450+ |= v=value
451+ ^- ?
452+ ?+ -.v |
453+ %false &
454+ %nil &
455+ ==
456+++ assert-numeral
457+ |= [a=value]
458+ ^- (eval-m numeral)
459+ :: TODO: throw a proper error
460+ ?. ?=(%num -.a) !!
461+ (pure +.a)
462+++ eval-prefix-expr
463+ |= =prefix-expr
464+ ^- (eval-m value)
465+ ?- -.prefix-expr
466+ %expr (eval-expr +.prefix-expr)
467+ %call (eval-functioncall +.prefix-expr)
468+ %var
469+ ?- +<.prefix-expr
470+ %name (lookup-var +>.prefix-expr)
471+ %dot
472+ ;< tabl=value bind (eval-prefix-expr +>-.prefix-expr)
473+ (lookup-table-field tabl (string-val +>+.prefix-expr))
474+ %indexed
475+ ;< tabl=value bind (eval-prefix-expr +>-.prefix-expr)
476+ ;< idx=value bind (eval-expr +>+.prefix-expr)
477+ (lookup-table-field tabl idx)
478+ ==
479+ ==
480+++ lookup-table-field
481+ |= [val=value fild=value]
482+ ^- (eval-m value)
483+ :: TODO: proper error
484+ ?+ -.val !!
485+ %table
486+ ;< tabl=table bind (get-table val.val)
487+ =/ res (~(get by tabl) fild)
488+ :: TODO: error
489+ ?~ res !!
490+ (pure u.res)
491+ ==
492+++ lookup-var
493+ |= =name
494+ ^- (eval-m value)
495+ ;< envs=(list (map ^name value)) bind get-local-envs
496+ =/ get-local (get-from-local-envs envs)
497+ =/ local=(unit value) (get-local name)
498+ ?. ?=(~ local) (pure u.local)
499+ =/ global-env (get-local '_ENV')
500+ ?~ global-env !!
501+ (lookup-table-field u.global-env (string-val name))
502+++ get-from-local-envs
503+ |= envs=(list (map name value))
504+ |= =name
505+ ^- (unit value)
506+ ?~ envs ~
507+ =/ val=(unit value) (~(get by i.envs) name)
508+ ?~ val $(envs t.envs)
509+ val
510+++ string-val
511+ |= val=@t
512+ ^- value
513+ string+(trip val)
514+++ get
515+ |* f=$-(state *)
516+ ^- (eval-m _$:f)
517+ |= st=state
518+ [st (f st)]
519+++ get-table
520+ |= id=(object-id table)
521+ ^- (eval-m table)
522+ ;< tables=(objects table) bind
523+ %- get |=(st=state tables.st)
524+ =/ table (~(get by objs.tables) id)
525+ :: TODO: proper error
526+ ?~ table !!
527+ (pure u.table)
528+++ set-table
529+ |= [id=(object-id table) tabl=table]
530+ ^- (eval-m ~)
531+ |= st=state
532+ =. objs.tables.st (~(put by objs.tables.st) id tabl)
533+ [st ~]
534+++ get-local-envs
535+ ^- (eval-m (list (map name value)))
536+ %- get |=(st=state local-envs.st)
537+++ eval-functioncall
538+ |= =functioncall
539+ ^- (eval-m value)
540+ !!
541+++ new-table
542+ |= tabl=table
543+ ^- (eval-m (object-id table))
544+ |= st=state
545+ =/ id next-id.tables.st
546+ =. next-id.tables.st +(id)
547+ =. objs.tables.st (~(put by objs.tables.st) id tabl)
548+ [st id]
549+++ zip
550+ |* [lhs=(list) rhs=(list)]
551+ ^- (list [_?<(?=(~ lhs) i.lhs) _?<(?=(~ rhs) i.rhs)])
552+ ?: |(?=(~ lhs) ?=(~ rhs)) ~
553+ [[i.lhs i.rhs] $(lhs t.lhs, rhs t.rhs)]
554+--
zod/luau/lib/lua/parser.hoon → desk/lib/lua/parser.hoonrenamed+237−62
@@ -1,10 +1,12 @@
11/- *lua
2−/+ *interlist
2+/- *interlist
3+/+ st
4+/+ inter=interlist
35=<
46apex
57|%
68++ apex
7− %^ tnee %apex ast
9+ %^ tnee %apex chunk
810 ;~ pfix
911 %- punt
1012 ;~ plug
@@ -31,7 +33,7 @@ apex
3133 parse-numeral
3234 ::
3335 %+ cook
34− |=(=prefix-expr [%prefix-expr prefix-expr])
36+ |=(=prefix-expr (unwrap-prefix [%prefix-expr prefix-expr]))
3537 (knee *prefix-expr |.(parse-prefix-expr))
3638 ::
3739 %+ cook
@@ -52,42 +54,187 @@ apex
5254 parse-funcbody
5355 ==
5456 ::
55− %+ cook |= [=unop =expr] [%unop unop expr]
56− ;~ plug
57− ;~ pose
58− ;~ sfix
59− ;~ pose
60− (cold %minus (just '-'))
61− (cold %sig (just '~'))
62− (cold %hax (just '#'))
63− ==
64− ws
65− ==
66− ;~ sfix
67− (cold %not (jest 'not'))
68− ;~(less parse-name ws)
69− ==
70− ==
71− %+ knee *expr |.(parse-expr)
72− ==
7357 ==
7458:: Parse expressions separated by binary operators
7559::
7660++ parse-expr-list
77− %^ tnee %parse-expr-list (interlist binop expr)
78− %+ parse-interlist (ifix [ws ws] parse-binop) parse-atomic-expr
79−:: TODO: This is mock and should take operator priority into account.
80−::
61+ %^ tnee %parse-expr-list ,(interlist binop [(list unop) expr])
62+ %+ parse:inter (ifix [ws ws] parse-binop)
63+ ;~ plug
64+ %- star
65+ ;~ pose
66+ ;~ sfix
67+ ;~ pose
68+ (cold %minus (just '-'))
69+ (cold %sig (just '~'))
70+ (cold %hax (just '#'))
71+ ==
72+ ws
73+ ==
74+ ;~ sfix
75+ (cold %not (jest 'not'))
76+ ;~(less parse-name ws)
77+ ==
78+ ==
79+ ::
80+ parse-atomic-expr
81+ ==
8182++ process-expr-list
82− |= l=(interlist binop expr)
83+ =<
84+ |= l=(interlist binop [(list unop) expr])
8385 ^- expr
84− ?- -.l
85− %single val.l
86− %double [%binop val.l sep.l (process-expr-list tail.l)]
87− ==
86+ %- strip-tree
87+ %- (process-right-assoc ~[%pow])
88+ %- process-unops
89+ %- (process-left-assoc ~[%mul %div %int-div %mod])
90+ %- (process-left-assoc ~[%add %sub])
91+ %- (process-right-assoc ~[%concat])
92+ %- (process-left-assoc ~[%rshft %lshft])
93+ %- (process-left-assoc ~[%band])
94+ %- (process-left-assoc ~[%bxor])
95+ %- (process-left-assoc ~[%bor])
96+ %- (process-left-assoc ~[%lt %gt %lteq %gteq %neq %eq])
97+ %- (process-left-assoc ~[%and])
98+ %- (process-left-assoc ~[%or])
99+ (preprocess-tree l)
100+ |%
101+ +$ working-tree
102+ $%
103+ [%node l=working-tree n=binop r=working-tree]
104+ [%branch b=unop t=working-tree]
105+ [%tbd-unop l=(list [=expr =binop]) =unop r=working-tree]
106+ [%unoped l=(list [=expr =binop]) r=working-tree]
107+ [%leaf (interlist binop expr)]
108+ ==
109+ ++ preprocess-tree
110+ |= l=(interlist binop [(list unop) expr])
111+ ^- working-tree
112+ =/ splitted (find-unop l)
113+ ?~ splitted leaf+(turn:inter l |=([* =expr] expr))
114+ tbd-unop+[l.u.splitted unop.u.splitted $(l r.u.splitted)]
115+ ++ apply-unops
116+ |= [unops=(list unop) =expr]
117+ ^+ expr
118+ ?~ unops expr
119+ [%unop i.unops $(unops t.unops)]
120+ ++ strip-tree
121+ |= tree=working-tree
122+ ^- expr
123+ ?- -.tree
124+ %leaf ?> ?=(%single +<.tree) +>.tree
125+ %node [%binop $(tree l.tree) n.tree $(tree r.tree)]
126+ %branch [%unop b.tree $(tree t.tree)]
127+ %tbd-unop !!
128+ %unoped ?> =(~ l.tree) $(tree r.tree)
129+ ==
130+ ++ find-unop
131+ |= l=(interlist binop [(list unop) expr])
132+ ^- (unit [l=(list [=expr =binop]) =unop r=(interlist binop [(list unop) expr])])
133+ ?- -.l
134+ %single
135+ ?~ +<.l ~
136+ %- some
137+ [~ i.-.val.l single+[t.-.val.l +.val.l]]
138+ %double
139+ ?~ -.val.l
140+ %+ ^^bind $(l tail.l)
141+ |= [k=(list [expr binop]) =unop tail=(interlist binop [(list unop) expr])]
142+ [[[+.val.l sep.l] k] unop tail]
143+ %- some
144+ [~ i.-.val.l double+[[t.-.val.l +.val.l] sep.l tail.l]]
145+ ==
146+ ++ process-unops
147+ |= tree=working-tree
148+ ^- working-tree
149+ ?- -.tree
150+ %node node+[$(tree l.tree) n.tree $(tree r.tree)]
151+ %branch branch+[b.tree $(tree t.tree)]
152+ %tbd-unop unoped+[l.tree branch+[unop.tree $(tree r.tree)]]
153+ %leaf tree
154+ %unoped unoped+[l.tree $(tree r.tree)]
155+ ==
156+ ++ split-left-unop-list
157+ |= [is-pivot=$-(binop ?) l=(list [=expr =binop])]
158+ ^- (unit [l=(interlist binop expr) =binop r=(list [=expr =binop])])
159+ ?~ l ~
160+ ?: (is-pivot binop.i.l) `[single+expr.i.l binop.i.l t.l]
161+ =/ rest $(l t.l)
162+ ?~ rest ~
163+ `[double+[expr.i.l binop.i.l -.u.rest] +.u.rest]
164+ ++ split-right-unop-list
165+ |= [is-pivot=$-(binop ?) l=(list [=expr =binop])]
166+ ^- (unit [l=(interlist binop expr) =binop r=(list [=expr =binop])])
167+ =/ reversed=(unit [l=(list [=binop =expr]) =binop r=(interlist binop expr)])
168+ =/ l=(list [=binop =expr]) (flop (turn l swap))
169+ |-
170+ ?~ l ~
171+ ?: (is-pivot binop.i.l) `[~ binop.i.l (new:inter expr.i.l t.l)]
172+ =/ rest=(unit [l=(list [=binop =expr]) =binop r=(interlist binop expr)]) $(l t.l)
173+ ?~ rest ~
174+ `[[i.l l.u.rest] +.u.rest]
175+ ?~ reversed ~
176+ `[(reverse:inter r.u.reversed) binop.u.reversed (turn (flop l.u.reversed) swap)]
177+ ++ swap |*([a=* b=*] [b a])
178+ ++ process-right-assoc
179+ |= ops=(lest binop)
180+ |= tree=working-tree
181+ ^- working-tree
182+ ?- -.tree
183+ %leaf
184+ =/ l +.tree
185+ |-
186+ =/ splitted (split-left-on:inter |=(op=binop (elem op ops)) l)
187+ ?~ splitted [%leaf l]
188+ [%node $(l lhs.u.splitted) pivot.u.splitted $(l rhs.u.splitted)]
189+ %branch branch+[b.tree $(tree t.tree)]
190+ %tbd-unop
191+ =/ splitted
192+ (split-left-unop-list |=(op=binop (elem op ops)) l.tree)
193+ ?~ splitted tbd-unop+[l.tree unop.tree $(tree r.tree)]
194+ $(tree [%node $(tree leaf+l.u.splitted) binop.u.splitted tbd-unop+[r.u.splitted +>.tree]])
195+ %node
196+ [%node $(tree l.tree) n.tree $(tree r.tree)]
197+ %unoped
198+ =/ splitted
199+ (split-left-unop-list |=(op=binop (elem op ops)) l.tree)
200+ ?~ splitted unoped+[l.tree $(tree r.tree)]
201+ [%node $(tree leaf+l.u.splitted) binop.u.splitted $(tree unoped+[r.u.splitted r.tree])]
202+ ==
203+ ++ process-left-assoc
204+ |= ops=(lest binop)
205+ |= tree=working-tree
206+ ^- working-tree
207+ ?- -.tree
208+ %leaf
209+ =/ l +.tree
210+ |-
211+ ^- working-tree
212+ =/ splitted (split-right-on:inter |=(op=binop (elem op ops)) l)
213+ ?~ splitted [%leaf l]
214+ [%node $(l lhs.u.splitted) pivot.u.splitted $(l rhs.u.splitted)]
215+ %tbd-unop
216+ =/ splitted
217+ (split-right-unop-list |=(op=binop (elem op ops)) l.tree)
218+ ?~ splitted tbd-unop+[l.tree unop.tree $(tree r.tree)]
219+ $(tree [%node $(tree leaf+l.u.splitted) binop.u.splitted tbd-unop+[r.u.splitted +>.tree]])
220+ %node
221+ [%node $(tree l.tree) n.tree $(tree r.tree)]
222+ %branch
223+ [%branch b.tree $(tree t.tree)]
224+ %unoped
225+ =/ splitted
226+ (split-right-unop-list |=(op=binop (elem op ops)) l.tree)
227+ ?~ splitted unoped+[l.tree $(tree r.tree)]
228+ [%node $(tree leaf+l.u.splitted) binop.u.splitted $(tree unoped+[r.u.splitted +>.tree])]
229+ ==
230+ --
88231++ parse-expr
89232 %^ tnee %parse-expr expr
90− %+ cook process-expr-list parse-expr-list
233+ %+ cook unwrap-prefix
234+ ;~ pose
235+ %+ cook process-expr-list parse-expr-list
236+ (ifix [;~(plug (just '(') ws) ;~(plug ws (just ')'))] (knee *expr |.(parse-expr)))
237+ ==
91238++ parse-parened-expr
92239 %^ tnee %parse-parened-expr prefix-expr
93240 %+ cook
@@ -248,7 +395,7 @@ apex
248395 parse-hex-float
249396 ::
250397 %+ cook
251− |= x=@u [%int x]
398+ |= x=@u [%int (new:st x)]
252399 ;~ pfix
253400 (just '0')
254401 (mask "xX")
@@ -260,7 +407,10 @@ apex
260407 parse-float
261408 ::
262409 %+ cook
263− |= x=@u [%int x]
410+ |= x=@u
411+ ?: (gth x max-int)
412+ [%float (sun:rd x)]
413+ [%int (new:st x)]
264414 (bass 10 (plus dit))
265415 ==
266416++ parse-exprlist
@@ -418,7 +568,7 @@ apex
418568++ parse-local-asmnt
419569 %^ tnee %parse-local-asmnt local-asmnt
420570 %+ cook
421− |= [* * =attnamelist rhs=(unit explist)] [attnamelist rhs]
571+ |= [* * =attrnamelist rhs=(unit explist)] [attrnamelist rhs]
422572 ;~ plug
423573 (jest 'local')
424574 wss
@@ -432,7 +582,7 @@ apex
432582 ==
433583 ==
434584++ parse-attnamelist
435− %^ tnee %parse-attnamelist attnamelist
585+ %^ tnee %parse-attnamelist attrnamelist
436586 %+ most (ifix [ws ws] com)
437587 ;~ plug
438588 parse-name
@@ -714,10 +864,10 @@ apex
714864 ++ name-fst-char ;~(pose alf:ab (just '_'))
715865 --
716866 %+ cook |= =tape (crip tape)
717− ;~(less ;~(plug keyword ;~(less name-char (easy ~))) ;~(plug name-fst-char (star name-char)))
867+ ;~(less keyword ;~(plug name-fst-char (star name-char)))
718868++ bind
719869 |* =mold
720− |* [prev=rule cont=$-(mold rule)]
870+ |* [prev=rule cont=$-(* rule)]
721871 |= =nail
722872 =/ prev-edge (prev nail)
723873 ?~ q.prev-edge prev-edge
@@ -848,31 +998,39 @@ apex
848998 ;< res=_p:(need q:$:$:inner) bind (inner closing)
849999 %+ cold res closing
8501000++ keyword
851− %+ cold ~
852− ;~ pose
853− (jest 'and')
854− (jest 'break')
855− (jest 'do')
856− (jest 'else')
857− (jest 'elseif')
858− (jest 'end')
859− (jest 'false')
860− (jest 'for')
861− (jest 'function')
862− (jest 'goto')
863− (jest 'if')
864− (jest 'in')
865− (jest 'local')
866− (jest 'nil')
867− (jest 'not')
868− (jest 'or')
869− (jest 'repeat')
870− (jest 'return')
871− (jest 'then')
872− (jest 'true')
873− (jest 'until')
874− (jest 'while')
875− ==
1001+ =<
1002+ %+ sear
1003+ |= word=tape
1004+ ^- (unit ~)
1005+ ?: (elem word keyword-names) `~ ~
1006+ (plus alf:ab)
1007+ |%
1008+ ++ keyword-names
1009+ :~
1010+ "and"
1011+ "break"
1012+ "do"
1013+ "else"
1014+ "elseif"
1015+ "end"
1016+ "false"
1017+ "for"
1018+ "function"
1019+ "goto"
1020+ "if"
1021+ "in"
1022+ "local"
1023+ "nil"
1024+ "not"
1025+ "or"
1026+ "repeat"
1027+ "return"
1028+ "then"
1029+ "true"
1030+ "until"
1031+ "while"
1032+ ==
1033+ --
8761034++ tnee
8771035 |* [=term gar=mold sef=rule]
8781036 |= tub=nail
@@ -884,8 +1042,25 @@ apex
8841042 ?~ q.res
8851043 ~& [term %nope] res
8861044 ~& > [term %ok] res
1045+++ neg
1046+ |* =rule
1047+ |= =nail
1048+ ^- (like ~)
1049+ =/ x (rule nail)
1050+ :- p.nail
1051+ ?~ q.x `[~ nail] ~
8871052++ blok-is-empty
8881053 |= =blok
8891054 ^- ?
8901055 &(?=(~ body.blok) ?=(~ ret.blok))
1056+++ max-int 9.223.372.036.854.775.807
1057+++ elem
1058+ |= [nedl=* stak=(list *)]
1059+ ^- ?
1060+ ?=(^ (find ~[nedl] stak))
1061+++ unwrap-prefix
1062+ |= x=expr
1063+ ^- expr
1064+ ?: ?=([%prefix-expr %expr *] x) $(x +>.x)
1065+ x
8911066--
zod/luau/lib/lua/printer.hoon → desk/lib/lua/printer.hoonrenamed+18−12
@@ -1,14 +1,15 @@
11/- *lua
2+/+ st
23=<
34print
45|%
56:: AST
67::
78++ print
8− |= [=ast]
9+ |= [=chunk]
910 ^- tape
10− ?- -.ast
11− %blok (print-blok +.ast)
11+ ?- -.chunk
12+ %blok (print-blok +.chunk)
1213 ==
1314:: Expr
1415::
@@ -23,11 +24,13 @@ print
2324 %binop
2425 %- zing
2526 :~
27+ "("
2628 (print-expr +<.expr)
2729 " "
2830 (print-binop +>-.expr)
2931 " "
3032 (print-expr +>+.expr)
33+ ")"
3134 ==
3235 %num (print-numeral +.expr)
3336 %table (print-table +.expr)
@@ -37,9 +40,11 @@ print
3740 %unop
3841 %- zing
3942 :~
43+ "("
4044 (print-unop +<.expr)
4145 " "
4246 (print-expr +>.expr)
47+ ")"
4348 ==
4449 ==
4550:: unop
@@ -55,7 +60,6 @@ print
5560 ==
5661:: string
5762::
58−:: NOTE: does not handle escaping chars
5963++ print-string
6064 |= =string
6165 %- zing
@@ -143,7 +147,7 @@ print
143147 |= [num=numeral]
144148 ^- tape
145149 ?- -.num
146− %int (show-u +.num)
150+ %int (z-co:co +.num)
147151 %float (show-float +.num)
148152 ==
149153:: exprlist
@@ -187,7 +191,9 @@ print
187191 |= [=prefix-expr]
188192 ?- -.prefix-expr
189193 %var (print-var +.prefix-expr)
190− %expr
194+ %expr
195+ :: since binops already have parens
196+ ?: ?=(%binop +<.prefix-expr) (print-expr +.prefix-expr)
191197 %- zing
192198 :~
193199 "("
@@ -258,7 +264,7 @@ print
258264 %- zing
259265 :~
260266 "local "
261− (print-attnamelist attnamelist.local-asmnt)
267+ (print-attrnamelist attrnamelist.local-asmnt)
262268 ?~ rhs.local-asmnt ""
263269 %- zing
264270 :~
@@ -266,13 +272,13 @@ print
266272 (print-explist u.rhs.local-asmnt)
267273 ==
268274 ==
269−:: attnamelist
275+:: attrnamelist
270276::
271−++ print-attnamelist
272− |= =attnamelist
277+++ print-attrnamelist
278+ |= =attrnamelist
273279 ^- tape
274280 %- commaed
275− %+ turn attnamelist
281+ %+ turn attrnamelist
276282 |= [=name attr=(unit attrib)]
277283 %- zing
278284 :~
@@ -503,7 +509,7 @@ print
503509 %- zing
504510 %+ join "." l
505511++ show-s
506− |=(s=@s `tape`[?:((syn:si s) %$ '-') (slag 2 (scow %ui (abs:si s)))])
512+ |=(s=@s `tape`(zing [?:((syn:si s) "" "-") ~[(slag 2 (scow %ui (abs:si s)))]]))
507513++ show-u
508514 |=(u=@u `tape`(slag 2 (scow %ui u)))
509515++ show-float
zod/luau/lib/lua.hoon → desk/lib/lua/utils.hoonrenamed

The content is the same.

desk/lib/st.hoonnew file+64
@@ -0,0 +1,64 @@
1+:: Two's complement encoded 64-bit signed integer
2+=<
3+|%
4+:: coerce an unsigned int to a signed int
5+::
6+++ new
7+ |= x=@u
8+ ^- @st
9+ (dis mask x)
10+++ to-s
11+ |= x=@st
12+ ^- @s
13+ (new:si ?!((sig x)) (abs x))
14+++ from-s
15+ |= x=@s
16+ ^- @st
17+ %- ?. (syn:si x) neg |=(x=@st x)
18+ (dis abs-mask (abs:si x))
19+++ neg
20+ |= x=@st
21+ ^- @st
22+ (dis mask +((mix mask x)))
23+++ sig
24+ |= x=@st
25+ ^- ?
26+ ?! =(0 (dis sign-mask x))
27+++ abs
28+ |= x=@st
29+ ^- @u
30+ ?. (sig x) `@u`x `@u`(neg x)
31+++ inc
32+ |= x=@st
33+ ^- @st
34+ (dis mask +(x))
35+++ add
36+ |= [x=@st y=@st]
37+ ^- @st
38+ (dis mask (^add x y))
39+++ sub
40+ |= [x=@st y=@st]
41+ ^- @st
42+ (from-s (dif:si (to-s x) (to-s y)))
43+++ mul
44+ |= [x=@st y=@st]
45+ ^- @st
46+ (from-s (pro:si (to-s x) (to-s y)))
47+++ div
48+ |= [x=@st y=@st]
49+ ^- @st
50+ =/ [x=@s y=@s] [(to-s x) (to-s y)]
51+ =/ fra (fra:si x y)
52+ =/ res (from-s fra)
53+ ?: |(=(0 (rem:si x y)) (syn:si fra)) res
54+ (dec res)
55+++ mod
56+ |= [x=@st y=@st]
57+ ^- @st
58+ (sub x (mul (div x y) y))
59+++ mask 0xffff.ffff.ffff.ffff
60+--
61+|%
62+++ abs-mask 0x7fff.ffff.ffff.ffff
63+++ sign-mask 0x8000.0000.0000.0000
64+--
zod/luau/lib/strand.hoon → desk/lib/strand.hoonrenamed

The content is the same.

zod/luau/lib/strandio.hoon → desk/lib/strandio.hoonrenamed+21−1
@@ -197,6 +197,20 @@
197197 `[%done +>.sign-arvo.u.in.tin]
198198 ==
199199::
200+++ take-near
201+ |= =wire
202+ =/ m (strand ,[spar:ames (unit (unit page))])
203+ ^- form:m
204+ |= tin=strand-input:strand
205+ ?+ in.tin `[%skip ~]
206+ ~ `[%wait ~]
207+ ::
208+ [~ %sign * %ames %near ^ *]
209+ ?. =(wire wire.u.in.tin)
210+ `[%skip ~]
211+ `[%done +>.sign-arvo.u.in.tin]
212+ ==
213+::
200214++ take-poke-ack
201215 |= =wire
202216 =/ m (strand ,~)
@@ -335,7 +349,13 @@
335349 |= [=wire =spar:ames]
336350 =/ m (strand ,~)
337351 ^- form:m
338− (send-raw-card %pass wire %arvo %a %keen spar)
352+ (send-raw-card %pass wire %arvo %a %keen ~ spar)
353+::
354+++ keen-shut
355+ |= [=wire =spar:ames]
356+ =/ m (strand ,~)
357+ ^- form:m
358+ (send-raw-card %pass wire %keen & spar)
339359::
340360++ sleep
341361 |= for=@dr
zod/luau/mar/atom.hoon → desk/mar/atom.hoonrenamed

The content is the same.

zod/luau/mar/bill.hoon → desk/mar/bill.hoonrenamed

The content is the same.

zod/luau/mar/docket-0.hoon → desk/mar/docket-0.hoonrenamed

The content is the same.

zod/luau/mar/hoon.hoon → desk/mar/hoon.hoonrenamed

The content is the same.

zod/luau/mar/kelvin.hoon → desk/mar/kelvin.hoonrenamed

The content is the same.

zod/luau/mar/lua.hoon → desk/mar/lua.hoonrenamed

The content is the same.

zod/luau/mar/mime.hoon → desk/mar/mime.hoonrenamed

The content is the same.

zod/luau/mar/noun.hoon → desk/mar/noun.hoonrenamed

The content is the same.

zod/luau/mar/ship.hoon → desk/mar/ship.hoonrenamed

The content is the same.

zod/luau/mar/txt.hoon → desk/mar/txt.hoonrenamed

The content is the same.

zod/luau/res/lua/all.lua → desk/res/lua/all.luarenamed

The content is the same.

zod/luau/res/lua/api.lua → desk/res/lua/api.luarenamed

The content is the same.

zod/luau/res/lua/attrib.lua → desk/res/lua/attrib.luarenamed

The content is the same.

desk/res/lua/bar.luanew file+23
@@ -0,0 +1,23 @@
1+assert(010 .. 020 .. -030 == "1020-30")
2+x = - 2 ^ - 3^4
3+
4+x = 1
5+
6+print(_ENV)
7+print(_ENV._ENV)
8+
9+local foo = _ENV
10+
11+-- local x = 8
12+
13+do
14+ _ENV = {x = 2, print = print}
15+ -- local x = 3
16+ print(x)
17+ print(_ENV)
18+end
19+
20+print(_ENV)
21+print(_ENV._ENV)
22+
23+print(foo._ENV)
desk/res/lua/baz.luanew file+6
@@ -0,0 +1,6 @@
1+x = 8
2+
3+local y = x + 3
4+
5+
6+return y / 2
zod/luau/res/lua/big.lua → desk/res/lua/big.luarenamed

The content is the same.

zod/luau/res/lua/bitwise.lua → desk/res/lua/bitwise.luarenamed

The content is the same.

zod/luau/res/lua/bwcoercion.lua → desk/res/lua/bwcoercion.luarenamed

The content is the same.

zod/luau/res/lua/calls.lua → desk/res/lua/calls.luarenamed

The content is the same.

zod/luau/res/lua/closure.lua → desk/res/lua/closure.luarenamed

The content is the same.

zod/luau/res/lua/code.lua → desk/res/lua/code.luarenamed

The content is the same.

zod/luau/res/lua/constructs.lua → desk/res/lua/constructs.luarenamed

The content is the same.

zod/luau/res/lua/coroutine.lua → desk/res/lua/coroutine.luarenamed

The content is the same.

zod/luau/res/lua/cstack.lua → desk/res/lua/cstack.luarenamed

The content is the same.

zod/luau/res/lua/cycled/all.lua → desk/res/lua/cycled/all.luarenamed+43−43
@@ -1,12 +1,12 @@
11local version = "\u{4c}\u{75}\u{61}\u{20}\u{35}\u{2e}\u{34}"
2−if _VERSION ~= version then
2+if (_VERSION ~= version) then
33io.stderr:write("\u{54}\u{68}\u{69}\u{73}\u{20}\u{74}\u{65}\u{73}\u{74}\u{20}\u{73}\u{75}\u{69}\u{74}\u{65}\u{20}\u{69}\u{73}\u{20}\u{66}\u{6f}\u{72}\u{20}",version,"\u{2c}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{66}\u{6f}\u{72}\u{20}",_VERSION,"\u{a}\u{45}\u{78}\u{69}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}")
44return
55end
66_G.ARG=arg
7−_soft=rawget(_G,"\u{5f}\u{73}\u{6f}\u{66}\u{74}") or false
8−_port=rawget(_G,"\u{5f}\u{70}\u{6f}\u{72}\u{74}") or false
9−_nomsg=rawget(_G,"\u{5f}\u{6e}\u{6f}\u{6d}\u{73}\u{67}") or false
7+_soft=(rawget(_G,"\u{5f}\u{73}\u{6f}\u{66}\u{74}") or false)
8+_port=(rawget(_G,"\u{5f}\u{70}\u{6f}\u{72}\u{74}") or false)
9+_nomsg=(rawget(_G,"\u{5f}\u{6e}\u{6f}\u{6d}\u{73}\u{67}") or false)
1010local usertests = rawget(_G,"\u{5f}\u{55}")
1111if usertests then
1212_soft=true
@@ -24,7 +24,7 @@ do
2424local random_x,random_y = math.randomseed()
2525print(string.format("\u{72}\u{61}\u{6e}\u{64}\u{6f}\u{6d}\u{20}\u{73}\u{65}\u{65}\u{64}\u{73}\u{3a}\u{20}\u{25}\u{64}\u{2c}\u{20}\u{25}\u{64}",random_x,random_y))
2626end
27−print("\u{63}\u{75}\u{72}\u{72}\u{65}\u{6e}\u{74}\u{20}\u{70}\u{61}\u{74}\u{68}\u{3a}\u{a}\u{2a}\u{2a}\u{2a}\u{2a}" .. package.path .. "\u{2a}\u{2a}\u{2a}\u{2a}\u{a}")
27+print(("\u{63}\u{75}\u{72}\u{72}\u{65}\u{6e}\u{74}\u{20}\u{70}\u{61}\u{74}\u{68}\u{3a}\u{a}\u{2a}\u{2a}\u{2a}\u{2a}" .. (package.path .. "\u{2a}\u{2a}\u{2a}\u{2a}\u{a}")))
2828local initclock = os.clock()
2929local lastclock = initclock
3030local walltime = os.time()
@@ -32,9 +32,9 @@ local collectgarbage = collectgarbage
3232do
3333local msgs = {}
3434function Message(m)
35−if not _nomsg then
35+if (not _nomsg) then
3636print(m)
37−msgs[# msgs + 1]=string.sub(m,3,- 3)
37+msgs[(# (msgs + 0x1))]=string.sub(m,0x3,(- 0x3))
3838end
3939end
4040assert(os.setlocale("\u{43}"))
@@ -43,31 +43,31 @@ local function F
4343(m)
4444local function round
4545(m)
46−m=m + 0.04999
46+m=(m + 0.04999)
4747return format("\u{25}\u{2e}\u{31}\u{66}",m)
4848end
49−if m < 1000 then
49+if (m < 0x3e8) then
5050return m
5151else
52−m=m / 1000
53−if m < 1000 then
54−return round(m) .. "\u{4b}"
52+m=(m / 0x3e8)
53+if (m < 0x3e8) then
54+return (round(m) .. "\u{4b}")
5555else
56−return round(m / 1000) .. "\u{4d}"
56+return (round((m / 0x3e8)) .. "\u{4d}")
5757end
5858end
5959end
6060local Cstacklevel
6161local showmem
62−if not T then
63−local max = 0
62+if (not T) then
63+local max = 0x0
6464showmem=function ()
65−local m = collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") * 1024
66−max=(m > max) and m or max
65+local m = (collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") * 0x400)
66+max=(((m > max) and m) or max)
6767print(format("\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{2d}\u{2d}\u{20}\u{74}\u{6f}\u{74}\u{61}\u{6c}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}\u{3a}\u{20}\u{25}\u{73}\u{2c}\u{20}\u{6d}\u{61}\u{78}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}\u{3a}\u{20}\u{25}\u{73}\u{20}\u{2d}\u{2d}\u{2d}\u{2d}\u{a}",F(m),F(max)))
6868end
6969Cstacklevel=function ()
70−return 0
70+return 0x0
7171end
7272else
7373showmem=function ()
@@ -75,7 +75,7 @@ T.checkmemory()
7575local total,numblocks,maxmem = T.totalmem()
7676local count = collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}")
7777print(format("\u{a}\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{2d}\u{2d}\u{20}\u{74}\u{6f}\u{74}\u{61}\u{6c}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}\u{3a}\u{20}\u{25}\u{73}\u{20}\u{28}\u{25}\u{2e}\u{30}\u{66}\u{4b}\u{29}\u{2c}\u{20}\u{6d}\u{61}\u{78}\u{20}\u{75}\u{73}\u{65}\u{3a}\u{20}\u{25}\u{73}\u{2c}\u{20}\u{20}\u{62}\u{6c}\u{6f}\u{63}\u{6b}\u{73}\u{3a}\u{20}\u{25}\u{64}\u{a}",F(total),count,F(maxmem),numblocks))
78−print(format("\u{9}\u{28}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{73}\u{3a}\u{20}\u{20}\u{25}\u{64}\u{2c}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{73}\u{3a}\u{20}\u{25}\u{64}\u{2c}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{73}\u{3a}\u{20}\u{25}\u{64}\u{2c}\u{20}" .. "\u{a}\u{9}\u{75}\u{64}\u{61}\u{74}\u{61}\u{3a}\u{20}\u{25}\u{64}\u{2c}\u{20}\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}\u{73}\u{3a}\u{20}\u{25}\u{64}\u{29}",T.totalmem("\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"),T.totalmem("\u{74}\u{61}\u{62}\u{6c}\u{65}"),T.totalmem("\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}"),T.totalmem("\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}"),T.totalmem("\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}")))
78+print(format(("\u{9}\u{28}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{73}\u{3a}\u{20}\u{20}\u{25}\u{64}\u{2c}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{73}\u{3a}\u{20}\u{25}\u{64}\u{2c}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{73}\u{3a}\u{20}\u{25}\u{64}\u{2c}\u{20}" .. "\u{a}\u{9}\u{75}\u{64}\u{61}\u{74}\u{61}\u{3a}\u{20}\u{25}\u{64}\u{2c}\u{20}\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}\u{73}\u{3a}\u{20}\u{25}\u{64}\u{29}"),T.totalmem("\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"),T.totalmem("\u{74}\u{61}\u{62}\u{6c}\u{65}"),T.totalmem("\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}"),T.totalmem("\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}"),T.totalmem("\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}")))
7979end
8080Cstacklevel=function ()
8181local _,_,ncalls = T.stacklevel()
@@ -85,13 +85,13 @@ end
8585local Cstack = Cstacklevel()
8686local function report
8787(n)
88−print("\u{a}\u{2a}\u{2a}\u{2a}\u{2a}\u{2a}\u{20}\u{46}\u{49}\u{4c}\u{45}\u{20}\u{27}" .. n .. "\u{27}\u{2a}\u{2a}\u{2a}\u{2a}\u{2a}")
88+print(("\u{a}\u{2a}\u{2a}\u{2a}\u{2a}\u{2a}\u{20}\u{46}\u{49}\u{4c}\u{45}\u{20}\u{27}" .. (n .. "\u{27}\u{2a}\u{2a}\u{2a}\u{2a}\u{2a}")))
8989end
9090local olddofile = dofile
9191local dofile = function (n,strip)
9292showmem()
9393local c = os.clock()
94−print(string.format("\u{74}\u{69}\u{6d}\u{65}\u{3a}\u{20}\u{25}\u{67}\u{20}\u{28}\u{2b}\u{25}\u{67}\u{29}",c - initclock,c - lastclock))
94+print(string.format("\u{74}\u{69}\u{6d}\u{65}\u{3a}\u{20}\u{25}\u{67}\u{20}\u{28}\u{2b}\u{25}\u{67}\u{29}",(c - initclock),(c - lastclock)))
9595lastclock=c
9696report(n)
9797local f = assert(loadfile(n))
@@ -105,28 +105,28 @@ report("\u{67}\u{63}\u{2e}\u{6c}\u{75}\u{61}")
105105local f = assert(loadfile("\u{67}\u{63}\u{2e}\u{6c}\u{75}\u{61}"))
106106f()
107107dofile("\u{64}\u{62}\u{2e}\u{6c}\u{75}\u{61}")
108−assert(dofile("\u{63}\u{61}\u{6c}\u{6c}\u{73}\u{2e}\u{6c}\u{75}\u{61}") == deep and deep)
108+assert(((dofile("\u{63}\u{61}\u{6c}\u{6c}\u{73}\u{2e}\u{6c}\u{75}\u{61}") == deep) and deep))
109109_G.deep=nil
110110olddofile("\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{73}\u{2e}\u{6c}\u{75}\u{61}")
111111olddofile("\u{6c}\u{69}\u{74}\u{65}\u{72}\u{61}\u{6c}\u{73}\u{2e}\u{6c}\u{75}\u{61}")
112112dofile("\u{74}\u{70}\u{61}\u{63}\u{6b}\u{2e}\u{6c}\u{75}\u{61}")
113−assert(dofile("\u{61}\u{74}\u{74}\u{72}\u{69}\u{62}\u{2e}\u{6c}\u{75}\u{61}") == 27)
113+assert((dofile("\u{61}\u{74}\u{74}\u{72}\u{69}\u{62}\u{2e}\u{6c}\u{75}\u{61}") == 0x1b))
114114dofile("\u{67}\u{65}\u{6e}\u{67}\u{63}\u{2e}\u{6c}\u{75}\u{61}")
115−assert(dofile("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{73}\u{2e}\u{6c}\u{75}\u{61}") == 5)
115+assert((dofile("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{73}\u{2e}\u{6c}\u{75}\u{61}") == 0x5))
116116dofile("\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{72}\u{75}\u{63}\u{74}\u{73}\u{2e}\u{6c}\u{75}\u{61}")
117117dofile("\u{63}\u{6f}\u{64}\u{65}\u{2e}\u{6c}\u{75}\u{61}",true)
118−if not _G._soft then
118+if (not _G._soft) then
119119report("\u{62}\u{69}\u{67}\u{2e}\u{6c}\u{75}\u{61}")
120120local f = coroutine.wrap(assert(loadfile("\u{62}\u{69}\u{67}\u{2e}\u{6c}\u{75}\u{61}")))
121−assert(f() == "\u{62}")
122−assert(f() == "\u{61}")
121+assert((f() == "\u{62}"))
122+assert((f() == "\u{61}"))
123123end
124124dofile("\u{63}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{2e}\u{6c}\u{75}\u{61}")
125125dofile("\u{6e}\u{65}\u{78}\u{74}\u{76}\u{61}\u{72}\u{2e}\u{6c}\u{75}\u{61}")
126126dofile("\u{70}\u{6d}\u{2e}\u{6c}\u{75}\u{61}")
127127dofile("\u{75}\u{74}\u{66}\u{38}\u{2e}\u{6c}\u{75}\u{61}")
128128dofile("\u{61}\u{70}\u{69}\u{2e}\u{6c}\u{75}\u{61}")
129−assert(dofile("\u{65}\u{76}\u{65}\u{6e}\u{74}\u{73}\u{2e}\u{6c}\u{75}\u{61}") == 12)
129+assert((dofile("\u{65}\u{76}\u{65}\u{6e}\u{74}\u{73}\u{2e}\u{6c}\u{75}\u{61}") == 0xc))
130130dofile("\u{76}\u{61}\u{72}\u{61}\u{72}\u{67}\u{2e}\u{6c}\u{75}\u{61}")
131131dofile("\u{63}\u{6c}\u{6f}\u{73}\u{75}\u{72}\u{65}\u{2e}\u{6c}\u{75}\u{61}")
132132dofile("\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{2e}\u{6c}\u{75}\u{61}")
@@ -135,11 +135,11 @@ dofile("\u{65}\u{72}\u{72}\u{6f}\u{72}\u{73}\u{2e}\u{6c}\u{75}\u{61}")
135135dofile("\u{6d}\u{61}\u{74}\u{68}\u{2e}\u{6c}\u{75}\u{61}")
136136dofile("\u{73}\u{6f}\u{72}\u{74}\u{2e}\u{6c}\u{75}\u{61}",true)
137137dofile("\u{62}\u{69}\u{74}\u{77}\u{69}\u{73}\u{65}\u{2e}\u{6c}\u{75}\u{61}")
138−assert(dofile("\u{76}\u{65}\u{72}\u{79}\u{62}\u{69}\u{67}\u{2e}\u{6c}\u{75}\u{61}",true) == 10)
138+assert((dofile("\u{76}\u{65}\u{72}\u{79}\u{62}\u{69}\u{67}\u{2e}\u{6c}\u{75}\u{61}",true) == 0xa))
139139;
140140collectgarbage()
141141dofile("\u{66}\u{69}\u{6c}\u{65}\u{73}\u{2e}\u{6c}\u{75}\u{61}")
142−if # msgs > 0 then
142+if (# (msgs > 0x0)) then
143143local m = table.concat(msgs,"\u{a}\u{20}\u{20}")
144144warn("\u{23}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{70}\u{65}\u{72}\u{66}\u{6f}\u{72}\u{6d}\u{65}\u{64}\u{3a}\u{a}\u{20}\u{20}",m,"\u{a}")
145145end
@@ -151,19 +151,19 @@ warn("\u{2a}\u{2a}\u{2a}\u{2a}\u{2a}\u{2a}\u{2a}\u{2a}\u{20}\u{54}\u{48}\u{49}\u
151151warn("\u{2a}\u{2a}\u{2a}\u{2a}\u{2a}\u{2a}\u{2a}\u{2a}\u{20}\u{54}\u{48}\u{49}\u{53}\u{20}\u{57}\u{41}\u{52}\u{4e}\u{49}\u{4e}\u{47}\u{20}\u{41}\u{4c}\u{53}\u{4f}\u{20}\u{53}\u{48}\u{4f}\u{55}\u{4c}\u{44}\u{20}\u{4e}\u{4f}\u{54}\u{20}\u{41}\u{50}\u{50}\u{45}\u{41}\u{52}\u{20}\u{2a}\u{2a}\u{2a}\u{2a}\u{2a}\u{2a}\u{2a}\u{2a}\u{2a}\u{2a}")
152152warn("\u{40}\u{6f}\u{6e}")
153153warn("\u{23}\u{54}\u{68}\u{69}\u{73}\u{20}\u{69}\u{73}","\u{20}\u{61}\u{6e}\u{6f}\u{74}\u{68}\u{65}\u{72}\u{20}\u{6f}\u{6e}\u{65}")
154−assert(debug == nil)
154+assert((debug == nil))
155155local debug = require("\u{64}\u{65}\u{62}\u{75}\u{67}")
156−print(string.format("\u{25}\u{64}\u{2d}\u{62}\u{69}\u{74}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}\u{73}\u{2c}\u{20}\u{25}\u{64}\u{2d}\u{62}\u{69}\u{74}\u{20}\u{66}\u{6c}\u{6f}\u{61}\u{74}\u{73}",string.packsize("\u{6a}") * 8,string.packsize("\u{6e}") * 8))
156+print(string.format("\u{25}\u{64}\u{2d}\u{62}\u{69}\u{74}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}\u{73}\u{2c}\u{20}\u{25}\u{64}\u{2d}\u{62}\u{69}\u{74}\u{20}\u{66}\u{6c}\u{6f}\u{61}\u{74}\u{73}",(string.packsize("\u{6a}") * 0x8),(string.packsize("\u{6e}") * 0x8)))
157157debug.sethook(function (a)
158−assert(type(a) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")
158+assert((type(a) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"))
159159end,"\u{63}\u{72}")
160160_G.showmem=showmem
161−assert(Cstack == Cstacklevel(),"\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{62}\u{65}\u{20}\u{61}\u{74}\u{20}\u{74}\u{68}\u{65}\u{20}\u{73}\u{61}\u{6d}\u{65}\u{20}\u{43}\u{2d}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6c}\u{65}\u{76}\u{65}\u{6c}\u{20}\u{69}\u{74}\u{20}\u{77}\u{61}\u{73}\u{20}\u{77}\u{68}\u{65}\u{6e}\u{20}\u{73}\u{74}\u{61}\u{72}\u{74}\u{65}\u{64}\u{20}\u{74}\u{68}\u{65}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}")
161+assert((Cstack == Cstacklevel()),"\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{62}\u{65}\u{20}\u{61}\u{74}\u{20}\u{74}\u{68}\u{65}\u{20}\u{73}\u{61}\u{6d}\u{65}\u{20}\u{43}\u{2d}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6c}\u{65}\u{76}\u{65}\u{6c}\u{20}\u{69}\u{74}\u{20}\u{77}\u{61}\u{73}\u{20}\u{77}\u{68}\u{65}\u{6e}\u{20}\u{73}\u{74}\u{61}\u{72}\u{74}\u{65}\u{64}\u{20}\u{74}\u{68}\u{65}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}")
162162end
163163local _G,showmem,print,format,clock,time,difftime,assert,open,warn = _G,showmem,print,string.format,os.clock,os.time,os.difftime,assert,io.open,warn
164−local fname = T and "\u{74}\u{69}\u{6d}\u{65}\u{2d}\u{64}\u{65}\u{62}\u{75}\u{67}\u{2e}\u{74}\u{78}\u{74}" or "\u{74}\u{69}\u{6d}\u{65}\u{2e}\u{74}\u{78}\u{74}"
164+local fname = ((T and "\u{74}\u{69}\u{6d}\u{65}\u{2d}\u{64}\u{65}\u{62}\u{75}\u{67}\u{2e}\u{74}\u{78}\u{74}") or "\u{74}\u{69}\u{6d}\u{65}\u{2e}\u{74}\u{78}\u{74}")
165165local lasttime
166−if not usertests then
166+if (not usertests) then
167167local f = io.open(fname)
168168if f then
169169lasttime=assert(tonumber(f:read("\u{61}")))
@@ -176,7 +176,7 @@ end
176176print("\u{63}\u{6c}\u{65}\u{61}\u{6e}\u{69}\u{6e}\u{67}\u{20}\u{61}\u{6c}\u{6c}\u{21}\u{21}\u{21}\u{21}")
177177for n in pairs(_G)
178178do
179−if not ({["\u{5f}\u{5f}\u{5f}\u{47}\u{6c}\u{6f}\u{62}"] = 1,["\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"] = 1})[n] then
179+if (not ({["\u{5f}\u{5f}\u{5f}\u{47}\u{6c}\u{6f}\u{62}"] = 0x1,["\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"] = 0x1})[n]) then
180180_G[n]=undef
181181end
182182end
@@ -188,15 +188,15 @@ collectgarbage()
188188collectgarbage()
189189;
190190showmem()
191−local clocktime = clock() - initclock
191+local clocktime = (clock() - initclock)
192192walltime=difftime(time(),walltime)
193193print(format("\u{a}\u{a}\u{74}\u{6f}\u{74}\u{61}\u{6c}\u{20}\u{74}\u{69}\u{6d}\u{65}\u{3a}\u{20}\u{25}\u{2e}\u{32}\u{66}\u{73}\u{20}\u{28}\u{77}\u{61}\u{6c}\u{6c}\u{20}\u{74}\u{69}\u{6d}\u{65}\u{3a}\u{20}\u{25}\u{67}\u{73}\u{29}\u{a}",clocktime,walltime))
194−if not usertests then
195−lasttime=lasttime or clocktime
196−local diff = (clocktime - lasttime) / lasttime
194+if (not usertests) then
195+lasttime=(lasttime or clocktime)
196+local diff = ((clocktime - lasttime) / lasttime)
197197local tolerance = 0.05
198−if (diff >= tolerance or diff <= - tolerance) then
199−warn(format("\u{23}\u{74}\u{69}\u{6d}\u{65}\u{20}\u{64}\u{69}\u{66}\u{66}\u{65}\u{72}\u{65}\u{6e}\u{63}\u{65}\u{20}\u{66}\u{72}\u{6f}\u{6d}\u{20}\u{70}\u{72}\u{65}\u{76}\u{69}\u{6f}\u{75}\u{73}\u{20}\u{74}\u{65}\u{73}\u{74}\u{3a}\u{20}\u{25}\u{2b}\u{2e}\u{31}\u{66}\u{25}\u{25}",diff * 100))
198+if ((diff >= tolerance) or (diff <= (- tolerance))) then
199+warn(format("\u{23}\u{74}\u{69}\u{6d}\u{65}\u{20}\u{64}\u{69}\u{66}\u{66}\u{65}\u{72}\u{65}\u{6e}\u{63}\u{65}\u{20}\u{66}\u{72}\u{6f}\u{6d}\u{20}\u{70}\u{72}\u{65}\u{76}\u{69}\u{6f}\u{75}\u{73}\u{20}\u{74}\u{65}\u{73}\u{74}\u{3a}\u{20}\u{25}\u{2b}\u{2e}\u{31}\u{66}\u{25}\u{25}",(diff * 0x64)))
200200end
201201assert(open(fname,"\u{77}")):write(clocktime):close()
202202end
zod/luau/res/lua/cycled/api.lua → desk/res/lua/cycled/api.luarenamed+487−487
@@ -1,4 +1,4 @@
1−if T == nil then
1+if (T == nil) then
22(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{41}\u{50}\u{49}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
33return
44end
@@ -7,338 +7,338 @@ local pack = table.pack
77local MEMERRMSG = "\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}"
88local function tcheck
99(t1,t2)
10−assert(t1.n == (t2.n or # t2) + 1)
11−for i = 2, t1.n
10+assert((t1.n == ((t2.n or (# t2)) + 0x1)))
11+for i = 0x2, t1.n
1212do
13−assert(t1[i] == t2[i - 1])
13+assert((t1[i] == t2[(i - 0x1)]))
1414end
1515end
1616local function checkerr
1717(msg,f, ...)
1818local stat,err = pcall(f,...)
19−assert(not stat and string.find(err,msg))
19+assert((not (stat and string.find(err,msg))))
2020end
2121print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{43}\u{20}\u{41}\u{50}\u{49}")
2222local a = T.testC("\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{52}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}")
23−assert(a == debug.getregistry())
24−assert(T.testC("\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{61}\u{62}\u{73}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 10)
25−assert(T.testC("\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{35}\u{3b}\u{20}\u{61}\u{62}\u{73}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}\u{2d}\u{35}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 1)
26−assert(T.testC("\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{61}\u{62}\u{73}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 1)
27−assert(T.testC("\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{61}\u{62}\u{73}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}\u{52}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") < - 10)
23+assert((a == debug.getregistry()))
24+assert((T.testC("\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{61}\u{62}\u{73}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 0xa))
25+assert((T.testC("\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{35}\u{3b}\u{20}\u{61}\u{62}\u{73}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}\u{2d}\u{35}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 0x1))
26+assert((T.testC("\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{61}\u{62}\u{73}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 0x1))
27+assert((T.testC("\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{61}\u{62}\u{73}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}\u{52}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") < (- 0xa)))
2828a=T.d2s(12458954321123.0)
29−assert(a == string.pack("\u{64}",12458954321123.0))
30−assert(T.s2d(a) == 12458954321123.0)
29+assert((a == string.pack("\u{64}",12458954321123.0)))
30+assert((T.s2d(a) == 12458954321123.0))
3131local a,b,c = T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}")
32−assert(a == 2 and b == 3 and not c)
32+assert((((a == 0x2) and (b == 0x3)) and (not c)))
3333local f = T.makeCfunc("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}")
3434a,b,c=f()
35−assert(a == 2 and b == 3 and not c)
35+assert((((a == 0x2) and (b == 0x3)) and (not c)))
3636a,b,c=T.testC("\u{70}\u{75}\u{73}\u{68}\u{62}\u{6f}\u{6f}\u{6c}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{62}\u{6f}\u{6f}\u{6c}\u{20}\u{32}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{62}\u{6f}\u{6f}\u{6c}\u{20}\u{30}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}")
37−assert(a == b and a == true and c == false)
37+assert((((a == b) and (a == true)) and (c == false)))
3838a,b,c=T.testC("\u{70}\u{75}\u{73}\u{68}\u{62}\u{6f}\u{6f}\u{6c}\u{20}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{62}\u{6f}\u{6f}\u{6c}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{69}\u{6c}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{62}\u{6f}\u{6f}\u{6c}\u{20}\u{2d}\u{33}\u{3b}\u{20}\u{74}\u{6f}\u{62}\u{6f}\u{6f}\u{6c}\u{20}\u{2d}\u{33}\u{3b}\u{20}\u{74}\u{6f}\u{62}\u{6f}\u{6f}\u{6c}\u{20}\u{2d}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}")
39−assert(a == false and b == true and c == false)
40−a,b,c=T.testC("\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",10,20,30,40)
41−assert(a == 40 and b == 5 and not c)
42−local t = pack(T.testC("\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{35}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",2,3))
43−tcheck(t,{["\u{6e}"] = 4,2,3})
44−t=pack(T.testC("\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{30}\u{3b}\u{20}\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{31}\u{35}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{30}",3,1,23))
45−assert(t.n == 10 and t[1] == nil and t[10] == nil)
46−t=pack(T.testC("\u{72}\u{65}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{2d}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",2,3,4))
47−tcheck(t,{["\u{6e}"] = 2,2,4})
48−t=pack(T.testC("\u{69}\u{6e}\u{73}\u{65}\u{72}\u{74}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",2,3))
49−tcheck(t,{["\u{6e}"] = 2,2,3})
50−t=pack(T.testC("\u{69}\u{6e}\u{73}\u{65}\u{72}\u{74}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",2,3,4,5))
51−tcheck(t,{["\u{6e}"] = 4,2,5,3,4})
52−t=pack(T.testC("\u{72}\u{65}\u{70}\u{6c}\u{61}\u{63}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",2,3,4,5))
53−tcheck(t,{["\u{6e}"] = 3,5,3,4})
54−t=pack(T.testC("\u{72}\u{65}\u{70}\u{6c}\u{61}\u{63}\u{65}\u{20}\u{2d}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",2,3,4,5))
55−tcheck(t,{["\u{6e}"] = 3,2,3,5})
56−t=pack(T.testC("\u{72}\u{65}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",2,3,4,5))
57−tcheck(t,{["\u{6e}"] = 3,2,4,5})
58−t=pack(T.testC("\u{63}\u{6f}\u{70}\u{79}\u{20}\u{33}\u{20}\u{34}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",2,3,4,5))
59−tcheck(t,{["\u{6e}"] = 4,2,3,3,5})
60−t=pack(T.testC("\u{63}\u{6f}\u{70}\u{79}\u{20}\u{2d}\u{33}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",2,3,4,5))
61−tcheck(t,{["\u{6e}"] = 4,2,3,4,3})
39+assert((((a == false) and (b == true)) and (c == false)))
40+a,b,c=T.testC("\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",0xa,0x14,0x1e,0x28)
41+assert((((a == 0x28) and (b == 0x5)) and (not c)))
42+local t = pack(T.testC("\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{35}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",0x2,0x3))
43+tcheck(t,{["\u{6e}"] = 0x4,0x2,0x3})
44+t=pack(T.testC("\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{30}\u{3b}\u{20}\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{31}\u{35}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{30}",0x3,0x1,0x17))
45+assert((((t.n == 0xa) and (t[0x1] == nil)) and (t[0xa] == nil)))
46+t=pack(T.testC("\u{72}\u{65}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{2d}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",0x2,0x3,0x4))
47+tcheck(t,{["\u{6e}"] = 0x2,0x2,0x4})
48+t=pack(T.testC("\u{69}\u{6e}\u{73}\u{65}\u{72}\u{74}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",0x2,0x3))
49+tcheck(t,{["\u{6e}"] = 0x2,0x2,0x3})
50+t=pack(T.testC("\u{69}\u{6e}\u{73}\u{65}\u{72}\u{74}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",0x2,0x3,0x4,0x5))
51+tcheck(t,{["\u{6e}"] = 0x4,0x2,0x5,0x3,0x4})
52+t=pack(T.testC("\u{72}\u{65}\u{70}\u{6c}\u{61}\u{63}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",0x2,0x3,0x4,0x5))
53+tcheck(t,{["\u{6e}"] = 0x3,0x5,0x3,0x4})
54+t=pack(T.testC("\u{72}\u{65}\u{70}\u{6c}\u{61}\u{63}\u{65}\u{20}\u{2d}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",0x2,0x3,0x4,0x5))
55+tcheck(t,{["\u{6e}"] = 0x3,0x2,0x3,0x5})
56+t=pack(T.testC("\u{72}\u{65}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",0x2,0x3,0x4,0x5))
57+tcheck(t,{["\u{6e}"] = 0x3,0x2,0x4,0x5})
58+t=pack(T.testC("\u{63}\u{6f}\u{70}\u{79}\u{20}\u{33}\u{20}\u{34}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",0x2,0x3,0x4,0x5))
59+tcheck(t,{["\u{6e}"] = 0x4,0x2,0x3,0x3,0x5})
60+t=pack(T.testC("\u{63}\u{6f}\u{70}\u{79}\u{20}\u{2d}\u{33}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",0x2,0x3,0x4,0x5))
61+tcheck(t,{["\u{6e}"] = 0x4,0x2,0x3,0x4,0x3})
6262do
63−local t = {10,20,30,40,50,60}
64−for i = - 6, 6
63+local t = {0xa,0x14,0x1e,0x28,0x32,0x3c}
64+for i = (- 0x6), 0x6
6565do
6666local s = string.format("\u{72}\u{6f}\u{74}\u{61}\u{74}\u{65}\u{20}\u{32}\u{20}\u{25}\u{64}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{37}",i)
67−local t1 = pack(T.testC(s,10,20,30,40,50,60))
67+local t1 = pack(T.testC(s,0xa,0x14,0x1e,0x28,0x32,0x3c))
6868tcheck(t1,t)
69−table.insert(t,1,table.remove(t))
70−end
71−t=pack(T.testC("\u{72}\u{6f}\u{74}\u{61}\u{74}\u{65}\u{20}\u{2d}\u{32}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",10,20,30,40))
72−tcheck(t,{10,20,40,30})
73−t=pack(T.testC("\u{72}\u{6f}\u{74}\u{61}\u{74}\u{65}\u{20}\u{2d}\u{32}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",10,20,30,40))
74−tcheck(t,{10,20,40,30})
75−t=pack(T.testC("\u{72}\u{6f}\u{74}\u{61}\u{74}\u{65}\u{20}\u{2d}\u{31}\u{20}\u{30}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",10,20,30,40))
76−tcheck(t,{10,20,30,40})
77−t=pack(T.testC("\u{72}\u{6f}\u{74}\u{61}\u{74}\u{65}\u{20}\u{2d}\u{31}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",10,20,30,40))
78−tcheck(t,{10,20,30,40})
79−t=pack(T.testC("\u{72}\u{6f}\u{74}\u{61}\u{74}\u{65}\u{20}\u{35}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",10,20,30,40))
80−tcheck(t,{10,20,30,40})
69+table.insert(t,0x1,table.remove(t))
70+end
71+t=pack(T.testC("\u{72}\u{6f}\u{74}\u{61}\u{74}\u{65}\u{20}\u{2d}\u{32}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",0xa,0x14,0x1e,0x28))
72+tcheck(t,{0xa,0x14,0x28,0x1e})
73+t=pack(T.testC("\u{72}\u{6f}\u{74}\u{61}\u{74}\u{65}\u{20}\u{2d}\u{32}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",0xa,0x14,0x1e,0x28))
74+tcheck(t,{0xa,0x14,0x28,0x1e})
75+t=pack(T.testC("\u{72}\u{6f}\u{74}\u{61}\u{74}\u{65}\u{20}\u{2d}\u{31}\u{20}\u{30}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",0xa,0x14,0x1e,0x28))
76+tcheck(t,{0xa,0x14,0x1e,0x28})
77+t=pack(T.testC("\u{72}\u{6f}\u{74}\u{61}\u{74}\u{65}\u{20}\u{2d}\u{31}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",0xa,0x14,0x1e,0x28))
78+tcheck(t,{0xa,0x14,0x1e,0x28})
79+t=pack(T.testC("\u{72}\u{6f}\u{74}\u{61}\u{74}\u{65}\u{20}\u{35}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",0xa,0x14,0x1e,0x28))
80+tcheck(t,{0xa,0x14,0x1e,0x28})
8181end
8282T.testC("\u{20}\u{20}\u{77}\u{61}\u{72}\u{6e}\u{69}\u{6e}\u{67}\u{43}\u{20}\u{22}\u{23}\u{54}\u{68}\u{69}\u{73}\u{20}\u{73}\u{68}\u{6f}\u{6c}\u{64}\u{20}\u{62}\u{65}\u{20}\u{61}\u{22}\u{a}\u{20}\u{20}\u{77}\u{61}\u{72}\u{6e}\u{69}\u{6e}\u{67}\u{43}\u{20}\u{22}\u{20}\u{73}\u{69}\u{6e}\u{67}\u{6c}\u{65}\u{20}\u{22}\u{a}\u{20}\u{20}\u{77}\u{61}\u{72}\u{6e}\u{69}\u{6e}\u{67}\u{20}\u{22}\u{77}\u{61}\u{72}\u{6e}\u{69}\u{6e}\u{67}\u{22}\u{a}\u{20}\u{20}\u{77}\u{61}\u{72}\u{6e}\u{69}\u{6e}\u{67}\u{43}\u{20}\u{22}\u{23}\u{54}\u{68}\u{69}\u{73}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{62}\u{65}\u{20}\u{22}\u{a}\u{20}\u{20}\u{77}\u{61}\u{72}\u{6e}\u{69}\u{6e}\u{67}\u{20}\u{22}\u{61}\u{6e}\u{6f}\u{74}\u{68}\u{65}\u{72}\u{20}\u{6f}\u{6e}\u{65}\u{22}\u{a}")
8383do
8484local f = T.makeCfunc("\u{20}\u{20}\u{20}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{62}\u{6f}\u{6c}\u{61}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{31}\u{20}\u{31}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{27}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{27}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{67}\u{69}\u{76}\u{65}\u{6e}\u{20}\u{68}\u{61}\u{6e}\u{64}\u{6c}\u{65}\u{72}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{61}\u{74}\u{75}\u{73}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{6d}\u{65}\u{73}\u{73}\u{61}\u{67}\u{65}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{73}\u{74}\u{61}\u{74}\u{75}\u{73}\u{a}\u{20}\u{20}")
8585local msg,st = f(string.upper)
86−assert(st == "\u{45}\u{52}\u{52}\u{52}\u{55}\u{4e}" and msg == "\u{42}\u{4f}\u{4c}\u{41}")
86+assert(((st == "\u{45}\u{52}\u{52}\u{52}\u{55}\u{4e}") and (msg == "\u{42}\u{4f}\u{4c}\u{41}")))
8787local msg,st = f(string.len)
88−assert(st == "\u{45}\u{52}\u{52}\u{52}\u{55}\u{4e}" and msg == 4)
88+assert(((st == "\u{45}\u{52}\u{52}\u{52}\u{55}\u{4e}") and (msg == 0x4)))
8989end
90−t=pack(T.testC("\u{69}\u{6e}\u{73}\u{65}\u{72}\u{74}\u{20}\u{33}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{33}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{69}\u{6e}\u{73}\u{65}\u{72}\u{74}\u{20}\u{32}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{31}\u{3b}\u{20}\u{69}\u{6e}\u{73}\u{65}\u{72}\u{74}\u{20}\u{31}\u{3b}\u{20}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{69}\u{6e}\u{73}\u{65}\u{72}\u{74}\u{20}\u{2d}\u{32}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{2d}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{2d}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",2,3,4,5,10,40,90))
91−tcheck(t,{["\u{6e}"] = 7,2,3,4,5,10,40,90})
92−t=pack(T.testC("\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}\u{20}\u{35}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}","\u{61}\u{6c}\u{6f}",2,3,"\u{6a}\u{6f}\u{61}\u{6f}",12))
93−tcheck(t,{["\u{6e}"] = 1,"\u{61}\u{6c}\u{6f}\u{32}\u{33}\u{6a}\u{6f}\u{61}\u{6f}\u{31}\u{32}"})
90+t=pack(T.testC("\u{69}\u{6e}\u{73}\u{65}\u{72}\u{74}\u{20}\u{33}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{33}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{69}\u{6e}\u{73}\u{65}\u{72}\u{74}\u{20}\u{32}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{31}\u{3b}\u{20}\u{69}\u{6e}\u{73}\u{65}\u{72}\u{74}\u{20}\u{31}\u{3b}\u{20}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{69}\u{6e}\u{73}\u{65}\u{72}\u{74}\u{20}\u{2d}\u{32}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{2d}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{2d}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",0x2,0x3,0x4,0x5,0xa,0x28,0x5a))
91+tcheck(t,{["\u{6e}"] = 0x7,0x2,0x3,0x4,0x5,0xa,0x28,0x5a})
92+t=pack(T.testC("\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}\u{20}\u{35}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}","\u{61}\u{6c}\u{6f}",0x2,0x3,"\u{6a}\u{6f}\u{61}\u{6f}",0xc))
93+tcheck(t,{["\u{6e}"] = 0x1,"\u{61}\u{6c}\u{6f}\u{32}\u{33}\u{6a}\u{6f}\u{61}\u{6f}\u{31}\u{32}"})
9494t=pack(T.testC("\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{32}\u{2c}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",function (a,b)
95−return 1,2,3,4,a,b
95+return 0x1,0x2,0x3,0x4,a,b
9696end,"\u{61}\u{6c}\u{6f}","\u{6a}\u{6f}\u{61}\u{6f}"))
97−tcheck(t,{["\u{6e}"] = 6,1,2,3,4,"\u{61}\u{6c}\u{6f}","\u{6a}\u{6f}\u{61}\u{6f}"})
97+tcheck(t,{["\u{6e}"] = 0x6,0x1,0x2,0x3,0x4,"\u{61}\u{6c}\u{6f}","\u{6a}\u{6f}\u{61}\u{6f}"})
9898do
9999local a = {}
100−for i = 1, 1000
100+for i = 0x1, 0x3e8
101101do
102102a[i]=true
103103end
104104;
105−a[999]=10
105+a[0x3e7]=0xa
106106local b = T.testC("\u{70}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{31}\u{20}\u{2d}\u{31}\u{20}\u{30}\u{3b}\u{20}\u{70}\u{6f}\u{70}\u{20}\u{31}\u{3b}\u{20}\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",table.unpack,a)
107−assert(b == "\u{31}\u{30}")
107+assert((b == "\u{31}\u{30}"))
108108end
109−_G.AA=14
109+_G.AA=0xe
110110;
111111_G.BB="\u{61}\u{33}\u{31}"
112112local a = {T.testC("\u{20}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{41}\u{41}\u{3b}\u{a}\u{20}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{42}\u{42}\u{3b}\u{a}\u{20}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{42}\u{42}\u{3b}\u{a}\u{20}\u{20}\u{73}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{41}\u{41}\u{3b}\u{a}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}\u{a}")}
113−assert(a[2] == 14 and a[3] == "\u{61}\u{33}\u{31}" and a[4] == nil and _G.AA == "\u{61}\u{33}\u{31}")
113+assert(((((a[0x2] == 0xe) and (a[0x3] == "\u{61}\u{33}\u{31}")) and (a[0x4] == nil)) and (_G.AA == "\u{61}\u{33}\u{31}")))
114114_G.AA,_G.BB=nil
115−assert(T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2f}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 0.5)
116−assert(T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2d}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == - 10)
117−assert(T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{2d}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2a}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == - 200)
118−assert(T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{33}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{5e}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 1000)
119−assert(T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2f}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 0.5)
120−assert(T.testC("\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2d}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == - 10)
121−assert(T.testC("\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{2d}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2a}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == - 200)
122−assert(T.testC("\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{33}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{5e}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 1000)
123−assert(T.testC("\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2f}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",2,0) == 10.0 / 0)
115+assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2f}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 0.5))
116+assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2d}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == (- 0xa)))
117+assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{2d}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2a}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == (- 0xc8)))
118+assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{33}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{5e}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 0x3e8))
119+assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2f}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 0.5))
120+assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2d}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == (- 0xa)))
121+assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{2d}\u{32}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2a}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == (- 0xc8)))
122+assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{33}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{5e}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == 0x3e8))
123+assert((T.testC("\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2f}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",0x2,0x0) == (10.0 / 0x0)))
124124a=T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{33}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{5c}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}")
125−assert(a == 3.0 and math.type(a) == "\u{66}\u{6c}\u{6f}\u{61}\u{74}")
125+assert(((a == 3.0) and (math.type(a) == "\u{66}\u{6c}\u{6f}\u{61}\u{74}")))
126126a=T.testC("\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{33}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{5c}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}")
127−assert(a == 3 and math.type(a) == "\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}")
127+assert(((a == 0x3) and (math.type(a) == "\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}")))
128128a=assert(T.testC("\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{33}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2b}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"))
129−assert(a == 13 and math.type(a) == "\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}")
129+assert(((a == 0xd) and (math.type(a) == "\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}")))
130130a=assert(T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{33}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2b}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"))
131−assert(a == 13 and math.type(a) == "\u{66}\u{6c}\u{6f}\u{61}\u{74}")
131+assert(((a == 0xd) and (math.type(a) == "\u{66}\u{6c}\u{6f}\u{61}\u{74}")))
132132a,b,c=T.testC("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{5f}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{35}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}")
133−assert(a == 1 and b == - 10 and c == "\u{35}")
133+assert(((a == 0x1) and (b == (- (0xa and (c == "\u{35}"))))))
134134local mt = {["\u{5f}\u{5f}\u{61}\u{64}\u{64}"] = function (a,b)
135−return setmetatable({a[1] + b[1]},mt)
135+return setmetatable({(a[0x1] + b[0x1])},mt)
136136end,["\u{5f}\u{5f}\u{6d}\u{6f}\u{64}"] = function (a,b)
137−return setmetatable({a[1] % b[1]},mt)
137+return setmetatable({(a[0x1] % b[0x1])},mt)
138138end,["\u{5f}\u{5f}\u{75}\u{6e}\u{6d}"] = function (a)
139−return setmetatable({a[1] * 2},mt)
139+return setmetatable({(a[0x1] * 0x2)},mt)
140140end}
141−a,b,c=setmetatable({4},mt),setmetatable({8},mt),setmetatable({- 3},mt)
142−local x,y,z = T.testC("\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2b}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",10,a,b)
143−assert(x == 10 and y[1] == 12 and z == nil)
144−assert(T.testC("\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{25}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",a,c)[1] == 4 % - 3)
145−assert(T.testC("\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{5f}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2b}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{25}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",b,a,c)[1] == 8 % (4 + (- 3) * 2))
146−checkerr("\u{64}\u{69}\u{76}\u{69}\u{64}\u{65}\u{20}\u{62}\u{79}\u{20}\u{7a}\u{65}\u{72}\u{6f}",T.testC,"\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{5c}",10,0)
147−checkerr("\u{25}\u{25}\u{30}",T.testC,"\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{25}",10,0)
148−assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{32}\u{20}\u{35}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",3,2,2,4,2,2))
149−assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{45}\u{20}\u{32}\u{20}\u{35}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",3,2,2,4,2,2))
150−assert(not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{33}\u{20}\u{34}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",3,2,2,4,2,2))
151−assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{45}\u{20}\u{33}\u{20}\u{34}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",3,2,2,4,2,2))
152−assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{35}\u{20}\u{32}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",4,2,2,3,2,2))
153−assert(not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{32}\u{20}\u{2d}\u{33}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}","\u{34}","\u{32}","\u{32}","\u{33}","\u{32}","\u{32}"))
154−assert(not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{2d}\u{33}\u{20}\u{32}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}","\u{33}","\u{32}","\u{32}","\u{34}","\u{32}","\u{32}"))
155−assert(not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{31}\u{20}\u{34}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"))
156−assert(not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{45}\u{20}\u{39}\u{20}\u{31}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"))
157−assert(not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{39}\u{20}\u{39}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"))
141+a,b,c=setmetatable({0x4},mt),setmetatable({0x8},mt),setmetatable({(- 0x3)},mt)
142+local x,y,z = T.testC("\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2b}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",0xa,a,b)
143+assert((((x == 0xa) and (y[0x1] == 0xc)) and (z == nil)))
144+assert((T.testC("\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{25}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",a,c)[0x1] == (0x4 % (- 0x3))))
145+assert((T.testC("\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{5f}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{2b}\u{3b}\u{20}\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{25}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",b,a,c)[0x1] == (0x8 % (0x4 + ((- 0x3) * 0x2)))))
146+checkerr("\u{64}\u{69}\u{76}\u{69}\u{64}\u{65}\u{20}\u{62}\u{79}\u{20}\u{7a}\u{65}\u{72}\u{6f}",T.testC,"\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{5c}",0xa,0x0)
147+checkerr("\u{25}\u{25}\u{30}",T.testC,"\u{61}\u{72}\u{69}\u{74}\u{68}\u{20}\u{25}",0xa,0x0)
148+assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{32}\u{20}\u{35}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",0x3,0x2,0x2,0x4,0x2,0x2))
149+assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{45}\u{20}\u{32}\u{20}\u{35}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",0x3,0x2,0x2,0x4,0x2,0x2))
150+assert((not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{33}\u{20}\u{34}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",0x3,0x2,0x2,0x4,0x2,0x2)))
151+assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{45}\u{20}\u{33}\u{20}\u{34}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",0x3,0x2,0x2,0x4,0x2,0x2))
152+assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{35}\u{20}\u{32}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",0x4,0x2,0x2,0x3,0x2,0x2))
153+assert((not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{32}\u{20}\u{2d}\u{33}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}","\u{34}","\u{32}","\u{32}","\u{33}","\u{32}","\u{32}")))
154+assert((not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{2d}\u{33}\u{20}\u{32}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}","\u{33}","\u{32}","\u{32}","\u{34}","\u{32}","\u{32}")))
155+assert((not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{31}\u{20}\u{34}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}")))
156+assert((not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{45}\u{20}\u{39}\u{20}\u{31}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}")))
157+assert((not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{39}\u{20}\u{39}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}")))
158158local b = {["\u{5f}\u{5f}\u{6c}\u{74}"] = function (a,b)
159−return a[1] < b[1]
159+return (a[0x1] < b[0x1])
160160end}
161−local a1,a3,a4 = setmetatable({1},b),setmetatable({3},b),setmetatable({4},b)
162−assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{32}\u{20}\u{35}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",a3,2,2,a4,2,2))
163−assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{45}\u{20}\u{32}\u{20}\u{35}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",a3,2,2,a4,2,2))
164−assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{35}\u{20}\u{2d}\u{36}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",a4,2,2,a3,2,2))
165−a,b=T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{35}\u{20}\u{2d}\u{36}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",a1,2,2,a3,2,20)
166−assert(a == 20 and b == false)
167−a,b=T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{45}\u{20}\u{35}\u{20}\u{2d}\u{36}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",a1,2,2,a3,2,20)
168−assert(a == 20 and b == false)
169−a,b=T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{45}\u{20}\u{35}\u{20}\u{2d}\u{36}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",a1,2,2,a1,2,20)
170−assert(a == 20 and b == true)
161+local a1,a3,a4 = setmetatable({0x1},b),setmetatable({0x3},b),setmetatable({0x4},b)
162+assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{32}\u{20}\u{35}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",a3,0x2,0x2,a4,0x2,0x2))
163+assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{45}\u{20}\u{32}\u{20}\u{35}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",a3,0x2,0x2,a4,0x2,0x2))
164+assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{35}\u{20}\u{2d}\u{36}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",a4,0x2,0x2,a3,0x2,0x2))
165+a,b=T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{35}\u{20}\u{2d}\u{36}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",a1,0x2,0x2,a3,0x2,0x14)
166+assert(((a == 0x14) and (b == false)))
167+a,b=T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{45}\u{20}\u{35}\u{20}\u{2d}\u{36}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",a1,0x2,0x2,a3,0x2,0x14)
168+assert(((a == 0x14) and (b == false)))
169+a,b=T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{45}\u{20}\u{35}\u{20}\u{2d}\u{36}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",a1,0x2,0x2,a1,0x2,0x14)
170+assert(((a == 0x14) and (b == true)))
171171do
172172local mt = {["\u{5f}\u{5f}\u{6c}\u{74}"] = function (a,b)
173−return a[1] < b[1]
173+return (a[0x1] < b[0x1])
174174end,["\u{5f}\u{5f}\u{6c}\u{65}"] = function (a,b)
175−return a[1] <= b[1]
175+return (a[0x1] <= b[0x1])
176176end,["\u{5f}\u{5f}\u{65}\u{71}"] = function (a,b)
177−return a[1] == b[1]
177+return (a[0x1] == b[0x1])
178178end}
179179local function O
180180(x)
181181return setmetatable({x},mt)
182182end
183−local a,b = T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",O(1),O(2))
184−assert(a == true and b == 10)
185−local a,b = T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{45}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",O(3),O(2))
186−assert(a == false and b == 10)
187−local a,b = T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",O(3),O(3))
188−assert(a == true and b == 10)
183+local a,b = T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{54}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",O(0x1),O(0x2))
184+assert(((a == true) and (b == 0xa)))
185+local a,b = T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{4c}\u{45}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",O(0x3),O(0x2))
186+assert(((a == false) and (b == 0xa)))
187+local a,b = T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",O(0x3),O(0x3))
188+assert(((a == true) and (b == 0xa)))
189189end
190−local t = setmetatable({["\u{78}"] = 20},{["\u{5f}\u{5f}\u{6c}\u{65}\u{6e}"] = function (t)
190+local t = setmetatable({["\u{78}"] = 0x14},{["\u{5f}\u{5f}\u{6c}\u{65}\u{6e}"] = function (t)
191191return t.x
192192end})
193193a,b,c=T.testC("\u{20}\u{20}\u{20}\u{6c}\u{65}\u{6e}\u{20}\u{32}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{4c}\u{6c}\u{65}\u{6e}\u{20}\u{32}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{6f}\u{62}\u{6a}\u{73}\u{69}\u{7a}\u{65}\u{20}\u{32}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}\u{a}",t)
194−assert(a == 20 and b == 20 and c == 0)
194+assert((((a == 0x14) and (b == 0x14)) and (c == 0x0)))
195195t.x="\u{32}\u{33}\u{34}"
196196;
197−t[1]=20
197+t[0x1]=0x14
198198a,b,c=T.testC("\u{20}\u{20}\u{20}\u{6c}\u{65}\u{6e}\u{20}\u{32}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{4c}\u{6c}\u{65}\u{6e}\u{20}\u{32}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{6f}\u{62}\u{6a}\u{73}\u{69}\u{7a}\u{65}\u{20}\u{32}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}\u{a}",t)
199−assert(a == "\u{32}\u{33}\u{34}" and b == 234 and c == 1)
199+assert((((a == "\u{32}\u{33}\u{34}") and (b == 0xea)) and (c == 0x1)))
200200t.x=print
201201;
202−t[1]=20
202+t[0x1]=0x14
203203a,c=T.testC("\u{20}\u{20}\u{20}\u{6c}\u{65}\u{6e}\u{20}\u{32}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{6f}\u{62}\u{6a}\u{73}\u{69}\u{7a}\u{65}\u{20}\u{32}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}\u{a}",t)
204−assert(a == print and c == 1)
204+assert(((a == print) and (c == 0x1)))
205205a=setmetatable({["\u{78}"] = "\u{75}"},{["\u{5f}\u{5f}\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}"] = function (a,b)
206−return a.x .. "\u{2e}" .. b.x
206+return (a.x .. ("\u{2e}" .. b.x))
207207end})
208208x,y=T.testC("\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{35}\u{a}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{32}\u{3b}\u{a}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{32}\u{3b}\u{a}\u{20}\u{20}\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}\u{20}\u{32}\u{3b}\u{a}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{2d}\u{32}\u{3b}\u{a}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}\u{3b}\u{a}",a,a)
209−assert(x == a .. a and y == 5)
210−assert(T.testC("\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}\u{20}\u{30}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == "")
211−assert(T.testC("\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}","\u{78}\u{75}\u{78}\u{75}") == "\u{78}\u{75}\u{78}\u{75}")
209+assert(((x == (a .. a)) and (y == 0x5)))
210+assert((T.testC("\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}\u{20}\u{30}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == ""))
211+assert((T.testC("\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}","\u{78}\u{75}\u{78}\u{75}") == "\u{78}\u{75}\u{78}\u{75}"))
212212local function B
213213(x)
214−return x and 1 or 0
214+return ((x and 0x1) or 0x0)
215215end
216216local function count
217217(x,n)
218−n=n or 2
218+n=(n or 0x2)
219219local prog = "\u{20}\u{20}\u{20}\u{20}\u{69}\u{73}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}\u{20}\u{25}\u{64}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{69}\u{73}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{25}\u{64}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{69}\u{73}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{25}\u{64}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{69}\u{73}\u{63}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{25}\u{64}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{69}\u{73}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{25}\u{64}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{69}\u{73}\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}\u{20}\u{25}\u{64}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{69}\u{73}\u{6e}\u{69}\u{6c}\u{20}\u{25}\u{64}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{69}\u{73}\u{6e}\u{75}\u{6c}\u{6c}\u{20}\u{25}\u{64}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{38}\u{a}\u{20}\u{20}"
220220prog=string.format(prog,n,n,n,n,n,n,n,n)
221221local a,b,c,d,e,f,g,h = T.testC(prog,x)
222−return B(a) + B(b) + B(c) + B(d) + B(e) + B(f) + B(g) + (100 * B(h))
223−end
224−assert(count(3) == 2)
225−assert(count("\u{61}\u{6c}\u{6f}") == 1)
226−assert(count("\u{33}\u{32}") == 2)
227−assert(count({}) == 1)
228−assert(count(print) == 2)
229−assert(count(function ()
222+return (((((((B(a) + B(b)) + B(c)) + B(d)) + B(e)) + B(f)) + B(g)) + (0x64 * B(h)))
223+end
224+assert((count(0x3) == 0x2))
225+assert((count("\u{61}\u{6c}\u{6f}") == 0x1))
226+assert((count("\u{33}\u{32}") == 0x2))
227+assert((count({}) == 0x1))
228+assert((count(print) == 0x2))
229+assert((count(function ()
230230
231−end) == 1)
232−assert(count(nil) == 1)
233−assert(count(io.stdin) == 1)
234−assert(count(nil,15) == 100)
231+end) == 0x1))
232+assert((count(nil) == 0x1))
233+assert((count(io.stdin) == 0x1))
234+assert((count(nil,0xf) == 0x64))
235235local function to
236236(s,x,n)
237−n=n or 2
237+n=(n or 0x2)
238238return T.testC(string.format("\u{25}\u{73}\u{20}\u{25}\u{64}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",s,n),x)
239239end
240−local null = T.pushuserdata(0)
240+local null = T.pushuserdata(0x0)
241241local hfunc = string.gmatch("","")
242−assert(debug.getupvalue(hfunc,1))
243−assert(to("\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}",{}) == nil)
244−assert(to("\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}","\u{61}\u{6c}\u{6f}") == "\u{61}\u{6c}\u{6f}")
245−assert(to("\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}",12) == "\u{31}\u{32}")
246−assert(to("\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}",12,3) == nil)
247−assert(to("\u{6f}\u{62}\u{6a}\u{73}\u{69}\u{7a}\u{65}",{}) == 0)
248−assert(to("\u{6f}\u{62}\u{6a}\u{73}\u{69}\u{7a}\u{65}",{1,2,3}) == 3)
249−assert(to("\u{6f}\u{62}\u{6a}\u{73}\u{69}\u{7a}\u{65}","\u{61}\u{6c}\u{6f}\u{0}\u{0}\u{61}") == 6)
250−assert(to("\u{6f}\u{62}\u{6a}\u{73}\u{69}\u{7a}\u{65}",T.newuserdata(0)) == 0)
251−assert(to("\u{6f}\u{62}\u{6a}\u{73}\u{69}\u{7a}\u{65}",T.newuserdata(101)) == 101)
252−assert(to("\u{6f}\u{62}\u{6a}\u{73}\u{69}\u{7a}\u{65}",124) == 0)
253−assert(to("\u{6f}\u{62}\u{6a}\u{73}\u{69}\u{7a}\u{65}",true) == 0)
254−assert(to("\u{74}\u{6f}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}",{}) == 0)
255−assert(to("\u{74}\u{6f}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}","\u{31}\u{32}") == 12)
256−assert(to("\u{74}\u{6f}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}","\u{73}\u{32}") == 0)
257−assert(to("\u{74}\u{6f}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}",1,20) == 0)
258−assert(to("\u{74}\u{6f}\u{70}\u{6f}\u{69}\u{6e}\u{74}\u{65}\u{72}",10) == null)
259−assert(to("\u{74}\u{6f}\u{70}\u{6f}\u{69}\u{6e}\u{74}\u{65}\u{72}",true) == null)
260−assert(to("\u{74}\u{6f}\u{70}\u{6f}\u{69}\u{6e}\u{74}\u{65}\u{72}",nil) == null)
261−assert(to("\u{74}\u{6f}\u{70}\u{6f}\u{69}\u{6e}\u{74}\u{65}\u{72}","\u{61}\u{62}\u{63}") ~= null)
262−assert(to("\u{74}\u{6f}\u{70}\u{6f}\u{69}\u{6e}\u{74}\u{65}\u{72}",string.rep("\u{78}",10)) == to("\u{74}\u{6f}\u{70}\u{6f}\u{69}\u{6e}\u{74}\u{65}\u{72}",string.rep("\u{78}",10)))
242+assert(debug.getupvalue(hfunc,0x1))
243+assert((to("\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}",{}) == nil))
244+assert((to("\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}","\u{61}\u{6c}\u{6f}") == "\u{61}\u{6c}\u{6f}"))
245+assert((to("\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}",0xc) == "\u{31}\u{32}"))
246+assert((to("\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}",0xc,0x3) == nil))
247+assert((to("\u{6f}\u{62}\u{6a}\u{73}\u{69}\u{7a}\u{65}",{}) == 0x0))
248+assert((to("\u{6f}\u{62}\u{6a}\u{73}\u{69}\u{7a}\u{65}",{0x1,0x2,0x3}) == 0x3))
249+assert((to("\u{6f}\u{62}\u{6a}\u{73}\u{69}\u{7a}\u{65}","\u{61}\u{6c}\u{6f}\u{0}\u{0}\u{61}") == 0x6))
250+assert((to("\u{6f}\u{62}\u{6a}\u{73}\u{69}\u{7a}\u{65}",T.newuserdata(0x0)) == 0x0))
251+assert((to("\u{6f}\u{62}\u{6a}\u{73}\u{69}\u{7a}\u{65}",T.newuserdata(0x65)) == 0x65))
252+assert((to("\u{6f}\u{62}\u{6a}\u{73}\u{69}\u{7a}\u{65}",0x7c) == 0x0))
253+assert((to("\u{6f}\u{62}\u{6a}\u{73}\u{69}\u{7a}\u{65}",true) == 0x0))
254+assert((to("\u{74}\u{6f}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}",{}) == 0x0))
255+assert((to("\u{74}\u{6f}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}","\u{31}\u{32}") == 0xc))
256+assert((to("\u{74}\u{6f}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}","\u{73}\u{32}") == 0x0))
257+assert((to("\u{74}\u{6f}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}",0x1,0x14) == 0x0))
258+assert((to("\u{74}\u{6f}\u{70}\u{6f}\u{69}\u{6e}\u{74}\u{65}\u{72}",0xa) == null))
259+assert((to("\u{74}\u{6f}\u{70}\u{6f}\u{69}\u{6e}\u{74}\u{65}\u{72}",true) == null))
260+assert((to("\u{74}\u{6f}\u{70}\u{6f}\u{69}\u{6e}\u{74}\u{65}\u{72}",nil) == null))
261+assert((to("\u{74}\u{6f}\u{70}\u{6f}\u{69}\u{6e}\u{74}\u{65}\u{72}","\u{61}\u{62}\u{63}") ~= null))
262+assert((to("\u{74}\u{6f}\u{70}\u{6f}\u{69}\u{6e}\u{74}\u{65}\u{72}",string.rep("\u{78}",0xa)) == to("\u{74}\u{6f}\u{70}\u{6f}\u{69}\u{6e}\u{74}\u{65}\u{72}",string.rep("\u{78}",0xa))))
263263do
264−local s1 = string.rep("\u{78}",300)
265−local s2 = string.rep("\u{78}",300)
266−assert(to("\u{74}\u{6f}\u{70}\u{6f}\u{69}\u{6e}\u{74}\u{65}\u{72}",s1) ~= to("\u{74}\u{6f}\u{70}\u{6f}\u{69}\u{6e}\u{74}\u{65}\u{72}",s2))
267−end
268−assert(to("\u{74}\u{6f}\u{70}\u{6f}\u{69}\u{6e}\u{74}\u{65}\u{72}",T.pushuserdata(20)) ~= null)
269−assert(to("\u{74}\u{6f}\u{70}\u{6f}\u{69}\u{6e}\u{74}\u{65}\u{72}",io.read) ~= null)
270−assert(to("\u{74}\u{6f}\u{70}\u{6f}\u{69}\u{6e}\u{74}\u{65}\u{72}",hfunc) ~= null)
271−assert(to("\u{74}\u{6f}\u{70}\u{6f}\u{69}\u{6e}\u{74}\u{65}\u{72}",function ()
264+local s1 = string.rep("\u{78}",0x12c)
265+local s2 = string.rep("\u{78}",0x12c)
266+assert((to("\u{74}\u{6f}\u{70}\u{6f}\u{69}\u{6e}\u{74}\u{65}\u{72}",s1) ~= to("\u{74}\u{6f}\u{70}\u{6f}\u{69}\u{6e}\u{74}\u{65}\u{72}",s2)))
267+end
268+assert((to("\u{74}\u{6f}\u{70}\u{6f}\u{69}\u{6e}\u{74}\u{65}\u{72}",T.pushuserdata(0x14)) ~= null))
269+assert((to("\u{74}\u{6f}\u{70}\u{6f}\u{69}\u{6e}\u{74}\u{65}\u{72}",io.read) ~= null))
270+assert((to("\u{74}\u{6f}\u{70}\u{6f}\u{69}\u{6e}\u{74}\u{65}\u{72}",hfunc) ~= null))
271+assert((to("\u{74}\u{6f}\u{70}\u{6f}\u{69}\u{6e}\u{74}\u{65}\u{72}",function ()
272272
273−end) ~= null)
274−assert(to("\u{74}\u{6f}\u{70}\u{6f}\u{69}\u{6e}\u{74}\u{65}\u{72}",io.stdin) ~= null)
275−assert(to("\u{66}\u{75}\u{6e}\u{63}\u{32}\u{6e}\u{75}\u{6d}",20) == 0)
276−assert(to("\u{66}\u{75}\u{6e}\u{63}\u{32}\u{6e}\u{75}\u{6d}",T.pushuserdata(10)) == 0)
277−assert(to("\u{66}\u{75}\u{6e}\u{63}\u{32}\u{6e}\u{75}\u{6d}",io.read) ~= 0)
278−assert(to("\u{66}\u{75}\u{6e}\u{63}\u{32}\u{6e}\u{75}\u{6d}",hfunc) ~= 0)
273+end) ~= null))
274+assert((to("\u{74}\u{6f}\u{70}\u{6f}\u{69}\u{6e}\u{74}\u{65}\u{72}",io.stdin) ~= null))
275+assert((to("\u{66}\u{75}\u{6e}\u{63}\u{32}\u{6e}\u{75}\u{6d}",0x14) == 0x0))
276+assert((to("\u{66}\u{75}\u{6e}\u{63}\u{32}\u{6e}\u{75}\u{6d}",T.pushuserdata(0xa)) == 0x0))
277+assert((to("\u{66}\u{75}\u{6e}\u{63}\u{32}\u{6e}\u{75}\u{6d}",io.read) ~= 0x0))
278+assert((to("\u{66}\u{75}\u{6e}\u{63}\u{32}\u{6e}\u{75}\u{6d}",hfunc) ~= 0x0))
279279a=to("\u{74}\u{6f}\u{63}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}",math.deg)
280−assert(a(3) == math.deg(3) and a == math.deg)
280+assert(((a(0x3) == math.deg(0x3)) and (a == math.deg)))
281281print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{70}\u{61}\u{6e}\u{69}\u{63}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}")
282282do
283−assert(T.checkpanic("\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{68}\u{69}\u{3b}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}") == "\u{68}\u{69}")
284−assert(T.checkpanic("\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{68}\u{69}\u{3b}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{3b}","\u{63}\u{68}\u{65}\u{63}\u{6b}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{35}\u{20}\u{58}\u{58}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{27}\u{20}\u{61}\u{6c}\u{6f}\u{27}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{27}\u{20}\u{6d}\u{75}\u{6e}\u{64}\u{6f}\u{27}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}\u{20}\u{33}") == "\u{68}\u{69}\u{20}\u{61}\u{6c}\u{6f}\u{20}\u{6d}\u{75}\u{6e}\u{64}\u{6f}")
285−assert(T.checkpanic("\u{6c}\u{6f}\u{61}\u{64}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{34}") == "\u{62}\u{61}\u{64}\u{20}\u{61}\u{72}\u{67}\u{75}\u{6d}\u{65}\u{6e}\u{74}\u{20}\u{23}\u{34}\u{20}\u{28}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{2c}\u{20}\u{67}\u{6f}\u{74}\u{20}\u{6e}\u{6f}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{29}")
286−T.totalmem(T.totalmem() + 10000)
287−assert(T.checkpanic("\u{6e}\u{65}\u{77}\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}\u{20}\u{32}\u{30}\u{30}\u{30}\u{30}") == MEMERRMSG)
288−T.totalmem(0)
289−if not _soft then
283+assert((T.checkpanic("\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{68}\u{69}\u{3b}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}") == "\u{68}\u{69}"))
284+assert((T.checkpanic("\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{68}\u{69}\u{3b}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{3b}","\u{63}\u{68}\u{65}\u{63}\u{6b}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{35}\u{20}\u{58}\u{58}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{27}\u{20}\u{61}\u{6c}\u{6f}\u{27}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{27}\u{20}\u{6d}\u{75}\u{6e}\u{64}\u{6f}\u{27}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}\u{20}\u{33}") == "\u{68}\u{69}\u{20}\u{61}\u{6c}\u{6f}\u{20}\u{6d}\u{75}\u{6e}\u{64}\u{6f}"))
285+assert((T.checkpanic("\u{6c}\u{6f}\u{61}\u{64}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{34}") == "\u{62}\u{61}\u{64}\u{20}\u{61}\u{72}\u{67}\u{75}\u{6d}\u{65}\u{6e}\u{74}\u{20}\u{23}\u{34}\u{20}\u{28}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{2c}\u{20}\u{67}\u{6f}\u{74}\u{20}\u{6e}\u{6f}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{29}"))
286+T.totalmem((T.totalmem() + 0x2710))
287+assert((T.checkpanic("\u{6e}\u{65}\u{77}\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}\u{20}\u{32}\u{30}\u{30}\u{30}\u{30}") == MEMERRMSG))
288+T.totalmem(0x0)
289+if (not _soft) then
290290local msg = T.checkpanic("\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{22}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{28}\u{29}\u{20}\u{66}\u{28}\u{29}\u{20}\u{65}\u{6e}\u{64}\u{22}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{30}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{66}\u{3b}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{30}\u{a}\u{20}\u{20}\u{20}\u{20}")
291291assert(string.find(msg,"\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}"))
292292end
293−assert(T.checkpanic("\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{22}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{7b}\u{5f}\u{5f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{3d}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{29}\u{20}\u{59}\u{20}\u{3d}\u{20}\u{27}\u{68}\u{6f}\u{27}\u{3b}\u{20}\u{65}\u{6e}\u{64}\u{7d}\u{22}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6e}\u{65}\u{77}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{2d}\u{32}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{a}\u{20}\u{20}\u{20}\u{20}\u{73}\u{65}\u{74}\u{6d}\u{65}\u{74}\u{61}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{32}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{22}\u{68}\u{69}\u{22}\u{a}\u{20}\u{20}\u{20}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{a}\u{20}\u{20}","\u{20}\u{20}\u{20}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{59}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}\u{20}\u{32}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}\u{20}\u{6f}\u{72}\u{69}\u{67}\u{69}\u{6e}\u{61}\u{6c}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{59}\u{a}\u{20}\u{20}") == "\u{68}\u{69}\u{68}\u{6f}")
293+assert((T.checkpanic("\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{22}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{7b}\u{5f}\u{5f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{3d}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{29}\u{20}\u{59}\u{20}\u{3d}\u{20}\u{27}\u{68}\u{6f}\u{27}\u{3b}\u{20}\u{65}\u{6e}\u{64}\u{7d}\u{22}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6e}\u{65}\u{77}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{2d}\u{32}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{a}\u{20}\u{20}\u{20}\u{20}\u{73}\u{65}\u{74}\u{6d}\u{65}\u{74}\u{61}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{32}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{22}\u{68}\u{69}\u{22}\u{a}\u{20}\u{20}\u{20}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{a}\u{20}\u{20}","\u{20}\u{20}\u{20}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{59}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}\u{20}\u{32}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}\u{20}\u{6f}\u{72}\u{69}\u{67}\u{69}\u{6e}\u{61}\u{6c}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{59}\u{a}\u{20}\u{20}") == "\u{68}\u{69}\u{68}\u{6f}"))
294294end
295−if not _soft then
295+if (not _soft) then
296296print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}")
297297collectgarbage("\u{73}\u{74}\u{6f}\u{70}")
298298checkerr("\u{58}\u{58}\u{58}\u{58}",T.testC,"\u{63}\u{68}\u{65}\u{63}\u{6b}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{31}\u{30}\u{30}\u{30}\u{30}\u{32}\u{33}\u{20}\u{58}\u{58}\u{58}\u{58}")
299299checkerr("\u{5e}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}\u{24}",T.testC,"\u{63}\u{68}\u{65}\u{63}\u{6b}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{31}\u{30}\u{30}\u{30}\u{30}\u{32}\u{33}\u{20}\u{27}\u{27}")
300−local s = string.rep("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{69}\u{6c}\u{3b}\u{63}\u{68}\u{65}\u{63}\u{6b}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{31}\u{20}\u{58}\u{58}\u{3b}",1000000)
300+local s = string.rep("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{69}\u{6c}\u{3b}\u{63}\u{68}\u{65}\u{63}\u{6b}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{31}\u{20}\u{58}\u{58}\u{3b}",0xf4240)
301301checkerr("\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}",T.testC,s)
302302collectgarbage("\u{72}\u{65}\u{73}\u{74}\u{61}\u{72}\u{74}")
303303print("\u{2b}")
304304end
305−local lim = _soft and 500 or 12000
306−local prog = {"\u{63}\u{68}\u{65}\u{63}\u{6b}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}" .. (lim * 2 + 100) .. "\u{6d}\u{73}\u{67}","\u{6e}\u{65}\u{77}\u{74}\u{61}\u{62}\u{6c}\u{65}"}
307−for i = 1, lim
305+local lim = ((_soft and 0x1f4) or 0x2ee0)
306+local prog = {("\u{63}\u{68}\u{65}\u{63}\u{6b}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}" .. (((lim * 0x2) + 0x64) .. "\u{6d}\u{73}\u{67}")),"\u{6e}\u{65}\u{77}\u{74}\u{61}\u{62}\u{6c}\u{65}"}
307+for i = 0x1, lim
308308do
309−prog[# prog + 1]="\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}" .. i
310−prog[# prog + 1]="\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}" .. i * 10
309+prog[(# (prog + 0x1))]=("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}" .. i)
310+prog[(# (prog + 0x1))]=("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}" .. (i * 0xa))
311311end
312−prog[# prog + 1]="\u{72}\u{61}\u{77}\u{67}\u{65}\u{74}\u{69}\u{20}\u{52}\u{20}\u{32}"
313−prog[# prog + 1]="\u{69}\u{6e}\u{73}\u{65}\u{72}\u{74}\u{20}" .. - (2 * lim + 2)
314−for i = 1, lim
312+prog[(# (prog + 0x1))]="\u{72}\u{61}\u{77}\u{67}\u{65}\u{74}\u{69}\u{20}\u{52}\u{20}\u{32}"
313+prog[(# (prog + 0x1))]=("\u{69}\u{6e}\u{73}\u{65}\u{72}\u{74}\u{20}" .. (- ((0x2 * lim) + 0x2)))
314+for i = 0x1, lim
315315do
316−prog[# prog + 1]="\u{73}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}" .. - (2 * (lim - i + 1) + 1)
316+prog[(# (prog + 0x1))]=("\u{73}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}" .. (- ((0x2 * ((lim - i) + 0x1)) + 0x1)))
317317end
318−prog[# prog + 1]="\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}"
318+prog[(# (prog + 0x1))]="\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}"
319319prog=table.concat(prog,"\u{3b}")
320320local g,t = T.testC(prog)
321−assert(g == _G)
322−for i = 1, lim
321+assert((g == _G))
322+for i = 0x1, lim
323323do
324−assert(t[i] == i * 10)
324+assert((t[i] == (i * 0xa)))
325325;
326326t[i]=undef
327327end
328−assert(next(t) == nil)
328+assert((next(t) == nil))
329329prog,g,t=nil
330330a=T.testC("\u{20}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{32}\u{3b}\u{20}\u{70}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{20}\u{30}\u{3b}\u{a}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{33}\u{3b}\u{20}\u{69}\u{6e}\u{73}\u{65}\u{72}\u{74}\u{20}\u{2d}\u{32}\u{3b}\u{20}\u{70}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{31}\u{20}\u{31}\u{20}\u{30}\u{3b}\u{a}\u{20}\u{20}\u{70}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{30}\u{20}\u{30}\u{3b}\u{a}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{a}","\u{58}\u{58}\u{3d}\u{31}\u{35}\u{30}",function (a)
331−assert(a == nil)
331+assert((a == nil))
332332;
333−return 3
333+return 0x3
334334end)
335−assert(type(a) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}" and XX == 150)
335+assert(((type(a) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}") and (XX == 0x96)))
336336_G.XX=nil
337337local function check3
338338(p, ...)
339339local arg = {...}
340−assert(# arg == 3)
341−assert(string.find(arg[3],p))
340+assert((# (arg == 0x3)))
341+assert(string.find(arg[0x3],p))
342342end
343343check3("\u{3a}\u{31}\u{3a}",T.testC("\u{6c}\u{6f}\u{61}\u{64}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}","\u{78}\u{3d}"))
344344check3("\u{25}\u{2e}",T.testC("\u{6c}\u{6f}\u{61}\u{64}\u{66}\u{69}\u{6c}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}","\u{2e}"))
@@ -349,9 +349,9 @@ local th = coroutine.create(function ()
349349
350350end)
351351local stt,err = pcall(T.testC,th,code)
352−assert(not stt and string.find(err,msg))
352+assert((not (stt and string.find(err,msg))))
353353end
354−if not _soft then
354+if (not _soft) then
355355collectgarbage("\u{73}\u{74}\u{6f}\u{70}")
356356checkerrnopro("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{33}\u{3b}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{30}","\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{63}\u{61}\u{6c}\u{6c}")
357357print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}\u{20}\u{69}\u{6e}\u{20}\u{75}\u{6e}\u{70}\u{72}\u{6f}\u{74}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}")
@@ -365,141 +365,141 @@ end
365365print("\u{2b}")
366366do
367367local a = {}
368−local a1 = T.testC("\u{72}\u{61}\u{77}\u{73}\u{65}\u{74}\u{70}\u{20}\u{32}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",a,20)
369−assert(a == a1)
370−assert(a[T.pushuserdata(1)] == 20)
368+local a1 = T.testC("\u{72}\u{61}\u{77}\u{73}\u{65}\u{74}\u{70}\u{20}\u{32}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",a,0x14)
369+assert((a == a1))
370+assert((a[T.pushuserdata(0x1)] == 0x14))
371371local a1,res = T.testC("\u{72}\u{61}\u{77}\u{67}\u{65}\u{74}\u{70}\u{20}\u{2d}\u{31}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",a)
372−assert(a == a1 and res == 20)
372+assert(((a == a1) and (res == 0x14)))
373373end
374374do
375375local a = {}
376−a[a]=10
376+a[a]=0xa
377377local prog = "\u{67}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}"
378378local res = {T.testC(prog,a)}
379−assert(# res == 2 and res[1] == prog and res[2] == 10)
379+assert((# (((res == 0x2) and (res[0x1] == prog)) and (res[0x2] == 0xa))))
380380local prog = "\u{73}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}"
381−local res = {T.testC(prog,a,20)}
382−assert(a[a] == 20)
383−assert(# res == 1 and res[1] == prog)
384−a[a]=10
381+local res = {T.testC(prog,a,0x14)}
382+assert((a[a] == 0x14))
383+assert((# ((res == 0x1) and (res[0x1] == prog))))
384+a[a]=0xa
385385local prog = "\u{72}\u{61}\u{77}\u{67}\u{65}\u{74}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}"
386386local res = {T.testC(prog,a)}
387−assert(# res == 2 and res[1] == prog and res[2] == 10)
387+assert((# (((res == 0x2) and (res[0x1] == prog)) and (res[0x2] == 0xa))))
388388local prog = "\u{72}\u{61}\u{77}\u{73}\u{65}\u{74}\u{20}\u{2d}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}"
389−local res = {T.testC(prog,a,20)}
390−assert(a[a] == 20)
391−assert(# res == 1 and res[1] == prog)
389+local res = {T.testC(prog,a,0x14)}
390+assert((a[a] == 0x14))
391+assert((# ((res == 0x1) and (res[0x1] == prog))))
392392local prog = "\u{72}\u{61}\u{77}\u{73}\u{65}\u{74}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}"
393−local res = {T.testC(prog,30,a)}
394−assert(a[30] == a)
395−assert(# res == 1 and res[1] == prog)
393+local res = {T.testC(prog,0x1e,a)}
394+assert((a[0x1e] == a))
395+assert((# ((res == 0x1) and (res[0x1] == prog))))
396396local prog = "\u{73}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}"
397−local res = {T.testC(prog,40,a)}
398−assert(a[40] == a)
399−assert(# res == 1 and res[1] == prog)
397+local res = {T.testC(prog,0x28,a)}
398+assert((a[0x28] == a))
399+assert((# ((res == 0x1) and (res[0x1] == prog))))
400400local prog = "\u{72}\u{61}\u{77}\u{73}\u{65}\u{74}\u{69}\u{20}\u{2d}\u{31}\u{20}\u{31}\u{30}\u{30}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}"
401401local res = {T.testC(prog,a)}
402−assert(a[100] == a)
403−assert(# res == 1 and res[1] == prog)
402+assert((a[0x64] == a))
403+assert((# ((res == 0x1) and (res[0x1] == prog))))
404404local prog = "\u{73}\u{65}\u{74}\u{69}\u{20}\u{2d}\u{31}\u{20}\u{32}\u{30}\u{30}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}"
405405local res = {T.testC(prog,a)}
406−assert(a[200] == a)
407−assert(# res == 1 and res[1] == prog)
408−end
409−a={["\u{78}"] = 0,["\u{79}"] = 12}
410−x,y=T.testC("\u{67}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{34}\u{3b}\u{20}\u{67}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",a,3,"\u{79}",4,"\u{78}")
411−assert(x == 0 and y == 12)
412−T.testC("\u{73}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{35}",a,3,4,"\u{78}",15)
413−assert(a.x == 15)
406+assert((a[0xc8] == a))
407+assert((# ((res == 0x1) and (res[0x1] == prog))))
408+end
409+a={["\u{78}"] = 0x0,["\u{79}"] = 0xc}
410+x,y=T.testC("\u{67}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{34}\u{3b}\u{20}\u{67}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",a,0x3,"\u{79}",0x4,"\u{78}")
411+assert(((x == 0x0) and (y == 0xc)))
412+T.testC("\u{73}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{35}",a,0x3,0x4,"\u{78}",0xf)
413+assert((a.x == 0xf))
414414a[a]=print
415415x=T.testC("\u{67}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",a)
416−assert(x == print)
416+assert((x == print))
417417T.testC("\u{73}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{32}",a,"\u{78}")
418−assert(a[a] == "\u{78}")
418+assert((a[a] == "\u{78}"))
419419b=setmetatable({["\u{70}"] = a},{})
420420getmetatable(b).__index=function (t,i)
421421return t.p[i]
422422end
423−local k,x = T.testC("\u{67}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{33}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",4,b,20,35,"\u{78}")
424−assert(x == 15 and k == 35)
423+local k,x = T.testC("\u{67}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{33}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",0x4,b,0x14,0x23,"\u{78}")
424+assert(((x == 0xf) and (k == 0x23)))
425425k=T.testC("\u{67}\u{65}\u{74}\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{32}\u{20}\u{79}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",b)
426−assert(k == 12)
426+assert((k == 0xc))
427427getmetatable(b).__index=function (t,i)
428428return a[i]
429429end
430430getmetatable(b).__newindex=function (t,i,v)
431431a[i]=v
432432end
433−y=T.testC("\u{69}\u{6e}\u{73}\u{65}\u{72}\u{74}\u{20}\u{32}\u{3b}\u{20}\u{67}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{35}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",2,3,4,"\u{79}",b)
434−assert(y == 12)
435−k=T.testC("\u{73}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{35}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",b,3,4,"\u{78}",16)
436−assert(a.x == 16 and k == 4)
433+y=T.testC("\u{69}\u{6e}\u{73}\u{65}\u{72}\u{74}\u{20}\u{32}\u{3b}\u{20}\u{67}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{35}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",0x2,0x3,0x4,"\u{79}",b)
434+assert((y == 0xc))
435+k=T.testC("\u{73}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{35}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",b,0x3,0x4,"\u{78}",0x10)
436+assert(((a.x == 0x10) and (k == 0x4)))
437437a[b]="\u{78}\u{75}\u{78}\u{75}"
438438y=T.testC("\u{67}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{32}\u{2c}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",b)
439−assert(y == "\u{78}\u{75}\u{78}\u{75}")
440−T.testC("\u{73}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{32}",b,19)
441−assert(a[b] == 19)
439+assert((y == "\u{78}\u{75}\u{78}\u{75}"))
440+T.testC("\u{73}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{32}",b,0x13)
441+assert((a[b] == 0x13))
442442do
443−local t = {["\u{5f}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}"] = 32}
443+local t = {["\u{5f}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}"] = 0x20}
444444local a = T.testC("\u{20}\u{20}\u{20}\u{20}\u{67}\u{65}\u{74}\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{32}\u{20}\u{5f}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{a}\u{20}\u{20}",t)
445−assert(a == 32)
445+assert((a == 0x20))
446446local a = T.testC("\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{33}\u{33}\u{a}\u{20}\u{20}\u{20}\u{20}\u{73}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{5f}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}\u{20}\u{20}")
447−assert(_012345678901234567890123456789012345678901234567890123456789 == 33)
447+assert((_012345678901234567890123456789012345678901234567890123456789 == 0x21))
448448_012345678901234567890123456789012345678901234567890123456789=nil
449449end
450450a={}
451451t=pack(T.testC("\u{6e}\u{65}\u{78}\u{74}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",a,nil))
452−tcheck(t,{["\u{6e}"] = 1,a})
453−a={["\u{61}"] = 3}
452+tcheck(t,{["\u{6e}"] = 0x1,a})
453+a={["\u{61}"] = 0x3}
454454t=pack(T.testC("\u{6e}\u{65}\u{78}\u{74}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",a,nil))
455−tcheck(t,{["\u{6e}"] = 3,a,"\u{61}",3})
455+tcheck(t,{["\u{6e}"] = 0x3,a,"\u{61}",0x3})
456456t=pack(T.testC("\u{6e}\u{65}\u{78}\u{74}\u{3b}\u{20}\u{70}\u{6f}\u{70}\u{20}\u{31}\u{3b}\u{20}\u{6e}\u{65}\u{78}\u{74}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}",a,nil))
457−tcheck(t,{["\u{6e}"] = 1,a})
457+tcheck(t,{["\u{6e}"] = 0x1,a})
458458do
459459local A = T.testC("\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{63}\u{63}\u{6c}\u{6f}\u{73}\u{75}\u{72}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}")
460460t,b,c=A("\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{55}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{55}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{55}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}")
461−assert(b == 10 and c == 20 and type(t) == "\u{74}\u{61}\u{62}\u{6c}\u{65}")
461+assert((((b == 0xa) and (c == 0x14)) and (type(t) == "\u{74}\u{61}\u{62}\u{6c}\u{65}")))
462462a,b=A("\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{55}\u{33}\u{3b}\u{20}\u{74}\u{6f}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}\u{20}\u{55}\u{34}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}")
463−assert(a == nil and b == 0)
463+assert(((a == nil) and (b == 0x0)))
464464A("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{30}\u{30}\u{3b}\u{20}\u{72}\u{65}\u{70}\u{6c}\u{61}\u{63}\u{65}\u{20}\u{55}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{70}\u{6c}\u{61}\u{63}\u{65}\u{20}\u{55}\u{31}")
465465b,c=A("\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{55}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{55}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}")
466−assert(b == 100 and c == 200)
467−A("\u{72}\u{65}\u{70}\u{6c}\u{61}\u{63}\u{65}\u{20}\u{55}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{70}\u{6c}\u{61}\u{63}\u{65}\u{20}\u{55}\u{31}",{["\u{78}"] = 1},{["\u{78}"] = 2})
466+assert(((b == 0x64) and (c == 0xc8)))
467+A("\u{72}\u{65}\u{70}\u{6c}\u{61}\u{63}\u{65}\u{20}\u{55}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{70}\u{6c}\u{61}\u{63}\u{65}\u{20}\u{55}\u{31}",{["\u{78}"] = 0x1},{["\u{78}"] = 0x2})
468468b,c=A("\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{55}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{55}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}")
469−assert(b.x == 1 and c.x == 2)
469+assert(((b.x == 0x1) and (c.x == 0x2)))
470470T.checkmemory()
471471end
472−assert(T.testC("\u{69}\u{73}\u{6e}\u{75}\u{6c}\u{6c}\u{20}\u{55}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == true)
473−assert(T.testC("\u{69}\u{73}\u{6e}\u{75}\u{6c}\u{6c}\u{20}\u{55}\u{31}\u{30}\u{30}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == true)
474−assert(T.testC("\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{55}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == nil)
472+assert((T.testC("\u{69}\u{73}\u{6e}\u{75}\u{6c}\u{6c}\u{20}\u{55}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == true))
473+assert((T.testC("\u{69}\u{73}\u{6e}\u{75}\u{6c}\u{6c}\u{20}\u{55}\u{31}\u{30}\u{30}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == true))
474+assert((T.testC("\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{55}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}") == nil))
475475local f = T.testC("\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{63}\u{63}\u{6c}\u{6f}\u{73}\u{75}\u{72}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}")
476−assert(T.upvalue(f,1) == 10 and T.upvalue(f,2) == 20 and T.upvalue(f,3) == nil)
477−T.upvalue(f,2,"\u{78}\u{75}\u{78}\u{75}")
478−assert(T.upvalue(f,2) == "\u{78}\u{75}\u{78}\u{75}")
476+assert((((T.upvalue(f,0x1) == 0xa) and (T.upvalue(f,0x2) == 0x14)) and (T.upvalue(f,0x3) == nil)))
477+T.upvalue(f,0x2,"\u{78}\u{75}\u{78}\u{75}")
478+assert((T.upvalue(f,0x2) == "\u{78}\u{75}\u{78}\u{75}"))
479479do
480−local A = "\u{63}\u{68}\u{65}\u{63}\u{6b}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{33}\u{30}\u{30}\u{20}\u{6d}\u{73}\u{67}\u{3b}" .. string.rep("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}",255) .. "\u{70}\u{75}\u{73}\u{68}\u{63}\u{63}\u{6c}\u{6f}\u{73}\u{75}\u{72}\u{65}\u{20}\u{32}\u{35}\u{35}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"
480+local A = ("\u{63}\u{68}\u{65}\u{63}\u{6b}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{33}\u{30}\u{30}\u{20}\u{6d}\u{73}\u{67}\u{3b}" .. (string.rep("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}",0xff) .. "\u{70}\u{75}\u{73}\u{68}\u{63}\u{63}\u{6c}\u{6f}\u{73}\u{75}\u{72}\u{65}\u{20}\u{32}\u{35}\u{35}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"))
481481A=T.testC(A)
482−for i = 1, 255
482+for i = 0x1, 0xff
483483do
484−assert(A(("\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{55}\u{25}\u{64}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"):format(i)) == 10)
484+assert((A(("\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{55}\u{25}\u{64}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"):format(i)) == 0xa))
485485end
486486assert(A("\u{69}\u{73}\u{6e}\u{75}\u{6c}\u{6c}\u{20}\u{55}\u{32}\u{35}\u{36}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"))
487−assert(not A("\u{69}\u{73}\u{6e}\u{69}\u{6c}\u{20}\u{55}\u{32}\u{35}\u{36}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"))
487+assert((not A("\u{69}\u{73}\u{6e}\u{69}\u{6c}\u{20}\u{55}\u{32}\u{35}\u{36}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}")))
488488end
489−checkerr("\u{67}\u{6f}\u{74}\u{20}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}",debug.setuservalue,3,{})
489+checkerr("\u{67}\u{6f}\u{74}\u{20}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}",debug.setuservalue,0x3,{})
490490checkerr("\u{67}\u{6f}\u{74}\u{20}\u{6e}\u{69}\u{6c}",debug.setuservalue,nil,{})
491−checkerr("\u{67}\u{6f}\u{74}\u{20}\u{6c}\u{69}\u{67}\u{68}\u{74}\u{20}\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}",debug.setuservalue,T.pushuserdata(1),{})
492−local b = T.newuserdata(0,10)
493−for i = 1, 10
491+checkerr("\u{67}\u{6f}\u{74}\u{20}\u{6c}\u{69}\u{67}\u{68}\u{74}\u{20}\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}",debug.setuservalue,T.pushuserdata(0x1),{})
492+local b = T.newuserdata(0x0,0xa)
493+for i = 0x1, 0xa
494494do
495495local v,p = debug.getuservalue(b,i)
496−assert(v == nil and p)
496+assert(((v == nil) and p))
497497end
498498do
499−local v,p = debug.getuservalue(b,- 2)
500−assert(v == nil and not p)
501−local v,p = debug.getuservalue(b,11)
502−assert(v == nil and not p)
499+local v,p = debug.getuservalue(b,(- 0x2))
500+assert(((v == nil) and (not p)))
501+local v,p = debug.getuservalue(b,0xb)
502+assert(((v == nil) and (not p)))
503503end
504504local t = {true,false,4.56,print,{},b,"\u{58}\u{59}\u{5a}"}
505505for k,v in ipairs(t)
@@ -509,53 +509,53 @@ end
509509for k,v in ipairs(t)
510510do
511511local v1,p = debug.getuservalue(b,k)
512−assert(v1 == v and p)
512+assert(((v1 == v) and p))
513513end
514−assert(not debug.getuservalue(4))
514+assert((not debug.getuservalue(0x4)))
515515debug.setuservalue(b,function ()
516−return 10
517−end,10)
516+return 0xa
517+end,0xa)
518518collectgarbage()
519−assert(debug.getuservalue(b,10)() == 10)
520−debug.setuservalue(b,134)
519+assert((debug.getuservalue(b,0xa)() == 0xa))
520+debug.setuservalue(b,0x86)
521521collectgarbage()
522−assert(debug.getuservalue(b) == 134)
522+assert((debug.getuservalue(b) == 0x86))
523523do
524524local oldmode = collectgarbage("\u{69}\u{6e}\u{63}\u{72}\u{65}\u{6d}\u{65}\u{6e}\u{74}\u{61}\u{6c}")
525525T.gcstate("\u{61}\u{74}\u{6f}\u{6d}\u{69}\u{63}")
526−assert(T.gccolor(b) == "\u{62}\u{6c}\u{61}\u{63}\u{6b}")
527−debug.setuservalue(b,{["\u{78}"] = 100})
526+assert((T.gccolor(b) == "\u{62}\u{6c}\u{61}\u{63}\u{6b}"))
527+debug.setuservalue(b,{["\u{78}"] = 0x64})
528528T.gcstate("\u{70}\u{61}\u{75}\u{73}\u{65}")
529−assert(debug.getuservalue(b).x == 100)
529+assert((debug.getuservalue(b).x == 0x64))
530530collectgarbage(oldmode)
531531end
532−for i = 1, 1000
532+for i = 0x1, 0x3e8
533533do
534−local bb = T.newuserdata(0,1)
534+local bb = T.newuserdata(0x0,0x1)
535535debug.setuservalue(bb,b)
536536b=bb
537537end
538538collectgarbage()
539−for i = 1, 1000
539+for i = 0x1, 0x3e8
540540do
541541b=debug.getuservalue(b)
542542end
543−assert(debug.getuservalue(b).x == 100)
543+assert((debug.getuservalue(b).x == 0x64))
544544b=nil
545545local i = T.ref({})
546546T.unref(i)
547−assert(T.ref({}) == i)
547+assert((T.ref({}) == i))
548548local Arr = {}
549−local Lim = 100
550−for i = 1, Lim
549+local Lim = 0x64
550+for i = 0x1, Lim
551551do
552552Arr[i]=T.ref({})
553553end
554−assert(T.ref(nil) == - 1 and T.getref(- 1) == nil)
555−T.unref(- 1)
554+assert((T.ref(nil) == (- (0x1 and (T.getref((- 0x1)) == nil)))))
555+T.unref((- 0x1))
556556;
557−T.unref(- 1)
558−for i = 1, Lim
557+T.unref((- 0x1))
558+for i = 0x1, Lim
559559do
560560T.unref(Arr[i])
561561end
@@ -564,26 +564,26 @@ local function printlocks
564564local f = T.makeCfunc("\u{67}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{52}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}")
565565local n = f("\u{6e}")
566566print("\u{6e}",n)
567−for i = 0, n
567+for i = 0x0, n
568568do
569569print(i,f(i))
570570end
571571end
572−for i = 1, Lim
572+for i = 0x1, Lim
573573do
574574Arr[i]=T.ref({})
575575end
576−for i = 1, Lim, 2
576+for i = 0x1, Lim, 0x2
577577do
578578T.unref(Arr[i])
579579end
580−assert(type(T.getref(Arr[2])) == "\u{74}\u{61}\u{62}\u{6c}\u{65}")
581−assert(T.getref(- 1) == nil)
580+assert((type(T.getref(Arr[0x2])) == "\u{74}\u{61}\u{62}\u{6c}\u{65}"))
581+assert((T.getref((- 0x1)) == nil))
582582a=T.ref({})
583583collectgarbage()
584−assert(type(T.getref(a)) == "\u{74}\u{61}\u{62}\u{6c}\u{65}")
584+assert((type(T.getref(a)) == "\u{74}\u{61}\u{62}\u{6c}\u{65}"))
585585local tt = {}
586−local cl = {["\u{6e}"] = 0}
586+local cl = {["\u{6e}"] = 0x0}
587587A=nil
588588;
589589B=nil
@@ -591,20 +591,20 @@ local F
591591F=function (x)
592592local udval = T.udataval(x)
593593table.insert(cl,udval)
594−local d = T.newuserdata(100)
594+local d = T.newuserdata(0x64)
595595d=nil
596−assert(debug.getmetatable(x).__gc == F)
596+assert((debug.getmetatable(x).__gc == F))
597597assert(load("\u{74}\u{61}\u{62}\u{6c}\u{65}\u{2e}\u{69}\u{6e}\u{73}\u{65}\u{72}\u{74}\u{28}\u{7b}\u{7d}\u{2c}\u{20}\u{7b}\u{7d}\u{29}"))()
598−assert(not collectgarbage())
598+assert((not collectgarbage()))
599599local dummy = {}
600−if A ~= nil then
601−assert(type(A) == "\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}")
602−assert(T.udataval(A) == B)
600+if (A ~= nil) then
601+assert((type(A) == "\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}"))
602+assert((T.udataval(A) == B))
603603debug.getmetatable(A)
604604end
605605A=x
606606B=udval
607−return 1,2,3
607+return 0x1,0x2,0x3
608608end
609609tt.__gc=F
610610do
@@ -614,60 +614,60 @@ collectgarbage()
614614;
615615local x = collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}")
616616;
617−local a = T.newuserdata(5001)
618−assert(T.testC("\u{6f}\u{62}\u{6a}\u{73}\u{69}\u{7a}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",a) == 5001)
619−assert(collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") >= x + 4)
617+local a = T.newuserdata(0x1389)
618+assert((T.testC("\u{6f}\u{62}\u{6a}\u{73}\u{69}\u{7a}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",a) == 0x1389))
619+assert((collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") >= (x + 0x4)))
620620a=nil
621621collectgarbage()
622622;
623−assert(collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") <= x + 1)
623+assert((collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") <= (x + 0x1)))
624624x=collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}")
625625collectgarbage("\u{73}\u{74}\u{6f}\u{70}")
626−for i = 1, 1000
626+for i = 0x1, 0x3e8
627627do
628−T.newuserdata(0)
628+T.newuserdata(0x0)
629629end
630−assert(collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") > x + 10)
630+assert((collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") > (x + 0xa)))
631631collectgarbage()
632−assert(collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") <= x + 1)
632+assert((collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") <= (x + 0x1)))
633633collectgarbage()
634634x=collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}")
635635collectgarbage("\u{73}\u{74}\u{6f}\u{70}")
636636a={["\u{5f}\u{5f}\u{67}\u{63}"] = function ()
637637
638638end}
639−for i = 1, 1000
639+for i = 0x1, 0x3e8
640640do
641−debug.setmetatable(T.newuserdata(0),a)
641+debug.setmetatable(T.newuserdata(0x0),a)
642642end
643−assert(collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") >= x + 10)
643+assert((collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") >= (x + 0xa)))
644644collectgarbage()
645−assert(collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") >= x + 10)
645+assert((collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") >= (x + 0xa)))
646646collectgarbage()
647−assert(collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") <= x + 1)
647+assert((collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") <= (x + 0x1)))
648648collectgarbage("\u{72}\u{65}\u{73}\u{74}\u{61}\u{72}\u{74}")
649649end
650650collectgarbage("\u{73}\u{74}\u{6f}\u{70}")
651−a=T.newuserdata(0)
651+a=T.newuserdata(0x0)
652652;
653653debug.setmetatable(a,tt)
654654;
655655local na = T.udataval(a)
656−b=T.newuserdata(0)
656+b=T.newuserdata(0x0)
657657;
658658debug.setmetatable(b,tt)
659659;
660660local nb = T.udataval(b)
661−c=T.newuserdata(0)
661+c=T.newuserdata(0x0)
662662;
663663debug.setmetatable(c,tt)
664664;
665665local nc = T.udataval(c)
666−x=T.newuserdata(4)
667−y=T.newuserdata(0)
666+x=T.newuserdata(0x4)
667+y=T.newuserdata(0x0)
668668checkerr("\u{46}\u{49}\u{4c}\u{45}\u{25}\u{2a}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{2c}\u{20}\u{67}\u{6f}\u{74}\u{20}\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}",io.input,a)
669669checkerr("\u{46}\u{49}\u{4c}\u{45}\u{25}\u{2a}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{2c}\u{20}\u{67}\u{6f}\u{74}\u{20}\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}",io.input,x)
670−assert(debug.getmetatable(x) == nil and debug.getmetatable(y) == nil)
670+assert(((debug.getmetatable(x) == nil) and (debug.getmetatable(y) == nil)))
671671local d = T.ref(a)
672672;
673673local e = T.ref(b)
@@ -675,7 +675,7 @@ local e = T.ref(b)
675675local f = T.ref(c)
676676;
677677t={T.getref(d),T.getref(e),T.getref(f)}
678−assert(t[1] == a and t[2] == b and t[3] == c)
678+assert((((t[0x1] == a) and (t[0x2] == b)) and (t[0x3] == c)))
679679t=nil
680680;
681681a=nil
@@ -686,9 +686,9 @@ T.unref(e)
686686;
687687T.unref(f)
688688collectgarbage()
689−assert(# cl == 1 and cl[1] == nc)
689+assert((# ((cl == 0x1) and (cl[0x1] == nc))))
690690x=T.getref(d)
691−assert(type(x) == "\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}" and debug.getmetatable(x) == tt)
691+assert(((type(x) == "\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}") and (debug.getmetatable(x) == tt)))
692692x=nil
693693tt.b=b
694694tt=nil
@@ -696,17 +696,17 @@ A=nil
696696b=nil
697697T.unref(d)
698698;
699−local n5 = T.newuserdata(0)
699+local n5 = T.newuserdata(0x0)
700700debug.setmetatable(n5,{["\u{5f}\u{5f}\u{67}\u{63}"] = F})
701701n5=T.udataval(n5)
702702collectgarbage()
703−assert(# cl == 4)
704−assert(cl[2] == n5 and cl[3] == nb and cl[4] == na)
703+assert((# (cl == 0x4)))
704+assert((((cl[0x2] == n5) and (cl[0x3] == nb)) and (cl[0x4] == na)))
705705collectgarbage("\u{72}\u{65}\u{73}\u{74}\u{61}\u{72}\u{74}")
706706a,na={},{}
707−for i = 30, 1, - 1
707+for i = 0x1e, 0x1, (- 0x1)
708708do
709−a[i]=T.newuserdata(0)
709+a[i]=T.newuserdata(0x0)
710710debug.setmetatable(a[i],{["\u{5f}\u{5f}\u{67}\u{63}"] = F})
711711na[i]=T.udataval(a[i])
712712end
@@ -714,96 +714,96 @@ cl={}
714714a=nil
715715;
716716collectgarbage()
717−assert(# cl == 30)
718−for i = 1, 30
717+assert((# (cl == 0x1e)))
718+for i = 0x1, 0x1e
719719do
720−assert(cl[i] == na[i])
720+assert((cl[i] == na[i]))
721721end
722722na=nil
723−for i = 2, Lim, 2
723+for i = 0x2, Lim, 0x2
724724do
725725T.unref(Arr[i])
726726end
727−x=T.newuserdata(41)
727+x=T.newuserdata(0x29)
728728;
729729debug.setmetatable(x,{["\u{5f}\u{5f}\u{67}\u{63}"] = F})
730−assert(T.testC("\u{6f}\u{62}\u{6a}\u{73}\u{69}\u{7a}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",x) == 41)
730+assert((T.testC("\u{6f}\u{62}\u{6a}\u{73}\u{69}\u{7a}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",x) == 0x29))
731731cl={}
732−a={[x] = 1}
732+a={[x] = 0x1}
733733x=T.udataval(x)
734734collectgarbage()
735−assert(# cl == 0)
735+assert((# (cl == 0x0)))
736736for n in pairs(a)
737737do
738738a[n]=undef
739739end
740740collectgarbage()
741−assert(# cl == 1 and cl[1] == x)
742−assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{34}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",print,1,print,20))
741+assert((# ((cl == 0x1) and (cl[0x1] == x))))
742+assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{34}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",print,0x1,print,0x14))
743743assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{33}\u{20}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}","\u{61}\u{6c}\u{6f}","\u{61}\u{6c}\u{6f}"))
744744assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",nil,nil))
745−assert(not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",{},{}))
746−assert(not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"))
747−assert(not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",3))
745+assert((not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",{},{})))
746+assert((not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}")))
747+assert((not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",0x3)))
748748do
749749local map = {}
750750local t = {["\u{5f}\u{5f}\u{65}\u{71}"] = function (a,b)
751−return map[a] == map[b]
751+return (map[a] == map[b])
752752end}
753753local function f
754754(x)
755−local u = T.newuserdata(0)
755+local u = T.newuserdata(0x0)
756756debug.setmetatable(u,t)
757757map[u]=x
758758return u
759759end
760−assert(f(10) == f(10))
761−assert(f(10) ~= f(11))
762−assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",f(10),f(10)))
763−assert(not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",f(10),f(20)))
760+assert((f(0xa) == f(0xa)))
761+assert((f(0xa) ~= f(0xb)))
762+assert(T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",f(0xa),f(0xa)))
763+assert((not T.testC("\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{65}\u{20}\u{45}\u{51}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",f(0xa),f(0x14))))
764764t.__eq=nil
765−assert(f(10) ~= f(10))
765+assert((f(0xa) ~= f(0xa)))
766766end
767767print("\u{2b}")
768768_G.TT={}
769−T.sethook("\u{20}\u{20}\u{23}\u{20}\u{73}\u{65}\u{74}\u{20}\u{61}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{20}\u{68}\u{6f}\u{6f}\u{6b}\u{20}\u{61}\u{66}\u{74}\u{65}\u{72}\u{20}\u{33}\u{20}\u{63}\u{6f}\u{75}\u{6e}\u{74}\u{20}\u{68}\u{6f}\u{6f}\u{6b}\u{73}\u{a}\u{20}\u{20}\u{73}\u{65}\u{74}\u{68}\u{6f}\u{6f}\u{6b}\u{20}\u{34}\u{20}\u{30}\u{20}\u{27}\u{a}\u{20}\u{20}\u{20}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{54}\u{54}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{2d}\u{33}\u{3b}\u{20}\u{61}\u{70}\u{70}\u{65}\u{6e}\u{64}\u{20}\u{2d}\u{32}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{2d}\u{32}\u{3b}\u{20}\u{61}\u{70}\u{70}\u{65}\u{6e}\u{64}\u{20}\u{2d}\u{32}\u{a}\u{20}\u{20}\u{27}","\u{63}",3)
770−local a = 1
771−a=1
772−a=1
773−a=1
774−a=1
769+T.sethook("\u{20}\u{20}\u{23}\u{20}\u{73}\u{65}\u{74}\u{20}\u{61}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{20}\u{68}\u{6f}\u{6f}\u{6b}\u{20}\u{61}\u{66}\u{74}\u{65}\u{72}\u{20}\u{33}\u{20}\u{63}\u{6f}\u{75}\u{6e}\u{74}\u{20}\u{68}\u{6f}\u{6f}\u{6b}\u{73}\u{a}\u{20}\u{20}\u{73}\u{65}\u{74}\u{68}\u{6f}\u{6f}\u{6b}\u{20}\u{34}\u{20}\u{30}\u{20}\u{27}\u{a}\u{20}\u{20}\u{20}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{54}\u{54}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{2d}\u{33}\u{3b}\u{20}\u{61}\u{70}\u{70}\u{65}\u{6e}\u{64}\u{20}\u{2d}\u{32}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{2d}\u{32}\u{3b}\u{20}\u{61}\u{70}\u{70}\u{65}\u{6e}\u{64}\u{20}\u{2d}\u{32}\u{a}\u{20}\u{20}\u{27}","\u{63}",0x3)
770+local a = 0x1
771+a=0x1
772+a=0x1
773+a=0x1
774+a=0x1
775775debug.sethook()
776776local t = _G.TT
777−assert(t[1] == "\u{6c}\u{69}\u{6e}\u{65}")
778−local line = t[2]
779−assert(t[3] == "\u{6c}\u{69}\u{6e}\u{65}" and t[4] == line + 1)
780−assert(t[5] == "\u{6c}\u{69}\u{6e}\u{65}" and t[6] == line + 2)
781−assert(t[7] == nil)
777+assert((t[0x1] == "\u{6c}\u{69}\u{6e}\u{65}"))
778+local line = t[0x2]
779+assert(((t[0x3] == "\u{6c}\u{69}\u{6e}\u{65}") and (t[0x4] == (line + 0x1))))
780+assert(((t[0x5] == "\u{6c}\u{69}\u{6e}\u{65}") and (t[0x6] == (line + 0x2))))
781+assert((t[0x7] == nil))
782782_G.TT=nil
783783do
784784warn("\u{40}\u{6f}\u{66}\u{66}")
785785collectgarbage("\u{73}\u{74}\u{6f}\u{70}")
786786local a = {}
787−for i = 1, 20
787+for i = 0x1, 0x14
788788do
789789a[i]=T.newuserdata(i)
790790end
791−for i = 1, 20, 2
791+for i = 0x1, 0x14, 0x2
792792do
793793debug.setmetatable(a[i],{["\u{5f}\u{5f}\u{67}\u{63}"] = function (x)
794794error("\u{40}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{69}\u{6e}\u{20}\u{67}\u{63}")
795795end})
796796end
797−for i = 2, 20, 2
797+for i = 0x2, 0x14, 0x2
798798do
799799debug.setmetatable(a[i],{["\u{5f}\u{5f}\u{67}\u{63}"] = function (x)
800800load("\u{41}\u{3d}\u{41}\u{2b}\u{31}")()
801801end})
802802end
803803a=nil
804−_G.A=0
804+_G.A=0x0
805805collectgarbage()
806−assert(A == 10)
806+assert((A == 0xa))
807807collectgarbage("\u{72}\u{65}\u{73}\u{74}\u{61}\u{72}\u{74}")
808808warn("\u{40}\u{6f}\u{6e}")
809809end
@@ -811,52 +811,52 @@ _G.A=nil
811811do
812812local a = {}
813813;
814−local lim = 30
815−for i = 0, lim
814+local lim = 0x1e
815+for i = 0x0, lim
816816do
817817a[i]=T.pushuserdata(i)
818818end
819−for i = 0, lim
819+for i = 0x0, lim
820820do
821−assert(T.udataval(a[i]) == i)
821+assert((T.udataval(a[i]) == i))
822822end
823−for i = 0, lim
823+for i = 0x0, lim
824824do
825−assert(T.pushuserdata(i) == a[i])
825+assert((T.pushuserdata(i) == a[i]))
826826end
827−for i = 0, lim
827+for i = 0x0, lim
828828do
829829a[a[i]]=i
830830end
831−for i = 0, lim
831+for i = 0x0, lim
832832do
833833a[T.pushuserdata(i)]=i
834834end
835−assert(type(tostring(a[1])) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")
835+assert((type(tostring(a[0x1])) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"))
836836end
837837T.closestate(T.newstate())
838838;
839839L1=T.newstate()
840840assert(L1)
841−assert(T.doremote(L1,"\u{58}\u{3d}\u{27}\u{61}\u{27}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{27}\u{61}\u{27}") == "\u{61}")
842−assert(# pack(T.doremote(L1,"\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{20}\u{28}\u{29}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{27}\u{61}\u{6c}\u{6f}\u{27}\u{2c}\u{20}\u{33}\u{20}\u{65}\u{6e}\u{64}\u{3b}\u{20}\u{66}\u{28}\u{29}")) == 0)
841+assert((T.doremote(L1,"\u{58}\u{3d}\u{27}\u{61}\u{27}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{27}\u{61}\u{27}") == "\u{61}"))
842+assert((# (pack(T.doremote(L1,"\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{20}\u{28}\u{29}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{27}\u{61}\u{6c}\u{6f}\u{27}\u{2c}\u{20}\u{33}\u{20}\u{65}\u{6e}\u{64}\u{3b}\u{20}\u{66}\u{28}\u{29}")) == 0x0)))
843843a,b=T.doremote(L1,"\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{66}\u{28}\u{29}")
844−assert(a == "\u{61}\u{6c}\u{6f}" and b == "\u{33}")
844+assert(((a == "\u{61}\u{6c}\u{6f}") and (b == "\u{33}")))
845845T.doremote(L1,"\u{5f}\u{45}\u{52}\u{52}\u{4f}\u{52}\u{4d}\u{45}\u{53}\u{53}\u{41}\u{47}\u{45}\u{20}\u{3d}\u{20}\u{6e}\u{69}\u{6c}")
846846a,b,c=T.doremote(L1,"\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{73}\u{69}\u{6e}\u{28}\u{31}\u{29}")
847−assert(a == nil and c == 2)
847+assert(((a == nil) and (c == 0x2)))
848848a,b,c=T.doremote(L1,"\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{61}\u{2b}")
849−assert(a == nil and c == 3 and type(b) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")
849+assert((((a == nil) and (c == 0x3)) and (type(b) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")))
850850T.loadlib(L1)
851851a,b,c=T.doremote(L1,"\u{20}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{3d}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{27}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{27}\u{a}\u{20}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{27}\u{5f}\u{47}\u{27}\u{3b}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{61}\u{20}\u{3d}\u{3d}\u{20}\u{5f}\u{47}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{28}\u{22}\u{5f}\u{47}\u{22}\u{29}\u{20}\u{3d}\u{3d}\u{20}\u{61}\u{29}\u{a}\u{20}\u{20}\u{69}\u{6f}\u{20}\u{3d}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{27}\u{69}\u{6f}\u{27}\u{3b}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{74}\u{79}\u{70}\u{65}\u{28}\u{69}\u{6f}\u{2e}\u{72}\u{65}\u{61}\u{64}\u{29}\u{20}\u{3d}\u{3d}\u{20}\u{22}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{22}\u{29}\u{a}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{28}\u{22}\u{69}\u{6f}\u{22}\u{29}\u{20}\u{3d}\u{3d}\u{20}\u{69}\u{6f}\u{29}\u{a}\u{20}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{27}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{27}\u{3b}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{74}\u{79}\u{70}\u{65}\u{28}\u{61}\u{2e}\u{69}\u{6e}\u{73}\u{65}\u{72}\u{74}\u{29}\u{20}\u{3d}\u{3d}\u{20}\u{22}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{22}\u{29}\u{a}\u{20}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{27}\u{64}\u{65}\u{62}\u{75}\u{67}\u{27}\u{3b}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{74}\u{79}\u{70}\u{65}\u{28}\u{61}\u{2e}\u{67}\u{65}\u{74}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{29}\u{20}\u{3d}\u{3d}\u{20}\u{22}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{22}\u{29}\u{a}\u{20}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{27}\u{6d}\u{61}\u{74}\u{68}\u{27}\u{3b}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{74}\u{79}\u{70}\u{65}\u{28}\u{61}\u{2e}\u{73}\u{69}\u{6e}\u{29}\u{20}\u{3d}\u{3d}\u{20}\u{22}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{22}\u{29}\u{a}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{2e}\u{73}\u{75}\u{62}\u{28}\u{27}\u{6f}\u{6b}\u{69}\u{6e}\u{61}\u{6d}\u{61}\u{27}\u{2c}\u{20}\u{31}\u{2c}\u{20}\u{32}\u{29}\u{a}")
852−assert(a == "\u{6f}\u{6b}")
852+assert((a == "\u{6f}\u{6b}"))
853853T.closestate(L1)
854854;
855855L1=T.newstate()
856856T.loadlib(L1)
857857T.doremote(L1,"\u{61}\u{20}\u{3d}\u{20}\u{7b}\u{7d}")
858858T.testC(L1,"\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{22}\u{61}\u{22}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{22}\u{78}\u{22}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{31}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{73}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{33}")
859−assert(T.doremote(L1,"\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{61}\u{2e}\u{78}") == "\u{31}")
859+assert((T.doremote(L1,"\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{61}\u{2e}\u{78}") == "\u{31}"))
860860T.closestate(L1)
861861L1=nil
862862print("\u{2b}")
@@ -865,42 +865,42 @@ do
865865local openresource = {}
866866local function newresource
867867()
868−local x = setmetatable({10},{["\u{5f}\u{5f}\u{63}\u{6c}\u{6f}\u{73}\u{65}"] = function (y)
869−assert(openresource[# openresource] == y)
870−openresource[# openresource]=nil
871−y[1]=y[1] + 1
868+local x = setmetatable({0xa},{["\u{5f}\u{5f}\u{63}\u{6c}\u{6f}\u{73}\u{65}"] = function (y)
869+assert((openresource[(# openresource)] == y))
870+openresource[(# openresource)]=nil
871+y[0x1]=(y[0x1] + 0x1)
872872end})
873−openresource[# openresource + 1]=x
873+openresource[(# (openresource + 0x1))]=x
874874return x
875875end
876876local a,b = T.testC("\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{69}\u{6c}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{32}\u{20}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{20}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{6e}\u{69}\u{6c}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{20}\u{28}\u{77}\u{69}\u{6c}\u{6c}\u{20}\u{62}\u{65}\u{20}\u{69}\u{67}\u{6e}\u{6f}\u{72}\u{65}\u{64}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}\u{a}\u{20}\u{20}",newresource)
877−assert(a[1] == 11 and b == nil)
878−assert(# openresource == 0)
877+assert(((a[0x1] == 0xb) and (b == nil)))
878+assert((# (openresource == 0x0)))
879879local a = {T.testC("\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{32}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{69}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}\u{a}\u{20}\u{20}",newresource)}
880−assert(type(a[1]) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}" and a[2][1] == 11)
881−assert(# openresource == 0)
880+assert(((type(a[0x1]) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}") and (a[0x2][0x1] == 0xb)))
881+assert((# (openresource == 0x0)))
882882local a,b = pcall(T.makeCfunc("\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{69}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{20}\u{69}\u{73}\u{20}\u{74}\u{68}\u{65}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{6f}\u{62}\u{6a}\u{65}\u{63}\u{74}\u{a}\u{20}\u{20}"),newresource)
883−assert(a == false and b[1] == 11)
884−assert(# openresource == 0)
883+assert(((a == false) and (b[0x1] == 0xb)))
884+assert((# (openresource == 0x0)))
885885local a,b = pcall(T.makeCfunc("\u{20}\u{20}\u{20}\u{20}\u{6e}\u{65}\u{77}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{6e}\u{6f}\u{6e}\u{2d}\u{63}\u{6c}\u{6f}\u{73}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{6f}\u{62}\u{6a}\u{65}\u{63}\u{74}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{69}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{20}\u{28}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{72}\u{61}\u{69}\u{73}\u{65}\u{20}\u{61}\u{6e}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{62}\u{6f}\u{72}\u{74}\u{20}\u{20}\u{23}\u{20}\u{77}\u{69}\u{6c}\u{6c}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{65}\u{78}\u{65}\u{63}\u{75}\u{74}\u{65}\u{64}\u{a}\u{20}\u{20}"))
886−assert(a == false and string.find(b,"\u{6e}\u{6f}\u{6e}\u{25}\u{2d}\u{63}\u{6c}\u{6f}\u{73}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}"))
886+assert(((a == false) and string.find(b,"\u{6e}\u{6f}\u{6e}\u{25}\u{2d}\u{63}\u{6c}\u{6f}\u{73}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}")))
887887local function check
888888(n)
889−assert(# openresource == n)
889+assert((# (openresource == n)))
890890end
891891_ENV.xxx=true
892892local a = T.testC("\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{32}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{4e}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{3b}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{69}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{32}\u{20}\u{20}\u{23}\u{20}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{4e}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{61}\u{6e}\u{6f}\u{74}\u{68}\u{65}\u{72}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{3b}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{69}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{33}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{32}\u{20}\u{20}\u{20}\u{23}\u{20}\u{74}\u{68}\u{65}\u{72}\u{65}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{62}\u{65}\u{20}\u{74}\u{77}\u{6f}\u{20}\u{6f}\u{70}\u{65}\u{6e}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{73}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{31}\u{20}\u{30}\u{20}\u{20}\u{23}\u{20}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{73}\u{6c}\u{6f}\u{74}\u{20}\u{2d}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{73}\u{65}\u{63}\u{6f}\u{6e}\u{64}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{33}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{74}\u{68}\u{65}\u{72}\u{65}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{62}\u{65}\u{20}\u{6f}\u{6e}\u{65}\u{20}\u{6f}\u{70}\u{65}\u{6e}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{31}\u{20}\u{30}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{73}\u{6c}\u{6f}\u{74}\u{20}\u{34}\u{a}\u{20}\u{20}\u{20}\u{20}\u{73}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{22}\u{78}\u{78}\u{78}\u{22}\u{20}\u{20}\u{23}\u{20}\u{70}\u{72}\u{65}\u{76}\u{69}\u{6f}\u{75}\u{73}\u{20}\u{6f}\u{70}\u{2e}\u{20}\u{65}\u{72}\u{61}\u{73}\u{65}\u{64}\u{20}\u{74}\u{68}\u{65}\u{20}\u{73}\u{6c}\u{6f}\u{74}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{6f}\u{70}\u{20}\u{31}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{70}\u{6f}\u{70}\u{20}\u{6f}\u{74}\u{68}\u{65}\u{72}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{20}\u{66}\u{72}\u{6f}\u{6d}\u{20}\u{74}\u{68}\u{65}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{2a}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{73}\u{69}\u{7a}\u{65}\u{a}\u{20}\u{20}",newresource,check)
893−assert(a == 3 and _ENV.xxx == nil)
893+assert(((a == 0x3) and (_ENV.xxx == nil)))
894894local a = T.testC("\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{32}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{4e}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{3b}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{69}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{32}\u{20}\u{20}\u{23}\u{20}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{4e}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{61}\u{6e}\u{6f}\u{74}\u{68}\u{65}\u{72}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{3b}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{20}\u{23}\u{20}\u{6d}\u{61}\u{72}\u{6b}\u{20}\u{69}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{33}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{32}\u{20}\u{20}\u{20}\u{23}\u{20}\u{74}\u{68}\u{65}\u{72}\u{65}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{62}\u{65}\u{20}\u{74}\u{77}\u{6f}\u{20}\u{6f}\u{70}\u{65}\u{6e}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{73}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{31}\u{20}\u{30}\u{20}\u{20}\u{23}\u{20}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{6f}\u{70}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{70}\u{6f}\u{70}\u{20}\u{73}\u{65}\u{63}\u{6f}\u{6e}\u{64}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{33}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{31}\u{20}\u{20}\u{20}\u{23}\u{20}\u{74}\u{68}\u{65}\u{72}\u{65}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{62}\u{65}\u{20}\u{6f}\u{6e}\u{65}\u{20}\u{6f}\u{70}\u{65}\u{6e}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{31}\u{20}\u{30}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{52}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{6f}\u{70}\u{20}\u{31}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{70}\u{6f}\u{70}\u{20}\u{6f}\u{74}\u{68}\u{65}\u{72}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{20}\u{66}\u{72}\u{6f}\u{6d}\u{20}\u{74}\u{68}\u{65}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{33}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{2c}\u{20}\u{43}\u{48}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{30}\u{20}\u{20}\u{20}\u{23}\u{20}\u{74}\u{68}\u{65}\u{72}\u{65}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{62}\u{65}\u{20}\u{6e}\u{6f}\u{20}\u{6f}\u{70}\u{65}\u{6e}\u{20}\u{72}\u{65}\u{73}\u{6f}\u{75}\u{72}\u{63}\u{65}\u{73}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{31}\u{20}\u{30}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{3a}\u{20}\u{53}\u{2c}\u{20}\u{4e}\u{52}\u{2c}\u{20}\u{43}\u{48}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{2a}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{73}\u{69}\u{7a}\u{65}\u{a}\u{20}\u{20}",newresource,check)
895−assert(a == 3)
895+assert((a == 0x3))
896896local a,b = pcall(T.makeCfunc("\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{33}\u{32}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{2d}\u{31}\u{a}\u{20}\u{20}"))
897−assert(not a and string.find(b,"\u{28}\u{43}\u{20}\u{74}\u{65}\u{6d}\u{70}\u{6f}\u{72}\u{61}\u{72}\u{79}\u{29}"))
897+assert((not (a and string.find(b,"\u{28}\u{43}\u{20}\u{74}\u{65}\u{6d}\u{70}\u{6f}\u{72}\u{61}\u{72}\u{79}\u{29}"))))
898898end
899899print("\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}\u{2d}\u{61}\u{6c}\u{6c}\u{6f}\u{63}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{73}")
900900checkerr("\u{62}\u{6c}\u{6f}\u{63}\u{6b}\u{20}\u{74}\u{6f}\u{6f}\u{20}\u{62}\u{69}\u{67}",T.newuserdata,math.maxinteger)
901901collectgarbage()
902902local f = load("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{3d}\u{7b}\u{7d}\u{3b}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{69}\u{3d}\u{31}\u{2c}\u{31}\u{30}\u{30}\u{30}\u{30}\u{30}\u{20}\u{64}\u{6f}\u{20}\u{61}\u{5b}\u{69}\u{5d}\u{3d}\u{69}\u{20}\u{65}\u{6e}\u{64}")
903−T.alloccount(10)
903+T.alloccount(0xa)
904904checkerr(MEMERRMSG,f)
905905T.alloccount()
906906local function testbytes
@@ -915,22 +915,22 @@ collectgarbage()
915915collectgarbage()
916916T.totalmem(M)
917917a,b=T.testC("\u{70}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{20}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{61}\u{74}\u{75}\u{73}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",f)
918−T.totalmem(0)
919−if a and b == "\u{4f}\u{4b}" then
918+T.totalmem(0x0)
919+if (a and (b == "\u{4f}\u{4b}")) then
920920break
921921end
922−if b ~= "\u{4f}\u{4b}" and b ~= MEMERRMSG then
923−error(a,0)
922+if ((b ~= "\u{4f}\u{4b}") and (b ~= MEMERRMSG)) then
923+error(a,0x0)
924924end
925−M=M + 7
925+M=(M + 0x7)
926926end
927−print(string.format("\u{6d}\u{69}\u{6e}\u{69}\u{6d}\u{75}\u{6d}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{25}\u{73}\u{3a}\u{20}\u{25}\u{64}\u{20}\u{62}\u{79}\u{74}\u{65}\u{73}",s,M - oldM))
927+print(string.format("\u{6d}\u{69}\u{6e}\u{69}\u{6d}\u{75}\u{6d}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{25}\u{73}\u{3a}\u{20}\u{25}\u{64}\u{20}\u{62}\u{79}\u{74}\u{65}\u{73}",s,(M - oldM)))
928928return a
929929end
930930local function testalloc
931931(s,f)
932932collectgarbage()
933−local M = 0
933+local M = 0x0
934934local a,b = nil
935935while true do
936936collectgarbage()
@@ -939,13 +939,13 @@ collectgarbage()
939939T.alloccount(M)
940940a,b=T.testC("\u{70}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{20}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{61}\u{74}\u{75}\u{73}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",f)
941941T.alloccount()
942−if a and b == "\u{4f}\u{4b}" then
942+if (a and (b == "\u{4f}\u{4b}")) then
943943break
944944end
945−if b ~= "\u{4f}\u{4b}" and b ~= MEMERRMSG then
946−error(a,0)
945+if ((b ~= "\u{4f}\u{4b}") and (b ~= MEMERRMSG)) then
946+error(a,0x0)
947947end
948−M=M + 1
948+M=(M + 0x1)
949949end
950950print(string.format("\u{6d}\u{69}\u{6e}\u{69}\u{6d}\u{75}\u{6d}\u{20}\u{61}\u{6c}\u{6c}\u{6f}\u{63}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{73}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{25}\u{73}\u{3a}\u{20}\u{25}\u{64}\u{20}\u{61}\u{6c}\u{6c}\u{6f}\u{63}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{73}",s,M))
951951return a
@@ -956,9 +956,9 @@ testalloc(s,f)
956956return testbytes(s,f)
957957end
958958b=testamem("\u{64}\u{6f}\u{69}\u{6e}\u{67}\u{20}\u{6e}\u{6f}\u{74}\u{68}\u{69}\u{6e}\u{67}",function ()
959−return 10
959+return 0xa
960960end)
961−assert(b == 10)
961+assert((b == 0xa))
962962testamem("\u{73}\u{74}\u{61}\u{74}\u{65}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{69}\u{6f}\u{6e}",function ()
963963local st = T.newstate()
964964if st then
@@ -970,7 +970,7 @@ testamem("\u{65}\u{6d}\u{70}\u{74}\u{79}\u{2d}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{2
970970return {}
971971end)
972972testamem("\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{69}\u{6f}\u{6e}",function ()
973−return "\u{58}\u{58}\u{58}" .. "\u{59}\u{59}\u{59}"
973+return ("\u{58}\u{58}\u{58}" .. "\u{59}\u{59}\u{59}")
974974end)
975975testamem("\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{69}\u{6f}\u{6e}",function ()
976976return coroutine.create(print)
@@ -987,28 +987,28 @@ end
987987return flag
988988end)
989989local mt = T.testC("\u{72}\u{61}\u{77}\u{67}\u{65}\u{74}\u{69}\u{20}\u{52}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}")
990−assert(type(mt) == "\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}" and coroutine.running() == mt)
990+assert(((type(mt) == "\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}") and (coroutine.running() == mt)))
991991local function expand
992992(n,s)
993−if n == 0 then
993+if (n == 0x0) then
994994return ""
995995end
996996local e = string.rep("\u{3d}",n)
997−return string.format("\u{54}\u{2e}\u{64}\u{6f}\u{6f}\u{6e}\u{6e}\u{65}\u{77}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{28}\u{5b}\u{25}\u{73}\u{5b}\u{20}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{63}\u{6f}\u{6c}\u{6c}\u{65}\u{63}\u{74}\u{67}\u{61}\u{72}\u{62}\u{61}\u{67}\u{65}\u{28}\u{29}\u{3b}\u{20}\u{25}\u{73}\u{5d}\u{25}\u{73}\u{5d}\u{29}\u{a}",e,s,expand(n - 1,s),e)
997+return string.format("\u{54}\u{2e}\u{64}\u{6f}\u{6f}\u{6e}\u{6e}\u{65}\u{77}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{28}\u{5b}\u{25}\u{73}\u{5b}\u{20}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{63}\u{6f}\u{6c}\u{6c}\u{65}\u{63}\u{74}\u{67}\u{61}\u{72}\u{62}\u{61}\u{67}\u{65}\u{28}\u{29}\u{3b}\u{20}\u{25}\u{73}\u{5d}\u{25}\u{73}\u{5d}\u{29}\u{a}",e,s,expand((n - 0x1),s),e)
998998end
999−G=0
999+G=0x0
10001000;
10011001collectgarbage()
10021002;
10031003a=collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}")
1004−load(expand(20,"\u{47}\u{3d}\u{47}\u{2b}\u{31}"))()
1005−assert(G == 20)
1004+load(expand(0x14,"\u{47}\u{3d}\u{47}\u{2b}\u{31}"))()
1005+assert((G == 0x14))
10061006;
10071007collectgarbage()
10081008;
10091009G=nil
10101010testamem("\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{6f}\u{64}\u{65}\u{20}\u{6f}\u{6e}\u{20}\u{6e}\u{65}\u{77}\u{20}\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}",function ()
1011−return T.doonnewstack("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{78}\u{3d}\u{31}") == 0
1011+return (T.doonnewstack("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{78}\u{3d}\u{31}") == 0x0)
10121012end)
10131013testamem("\u{6c}\u{6f}\u{61}\u{64}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}",function ()
10141014return load("\u{78}\u{3d}\u{31}")
@@ -1021,145 +1021,145 @@ f:write(testprog)
10211021f:close()
10221022testamem("\u{64}\u{6f}\u{66}\u{69}\u{6c}\u{65}",function ()
10231023local a = loadfile(t)
1024−return a and a()
1024+return (a and a())
10251025end)
10261026assert(os.remove(t))
1027−assert(_G.AA == "\u{61}\u{61}\u{61}\u{78}")
1027+assert((_G.AA == "\u{61}\u{61}\u{61}\u{78}"))
10281028testamem("\u{67}\u{73}\u{75}\u{62}",function ()
10291029local a,b = string.gsub("\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}","\u{28}\u{61}\u{29}",function (x)
1030−return x .. "\u{62}"
1030+return (x .. "\u{62}")
10311031end)
10321032return (a == "\u{61}\u{62}\u{6c}\u{6f}\u{20}\u{61}\u{62}\u{6c}\u{6f}")
10331033end)
10341034testamem("\u{64}\u{75}\u{6d}\u{70}\u{2f}\u{75}\u{6e}\u{64}\u{75}\u{6d}\u{70}",function ()
10351035local a = load(testprog)
1036−local b = a and string.dump(a)
1037−a=b and load(b)
1038−return a and a()
1036+local b = (a and string.dump(a))
1037+a=(b and load(b))
1038+return (a and a())
10391039end)
10401040_G.AA=nil
10411041local t = os.tmpname()
10421042testamem("\u{66}\u{69}\u{6c}\u{65}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{69}\u{6f}\u{6e}",function ()
10431043local f = assert(io.open(t,"\u{77}"))
1044−assert(not io.open("\u{6e}\u{6f}\u{6d}\u{65}\u{6e}\u{61}\u{6f}\u{65}\u{78}\u{69}\u{73}\u{74}\u{65}\u{6e}\u{74}\u{65}"))
1044+assert((not io.open("\u{6e}\u{6f}\u{6d}\u{65}\u{6e}\u{61}\u{6f}\u{65}\u{78}\u{69}\u{73}\u{74}\u{65}\u{6e}\u{74}\u{65}")))
10451045io.close(f)
10461046;
1047−return not loadfile("\u{6e}\u{6f}\u{6d}\u{65}\u{6e}\u{61}\u{6f}\u{65}\u{78}\u{69}\u{73}\u{74}\u{65}\u{6e}\u{74}\u{65}")
1047+return (not loadfile("\u{6e}\u{6f}\u{6d}\u{65}\u{6e}\u{61}\u{6f}\u{65}\u{78}\u{69}\u{73}\u{74}\u{65}\u{6e}\u{74}\u{65}"))
10481048end)
10491049assert(os.remove(t))
10501050testamem("\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{69}\u{6f}\u{6e}",function ()
1051−local a,lim = {},10
1052−for i = 1, lim
1051+local a,lim = {},0xa
1052+for i = 0x1, lim
10531053do
10541054a[i]=i
10551055;
1056−a[i .. "\u{61}"]={}
1056+a[(i .. "\u{61}")]={}
10571057end
1058−return (type(a[lim .. "\u{61}"]) == "\u{74}\u{61}\u{62}\u{6c}\u{65}" and a[lim] == lim)
1058+return ((type(a[(lim .. "\u{61}")]) == "\u{74}\u{61}\u{62}\u{6c}\u{65}") and (a[lim] == lim))
10591059end)
10601060testamem("\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{72}\u{75}\u{63}\u{74}\u{6f}\u{72}\u{73}",function ()
1061−local a = {10,20,30,40,50,["\u{61}"] = 1,["\u{62}"] = 2,["\u{63}"] = 3,["\u{64}"] = 4,["\u{65}"] = 5}
1062−return (type(a) == "\u{74}\u{61}\u{62}\u{6c}\u{65}" and a.e == 5)
1061+local a = {0xa,0x14,0x1e,0x28,0x32,["\u{61}"] = 0x1,["\u{62}"] = 0x2,["\u{63}"] = 0x3,["\u{64}"] = 0x4,["\u{65}"] = 0x5}
1062+return ((type(a) == "\u{74}\u{61}\u{62}\u{6c}\u{65}") and (a.e == 0x5))
10631063end)
1064−local a = 1
1064+local a = 0x1
10651065local close = nil
10661066testamem("\u{63}\u{6c}\u{6f}\u{73}\u{75}\u{72}\u{65}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{69}\u{6f}\u{6e}",function ()
10671067function close(b)
10681068return function (x)
1069−return b + x
1069+return (b + x)
10701070end
10711071end
1072−return (close(2)(4) == 6)
1072+return (close(0x2)(0x4) == 0x6)
10731073end)
10741074testamem("\u{75}\u{73}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{73}",function ()
10751075local a = coroutine.wrap(function ()
1076−coroutine.yield(string.rep("\u{61}",10))
1076+coroutine.yield(string.rep("\u{61}",0xa))
10771077return {}
10781078end)
1079−assert(string.len(a()) == 10)
1079+assert((string.len(a()) == 0xa))
10801080return a()
10811081end)
10821082do
1083−local lim = 100
1083+local lim = 0x64
10841084local a = {}
10851085;
1086−for i = 1, lim
1086+for i = 0x1, lim
10871087do
10881088a[i]="\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}"
10891089end
10901090testamem("\u{61}\u{75}\u{78}\u{69}\u{6c}\u{69}\u{61}\u{72}\u{79}\u{20}\u{62}\u{75}\u{66}\u{66}\u{65}\u{72}",function ()
1091−return (# table.concat(a,"\u{2c}") == 20 * lim + lim - 1)
1091+return (# (table.concat(a,"\u{2c}") == (((0x14 * lim) + lim) - 0x1)))
10921092end)
10931093end
10941094testamem("\u{67}\u{72}\u{6f}\u{77}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}",function ()
10951095local function foo
10961096(n)
1097−if n == 0 then
1098−return 1
1097+if (n == 0x0) then
1098+return 0x1
10991099else
1100−return 1 + foo(n - 1)
1100+return (0x1 + foo((n - 0x1)))
11011101end
11021102end
1103−return foo(100)
1103+return foo(0x64)
11041104end)
11051105do
11061106local res = T.testC("\u{72}\u{61}\u{77}\u{63}\u{68}\u{65}\u{63}\u{6b}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{35}\u{30}\u{30}\u{30}\u{30}\u{30}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}")
1107−assert(res == false)
1107+assert((res == false))
11081108local L = T.newstate()
1109−T.alloccount(0)
1109+T.alloccount(0x0)
11101110res=T.testC(L,"\u{72}\u{61}\u{77}\u{63}\u{68}\u{65}\u{63}\u{6b}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{35}\u{30}\u{30}\u{30}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}")
11111111T.alloccount()
11121112T.closestate(L)
1113−assert(res == false)
1113+assert((res == false))
11141114end
11151115do
11161116local L = T.newstate()
1117−T.alloccount(0)
1117+T.alloccount(0x0)
11181118T.closestate(L)
11191119T.alloccount()
11201120end
11211121do
11221122local L = T.newstate()
11231123T.loadlib(L)
1124−local res = (T.doremote(L,"\u{20}\u{20}\u{20}\u{20}\u{5f}\u{45}\u{4e}\u{56}\u{20}\u{3d}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{22}\u{5f}\u{47}\u{22}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{54}\u{20}\u{3d}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{22}\u{54}\u{22}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{7b}\u{7d}\u{a}\u{20}\u{20}\u{20}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{69}\u{20}\u{3d}\u{20}\u{31}\u{2c}\u{20}\u{31}\u{30}\u{30}\u{30}\u{20}\u{64}\u{6f}\u{20}\u{61}\u{5b}\u{69}\u{5d}\u{20}\u{3d}\u{20}\u{27}\u{69}\u{27}\u{20}\u{2e}\u{2e}\u{20}\u{69}\u{20}\u{65}\u{6e}\u{64}\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{67}\u{72}\u{6f}\u{77}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{73}\u{74}\u{73}\u{69}\u{7a}\u{65}\u{2c}\u{20}\u{73}\u{74}\u{75}\u{73}\u{65}\u{20}\u{3d}\u{20}\u{54}\u{2e}\u{71}\u{75}\u{65}\u{72}\u{79}\u{73}\u{74}\u{72}\u{28}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{73}\u{74}\u{75}\u{73}\u{65}\u{20}\u{3e}\u{20}\u{31}\u{30}\u{30}\u{30}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{6f}\u{6f}\u{20}\u{28}\u{6e}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{69}\u{66}\u{20}\u{6e}\u{20}\u{3e}\u{20}\u{30}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{20}\u{66}\u{6f}\u{6f}\u{28}\u{6e}\u{20}\u{2d}\u{20}\u{31}\u{29}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{66}\u{6f}\u{6f}\u{28}\u{31}\u{38}\u{30}\u{29}\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{67}\u{72}\u{6f}\u{77}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{5f}\u{2c}\u{20}\u{73}\u{74}\u{6b}\u{73}\u{69}\u{7a}\u{65}\u{20}\u{3d}\u{20}\u{54}\u{2e}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{6c}\u{65}\u{76}\u{65}\u{6c}\u{28}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{73}\u{74}\u{6b}\u{73}\u{69}\u{7a}\u{65}\u{20}\u{3e}\u{20}\u{31}\u{38}\u{30}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{6e}\u{69}\u{6c}\u{a}\u{20}\u{20}\u{20}\u{20}\u{54}\u{2e}\u{61}\u{6c}\u{6c}\u{6f}\u{63}\u{63}\u{6f}\u{75}\u{6e}\u{74}\u{28}\u{30}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{6f}\u{6c}\u{6c}\u{65}\u{63}\u{74}\u{67}\u{61}\u{72}\u{62}\u{61}\u{67}\u{65}\u{28}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{54}\u{2e}\u{61}\u{6c}\u{6c}\u{6f}\u{63}\u{63}\u{6f}\u{75}\u{6e}\u{74}\u{28}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{63}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{72}\u{65}\u{61}\u{6c}\u{6c}\u{6f}\u{63}\u{61}\u{74}\u{65}\u{64}\u{2c}\u{a}\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{73}\u{6f}\u{20}\u{74}\u{68}\u{65}\u{79}\u{20}\u{6b}\u{65}\u{70}\u{74}\u{20}\u{74}\u{68}\u{65}\u{69}\u{72}\u{20}\u{73}\u{69}\u{7a}\u{65}\u{73}\u{20}\u{28}\u{77}\u{69}\u{74}\u{68}\u{6f}\u{75}\u{74}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{73}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{73}\u{65}\u{6c}\u{65}\u{63}\u{74}\u{28}\u{32}\u{2c}\u{20}\u{54}\u{2e}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{6c}\u{65}\u{76}\u{65}\u{6c}\u{28}\u{29}\u{29}\u{20}\u{3d}\u{3d}\u{20}\u{73}\u{74}\u{6b}\u{73}\u{69}\u{7a}\u{65}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{54}\u{2e}\u{71}\u{75}\u{65}\u{72}\u{79}\u{73}\u{74}\u{72}\u{28}\u{29}\u{20}\u{3d}\u{3d}\u{20}\u{73}\u{74}\u{73}\u{69}\u{7a}\u{65}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{27}\u{6f}\u{6b}\u{27}\u{a}\u{20}\u{20}"))
1125−assert(res == "\u{6f}\u{6b}")
1124+local res = T.doremote(L,"\u{20}\u{20}\u{20}\u{20}\u{5f}\u{45}\u{4e}\u{56}\u{20}\u{3d}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{22}\u{5f}\u{47}\u{22}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{54}\u{20}\u{3d}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{22}\u{54}\u{22}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{7b}\u{7d}\u{a}\u{20}\u{20}\u{20}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{69}\u{20}\u{3d}\u{20}\u{31}\u{2c}\u{20}\u{31}\u{30}\u{30}\u{30}\u{20}\u{64}\u{6f}\u{20}\u{61}\u{5b}\u{69}\u{5d}\u{20}\u{3d}\u{20}\u{27}\u{69}\u{27}\u{20}\u{2e}\u{2e}\u{20}\u{69}\u{20}\u{65}\u{6e}\u{64}\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{67}\u{72}\u{6f}\u{77}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{73}\u{74}\u{73}\u{69}\u{7a}\u{65}\u{2c}\u{20}\u{73}\u{74}\u{75}\u{73}\u{65}\u{20}\u{3d}\u{20}\u{54}\u{2e}\u{71}\u{75}\u{65}\u{72}\u{79}\u{73}\u{74}\u{72}\u{28}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{73}\u{74}\u{75}\u{73}\u{65}\u{20}\u{3e}\u{20}\u{31}\u{30}\u{30}\u{30}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{6f}\u{6f}\u{20}\u{28}\u{6e}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{69}\u{66}\u{20}\u{6e}\u{20}\u{3e}\u{20}\u{30}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{20}\u{66}\u{6f}\u{6f}\u{28}\u{6e}\u{20}\u{2d}\u{20}\u{31}\u{29}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{66}\u{6f}\u{6f}\u{28}\u{31}\u{38}\u{30}\u{29}\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{67}\u{72}\u{6f}\u{77}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{5f}\u{2c}\u{20}\u{73}\u{74}\u{6b}\u{73}\u{69}\u{7a}\u{65}\u{20}\u{3d}\u{20}\u{54}\u{2e}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{6c}\u{65}\u{76}\u{65}\u{6c}\u{28}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{73}\u{74}\u{6b}\u{73}\u{69}\u{7a}\u{65}\u{20}\u{3e}\u{20}\u{31}\u{38}\u{30}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{6e}\u{69}\u{6c}\u{a}\u{20}\u{20}\u{20}\u{20}\u{54}\u{2e}\u{61}\u{6c}\u{6c}\u{6f}\u{63}\u{63}\u{6f}\u{75}\u{6e}\u{74}\u{28}\u{30}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{63}\u{6f}\u{6c}\u{6c}\u{65}\u{63}\u{74}\u{67}\u{61}\u{72}\u{62}\u{61}\u{67}\u{65}\u{28}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{54}\u{2e}\u{61}\u{6c}\u{6c}\u{6f}\u{63}\u{63}\u{6f}\u{75}\u{6e}\u{74}\u{28}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{63}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{72}\u{65}\u{61}\u{6c}\u{6c}\u{6f}\u{63}\u{61}\u{74}\u{65}\u{64}\u{2c}\u{a}\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{73}\u{6f}\u{20}\u{74}\u{68}\u{65}\u{79}\u{20}\u{6b}\u{65}\u{70}\u{74}\u{20}\u{74}\u{68}\u{65}\u{69}\u{72}\u{20}\u{73}\u{69}\u{7a}\u{65}\u{73}\u{20}\u{28}\u{77}\u{69}\u{74}\u{68}\u{6f}\u{75}\u{74}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{73}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{73}\u{65}\u{6c}\u{65}\u{63}\u{74}\u{28}\u{32}\u{2c}\u{20}\u{54}\u{2e}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{6c}\u{65}\u{76}\u{65}\u{6c}\u{28}\u{29}\u{29}\u{20}\u{3d}\u{3d}\u{20}\u{73}\u{74}\u{6b}\u{73}\u{69}\u{7a}\u{65}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{54}\u{2e}\u{71}\u{75}\u{65}\u{72}\u{79}\u{73}\u{74}\u{72}\u{28}\u{29}\u{20}\u{3d}\u{3d}\u{20}\u{73}\u{74}\u{73}\u{69}\u{7a}\u{65}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{27}\u{6f}\u{6b}\u{27}\u{a}\u{20}\u{20}")
1125+assert((res == "\u{6f}\u{6b}"))
11261126T.closestate(L)
11271127end
11281128print("\u{2b}")
11291129local function gsub
11301130(a,b,c)
11311131a,b=T.testC("\u{67}\u{73}\u{75}\u{62}\u{20}\u{32}\u{20}\u{33}\u{20}\u{34}\u{3b}\u{20}\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",a,b,c)
1132−assert(b == 5)
1132+assert((b == 0x5))
11331133return a
11341134end
1135−assert(gsub("\u{61}\u{6c}\u{6f}\u{2e}\u{61}\u{6c}\u{6f}\u{2e}\u{75}\u{68}\u{75}\u{68}\u{2e}","\u{2e}","\u{2f}\u{2f}") == "\u{61}\u{6c}\u{6f}\u{2f}\u{2f}\u{61}\u{6c}\u{6f}\u{2f}\u{2f}\u{75}\u{68}\u{75}\u{68}\u{2f}\u{2f}")
1136−assert(gsub("\u{61}\u{6c}\u{6f}\u{2e}\u{61}\u{6c}\u{6f}\u{2e}\u{75}\u{68}\u{75}\u{68}\u{2e}","\u{61}\u{6c}\u{6f}","\u{2f}\u{2f}") == "\u{2f}\u{2f}\u{2e}\u{2f}\u{2f}\u{2e}\u{75}\u{68}\u{75}\u{68}\u{2e}")
1137−assert(gsub("","\u{61}\u{6c}\u{6f}","\u{2f}\u{2f}") == "")
1138−assert(gsub("\u{2e}\u{2e}\u{2e}","\u{2e}","\u{2f}\u{2e}") == "\u{2f}\u{2e}\u{2f}\u{2e}\u{2f}\u{2e}")
1139−assert(gsub("\u{2e}\u{2e}\u{2e}","\u{2e}\u{2e}\u{2e}","") == "")
1135+assert((gsub("\u{61}\u{6c}\u{6f}\u{2e}\u{61}\u{6c}\u{6f}\u{2e}\u{75}\u{68}\u{75}\u{68}\u{2e}","\u{2e}","\u{2f}\u{2f}") == "\u{61}\u{6c}\u{6f}\u{2f}\u{2f}\u{61}\u{6c}\u{6f}\u{2f}\u{2f}\u{75}\u{68}\u{75}\u{68}\u{2f}\u{2f}"))
1136+assert((gsub("\u{61}\u{6c}\u{6f}\u{2e}\u{61}\u{6c}\u{6f}\u{2e}\u{75}\u{68}\u{75}\u{68}\u{2e}","\u{61}\u{6c}\u{6f}","\u{2f}\u{2f}") == "\u{2f}\u{2f}\u{2e}\u{2f}\u{2f}\u{2e}\u{75}\u{68}\u{75}\u{68}\u{2e}"))
1137+assert((gsub("","\u{61}\u{6c}\u{6f}","\u{2f}\u{2f}") == ""))
1138+assert((gsub("\u{2e}\u{2e}\u{2e}","\u{2e}","\u{2f}\u{2e}") == "\u{2f}\u{2e}\u{2f}\u{2e}\u{2f}\u{2e}"))
1139+assert((gsub("\u{2e}\u{2e}\u{2e}","\u{2e}\u{2e}\u{2e}","") == ""))
11401140local mt_xuxu,res,top = T.testC("\u{6e}\u{65}\u{77}\u{6d}\u{65}\u{74}\u{61}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{78}\u{75}\u{78}\u{75}\u{3b}\u{20}\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}")
1141−assert(type(mt_xuxu) == "\u{74}\u{61}\u{62}\u{6c}\u{65}" and res and top == 3)
1141+assert((((type(mt_xuxu) == "\u{74}\u{61}\u{62}\u{6c}\u{65}") and res) and (top == 0x3)))
11421142local d,res,top = T.testC("\u{6e}\u{65}\u{77}\u{6d}\u{65}\u{74}\u{61}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{78}\u{75}\u{78}\u{75}\u{3b}\u{20}\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}")
1143−assert(mt_xuxu == d and not res and top == 3)
1143+assert(((mt_xuxu == d) and (not (res and (top == 0x3)))))
11441144d,res,top=T.testC("\u{6e}\u{65}\u{77}\u{6d}\u{65}\u{74}\u{61}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{78}\u{75}\u{78}\u{75}\u{31}\u{3b}\u{20}\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}")
1145−assert(mt_xuxu ~= d and res and top == 3)
1146−x=T.newuserdata(0)
1145+assert((((mt_xuxu ~= d) and res) and (top == 0x3)))
1146+x=T.newuserdata(0x0)
11471147;
1148−y=T.newuserdata(0)
1148+y=T.newuserdata(0x0)
11491149;
11501150T.testC("\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{78}\u{75}\u{78}\u{75}\u{3b}\u{20}\u{67}\u{65}\u{74}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{52}\u{3b}\u{20}\u{73}\u{65}\u{74}\u{6d}\u{65}\u{74}\u{61}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{32}",x)
1151−assert(getmetatable(x) == mt_xuxu)
1151+assert((getmetatable(x) == mt_xuxu))
11521152local res1,res2,top = T.testC("\u{74}\u{65}\u{73}\u{74}\u{75}\u{64}\u{61}\u{74}\u{61}\u{20}\u{2d}\u{31}\u{20}\u{78}\u{75}\u{78}\u{75}\u{a}\u{20}\u{20}\u{20}\u{9}\u{20}\u{9}\u{9}\u{9}\u{20}\u{20}\u{74}\u{65}\u{73}\u{74}\u{75}\u{64}\u{61}\u{74}\u{61}\u{20}\u{32}\u{20}\u{78}\u{75}\u{78}\u{75}\u{a}\u{9}\u{9}\u{9}\u{9}\u{20}\u{20}\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{a}\u{9}\u{9}\u{9}\u{9}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}",x)
1153−assert(res1 and res2 and top == 4)
1153+assert(((res1 and res2) and (top == 0x4)))
11541154res1,res2,top=T.testC("\u{74}\u{65}\u{73}\u{74}\u{75}\u{64}\u{61}\u{74}\u{61}\u{20}\u{2d}\u{31}\u{20}\u{78}\u{75}\u{78}\u{75}\u{31}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{74}\u{65}\u{73}\u{74}\u{75}\u{64}\u{61}\u{74}\u{61}\u{20}\u{32}\u{20}\u{78}\u{75}\u{78}\u{75}\u{31}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}",x)
1155−assert(not res1 and not res2 and top == 4)
1155+assert((not (res1 and (not (res2 and (top == 0x4))))))
11561156res1,res2,top=T.testC("\u{74}\u{65}\u{73}\u{74}\u{75}\u{64}\u{61}\u{74}\u{61}\u{20}\u{2d}\u{31}\u{20}\u{78}\u{75}\u{78}\u{75}\u{32}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{74}\u{65}\u{73}\u{74}\u{75}\u{64}\u{61}\u{74}\u{61}\u{20}\u{32}\u{20}\u{78}\u{75}\u{78}\u{75}\u{32}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}",x)
1157−assert(not res1 and not res2 and top == 4)
1157+assert((not (res1 and (not (res2 and (top == 0x4))))))
11581158res1,res2,top=T.testC("\u{74}\u{65}\u{73}\u{74}\u{75}\u{64}\u{61}\u{74}\u{61}\u{20}\u{2d}\u{31}\u{20}\u{78}\u{75}\u{78}\u{75}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{74}\u{65}\u{73}\u{74}\u{75}\u{64}\u{61}\u{74}\u{61}\u{20}\u{32}\u{20}\u{78}\u{75}\u{78}\u{75}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{a}\u{9}\u{9}\u{9}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}",y)
1159−assert(not res1 and not res2 and top == 4)
1159+assert((not (res1 and (not (res2 and (top == 0x4))))))
11601160do
11611161local r = debug.getregistry()
1162−assert(r.xuxu == mt_xuxu and r.xuxu1 == d)
1162+assert(((r.xuxu == mt_xuxu) and (r.xuxu1 == d)))
11631163r.xuxu=nil
11641164;
11651165r.xuxu1=nil
desk/res/lua/cycled/attrib.luanew file+431
@@ -0,0 +1,431 @@
1+print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}")
2+assert((require("\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}") == string))
3+assert((require("\u{6d}\u{61}\u{74}\u{68}") == math))
4+assert((require("\u{74}\u{61}\u{62}\u{6c}\u{65}") == table))
5+assert((require("\u{69}\u{6f}") == io))
6+assert((require("\u{6f}\u{73}") == os))
7+assert((require("\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}") == coroutine))
8+assert((type(package.path) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"))
9+assert((type(package.cpath) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"))
10+assert((type(package.loaded) == "\u{74}\u{61}\u{62}\u{6c}\u{65}"))
11+assert((type(package.preload) == "\u{74}\u{61}\u{62}\u{6c}\u{65}"))
12+assert((type(package.config) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"))
13+print(("\u{70}\u{61}\u{63}\u{6b}\u{61}\u{67}\u{65}\u{20}\u{63}\u{6f}\u{6e}\u{66}\u{69}\u{67}\u{3a}\u{20}" .. string.gsub(package.config,"\u{a}","\u{7c}")))
14+do
15+local max = ((_soft and 0x64) or 0x7d0)
16+local t = {}
17+for i = 0x1, max
18+do
19+t[i]=string.rep("\u{3f}",((i % 0xa) + 0x1))
20+end
21+t[(# (t + 0x1))]="\u{3b}"
22+local path = table.concat(t,"\u{3b}")
23+local s,err = package.searchpath("\u{78}\u{75}\u{78}\u{75}",path)
24+assert((not ((s and string.find(err,string.rep("\u{78}\u{75}\u{78}\u{75}",0xa))) and (# (string.gsub(err,"\u{5b}\u{5e}\u{a}\u{5d}","") >= max)))))
25+local path = string.rep("\u{3f}",max)
26+local s,err = package.searchpath("\u{78}\u{75}\u{78}\u{75}",path)
27+assert((not (s and string.find(err,string.rep("\u{78}\u{75}\u{78}\u{75}",max)))))
28+end
29+do
30+local oldpath = package.path
31+package.path={}
32+local s,err = pcall(require,"\u{6e}\u{6f}\u{2d}\u{73}\u{75}\u{63}\u{68}\u{2d}\u{66}\u{69}\u{6c}\u{65}")
33+assert((not (s and string.find(err,"\u{70}\u{61}\u{63}\u{6b}\u{61}\u{67}\u{65}\u{2e}\u{70}\u{61}\u{74}\u{68}"))))
34+package.path=oldpath
35+end
36+do
37+print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{27}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{27}\u{20}\u{6d}\u{65}\u{73}\u{73}\u{61}\u{67}\u{65}")
38+local oldpath = package.path
39+local oldcpath = package.cpath
40+package.path="\u{3f}\u{2e}\u{6c}\u{75}\u{61}\u{3b}\u{3f}\u{2f}\u{3f}"
41+package.cpath="\u{3f}\u{2e}\u{73}\u{6f}\u{3b}\u{3f}\u{2f}\u{69}\u{6e}\u{69}\u{74}"
42+local st,msg = pcall(require,"\u{58}\u{58}\u{58}")
43+local expected = "\u{6d}\u{6f}\u{64}\u{75}\u{6c}\u{65}\u{20}\u{27}\u{58}\u{58}\u{58}\u{27}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{66}\u{6f}\u{75}\u{6e}\u{64}\u{3a}\u{a}\u{9}\u{6e}\u{6f}\u{20}\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{70}\u{61}\u{63}\u{6b}\u{61}\u{67}\u{65}\u{2e}\u{70}\u{72}\u{65}\u{6c}\u{6f}\u{61}\u{64}\u{5b}\u{27}\u{58}\u{58}\u{58}\u{27}\u{5d}\u{a}\u{9}\u{6e}\u{6f}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{20}\u{27}\u{58}\u{58}\u{58}\u{2e}\u{6c}\u{75}\u{61}\u{27}\u{a}\u{9}\u{6e}\u{6f}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{20}\u{27}\u{58}\u{58}\u{58}\u{2f}\u{58}\u{58}\u{58}\u{27}\u{a}\u{9}\u{6e}\u{6f}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{20}\u{27}\u{58}\u{58}\u{58}\u{2e}\u{73}\u{6f}\u{27}\u{a}\u{9}\u{6e}\u{6f}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{20}\u{27}\u{58}\u{58}\u{58}\u{2f}\u{69}\u{6e}\u{69}\u{74}\u{27}"
44+assert((msg == expected))
45+package.path=oldpath
46+package.cpath=oldcpath
47+end
48+print("\u{2b}")
49+if (not _port) then
50+local dirsep = string.match(package.config,"\u{5e}\u{28}\u{5b}\u{5e}\u{a}\u{5d}\u{2b}\u{29}\u{a}")
51+local DIR = ("\u{6c}\u{69}\u{62}\u{73}" .. dirsep)
52+local function D
53+(x)
54+local x = string.gsub(x,"\u{2f}",dirsep)
55+return (DIR .. x)
56+end
57+local function DC
58+(x)
59+local ext = (((dirsep == "\u{5c}") and "\u{2e}\u{64}\u{6c}\u{6c}") or "\u{2e}\u{73}\u{6f}")
60+return D((x .. ext))
61+end
62+local function createfiles
63+(files,preextras,posextras)
64+for n,c in pairs(files)
65+do
66+io.output(D(n))
67+io.write(string.format(preextras,n))
68+io.write(c)
69+io.write(string.format(posextras,n))
70+io.close(io.output())
71+end
72+end
73+local function removefiles
74+(files)
75+for n in pairs(files)
76+do
77+os.remove(D(n))
78+end
79+end
80+local files = {["\u{6e}\u{61}\u{6d}\u{65}\u{73}\u{2e}\u{6c}\u{75}\u{61}"] = "\u{64}\u{6f}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{7b}\u{2e}\u{2e}\u{2e}\u{7d}\u{20}\u{65}\u{6e}\u{64}\u{a}",["\u{65}\u{72}\u{72}\u{2e}\u{6c}\u{75}\u{61}"] = "\u{42}\u{20}\u{3d}\u{20}\u{31}\u{35}\u{3b}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{61}\u{20}\u{2b}\u{20}\u{31}\u{3b}",["\u{73}\u{79}\u{6e}\u{65}\u{72}\u{72}\u{2e}\u{6c}\u{75}\u{61}"] = "\u{42}\u{20}\u{3d}",["\u{41}\u{2e}\u{6c}\u{75}\u{61}"] = "",["\u{42}\u{2e}\u{6c}\u{75}\u{61}"] = "\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{2e}\u{2e}\u{2e}\u{3d}\u{3d}\u{27}\u{42}\u{27}\u{29}\u{3b}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{20}\u{27}\u{41}\u{27}",["\u{41}\u{2e}\u{6c}\u{63}"] = "",["\u{41}"] = "",["\u{4c}"] = "",["\u{58}\u{58}\u{78}\u{58}"] = "",["\u{43}\u{2e}\u{6c}\u{75}\u{61}"] = "\u{70}\u{61}\u{63}\u{6b}\u{61}\u{67}\u{65}\u{2e}\u{6c}\u{6f}\u{61}\u{64}\u{65}\u{64}\u{5b}\u{2e}\u{2e}\u{2e}\u{5d}\u{20}\u{3d}\u{20}\u{32}\u{35}\u{3b}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{27}\u{43}\u{27}"}
81+AA=nil
82+local extras = "\u{4e}\u{41}\u{4d}\u{45}\u{20}\u{3d}\u{20}\u{27}\u{25}\u{73}\u{27}\u{a}\u{52}\u{45}\u{51}\u{55}\u{49}\u{52}\u{45}\u{44}\u{20}\u{3d}\u{20}\u{2e}\u{2e}\u{2e}\u{a}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{41}\u{41}"
83+createfiles(files,"",extras)
84+assert((package.searchpath("\u{43}\u{2e}\u{6c}\u{75}\u{61}",D("\u{3f}"),"","") == D("\u{43}\u{2e}\u{6c}\u{75}\u{61}")))
85+assert((package.searchpath("\u{43}\u{2e}\u{6c}\u{75}\u{61}",D("\u{3f}"),"\u{2e}","\u{2e}") == D("\u{43}\u{2e}\u{6c}\u{75}\u{61}")))
86+assert((package.searchpath("\u{2d}\u{2d}\u{78}\u{2d}",D("\u{3f}"),"\u{2d}","\u{58}") == D("\u{58}\u{58}\u{78}\u{58}")))
87+assert((package.searchpath("\u{2d}\u{2d}\u{2d}\u{78}\u{58}",D("\u{3f}"),"\u{2d}\u{2d}\u{2d}","\u{58}\u{58}") == D("\u{58}\u{58}\u{78}\u{58}")))
88+assert((package.searchpath(D("\u{43}\u{2e}\u{6c}\u{75}\u{61}"),"\u{3f}",dirsep) == D("\u{43}\u{2e}\u{6c}\u{75}\u{61}")))
89+assert((package.searchpath("\u{2e}\u{5c}\u{43}\u{2e}\u{6c}\u{75}\u{61}",D("\u{3f}"),"\u{5c}") == D("\u{2e}\u{2f}\u{43}\u{2e}\u{6c}\u{75}\u{61}")))
90+local oldpath = package.path
91+package.path=string.gsub("\u{44}\u{2f}\u{3f}\u{2e}\u{6c}\u{75}\u{61}\u{3b}\u{44}\u{2f}\u{3f}\u{2e}\u{6c}\u{63}\u{3b}\u{44}\u{2f}\u{3f}\u{3b}\u{44}\u{2f}\u{3f}\u{3f}\u{78}\u{3f}\u{3b}\u{44}\u{2f}\u{4c}","\u{44}\u{2f}",DIR)
92+local try = function (p,n,r,ext)
93+NAME=nil
94+local rr,x = require(p)
95+assert((NAME == n))
96+assert((REQUIRED == p))
97+assert((rr == r))
98+assert((ext == x))
99+end
100+local a = require("\u{6e}\u{61}\u{6d}\u{65}\u{73}")
101+assert(((a[0x1] == "\u{6e}\u{61}\u{6d}\u{65}\u{73}") and (a[0x2] == D("\u{6e}\u{61}\u{6d}\u{65}\u{73}\u{2e}\u{6c}\u{75}\u{61}"))))
102+local st,msg = pcall(require,"\u{65}\u{72}\u{72}")
103+assert((not ((st and string.find(msg,"\u{61}\u{72}\u{69}\u{74}\u{68}\u{6d}\u{65}\u{74}\u{69}\u{63}")) and (B == 0xf))))
104+st,msg=pcall(require,"\u{73}\u{79}\u{6e}\u{65}\u{72}\u{72}")
105+assert((not (st and string.find(msg,"\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{69}\u{6e}\u{67}\u{20}\u{6d}\u{6f}\u{64}\u{75}\u{6c}\u{65}"))))
106+assert((package.searchpath("\u{43}",package.path) == D("\u{43}\u{2e}\u{6c}\u{75}\u{61}")))
107+assert((require("\u{43}") == 0x19))
108+assert((require("\u{43}") == 0x19))
109+AA=nil
110+try("\u{42}","\u{42}\u{2e}\u{6c}\u{75}\u{61}",true,"\u{6c}\u{69}\u{62}\u{73}\u{2f}\u{42}\u{2e}\u{6c}\u{75}\u{61}")
111+assert(package.loaded.B)
112+assert((require("\u{42}") == true))
113+assert(package.loaded.A)
114+assert((require("\u{43}") == 0x19))
115+package.loaded.A=nil
116+try("\u{42}",nil,true,nil)
117+try("\u{41}","\u{41}\u{2e}\u{6c}\u{75}\u{61}",true,"\u{6c}\u{69}\u{62}\u{73}\u{2f}\u{41}\u{2e}\u{6c}\u{75}\u{61}")
118+package.loaded.A=nil
119+os.remove(D("\u{41}\u{2e}\u{6c}\u{75}\u{61}"))
120+AA={}
121+try("\u{41}","\u{41}\u{2e}\u{6c}\u{63}",AA,"\u{6c}\u{69}\u{62}\u{73}\u{2f}\u{41}\u{2e}\u{6c}\u{63}")
122+assert((package.searchpath("\u{41}",package.path) == D("\u{41}\u{2e}\u{6c}\u{63}")))
123+assert((require("\u{41}") == AA))
124+AA=false
125+try("\u{4b}","\u{4c}",false,"\u{6c}\u{69}\u{62}\u{73}\u{2f}\u{4c}")
126+try("\u{4b}","\u{4c}",false,"\u{6c}\u{69}\u{62}\u{73}\u{2f}\u{4c}")
127+assert((rawget(_G,"\u{5f}\u{52}\u{45}\u{51}\u{55}\u{49}\u{52}\u{45}\u{44}\u{4e}\u{41}\u{4d}\u{45}") == nil))
128+AA="\u{78}"
129+try("\u{58}","\u{58}\u{58}\u{78}\u{58}",AA,"\u{6c}\u{69}\u{62}\u{73}\u{2f}\u{58}\u{58}\u{78}\u{58}")
130+removefiles(files)
131+NAME,REQUIRED,AA,B=nil
132+local _G = _G
133+package.path=string.gsub("\u{44}\u{2f}\u{3f}\u{2e}\u{6c}\u{75}\u{61}\u{3b}\u{44}\u{2f}\u{3f}\u{2f}\u{69}\u{6e}\u{69}\u{74}\u{2e}\u{6c}\u{75}\u{61}","\u{44}\u{2f}",DIR)
134+files={["\u{50}\u{31}\u{2f}\u{69}\u{6e}\u{69}\u{74}\u{2e}\u{6c}\u{75}\u{61}"] = "\u{41}\u{41}\u{20}\u{3d}\u{20}\u{31}\u{30}",["\u{50}\u{31}\u{2f}\u{78}\u{75}\u{78}\u{75}\u{2e}\u{6c}\u{75}\u{61}"] = "\u{41}\u{41}\u{20}\u{3d}\u{20}\u{32}\u{30}"}
135+createfiles(files,"\u{5f}\u{45}\u{4e}\u{56}\u{20}\u{3d}\u{20}\u{7b}\u{7d}\u{a}","\u{a}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{5f}\u{45}\u{4e}\u{56}\u{a}")
136+AA=0x0
137+local m,ext = assert(require("\u{50}\u{31}"))
138+assert((ext == "\u{6c}\u{69}\u{62}\u{73}\u{2f}\u{50}\u{31}\u{2f}\u{69}\u{6e}\u{69}\u{74}\u{2e}\u{6c}\u{75}\u{61}"))
139+assert(((AA == 0x0) and (m.AA == 0xa)))
140+assert((require("\u{50}\u{31}") == m))
141+assert((require("\u{50}\u{31}") == m))
142+assert((package.searchpath("\u{50}\u{31}\u{2e}\u{78}\u{75}\u{78}\u{75}",package.path) == D("\u{50}\u{31}\u{2f}\u{78}\u{75}\u{78}\u{75}\u{2e}\u{6c}\u{75}\u{61}")))
143+m.xuxu,ext=assert(require("\u{50}\u{31}\u{2e}\u{78}\u{75}\u{78}\u{75}"))
144+assert(((AA == 0x0) and (m.xuxu.AA == 0x14)))
145+assert((ext == "\u{6c}\u{69}\u{62}\u{73}\u{2f}\u{50}\u{31}\u{2f}\u{78}\u{75}\u{78}\u{75}\u{2e}\u{6c}\u{75}\u{61}"))
146+assert((require("\u{50}\u{31}\u{2e}\u{78}\u{75}\u{78}\u{75}") == m.xuxu))
147+assert((require("\u{50}\u{31}\u{2e}\u{78}\u{75}\u{78}\u{75}") == m.xuxu))
148+assert(((require("\u{50}\u{31}") == m) and (m.AA == 0xa)))
149+removefiles(files)
150+AA=nil
151+package.path=""
152+assert((not pcall(require,"\u{66}\u{69}\u{6c}\u{65}\u{5f}\u{64}\u{6f}\u{65}\u{73}\u{5f}\u{6e}\u{6f}\u{74}\u{5f}\u{65}\u{78}\u{69}\u{73}\u{74}")))
153+package.path="\u{3f}\u{3f}\u{0}\u{3f}"
154+assert((not pcall(require,"\u{66}\u{69}\u{6c}\u{65}\u{5f}\u{64}\u{6f}\u{65}\u{73}\u{5f}\u{6e}\u{6f}\u{74}\u{5f}\u{65}\u{78}\u{69}\u{73}\u{74}\u{31}")))
155+package.path=oldpath
156+local fname = "\u{66}\u{69}\u{6c}\u{65}\u{5f}\u{64}\u{6f}\u{65}\u{73}\u{5f}\u{6e}\u{6f}\u{74}\u{5f}\u{65}\u{78}\u{69}\u{73}\u{74}\u{32}"
157+local m,err = pcall(require,fname)
158+for t in string.gmatch((package.path .. ("\u{3b}" .. package.cpath)),"\u{5b}\u{5e}\u{3b}\u{5d}\u{2b}")
159+do
160+t=string.gsub(t,"\u{3f}",fname)
161+assert(string.find(err,t,0x1,true))
162+end
163+do
164+local searchers = package.searchers
165+package.searchers=0x3
166+local st,msg = pcall(require,"\u{61}")
167+assert((not (st and string.find(msg,"\u{6d}\u{75}\u{73}\u{74}\u{20}\u{62}\u{65}\u{20}\u{61}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}"))))
168+package.searchers=searchers
169+end
170+local function import
171+(...)
172+local f = {...}
173+return function (m)
174+for i = 0x1, (# f)
175+do
176+m[f[i]]=_G[f[i]]
177+end
178+end
179+end
180+assert((not pcall(module,"\u{58}\u{55}\u{58}\u{55}")))
181+local p = ""
182+local st,err,when = package.loadlib(DC("\u{6c}\u{69}\u{62}\u{31}"),"\u{2a}")
183+if (not st) then
184+local f,err,when = package.loadlib("\u{64}\u{6f}\u{6e}\u{6f}\u{74}\u{65}\u{78}\u{69}\u{73}\u{74}",(p .. "\u{78}\u{75}\u{78}\u{75}"))
185+assert((not ((f and (type(err) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (when == "\u{61}\u{62}\u{73}\u{65}\u{6e}\u{74}"))))
186+;
187+(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{20}\u{64}\u{79}\u{6e}\u{61}\u{6d}\u{69}\u{63}\u{20}\u{6c}\u{69}\u{62}\u{72}\u{61}\u{72}\u{79}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
188+print(err,when)
189+else
190+local f = assert(package.loadlib(DC("\u{6c}\u{69}\u{62}\u{31}"),(p .. "\u{6f}\u{6e}\u{65}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}")))
191+local a,b = f(0xf,0x19)
192+assert(((a == 0x19) and (b == 0xf)))
193+f=assert(package.loadlib(DC("\u{6c}\u{69}\u{62}\u{31}"),(p .. "\u{61}\u{6e}\u{6f}\u{74}\u{68}\u{65}\u{72}\u{66}\u{75}\u{6e}\u{63}")))
194+assert((f(0xa,0x14) == "\u{31}\u{30}\u{25}\u{32}\u{30}\u{a}"))
195+local f,err,when = package.loadlib(DC("\u{6c}\u{69}\u{62}\u{31}"),(p .. "\u{78}\u{75}\u{78}\u{75}"))
196+assert((not ((f and (type(err) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (when == "\u{69}\u{6e}\u{69}\u{74}"))))
197+f,err,when=package.loadlib("\u{64}\u{6f}\u{6e}\u{6f}\u{74}\u{65}\u{78}\u{69}\u{73}\u{74}",(p .. "\u{78}\u{75}\u{78}\u{75}"))
198+assert((not ((f and (type(err) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (when == "\u{6f}\u{70}\u{65}\u{6e}"))))
199+f=assert(package.loadlib(DC("\u{6c}\u{69}\u{62}\u{31}\u{31}"),(p .. "\u{6c}\u{75}\u{61}\u{6f}\u{70}\u{65}\u{6e}\u{5f}\u{6c}\u{69}\u{62}\u{31}\u{31}")))
200+assert((f() == "\u{65}\u{78}\u{70}\u{6f}\u{72}\u{74}\u{65}\u{64}"))
201+package.cpath=DC("\u{3f}")
202+local lib2,ext = require("\u{6c}\u{69}\u{62}\u{32}\u{2d}\u{76}\u{32}")
203+assert(string.find(ext,"\u{6c}\u{69}\u{62}\u{73}\u{2f}\u{6c}\u{69}\u{62}\u{32}\u{2d}\u{76}\u{32}",0x1,true))
204+assert(((_ENV.x == "\u{6c}\u{69}\u{62}\u{32}\u{2d}\u{76}\u{32}") and (_ENV.y == DC("\u{6c}\u{69}\u{62}\u{32}\u{2d}\u{76}\u{32}"))))
205+assert((lib2.id("\u{78}") == true))
206+local fs,ext = require("\u{6c}\u{69}\u{62}\u{31}\u{2e}\u{73}\u{75}\u{62}")
207+assert(((_ENV.x == "\u{6c}\u{69}\u{62}\u{31}\u{2e}\u{73}\u{75}\u{62}") and (_ENV.y == DC("\u{6c}\u{69}\u{62}\u{31}"))))
208+assert(string.find(ext,"\u{6c}\u{69}\u{62}\u{73}\u{2f}\u{6c}\u{69}\u{62}\u{31}",0x1,true))
209+assert((fs.id(0x2d) == 0x2d))
210+_ENV.x,_ENV.y=nil
211+end
212+_ENV=_G
213+do
214+local p = package
215+package={}
216+p.preload.pl=function (...)
217+local _ENV = {...}
218+function xuxu(x)
219+return (x + 0x14)
220+end
221+return _ENV
222+end
223+local pl,ext = require("\u{70}\u{6c}")
224+assert((require("\u{70}\u{6c}") == pl))
225+assert((pl.xuxu(0xa) == 0x1e))
226+assert((((pl[0x1] == "\u{70}\u{6c}") and (pl[0x2] == "\u{3a}\u{70}\u{72}\u{65}\u{6c}\u{6f}\u{61}\u{64}\u{3a}")) and (ext == "\u{3a}\u{70}\u{72}\u{65}\u{6c}\u{6f}\u{61}\u{64}\u{3a}")))
227+package=p
228+assert((type(package.path) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"))
229+end
230+print("\u{2b}")
231+end
232+print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{61}\u{73}\u{73}\u{69}\u{67}\u{6e}\u{6d}\u{65}\u{6e}\u{74}\u{73}\u{2c}\u{20}\u{6c}\u{6f}\u{67}\u{69}\u{63}\u{61}\u{6c}\u{20}\u{6f}\u{70}\u{65}\u{72}\u{61}\u{74}\u{6f}\u{72}\u{73}\u{2c}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{72}\u{75}\u{63}\u{74}\u{6f}\u{72}\u{73}")
233+local res,res2 = 0x1b
234+local a,b = 0x1,(0x2 + 0x3)
235+assert(((a == 0x1) and (b == 0x5)))
236+a={}
237+local function f
238+()
239+return 0xa,0xb,0xc
240+end
241+a.x,b,a[0x1]=0x1,0x2,f()
242+assert((((a.x == 0x1) and (b == 0x2)) and (a[0x1] == 0xa)))
243+a[f()],b,a[(f() + 0x3)]=f(),a,"\u{78}"
244+assert((((a[0xa] == 0xa) and (b == a)) and (a[0xd] == "\u{78}")))
245+do
246+local f = function (n)
247+local x = {}
248+;
249+for i = 0x1, n
250+do
251+x[i]=i
252+end
253+;
254+return table.unpack(x)
255+end
256+;
257+local a,b,c
258+a,b=0x0,f(0x1)
259+assert(((a == 0x0) and (b == 0x1)))
260+a,b=0x0,f(0x1)
261+assert(((a == 0x0) and (b == 0x1)))
262+a,b,c=0x0,0x5,f(0x4)
263+assert((((a == 0x0) and (b == 0x5)) and (c == 0x1)))
264+a,b,c=0x0,0x5,f(0x0)
265+assert((((a == 0x0) and (b == 0x5)) and (c == nil)))
266+end
267+local a,b,c,d = (0x1 and nil),(0x1 or nil),(0x1 and (nil or 0x1)),0x6
268+assert((not (((a and b) and c) and (d == 0x6))))
269+d=0x14
270+a,b,c,d=f()
271+assert(((((a == 0xa) and (b == 0xb)) and (c == 0xc)) and (d == nil)))
272+a,b=f(),0x1,0x2,0x3,f()
273+assert(((a == 0xa) and (b == 0x1)))
274+assert((((a < b) == false) and ((a > b) == true)))
275+assert(((0xa and 0x2) == 0x2))
276+assert(((0xa or 0x2) == 0xa))
277+assert(((0xa or assert(nil)) == 0xa))
278+assert((not (nil and assert(nil))))
279+assert(((nil or "\u{61}\u{6c}\u{6f}") == "\u{61}\u{6c}\u{6f}"))
280+assert(((nil and 0xa) == nil))
281+assert(((false and 0xa) == false))
282+assert(((true or 0xa) == true))
283+assert(((false or 0xa) == 0xa))
284+assert((false ~= nil))
285+assert((nil ~= false))
286+assert((not (nil == true)))
287+assert((not (not (nil == false))))
288+assert((not (not (0x1 == true))))
289+assert((not (not (a == true))))
290+assert((not (not ((0x6 or nil) == true))))
291+assert((not (not ((nil and 0x38) == false))))
292+assert((not (not ((nil and true) == false))))
293+assert((not (0xa == false)))
294+assert((not ({} == false)))
295+assert((not (0.5 == false)))
296+assert((not ("\u{78}" == false)))
297+assert(({} ~= {}))
298+print("\u{2b}")
299+a={}
300+a[true]=0x14
301+a[false]=0xa
302+assert(((a[(0x1 < 0x2)] == 0x14) and (a[(0x1 > 0x2)] == 0xa)))
303+function f(a)
304+return a
305+end
306+local a = {}
307+for i = 0xbb8, (- 0xbb8), (- 0x1)
308+do
309+a[(i + 0.0)]=i
310+;
311+end
312+a[1e31]="\u{61}\u{6c}\u{6f}"
313+;
314+a[true]=0xa
315+;
316+a[false]=0x14
317+assert((((a[1e31] == "\u{61}\u{6c}\u{6f}") and (a[(not 0x1)] == 0x14)) and (a[(0xa < 0x14)] == 0xa)))
318+for i = 0xbb8, (- 0xbb8), (- 0x1)
319+do
320+assert((a[i] == i))
321+;
322+end
323+a[print]=assert
324+a[f]=print
325+a[a]=a
326+assert((a[a][a][a][a][print] == assert))
327+a[print]((a[a[f]] == a[print]))
328+assert((not pcall(function ()
329+local a = {}
330+;
331+a[nil]=0xa
332+end)))
333+assert((not pcall(function ()
334+local a = {[nil] = 0xa}
335+end)))
336+assert((a[nil] == undef))
337+a=nil
338+local a,b,c
339+a={0xa,0x9,0x8,0x7,0x6,0x5,0x4,0x3,0x2,[(- 0x3)] = "\u{61}",[f] = print,["\u{61}"] = "\u{61}",["\u{62}"] = "\u{61}\u{62}"}
340+a,a.x,a.y=a,a[(- 0x3)]
341+assert((((((a[0x1] == 0xa) and (a[(- 0x3)] == a.a)) and (a[f] == print)) and (a.x == "\u{61}")) and (not a.y)))
342+a[0x1],f(a)[0x2],b,c={["\u{61}\u{6c}\u{6f}"] = assert},0xa,a[0x1],a[f],0x6,0xa,0x17,f(a),0x2
343+a[0x1].alo((((a[0x2] == 0xa) and (b == 0xa)) and (c == print)))
344+a.aVeryLongName012345678901234567890123456789012345678901234567890123456789=0xa
345+local function foo
346+()
347+return a.aVeryLongName012345678901234567890123456789012345678901234567890123456789
348+end
349+assert(((foo() == 0xa) and (a.aVeryLongName012345678901234567890123456789012345678901234567890123456789 == 0xa)))
350+do
351+local function foo
352+()
353+local _ENV <const> = 0xb
354+X="\u{68}\u{69}"
355+end
356+local st,msg = pcall(foo)
357+assert((not (st and string.find(msg,"\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}"))))
358+end
359+local maxint = math.maxinteger
360+while ((maxint ~= (maxint + 0.0)) or ((maxint - 0x1) ~= (maxint - 1.0))) do
361+maxint=(maxint // 0x2)
362+end
363+local maxintF = (maxint + 0.0)
364+assert((((maxintF == maxint) and (math.type(maxintF) == "\u{66}\u{6c}\u{6f}\u{61}\u{74}")) and (maxintF >= (2.0 ^ 0xe))))
365+a[maxintF]=0xa
366+;
367+a[(maxintF - 1.0)]=0xb
368+;
369+a[(- maxintF)]=0xc
370+;
371+a[(- (maxintF + 1.0))]=0xd
372+;
373+assert(((((a[maxint] == 0xa) and (a[(maxint - 0x1)] == 0xb)) and (a[(- maxint)] == 0xc)) and (a[(- (maxint + 0x1))] == 0xd)))
374+a[maxint]=0x14
375+a[(- maxint)]=0x16
376+assert(((((a[maxintF] == 0x14) and (a[(maxintF - 1.0)] == 0xb)) and (a[(- maxintF)] == 0x16)) and (a[(- (maxintF + 1.0))] == 0xd)))
377+a=nil
378+do
379+local a,i,j,b
380+a={"\u{61}","\u{62}"}
381+;
382+i=0x1
383+;
384+j=0x2
385+;
386+b=a
387+i,a[i],a,j,a[j],a[(i + j)]=j,i,i,b,j,i
388+assert(((((((i == 0x2) and (b[0x1] == 0x1)) and (a == 0x1)) and (j == b)) and (b[0x2] == 0x2)) and (b[0x3] == 0x1)))
389+a={}
390+local function foo
391+()
392+b,a.x,a=a,0xa,0x14
393+end
394+foo()
395+assert(((a == 0x14) and (b.x == 0xa)))
396+end
397+do
398+local a,i,j,b
399+a={"\u{61}","\u{62}"}
400+;
401+i=0x1
402+;
403+j=0x2
404+;
405+b=a
406+local function foo
407+()
408+i,a[i],a,j,a[j],a[(i + j)]=j,i,i,b,j,i
409+end
410+foo()
411+assert(((((((i == 0x2) and (b[0x1] == 0x1)) and (a == 0x1)) and (j == b)) and (b[0x2] == 0x2)) and (b[0x3] == 0x1)))
412+local t = {}
413+(function (a)
414+t[a],a=0xa,0x14
415+end)(0x1)
416+;
417+assert((t[0x1] == 0xa))
418+end
419+local function foo
420+()
421+local a
422+return function ()
423+local b
424+a,b=0x3,0xe
425+return a,b
426+end
427+end
428+local a,b = foo()()
429+assert(((a == 0x3) and (b == 0xe)))
430+print("\u{4f}\u{4b}")
431+return res
desk/res/lua/cycled/bar.luanew file+2
@@ -0,0 +1,2 @@
1+assert((0xa .. (0x14 .. (- (0x1e == "\u{31}\u{30}\u{32}\u{30}\u{2d}\u{33}\u{30}")))))
2+x=(- (0x2 ^ (- (0x3 ^ 0x4))))
zod/luau/res/lua/cycled/big.lua → desk/res/lua/cycled/big.luarenamed+21−21
@@ -3,21 +3,21 @@ return "\u{61}"
33end
44print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{6c}\u{61}\u{72}\u{67}\u{65}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{73}")
55local debug = require("\u{64}\u{65}\u{62}\u{75}\u{67}")
6−local lim = 2 ^ 18 + 1000
6+local lim = ((0x2 ^ 0x12) + 0x3e8)
77local prog = {"\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{79}\u{20}\u{3d}\u{20}\u{7b}\u{30}"}
8−for i = 1, lim
8+for i = 0x1, lim
99do
10−prog[# prog + 1]=i
10+prog[(# (prog + 0x1))]=i
1111end
12−prog[# prog + 1]="\u{7d}\u{a}"
13−prog[# prog + 1]="\u{58}\u{20}\u{3d}\u{20}\u{79}\u{a}"
14−prog[# prog + 1]=("\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{58}\u{5b}\u{25}\u{64}\u{5d}\u{20}\u{3d}\u{3d}\u{20}\u{25}\u{64}\u{29}"):format(lim - 1,lim - 2)
15−prog[# prog + 1]="\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{30}"
12+prog[(# (prog + 0x1))]="\u{7d}\u{a}"
13+prog[(# (prog + 0x1))]="\u{58}\u{20}\u{3d}\u{20}\u{79}\u{a}"
14+prog[(# (prog + 0x1))]=("\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{58}\u{5b}\u{25}\u{64}\u{5d}\u{20}\u{3d}\u{3d}\u{20}\u{25}\u{64}\u{29}"):format((lim - 0x1),(lim - 0x2))
15+prog[(# (prog + 0x1))]="\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{30}"
1616prog=table.concat(prog,"\u{3b}")
1717local env = {["\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"] = string,["\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}"] = assert}
1818local f = assert(load(prog,nil,nil,env))
1919f()
20−assert(env.X[lim] == lim - 1 and env.X[lim + 1] == lim)
20+assert(((env.X[lim] == (lim - 0x1)) and (env.X[(lim + 0x1)] == lim)))
2121for k in pairs(env)
2222do
2323env[k]=undef
@@ -33,11 +33,11 @@ _G[n]=v
3333end})
3434X=nil
3535local co = coroutine.wrap(f)
36−assert(co() == "\u{73}")
37−assert(co() == "\u{67}")
38−assert(co() == "\u{67}")
39−assert(co() == 0)
40−assert(X[lim] == lim - 1 and X[lim + 1] == lim)
36+assert((co() == "\u{73}"))
37+assert((co() == "\u{67}"))
38+assert((co() == "\u{67}"))
39+assert((co() == 0x0))
40+assert(((X[lim] == (lim - 0x1)) and (X[(lim + 0x1)] == lim)))
4141getmetatable(env).__index=function ()
4242
4343end
@@ -45,23 +45,23 @@ getmetatable(env).__newindex=function ()
4545
4646end
4747local e,m = pcall(f)
48−assert(not e and m:find("\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{27}\u{58}\u{27}"))
48+assert((not (e and m:find("\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{27}\u{58}\u{27}"))))
4949getmetatable(env).__newindex=function ()
5050error("\u{68}\u{69}")
5151end
5252local e,m = xpcall(f,debug.traceback)
53−assert(not e and m:find("\u{27}\u{6e}\u{65}\u{77}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{27}"))
53+assert((not (e and m:find("\u{27}\u{6e}\u{65}\u{77}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{27}"))))
5454f,X=nil
5555coroutine.yield("\u{62}")
56−if 2 ^ 32 == 0 then
56+if ((0x2 ^ 0x20) == 0x0) then
5757print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{6c}\u{65}\u{6e}\u{67}\u{74}\u{68}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}")
58−local repstrings = 192
59−local ssize = math.ceil(2.0 ^ 32 / repstrings) + 1
60−assert(repstrings * ssize > 2.0 ^ 32)
58+local repstrings = 0xc0
59+local ssize = (math.ceil(((2.0 ^ 0x20) / repstrings)) + 0x1)
60+assert(((repstrings * ssize) > (2.0 ^ 0x20)))
6161local longs = string.rep("\u{0}",ssize)
62−local rep = assert(load("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{2e}\u{2e}\u{2e}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}" .. string.rep("\u{61}",repstrings,"\u{2e}\u{2e}")))
62+local rep = assert(load(("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{2e}\u{2e}\u{2e}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}" .. string.rep("\u{61}",repstrings,"\u{2e}\u{2e}"))))
6363local a,b = pcall(rep,longs)
64−assert(not a and string.find(b,"\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}"))
64+assert((not (a and string.find(b,"\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}"))))
6565end
6666print("\u{4f}\u{4b}")
6767return "\u{61}"
desk/res/lua/cycled/bitwise.luanew file+309
@@ -0,0 +1,309 @@
1+print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{62}\u{69}\u{74}\u{77}\u{69}\u{73}\u{65}\u{20}\u{6f}\u{70}\u{65}\u{72}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{73}")
2+require("\u{62}\u{77}\u{63}\u{6f}\u{65}\u{72}\u{63}\u{69}\u{6f}\u{6e}")
3+local numbits = (string.packsize("\u{6a}") * 0x8)
4+assert((~ (0x0 == (- 0x1))))
5+assert(((0x1 << (numbits - 0x1)) == math.mininteger))
6+local a,b,c,d
7+a=0xffffffffffffffff
8+assert((a == (- (0x1 and (a & (- ((0x1 == a) and ((a & 0x23) == 0x23))))))))
9+a=0xf0f0f0f0f0f0f0f0
10+assert((a | (- (0x1 == (- 0x1)))))
11+assert(((((a ~ a) == 0x0) and ((a ~ 0x0) == a)) and (a ~ (~ (a == (- 0x1))))))
12+assert(((a >> 0x4) == (~ a)))
13+a=0xf0
14+;
15+b=0xcc
16+;
17+c=0xaa
18+;
19+d=0xfd
20+assert(((a | (b ~ (c & d))) == 0xf4))
21+a=240.0
22+;
23+b=204.0
24+;
25+c="\u{30}\u{78}\u{41}\u{41}\u{2e}\u{30}"
26+;
27+d="\u{30}\u{78}\u{46}\u{44}\u{2e}\u{30}"
28+assert(((a | (b ~ (c & d))) == 0xf4))
29+a=0xf0000000
30+;
31+b=0xcc000000
32+;
33+c=0xaa000000
34+;
35+d=0xfd000000
36+assert(((a | (b ~ (c & d))) == 0xf4000000))
37+assert((~ (~ ((a == a) and (~ (a == (- ((0x1 ~ a) and (- (d == (~ (d + 0x1))))))))))))
38+a=(a << 0x20)
39+b=(b << 0x20)
40+c=(c << 0x20)
41+d=(d << 0x20)
42+assert(((a | (b ~ (c & d))) == (0xf4000000 << 0x20)))
43+assert((~ (~ ((a == a) and (~ (a == (- ((0x1 ~ a) and (- (d == (~ (d + 0x1))))))))))))
44+do
45+local code = string.format("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2d}\u{31}\u{20}\u{3e}\u{3e}\u{20}\u{25}\u{64}",math.maxinteger)
46+assert((load(code)() == 0x0))
47+local code = string.format("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2d}\u{31}\u{20}\u{3e}\u{3e}\u{20}\u{25}\u{64}",math.mininteger)
48+assert((load(code)() == 0x0))
49+local code = string.format("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2d}\u{31}\u{20}\u{3c}\u{3c}\u{20}\u{25}\u{64}",math.maxinteger)
50+assert((load(code)() == 0x0))
51+local code = string.format("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2d}\u{31}\u{20}\u{3c}\u{3c}\u{20}\u{25}\u{64}",math.mininteger)
52+assert((load(code)() == 0x0))
53+end
54+assert((- (((0x1 >> 0x1) == ((0x1 << (numbits - 0x1)) - 0x1)) and ((0x1 << 0x1f) == 0x80000000))))
55+assert((- ((0x1 >> (numbits - 0x1)) == 0x1)))
56+assert((- (((0x1 >> numbits) == 0x0) and (- (0x1 >> (- ((numbits == 0x0) and (- (((0x1 << numbits) == 0x0) and (- (0x1 << (- (numbits == 0x0)))))))))))))
57+assert(((0x1 >> math.mininteger) == 0x0))
58+assert(((0x1 >> math.maxinteger) == 0x0))
59+assert(((0x1 << math.mininteger) == 0x0))
60+assert(((0x1 << math.maxinteger) == 0x0))
61+assert(((((0x2 ^ 0x1e) - 0x1) << (0x2 ^ 0x1e)) == 0x0))
62+assert(((((0x2 ^ 0x1e) - 0x1) >> (0x2 ^ 0x1e)) == 0x0))
63+assert((0x1 >> (- ((0x3 == (0x1 << 0x3)) and ((0x3e8 >> 0x5) == (0x3e8 << (- 0x5)))))))
64+assert((("\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}" | 0x0) == (- 0x1)))
65+assert((("\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{65}" & "\u{2d}\u{31}") == (- 0x2)))
66+assert((("\u{20}\u{9}\u{2d}\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{65}\u{a}\u{9}" & "\u{2d}\u{31}") == 0x2))
67+assert((("\u{20}\u{20}\u{20}\u{a}\u{20}\u{20}\u{2d}\u{34}\u{35}\u{20}\u{20}\u{9}\u{20}" >> "\u{20}\u{20}\u{2d}\u{32}\u{20}\u{20}") == (- (0x2d * 0x4))))
68+assert((("\u{31}\u{32}\u{33}\u{34}\u{2e}\u{30}" << "\u{35}\u{2e}\u{30}") == (0x4d2 * 0x20)))
69+assert((("\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{2e}\u{30}" ~ "\u{30}\u{78}\u{41}\u{41}\u{41}\u{41}") == 0x5555))
70+assert((~ ("\u{30}\u{78}\u{30}\u{2e}\u{30}\u{30}\u{30}\u{70}\u{34}" == (- 0x1))))
71+assert(((("\u{37}" .. 0x3) << 0x1) == 0x92))
72+assert(((0xffffffff >> (0x1 .. "\u{39}")) == 0x1fff))
73+assert(((0xa | (0x1 .. "\u{39}")) == 0x1b))
74+do
75+local st,msg = pcall(function ()
76+return (0x4 & "\u{61}")
77+end)
78+assert(string.find(msg,"\u{27}\u{62}\u{61}\u{6e}\u{64}\u{27}"))
79+local st,msg = pcall(function ()
80+return (~ "\u{61}")
81+end)
82+assert(string.find(msg,"\u{27}\u{62}\u{6e}\u{6f}\u{74}\u{27}"))
83+end
84+assert((not pcall(function ()
85+return ("\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{2e}\u{30}" | 0x0)
86+end)))
87+assert((not pcall(function ()
88+return ("\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{0}" | 0x0)
89+end)))
90+print("\u{2b}")
91+package.preload.bit32=function ()
92+local bit = {}
93+function bit.bnot(a)
94+return (~ (a & 0xffffffff))
95+end
96+function bit.band(x,y,z, ...)
97+if (not z) then
98+return (((x or (- 0x1)) & (y or (- 0x1))) & 0xffffffff)
99+else
100+local arg = {...}
101+local res = ((x & y) & z)
102+for i = 0x1, (# arg)
103+do
104+res=(res & arg[i])
105+end
106+return (res & 0xffffffff)
107+end
108+end
109+function bit.bor(x,y,z, ...)
110+if (not z) then
111+return (((x or 0x0) | (y or 0x0)) & 0xffffffff)
112+else
113+local arg = {...}
114+local res = ((x | y) | z)
115+for i = 0x1, (# arg)
116+do
117+res=(res | arg[i])
118+end
119+return (res & 0xffffffff)
120+end
121+end
122+function bit.bxor(x,y,z, ...)
123+if (not z) then
124+return (((x or 0x0) ~ (y or 0x0)) & 0xffffffff)
125+else
126+local arg = {...}
127+local res = ((x ~ y) ~ z)
128+for i = 0x1, (# arg)
129+do
130+res=(res ~ arg[i])
131+end
132+return (res & 0xffffffff)
133+end
134+end
135+function bit.btest(...)
136+return (bit.band(...) ~= 0x0)
137+end
138+function bit.lshift(a,b)
139+return (((a & 0xffffffff) << b) & 0xffffffff)
140+end
141+function bit.rshift(a,b)
142+return (((a & 0xffffffff) >> b) & 0xffffffff)
143+end
144+function bit.arshift(a,b)
145+a=(a & 0xffffffff)
146+if ((b <= 0x0) or ((a & 0x80000000) == 0x0)) then
147+return ((a >> b) & 0xffffffff)
148+else
149+return (((a >> b) | (~ (0xffffffff >> b))) & 0xffffffff)
150+end
151+end
152+function bit.lrotate(a,b)
153+b=(b & 0x1f)
154+a=(a & 0xffffffff)
155+a=((a << b) | (a >> (0x20 - b)))
156+return (a & 0xffffffff)
157+end
158+function bit.rrotate(a,b)
159+return bit.lrotate(a,(- b))
160+end
161+local function checkfield
162+(f,w)
163+w=(w or 0x1)
164+assert((f >= 0x0),"\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{6e}\u{65}\u{67}\u{61}\u{74}\u{69}\u{76}\u{65}")
165+assert((w > 0x0),"\u{77}\u{69}\u{64}\u{74}\u{68}\u{20}\u{6d}\u{75}\u{73}\u{74}\u{20}\u{62}\u{65}\u{20}\u{70}\u{6f}\u{73}\u{69}\u{74}\u{69}\u{76}\u{65}")
166+assert(((f + w) <= 0x20),"\u{74}\u{72}\u{79}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{6f}\u{20}\u{61}\u{63}\u{63}\u{65}\u{73}\u{73}\u{20}\u{6e}\u{6f}\u{6e}\u{2d}\u{65}\u{78}\u{69}\u{73}\u{74}\u{65}\u{6e}\u{74}\u{20}\u{62}\u{69}\u{74}\u{73}")
167+return f,(~ (- (0x1 << w)))
168+end
169+function bit.extract(a,f,w)
170+local f,mask = checkfield(f,w)
171+return ((a >> f) & mask)
172+end
173+function bit.replace(a,v,f,w)
174+local f,mask = checkfield(f,w)
175+v=(v & mask)
176+a=((a & (~ (mask << f))) | (v << f))
177+return (a & 0xffffffff)
178+end
179+return bit
180+end
181+print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{62}\u{69}\u{74}\u{77}\u{69}\u{73}\u{65}\u{20}\u{6c}\u{69}\u{62}\u{72}\u{61}\u{72}\u{79}")
182+local bit32 = require("\u{62}\u{69}\u{74}\u{33}\u{32}")
183+assert((bit32.band() == bit32.bnot(0x0)))
184+assert((bit32.btest() == true))
185+assert((bit32.bor() == 0x0))
186+assert((bit32.bxor() == 0x0))
187+assert((bit32.band() == bit32.band(0xffffffff)))
188+assert((bit32.band(0x1,0x2) == 0x0))
189+assert((bit32.band((- 0x1)) == 0xffffffff))
190+assert((bit32.band(((0x1 << 0x21) - 0x1)) == 0xffffffff))
191+assert((bit32.band((- ((0x1 << 0x21) - 0x1))) == 0xffffffff))
192+assert((bit32.band(((0x1 << 0x21) + 0x1)) == 0x1))
193+assert((bit32.band((- ((0x1 << 0x21) + 0x1))) == 0x1))
194+assert((bit32.band((- (0x1 << 0x28))) == 0x0))
195+assert((bit32.band((0x1 << 0x28)) == 0x0))
196+assert((bit32.band((- ((0x1 << 0x28) - 0x2))) == 0xfffffffe))
197+assert((bit32.band(((0x1 << 0x28) - 0x4)) == 0xfffffffc))
198+assert((bit32.lrotate(0x0,(- 0x1)) == 0x0))
199+assert((bit32.lrotate(0x0,0x7) == 0x0))
200+assert((bit32.lrotate(0x12345678,0x0) == 0x12345678))
201+assert((bit32.lrotate(0x12345678,0x20) == 0x12345678))
202+assert((bit32.lrotate(0x12345678,0x4) == 0x23456781))
203+assert((bit32.rrotate(0x12345678,(- 0x4)) == 0x23456781))
204+assert((bit32.lrotate(0x12345678,(- 0x8)) == 0x78123456))
205+assert((bit32.rrotate(0x12345678,0x8) == 0x78123456))
206+assert((bit32.lrotate(0xaaaaaaaa,0x2) == 0xaaaaaaaa))
207+assert((bit32.lrotate(0xaaaaaaaa,(- 0x2)) == 0xaaaaaaaa))
208+for i = (- 0x32), 0x32
209+do
210+assert((bit32.lrotate(0x89abcdef,i) == bit32.lrotate(0x89abcdef,(i % 0x20))))
211+end
212+assert((bit32.lshift(0x12345678,0x4) == 0x23456780))
213+assert((bit32.lshift(0x12345678,0x8) == 0x34567800))
214+assert((bit32.lshift(0x12345678,(- 0x4)) == 0x1234567))
215+assert((bit32.lshift(0x12345678,(- 0x8)) == 0x123456))
216+assert((bit32.lshift(0x12345678,0x20) == 0x0))
217+assert((bit32.lshift(0x12345678,(- 0x20)) == 0x0))
218+assert((bit32.rshift(0x12345678,0x4) == 0x1234567))
219+assert((bit32.rshift(0x12345678,0x8) == 0x123456))
220+assert((bit32.rshift(0x12345678,0x20) == 0x0))
221+assert((bit32.rshift(0x12345678,(- 0x20)) == 0x0))
222+assert((bit32.arshift(0x12345678,0x0) == 0x12345678))
223+assert((bit32.arshift(0x12345678,0x1) == (0x12345678 // 0x2)))
224+assert((bit32.arshift(0x12345678,(- 0x1)) == (0x12345678 * 0x2)))
225+assert((bit32.arshift((- 0x1),0x1) == 0xffffffff))
226+assert((bit32.arshift((- 0x1),0x18) == 0xffffffff))
227+assert((bit32.arshift((- 0x1),0x20) == 0xffffffff))
228+assert((bit32.arshift((- 0x1),(- 0x1)) == bit32.band((- (0x1 * 0x2)),0xffffffff)))
229+assert(((0x12345678 << 0x4) == 0x123456780))
230+assert(((0x12345678 << 0x8) == 0x1234567800))
231+assert((0x12345678 << (- (0x4 == 0x1234567))))
232+assert((0x12345678 << (- (0x8 == 0x123456))))
233+assert(((0x12345678 << 0x20) == 0x1234567800000000))
234+assert((0x12345678 << (- (0x20 == 0x0))))
235+assert(((0x12345678 >> 0x4) == 0x1234567))
236+assert(((0x12345678 >> 0x8) == 0x123456))
237+assert(((0x12345678 >> 0x20) == 0x0))
238+assert((0x12345678 >> (- (0x20 == 0x1234567800000000))))
239+print("\u{2b}")
240+local c = {0x0,0x1,0x2,0x3,0xa,0x80000000,0xaaaaaaaa,0x55555555,0xffffffff,0x7fffffff}
241+for _,b in pairs(c)
242+do
243+assert((bit32.band(b) == b))
244+assert((bit32.band(b,b) == b))
245+assert((bit32.band(b,b,b,b) == b))
246+assert((bit32.btest(b,b) == (b ~= 0x0)))
247+assert((bit32.band(b,b,b) == b))
248+assert((bit32.band(b,b,b,(~ b)) == 0x0))
249+assert((bit32.btest(b,b,b) == (b ~= 0x0)))
250+assert((bit32.band(b,bit32.bnot(b)) == 0x0))
251+assert((bit32.bor(b,bit32.bnot(b)) == bit32.bnot(0x0)))
252+assert((bit32.bor(b) == b))
253+assert((bit32.bor(b,b) == b))
254+assert((bit32.bor(b,b,b) == b))
255+assert((bit32.bor(b,b,0x0,(~ b)) == 0xffffffff))
256+assert((bit32.bxor(b) == b))
257+assert((bit32.bxor(b,b) == 0x0))
258+assert((bit32.bxor(b,b,b) == b))
259+assert((bit32.bxor(b,b,b,b) == 0x0))
260+assert((bit32.bxor(b,0x0) == b))
261+assert((bit32.bnot(b) ~= b))
262+assert((bit32.bnot(bit32.bnot(b)) == b))
263+assert((bit32.bnot(b) == (((0x1 << 0x20) - 0x1) - b)))
264+assert((bit32.lrotate(b,0x20) == b))
265+assert((bit32.rrotate(b,0x20) == b))
266+assert((bit32.lshift(bit32.lshift(b,(- 0x4)),0x4) == bit32.band(b,bit32.bnot(0xf))))
267+assert((bit32.rshift(bit32.rshift(b,0x4),(- 0x4)) == bit32.band(b,bit32.bnot(0xf))))
268+end
269+c={0x0,0x1,0x2,0x3,0xa,0x800000,0xaaaaaa,0x555555,0xffffff,0x7fffff}
270+for _,b in pairs(c)
271+do
272+for i = (- 0x28), 0x28
273+do
274+local x = bit32.lshift(b,i)
275+local y = math.floor(math.fmod((b * (2.0 ^ i)),(2.0 ^ 0x20)))
276+assert((math.fmod((x - y),(2.0 ^ 0x20)) == 0x0))
277+end
278+end
279+assert((not pcall(bit32.band,{})))
280+assert((not pcall(bit32.bnot,"\u{61}")))
281+assert((not pcall(bit32.lshift,0x2d)))
282+assert((not pcall(bit32.lshift,0x2d,print)))
283+assert((not pcall(bit32.rshift,0x2d,print)))
284+print("\u{2b}")
285+assert((bit32.extract(0x12345678,0x0,0x4) == 0x8))
286+assert((bit32.extract(0x12345678,0x4,0x4) == 0x7))
287+assert((bit32.extract(0xa0001111,0x1c,0x4) == 0xa))
288+assert((bit32.extract(0xa0001111,0x1f,0x1) == 0x1))
289+assert((bit32.extract(0x50000111,0x1f,0x1) == 0x0))
290+assert((bit32.extract(0xf2345679,0x0,0x20) == 0xf2345679))
291+assert((not pcall(bit32.extract,0x0,(- 0x1))))
292+assert((not pcall(bit32.extract,0x0,0x20)))
293+assert((not pcall(bit32.extract,0x0,0x0,0x21)))
294+assert((not pcall(bit32.extract,0x0,0x1f,0x2)))
295+assert((bit32.replace(0x12345678,0x5,0x1c,0x4) == 0x52345678))
296+assert((bit32.replace(0x12345678,0x87654321,0x0,0x20) == 0x87654321))
297+assert((bit32.replace(0x0,0x1,0x2) == (0x2 ^ 0x2)))
298+assert((bit32.replace(0x0,(- 0x1),0x4) == (0x2 ^ 0x4)))
299+assert((bit32.replace((- 0x1),0x0,0x1f) == ((0x1 << 0x1f) - 0x1)))
300+assert((bit32.replace((- 0x1),0x0,0x1,0x2) == ((0x1 << 0x20) - 0x7)))
301+assert((bit32.bor(3.0) == 0x3))
302+assert((bit32.bor((- 4.0)) == 0xfffffffc))
303+if (((2.0 ^ 0x32) < ((2.0 ^ 0x32) + 1.0)) and ((2.0 ^ 0x32) < (- (0x1 >> 0x1)))) then
304+assert((bit32.bor(((2.0 ^ 0x20) - 5.0)) == 0xfffffffb))
305+assert((bit32.bor((- ((2.0 ^ 0x20) - 6.0))) == 0xfffffffa))
306+assert((bit32.bor(((2.0 ^ 0x30) - 5.0)) == 0xfffffffb))
307+assert((bit32.bor((- ((2.0 ^ 0x30) - 6.0))) == 0xfffffffa))
308+end
309+print("\u{4f}\u{4b}")
zod/luau/res/lua/cycled/bwcoercion.lua → desk/res/lua/cycled/bwcoercion.luarenamed+11−11
@@ -6,27 +6,27 @@ _ENV=nil
66local function toint
77(x)
88x=tonumber(x)
9−if not x then
9+if (not x) then
1010return false
1111end
1212return tointeger(x)
1313end
1414local function trymt
1515(x,y,mtname)
16−if type(y) ~= "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}" then
16+if (type(y) ~= "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}") then
1717local mt = getmetatable(y)
18−local mm = mt and rawget(mt,mtname)
18+local mm = (mt and rawget(mt,mtname))
1919if mm then
2020return mm(x,y)
2121end
2222end
23−error("\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{27}" .. strsub(mtname,3) .. "\u{27}\u{20}\u{61}\u{20}" .. type(x) .. "\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{61}\u{20}" .. type(y),4)
23+error(("\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{27}" .. (strsub(mtname,0x3) .. ("\u{27}\u{20}\u{61}\u{20}" .. (type(x) .. ("\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{61}\u{20}" .. type(y)))))),0x4)
2424end
2525local function checkargs
2626(x,y,mtname)
2727local xi = toint(x)
2828local yi = toint(y)
29−if xi and yi then
29+if (xi and yi) then
3030return xi,yi
3131else
3232return trymt(x,y,mtname),nil
@@ -35,25 +35,25 @@ end
3535local smt = getmetatable("")
3636smt.__band=function (x,y)
3737local x,y = checkargs(x,y,"\u{5f}\u{5f}\u{62}\u{61}\u{6e}\u{64}")
38−return y and x & y or x
38+return ((y and (x & y)) or x)
3939end
4040smt.__bor=function (x,y)
4141local x,y = checkargs(x,y,"\u{5f}\u{5f}\u{62}\u{6f}\u{72}")
42−return y and x | y or x
42+return ((y and (x | y)) or x)
4343end
4444smt.__bxor=function (x,y)
4545local x,y = checkargs(x,y,"\u{5f}\u{5f}\u{62}\u{78}\u{6f}\u{72}")
46−return y and x ~ y or x
46+return ((y and (x ~ y)) or x)
4747end
4848smt.__shl=function (x,y)
4949local x,y = checkargs(x,y,"\u{5f}\u{5f}\u{73}\u{68}\u{6c}")
50−return y and x << y or x
50+return ((y and (x << y)) or x)
5151end
5252smt.__shr=function (x,y)
5353local x,y = checkargs(x,y,"\u{5f}\u{5f}\u{73}\u{68}\u{72}")
54−return y and x >> y or x
54+return ((y and (x >> y)) or x)
5555end
5656smt.__bnot=function (x)
5757local x,y = checkargs(x,x,"\u{5f}\u{5f}\u{62}\u{6e}\u{6f}\u{74}")
58−return y and ~ x or x
58+return (y and (~ (x or x)))
5959end
desk/res/lua/cycled/calls.luanew file+492
@@ -0,0 +1,492 @@
1+print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{73}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{73}")
2+local debug = require("\u{64}\u{65}\u{62}\u{75}\u{67}")
3+assert((type((0x1 < 0x2)) == "\u{62}\u{6f}\u{6f}\u{6c}\u{65}\u{61}\u{6e}"))
4+assert(((type(true) == "\u{62}\u{6f}\u{6f}\u{6c}\u{65}\u{61}\u{6e}") and (type(false) == "\u{62}\u{6f}\u{6f}\u{6c}\u{65}\u{61}\u{6e}")))
5+assert((((((type(nil) == "\u{6e}\u{69}\u{6c}") and (type((- 0x3)) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")) and (type("\u{78}") == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type({}) == "\u{74}\u{61}\u{62}\u{6c}\u{65}")) and (type(type) == "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}")))
6+assert((type(assert) == type(print)))
7+local function f
8+(x)
9+return a:x(x)
10+end
11+assert((type(f) == "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}"))
12+assert((not pcall(type)))
13+fact=false
14+do
15+local res = 0x1
16+local function fact
17+(n)
18+if (n == 0x0) then
19+return res
20+else
21+return (n * fact((n - 0x1)))
22+end
23+end
24+assert((fact(0x5) == 0x78))
25+end
26+assert((fact == false))
27+fact=nil
28+local a = {["\u{69}"] = 0xa}
29+local self = 0x14
30+function a:x(x)
31+return (x + self.i)
32+end
33+function a.y(x)
34+return (x + self)
35+end
36+assert(((a:x(0x1) + 0xa) == a.y(0x1)))
37+a.t={["\u{69}"] = (- 0x64)}
38+a["\u{74}"].x=function (self,a,b)
39+return ((self.i + a) + b)
40+end
41+assert((a.t:x(0x2,0x3) == (- 0x5f)))
42+do
43+local a = {["\u{78}"] = 0x0}
44+function a:add(x)
45+self.x,a.y=(self.x + x),0x14
46+;
47+return self
48+end
49+assert(((a:add(0xa):add(0x14):add(0x1e).x == 0x3c) and (a.y == 0x14)))
50+end
51+local a = {["\u{62}"] = {["\u{63}"] = {}}}
52+function a.b.c.f1(x)
53+return (x + 0x1)
54+end
55+function a.b.c:f2(x,y)
56+self[x]=y
57+end
58+assert((a.b.c.f1(0x4) == 0x5))
59+a.b.c:f2("\u{6b}",0xc)
60+;
61+assert((a.b.c.k == 0xc))
62+print("\u{2b}")
63+t=nil
64+function f(a,b,c)
65+local d = "\u{61}"
66+;
67+t={a,b,c,d}
68+end
69+f(0x1,0x2)
70+assert(((((t[0x1] == 0x1) and (t[0x2] == 0x2)) and (t[0x3] == nil)) and (t[0x4] == "\u{61}")))
71+f(0x1,0x2,0x3,0x4)
72+assert(((((t[0x1] == 0x1) and (t[0x2] == 0x2)) and (t[0x3] == 0x3)) and (t[0x4] == "\u{61}")))
73+t=nil
74+function fat(x)
75+if (x <= 0x1) then
76+return 0x1
77+else
78+return (x * load(("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{66}\u{61}\u{74}\u{28}" .. ((x - 0x1) .. "\u{29}")),"")())
79+end
80+end
81+assert(load("\u{6c}\u{6f}\u{61}\u{64}\u{20}\u{27}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{66}\u{61}\u{74}\u{28}\u{36}\u{29}\u{3d}\u{3d}\u{37}\u{32}\u{30}\u{29}\u{27}\u{20}\u{28}\u{29}\u{20}"))()
82+a=load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{66}\u{61}\u{74}\u{28}\u{35}\u{29}\u{2c}\u{20}\u{33}")
83+local a,b = a()
84+assert(((a == 0x78) and (b == 0x3)))
85+fat=nil
86+print("\u{2b}")
87+local function err_on_n
88+(n)
89+if (n == 0x0) then
90+error()
91+;
92+exit(0x1)
93+;
94+else
95+err_on_n((n - 0x1))
96+;
97+exit(0x1)
98+;
99+end
100+end
101+do
102+local function dummy
103+(n)
104+if (n > 0x0) then
105+assert((not pcall(err_on_n,n)))
106+dummy((n - 0x1))
107+end
108+end
109+dummy(0xa)
110+end
111+_G.deep=nil
112+function deep(n)
113+if (n > 0x0) then
114+deep((n - 0x1))
115+end
116+end
117+deep(0xa)
118+deep(0xb4)
119+print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{61}\u{69}\u{6c}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{73}")
120+function deep(n)
121+if (n > 0x0) then
122+return deep((n - 0x1))
123+else
124+return 0x65
125+end
126+end
127+assert((deep(0x7530) == 0x65))
128+a={}
129+function a:deep(n)
130+if (n > 0x0) then
131+return self:deep((n - 0x1))
132+else
133+return 0x65
134+end
135+end
136+assert((a:deep(0x7530) == 0x65))
137+do
138+local function foo
139+(x, ...)
140+local a = {...}
141+;
142+return x,a[0x1],a[0x2]
143+end
144+local function foo1
145+(x)
146+return foo(0xa,x,(x + 0x1))
147+end
148+local a,b,c = foo1((- 0x2))
149+assert(((a == 0xa) and (b == (- (0x2 and (c == (- 0x1)))))))
150+local t = setmetatable({},{["\u{5f}\u{5f}\u{63}\u{61}\u{6c}\u{6c}"] = foo})
151+local function foo2
152+(x)
153+return t(0xa,x)
154+end
155+a,b,c=foo2(0x64)
156+assert((((a == t) and (b == 0xa)) and (c == 0x64)))
157+a,b=(function ()
158+return foo()
159+end)()
160+assert(((a == nil) and (b == nil)))
161+local X,Y,A
162+local function foo
163+(x,y, ...)
164+X=x
165+;
166+Y=y
167+;
168+A={...}
169+end
170+local function foo1
171+(...)
172+return foo(...)
173+end
174+local a,b,c = foo1()
175+assert((((X == nil) and (Y == nil)) and (# (A == 0x0))))
176+a,b,c=foo1(0xa)
177+assert((((X == 0xa) and (Y == nil)) and (# (A == 0x0))))
178+a,b,c=foo1(0xa,0x14)
179+assert((((X == 0xa) and (Y == 0x14)) and (# (A == 0x0))))
180+a,b,c=foo1(0xa,0x14,0x1e)
181+assert((((X == 0xa) and (Y == 0x14)) and (# ((A == 0x1) and (A[0x1] == 0x1e)))))
182+end
183+do
184+local function loop
185+()
186+assert(pcall(loop))
187+end
188+local err,msg = xpcall(loop,loop)
189+assert((not (err and string.find(msg,"\u{65}\u{72}\u{72}\u{6f}\u{72}"))))
190+end
191+do
192+local n = 0x2710
193+local function foo
194+()
195+if (n == 0x0) then
196+return 0x3ff
197+else
198+n=(n - 0x1)
199+;
200+return foo()
201+end
202+end
203+for i = 0x1, 0x64
204+do
205+foo=setmetatable({},{["\u{5f}\u{5f}\u{63}\u{61}\u{6c}\u{6c}"] = foo})
206+end
207+assert((coroutine.wrap(function ()
208+return foo()
209+end)() == 0x3ff))
210+end
211+print("\u{2b}")
212+do
213+local N = 0x14
214+local u = table.pack
215+for i = 0x1, N
216+do
217+u=setmetatable({i},{["\u{5f}\u{5f}\u{63}\u{61}\u{6c}\u{6c}"] = u})
218+end
219+local Res = u("\u{61}","\u{62}","\u{63}")
220+assert((Res.n == (N + 0x3)))
221+for i = 0x1, N
222+do
223+assert((Res[i][0x1] == i))
224+end
225+assert((((Res[(N + 0x1)] == "\u{61}") and (Res[(N + 0x2)] == "\u{62}")) and (Res[(N + 0x3)] == "\u{63}")))
226+end
227+a=nil
228+(function (x)
229+a=x
230+end)(0x17)
231+assert(((a == 0x17) and ((function (x)
232+return (x * 0x2)
233+end)(0x14) == 0x28)))
234+local Z = function (le)
235+local function a
236+(f)
237+return le(function (x)
238+return f(f)(x)
239+end)
240+end
241+return a(a)
242+end
243+local F = function (f)
244+return function (n)
245+if (n == 0x0) then
246+return 0x1
247+else
248+return (n * f((n - 0x1)))
249+end
250+end
251+end
252+local fat = Z(F)
253+assert((((fat(0x0) == 0x1) and (fat(0x4) == 0x18)) and (Z(F)(0x5) == (0x5 * Z(F)(0x4)))))
254+local function g
255+(z)
256+local function f
257+(a,b,c,d)
258+return function (x,y)
259+return (((((((a + b) + c) + d) + a) + x) + y) + z)
260+end
261+end
262+return f(z,(z + 0x1),(z + 0x2),(z + 0x3))
263+end
264+local f = g(0xa)
265+assert((f(0x9,0x10) == (((((((0xa + 0xb) + 0xc) + 0xd) + 0xa) + 0x9) + 0x10) + 0xa)))
266+print("\u{2b}")
267+local function unlpack
268+(t,i)
269+i=(i or 0x1)
270+if (i <= (# t)) then
271+return t[i],unlpack(t,(i + 0x1))
272+end
273+end
274+local function equaltab
275+(t1,t2)
276+assert((# (t1 == (# t2))))
277+for i = 0x1, (# t1)
278+do
279+assert((t1[i] == t2[i]))
280+end
281+end
282+local pack = function (...)
283+return table.pack(...)
284+end
285+local function f
286+()
287+return 0x1,0x2,0x1e,0x4
288+end
289+local function ret2
290+(a,b)
291+return a,b
292+end
293+local a,b,c,d = unlpack({0x1,0x2,0x3})
294+assert(((((a == 0x1) and (b == 0x2)) and (c == 0x3)) and (d == nil)))
295+a={0x1,0x2,0x3,0x4,false,0xa,"\u{61}\u{6c}\u{6f}",false,assert}
296+equaltab(pack(unlpack(a)),a)
297+equaltab(pack(unlpack(a),(- 0x1)),{0x1,(- 0x1)})
298+a,b,c,d=ret2(f()),ret2(f())
299+assert(((((a == 0x1) and (b == 0x1)) and (c == 0x2)) and (d == nil)))
300+a,b,c,d=unlpack(pack(ret2(f()),ret2(f())))
301+assert(((((a == 0x1) and (b == 0x1)) and (c == 0x2)) and (d == nil)))
302+a,b,c,d=unlpack(pack(ret2(f()),ret2(f())))
303+assert(((((a == 0x1) and (b == 0x1)) and (c == nil)) and (d == nil)))
304+a=ret2({unlpack({0x1,0x2,0x3}),unlpack({0x3,0x2,0x1}),unlpack({"\u{61}","\u{62}"})})
305+assert(((((a[0x1] == 0x1) and (a[0x2] == 0x3)) and (a[0x3] == "\u{61}")) and (a[0x4] == "\u{62}")))
306+rawget({},"\u{78}",0x1)
307+rawset({},"\u{78}",0x1,0x2)
308+assert((math.sin(0x1,0x2) == math.sin(0x1)))
309+table.sort({0xa,0x9,0x8,0x4,0x13,0x17,0x0,0x0},function (a,b)
310+return (a < b)
311+end,"\u{65}\u{78}\u{74}\u{72}\u{61}\u{20}\u{61}\u{72}\u{67}")
312+local x = "\u{2d}\u{2d}\u{20}\u{61}\u{20}\u{63}\u{6f}\u{6d}\u{6d}\u{65}\u{6e}\u{74}\u{0}\u{0}\u{0}\u{a}\u{20}\u{20}\u{78}\u{20}\u{3d}\u{20}\u{31}\u{30}\u{20}\u{2b}\u{20}\u{a}\u{32}\u{33}\u{3b}\u{20}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{29}\u{20}\u{78}\u{20}\u{3d}\u{20}\u{27}\u{68}\u{69}\u{27}\u{20}\u{65}\u{6e}\u{64}\u{3b}\u{20}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{27}\u{0}\u{27}"
313+local function read1
314+(x)
315+local i = 0x0
316+return function ()
317+collectgarbage()
318+i=(i + 0x1)
319+return string.sub(x,i,i)
320+end
321+end
322+local function cannotload
323+(msg,a,b)
324+assert((not (a and string.find(b,msg))))
325+end
326+a=assert(load(read1(x),"\u{6d}\u{6f}\u{64}\u{6e}\u{61}\u{6d}\u{65}","\u{74}",_G))
327+assert(((a() == "\u{0}") and (_G.x == 0x21)))
328+assert((debug.getinfo(a).source == "\u{6d}\u{6f}\u{64}\u{6e}\u{61}\u{6d}\u{65}"))
329+cannotload("\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{20}\u{61}\u{20}\u{74}\u{65}\u{78}\u{74}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}",load(read1(x),"\u{6d}\u{6f}\u{64}\u{6e}\u{61}\u{6d}\u{65}","\u{62}",{}))
330+cannotload("\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{20}\u{61}\u{20}\u{74}\u{65}\u{78}\u{74}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}",load(x,"\u{6d}\u{6f}\u{64}\u{6e}\u{61}\u{6d}\u{65}","\u{62}"))
331+a=assert(load(function ()
332+return nil
333+end))
334+a()
335+assert((not load(function ()
336+return true
337+end)))
338+local t = {nil,"\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}","\u{33}"}
339+f,msg=load(function ()
340+return table.remove(t,0x1)
341+end)
342+assert((f() == nil))
343+f=load(string.dump(function ()
344+return 0x1
345+end),nil,"\u{62}",{})
346+assert(((type(f) == "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}") and (f() == 0x1)))
347+do
348+local f = string.dump(function ()
349+return "\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}"
350+end)
351+f=load(read1(f))
352+assert((f() == "\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}"))
353+end
354+x=string.dump(load("\u{78}\u{20}\u{3d}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{78}"))
355+a=assert(load(read1(x),nil,"\u{62}"))
356+assert(((a() == 0x1) and (_G.x == 0x1)))
357+cannotload("\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{20}\u{61}\u{20}\u{62}\u{69}\u{6e}\u{61}\u{72}\u{79}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}",load(read1(x),nil,"\u{74}"))
358+cannotload("\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{20}\u{61}\u{20}\u{62}\u{69}\u{6e}\u{61}\u{72}\u{79}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}",load(x,nil,"\u{74}"))
359+_G.x=nil
360+assert((not pcall(string.dump,print)))
361+cannotload("\u{75}\u{6e}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{73}\u{79}\u{6d}\u{62}\u{6f}\u{6c}",load(read1("\u{2a}\u{61}\u{20}\u{3d}\u{20}\u{31}\u{32}\u{33}")))
362+cannotload("\u{75}\u{6e}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{73}\u{79}\u{6d}\u{62}\u{6f}\u{6c}",load("\u{2a}\u{61}\u{20}\u{3d}\u{20}\u{31}\u{32}\u{33}"))
363+cannotload("\u{68}\u{68}\u{69}",load(function ()
364+error("\u{68}\u{68}\u{69}")
365+end))
366+assert((load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{5f}\u{45}\u{4e}\u{56}",nil,nil,0x7b)() == 0x7b))
367+local x
368+;
369+XX=0x7b
370+local function h
371+()
372+local y = x
373+return XX
374+end
375+local d = string.dump(h)
376+x=load(d,"","\u{62}")
377+assert((debug.getupvalue(x,0x2) == "\u{5f}\u{45}\u{4e}\u{56}"))
378+debug.setupvalue(x,0x2,_G)
379+assert((x() == 0x7b))
380+assert((assert(load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{58}\u{58}\u{20}\u{2b}\u{20}\u{2e}\u{2e}\u{2e}",nil,nil,{["\u{58}\u{58}"] = 0xd}))(0x4) == 0x11))
381+XX=nil
382+x="\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{78}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{79}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{7a}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{78}\u{2b}\u{79}\u{2b}\u{7a}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{65}\u{6e}\u{64}\u{a}"
383+a=assert(load(read1(x),"\u{72}\u{65}\u{61}\u{64}","\u{74}"))
384+assert((a()(0x2)(0x3)(0xa) == 0xf))
385+x=string.dump(a)
386+a=assert(load(read1(x),"\u{72}\u{65}\u{61}\u{64}","\u{62}"))
387+assert((a()(0x2)(0x3)(0xa) == 0xf))
388+local a,b = 0x14,0x1e
389+x=load(string.dump(function (x)
390+if (x == "\u{73}\u{65}\u{74}") then
391+a=(0xa + b)
392+;
393+b=(b + 0x1)
394+else
395+return a
396+end
397+end),"","\u{62}",nil)
398+assert((x() == nil))
399+assert((debug.setupvalue(x,0x1,"\u{68}\u{69}") == "\u{61}"))
400+assert((x() == "\u{68}\u{69}"))
401+assert((debug.setupvalue(x,0x2,0xd) == "\u{62}"))
402+assert((not debug.setupvalue(x,0x3,0xa)))
403+x("\u{73}\u{65}\u{74}")
404+assert((x() == 0x17))
405+x("\u{73}\u{65}\u{74}")
406+assert((x() == 0x18))
407+do
408+local nup = 0xc8
409+local prog = {"\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{31}"}
410+for i = 0x2, nup
411+do
412+prog[(# (prog + 0x1))]=("\u{2c}\u{20}\u{61}" .. i)
413+end
414+prog[(# (prog + 0x1))]="\u{20}\u{3d}\u{20}\u{31}"
415+for i = 0x2, nup
416+do
417+prog[(# (prog + 0x1))]=("\u{2c}\u{20}" .. i)
418+end
419+local sum = 0x1
420+prog[(# (prog + 0x1))]="\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{29}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{61}\u{31}"
421+for i = 0x2, nup
422+do
423+prog[(# (prog + 0x1))]=("\u{20}\u{2b}\u{20}\u{61}" .. i)
424+;
425+sum=(sum + i)
426+end
427+prog[(# (prog + 0x1))]="\u{20}\u{65}\u{6e}\u{64}"
428+prog=table.concat(prog)
429+local f = assert(load(prog))()
430+assert((f() == sum))
431+f=load(string.dump(f))
432+local a = 0xa
433+local h = function ()
434+return a
435+end
436+for i = 0x1, nup
437+do
438+debug.upvaluejoin(f,i,h,0x1)
439+end
440+assert((f() == (0xa * nup)))
441+end
442+do
443+local t = {["\u{78}"] = 0x1}
444+function t:_012345678901234567890123456789012345678901234567890123456789()
445+return self.x
446+end
447+assert((t:_012345678901234567890123456789012345678901234567890123456789() == 0x1))
448+end
449+assert(((function ()
450+return nil
451+end)(0x4) == nil))
452+assert(((function ()
453+local a
454+;
455+return a
456+end)(0x4) == nil))
457+assert(((function (a)
458+return a
459+end)() == nil))
460+print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{62}\u{69}\u{6e}\u{61}\u{72}\u{79}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}\u{73}")
461+do
462+local header = string.pack("\u{63}\u{34}\u{42}\u{42}\u{63}\u{36}\u{42}\u{42}\u{42}","\u{1b}\u{4c}\u{75}\u{61}",0x54,0x0,"\u{19}\u{93}\u{d}\u{a}\u{1a}\u{a}",0x4,string.packsize("\u{6a}"),string.packsize("\u{6e}"))
463+local c = string.dump(function ()
464+local a = 0x1
465+;
466+local b = 0x3
467+;
468+local f = function ()
469+return ((a + b) + _ENV.c)
470+end
471+local s1 = "\u{61}\u{20}\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{61}\u{6e}\u{74}"
472+local s2 = "\u{61}\u{6e}\u{6f}\u{74}\u{68}\u{65}\u{72}\u{20}\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{61}\u{6e}\u{74}"
473+return (a + (b * 0x3))
474+end)
475+assert((assert(load(c))() == 0xa))
476+assert((string.sub(c,0x1,(# header)) == header))
477+local ci,cn = string.unpack("\u{6a}\u{6e}",c,(# (header + 0x1)))
478+assert(((ci == 0x5678) and (cn == 370.5)))
479+for i = 0x1, (# header)
480+do
481+local s = (string.sub(c,0x1,(i - 0x1)) .. (string.char((string.byte(string.sub(c,i,i)) + 0x1)) .. string.sub(c,(i + 0x1),(- 0x1))))
482+assert((# (s == (# c))))
483+assert((not load(s)))
484+end
485+for i = 0x1, (# (c - 0x1))
486+do
487+local st,msg = load(string.sub(c,0x1,i))
488+assert((not (st and string.find(msg,"\u{74}\u{72}\u{75}\u{6e}\u{63}\u{61}\u{74}\u{65}\u{64}"))))
489+end
490+end
491+print("\u{4f}\u{4b}")
492+return deep
desk/res/lua/cycled/closure.luanew file+327
@@ -0,0 +1,327 @@
1+print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{75}\u{72}\u{65}\u{73}")
2+local A,B = 0x0,{["\u{67}"] = 0xa}
3+local function f
4+(x)
5+local a = {}
6+for i = 0x1, 0x3e8
7+do
8+local y = 0x0
9+do
10+a[i]=function ()
11+B.g=(B.g + 0x1)
12+;
13+y=(y + x)
14+;
15+return (y + A)
16+end
17+end
18+end
19+local dummy = function ()
20+return a[A]
21+end
22+collectgarbage()
23+A=0x1
24+;
25+assert((dummy() == a[0x1]))
26+;
27+A=0x0
28+;
29+assert((a[0x1]() == x))
30+assert((a[0x3]() == x))
31+collectgarbage()
32+assert((B.g == 0xc))
33+return a
34+end
35+local a = f(0xa)
36+local x = {[0x1] = {}}
37+setmetatable(x,{["\u{5f}\u{5f}\u{6d}\u{6f}\u{64}\u{65}"] = "\u{6b}\u{76}"})
38+while x[0x1] do
39+local a = (A .. (A .. (A .. A)))
40+A=(A + 0x1)
41+end
42+assert((a[0x1]() == (0x14 + A)))
43+assert((a[0x1]() == (0x1e + A)))
44+assert((a[0x2]() == (0xa + A)))
45+collectgarbage()
46+assert((a[0x2]() == (0x14 + A)))
47+assert((a[0x2]() == (0x1e + A)))
48+assert((a[0x3]() == (0x14 + A)))
49+assert((a[0x8]() == (0xa + A)))
50+assert((getmetatable(x).__mode == "\u{6b}\u{76}"))
51+assert((B.g == 0x13))
52+a={}
53+for i = 0x1, 0x5
54+do
55+a[i]=function (x)
56+return ((i + a) + _ENV)
57+end
58+end
59+assert(((a[0x3] ~= a[0x4]) and (a[0x4] ~= a[0x5])))
60+do
61+local a = function (x)
62+return math.sin(_ENV[x])
63+end
64+local function f
65+()
66+return a
67+end
68+assert((f() == f()))
69+end
70+a={}
71+for i = 0x1, 0xa
72+do
73+a[i]={["\u{73}\u{65}\u{74}"] = function (x)
74+i=x
75+end,["\u{67}\u{65}\u{74}"] = function ()
76+return i
77+end}
78+if (i == 0x3) then
79+break
80+end
81+end
82+assert((a[0x4] == undef))
83+a[0x1].set(0xa)
84+assert((a[0x2].get() == 0x2))
85+a[0x2].set("\u{61}")
86+assert((a[0x3].get() == 0x3))
87+assert((a[0x2].get() == "\u{61}"))
88+a={}
89+local t = {"\u{61}","\u{62}"}
90+for i = 0x1, (# t)
91+do
92+local k = t[i]
93+a[i]={["\u{73}\u{65}\u{74}"] = function (x,y)
94+i=x
95+;
96+k=y
97+end,["\u{67}\u{65}\u{74}"] = function ()
98+return i,k
99+end}
100+if (i == 0x2) then
101+break
102+end
103+end
104+a[0x1].set(0xa,0x14)
105+local r,s = a[0x2].get()
106+assert(((r == 0x2) and (s == "\u{62}")))
107+r,s=a[0x1].get()
108+assert(((r == 0xa) and (s == 0x14)))
109+a[0x2].set("\u{61}","\u{62}")
110+r,s=a[0x2].get()
111+assert(((r == "\u{61}") and (s == "\u{62}")))
112+local f
113+for i = 0x1, 0x3
114+do
115+f=function ()
116+return i
117+end
118+break
119+end
120+assert((f() == 0x1))
121+for k = 0x1, (# t)
122+do
123+local v = t[k]
124+f=function ()
125+return k,v
126+end
127+break
128+end
129+assert((({f()})[0x1] == 0x1))
130+assert((({f()})[0x2] == "\u{61}"))
131+local b
132+function f(x)
133+local first = 0x1
134+while 0x1 do
135+if ((x == 0x3) and (not first)) then
136+return
137+end
138+local a = "\u{78}\u{75}\u{78}\u{75}"
139+b=function (op,y)
140+if (op == "\u{73}\u{65}\u{74}") then
141+a=(x + y)
142+else
143+return a
144+end
145+end
146+if (x == 0x1) then
147+do
148+break
149+end
150+elseif (x == 0x2) then
151+return
152+else
153+if (x ~= 0x3) then
154+error()
155+end
156+end
157+first=nil
158+end
159+end
160+for i = 0x1, 0x3
161+do
162+f(i)
163+assert((b("\u{67}\u{65}\u{74}") == "\u{78}\u{75}\u{78}\u{75}"))
164+b("\u{73}\u{65}\u{74}",0xa)
165+;
166+assert((b("\u{67}\u{65}\u{74}") == (0xa + i)))
167+b=nil
168+end
169+pcall(f,0x4)
170+;
171+assert((b("\u{67}\u{65}\u{74}") == "\u{78}\u{75}\u{78}\u{75}"))
172+b("\u{73}\u{65}\u{74}",0xa)
173+;
174+assert((b("\u{67}\u{65}\u{74}") == 0xe))
175+local y,w
176+function f(x)
177+return function (y)
178+return function (z)
179+return (((w + x) + y) + z)
180+end
181+end
182+end
183+y=f(0xa)
184+w=1.345
185+assert((y(0x14)(0x1e) == (0x3c + w)))
186+do
187+local X,Y
188+local a = math.sin(0x0)
189+while a do
190+local b = 0xa
191+X=function ()
192+return b
193+end
194+if a then
195+break
196+end
197+end
198+do
199+local b = 0x14
200+Y=function ()
201+return b
202+end
203+end
204+assert(((X() == 0xa) and (Y() == 0x14)))
205+end
206+local a = {}
207+local i = 0x1
208+repeat
209+local x = i
210+a[i]=function ()
211+i=(x + 0x1)
212+;
213+return x
214+end
215+until ((i > 0xa) or (a[i]() ~= x))
216+assert(((((i == 0xb) and (a[0x1]() == 0x1)) and (a[0x3]() == 0x3)) and (i == 0x4)))
217+a={}
218+for i = 0x1, 0xa
219+do
220+if ((i % 0x3) == 0x0) then
221+local y = 0x0
222+a[i]=function (x)
223+local t = y
224+;
225+y=x
226+;
227+return t
228+end
229+elseif ((i % 0x3) == 0x1) then
230+goto L1
231+error("\u{6e}\u{6f}\u{74}\u{20}\u{68}\u{65}\u{72}\u{65}")
232+::L1::
233+local y = 0x1
234+a[i]=function (x)
235+local t = y
236+;
237+y=x
238+;
239+return t
240+end
241+elseif ((i % 0x3) == 0x2) then
242+local t
243+goto l4
244+::l4a::
245+a[i]=t
246+;
247+goto l4b
248+error("\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{6e}\u{65}\u{76}\u{65}\u{72}\u{20}\u{62}\u{65}\u{20}\u{68}\u{65}\u{72}\u{65}\u{21}")
249+::l4::
250+local y = 0x2
251+t=function (x)
252+local t = y
253+;
254+y=x
255+;
256+return t
257+end
258+goto l4a
259+error("\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{6e}\u{65}\u{76}\u{65}\u{72}\u{20}\u{62}\u{65}\u{20}\u{68}\u{65}\u{72}\u{65}\u{21}")
260+::l4b::
261+end
262+end
263+for i = 0x1, 0xa
264+do
265+assert(((a[i]((i * 0xa)) == (i % 0x3)) and (a[i]() == (i * 0xa))))
266+end
267+print("\u{2b}")
268+local function t
269+()
270+local function c
271+(a,b)
272+assert(((a == "\u{74}\u{65}\u{73}\u{74}") and (b == "\u{4f}\u{4b}")))
273+end
274+local function v
275+(f, ...)
276+c("\u{74}\u{65}\u{73}\u{74}",(((f() ~= 0x1) and "\u{46}\u{41}\u{49}\u{4c}\u{45}\u{44}") or "\u{4f}\u{4b}"))
277+end
278+local x = 0x1
279+return v(function ()
280+return x
281+end)
282+end
283+t()
284+local debug = require("\u{64}\u{65}\u{62}\u{75}\u{67}")
285+local foo1,foo2,foo3
286+do
287+local a,b,c = 0x3,0x5,0x7
288+foo1=function ()
289+return (a + b)
290+end
291+;
292+foo2=function ()
293+return (b + a)
294+end
295+;
296+do
297+local a = 0xa
298+foo3=function ()
299+return (a + b)
300+end
301+;
302+end
303+end
304+assert(debug.upvalueid(foo1,0x1))
305+assert(debug.upvalueid(foo1,0x2))
306+assert((not debug.upvalueid(foo1,0x3)))
307+assert((debug.upvalueid(foo1,0x1) == debug.upvalueid(foo2,0x2)))
308+assert((debug.upvalueid(foo1,0x2) == debug.upvalueid(foo2,0x1)))
309+assert(debug.upvalueid(foo3,0x1))
310+assert((debug.upvalueid(foo1,0x1) ~= debug.upvalueid(foo3,0x1)))
311+assert((debug.upvalueid(foo1,0x2) == debug.upvalueid(foo3,0x2)))
312+assert((debug.upvalueid(string.gmatch("\u{78}","\u{78}"),0x1) ~= nil))
313+assert(((foo1() == (0x3 + 0x5)) and (foo2() == (0x5 + 0x3))))
314+debug.upvaluejoin(foo1,0x2,foo2,0x2)
315+assert(((foo1() == (0x3 + 0x3)) and (foo2() == (0x5 + 0x3))))
316+assert((foo3() == (0xa + 0x5)))
317+debug.upvaluejoin(foo3,0x2,foo2,0x1)
318+assert((foo3() == (0xa + 0x5)))
319+debug.upvaluejoin(foo3,0x2,foo2,0x2)
320+assert((foo3() == (0xa + 0x3)))
321+assert((not pcall(debug.upvaluejoin,foo1,0x3,foo2,0x1)))
322+assert((not pcall(debug.upvaluejoin,foo1,0x1,foo2,0x3)))
323+assert((not pcall(debug.upvaluejoin,foo1,0x0,foo2,0x1)))
324+assert((not pcall(debug.upvaluejoin,print,0x1,foo2,0x1)))
325+assert((not pcall(debug.upvaluejoin,{},0x1,foo2,0x1)))
326+assert((not pcall(debug.upvaluejoin,foo1,0x1,print,0x1)))
327+print("\u{4f}\u{4b}")
zod/luau/res/lua/cycled/code.lua → desk/res/lua/cycled/code.luarenamed+215−215
@@ -1,17 +1,17 @@
1−if T == nil then
1+if (T == nil) then
22(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{6f}\u{70}\u{63}\u{6f}\u{64}\u{65}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
33return
44end
55print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{6f}\u{64}\u{65}\u{20}\u{67}\u{65}\u{6e}\u{65}\u{72}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{6f}\u{70}\u{74}\u{69}\u{6d}\u{69}\u{7a}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{73}")
6−local k0aux <const> = 0
6+local k0aux <const> = 0x0
77local k0 <const> = k0aux
8−local k1 <const> = 1
9−local k3 <const> = 3
10−local k6 <const> = k3 + (k3 << k0)
11−local kFF0 <const> = 4080
8+local k1 <const> = 0x1
9+local k3 <const> = 0x3
10+local k6 <const> = (k3 + (k3 << k0))
11+local kFF0 <const> = 0xff0
1212local k3_78 <const> = 3.78
13−local x,k3_78_4 <const> = 10,k3_78 / 4
14−assert(x == 10)
13+local x,k3_78_4 <const> = 0xa,(k3_78 / 0x4)
14+assert((x == 0xa))
1515local kx <const> = "\u{78}"
1616local kTrue <const> = true
1717local kFalse <const> = false
@@ -28,10 +28,10 @@ end
2828local function checkKlist
2929(func,list)
3030local k = T.listk(func)
31−assert(# k == # list)
32−for i = 1, # k
31+assert((# (k == (# list))))
32+for i = 0x1, (# k)
3333do
34−assert(k[i] == list[i] and math.type(k[i]) == math.type(list[i]))
34+assert(((k[i] == list[i]) and (math.type(k[i]) == math.type(list[i]))))
3535end
3636end
3737local function foo
@@ -39,96 +39,96 @@ local function foo
3939local a
4040a=k3
4141;
42−a=0
42+a=0x0
4343;
4444a=0.0
4545;
46−a=- 7 + 7
47−a=k3_78 / 4
46+a=(- (0x7 + 0x7))
47+a=(k3_78 / 0x4)
4848;
4949a=k3_78_4
50−a=- k3_78 / 4
50+a=(- (k3_78 / 0x4))
5151;
52−a=k3_78 / 4
52+a=(k3_78 / 0x4)
5353;
54−a=- 3.78 / 4
55−a=- 3.79 / 4
54+a=(- (3.78 / 0x4))
55+a=(- (3.79 / 0x4))
5656;
5757a=0.0
5858;
59−a=- 0
59+a=(- 0x0)
6060;
6161a=k3
6262;
6363a=3.0
6464;
65−a=3
65+a=0x3
6666;
6767a=3.0
6868end
69−checkKlist(foo,{3.78 / 4,- 3.78 / 4,- 3.79 / 4})
69+checkKlist(foo,{(3.78 / 0x4),(- (3.78 / 0x4)),(- (3.79 / 0x4))})
7070foo=function (f,a)
71−f(100 * 1000)
72−f(100.0 * 1000)
73−f(- 100 * 1000)
74−f(- 100 * 1e3)
75−f(100000)
71+f((0x64 * 0x3e8))
72+f((100.0 * 0x3e8))
73+f((- (0x64 * 0x3e8)))
74+f((- (0x64 * 1e3)))
75+f(0x186a0)
7676f(1e5)
77−f(- 100000)
78−f(- 1e5)
77+f((- 0x186a0))
78+f((- 1e5))
7979end
80−checkKlist(foo,{100000,1e5,- 100000,- 1e5})
80+checkKlist(foo,{0x186a0,1e5,(- 0x186a0),(- 1e5)})
8181foo=function (t,a)
82−t[a]=1
82+t[a]=0x1
8383;
8484t[a]=1.0
85−t[a]=1
85+t[a]=0x1
8686;
8787t[a]=1.0
88−t[a]=2
88+t[a]=0x2
8989;
9090t[a]=2.0
91−t[a]=0
91+t[a]=0x0
9292;
9393t[a]=0.0
94−t[a]=1
94+t[a]=0x1
9595;
9696t[a]=1.0
97−t[a]=2
97+t[a]=0x2
9898;
9999t[a]=2.0
100−t[a]=0
100+t[a]=0x0
101101;
102102t[a]=0.0
103103end
104−checkKlist(foo,{1,1.0,2,2.0,0,0.0})
104+checkKlist(foo,{0x1,1.0,0x2,2.0,0x0,0.0})
105105local function check
106106(f, ...)
107107local arg = {...}
108108local c = T.listcode(f)
109−for i = 1, # arg
109+for i = 0x1, (# arg)
110110do
111111local opcode = string.match(c[i],"\u{25}\u{75}\u{25}\u{77}\u{2b}")
112−assert(arg[i] == opcode)
112+assert((arg[i] == opcode))
113113end
114−assert(c[# arg + 2] == undef)
114+assert((c[(# (arg + 0x2))] == undef))
115115end
116116local function checkR
117117(f,p,r, ...)
118118local r1 = f(p)
119−assert(r == r1 and math.type(r) == math.type(r1))
119+assert(((r == r1) and (math.type(r) == math.type(r1))))
120120check(f,...)
121121end
122122local function checkequal
123123(a,b)
124124a=T.listcode(a)
125125b=T.listcode(b)
126−assert(# a == # b)
127−for i = 1, # a
126+assert((# (a == (# b))))
127+for i = 0x1, (# a)
128128do
129129a[i]=string.gsub(a[i],"\u{25}\u{62}\u{28}\u{29}","")
130130b[i]=string.gsub(b[i],"\u{25}\u{62}\u{28}\u{29}","")
131−assert(a[i] == b[i])
131+assert((a[i] == b[i]))
132132end
133133end
134134check(function ()
@@ -162,7 +162,7 @@ c=nil
162162;
163163end,"\u{4c}\u{4f}\u{41}\u{44}\u{4e}\u{49}\u{4c}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{30}")
164164check(function ()
165−local a,b,c,d = 1,1,1,1
165+local a,b,c,d = 0x1,0x1,0x1,0x1
166166d=nil
167167;
168168c=nil
@@ -172,7 +172,7 @@ b=nil
172172a=nil
173173end,"\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{4c}\u{4f}\u{41}\u{44}\u{4e}\u{49}\u{4c}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{30}")
174174do
175−local a,b,c,d = 1,1,1,1
175+local a,b,c,d = 0x1,0x1,0x1,0x1
176176d=nil
177177;
178178c=nil
@@ -180,45 +180,45 @@ c=nil
180180b=nil
181181;
182182a=nil
183−assert(a == nil and b == nil and c == nil and d == nil)
183+assert(((((a == nil) and (b == nil)) and (c == nil)) and (d == nil)))
184184end
185185check(function (a,b,c)
186186return a
187187end,"\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
188188check(function ()
189189while kTrue do
190−local a = - 1
190+local a = (- 0x1)
191191end
192192end,"\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{4a}\u{4d}\u{50}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{30}")
193193check(function ()
194−while 1 do
195−local a = - 1
194+while 0x1 do
195+local a = (- 0x1)
196196end
197197end,"\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{4a}\u{4d}\u{50}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{30}")
198198check(function ()
199199repeat
200−local x = 1
200+local x = 0x1
201201until true
202202end,"\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{30}")
203203check(function (a,b,c,d)
204−return a .. b .. c .. d
204+return (a .. (b .. (c .. d)))
205205end,"\u{4d}\u{4f}\u{56}\u{45}","\u{4d}\u{4f}\u{56}\u{45}","\u{4d}\u{4f}\u{56}\u{45}","\u{4d}\u{4f}\u{56}\u{45}","\u{43}\u{4f}\u{4e}\u{43}\u{41}\u{54}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
206206check(function ()
207−return not not nil
207+return (not (not nil))
208208end,"\u{4c}\u{4f}\u{41}\u{44}\u{46}\u{41}\u{4c}\u{53}\u{45}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
209209check(function ()
210−return not not kFalse
210+return (not (not kFalse))
211211end,"\u{4c}\u{4f}\u{41}\u{44}\u{46}\u{41}\u{4c}\u{53}\u{45}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
212212check(function ()
213−return not not true
213+return (not (not true))
214214end,"\u{4c}\u{4f}\u{41}\u{44}\u{54}\u{52}\u{55}\u{45}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
215215check(function ()
216−return not not k3
216+return (not (not k3))
217217end,"\u{4c}\u{4f}\u{41}\u{44}\u{54}\u{52}\u{55}\u{45}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
218218check(function ()
219219local a,b,c,d
220−a=b * a
221−c.x,a[b]=- ((a + d / b - a[b]) ^ a.x),b
220+a=(b * a)
221+c.x,a[b]=(- (((a + (d / b)) - a[b]) ^ a.x)),b
222222end,"\u{4c}\u{4f}\u{41}\u{44}\u{4e}\u{49}\u{4c}","\u{4d}\u{55}\u{4c}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}","\u{44}\u{49}\u{56}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}","\u{41}\u{44}\u{44}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}","\u{47}\u{45}\u{54}\u{54}\u{41}\u{42}\u{4c}\u{45}","\u{53}\u{55}\u{42}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}","\u{47}\u{45}\u{54}\u{46}\u{49}\u{45}\u{4c}\u{44}","\u{50}\u{4f}\u{57}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}","\u{55}\u{4e}\u{4d}","\u{53}\u{45}\u{54}\u{54}\u{41}\u{42}\u{4c}\u{45}","\u{53}\u{45}\u{54}\u{46}\u{49}\u{45}\u{4c}\u{44}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{30}")
223223check(function ()
224224local a,b
@@ -228,285 +228,285 @@ a.x=b
228228a[b]="\u{78}"
229229end,"\u{4c}\u{4f}\u{41}\u{44}\u{4e}\u{49}\u{4c}","\u{53}\u{45}\u{54}\u{46}\u{49}\u{45}\u{4c}\u{44}","\u{53}\u{45}\u{54}\u{46}\u{49}\u{45}\u{4c}\u{44}","\u{53}\u{45}\u{54}\u{54}\u{41}\u{42}\u{4c}\u{45}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{30}")
230230check(function (a)
231−local k255 <const> = 255
232−a[1]=a[100]
233−a[k255]=a[256]
234−a[256]=5
231+local k255 <const> = 0xff
232+a[0x1]=a[0x64]
233+a[k255]=a[0x100]
234+a[0x100]=0x5
235235end,"\u{47}\u{45}\u{54}\u{49}","\u{53}\u{45}\u{54}\u{49}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{47}\u{45}\u{54}\u{54}\u{41}\u{42}\u{4c}\u{45}","\u{53}\u{45}\u{54}\u{49}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{53}\u{45}\u{54}\u{54}\u{41}\u{42}\u{4c}\u{45}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{30}")
236236check(function ()
237237local a,b
238−a=a - a
239−b=a / a
240−b=5 - 4
238+a=(a - a)
239+b=(a / a)
240+b=(0x5 - 0x4)
241241end,"\u{4c}\u{4f}\u{41}\u{44}\u{4e}\u{49}\u{4c}","\u{53}\u{55}\u{42}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}","\u{44}\u{49}\u{56}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{30}")
242242check(function ()
243243local a,b
244244a[kTrue]=false
245245end,"\u{4c}\u{4f}\u{41}\u{44}\u{4e}\u{49}\u{4c}","\u{4c}\u{4f}\u{41}\u{44}\u{54}\u{52}\u{55}\u{45}","\u{53}\u{45}\u{54}\u{54}\u{41}\u{42}\u{4c}\u{45}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{30}")
246246checkR(function (a)
247−if a == 1 then
248−return 2
247+if (a == 0x1) then
248+return 0x2
249249end
250−end,1,2,"\u{45}\u{51}\u{49}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
250+end,0x1,0x2,"\u{45}\u{51}\u{49}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
251251checkR(function (a)
252−if - 4.0 == a then
253−return 2
252+if (- (4.0 == a)) then
253+return 0x2
254254end
255−end,- 4,2,"\u{45}\u{51}\u{49}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
255+end,(- 0x4),0x2,"\u{45}\u{51}\u{49}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
256256checkR(function (a)
257−if a == "\u{68}\u{69}" then
258−return 2
257+if (a == "\u{68}\u{69}") then
258+return 0x2
259259end
260−end,10,nil,"\u{45}\u{51}\u{4b}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
260+end,0xa,nil,"\u{45}\u{51}\u{4b}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
261261checkR(function (a)
262−if a == 10000 then
263−return 2
262+if (a == 0x2710) then
263+return 0x2
264264end
265−end,1,nil,"\u{45}\u{51}\u{4b}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
265+end,0x1,nil,"\u{45}\u{51}\u{4b}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
266266checkR(function (a)
267−if - 10000 == a then
268−return 2
267+if (- (0x2710 == a)) then
268+return 0x2
269269end
270−end,- 10000,2,"\u{45}\u{51}\u{4b}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
270+end,(- 0x2710),0x2,"\u{45}\u{51}\u{4b}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
271271checkR(function (a)
272−if - 10 <= a then
273−return 2
272+if (- (0xa <= a)) then
273+return 0x2
274274end
275−end,- 10,2,"\u{47}\u{45}\u{49}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
275+end,(- 0xa),0x2,"\u{47}\u{45}\u{49}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
276276checkR(function (a)
277−if 128.0 > a then
278−return 2
277+if (128.0 > a) then
278+return 0x2
279279end
280−end,129,nil,"\u{4c}\u{54}\u{49}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
280+end,0x81,nil,"\u{4c}\u{54}\u{49}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
281281checkR(function (a)
282−if - 127.0 < a then
283−return 2
282+if (- (127.0 < a)) then
283+return 0x2
284284end
285−end,- 127,nil,"\u{47}\u{54}\u{49}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
285+end,(- 0x7f),nil,"\u{47}\u{54}\u{49}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
286286checkR(function (a)
287−if 10 < a then
288−return 2
287+if (0xa < a) then
288+return 0x2
289289end
290−end,11,2,"\u{47}\u{54}\u{49}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
290+end,0xb,0x2,"\u{47}\u{54}\u{49}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
291291checkR(function (a)
292−if 129 < a then
293−return 2
292+if (0x81 < a) then
293+return 0x2
294294end
295−end,130,2,"\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{4c}\u{54}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
295+end,0x82,0x2,"\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{4c}\u{54}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
296296checkR(function (a)
297−if a >= 23.0 then
298−return 2
297+if (a >= 23.0) then
298+return 0x2
299299end
300−end,25,2,"\u{47}\u{45}\u{49}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
300+end,0x19,0x2,"\u{47}\u{45}\u{49}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
301301checkR(function (a)
302−if a >= 23.1 then
303−return 2
302+if (a >= 23.1) then
303+return 0x2
304304end
305−end,0,nil,"\u{4c}\u{4f}\u{41}\u{44}\u{4b}","\u{4c}\u{45}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
305+end,0x0,nil,"\u{4c}\u{4f}\u{41}\u{44}\u{4b}","\u{4c}\u{45}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
306306checkR(function (a)
307−if a > 2300.0 then
308−return 2
307+if (a > 2300.0) then
308+return 0x2
309309end
310−end,0,nil,"\u{4c}\u{4f}\u{41}\u{44}\u{46}","\u{4c}\u{54}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
310+end,0x0,nil,"\u{4c}\u{4f}\u{41}\u{44}\u{46}","\u{4c}\u{54}","\u{4a}\u{4d}\u{50}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
311311local function checkK
312312(func,val)
313313check(func,"\u{4c}\u{4f}\u{41}\u{44}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
314314checkKlist(func,{val})
315−assert(func() == val)
315+assert((func() == val))
316316end
317317local function checkI
318318(func,val)
319319check(func,"\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
320320checkKlist(func,{})
321−assert(func() == val)
321+assert((func() == val))
322322end
323323local function checkF
324324(func,val)
325325check(func,"\u{4c}\u{4f}\u{41}\u{44}\u{46}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
326326checkKlist(func,{})
327−assert(func() == val)
327+assert((func() == val))
328328end
329329checkF(function ()
330330return 0.0
331331end,0.0)
332332checkI(function ()
333333return k0
334−end,0)
334+end,0x0)
335335checkI(function ()
336−return - k0 // 1
337−end,0)
336+return (- (k0 // 0x1))
337+end,0x0)
338338checkK(function ()
339−return 3 ^ - 1
340−end,1 / 3)
339+return (0x3 ^ (- 0x1))
340+end,(0x1 / 0x3))
341341checkK(function ()
342−return (1 + 1) ^ (50 + 50)
343−end,2 ^ 100)
342+return ((0x1 + 0x1) ^ (0x32 + 0x32))
343+end,(0x2 ^ 0x64))
344344checkK(function ()
345−return (- 2) ^ (31 - 2)
346−end,- 536870912 + 0.0)
345+return ((- 0x2) ^ (0x1f - 0x2))
346+end,(- (0x20000000 + 0.0)))
347347checkF(function ()
348−return (- k3 ^ 0 + 5) // 3.0
348+return ((- ((k3 ^ 0x0) + 0x5)) // 3.0)
349349end,1.0)
350350checkI(function ()
351−return - k3 % 5
352−end,2)
351+return (- (k3 % 0x5))
352+end,0x2)
353353checkF(function ()
354−return - ((2.0 ^ 8 + - (- 1)) % 8) / 2 * 4 - 3
355−end,- 5.0)
354+return (- ((((((2.0 ^ 0x8) + (- (- 0x1))) % 0x8) / 0x2) * 0x4) - 0x3))
355+end,(- 5.0))
356356checkF(function ()
357−return - ((2 ^ 8 + - (- 1)) % 8) // 2 * 4 - 3
358−end,- 7.0)
357+return (- ((((((0x2 ^ 0x8) + (- (- 0x1))) % 0x8) // 0x2) * 0x4) - 0x3))
358+end,(- 7.0))
359359checkI(function ()
360−return 240.0 | 204.0 ~ 170 & 253
361−end,244)
360+return (240.0 | (204.0 ~ (0xaa & 0xfd)))
361+end,0xf4)
362362checkI(function ()
363−return ~ (~ kFF0 | kFF0)
364−end,0)
363+return (~ (~ (kFF0 | kFF0)))
364+end,0x0)
365365checkI(function ()
366−return ~ ~ - 1024.0
367−end,- 1024)
366+return (~ (~ (- 1024.0)))
367+end,(- 0x400))
368368checkI(function ()
369−return ((100 << k6) << - 4) >> 2
370−end,100)
371−local a = 17
369+return (((0x64 << k6) << (- 0x4)) >> 0x2)
370+end,0x64)
371+local a = 0x11
372372;
373−local sbx = ((1 << a) - 1) >> 1
374−local border <const> = 65535
373+local sbx = (((0x1 << a) - 0x1) >> 0x1)
374+local border <const> = 0xffff
375375checkI(function ()
376376return border
377377end,sbx)
378378checkI(function ()
379−return - border
380−end,- sbx)
379+return (- border)
380+end,(- sbx))
381381checkI(function ()
382−return border + 1
383−end,sbx + 1)
382+return (border + 0x1)
383+end,(sbx + 0x1))
384384checkK(function ()
385−return border + 2
386−end,sbx + 2)
385+return (border + 0x2)
386+end,(sbx + 0x2))
387387checkK(function ()
388−return - (border + 1)
389−end,- (sbx + 1))
388+return (- (border + 0x1))
389+end,(- (sbx + 0x1)))
390390local border <const> = 65535.0
391391checkF(function ()
392392return border
393−end,sbx + 0.0)
393+end,(sbx + 0.0))
394394checkF(function ()
395−return - border
396−end,- sbx + 0.0)
395+return (- border)
396+end,(- (sbx + 0.0)))
397397checkF(function ()
398−return border + 1
398+return (border + 0x1)
399399end,(sbx + 1.0))
400400checkK(function ()
401−return border + 2
401+return (border + 0x2)
402402end,(sbx + 2.0))
403403checkK(function ()
404−return - (border + 1)
405−end,- (sbx + 1.0))
404+return (- (border + 0x1))
405+end,(- (sbx + 1.0)))
406406checkR(function (x)
407−return x + k1
408−end,10,11,"\u{41}\u{44}\u{44}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
407+return (x + k1)
408+end,0xa,0xb,"\u{41}\u{44}\u{44}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
409409checkR(function (x)
410−return x - 127
411−end,10,- 117,"\u{41}\u{44}\u{44}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
410+return (x - 0x7f)
411+end,0xa,(- 0x75),"\u{41}\u{44}\u{44}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
412412checkR(function (x)
413−return 128 + x
413+return (0x80 + x)
414414end,0.0,128.0,"\u{41}\u{44}\u{44}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
415415checkR(function (x)
416−return x * - 127
417−end,- 1.0,127.0,"\u{4d}\u{55}\u{4c}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
416+return (x * (- 0x7f))
417+end,(- 1.0),127.0,"\u{4d}\u{55}\u{4c}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
418418checkR(function (x)
419−return 20 * x
420−end,2,40,"\u{4d}\u{55}\u{4c}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
419+return (0x14 * x)
420+end,0x2,0x28,"\u{4d}\u{55}\u{4c}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
421421checkR(function (x)
422−return x ^ - 2
423−end,2,0.25,"\u{50}\u{4f}\u{57}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
422+return (x ^ (- 0x2))
423+end,0x2,0.25,"\u{50}\u{4f}\u{57}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
424424checkR(function (x)
425−return x / 40
426−end,40,1.0,"\u{44}\u{49}\u{56}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
425+return (x / 0x28)
426+end,0x28,1.0,"\u{44}\u{49}\u{56}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
427427checkR(function (x)
428−return x // 1
428+return (x // 0x1)
429429end,10.0,10.0,"\u{49}\u{44}\u{49}\u{56}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
430430checkR(function (x)
431−return x % (100 - 10)
432−end,91,1,"\u{4d}\u{4f}\u{44}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
431+return (x % (0x64 - 0xa))
432+end,0x5b,0x1,"\u{4d}\u{4f}\u{44}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
433433checkR(function (x)
434−return k1 << x
435−end,3,8,"\u{53}\u{48}\u{4c}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
434+return (k1 << x)
435+end,0x3,0x8,"\u{53}\u{48}\u{4c}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
436436checkR(function (x)
437−return x << 127
438−end,10,0,"\u{53}\u{48}\u{52}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
437+return (x << 0x7f)
438+end,0xa,0x0,"\u{53}\u{48}\u{52}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
439439checkR(function (x)
440−return x << - 127
441−end,10,0,"\u{53}\u{48}\u{52}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
440+return (x << (- 0x7f))
441+end,0xa,0x0,"\u{53}\u{48}\u{52}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
442442checkR(function (x)
443−return x >> 128
444−end,8,0,"\u{53}\u{48}\u{52}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
443+return (x >> 0x80)
444+end,0x8,0x0,"\u{53}\u{48}\u{52}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
445445checkR(function (x)
446−return x >> - 127
447−end,8,0,"\u{53}\u{48}\u{52}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
446+return (x >> (- 0x7f))
447+end,0x8,0x0,"\u{53}\u{48}\u{52}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
448448checkR(function (x)
449−return x & 1
450−end,9,1,"\u{42}\u{41}\u{4e}\u{44}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
449+return (x & 0x1)
450+end,0x9,0x1,"\u{42}\u{41}\u{4e}\u{44}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
451451checkR(function (x)
452−return 10 | x
453−end,1,11,"\u{42}\u{4f}\u{52}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
452+return (0xa | x)
453+end,0x1,0xb,"\u{42}\u{4f}\u{52}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
454454checkR(function (x)
455−return - 10 ~ x
456−end,- 1,9,"\u{42}\u{58}\u{4f}\u{52}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
455+return (- (0xa ~ x))
456+end,(- 0x1),0x9,"\u{42}\u{58}\u{4f}\u{52}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
457457checkR(function (x)
458−return x + 0.0
459−end,1,1.0,"\u{41}\u{44}\u{44}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
458+return (x + 0.0)
459+end,0x1,1.0,"\u{41}\u{44}\u{44}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
460460checkR(function (x)
461−return x * - 10000
462−end,2,- 20000,"\u{4d}\u{55}\u{4c}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
461+return (x * (- 0x2710))
462+end,0x2,(- 0x4e20),"\u{4d}\u{55}\u{4c}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
463463checkR(function (x)
464−return x ^ 0.5
465−end,4,2.0,"\u{50}\u{4f}\u{57}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
464+return (x ^ 0.5)
465+end,0x4,2.0,"\u{50}\u{4f}\u{57}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
466466checkR(function (x)
467−return x / 2.0
468−end,4,2.0,"\u{44}\u{49}\u{56}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
467+return (x / 2.0)
468+end,0x4,2.0,"\u{44}\u{49}\u{56}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
469469checkR(function (x)
470−return x // 10000
471−end,10000,1,"\u{49}\u{44}\u{49}\u{56}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
470+return (x // 0x2710)
471+end,0x2710,0x1,"\u{49}\u{44}\u{49}\u{56}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
472472checkR(function (x)
473−return x % (100.0 - 10)
474−end,91,1.0,"\u{4d}\u{4f}\u{44}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
473+return (x % (100.0 - 0xa))
474+end,0x5b,1.0,"\u{4d}\u{4f}\u{44}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
475475check(function ()
476−return - 0.0
476+return (- 0.0)
477477end,"\u{4c}\u{4f}\u{41}\u{44}\u{46}","\u{55}\u{4e}\u{4d}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
478478check(function ()
479−return k3 / 0
479+return (k3 / 0x0)
480480end,"\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{44}\u{49}\u{56}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
481481check(function ()
482−return 0 % 0
482+return (0x0 % 0x0)
483483end,"\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{4d}\u{4f}\u{44}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
484484check(function ()
485−return - 4 // 0
485+return (- (0x4 // 0x0))
486486end,"\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{49}\u{44}\u{49}\u{56}\u{4b}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{4b}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
487487check(function (x)
488−return x >> 2.0
488+return (x >> 2.0)
489489end,"\u{4c}\u{4f}\u{41}\u{44}\u{46}","\u{53}\u{48}\u{52}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
490490check(function (x)
491−return x << 128
491+return (x << 0x80)
492492end,"\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{53}\u{48}\u{4c}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
493493check(function (x)
494−return x & 2.0
494+return (x & 2.0)
495495end,"\u{4c}\u{4f}\u{41}\u{44}\u{46}","\u{42}\u{41}\u{4e}\u{44}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
496496check(function ()
497−for i = - 10, 10.5
497+for i = (- 0xa), 10.5
498498do
499499
500500end
501501end,"\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{4c}\u{4f}\u{41}\u{44}\u{4b}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{46}\u{4f}\u{52}\u{50}\u{52}\u{45}\u{50}","\u{46}\u{4f}\u{52}\u{4c}\u{4f}\u{4f}\u{50}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{30}")
502502check(function ()
503−for i = 268435455, 10.0, 1
503+for i = 0xfffffff, 10.0, 0x1
504504do
505505
506506end
507507end,"\u{4c}\u{4f}\u{41}\u{44}\u{4b}","\u{4c}\u{4f}\u{41}\u{44}\u{46}","\u{4c}\u{4f}\u{41}\u{44}\u{49}","\u{46}\u{4f}\u{52}\u{50}\u{52}\u{45}\u{50}","\u{46}\u{4f}\u{52}\u{4c}\u{4f}\u{4f}\u{50}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{30}")
508508check(function ()
509−return - nil
509+return (- nil)
510510end,"\u{4c}\u{4f}\u{41}\u{44}\u{4e}\u{49}\u{4c}","\u{55}\u{4e}\u{4d}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{31}")
511511check(function ()
512512local a,b,c
@@ -527,43 +527,43 @@ end
527527checkequal(function ()
528528local a
529529;
530−if not (a or b) then
530+if (not (a or b)) then
531531b=a
532532end
533533end,function ()
534534local a
535535;
536−if (not a and not b) then
536+if (not (a and (not b))) then
537537b=a
538538end
539539end)
540540checkequal(function (l)
541541local a
542542;
543−return 0 <= a and a <= l
543+return ((0x0 <= a) and (a <= l))
544544end,function (l)
545545local a
546546;
547−return not (not (a >= 0) or not (a <= l))
547+return (not (not ((a >= 0x0) or (not (a <= l)))))
548548end)
549549check(function (a,b)
550550while a do
551551if b then
552552break
553553else
554−a=a + 1
554+a=(a + 0x1)
555555end
556556end
557557end,"\u{54}\u{45}\u{53}\u{54}","\u{4a}\u{4d}\u{50}","\u{54}\u{45}\u{53}\u{54}","\u{4a}\u{4d}\u{50}","\u{41}\u{44}\u{44}\u{49}","\u{4d}\u{4d}\u{42}\u{49}\u{4e}\u{49}","\u{4a}\u{4d}\u{50}","\u{52}\u{45}\u{54}\u{55}\u{52}\u{4e}\u{30}")
558558checkequal(function ()
559−return 6 or true or nil
559+return ((0x6 or true) or nil)
560560end,function ()
561−return k6 or kTrue or kNil
561+return ((k6 or kTrue) or kNil)
562562end)
563563checkequal(function ()
564−return 6 and true or nil
564+return ((0x6 and true) or nil)
565565end,function ()
566−return k6 and kTrue or kNil
566+return ((k6 and kTrue) or kNil)
567567end)
568568do
569569local k0 <const> = "\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}"
@@ -578,9 +578,9 @@ end
578578end
579579local f2 = f1()
580580local f3 = f2()
581−assert(f3() == k0)
581+assert((f3() == k0))
582582checkK(f3,k0)
583−assert(T.listk(f1)[1] == nil)
584−assert(T.listk(f2)[1] == nil)
583+assert((T.listk(f1)[0x1] == nil))
584+assert((T.listk(f2)[0x1] == nil))
585585end
586586print("\u{4f}\u{4b}")
zod/luau/res/lua/cycled/constructs.lua → desk/res/lua/cycled/constructs.luarenamed+164−164
@@ -6,7 +6,7 @@ print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{79}\u{6e}\u{74}\
66local debug = require("\u{64}\u{65}\u{62}\u{75}\u{67}")
77local function checkload
88(s,msg)
9−assert(string.find(select(2,load(s)),msg))
9+assert(string.find(select(0x2,load(s)),msg))
1010end
1111local a
1212do
@@ -17,66 +17,66 @@ end
1717;
1818do
1919;
20−a=3
20+a=0x3
2121;
22−assert(a == 3)
22+assert((a == 0x3))
2323end
2424;
2525;
2626if false then
27−a=3 // 0
27+a=(0x3 // 0x0)
2828;
29−a=0 % 0
29+a=(0x0 % 0x0)
3030end
31−assert(2 ^ 3 ^ 2 == 2 ^ (3 ^ 2))
31+assert(((0x2 ^ (0x3 ^ 0x2)) == (0x2 ^ (0x3 ^ 0x2))))
3232;
33−assert(2 ^ 3 * 4 == (2 ^ 3) * 4)
33+assert((((0x2 ^ 0x3) * 0x4) == ((0x2 ^ 0x3) * 0x4)))
3434;
35−assert(2.0 ^ - 2 == 1 / 4 and - 2 ^ - - 2 == - - - 4)
35+assert((2.0 ^ (- ((0x2 == (0x1 / 0x4)) and (- (0x2 ^ (- (- (0x2 == (- (- (- 0x4))))))))))))
3636;
37−assert(not nil and 2 and not (2 > 3 or 3 < 2))
37+assert((not ((nil and 0x2) and (not ((0x2 > 0x3) or (0x3 < 0x2))))))
3838;
39−assert(- 3 - 1 - 5 == 0 + 0 - 9)
39+assert((- (((0x3 - 0x1) - 0x5) == ((0x0 + 0x0) - 0x9))))
4040;
41−assert(- 2 ^ 2 == - 4 and (- 2) ^ 2 == 4 and 2 * 2 - 3 - 1 == 0)
41+assert((- ((0x2 ^ 0x2) == (- ((0x4 and (((- 0x2) ^ 0x2) == 0x4)) and ((((0x2 * 0x2) - 0x3) - 0x1) == 0x0))))))
4242;
43−assert(- 3 % 5 == 2 and - 3 + 5 == 2)
44−assert(2 * 1 + 3 / 3 == 3 and 1 + 2 .. 3 * 1 == "\u{33}\u{33}")
43+assert((- (((0x3 % 0x5) == 0x2) and (- ((0x3 + 0x5) == 0x2)))))
44+assert(((((0x2 * 0x1) + (0x3 / 0x3)) == 0x3) and (((0x1 + 0x2) .. (0x3 * 0x1)) == "\u{33}\u{33}")))
4545;
46−assert(not (2 + 1 > 3 * 1) and "\u{61}" .. "\u{62}" > "\u{61}")
46+assert((not (((0x2 + 0x1) > (0x3 * 0x1)) and (("\u{61}" .. "\u{62}") > "\u{61}"))))
4747;
48−assert(240 | 204 ~ 170 & 253 == 244)
49−assert(253 & 170 ~ 204 | 240 == 244)
50−assert(240 & 15 + 1 == 16)
51−assert(3 ^ 4 // 2 ^ 3 // 5 == 2)
52−assert(- 3 + 4 * 5 // 2 ^ 3 ^ 2 // 9 + 4 % 10 / 3 == (- 3) + (((4 * 5) // (2 ^ (3 ^ 2))) // 9) + ((4 % 10) / 3))
53−assert(not ((true or false) and nil))
54−assert(true or false and nil)
55−assert((((1 or false) and true) or false) == true)
56−assert((((nil and true) or false) and true) == false)
57−local a,b = 1,nil
48+assert(((0xf0 | (0xcc ~ (0xaa & 0xfd))) == 0xf4))
49+assert(((((0xfd & 0xaa) ~ 0xcc) | 0xf0) == 0xf4))
50+assert(((0xf0 & (0xf + 0x1)) == 0x10))
51+assert(((((0x3 ^ 0x4) // (0x2 ^ 0x3)) // 0x5) == 0x2))
52+assert((- (((0x3 + (((0x4 * 0x5) // (0x2 ^ (0x3 ^ 0x2))) // 0x9)) + ((0x4 % 0xa) / 0x3)) == (((- 0x3) + (((0x4 * 0x5) // (0x2 ^ (0x3 ^ 0x2))) // 0x9)) + ((0x4 % 0xa) / 0x3)))))
53+assert((not ((true or false) and nil)))
54+assert((true or (false and nil)))
55+assert(((((0x1 or false) and true) or false) == true))
56+assert(((((nil and true) or false) and true) == false))
57+local a,b = 0x1,nil
5858;
59−assert(- (1 or 2) == - 1 and (1 and 2) + (- 1.25 or - 4) == 0.75)
59+assert((- ((0x1 or 0x2) == (- (0x1 and (((0x1 and 0x2) + (- (1.25 or (- 0x4)))) == 0.75))))))
6060;
61−local x = ((b or a) + 1 == 2 and (10 or a) + 1 == 11)
61+local x = ((((b or a) + 0x1) == 0x2) and (((0xa or a) + 0x1) == 0xb))
6262;
6363assert(x)
6464;
65−x=(((2 < 3) or 1) == true and (2 < 3 and 4) == 4)
65+x=((((0x2 < 0x3) or 0x1) == true) and (((0x2 < 0x3) and 0x4) == 0x4))
6666;
6767assert(x)
6868;
69−local x,y = 1,2
69+local x,y = 0x1,0x2
7070;
71−assert((x > y) and x or y == 2)
71+assert((((x > y) and x) or (y == 0x2)))
7272;
73−x,y=2,1
73+x,y=0x2,0x1
7474;
75−assert((x > y) and x or y == 2)
75+assert((((x > y) and x) or (y == 0x2)))
7676;
77−assert(1234567890 == tonumber("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}") and 1234567890 + 1 == 1234567891)
77+assert(((0x499602d2 == tonumber("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}")) and ((0x499602d2 + 0x1) == 0x499602d3)))
7878do
79−local operand = {3,100,5.0,- 10,- 5.0,10000,- 10000}
79+local operand = {0x3,0x64,5.0,(- 0xa),(- 5.0),0x2710,(- 0x2710)}
8080local operator = {"\u{2b}","\u{2d}","\u{2a}","\u{2f}","\u{2f}\u{2f}","\u{25}","\u{5e}","\u{26}","\u{7c}","\u{5e}","\u{3c}\u{3c}","\u{3e}\u{3e}","\u{3d}\u{3d}","\u{7e}\u{3d}","\u{3c}","\u{3e}","\u{3c}\u{3d}","\u{3e}\u{3d}"}
8181for _,op in ipairs(operator)
8282do
@@ -90,14 +90,14 @@ local gab = f(o1,o2)
9090_ENV.XX=o1
9191local code = string.format("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{58}\u{58}\u{20}\u{25}\u{73}\u{20}\u{25}\u{73}",op,o2)
9292local res = assert(load(code))()
93−assert(res == gab)
93+assert((res == gab))
9494_ENV.XX=o2
9595code=string.format("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{28}\u{25}\u{73}\u{29}\u{20}\u{25}\u{73}\u{20}\u{58}\u{58}",o1,op)
9696res=assert(load(code))()
97−assert(res == gab)
97+assert((res == gab))
9898code=string.format("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{28}\u{25}\u{73}\u{29}\u{20}\u{25}\u{73}\u{20}\u{25}\u{73}",o1,op,o2)
9999res=assert(load(code))()
100−assert(res == gab)
100+assert((res == gab))
101101end
102102end
103103end
@@ -105,7 +105,7 @@ _ENV.XX=nil
105105end
106106repeat
107107
108−until 1
108+until 0x1
109109;
110110repeat
111111
@@ -124,157 +124,157 @@ local a
124124;
125125local function f
126126(x)
127−x={["\u{61}"] = 1}
127+x={["\u{61}"] = 0x1}
128128;
129−x={["\u{78}"] = 1}
129+x={["\u{78}"] = 0x1}
130130;
131−x={["\u{47}"] = 1}
131+x={["\u{47}"] = 0x1}
132132end
133133end
134134do
135135local code = {"\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{78}\u{20}\u{3d}\u{20}\u{7b}"}
136−for i = 1, 257
136+for i = 0x1, 0x101
137137do
138−code[# code + 1]=i .. "\u{2e}\u{31}\u{2c}"
138+code[(# (code + 0x1))]=(i .. "\u{2e}\u{31}\u{2c}")
139139end
140−code[# code + 1]="\u{7d}\u{3b}"
140+code[(# (code + 0x1))]="\u{7d}\u{3b}"
141141code=table.concat(code)
142142local function check
143143(ret,val)
144−local code = code .. ret
144+local code = (code .. ret)
145145code=load(code)
146−assert(code() == val)
146+assert((code() == val))
147147end
148−check("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{28}\u{31}\u{20}\u{7e}\u{20}\u{28}\u{32}\u{20}\u{6f}\u{72}\u{20}\u{33}\u{29}\u{29}",1 ~ 2)
149−check("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{28}\u{31}\u{20}\u{7c}\u{20}\u{28}\u{32}\u{20}\u{6f}\u{72}\u{20}\u{33}\u{29}\u{29}",1 | 2)
150−check("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{28}\u{31}\u{20}\u{2b}\u{20}\u{28}\u{32}\u{20}\u{6f}\u{72}\u{20}\u{33}\u{29}\u{29}",1 + 2)
151−check("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{28}\u{31}\u{20}\u{3c}\u{3c}\u{20}\u{28}\u{32}\u{20}\u{6f}\u{72}\u{20}\u{33}\u{29}\u{29}",1 << 2)
148+check("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{28}\u{31}\u{20}\u{7e}\u{20}\u{28}\u{32}\u{20}\u{6f}\u{72}\u{20}\u{33}\u{29}\u{29}",(0x1 ~ 0x2))
149+check("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{28}\u{31}\u{20}\u{7c}\u{20}\u{28}\u{32}\u{20}\u{6f}\u{72}\u{20}\u{33}\u{29}\u{29}",(0x1 | 0x2))
150+check("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{28}\u{31}\u{20}\u{2b}\u{20}\u{28}\u{32}\u{20}\u{6f}\u{72}\u{20}\u{33}\u{29}\u{29}",(0x1 + 0x2))
151+check("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{28}\u{31}\u{20}\u{3c}\u{3c}\u{20}\u{28}\u{32}\u{20}\u{6f}\u{72}\u{20}\u{33}\u{29}\u{29}",(0x1 << 0x2))
152152end
153153local function f
154154(i)
155−if type(i) ~= "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}" then
155+if (type(i) ~= "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}") then
156156return i,"\u{6a}\u{6f}\u{6a}\u{6f}"
157157end
158158;
159−if i > 0 then
160−return i,f(i - 1)
159+if (i > 0x0) then
160+return i,f((i - 0x1))
161161end
162162;
163163end
164−x={f(3),f(5),f(10)}
164+x={f(0x3),f(0x5),f(0xa)}
165165;
166−assert(x[1] == 3 and x[2] == 5 and x[3] == 10 and x[4] == 9 and x[12] == 1)
166+assert((((((x[0x1] == 0x3) and (x[0x2] == 0x5)) and (x[0x3] == 0xa)) and (x[0x4] == 0x9)) and (x[0xc] == 0x1)))
167167;
168−assert(x[nil] == nil)
168+assert((x[nil] == nil))
169169x={f("\u{61}\u{6c}\u{6f}"),f("\u{78}\u{69}\u{78}\u{69}"),nil}
170170;
171−assert(x[1] == "\u{61}\u{6c}\u{6f}" and x[2] == "\u{78}\u{69}\u{78}\u{69}" and x[3] == nil)
171+assert((((x[0x1] == "\u{61}\u{6c}\u{6f}") and (x[0x2] == "\u{78}\u{69}\u{78}\u{69}")) and (x[0x3] == nil)))
172172;
173−x={f("\u{61}\u{6c}\u{6f}") .. "\u{78}\u{69}\u{78}\u{69}"}
173+x={(f("\u{61}\u{6c}\u{6f}") .. "\u{78}\u{69}\u{78}\u{69}")}
174174;
175−assert(x[1] == "\u{61}\u{6c}\u{6f}\u{78}\u{69}\u{78}\u{69}")
175+assert((x[0x1] == "\u{61}\u{6c}\u{6f}\u{78}\u{69}\u{78}\u{69}"))
176176x={f({})}
177−assert(x[2] == "\u{6a}\u{6f}\u{6a}\u{6f}" and type(x[1]) == "\u{74}\u{61}\u{62}\u{6c}\u{65}")
177+assert(((x[0x2] == "\u{6a}\u{6f}\u{6a}\u{6f}") and (type(x[0x1]) == "\u{74}\u{61}\u{62}\u{6c}\u{65}")))
178178local f = function (i)
179−if i < 10 then
179+if (i < 0xa) then
180180return "\u{61}"
181−elseif i < 20 then
181+elseif (i < 0x14) then
182182return "\u{62}"
183−elseif i < 30 then
183+elseif (i < 0x1e) then
184184return "\u{63}"
185185end
186186;
187187end
188−assert(f(3) == "\u{61}" and f(12) == "\u{62}" and f(26) == "\u{63}" and f(100) == nil)
189−for i = 1, 1000
188+assert(((((f(0x3) == "\u{61}") and (f(0xc) == "\u{62}")) and (f(0x1a) == "\u{63}")) and (f(0x64) == nil)))
189+for i = 0x1, 0x3e8
190190do
191191break
192192;
193193end
194194;
195−local n = 100
195+local n = 0x64
196196;
197−local i = 3
197+local i = 0x3
198198;
199199local t = {}
200200;
201201local a = nil
202−while not a do
203−a=0
202+while (not a) do
203+a=0x0
204204;
205−for i = 1, n
205+for i = 0x1, n
206206do
207−for i = i, 1, - 1
207+for i = i, 0x1, (- 0x1)
208208do
209−a=a + 1
209+a=(a + 0x1)
210210;
211−t[i]=1
211+t[i]=0x1
212212;
213213end
214214;
215215end
216216;
217217end
218−assert(a == n * (n + 1) / 2 and i == 3)
218+assert(((a == ((n * (n + 0x1)) / 0x2)) and (i == 0x3)))
219219;
220−assert(t[1] and t[n] and not t[0] and not t[n + 1])
220+assert(((t[0x1] and t[n]) and (not (t[0x0] and (not t[(n + 0x1)])))))
221221function f(b)
222−local x = 1
222+local x = 0x1
223223;
224224repeat
225225local a
226226;
227−if b == 1 then
228−local b = 1
227+if (b == 0x1) then
228+local b = 0x1
229229;
230−x=10
230+x=0xa
231231;
232232break
233−elseif b == 2 then
234−x=20
233+elseif (b == 0x2) then
234+x=0x14
235235;
236236break
237237;
238−elseif b == 3 then
239−x=30
238+elseif (b == 0x3) then
239+x=0x1e
240240;
241241else
242−local a,b,c,d = math.sin(1)
242+local a,b,c,d = math.sin(0x1)
243243;
244−x=x + 1
244+x=(x + 0x1)
245245;
246246end
247−until x >= 12
247+until (x >= 0xc)
248248;
249249return x
250250end
251251;
252−assert(f(1) == 10 and f(2) == 20 and f(3) == 30 and f(4) == 12)
252+assert(((((f(0x1) == 0xa) and (f(0x2) == 0x14)) and (f(0x3) == 0x1e)) and (f(0x4) == 0xc)))
253253local f = function (i)
254−if i < 10 then
254+if (i < 0xa) then
255255return "\u{61}"
256−elseif i < 20 then
256+elseif (i < 0x14) then
257257return "\u{62}"
258−elseif i < 30 then
258+elseif (i < 0x1e) then
259259return "\u{63}"
260260else
261−return 8
261+return 0x8
262262end
263263end
264−assert(f(3) == "\u{61}" and f(12) == "\u{62}" and f(26) == "\u{63}" and f(100) == 8)
265−local a,b = nil,23
266−x={f(100) * 2 + 3 or a,a or b + 2}
267−assert(x[1] == 19 and x[2] == 25)
268−x={["\u{66}"] = 2 + 3 or a,["\u{61}"] = b + 2}
269−assert(x.f == 5 and x.a == 25)
270−a={["\u{79}"] = 1}
264+assert(((((f(0x3) == "\u{61}") and (f(0xc) == "\u{62}")) and (f(0x1a) == "\u{63}")) and (f(0x64) == 0x8)))
265+local a,b = nil,0x17
266+x={(((f(0x64) * 0x2) + 0x3) or a),(a or (b + 0x2))}
267+assert(((x[0x1] == 0x13) and (x[0x2] == 0x19)))
268+x={["\u{66}"] = ((0x2 + 0x3) or a),["\u{61}"] = (b + 0x2)}
269+assert(((x.f == 0x5) and (x.a == 0x19)))
270+a={["\u{79}"] = 0x1}
271271x={a.y}
272−assert(x[1] == 1)
272+assert((x[0x1] == 0x1))
273273local function f
274274(i)
275−while 1 do
276−if i > 0 then
277−i=i - 1
275+while 0x1 do
276+if (i > 0x0) then
277+i=(i - 0x1)
278278;
279279else
280280return
@@ -286,44 +286,44 @@ end
286286;
287287local function g
288288(i)
289−while 1 do
290−if i > 0 then
291−i=i - 1
289+while 0x1 do
290+if (i > 0x0) then
291+i=(i - 0x1)
292292else
293293return
294294end
295295end
296296end
297−f(10)
297+f(0xa)
298298;
299−g(10)
299+g(0xa)
300300;
301301do
302302function f()
303−return 1,2,3
303+return 0x1,0x2,0x3
304304end
305305local a,b,c = f()
306306;
307−assert(a == 1 and b == 2 and c == 3)
308−a,b,c=(f())
307+assert((((a == 0x1) and (b == 0x2)) and (c == 0x3)))
308+a,b,c=f()
309309;
310−assert(a == 1 and b == nil and c == nil)
310+assert((((a == 0x1) and (b == nil)) and (c == nil)))
311311end
312−local a,b = 3 and f()
312+local a,b = (0x3 and f())
313313;
314−assert(a == 1 and b == nil)
314+assert(((a == 0x1) and (b == nil)))
315315function g()
316316f()
317317;
318318return
319319end
320320;
321−assert(g() == nil)
321+assert((g() == nil))
322322function g()
323−return nil or f()
323+return (nil or f())
324324end
325325a,b=g()
326−assert(a == 1 and b == nil)
326+assert(((a == 0x1) and (b == nil)))
327327print("\u{2b}")
328328;
329329do
@@ -338,76 +338,76 @@ f=string.gsub(f,"\u{25}\u{73}\u{2b}","\u{a}")
338338;
339339f,a=load(f)()
340340;
341−assert(a.a == 1 and a.b)
341+assert(((a.a == 0x1) and a.b))
342342function g(a,b,c,d,e)
343−if not (a >= b or c or d and e or nil) then
344−return 0
343+if (not ((((a >= b) or c) or (d and e)) or nil)) then
344+return 0x0
345345else
346−return 1
346+return 0x1
347347end
348348;
349349end
350350local function h
351351(a,b,c,d,e)
352−while (a >= b or c or (d and e) or nil) do
353−return 1
352+while ((((a >= b) or c) or (d and e)) or nil) do
353+return 0x1
354354end
355355;
356−return 0
356+return 0x0
357357end
358358;
359−assert(f(2,1) == true and g(2,1) == 1 and h(2,1) == 1)
360−assert(f(1,2,"\u{61}") == "\u{61}" and g(1,2,"\u{61}") == 1 and h(1,2,"\u{61}") == 1)
361−assert(f(1,2,"\u{61}") ~= nil,"")
362−assert(f(1,2,"\u{61}") == "\u{61}" and g(1,2,"\u{61}") == 1 and h(1,2,"\u{61}") == 1)
363−assert(f(1,2,nil,1,"\u{78}") == "\u{78}" and g(1,2,nil,1,"\u{78}") == 1 and h(1,2,nil,1,"\u{78}") == 1)
364−assert(f(1,2,nil,nil,"\u{78}") == nil and g(1,2,nil,nil,"\u{78}") == 0 and h(1,2,nil,nil,"\u{78}") == 0)
365−assert(f(1,2,nil,1,nil) == nil and g(1,2,nil,1,nil) == 0 and h(1,2,nil,1,nil) == 0)
366−assert(1 and 2 < 3 == true and 2 < 3 and "\u{61}" < "\u{62}" == true)
367−x=2 < 3 and not 3
359+assert((((f(0x2,0x1) == true) and (g(0x2,0x1) == 0x1)) and (h(0x2,0x1) == 0x1)))
360+assert((((f(0x1,0x2,"\u{61}") == "\u{61}") and (g(0x1,0x2,"\u{61}") == 0x1)) and (h(0x1,0x2,"\u{61}") == 0x1)))
361+assert((f(0x1,0x2,"\u{61}") ~= nil),"")
362+assert((((f(0x1,0x2,"\u{61}") == "\u{61}") and (g(0x1,0x2,"\u{61}") == 0x1)) and (h(0x1,0x2,"\u{61}") == 0x1)))
363+assert((((f(0x1,0x2,nil,0x1,"\u{78}") == "\u{78}") and (g(0x1,0x2,nil,0x1,"\u{78}") == 0x1)) and (h(0x1,0x2,nil,0x1,"\u{78}") == 0x1)))
364+assert((((f(0x1,0x2,nil,nil,"\u{78}") == nil) and (g(0x1,0x2,nil,nil,"\u{78}") == 0x0)) and (h(0x1,0x2,nil,nil,"\u{78}") == 0x0)))
365+assert((((f(0x1,0x2,nil,0x1,nil) == nil) and (g(0x1,0x2,nil,0x1,nil) == 0x0)) and (h(0x1,0x2,nil,0x1,nil) == 0x0)))
366+assert((((0x1 and ((0x2 < 0x3) == true)) and (0x2 < 0x3)) and (("\u{61}" < "\u{62}") == true)))
367+x=((0x2 < 0x3) and (not 0x3))
368368;
369−assert(x == false)
370−x=2 < 1 or (2 > 1 and "\u{61}")
369+assert((x == false))
370+x=((0x2 < 0x1) or ((0x2 > 0x1) and "\u{61}"))
371371;
372−assert(x == "\u{61}")
372+assert((x == "\u{61}"))
373373do
374374local a
375375;
376376if nil then
377−a=1
377+a=0x1
378378;
379379else
380−a=2
380+a=0x2
381381;
382382end
383383;
384−assert(a == 2)
384+assert((a == 0x2))
385385end
386386local function F
387387(a)
388−assert(debug.getinfo(1,"\u{6e}").name == "\u{46}")
389−return a,2,3
388+assert((debug.getinfo(0x1,"\u{6e}").name == "\u{46}"))
389+return a,0x2,0x3
390390end
391−a,b=F(1) ~= nil
391+a,b=(F(0x1) ~= nil)
392392;
393−assert(a == true and b == nil)
393+assert(((a == true) and (b == nil)))
394394;
395−a,b=F(nil) == nil
395+a,b=(F(nil) == nil)
396396;
397−assert(a == true and b == nil)
398−_ENV.GLOB1=math.random(0,1)
399−local basiccases = {{"\u{6e}\u{69}\u{6c}",nil},{"\u{66}\u{61}\u{6c}\u{73}\u{65}",false},{"\u{74}\u{72}\u{75}\u{65}",true},{"\u{31}\u{30}",10},{"\u{28}\u{30}\u{3d}\u{3d}\u{5f}\u{45}\u{4e}\u{56}\u{2e}\u{47}\u{4c}\u{4f}\u{42}\u{31}\u{29}",0 == _ENV.GLOB1}}
397+assert(((a == true) and (b == nil)))
398+_ENV.GLOB1=math.random(0x0,0x1)
399+local basiccases = {{"\u{6e}\u{69}\u{6c}",nil},{"\u{66}\u{61}\u{6c}\u{73}\u{65}",false},{"\u{74}\u{72}\u{75}\u{65}",true},{"\u{31}\u{30}",0xa},{"\u{28}\u{30}\u{3d}\u{3d}\u{5f}\u{45}\u{4e}\u{56}\u{2e}\u{47}\u{4c}\u{4f}\u{42}\u{31}\u{29}",(0x0 == _ENV.GLOB1)}}
400400local prog
401−if _ENV.GLOB1 == 0 then
402−basiccases[2][1]="\u{46}"
401+if (_ENV.GLOB1 == 0x0) then
402+basiccases[0x2][0x1]="\u{46}"
403403prog="\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{46}\u{20}\u{3c}\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{3e}\u{20}\u{3d}\u{20}\u{66}\u{61}\u{6c}\u{73}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{69}\u{66}\u{20}\u{25}\u{73}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{20}\u{49}\u{58}\u{20}\u{3d}\u{20}\u{74}\u{72}\u{75}\u{65}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{25}\u{73}\u{a}"
404404else
405−basiccases[4][1]="\u{6b}\u{31}\u{30}"
405+basiccases[0x4][0x1]="\u{6b}\u{31}\u{30}"
406406prog="\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{6b}\u{31}\u{30}\u{20}\u{3c}\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{3e}\u{20}\u{3d}\u{20}\u{31}\u{30}\u{a}\u{20}\u{20}\u{20}\u{20}\u{69}\u{66}\u{20}\u{25}\u{73}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{20}\u{49}\u{58}\u{20}\u{3d}\u{20}\u{74}\u{72}\u{75}\u{65}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{25}\u{73}\u{a}\u{20}\u{20}"
407407end
408−print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{68}\u{6f}\u{72}\u{74}\u{2d}\u{63}\u{69}\u{72}\u{63}\u{75}\u{69}\u{74}\u{20}\u{6f}\u{70}\u{74}\u{69}\u{6d}\u{69}\u{7a}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{73}\u{20}\u{28}" .. _ENV.GLOB1 .. "\u{29}")
408+print(("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{68}\u{6f}\u{72}\u{74}\u{2d}\u{63}\u{69}\u{72}\u{63}\u{75}\u{69}\u{74}\u{20}\u{6f}\u{70}\u{74}\u{69}\u{6d}\u{69}\u{7a}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{73}\u{20}\u{28}" .. (_ENV.GLOB1 .. "\u{29}")))
409409local binops <const> = {{"\u{20}\u{61}\u{6e}\u{64}\u{20}",function (a,b)
410−if not a then
410+if (not a) then
411411return a
412412else
413413return b
@@ -423,41 +423,41 @@ local cases <const> = {}
423423local function createcases
424424(n)
425425local res = {}
426−for i = 1, n - 1
426+for i = 0x1, (n - 0x1)
427427do
428428for _,v1 in ipairs(cases[i])
429429do
430−for _,v2 in ipairs(cases[n - i])
430+for _,v2 in ipairs(cases[(n - i)])
431431do
432432for _,op in ipairs(binops)
433433do
434−local t = {"\u{28}" .. v1[1] .. op[1] .. v2[1] .. "\u{29}",op[2](v1[2],v2[2])}
435−res[# res + 1]=t
436−res[# res + 1]={"\u{6e}\u{6f}\u{74}" .. t[1],not t[2]}
434+local t = {("\u{28}" .. (v1[0x1] .. (op[0x1] .. (v2[0x1] .. "\u{29}")))),op[0x2](v1[0x2],v2[0x2])}
435+res[(# (res + 0x1))]=t
436+res[(# (res + 0x1))]={("\u{6e}\u{6f}\u{74}" .. t[0x1]),(not t[0x2])}
437437end
438438end
439439end
440440end
441441return res
442442end
443−local level = _soft and 3 or 4
444−cases[1]=basiccases
445−for i = 2, level
443+local level = ((_soft and 0x3) or 0x4)
444+cases[0x1]=basiccases
445+for i = 0x2, level
446446do
447447cases[i]=createcases(i)
448448end
449449print("\u{2b}")
450−local i = 0
451−for n = 1, level
450+local i = 0x0
451+for n = 0x1, level
452452do
453453for _,v in pairs(cases[n])
454454do
455−local s = v[1]
455+local s = v[0x1]
456456local p = load(string.format(prog,s,s),"")
457457IX=false
458−assert(p() == v[2] and IX == not not v[2])
459−i=i + 1
460−if i % 60000 == 0 then
458+assert(((p() == v[0x2]) and (IX == (not (not v[0x2])))))
459+i=(i + 0x1)
460+if ((i % 0xea60) == 0x0) then
461461print("\u{2b}")
462462end
463463end
zod/luau/res/lua/cycled/coroutine.lua → desk/res/lua/cycled/coroutine.luarenamed+453−453
@@ -2,19 +2,19 @@ print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{6f}\u{72}\u{6f}\
22local debug = require("\u{64}\u{65}\u{62}\u{75}\u{67}")
33local f
44local main,ismain = coroutine.running()
5−assert(type(main) == "\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}" and ismain)
6−assert(not coroutine.resume(main))
7−assert(not coroutine.isyieldable(main) and not coroutine.isyieldable())
8−assert(not pcall(coroutine.yield))
9−assert(not pcall(coroutine.resume,0))
10−assert(not pcall(coroutine.status,0))
5+assert(((type(main) == "\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}") and ismain))
6+assert((not coroutine.resume(main)))
7+assert((not (coroutine.isyieldable(main) and (not coroutine.isyieldable()))))
8+assert((not pcall(coroutine.yield)))
9+assert((not pcall(coroutine.resume,0x0)))
10+assert((not pcall(coroutine.status,0x0)))
1111local function eqtab
1212(t1,t2)
13−assert(# t1 == # t2)
14−for i = 1, # t1
13+assert((# (t1 == (# t2))))
14+for i = 0x1, (# t1)
1515do
1616local v = t1[i]
17−assert(t2[i] == v)
17+assert((t2[i] == v))
1818end
1919end
2020_G.x=nil
@@ -22,12 +22,12 @@ _G.f=nil
2222local function foo
2323(a, ...)
2424local x,y = coroutine.running()
25−assert(x == f and y == false)
26−assert(coroutine.resume(f) == false)
27−assert(coroutine.status(f) == "\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}")
25+assert(((x == f) and (y == false)))
26+assert((coroutine.resume(f) == false))
27+assert((coroutine.status(f) == "\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}"))
2828local arg = {...}
2929assert(coroutine.isyieldable(x))
30−for i = 1, # arg
30+for i = 0x1, (# arg)
3131do
3232_G.x={coroutine.yield(table.unpack(arg[i]))}
3333end
@@ -35,63 +35,63 @@ return table.unpack(a)
3535end
3636f=coroutine.create(foo)
3737assert(coroutine.isyieldable(f))
38−assert(type(f) == "\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}" and coroutine.status(f) == "\u{73}\u{75}\u{73}\u{70}\u{65}\u{6e}\u{64}\u{65}\u{64}")
38+assert(((type(f) == "\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}") and (coroutine.status(f) == "\u{73}\u{75}\u{73}\u{70}\u{65}\u{6e}\u{64}\u{65}\u{64}")))
3939assert(string.find(tostring(f),"\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}"))
4040local s,a,b,c,d
41−s,a,b,c,d=coroutine.resume(f,{1,2,3},{},{1},{"\u{61}","\u{62}","\u{63}"})
41+s,a,b,c,d=coroutine.resume(f,{0x1,0x2,0x3},{},{0x1},{"\u{61}","\u{62}","\u{63}"})
4242assert(coroutine.isyieldable(f))
43−assert(s and a == nil and coroutine.status(f) == "\u{73}\u{75}\u{73}\u{70}\u{65}\u{6e}\u{64}\u{65}\u{64}")
43+assert(((s and (a == nil)) and (coroutine.status(f) == "\u{73}\u{75}\u{73}\u{70}\u{65}\u{6e}\u{64}\u{65}\u{64}")))
4444s,a,b,c,d=coroutine.resume(f)
4545eqtab(_G.x,{})
46−assert(s and a == 1 and b == nil)
46+assert(((s and (a == 0x1)) and (b == nil)))
4747assert(coroutine.isyieldable(f))
48−s,a,b,c,d=coroutine.resume(f,1,2,3)
49−eqtab(_G.x,{1,2,3})
50−assert(s and a == "\u{61}" and b == "\u{62}" and c == "\u{63}" and d == nil)
48+s,a,b,c,d=coroutine.resume(f,0x1,0x2,0x3)
49+eqtab(_G.x,{0x1,0x2,0x3})
50+assert(((((s and (a == "\u{61}")) and (b == "\u{62}")) and (c == "\u{63}")) and (d == nil)))
5151s,a,b,c,d=coroutine.resume(f,"\u{78}\u{75}\u{78}\u{75}")
5252eqtab(_G.x,{"\u{78}\u{75}\u{78}\u{75}"})
53−assert(s and a == 1 and b == 2 and c == 3 and d == nil)
54−assert(coroutine.status(f) == "\u{64}\u{65}\u{61}\u{64}")
53+assert(((((s and (a == 0x1)) and (b == 0x2)) and (c == 0x3)) and (d == nil)))
54+assert((coroutine.status(f) == "\u{64}\u{65}\u{61}\u{64}"))
5555s,a=coroutine.resume(f,"\u{78}\u{75}\u{78}\u{75}")
56−assert(not s and string.find(a,"\u{64}\u{65}\u{61}\u{64}") and coroutine.status(f) == "\u{64}\u{65}\u{61}\u{64}")
56+assert((not ((s and string.find(a,"\u{64}\u{65}\u{61}\u{64}")) and (coroutine.status(f) == "\u{64}\u{65}\u{61}\u{64}"))))
5757_G.f=nil
5858local function foo
5959(i)
6060return coroutine.yield(i)
6161end
6262local f = coroutine.wrap(function ()
63−for i = 1, 10
63+for i = 0x1, 0xa
6464do
65−assert(foo(i) == _G.x)
65+assert((foo(i) == _G.x))
6666end
6767return "\u{61}"
6868end)
69−for i = 1, 10
69+for i = 0x1, 0xa
7070do
7171_G.x=i
7272;
73−assert(f(i) == i)
73+assert((f(i) == i))
7474end
7575_G.x="\u{78}\u{75}\u{78}\u{75}"
7676;
77−assert(f("\u{78}\u{75}\u{78}\u{75}") == "\u{61}")
77+assert((f("\u{78}\u{75}\u{78}\u{75}") == "\u{61}"))
7878_G.x=nil
7979local function pf
8080(n,i)
8181coroutine.yield(n)
82−pf(n * i,i + 1)
82+pf((n * i),(i + 0x1))
8383end
8484f=coroutine.wrap(pf)
85−local s = 1
86−for i = 1, 10
85+local s = 0x1
86+for i = 0x1, 0xa
8787do
88−assert(f(1,1) == s)
89−s=s * i
88+assert((f(0x1,0x1) == s))
89+s=(s * i)
9090end
9191local function gen
9292(n)
9393return coroutine.wrap(function ()
94−for i = 2, n
94+for i = 0x2, n
9595do
9696coroutine.yield(i)
9797end
@@ -100,28 +100,28 @@ end
100100local function filter
101101(p,g)
102102return coroutine.wrap(function ()
103−while 1 do
103+while 0x1 do
104104local n = g()
105−if n == nil then
105+if (n == nil) then
106106return
107107end
108−if math.fmod(n,p) ~= 0 then
108+if (math.fmod(n,p) ~= 0x0) then
109109coroutine.yield(n)
110110end
111111end
112112end)
113113end
114−local x = gen(80)
114+local x = gen(0x50)
115115local a = {}
116−while 1 do
116+while 0x1 do
117117local n = x()
118−if n == nil then
118+if (n == nil) then
119119break
120120end
121121table.insert(a,n)
122122x=filter(n,x)
123123end
124−assert(# a == 22 and a[# a] == 79)
124+assert((# ((a == 0x16) and (a[(# a)] == 0x4f))))
125125x,a=nil
126126print("\u{74}\u{6f}\u{2d}\u{62}\u{65}\u{2d}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{20}\u{76}\u{61}\u{72}\u{69}\u{61}\u{62}\u{6c}\u{65}\u{73}\u{20}\u{69}\u{6e}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{73}")
127127local function func2close
@@ -131,18 +131,18 @@ end
131131do
132132local co = coroutine.create(print)
133133assert(coroutine.resume(co,"\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{27}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{2e}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{27}"))
134−assert(coroutine.status(co) == "\u{64}\u{65}\u{61}\u{64}")
134+assert((coroutine.status(co) == "\u{64}\u{65}\u{61}\u{64}"))
135135local st,msg = coroutine.close(co)
136−assert(st and msg == nil)
136+assert((st and (msg == nil)))
137137st,msg=coroutine.close(co)
138−assert(st and msg == nil)
138+assert((st and (msg == nil)))
139139local st,msg = pcall(coroutine.close,coroutine.running())
140−assert(not st and string.find(msg,"\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}"))
140+assert((not (st and string.find(msg,"\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}"))))
141141local main = coroutine.running()
142142;
143143(coroutine.wrap(function ()
144144local st,msg = pcall(coroutine.close,main)
145−assert(not st and string.find(msg,"\u{6e}\u{6f}\u{72}\u{6d}\u{61}\u{6c}"))
145+assert((not (st and string.find(msg,"\u{6e}\u{6f}\u{72}\u{6d}\u{61}\u{6c}"))))
146146end))()
147147do
148148local co
@@ -150,24 +150,24 @@ co=coroutine.create(function ()
150150local x <close> = func2close(function ()
151151coroutine.close(co)
152152end)
153−coroutine.yield(20)
153+coroutine.yield(0x14)
154154end)
155155local st,msg = coroutine.resume(co)
156−assert(st and msg == 20)
156+assert((st and (msg == 0x14)))
157157st,msg=coroutine.close(co)
158−assert(not st and string.find(msg,"\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}"))
158+assert((not (st and string.find(msg,"\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}"))))
159159end
160160local X
161161local co = coroutine.create(error)
162−local st,msg = coroutine.resume(co,100)
163−assert(not st and msg == 100)
162+local st,msg = coroutine.resume(co,0x64)
163+assert((not (st and (msg == 0x64))))
164164st,msg=coroutine.close(co)
165−assert(not st and msg == 100)
165+assert((not (st and (msg == 0x64))))
166166st,msg=coroutine.close(co)
167−assert(st and msg == nil)
167+assert((st and (msg == nil)))
168168co=coroutine.create(function ()
169169local x <close> = func2close(function (self,err)
170−assert(err == nil)
170+assert((err == nil))
171171;
172172X=false
173173end)
@@ -177,28 +177,28 @@ end)
177177coroutine.resume(co)
178178assert(X)
179179assert(coroutine.close(co))
180−assert(not X and coroutine.status(co) == "\u{64}\u{65}\u{61}\u{64}")
181−local x = 0
180+assert((not (X and (coroutine.status(co) == "\u{64}\u{65}\u{61}\u{64}"))))
181+local x = 0x0
182182co=coroutine.create(function ()
183183local y <close> = func2close(function (self,err)
184−assert(err == 111)
185−x=200
186−error(200)
184+assert((err == 0x6f))
185+x=0xc8
186+error(0xc8)
187187end)
188188local x <close> = func2close(function (self,err)
189−assert(err == nil)
189+assert((err == nil))
190190;
191−error(111)
191+error(0x6f)
192192end)
193193coroutine.yield()
194194end)
195195coroutine.resume(co)
196−assert(x == 0)
196+assert((x == 0x0))
197197local st,msg = coroutine.close(co)
198−assert(st == false and coroutine.status(co) == "\u{64}\u{65}\u{61}\u{64}" and msg == 200)
199−assert(x == 200)
198+assert((((st == false) and (coroutine.status(co) == "\u{64}\u{65}\u{61}\u{64}")) and (msg == 0xc8)))
199+assert((x == 0xc8))
200200st,msg=coroutine.close(co)
201−assert(st and msg == nil)
201+assert((st and (msg == nil)))
202202end
203203do
204204local X = false
@@ -206,59 +206,59 @@ local Y = false
206206local function foo
207207()
208208local x <close> = func2close(function (self,err)
209−Y=debug.getinfo(2)
209+Y=debug.getinfo(0x2)
210210X=err
211211end)
212−error(43)
212+error(0x2b)
213213end
214214local co = coroutine.create(function ()
215215return pcall(foo)
216216end)
217217local st1,st2,err = coroutine.resume(co)
218−assert(st1 and not st2 and err == 43)
219−assert(X == 43 and Y.what == "\u{43}")
218+assert((st1 and (not (st2 and (err == 0x2b)))))
219+assert(((X == 0x2b) and (Y.what == "\u{43}")))
220220local track = {}
221221local function h
222222(o)
223223local hv <close> = o
224−return 1
224+return 0x1
225225end
226226local function foo
227227()
228228local x <close> = func2close(function (_,msg)
229−track[# track + 1]=msg or false
230−error(20)
229+track[(# (track + 0x1))]=(msg or false)
230+error(0x14)
231231end)
232232local y <close> = func2close(function (_,msg)
233−track[# track + 1]=msg or false
234−return 1000
233+track[(# (track + 0x1))]=(msg or false)
234+return 0x3e8
235235end)
236236local z <close> = func2close(function (_,msg)
237−track[# track + 1]=msg or false
238−error(10)
237+track[(# (track + 0x1))]=(msg or false)
238+error(0xa)
239239end)
240−coroutine.yield(1)
240+coroutine.yield(0x1)
241241h(func2close(function (_,msg)
242−track[# track + 1]=msg or false
243−error(2)
242+track[(# (track + 0x1))]=(msg or false)
243+error(0x2)
244244end))
245245end
246246local co = coroutine.create(pcall)
247247local st,res = coroutine.resume(co,foo)
248−assert(st and res == 1)
248+assert((st and (res == 0x1)))
249249local st,res1,res2 = coroutine.resume(co)
250−assert(coroutine.status(co) == "\u{64}\u{65}\u{61}\u{64}")
251−assert(st and not res1 and res2 == 20)
252−assert(track[1] == false and track[2] == 2 and track[3] == 10 and track[4] == 10)
250+assert((coroutine.status(co) == "\u{64}\u{65}\u{61}\u{64}"))
251+assert((st and (not (res1 and (res2 == 0x14)))))
252+assert(((((track[0x1] == false) and (track[0x2] == 0x2)) and (track[0x3] == 0xa)) and (track[0x4] == 0xa)))
253253end
254254local co = coroutine.wrap(function ()
255−assert(not pcall(table.sort,{1,2,3},coroutine.yield))
255+assert((not pcall(table.sort,{0x1,0x2,0x3},coroutine.yield)))
256256assert(coroutine.isyieldable())
257−coroutine.yield(20)
258−return 30
257+coroutine.yield(0x14)
258+return 0x1e
259259end)
260−assert(co() == 20)
261−assert(co() == 30)
260+assert((co() == 0x14))
261+assert((co() == 0x1e))
262262local f = function (s,i)
263263return coroutine.yield(i)
264264end
@@ -266,173 +266,173 @@ local f1 = coroutine.wrap(function ()
266266return xpcall(pcall,function (...)
267267return ...
268268end,function ()
269−local s = 0
270−for i in f,nil,1
269+local s = 0x0
270+for i in f,nil,0x1
271271do
272272pcall(function ()
273−s=s + i
273+s=(s + i)
274274end)
275275end
276276error({s})
277277end)
278278end)
279279f1()
280−for i = 1, 10
280+for i = 0x1, 0xa
281281do
282−assert(f1(i) == i)
282+assert((f1(i) == i))
283283end
284284local r1,r2,v = f1(nil)
285−assert(r1 and not r2 and v[1] == (10 + 1) * 10 / 2)
285+assert((r1 and (not (r2 and (v[0x1] == (((0xa + 0x1) * 0xa) / 0x2))))))
286286local function f
287287(a,b)
288288a=coroutine.yield(a)
289289;
290−error({a + b})
290+error({(a + b)})
291291end
292292local function g
293293(x)
294−return x[1] * 2
294+return (x[0x1] * 0x2)
295295end
296296co=coroutine.wrap(function ()
297−coroutine.yield(xpcall(f,g,10,20))
297+coroutine.yield(xpcall(f,g,0xa,0x14))
298298end)
299−assert(co() == 10)
300−local r,msg = co(100)
301−assert(not r and msg == 240)
299+assert((co() == 0xa))
300+local r,msg = co(0x64)
301+assert((not (r and (msg == 0xf0))))
302302do
303303local function f
304304(c)
305−assert(not coroutine.isyieldable())
306−return c .. c
305+assert((not coroutine.isyieldable()))
306+return (c .. c)
307307end
308308local co = coroutine.wrap(function (c)
309309assert(coroutine.isyieldable())
310310local s = string.gsub("\u{61}","\u{2e}",f)
311311return s
312312end)
313−assert(co() == "\u{61}\u{61}")
313+assert((co() == "\u{61}\u{61}"))
314314end
315315do
316316local X
317317local co = coroutine.create(function ()
318−coroutine.yield(10)
319−return 20
318+coroutine.yield(0xa)
319+return 0x14
320320end)
321321local trace = {}
322322local function dotrace
323323(event)
324−trace[# trace + 1]=event
324+trace[(# (trace + 0x1))]=event
325325end
326326debug.sethook(co,dotrace,"\u{63}\u{6c}\u{72}")
327327repeat
328328
329−until not coroutine.resume(co)
329+until (not coroutine.resume(co))
330330local correcttrace = {"\u{63}\u{61}\u{6c}\u{6c}","\u{6c}\u{69}\u{6e}\u{65}","\u{63}\u{61}\u{6c}\u{6c}","\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}","\u{6c}\u{69}\u{6e}\u{65}","\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}"}
331−assert(# trace == # correcttrace)
331+assert((# (trace == (# correcttrace))))
332332for k,v in pairs(trace)
333333do
334−assert(v == correcttrace[k])
334+assert((v == correcttrace[k]))
335335end
336336end
337337function foo()
338−assert(debug.getinfo(1).currentline == debug.getinfo(foo).linedefined + 1)
339−assert(debug.getinfo(2).currentline == debug.getinfo(goo).linedefined)
340−coroutine.yield(3)
338+assert((debug.getinfo(0x1).currentline == (debug.getinfo(foo).linedefined + 0x1)))
339+assert((debug.getinfo(0x2).currentline == debug.getinfo(goo).linedefined))
340+coroutine.yield(0x3)
341341error(foo)
342342end
343343function goo()
344344foo()
345345end
346346x=coroutine.wrap(goo)
347−assert(x() == 3)
347+assert((x() == 0x3))
348348local a,b = pcall(x)
349−assert(not a and b == foo)
349+assert((not (a and (b == foo))))
350350x=coroutine.create(goo)
351351a,b=coroutine.resume(x)
352−assert(a and b == 3)
352+assert((a and (b == 0x3)))
353353a,b=coroutine.resume(x)
354−assert(not a and b == foo and coroutine.status(x) == "\u{64}\u{65}\u{61}\u{64}")
354+assert((not ((a and (b == foo)) and (coroutine.status(x) == "\u{64}\u{65}\u{61}\u{64}"))))
355355a,b=coroutine.resume(x)
356−assert(not a and string.find(b,"\u{64}\u{65}\u{61}\u{64}") and coroutine.status(x) == "\u{64}\u{65}\u{61}\u{64}")
356+assert((not ((a and string.find(b,"\u{64}\u{65}\u{61}\u{64}")) and (coroutine.status(x) == "\u{64}\u{65}\u{61}\u{64}"))))
357357goo=nil
358358local function all
359359(a,n,k)
360−if k == 0 then
360+if (k == 0x0) then
361361coroutine.yield(a)
362362else
363−for i = 1, n
363+for i = 0x1, n
364364do
365365a[k]=i
366−all(a,n,k - 1)
366+all(a,n,(k - 0x1))
367367end
368368end
369369end
370−local a = 0
370+local a = 0x0
371371for t in coroutine.wrap(function ()
372−all({},5,4)
372+all({},0x5,0x4)
373373end)
374374do
375−a=a + 1
375+a=(a + 0x1)
376376end
377−assert(a == 5 ^ 4)
377+assert((a == (0x5 ^ 0x4)))
378378local C = {}
379379;
380380setmetatable(C,{["\u{5f}\u{5f}\u{6d}\u{6f}\u{64}\u{65}"] = "\u{6b}\u{76}"})
381381local x = coroutine.wrap(function ()
382−local a = 10
382+local a = 0xa
383383local function f
384384()
385−a=a + 10
385+a=(a + 0xa)
386386;
387387return a
388388end
389389while true do
390−a=a + 1
390+a=(a + 0x1)
391391coroutine.yield(f)
392392end
393393end)
394−C[1]=x
394+C[0x1]=x
395395;
396396local f = x()
397−assert(f() == 21 and x()() == 32 and x() == f)
397+assert((((f() == 0x15) and (x()() == 0x20)) and (x() == f)))
398398x=nil
399399collectgarbage()
400−assert(C[1] == undef)
401−assert(f() == 43 and f() == 53)
400+assert((C[0x1] == undef))
401+assert(((f() == 0x2b) and (f() == 0x35)))
402402local function co_func
403403(current_co)
404−assert(coroutine.running() == current_co)
405−assert(coroutine.resume(current_co) == false)
406−coroutine.yield(10,20)
407−assert(coroutine.resume(current_co) == false)
408−coroutine.yield(23)
409−return 10
404+assert((coroutine.running() == current_co))
405+assert((coroutine.resume(current_co) == false))
406+coroutine.yield(0xa,0x14)
407+assert((coroutine.resume(current_co) == false))
408+coroutine.yield(0x17)
409+return 0xa
410410end
411411local co = coroutine.create(co_func)
412412local a,b,c = coroutine.resume(co,co)
413−assert(a == true and b == 10 and c == 20)
413+assert((((a == true) and (b == 0xa)) and (c == 0x14)))
414414a,b=coroutine.resume(co,co)
415−assert(a == true and b == 23)
415+assert(((a == true) and (b == 0x17)))
416416a,b=coroutine.resume(co,co)
417−assert(a == true and b == 10)
418−assert(coroutine.resume(co,co) == false)
419−assert(coroutine.resume(co,co) == false)
417+assert(((a == true) and (b == 0xa)))
418+assert((coroutine.resume(co,co) == false))
419+assert((coroutine.resume(co,co) == false))
420420do
421421local A = coroutine.running()
422422local B = coroutine.create(function ()
423423return coroutine.resume(A)
424424end)
425425local st,res = coroutine.resume(B)
426−assert(st == true and res == false)
426+assert(((st == true) and (res == false)))
427427local X = false
428428A=coroutine.wrap(function ()
429429local _ <close> = func2close(function ()
430430X=true
431431end)
432−return pcall(A,1)
432+return pcall(A,0x1)
433433end)
434434st,res=A()
435−assert(not st and string.find(res,"\u{6e}\u{6f}\u{6e}\u{25}\u{2d}\u{73}\u{75}\u{73}\u{70}\u{65}\u{6e}\u{64}\u{65}\u{64}") and X == true)
435+assert((not ((st and string.find(res,"\u{6e}\u{6f}\u{6e}\u{25}\u{2d}\u{73}\u{75}\u{73}\u{70}\u{65}\u{6e}\u{64}\u{65}\u{64}")) and (X == true))))
436436end
437437do
438438local co
@@ -440,74 +440,74 @@ co=coroutine.wrap(function ()
440440local x <close> = func2close(function ()
441441return pcall(co)
442442end)
443−error(111)
443+error(0x6f)
444444end)
445445local st,errobj = pcall(co)
446−assert(not st and errobj == 111)
446+assert((not (st and (errobj == 0x6f))))
447447st,errobj=pcall(co)
448−assert(not st and string.find(errobj,"\u{64}\u{65}\u{61}\u{64}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}"))
448+assert((not (st and string.find(errobj,"\u{64}\u{65}\u{61}\u{64}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}"))))
449449end
450450local co1,co2
451451co1=coroutine.create(function ()
452452return co2()
453453end)
454454co2=coroutine.wrap(function ()
455−assert(coroutine.status(co1) == "\u{6e}\u{6f}\u{72}\u{6d}\u{61}\u{6c}")
456−assert(not coroutine.resume(co1))
457−coroutine.yield(3)
455+assert((coroutine.status(co1) == "\u{6e}\u{6f}\u{72}\u{6d}\u{61}\u{6c}"))
456+assert((not coroutine.resume(co1)))
457+coroutine.yield(0x3)
458458end)
459459a,b=coroutine.resume(co1)
460−assert(a and b == 3)
461−assert(coroutine.status(co1) == "\u{64}\u{65}\u{61}\u{64}")
460+assert((a and (b == 0x3)))
461+assert((coroutine.status(co1) == "\u{64}\u{65}\u{61}\u{64}"))
462462a=function (a)
463463coroutine.wrap(a)(a)
464464end
465−assert(not pcall(a,a))
465+assert((not pcall(a,a)))
466466a=nil
467467local x = coroutine.create(function ()
468−local a = 10
468+local a = 0xa
469469_G.F=function ()
470−a=a + 1
470+a=(a + 0x1)
471471;
472472return a
473473end
474474error("\u{78}")
475475end)
476−assert(not coroutine.resume(x))
477−assert(not coroutine.resume(x,1,1,1,1,1,1,1))
478−assert(_G.F() == 11)
479−assert(_G.F() == 12)
476+assert((not coroutine.resume(x)))
477+assert((not coroutine.resume(x,0x1,0x1,0x1,0x1,0x1,0x1,0x1)))
478+assert((_G.F() == 0xb))
479+assert((_G.F() == 0xc))
480480_G.F=nil
481−if not T then
481+if (not T) then
482482(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{20}\u{41}\u{50}\u{49}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
483483else
484484print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{73}\u{20}\u{69}\u{6e}\u{73}\u{69}\u{64}\u{65}\u{20}\u{68}\u{6f}\u{6f}\u{6b}\u{73}")
485485local turn
486486local function fact
487487(t,x)
488−assert(turn == t)
489−if x == 0 then
490−return 1
488+assert((turn == t))
489+if (x == 0x0) then
490+return 0x1
491491else
492−return x * fact(t,x - 1)
492+return (x * fact(t,(x - 0x1)))
493493end
494494end
495−local A,B = 0,0
495+local A,B = 0x0,0x0
496496local x = coroutine.create(function ()
497−T.sethook("\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{30}","",2)
498−A=fact("\u{41}",6)
497+T.sethook("\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{30}","",0x2)
498+A=fact("\u{41}",0x6)
499499end)
500500local y = coroutine.create(function ()
501−T.sethook("\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{30}","",3)
502−B=fact("\u{42}",7)
501+T.sethook("\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{30}","",0x3)
502+B=fact("\u{42}",0x7)
503503end)
504−while A == 0 or B == 0 do
505−if A == 0 then
504+while ((A == 0x0) or (B == 0x0)) do
505+if (A == 0x0) then
506506turn="\u{41}"
507507;
508508assert(T.resume(x))
509509end
510−if B == 0 then
510+if (B == 0x0) then
511511turn="\u{42}"
512512;
513513assert(T.resume(y))
@@ -515,7 +515,7 @@ end
515515debug.traceback(x)
516516debug.traceback(y)
517517end
518−assert(B // A == 7)
518+assert(((B // A) == 0x7))
519519do
520520local done
521521local function test
@@ -523,54 +523,54 @@ local function test
523523done=false
524524return coroutine.wrap(function ()
525525local a = {}
526−for i = 1, n
526+for i = 0x1, n
527527do
528528a[i]=i
529529end
530−T.sethook("\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{30}","",1)
530+T.sethook("\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{30}","",0x1)
531531local a1 = {table.unpack(a)}
532−assert(# a1 == n)
533−for i = 1, n
532+assert((# (a1 == n)))
533+for i = 0x1, n
534534do
535−assert(a[i] == i)
535+assert((a[i] == i))
536536end
537537done=true
538538end)
539539end
540−local co = test(0)
540+local co = test(0x0)
541541;
542−while not done do
543−co(30)
542+while (not done) do
543+co(0x1e)
544544end
545−co=test(1)
545+co=test(0x1)
546546;
547−while not done do
548−co(20,10)
547+while (not done) do
548+co(0x14,0xa)
549549end
550−co=test(3)
550+co=test(0x3)
551551;
552−while not done do
552+while (not done) do
553553co()
554554end
555−co=test(100)
555+co=test(0x64)
556556;
557−while not done do
557+while (not done) do
558558co()
559559end
560560end
561−local line = debug.getinfo(1,"\u{6c}").currentline + 2
561+local line = (debug.getinfo(0x1,"\u{6c}").currentline + 0x2)
562562local function foo
563563()
564−local x = 10
565−x=x + 10
564+local x = 0xa
565+x=(x + 0xa)
566566_G.XX=x
567567end
568568local co = coroutine.wrap(function ()
569−T.sethook("\u{73}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{58}\u{3b}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{30}","\u{6c}",0)
569+T.sethook("\u{73}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{58}\u{3b}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{30}","\u{6c}",0x0)
570570;
571571foo()
572572;
573−return 10
573+return 0xa
574574end)
575575_G.XX=nil
576576;
@@ -578,56 +578,56 @@ _G.X=nil
578578;
579579co()
580580;
581−assert(_G.X == line)
581+assert((_G.X == line))
582582_G.X=nil
583583;
584584co()
585585;
586−assert(_G.X == line + 1)
586+assert((_G.X == (line + 0x1)))
587587_G.X=nil
588588;
589589co()
590590;
591−assert(_G.X == line + 2 and _G.XX == nil)
591+assert(((_G.X == (line + 0x2)) and (_G.XX == nil)))
592592_G.X=nil
593593;
594594co()
595595;
596−assert(_G.X == line + 3 and _G.XX == 20)
597−assert(co() == 10)
596+assert(((_G.X == (line + 0x3)) and (_G.XX == 0x14)))
597+assert((co() == 0xa))
598598_G.X=nil
599599co=coroutine.wrap(function ()
600−T.sethook("\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{30}","",1)
600+T.sethook("\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{30}","",0x1)
601601;
602602foo()
603603;
604−return 10
604+return 0xa
605605end)
606606_G.XX=nil
607607;
608−local c = 0
608+local c = 0x0
609609repeat
610−c=c + 1
610+c=(c + 0x1)
611611;
612612local a = co()
613−until a == 10
614−assert(_G.XX == 20 and c >= 5)
613+until (a == 0xa)
614+assert(((_G.XX == 0x14) and (c >= 0x5)))
615615co=coroutine.wrap(function ()
616−T.sethook("\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{30}","",2)
616+T.sethook("\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{30}","",0x2)
617617;
618618foo()
619619;
620−return 10
620+return 0xa
621621end)
622622_G.XX=nil
623623;
624−local c = 0
624+local c = 0x0
625625repeat
626−c=c + 1
626+c=(c + 0x1)
627627;
628628local a = co()
629−until a == 10
630−assert(_G.XX == 20 and c >= 5)
629+until (a == 0xa)
630+assert(((_G.XX == 0x14) and (c >= 0x5)))
631631_G.X=nil
632632;
633633_G.XX=nil
@@ -637,84 +637,84 @@ T.sethook("\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{30}","\u{6c}")
637637local b = a
638638return ...
639639end)
640−assert(coroutine.resume(c,1,2,3))
641−local n,v = debug.getlocal(c,0,1)
642−assert(n == "\u{61}" and v == 1 and debug.getlocal(c,0,2) ~= "\u{62}")
643−assert(debug.setlocal(c,0,1,10))
644−local t = debug.getinfo(c,0)
645−assert(t.currentline == t.linedefined + 2)
646−assert(not debug.getinfo(c,1))
640+assert(coroutine.resume(c,0x1,0x2,0x3))
641+local n,v = debug.getlocal(c,0x0,0x1)
642+assert((((n == "\u{61}") and (v == 0x1)) and (debug.getlocal(c,0x0,0x2) ~= "\u{62}")))
643+assert(debug.setlocal(c,0x0,0x1,0xa))
644+local t = debug.getinfo(c,0x0)
645+assert((t.currentline == (t.linedefined + 0x2)))
646+assert((not debug.getinfo(c,0x1)))
647647assert(coroutine.resume(c))
648−local n,v = debug.getlocal(c,0,2)
649−assert(n == "\u{62}" and v == 10)
648+local n,v = debug.getlocal(c,0x0,0x2)
649+assert(((n == "\u{62}") and (v == 0xa)))
650650v={coroutine.resume(c)}
651−assert(v[1] == true and v[2] == 2 and v[3] == 3 and v[4] == undef)
652−assert(not coroutine.resume(c))
651+assert(((((v[0x1] == true) and (v[0x2] == 0x2)) and (v[0x3] == 0x3)) and (v[0x4] == undef)))
652+assert((not coroutine.resume(c)))
653653end
654654do
655655local c = coroutine.create(function ()
656−T.testC("\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{31}",10,20)
656+T.testC("\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{31}",0xa,0x14)
657657end)
658658local a,b = coroutine.resume(c)
659−assert(a and b == 20)
660−assert(debug.getinfo(c,0).linedefined == - 1)
661−a,b=debug.getlocal(c,0,2)
662−assert(b == 10)
659+assert((a and (b == 0x14)))
660+assert((debug.getinfo(c,0x0).linedefined == (- 0x1)))
661+a,b=debug.getlocal(c,0x0,0x2)
662+assert((b == 0xa))
663663end
664664print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{20}\u{41}\u{50}\u{49}")
665−assert(T.testC("\u{20}\u{20}\u{20}\u{20}\u{6e}\u{65}\u{77}\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{32}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{70}\u{75}\u{73}\u{68}\u{20}\u{62}\u{6f}\u{64}\u{79}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{27}\u{61}\u{20}\u{61}\u{20}\u{61}\u{27}\u{20}\u{20}\u{23}\u{20}\u{70}\u{75}\u{73}\u{68}\u{20}\u{61}\u{72}\u{67}\u{75}\u{6d}\u{65}\u{6e}\u{74}\u{a}\u{20}\u{20}\u{20}\u{20}\u{78}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{30}\u{20}\u{33}\u{20}\u{32}\u{20}\u{20}\u{20}\u{23}\u{20}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{73}\u{20}\u{74}\u{6f}\u{20}\u{6e}\u{65}\u{77}\u{20}\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6d}\u{65}\u{20}\u{2d}\u{31}\u{2c}\u{20}\u{31}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{69}\u{74}\u{20}\u{66}\u{69}\u{72}\u{73}\u{74}\u{20}\u{74}\u{69}\u{6d}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{61}\u{74}\u{75}\u{73}\u{a}\u{20}\u{20}\u{20}\u{20}\u{78}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{33}\u{20}\u{30}\u{20}\u{30}\u{20}\u{20}\u{20}\u{23}\u{20}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}\u{20}\u{62}\u{61}\u{63}\u{6b}\u{20}\u{74}\u{6f}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{73}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{58}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{a}\u{20}\u{20}\u{20}\u{20}\u{73}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{59}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{74}\u{75}\u{73}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{32}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{70}\u{75}\u{73}\u{68}\u{20}\u{62}\u{6f}\u{64}\u{79}\u{20}\u{28}\u{74}\u{6f}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{69}\u{74}\u{20}\u{61}\u{67}\u{61}\u{69}\u{6e}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{27}\u{62}\u{20}\u{62}\u{20}\u{62}\u{27}\u{a}\u{20}\u{20}\u{20}\u{20}\u{78}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{30}\u{20}\u{33}\u{20}\u{32}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6d}\u{65}\u{20}\u{2d}\u{31}\u{2c}\u{20}\u{31}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{69}\u{74}\u{20}\u{61}\u{67}\u{61}\u{69}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{61}\u{74}\u{75}\u{73}\u{a}\u{20}\u{20}\u{20}\u{20}\u{78}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{33}\u{20}\u{30}\u{20}\u{30}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{a}\u{20}\u{20}",function (...)
665+assert((T.testC("\u{20}\u{20}\u{20}\u{20}\u{6e}\u{65}\u{77}\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{72}\u{65}\u{61}\u{74}\u{65}\u{20}\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{32}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{70}\u{75}\u{73}\u{68}\u{20}\u{62}\u{6f}\u{64}\u{79}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{27}\u{61}\u{20}\u{61}\u{20}\u{61}\u{27}\u{20}\u{20}\u{23}\u{20}\u{70}\u{75}\u{73}\u{68}\u{20}\u{61}\u{72}\u{67}\u{75}\u{6d}\u{65}\u{6e}\u{74}\u{a}\u{20}\u{20}\u{20}\u{20}\u{78}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{30}\u{20}\u{33}\u{20}\u{32}\u{20}\u{20}\u{20}\u{23}\u{20}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{73}\u{20}\u{74}\u{6f}\u{20}\u{6e}\u{65}\u{77}\u{20}\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6d}\u{65}\u{20}\u{2d}\u{31}\u{2c}\u{20}\u{31}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{69}\u{74}\u{20}\u{66}\u{69}\u{72}\u{73}\u{74}\u{20}\u{74}\u{69}\u{6d}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{61}\u{74}\u{75}\u{73}\u{a}\u{20}\u{20}\u{20}\u{20}\u{78}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{33}\u{20}\u{30}\u{20}\u{30}\u{20}\u{20}\u{20}\u{23}\u{20}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}\u{20}\u{62}\u{61}\u{63}\u{6b}\u{20}\u{74}\u{6f}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{73}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{58}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{a}\u{20}\u{20}\u{20}\u{20}\u{73}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{59}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{73}\u{74}\u{61}\u{74}\u{75}\u{73}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{32}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{70}\u{75}\u{73}\u{68}\u{20}\u{62}\u{6f}\u{64}\u{79}\u{20}\u{28}\u{74}\u{6f}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{69}\u{74}\u{20}\u{61}\u{67}\u{61}\u{69}\u{6e}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{27}\u{62}\u{20}\u{62}\u{20}\u{62}\u{27}\u{a}\u{20}\u{20}\u{20}\u{20}\u{78}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{30}\u{20}\u{33}\u{20}\u{32}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6d}\u{65}\u{20}\u{2d}\u{31}\u{2c}\u{20}\u{31}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{69}\u{74}\u{20}\u{61}\u{67}\u{61}\u{69}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{61}\u{74}\u{75}\u{73}\u{a}\u{20}\u{20}\u{20}\u{20}\u{78}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{33}\u{20}\u{30}\u{20}\u{30}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{a}\u{20}\u{20}",function (...)
666666return ...
667−end) == "\u{62}\u{20}\u{62}\u{20}\u{62}")
668−assert(X == "\u{61}\u{20}\u{61}\u{20}\u{61}" and Y == "\u{4f}\u{4b}")
667+end) == "\u{62}\u{20}\u{62}\u{20}\u{62}"))
668+assert(((X == "\u{61}\u{20}\u{61}\u{20}\u{61}") and (Y == "\u{4f}\u{4b}")))
669669X,Y=nil
670670C=coroutine.create(function ()
671671return T.testC("\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{30}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6d}\u{65}\u{20}\u{2d}\u{33}\u{20}\u{32}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{61}\u{74}\u{75}\u{73}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}",C)
672672end)
673673local a,b,c,d = coroutine.resume(C)
674−assert(a == true and string.find(b,"\u{6e}\u{6f}\u{6e}\u{25}\u{2d}\u{73}\u{75}\u{73}\u{70}\u{65}\u{6e}\u{64}\u{65}\u{64}") and c == "\u{45}\u{52}\u{52}\u{52}\u{55}\u{4e}" and d == 4)
674+assert(((((a == true) and string.find(b,"\u{6e}\u{6f}\u{6e}\u{25}\u{2d}\u{73}\u{75}\u{73}\u{70}\u{65}\u{6e}\u{64}\u{65}\u{64}")) and (c == "\u{45}\u{52}\u{52}\u{52}\u{55}\u{4e}")) and (d == 0x4)))
675675a,b,c,d=T.testC("\u{20}\u{20}\u{20}\u{20}\u{72}\u{61}\u{77}\u{67}\u{65}\u{74}\u{69}\u{20}\u{52}\u{20}\u{31}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{67}\u{65}\u{74}\u{20}\u{6d}\u{61}\u{69}\u{6e}\u{20}\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{30}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6d}\u{65}\u{20}\u{2d}\u{33}\u{20}\u{32}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{61}\u{74}\u{75}\u{73}\u{a}\u{20}\u{20}\u{20}\u{20}\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{34}")
676−assert(a == coroutine.running() and string.find(b,"\u{6e}\u{6f}\u{6e}\u{25}\u{2d}\u{73}\u{75}\u{73}\u{70}\u{65}\u{6e}\u{64}\u{65}\u{64}") and c == "\u{45}\u{52}\u{52}\u{52}\u{55}\u{4e}" and d == 4)
676+assert(((((a == coroutine.running()) and string.find(b,"\u{6e}\u{6f}\u{6e}\u{25}\u{2d}\u{73}\u{75}\u{73}\u{70}\u{65}\u{6e}\u{64}\u{65}\u{64}")) and (c == "\u{45}\u{52}\u{52}\u{52}\u{55}\u{4e}")) and (d == 0x4)))
677677local state = T.newstate()
678678assert(T.testC(state,"\u{6e}\u{65}\u{77}\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}\u{3b}\u{20}\u{69}\u{73}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"))
679−assert(not T.testC(state,"\u{72}\u{61}\u{77}\u{67}\u{65}\u{74}\u{69}\u{20}\u{52}\u{20}\u{31}\u{3b}\u{20}\u{69}\u{73}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"))
679+assert((not T.testC(state,"\u{72}\u{61}\u{77}\u{67}\u{65}\u{74}\u{69}\u{20}\u{52}\u{20}\u{31}\u{3b}\u{20}\u{69}\u{73}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}")))
680680T.testC(state,"\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{30}")
681681T.loadlib(state)
682682assert(T.doremote(state,"\u{20}\u{20}\u{20}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{20}\u{3d}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{27}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{27}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{58}\u{20}\u{3d}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{78}\u{29}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{2e}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{28}\u{78}\u{2c}\u{20}\u{27}\u{42}\u{42}\u{27}\u{29}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{27}\u{43}\u{43}\u{27}\u{20}\u{65}\u{6e}\u{64}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{27}\u{6f}\u{6b}\u{27}"))
683683local t = table.pack(T.testC(state,"\u{20}\u{20}\u{20}\u{20}\u{72}\u{61}\u{77}\u{67}\u{65}\u{74}\u{69}\u{20}\u{52}\u{20}\u{31}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{67}\u{65}\u{74}\u{20}\u{6d}\u{61}\u{69}\u{6e}\u{20}\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{27}\u{58}\u{58}\u{27}\u{a}\u{20}\u{20}\u{20}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{58}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{67}\u{65}\u{74}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{62}\u{6f}\u{64}\u{79}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{41}\u{41}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{61}\u{72}\u{67}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6d}\u{65}\u{20}\u{31}\u{20}\u{31}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{27}\u{72}\u{65}\u{73}\u{75}\u{6d}\u{65}\u{27}\u{20}\u{73}\u{68}\u{61}\u{64}\u{6f}\u{77}\u{73}\u{20}\u{70}\u{72}\u{65}\u{76}\u{69}\u{6f}\u{75}\u{73}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{21}\u{a}\u{20}\u{20}\u{20}\u{20}\u{67}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{a}\u{20}\u{20}\u{20}\u{20}\u{73}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{54}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{74}\u{6f}\u{70}\u{a}\u{20}\u{20}\u{20}\u{20}\u{73}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{42}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{73}\u{65}\u{63}\u{6f}\u{6e}\u{64}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{65}\u{64}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{73}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{41}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{66}\u{69}\u{73}\u{74}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{65}\u{64}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{61}\u{77}\u{67}\u{65}\u{74}\u{69}\u{20}\u{52}\u{20}\u{31}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{67}\u{65}\u{74}\u{20}\u{6d}\u{61}\u{69}\u{6e}\u{20}\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{35}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{61}\u{72}\u{67}\u{20}\u{28}\u{6e}\u{6f}\u{69}\u{73}\u{65}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6d}\u{65}\u{20}\u{31}\u{20}\u{31}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{61}\u{66}\u{74}\u{65}\u{72}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{20}\u{65}\u{6e}\u{64}\u{73}\u{2c}\u{20}\u{70}\u{72}\u{65}\u{76}\u{69}\u{6f}\u{75}\u{73}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{69}\u{73}\u{20}\u{62}\u{61}\u{63}\u{6b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{61}\u{74}\u{75}\u{73}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}\u{a}\u{20}\u{20}"))
684−assert(t.n == 4 and t[2] == "\u{58}\u{58}" and t[3] == "\u{43}\u{43}" and t[4] == "\u{4f}\u{4b}")
685−assert(T.doremote(state,"\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{54}") == "\u{32}")
686−assert(T.doremote(state,"\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{41}") == "\u{41}\u{41}")
687−assert(T.doremote(state,"\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{42}") == "\u{42}\u{42}")
684+assert(((((t.n == 0x4) and (t[0x2] == "\u{58}\u{58}")) and (t[0x3] == "\u{43}\u{43}")) and (t[0x4] == "\u{4f}\u{4b}")))
685+assert((T.doremote(state,"\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{54}") == "\u{32}"))
686+assert((T.doremote(state,"\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{41}") == "\u{41}\u{41}"))
687+assert((T.doremote(state,"\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{42}") == "\u{42}\u{42}"))
688688T.closestate(state)
689689print("\u{2b}")
690690end
691691_G.TO_SURVIVE=coroutine.wrap(function ()
692−local a = 10
692+local a = 0xa
693693local x = function ()
694−a=a + 1
694+a=(a + 0x1)
695695end
696696coroutine.yield()
697697end)
698698_G.TO_SURVIVE()
699−if not _soft then
700−local lim = 1000000
701−local t = {lim - 10,lim - 5,lim - 1,lim,lim + 1,lim + 5}
702−for i = 1, # t
699+if (not _soft) then
700+local lim = 0xf4240
701+local t = {(lim - 0xa),(lim - 0x5),(lim - 0x1),lim,(lim + 0x1),(lim + 0x5)}
702+for i = 0x1, (# t)
703703do
704704local j = t[i]
705705local co = coroutine.create(function ()
706−return table.unpack({},1,j)
706+return table.unpack({},0x1,j)
707707end)
708708local r,msg = coroutine.resume(co)
709−assert(j < lim or not r)
709+assert(((j < lim) or (not r)))
710710end
711711end
712−assert(coroutine.running() == main)
712+assert((coroutine.running() == main))
713713print("\u{2b}")
714714print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{73}\u{20}\u{69}\u{6e}\u{73}\u{69}\u{64}\u{65}\u{20}\u{6d}\u{65}\u{74}\u{61}\u{6d}\u{65}\u{74}\u{68}\u{6f}\u{64}\u{73}")
715715local function val
716716(x)
717−if type(x) == "\u{74}\u{61}\u{62}\u{6c}\u{65}" then
717+if (type(x) == "\u{74}\u{61}\u{62}\u{6c}\u{65}") then
718718return x.x
719719else
720720return x
@@ -723,74 +723,74 @@ end
723723local mt = {["\u{5f}\u{5f}\u{65}\u{71}"] = function (a,b)
724724coroutine.yield(nil,"\u{65}\u{71}")
725725;
726−return val(a) == val(b)
726+return (val(a) == val(b))
727727end,["\u{5f}\u{5f}\u{6c}\u{74}"] = function (a,b)
728728coroutine.yield(nil,"\u{6c}\u{74}")
729729;
730−return val(a) < val(b)
730+return (val(a) < val(b))
731731end,["\u{5f}\u{5f}\u{6c}\u{65}"] = function (a,b)
732732coroutine.yield(nil,"\u{6c}\u{65}")
733733;
734−return a - b <= 0
734+return ((a - b) <= 0x0)
735735end,["\u{5f}\u{5f}\u{61}\u{64}\u{64}"] = function (a,b)
736736coroutine.yield(nil,"\u{61}\u{64}\u{64}")
737737;
738−return val(a) + val(b)
738+return (val(a) + val(b))
739739end,["\u{5f}\u{5f}\u{73}\u{75}\u{62}"] = function (a,b)
740740coroutine.yield(nil,"\u{73}\u{75}\u{62}")
741741;
742−return val(a) - val(b)
742+return (val(a) - val(b))
743743end,["\u{5f}\u{5f}\u{6d}\u{75}\u{6c}"] = function (a,b)
744744coroutine.yield(nil,"\u{6d}\u{75}\u{6c}")
745745;
746−return val(a) * val(b)
746+return (val(a) * val(b))
747747end,["\u{5f}\u{5f}\u{64}\u{69}\u{76}"] = function (a,b)
748748coroutine.yield(nil,"\u{64}\u{69}\u{76}")
749749;
750−return val(a) / val(b)
750+return (val(a) / val(b))
751751end,["\u{5f}\u{5f}\u{69}\u{64}\u{69}\u{76}"] = function (a,b)
752752coroutine.yield(nil,"\u{69}\u{64}\u{69}\u{76}")
753753;
754−return val(a) // val(b)
754+return (val(a) // val(b))
755755end,["\u{5f}\u{5f}\u{70}\u{6f}\u{77}"] = function (a,b)
756756coroutine.yield(nil,"\u{70}\u{6f}\u{77}")
757757;
758−return val(a) ^ val(b)
758+return (val(a) ^ val(b))
759759end,["\u{5f}\u{5f}\u{6d}\u{6f}\u{64}"] = function (a,b)
760760coroutine.yield(nil,"\u{6d}\u{6f}\u{64}")
761761;
762−return val(a) % val(b)
762+return (val(a) % val(b))
763763end,["\u{5f}\u{5f}\u{75}\u{6e}\u{6d}"] = function (a,b)
764764coroutine.yield(nil,"\u{75}\u{6e}\u{6d}")
765765;
766−return - val(a)
766+return (- val(a))
767767end,["\u{5f}\u{5f}\u{62}\u{6e}\u{6f}\u{74}"] = function (a,b)
768768coroutine.yield(nil,"\u{62}\u{6e}\u{6f}\u{74}")
769769;
770−return ~ val(a)
770+return (~ val(a))
771771end,["\u{5f}\u{5f}\u{73}\u{68}\u{6c}"] = function (a,b)
772772coroutine.yield(nil,"\u{73}\u{68}\u{6c}")
773773;
774−return val(a) << val(b)
774+return (val(a) << val(b))
775775end,["\u{5f}\u{5f}\u{73}\u{68}\u{72}"] = function (a,b)
776776coroutine.yield(nil,"\u{73}\u{68}\u{72}")
777777;
778−return val(a) >> val(b)
778+return (val(a) >> val(b))
779779end,["\u{5f}\u{5f}\u{62}\u{61}\u{6e}\u{64}"] = function (a,b)
780780coroutine.yield(nil,"\u{62}\u{61}\u{6e}\u{64}")
781−return val(a) & val(b)
781+return (val(a) & val(b))
782782end,["\u{5f}\u{5f}\u{62}\u{6f}\u{72}"] = function (a,b)
783783coroutine.yield(nil,"\u{62}\u{6f}\u{72}")
784784;
785−return val(a) | val(b)
785+return (val(a) | val(b))
786786end,["\u{5f}\u{5f}\u{62}\u{78}\u{6f}\u{72}"] = function (a,b)
787787coroutine.yield(nil,"\u{62}\u{78}\u{6f}\u{72}")
788788;
789−return val(a) ~ val(b)
789+return (val(a) ~ val(b))
790790end,["\u{5f}\u{5f}\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}"] = function (a,b)
791791coroutine.yield(nil,"\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}")
792792;
793−return val(a) .. val(b)
793+return (val(a) .. val(b))
794794end,["\u{5f}\u{5f}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = function (t,k)
795795coroutine.yield(nil,"\u{69}\u{64}\u{78}")
796796;
@@ -804,167 +804,167 @@ local function new
804804(x)
805805return setmetatable({["\u{78}"] = x,["\u{6b}"] = {}},mt)
806806end
807−local a = new(10)
808−local b = new(12)
807+local a = new(0xa)
808+local b = new(0xc)
809809local c = new("\u{68}\u{65}\u{6c}\u{6c}\u{6f}")
810810local function run
811811(f,t)
812−local i = 1
812+local i = 0x1
813813local c = coroutine.wrap(f)
814814while true do
815815local res,stat = c()
816816if res then
817−assert(t[i] == undef)
817+assert((t[i] == undef))
818818;
819819return res,t
820820end
821−assert(stat == t[i])
822−i=i + 1
821+assert((stat == t[i]))
822+i=(i + 0x1)
823823end
824824end
825−assert(run(function ()
825+assert((run(function ()
826826if (a >= b) then
827827return "\u{3e}\u{3d}"
828828else
829829return "\u{3c}"
830830end
831−end,{"\u{6c}\u{65}","\u{73}\u{75}\u{62}"}) == "\u{3c}")
832−assert(run(function ()
831+end,{"\u{6c}\u{65}","\u{73}\u{75}\u{62}"}) == "\u{3c}"))
832+assert((run(function ()
833833if (a <= b) then
834834return "\u{3c}\u{3d}"
835835else
836836return "\u{3e}"
837837end
838−end,{"\u{6c}\u{65}","\u{73}\u{75}\u{62}"}) == "\u{3c}\u{3d}")
839−assert(run(function ()
838+end,{"\u{6c}\u{65}","\u{73}\u{75}\u{62}"}) == "\u{3c}\u{3d}"))
839+assert((run(function ()
840840if (a == b) then
841841return "\u{3d}\u{3d}"
842842else
843843return "\u{7e}\u{3d}"
844844end
845−end,{"\u{65}\u{71}"}) == "\u{7e}\u{3d}")
846−assert(run(function ()
847−return a & b + a
848−end,{"\u{61}\u{64}\u{64}","\u{62}\u{61}\u{6e}\u{64}"}) == 2)
849−assert(run(function ()
850−return 1 + a
851−end,{"\u{61}\u{64}\u{64}"}) == 11)
852−assert(run(function ()
853−return a - 25
854−end,{"\u{73}\u{75}\u{62}"}) == - 15)
855−assert(run(function ()
856−return 2 * a
857−end,{"\u{6d}\u{75}\u{6c}"}) == 20)
858−assert(run(function ()
859−return a ^ 2
860−end,{"\u{70}\u{6f}\u{77}"}) == 100)
861−assert(run(function ()
862−return a / 2
863−end,{"\u{64}\u{69}\u{76}"}) == 5)
864−assert(run(function ()
865−return a % 6
866−end,{"\u{6d}\u{6f}\u{64}"}) == 4)
867−assert(run(function ()
868−return a // 3
869−end,{"\u{69}\u{64}\u{69}\u{76}"}) == 3)
870−assert(run(function ()
871−return a + b
872−end,{"\u{61}\u{64}\u{64}"}) == 22)
873−assert(run(function ()
874−return a - b
875−end,{"\u{73}\u{75}\u{62}"}) == - 2)
876−assert(run(function ()
877−return a * b
878−end,{"\u{6d}\u{75}\u{6c}"}) == 120)
879−assert(run(function ()
880−return a ^ b
881−end,{"\u{70}\u{6f}\u{77}"}) == 10 ^ 12)
882−assert(run(function ()
883−return a / b
884−end,{"\u{64}\u{69}\u{76}"}) == 10 / 12)
885−assert(run(function ()
886−return a % b
887−end,{"\u{6d}\u{6f}\u{64}"}) == 10)
888−assert(run(function ()
889−return a // b
890−end,{"\u{69}\u{64}\u{69}\u{76}"}) == 0)
891−local a1000 = new(1000)
892−assert(run(function ()
893−return a1000 + 1000
894−end,{"\u{61}\u{64}\u{64}"}) == 2000)
895−assert(run(function ()
896−return a1000 - 25000
897−end,{"\u{73}\u{75}\u{62}"}) == - 24000)
898−assert(run(function ()
899−return 2000 * a
900−end,{"\u{6d}\u{75}\u{6c}"}) == 20000)
901−assert(run(function ()
902−return a1000 / 1000
903−end,{"\u{64}\u{69}\u{76}"}) == 1)
904−assert(run(function ()
905−return a1000 % 600
906−end,{"\u{6d}\u{6f}\u{64}"}) == 400)
907−assert(run(function ()
908−return a1000 // 500
909−end,{"\u{69}\u{64}\u{69}\u{76}"}) == 2)
910−assert(run(function ()
911−return a % b
912−end,{"\u{6d}\u{6f}\u{64}"}) == 10)
913−assert(run(function ()
914−return ~ a & b
915−end,{"\u{62}\u{6e}\u{6f}\u{74}","\u{62}\u{61}\u{6e}\u{64}"}) == ~ 10 & 12)
916−assert(run(function ()
917−return a | b
918−end,{"\u{62}\u{6f}\u{72}"}) == 10 | 12)
919−assert(run(function ()
920−return a ~ b
921−end,{"\u{62}\u{78}\u{6f}\u{72}"}) == 10 ~ 12)
922−assert(run(function ()
923−return a << b
924−end,{"\u{73}\u{68}\u{6c}"}) == 10 << 12)
925−assert(run(function ()
926−return a >> b
927−end,{"\u{73}\u{68}\u{72}"}) == 10 >> 12)
928−assert(run(function ()
929−return 10 & b
930−end,{"\u{62}\u{61}\u{6e}\u{64}"}) == 10 & 12)
931−assert(run(function ()
932−return a | 2
933−end,{"\u{62}\u{6f}\u{72}"}) == 10 | 2)
934−assert(run(function ()
935−return a ~ 2
936−end,{"\u{62}\u{78}\u{6f}\u{72}"}) == 10 ~ 2)
937−assert(run(function ()
938−return a >> 2
939−end,{"\u{73}\u{68}\u{72}"}) == 10 >> 2)
940−assert(run(function ()
941−return 1 >> a
942−end,{"\u{73}\u{68}\u{72}"}) == 1 >> 10)
943−assert(run(function ()
944−return a << 2
945−end,{"\u{73}\u{68}\u{6c}"}) == 10 << 2)
946−assert(run(function ()
947−return 1 << a
948−end,{"\u{73}\u{68}\u{6c}"}) == 1 << 10)
949−assert(run(function ()
950−return 2 ~ a
951−end,{"\u{62}\u{78}\u{6f}\u{72}"}) == 2 ~ 10)
952−assert(run(function ()
953−return a .. b
954−end,{"\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}"}) == "\u{31}\u{30}\u{31}\u{32}")
955−assert(run(function ()
956−return a .. b .. c .. a
957−end,{"\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}","\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}","\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}"}) == "\u{31}\u{30}\u{31}\u{32}\u{68}\u{65}\u{6c}\u{6c}\u{6f}\u{31}\u{30}")
958−assert(run(function ()
959−return "\u{61}" .. "\u{62}" .. a .. "\u{63}" .. c .. b .. "\u{78}"
960−end,{"\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}","\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}","\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}"}) == "\u{61}\u{62}\u{31}\u{30}\u{63}\u{68}\u{65}\u{6c}\u{6c}\u{6f}\u{31}\u{32}\u{78}")
845+end,{"\u{65}\u{71}"}) == "\u{7e}\u{3d}"))
846+assert((run(function ()
847+return (a & (b + a))
848+end,{"\u{61}\u{64}\u{64}","\u{62}\u{61}\u{6e}\u{64}"}) == 0x2))
849+assert((run(function ()
850+return (0x1 + a)
851+end,{"\u{61}\u{64}\u{64}"}) == 0xb))
852+assert((run(function ()
853+return (a - 0x19)
854+end,{"\u{73}\u{75}\u{62}"}) == (- 0xf)))
855+assert((run(function ()
856+return (0x2 * a)
857+end,{"\u{6d}\u{75}\u{6c}"}) == 0x14))
858+assert((run(function ()
859+return (a ^ 0x2)
860+end,{"\u{70}\u{6f}\u{77}"}) == 0x64))
861+assert((run(function ()
862+return (a / 0x2)
863+end,{"\u{64}\u{69}\u{76}"}) == 0x5))
864+assert((run(function ()
865+return (a % 0x6)
866+end,{"\u{6d}\u{6f}\u{64}"}) == 0x4))
867+assert((run(function ()
868+return (a // 0x3)
869+end,{"\u{69}\u{64}\u{69}\u{76}"}) == 0x3))
870+assert((run(function ()
871+return (a + b)
872+end,{"\u{61}\u{64}\u{64}"}) == 0x16))
873+assert((run(function ()
874+return (a - b)
875+end,{"\u{73}\u{75}\u{62}"}) == (- 0x2)))
876+assert((run(function ()
877+return (a * b)
878+end,{"\u{6d}\u{75}\u{6c}"}) == 0x78))
879+assert((run(function ()
880+return (a ^ b)
881+end,{"\u{70}\u{6f}\u{77}"}) == (0xa ^ 0xc)))
882+assert((run(function ()
883+return (a / b)
884+end,{"\u{64}\u{69}\u{76}"}) == (0xa / 0xc)))
885+assert((run(function ()
886+return (a % b)
887+end,{"\u{6d}\u{6f}\u{64}"}) == 0xa))
888+assert((run(function ()
889+return (a // b)
890+end,{"\u{69}\u{64}\u{69}\u{76}"}) == 0x0))
891+local a1000 = new(0x3e8)
892+assert((run(function ()
893+return (a1000 + 0x3e8)
894+end,{"\u{61}\u{64}\u{64}"}) == 0x7d0))
895+assert((run(function ()
896+return (a1000 - 0x61a8)
897+end,{"\u{73}\u{75}\u{62}"}) == (- 0x5dc0)))
898+assert((run(function ()
899+return (0x7d0 * a)
900+end,{"\u{6d}\u{75}\u{6c}"}) == 0x4e20))
901+assert((run(function ()
902+return (a1000 / 0x3e8)
903+end,{"\u{64}\u{69}\u{76}"}) == 0x1))
904+assert((run(function ()
905+return (a1000 % 0x258)
906+end,{"\u{6d}\u{6f}\u{64}"}) == 0x190))
907+assert((run(function ()
908+return (a1000 // 0x1f4)
909+end,{"\u{69}\u{64}\u{69}\u{76}"}) == 0x2))
910+assert((run(function ()
911+return (a % b)
912+end,{"\u{6d}\u{6f}\u{64}"}) == 0xa))
913+assert((run(function ()
914+return (~ (a & b))
915+end,{"\u{62}\u{6e}\u{6f}\u{74}","\u{62}\u{61}\u{6e}\u{64}"}) == (~ (0xa & 0xc))))
916+assert((run(function ()
917+return (a | b)
918+end,{"\u{62}\u{6f}\u{72}"}) == (0xa | 0xc)))
919+assert((run(function ()
920+return (a ~ b)
921+end,{"\u{62}\u{78}\u{6f}\u{72}"}) == (0xa ~ 0xc)))
922+assert((run(function ()
923+return (a << b)
924+end,{"\u{73}\u{68}\u{6c}"}) == (0xa << 0xc)))
925+assert((run(function ()
926+return (a >> b)
927+end,{"\u{73}\u{68}\u{72}"}) == (0xa >> 0xc)))
928+assert((run(function ()
929+return (0xa & b)
930+end,{"\u{62}\u{61}\u{6e}\u{64}"}) == (0xa & 0xc)))
931+assert((run(function ()
932+return (a | 0x2)
933+end,{"\u{62}\u{6f}\u{72}"}) == (0xa | 0x2)))
934+assert((run(function ()
935+return (a ~ 0x2)
936+end,{"\u{62}\u{78}\u{6f}\u{72}"}) == (0xa ~ 0x2)))
937+assert((run(function ()
938+return (a >> 0x2)
939+end,{"\u{73}\u{68}\u{72}"}) == (0xa >> 0x2)))
940+assert((run(function ()
941+return (0x1 >> a)
942+end,{"\u{73}\u{68}\u{72}"}) == (0x1 >> 0xa)))
943+assert((run(function ()
944+return (a << 0x2)
945+end,{"\u{73}\u{68}\u{6c}"}) == (0xa << 0x2)))
946+assert((run(function ()
947+return (0x1 << a)
948+end,{"\u{73}\u{68}\u{6c}"}) == (0x1 << 0xa)))
949+assert((run(function ()
950+return (0x2 ~ a)
951+end,{"\u{62}\u{78}\u{6f}\u{72}"}) == (0x2 ~ 0xa)))
952+assert((run(function ()
953+return (a .. b)
954+end,{"\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}"}) == "\u{31}\u{30}\u{31}\u{32}"))
955+assert((run(function ()
956+return (a .. (b .. (c .. a)))
957+end,{"\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}","\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}","\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}"}) == "\u{31}\u{30}\u{31}\u{32}\u{68}\u{65}\u{6c}\u{6c}\u{6f}\u{31}\u{30}"))
958+assert((run(function ()
959+return ("\u{61}" .. ("\u{62}" .. (a .. ("\u{63}" .. (c .. (b .. "\u{78}"))))))
960+end,{"\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}","\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}","\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}"}) == "\u{61}\u{62}\u{31}\u{30}\u{63}\u{68}\u{65}\u{6c}\u{6c}\u{6f}\u{31}\u{32}\u{78}"))
961961do
962962local mt1 = {["\u{5f}\u{5f}\u{6c}\u{65}"] = function (a,b)
963−coroutine.yield(10)
963+coroutine.yield(0xa)
964964return (val(a) <= val(b))
965965end,["\u{5f}\u{5f}\u{6c}\u{74}"] = function (a,b)
966−coroutine.yield(10)
967−return val(a) < val(b)
966+coroutine.yield(0xa)
967+return (val(a) < val(b))
968968end}
969969local mt2 = {["\u{5f}\u{5f}\u{6c}\u{74}"] = mt1.__lt,["\u{5f}\u{5f}\u{6c}\u{65}"] = mt1.__le}
970970local function run
@@ -973,61 +973,61 @@ local co = coroutine.wrap(f)
973973local res
974974repeat
975975res=co()
976−until res ~= 10
976+until (res ~= 0xa)
977977return res
978978end
979979local function test
980980()
981−local a1 = setmetatable({["\u{78}"] = 1},mt1)
982−local a2 = setmetatable({["\u{78}"] = 2},mt2)
983−assert(a1 < a2)
984−assert(a1 <= a2)
985−assert(1 < a2)
986−assert(1 <= a2)
987−assert(2 > a1)
988−assert(2 >= a2)
981+local a1 = setmetatable({["\u{78}"] = 0x1},mt1)
982+local a2 = setmetatable({["\u{78}"] = 0x2},mt2)
983+assert((a1 < a2))
984+assert((a1 <= a2))
985+assert((0x1 < a2))
986+assert((0x1 <= a2))
987+assert((0x2 > a1))
988+assert((0x2 >= a2))
989989return true
990990end
991991run(test)
992992end
993−assert(run(function ()
993+assert((run(function ()
994994a.BB=print
995995return a.BB
996−end,{"\u{6e}\u{69}\u{64}\u{78}","\u{69}\u{64}\u{78}"}) == print)
996+end,{"\u{6e}\u{69}\u{64}\u{78}","\u{69}\u{64}\u{78}"}) == print))
997997do
998998local _ENV = _ENV
999999f=function ()
1000−AAA=BBB + 1
1000+AAA=(BBB + 0x1)
10011001;
10021002return AAA
10031003end
10041004end
1005−local g = new(10)
1005+local g = new(0xa)
10061006;
1007−g.k.BBB=10
1007+g.k.BBB=0xa
10081008;
1009−debug.setupvalue(f,1,g)
1010−assert(run(f,{"\u{69}\u{64}\u{78}","\u{6e}\u{69}\u{64}\u{78}","\u{69}\u{64}\u{78}"}) == 11)
1011−assert(g.k.AAA == 11)
1009+debug.setupvalue(f,0x1,g)
1010+assert((run(f,{"\u{69}\u{64}\u{78}","\u{6e}\u{69}\u{64}\u{78}","\u{69}\u{64}\u{78}"}) == 0xb))
1011+assert((g.k.AAA == 0xb))
10121012print("\u{2b}")
10131013print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{73}\u{20}\u{69}\u{6e}\u{73}\u{69}\u{64}\u{65}\u{20}\u{27}\u{66}\u{6f}\u{72}\u{27}\u{20}\u{69}\u{74}\u{65}\u{72}\u{61}\u{74}\u{6f}\u{72}\u{73}")
10141014local f = function (s,i)
1015−if i % 2 == 0 then
1015+if ((i % 0x2) == 0x0) then
10161016coroutine.yield(nil,"\u{66}\u{6f}\u{72}")
10171017end
1018−if i < s then
1019−return i + 1
1018+if (i < s) then
1019+return (i + 0x1)
10201020end
10211021end
1022−assert(run(function ()
1023−local s = 0
1024−for i in f,4,0
1022+assert((run(function ()
1023+local s = 0x0
1024+for i in f,0x4,0x0
10251025do
1026−s=s + i
1026+s=(s + i)
10271027end
10281028return s
1029−end,{"\u{66}\u{6f}\u{72}","\u{66}\u{6f}\u{72}","\u{66}\u{6f}\u{72}"}) == 10)
1030−if T == nil then
1029+end,{"\u{66}\u{6f}\u{72}","\u{66}\u{6f}\u{72}","\u{66}\u{6f}\u{72}"}) == 0xa))
1030+if (T == nil) then
10311031(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{20}\u{41}\u{50}\u{49}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
10321032print("\u{4f}\u{4b}")
10331033;
@@ -1042,35 +1042,35 @@ return T.testC(table.unpack(x))
10421042end)
10431043end
10441044local a = {apico("\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{63}\u{6f}\u{64}\u{65}\u{a}\u{20}\u{20}\u{70}\u{63}\u{61}\u{6c}\u{6c}\u{6b}\u{20}\u{31}\u{20}\u{30}\u{20}\u{32}\u{3b}\u{a}\u{20}\u{20}\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{6f}\u{6d}\u{6d}\u{61}\u{6e}\u{64}\u{20}\u{28}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{72}\u{72}\u{69}\u{76}\u{65}\u{20}\u{68}\u{65}\u{72}\u{65}\u{29}\u{a}","\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}","\u{73}\u{74}\u{61}\u{63}\u{6b}\u{6d}\u{61}\u{72}\u{6b}",error)()}
1045−assert(# a == 4 and a[3] == "\u{73}\u{74}\u{61}\u{63}\u{6b}\u{6d}\u{61}\u{72}\u{6b}" and a[4] == "\u{65}\u{72}\u{72}\u{6f}\u{72}\u{63}\u{6f}\u{64}\u{65}" and _G.status == "\u{45}\u{52}\u{52}\u{52}\u{55}\u{4e}" and _G.ctx == 2)
1045+assert((# (((((a == 0x4) and (a[0x3] == "\u{73}\u{74}\u{61}\u{63}\u{6b}\u{6d}\u{61}\u{72}\u{6b}")) and (a[0x4] == "\u{65}\u{72}\u{72}\u{6f}\u{72}\u{63}\u{6f}\u{64}\u{65}")) and (_G.status == "\u{45}\u{52}\u{52}\u{52}\u{55}\u{4e}")) and (_G.ctx == 0x2))))
10461046local co = apico("\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{63}\u{61}\u{6c}\u{6c}\u{6b}\u{20}\u{31}\u{20}\u{32}\u{20}\u{33}\u{3b}\u{20}\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{6f}\u{6d}\u{6d}\u{61}\u{6e}\u{64}\u{3b}",coroutine.yield,"\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{73}\u{74}\u{61}\u{74}\u{75}\u{73}\u{3b}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{63}\u{74}\u{78}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{61}\u{3b}\u{20}\u{70}\u{63}\u{61}\u{6c}\u{6c}\u{6b}\u{20}\u{31}\u{20}\u{30}\u{20}\u{34}\u{3b}\u{20}\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{6f}\u{6d}\u{6d}\u{61}\u{6e}\u{64}","\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{73}\u{74}\u{61}\u{74}\u{75}\u{73}\u{3b}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{63}\u{74}\u{78}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}")
1047−assert(co() == 10)
1048−assert(co(20,30) == "\u{61}")
1047+assert((co() == 0xa))
1048+assert((co(0x14,0x1e) == "\u{61}"))
10491049a={co()}
1050−assert(# a == 10 and a[2] == coroutine.yield and a[5] == 20 and a[6] == 30 and a[7] == "\u{59}\u{49}\u{45}\u{4c}\u{44}" and a[8] == 3 and a[9] == "\u{59}\u{49}\u{45}\u{4c}\u{44}" and a[10] == 4)
1051−assert(not pcall(co))
1050+assert((# ((((((((a == 0xa) and (a[0x2] == coroutine.yield)) and (a[0x5] == 0x14)) and (a[0x6] == 0x1e)) and (a[0x7] == "\u{59}\u{49}\u{45}\u{4c}\u{44}")) and (a[0x8] == 0x3)) and (a[0x9] == "\u{59}\u{49}\u{45}\u{4c}\u{44}")) and (a[0xa] == 0x4))))
1051+assert((not pcall(co)))
10521052f=T.makeCfunc("\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{33}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{35}\u{3b}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{31}\u{3b}")
10531053co=coroutine.wrap(function ()
1054−assert(f() == 23)
1054+assert((f() == 0x17))
10551055;
1056−assert(f() == 23)
1056+assert((f() == 0x17))
10571057;
1058−return 10
1058+return 0xa
10591059end)
1060−assert(co(23,16) == 5)
1061−assert(co(23,16) == 5)
1062−assert(co(23,16) == 10)
1063−f=T.makeCfunc("\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{32}\u{a}\u{9}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{6b}\u{9}\u{31}\u{20}\u{55}\u{32}\u{a}\u{9}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{68}\u{65}\u{72}\u{65}\u{21}\u{a}","\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{a}\u{9}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{55}\u{33}\u{20}\u{20}\u{20}\u{23}\u{20}\u{61}\u{63}\u{63}\u{65}\u{73}\u{73}\u{69}\u{6e}\u{67}\u{20}\u{75}\u{70}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{73}\u{20}\u{69}\u{6e}\u{73}\u{69}\u{64}\u{65}\u{20}\u{61}\u{20}\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{55}\u{34}\u{a}\u{9}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}\u{a}",23,"\u{68}\u{75}\u{75}")
1060+assert((co(0x17,0x10) == 0x5))
1061+assert((co(0x17,0x10) == 0x5))
1062+assert((co(0x17,0x10) == 0xa))
1063+f=T.makeCfunc("\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{32}\u{a}\u{9}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{6b}\u{9}\u{31}\u{20}\u{55}\u{32}\u{a}\u{9}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{68}\u{65}\u{72}\u{65}\u{21}\u{a}","\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{a}\u{9}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{55}\u{33}\u{20}\u{20}\u{20}\u{23}\u{20}\u{61}\u{63}\u{63}\u{65}\u{73}\u{73}\u{69}\u{6e}\u{67}\u{20}\u{75}\u{70}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{73}\u{20}\u{69}\u{6e}\u{73}\u{69}\u{64}\u{65}\u{20}\u{61}\u{20}\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{55}\u{34}\u{a}\u{9}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}\u{a}",0x17,"\u{68}\u{75}\u{75}")
10641064x=coroutine.wrap(f)
1065−assert(x() == 102)
1066−eqtab({x()},{23,"\u{68}\u{75}\u{75}"})
1065+assert((x() == 0x66))
1066+eqtab({x()},{0x17,"\u{68}\u{75}\u{75}"})
10671067f=T.makeCfunc("\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{27}\u{61}\u{27}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{32}\u{3b}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{32}\u{3b}\u{20}")
10681068a,b,c,d=T.testC("\u{6e}\u{65}\u{77}\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{78}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{30}\u{20}\u{33}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6d}\u{65}\u{20}\u{33}\u{20}\u{30}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{61}\u{74}\u{75}\u{73}\u{3b}\u{20}\u{78}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{33}\u{20}\u{30}\u{20}\u{30}\u{3b}\u{20}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6d}\u{65}\u{20}\u{33}\u{20}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{61}\u{74}\u{75}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{34}\u{3b}\u{20}",f)
1069−assert(a == "\u{59}\u{49}\u{45}\u{4c}\u{44}" and b == "\u{61}" and c == 102 and d == "\u{4f}\u{4b}")
1070−local count = 3
1069+assert(((((a == "\u{59}\u{49}\u{45}\u{4c}\u{44}") and (b == "\u{61}")) and (c == 0x66)) and (d == "\u{4f}\u{4b}")))
1070+local count = 0x3
10711071f=T.makeCfunc("\u{20}\u{20}\u{72}\u{65}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{31}\u{3b}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{72}\u{65}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{61}\u{72}\u{67}\u{75}\u{6d}\u{65}\u{6e}\u{74}\u{a}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{55}\u{33}\u{3b}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{67}\u{65}\u{74}\u{20}\u{73}\u{65}\u{6c}\u{65}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{a}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{30}\u{20}\u{31}\u{3b}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{69}\u{74}\u{20}\u{20}\u{28}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{20}\u{69}\u{73}\u{20}\u{27}\u{66}\u{27}\u{20}\u{6f}\u{72}\u{20}\u{27}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{27}\u{29}\u{a}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{68}\u{65}\u{6c}\u{6c}\u{6f}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{73}\u{69}\u{6e}\u{67}\u{6c}\u{65}\u{20}\u{61}\u{72}\u{67}\u{75}\u{6d}\u{65}\u{6e}\u{74}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{73}\u{65}\u{6c}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{a}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{75}\u{70}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}\u{32}\u{3b}\u{20}\u{20}\u{20}\u{23}\u{20}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}\u{6f}\u{66}\u{20}\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{70}\u{72}\u{6f}\u{67}\u{72}\u{61}\u{6d}\u{a}\u{20}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{6b}\u{20}\u{31}\u{20}\u{2d}\u{31}\u{20}\u{2e}\u{3b}\u{9}\u{9}\u{23}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{73}\u{65}\u{6c}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{a}\u{20}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{9}\u{9}\u{23}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{6e}\u{65}\u{76}\u{65}\u{72}\u{20}\u{61}\u{72}\u{72}\u{69}\u{76}\u{65}\u{20}\u{68}\u{65}\u{72}\u{65}\u{a}","\u{20}\u{20}\u{23}\u{20}\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{70}\u{72}\u{6f}\u{67}\u{72}\u{61}\u{6d}\u{a}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{33}\u{34}\u{9}\u{23}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{a}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{61}\u{6c}\u{6c}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}\u{a}",function ()
1072−count=count - 1
1073−if count == 0 then
1072+count=(count - 0x1)
1073+if (count == 0x0) then
10741074return coroutine.yield
10751075else
10761076return f
@@ -1079,9 +1079,9 @@ end)
10791079co=coroutine.wrap(function ()
10801080return f(nil)
10811081end)
1082−assert(co() == "\u{68}\u{65}\u{6c}\u{6c}\u{6f}")
1082+assert((co() == "\u{68}\u{65}\u{6c}\u{6c}\u{6f}"))
10831083a={co()}
1084−assert(# a == 3 and a[1] == a[2] and a[2] == a[3] and a[3] == 34)
1084+assert((# ((((a == 0x3) and (a[0x1] == a[0x2])) and (a[0x2] == a[0x3])) and (a[0x3] == 0x22))))
10851085local y
10861086co=coroutine.wrap(function (...)
10871087return T.testC("\u{20}\u{23}\u{20}\u{69}\u{6e}\u{69}\u{74}\u{69}\u{61}\u{6c}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{6b}\u{20}\u{31}\u{20}\u{32}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{68}\u{65}\u{72}\u{65}\u{21}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}","\u{20}\u{20}\u{23}\u{20}\u{31}\u{73}\u{74}\u{20}\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{6b}\u{20}\u{30}\u{20}\u{33}\u{20}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{68}\u{65}\u{72}\u{65}\u{21}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}","\u{20}\u{20}\u{23}\u{20}\u{32}\u{6e}\u{64}\u{20}\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{6b}\u{20}\u{30}\u{20}\u{34}\u{20}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{68}\u{65}\u{72}\u{65}\u{21}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}","\u{20}\u{20}\u{23}\u{20}\u{33}\u{74}\u{68}\u{20}\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{36}\u{20}\u{20}\u{20}\u{23}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{77}\u{68}\u{69}\u{63}\u{68}\u{20}\u{69}\u{73}\u{20}\u{6c}\u{61}\u{73}\u{74}\u{20}\u{61}\u{72}\u{67}\u{2e}\u{20}\u{74}\u{6f}\u{20}\u{27}\u{74}\u{65}\u{73}\u{74}\u{43}\u{27}\u{20}\u{68}\u{65}\u{72}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{32}\u{30}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{32}\u{20}\u{30}\u{20}\u{30}\u{20}\u{20}\u{20}\u{23}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{74}\u{68}\u{72}\u{6f}\u{77}\u{20}\u{61}\u{6e}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{74}\u{6f}\u{20}\u{6e}\u{65}\u{78}\u{74}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{6f}\u{70}\u{20}\u{31}\u{9}\u{9}\u{23}\u{20}\u{72}\u{65}\u{6d}\u{6f}\u{76}\u{65}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{6d}\u{65}\u{73}\u{73}\u{61}\u{67}\u{65}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{36}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{73}\u{74}\u{61}\u{74}\u{75}\u{73}\u{3b}\u{20}\u{67}\u{65}\u{74}\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{63}\u{74}\u{78}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{63}\u{61}\u{6c}\u{6c}\u{6b}\u{20}\u{32}\u{20}\u{32}\u{20}\u{35}\u{20}\u{20}\u{23}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{74}\u{68}\u{72}\u{6f}\u{77}\u{20}\u{61}\u{6e}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{6a}\u{75}\u{6d}\u{70}\u{20}\u{74}\u{6f}\u{20}\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{68}\u{65}\u{72}\u{65}\u{21}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}","\u{20}\u{20}\u{23}\u{20}\u{34}\u{74}\u{68}\u{20}\u{28}\u{61}\u{6e}\u{64}\u{20}\u{6c}\u{61}\u{73}\u{74}\u{29}\u{20}\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}",function (a,b)
@@ -1092,22 +1092,22 @@ y=b
10921092error("\u{65}\u{72}\u{72}\u{6d}\u{73}\u{67}")
10931093end,...)
10941094end)
1095−local a = {co(3,4,6)}
1096−assert(a[1] == 6 and a[2] == undef)
1095+local a = {co(0x3,0x4,0x6)}
1096+assert(((a[0x1] == 0x6) and (a[0x2] == undef)))
10971097a={co()}
10981098;
1099−assert(a[1] == undef and _G.status == "\u{59}\u{49}\u{45}\u{4c}\u{44}" and _G.ctx == 2)
1099+assert((((a[0x1] == undef) and (_G.status == "\u{59}\u{49}\u{45}\u{4c}\u{44}")) and (_G.ctx == 0x2)))
11001100a={co()}
11011101;
1102−assert(a[1] == undef and _G.status == "\u{59}\u{49}\u{45}\u{4c}\u{44}" and _G.ctx == 3)
1103−a={co(7,8)}
1102+assert((((a[0x1] == undef) and (_G.status == "\u{59}\u{49}\u{45}\u{4c}\u{44}")) and (_G.ctx == 0x3)))
1103+a={co(0x7,0x8)}
11041104;
1105−assert(type(a[1]) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}" and type(a[2]) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}" and type(a[3]) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}" and type(a[4]) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}" and type(a[5]) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}" and type(a[6]) == "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}")
1106−assert(a[7] == 3 and a[8] == 4)
1107−assert(a[9] == 7 and a[10] == 8)
1108−assert(a[11]:find("\u{65}\u{72}\u{72}\u{6d}\u{73}\u{67}") and # a == 11)
1109−assert(x == "\u{59}\u{49}\u{45}\u{4c}\u{44}" and y == 4)
1110−assert(not pcall(co))
1105+assert(((((((type(a[0x1]) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}") and (type(a[0x2]) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(a[0x3]) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(a[0x4]) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(a[0x5]) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(a[0x6]) == "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}")))
1106+assert(((a[0x7] == 0x3) and (a[0x8] == 0x4)))
1107+assert(((a[0x9] == 0x7) and (a[0xa] == 0x8)))
1108+assert((a[0xb]:find("\u{65}\u{72}\u{72}\u{6d}\u{73}\u{67}") and (# (a == 0xb))))
1109+assert(((x == "\u{59}\u{49}\u{45}\u{4c}\u{44}") and (y == 0x4)))
1110+assert((not pcall(co)))
11111111_G.ctx=nil
11121112_G.status=nil
11131113local co = coroutine.wrap(function ()
@@ -1115,5 +1115,5 @@ local a = {pcall(pcall,pcall,pcall,pcall,pcall,pcall,pcall,error,"\u{68}\u{69}")
11151115return pcall(assert,table.unpack(a))
11161116end)
11171117local a = {co()}
1118−assert(a[10] == "\u{68}\u{69}")
1118+assert((a[0xa] == "\u{68}\u{69}"))
11191119print("\u{4f}\u{4b}")
zod/luau/res/lua/cycled/cstack.lua → desk/res/lua/cycled/cstack.luarenamed+36−36
@@ -3,20 +3,20 @@ print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{61}\u{63}\
33local function checkerror
44(msg,f, ...)
55local s,err = pcall(f,...)
6−assert(not s and string.find(err,msg))
6+assert((not (s and string.find(err,msg))))
77end
88do
99print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}\u{20}\u{69}\u{6e}\u{20}\u{6d}\u{65}\u{73}\u{73}\u{61}\u{67}\u{65}\u{20}\u{68}\u{61}\u{6e}\u{64}\u{6c}\u{69}\u{6e}\u{67}")
10−local count = 0
10+local count = 0x0
1111local function loop
1212(x,y,z)
13−count=count + 1
14−return 1 + loop(x,y,z)
13+count=(count + 0x1)
14+return (0x1 + loop(x,y,z))
1515end
1616tracegc.stop()
1717local res,msg = xpcall(loop,loop)
1818tracegc.start()
19−assert(msg == "\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{69}\u{6e}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{68}\u{61}\u{6e}\u{64}\u{6c}\u{69}\u{6e}\u{67}")
19+assert((msg == "\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{69}\u{6e}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{68}\u{61}\u{6e}\u{64}\u{6c}\u{69}\u{6e}\u{67}"))
2020print("\u{66}\u{69}\u{6e}\u{61}\u{6c}\u{20}\u{63}\u{6f}\u{75}\u{6e}\u{74}\u{3a}\u{20}",count)
2121end
2222do
@@ -27,25 +27,25 @@ local s = string.rep("\u{61}",size)
2727local p = string.rep("\u{2e}\u{3f}",size)
2828return string.match(s,p)
2929end
30−local m = f(80)
31−assert(# m == 80)
32−checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{63}\u{6f}\u{6d}\u{70}\u{6c}\u{65}\u{78}",f,2000)
30+local m = f(0x50)
31+assert((# (m == 0x50)))
32+checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{63}\u{6f}\u{6d}\u{70}\u{6c}\u{65}\u{78}",f,0x7d0)
3333end
3434do
3535print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{2d}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}\u{20}\u{69}\u{6e}\u{20}\u{72}\u{65}\u{63}\u{75}\u{72}\u{73}\u{69}\u{76}\u{65}\u{20}\u{27}\u{67}\u{73}\u{75}\u{62}\u{27}")
36−local count = 0
36+local count = 0x0
3737local function foo
3838()
39−count=count + 1
39+count=(count + 0x1)
4040string.gsub("\u{61}","\u{2e}",foo)
4141end
4242checkerror("\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}",foo)
4343print("\u{66}\u{69}\u{6e}\u{61}\u{6c}\u{20}\u{63}\u{6f}\u{75}\u{6e}\u{74}\u{3a}\u{20}",count)
4444print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{2d}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}\u{20}\u{69}\u{6e}\u{20}\u{72}\u{65}\u{63}\u{75}\u{72}\u{73}\u{69}\u{76}\u{65}\u{20}\u{27}\u{67}\u{73}\u{75}\u{62}\u{27}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{6d}\u{65}\u{74}\u{61}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{73}")
45−local count = 0
45+local count = 0x0
4646local t = setmetatable({},{["\u{5f}\u{5f}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = foo})
4747foo=function ()
48−count=count + 1
48+count=(count + 0x1)
4949string.gsub("\u{61}","\u{2e}",t)
5050end
5151checkerror("\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}",foo)
@@ -53,15 +53,15 @@ print("\u{66}\u{69}\u{6e}\u{61}\u{6c}\u{20}\u{63}\u{6f}\u{75}\u{6e}\u{74}\u{3a}\
5353end
5454do
5555print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{6c}\u{69}\u{6d}\u{69}\u{74}\u{73}\u{20}\u{69}\u{6e}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{73}\u{20}\u{69}\u{6e}\u{73}\u{69}\u{64}\u{65}\u{20}\u{64}\u{65}\u{65}\u{70}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{73}")
56−local count = 0
57−local lim = 1000
56+local count = 0x0
57+local lim = 0x3e8
5858local function stack
5959(n)
60−if n > 0 then
61−return stack(n - 1) + 1
60+if (n > 0x0) then
61+return (stack((n - 0x1)) + 0x1)
6262else
6363coroutine.wrap(function ()
64−count=count + 1
64+count=(count + 0x1)
6565stack(lim)
6666end)()
6767end
@@ -69,19 +69,19 @@ end
6969local st,msg = xpcall(stack,function ()
7070return "\u{6f}\u{6b}"
7171end,lim)
72−assert(not st and msg == "\u{6f}\u{6b}")
72+assert((not (st and (msg == "\u{6f}\u{6b}"))))
7373print("\u{66}\u{69}\u{6e}\u{61}\u{6c}\u{20}\u{63}\u{6f}\u{75}\u{6e}\u{74}\u{3a}\u{20}",count)
7474end
7575do
76−local count = 0
76+local count = 0x0
7777print("\u{63}\u{68}\u{61}\u{69}\u{6e}\u{20}\u{6f}\u{66}\u{20}\u{27}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{2e}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{27}")
7878local coro = false
79−for i = 1, 1000
79+for i = 0x1, 0x3e8
8080do
8181local previous = coro
8282coro=coroutine.create(function ()
8383local cc <close> = setmetatable({},{["\u{5f}\u{5f}\u{63}\u{6c}\u{6f}\u{73}\u{65}"] = function ()
84−count=count + 1
84+count=(count + 0x1)
8585if previous then
8686assert(coroutine.close(previous))
8787end
@@ -91,33 +91,33 @@ end)
9191assert(coroutine.resume(coro))
9292end
9393local st,msg = coroutine.close(coro)
94−assert(not st and string.find(msg,"\u{43}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}"))
94+assert((not (st and string.find(msg,"\u{43}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}"))))
9595print("\u{66}\u{69}\u{6e}\u{61}\u{6c}\u{20}\u{63}\u{6f}\u{75}\u{6e}\u{74}\u{3a}\u{20}",count)
9696end
9797do
9898print("\u{6e}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{6f}\u{66}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6d}\u{69}\u{6e}\u{67}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{65}\u{64}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{73}")
99−local count = 0
99+local count = 0x0
100100local function body
101101()
102102coroutine.yield()
103103local f = coroutine.wrap(body)
104104f()
105105;
106−count=count + 1
106+count=(count + 0x1)
107107f()
108108end
109109local f = coroutine.wrap(body)
110110f()
111−assert(not pcall(f))
111+assert((not pcall(f)))
112112print("\u{66}\u{69}\u{6e}\u{61}\u{6c}\u{20}\u{63}\u{6f}\u{75}\u{6e}\u{74}\u{3a}\u{20}",count)
113113end
114114do
115115print("\u{6e}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{73}\u{20}\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}\u{20}\u{61}\u{66}\u{74}\u{65}\u{72}\u{20}\u{72}\u{65}\u{63}\u{6f}\u{76}\u{65}\u{72}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{73}")
116−local count = 0
116+local count = 0x0
117117local function foo
118118()
119−count=count + 1
120−pcall(1)
119+count=(count + 0x1)
120+pcall(0x1)
121121coroutine.wrap(foo)()
122122end
123123checkerror("\u{43}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}",foo)
@@ -125,26 +125,26 @@ print("\u{66}\u{69}\u{6e}\u{61}\u{6c}\u{20}\u{63}\u{6f}\u{75}\u{6e}\u{74}\u{3a}\
125125end
126126if T then
127127print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{72}\u{65}\u{63}\u{6f}\u{76}\u{65}\u{72}\u{79}")
128−local N = 0
129−local LIM = - 1
128+local N = 0x0
129+local LIM = (- 0x1)
130130local stack1
131131local dummy
132132local function err
133133(msg)
134134assert(string.find(msg,"\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}"))
135135local _,stacknow = T.stacklevel()
136−assert(stacknow == stack1 + 200)
136+assert((stacknow == (stack1 + 0xc8)))
137137end
138138local function f
139139()
140140dummy,stack1=T.stacklevel()
141−if N == LIM then
141+if (N == LIM) then
142142xpcall(f,err)
143143local _,stacknow = T.stacklevel()
144−assert(stacknow == stack1)
144+assert((stacknow == stack1))
145145return
146146end
147−N=N + 1
147+N=(N + 0x1)
148148f()
149149end
150150local topB,sizeB
@@ -154,10 +154,10 @@ tracegc.stop()
154154xpcall(f,err)
155155tracegc.start()
156156topA,sizeA=T.stacklevel()
157−assert(topA == topB and sizeA < sizeB * 2)
157+assert(((topA == topB) and (sizeA < (sizeB * 0x2))))
158158print(string.format("\u{6d}\u{61}\u{78}\u{69}\u{6d}\u{75}\u{6d}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{73}\u{69}\u{7a}\u{65}\u{3a}\u{20}\u{25}\u{64}",stack1))
159159LIM=N
160−N=0
160+N=0x0
161161tracegc.stop()
162162f()
163163tracegc.start()
zod/luau/res/lua/cycled/db.lua → desk/res/lua/cycled/db.luarenamed+379−379
@@ -5,47 +5,47 @@ return assert(load(s))()
55end
66print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{64}\u{65}\u{62}\u{75}\u{67}\u{20}\u{6c}\u{69}\u{62}\u{72}\u{61}\u{72}\u{79}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{64}\u{65}\u{62}\u{75}\u{67}\u{20}\u{69}\u{6e}\u{66}\u{6f}\u{72}\u{6d}\u{61}\u{74}\u{69}\u{6f}\u{6e}")
77do
8−local a = 1
8+local a = 0x1
99end
10−assert(not debug.gethook())
11−local testline = 19
10+assert((not debug.gethook()))
11+local testline = 0x13
1212local function test
1313(s,l,p)
1414collectgarbage()
1515local function f
1616(event,line)
17−assert(event == "\u{6c}\u{69}\u{6e}\u{65}")
18−local l = table.remove(l,1)
17+assert((event == "\u{6c}\u{69}\u{6e}\u{65}"))
18+local l = table.remove(l,0x1)
1919if p then
2020print(l,line)
2121end
22−assert(l == line,"\u{77}\u{72}\u{6f}\u{6e}\u{67}\u{20}\u{74}\u{72}\u{61}\u{63}\u{65}\u{21}\u{21}")
22+assert((l == line),"\u{77}\u{72}\u{6f}\u{6e}\u{67}\u{20}\u{74}\u{72}\u{61}\u{63}\u{65}\u{21}\u{21}")
2323end
2424debug.sethook(f,"\u{6c}")
2525;
2626load(s)()
2727;
2828debug.sethook()
29−assert(# l == 0)
29+assert((# (l == 0x0)))
3030end
3131do
32−assert(not pcall(debug.getinfo,print,"\u{58}"))
33−assert(not pcall(debug.getinfo,0,"\u{3e}"))
34−assert(not debug.getinfo(1000))
35−assert(not debug.getinfo(- 1))
32+assert((not pcall(debug.getinfo,print,"\u{58}")))
33+assert((not pcall(debug.getinfo,0x0,"\u{3e}")))
34+assert((not debug.getinfo(0x3e8)))
35+assert((not debug.getinfo((- 0x1))))
3636local a = debug.getinfo(print)
37−assert(a.what == "\u{43}" and a.short_src == "\u{5b}\u{43}\u{5d}")
37+assert(((a.what == "\u{43}") and (a.short_src == "\u{5b}\u{43}\u{5d}")))
3838a=debug.getinfo(print,"\u{4c}")
39−assert(a.activelines == nil)
39+assert((a.activelines == nil))
4040local b = debug.getinfo(test,"\u{53}\u{66}\u{4c}")
41−assert(b.name == nil and b.what == "\u{4c}\u{75}\u{61}" and b.linedefined == testline and b.lastlinedefined == b.linedefined + 10 and b.func == test and not string.find(b.short_src,"\u{25}\u{5b}"))
42−assert(b.activelines[b.linedefined + 1] and b.activelines[b.lastlinedefined])
43−assert(not b.activelines[b.linedefined] and not b.activelines[b.lastlinedefined + 1])
41+assert(((((((b.name == nil) and (b.what == "\u{4c}\u{75}\u{61}")) and (b.linedefined == testline)) and (b.lastlinedefined == (b.linedefined + 0xa))) and (b.func == test)) and (not string.find(b.short_src,"\u{25}\u{5b}"))))
42+assert((b.activelines[(b.linedefined + 0x1)] and b.activelines[b.lastlinedefined]))
43+assert((not (b.activelines[b.linedefined] and (not b.activelines[(b.lastlinedefined + 0x1)]))))
4444end
4545do
4646local func = load(string.dump(load("\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{31}\u{30}\u{29}"),true))
4747local actl = debug.getinfo(func,"\u{4c}").activelines
48−assert(# actl == 0)
48+assert((# (actl == 0x0)))
4949end
5050local a = "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{20}\u{28}\u{29}\u{20}\u{65}\u{6e}\u{64}"
5151local function dostring
@@ -53,117 +53,117 @@ local function dostring
5353return load(s,x)()
5454end
5555dostring(a)
56−assert(debug.getinfo(f).short_src == string.format("\u{5b}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{22}\u{25}\u{73}\u{22}\u{5d}",a))
57−dostring(a .. string.format("\u{3b}\u{20}\u{25}\u{73}\u{a}\u{3d}\u{31}",string.rep("\u{70}",400)))
56+assert((debug.getinfo(f).short_src == string.format("\u{5b}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{22}\u{25}\u{73}\u{22}\u{5d}",a)))
57+dostring((a .. string.format("\u{3b}\u{20}\u{25}\u{73}\u{a}\u{3d}\u{31}",string.rep("\u{70}",0x190))))
5858assert(string.find(debug.getinfo(f).short_src,"\u{5e}\u{25}\u{5b}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{5b}\u{5e}\u{a}\u{5d}\u{2a}\u{25}\u{2e}\u{25}\u{2e}\u{25}\u{2e}\u{22}\u{25}\u{5d}\u{24}"))
59−dostring(a .. string.format("\u{3b}\u{20}\u{25}\u{73}\u{3d}\u{31}",string.rep("\u{70}",400)))
59+dostring((a .. string.format("\u{3b}\u{20}\u{25}\u{73}\u{3d}\u{31}",string.rep("\u{70}",0x190))))
6060assert(string.find(debug.getinfo(f).short_src,"\u{5e}\u{25}\u{5b}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{5b}\u{5e}\u{a}\u{5d}\u{2a}\u{25}\u{2e}\u{25}\u{2e}\u{25}\u{2e}\u{22}\u{25}\u{5d}\u{24}"))
61−dostring("\u{a}" .. a)
62−assert(debug.getinfo(f).short_src == "\u{5b}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{22}\u{2e}\u{2e}\u{2e}\u{22}\u{5d}")
61+dostring(("\u{a}" .. a))
62+assert((debug.getinfo(f).short_src == "\u{5b}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{22}\u{2e}\u{2e}\u{2e}\u{22}\u{5d}"))
6363dostring(a,"")
64−assert(debug.getinfo(f).short_src == "\u{5b}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{22}\u{22}\u{5d}")
64+assert((debug.getinfo(f).short_src == "\u{5b}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{22}\u{22}\u{5d}"))
6565dostring(a,"\u{40}\u{78}\u{75}\u{78}\u{75}")
66−assert(debug.getinfo(f).short_src == "\u{78}\u{75}\u{78}\u{75}")
67−dostring(a,"\u{40}" .. string.rep("\u{70}",1000) .. "\u{74}")
66+assert((debug.getinfo(f).short_src == "\u{78}\u{75}\u{78}\u{75}"))
67+dostring(a,("\u{40}" .. (string.rep("\u{70}",0x3e8) .. "\u{74}")))
6868assert(string.find(debug.getinfo(f).short_src,"\u{5e}\u{25}\u{2e}\u{25}\u{2e}\u{25}\u{2e}\u{70}\u{2a}\u{74}\u{24}"))
6969dostring(a,"\u{3d}\u{78}\u{75}\u{78}\u{75}")
70−assert(debug.getinfo(f).short_src == "\u{78}\u{75}\u{78}\u{75}")
71−dostring(a,string.format("\u{3d}\u{25}\u{73}",string.rep("\u{78}",500)))
70+assert((debug.getinfo(f).short_src == "\u{78}\u{75}\u{78}\u{75}"))
71+dostring(a,string.format("\u{3d}\u{25}\u{73}",string.rep("\u{78}",0x1f4)))
7272assert(string.find(debug.getinfo(f).short_src,"\u{5e}\u{78}\u{2a}\u{24}"))
7373dostring(a,"\u{3d}")
74−assert(debug.getinfo(f).short_src == "")
74+assert((debug.getinfo(f).short_src == ""))
7575_G.a=nil
7676;
7777_G.f=nil
7878;
79−_G[string.rep("\u{70}",400)]=nil
79+_G[string.rep("\u{70}",0x190)]=nil
8080repeat
8181local g = {["\u{78}"] = function ()
82−local a = debug.getinfo(2)
83−assert(a.name == "\u{66}" and a.namewhat == "\u{6c}\u{6f}\u{63}\u{61}\u{6c}")
84−a=debug.getinfo(1)
85−assert(a.name == "\u{78}" and a.namewhat == "\u{66}\u{69}\u{65}\u{6c}\u{64}")
82+local a = debug.getinfo(0x2)
83+assert(((a.name == "\u{66}") and (a.namewhat == "\u{6c}\u{6f}\u{63}\u{61}\u{6c}")))
84+a=debug.getinfo(0x1)
85+assert(((a.name == "\u{78}") and (a.namewhat == "\u{66}\u{69}\u{65}\u{6c}\u{64}")))
8686return "\u{78}\u{69}\u{78}\u{69}"
8787end}
8888local f = function ()
89−return 1 + 1 and (not 1 or g.x())
89+return ((0x1 + 0x1) and (not (0x1 or g.x())))
9090end
91−assert(f() == "\u{78}\u{69}\u{78}\u{69}")
91+assert((f() == "\u{78}\u{69}\u{78}\u{69}"))
9292g=debug.getinfo(f)
93−assert(g.what == "\u{4c}\u{75}\u{61}" and g.func == f and g.namewhat == "" and not g.name)
93+assert(((((g.what == "\u{4c}\u{75}\u{61}") and (g.func == f)) and (g.namewhat == "")) and (not g.name)))
9494function f(x,name)
95−name=name or "\u{66}"
96−local a = debug.getinfo(1)
97−assert(a.name == name and a.namewhat == "\u{6c}\u{6f}\u{63}\u{61}\u{6c}")
95+name=(name or "\u{66}")
96+local a = debug.getinfo(0x1)
97+assert(((a.name == name) and (a.namewhat == "\u{6c}\u{6f}\u{63}\u{61}\u{6c}")))
9898return x
9999end
100−if 3 > 4 then
100+if (0x3 > 0x4) then
101101break
102102end
103103;
104104f()
105−if 3 < 4 then
106−a=1
105+if (0x3 < 0x4) then
106+a=0x1
107107else
108108break
109109end
110110;
111111f()
112−while 1 do
113−local x = 10
112+while 0x1 do
113+local x = 0xa
114114;
115115break
116116end
117117;
118118f()
119−local b = 1
120−if 3 > 4 then
121−return math.sin(1)
119+local b = 0x1
120+if (0x3 > 0x4) then
121+return math.sin(0x1)
122122end
123123;
124124f()
125−a=3 < 4
125+a=(0x3 < 0x4)
126126;
127127f()
128−a=3 < 4 or 1
128+a=((0x3 < 0x4) or 0x1)
129129;
130130f()
131131repeat
132−local x = 20
132+local x = 0x14
133133;
134−if 4 > 3 then
134+if (0x4 > 0x3) then
135135f()
136136else
137137break
138138end
139139;
140140f()
141−until 1
141+until 0x1
142142g={}
143−f(g).x=f(2) and f(10) + f(9)
144−assert(g.x == f(19))
143+f(g).x=(f(0x2) and (f(0xa) + f(0x9)))
144+assert((g.x == f(0x13)))
145145function g(x)
146−if not x then
147−return 3
146+if (not x) then
147+return 0x3
148148end
149−return (x("\u{61}","\u{78}"))
149+return x("\u{61}","\u{78}")
150150end
151−assert(g(f) == "\u{61}")
152−until 1
153−test("\u{69}\u{66}\u{a}\u{6d}\u{61}\u{74}\u{68}\u{2e}\u{73}\u{69}\u{6e}\u{28}\u{31}\u{29}\u{a}\u{74}\u{68}\u{65}\u{6e}\u{a}\u{20}\u{20}\u{61}\u{3d}\u{31}\u{a}\u{65}\u{6c}\u{73}\u{65}\u{a}\u{20}\u{20}\u{61}\u{3d}\u{32}\u{a}\u{65}\u{6e}\u{64}\u{a}",{2,3,4,7})
154−test("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{6f}\u{6f}\u{28}\u{29}\u{a}\u{65}\u{6e}\u{64}\u{a}\u{66}\u{6f}\u{6f}\u{28}\u{29}\u{a}\u{41}\u{20}\u{3d}\u{20}\u{31}\u{a}\u{41}\u{20}\u{3d}\u{20}\u{32}\u{a}\u{41}\u{20}\u{3d}\u{20}\u{33}\u{a}",{2,3,2,4,5,6})
151+assert((g(f) == "\u{61}"))
152+until 0x1
153+test("\u{69}\u{66}\u{a}\u{6d}\u{61}\u{74}\u{68}\u{2e}\u{73}\u{69}\u{6e}\u{28}\u{31}\u{29}\u{a}\u{74}\u{68}\u{65}\u{6e}\u{a}\u{20}\u{20}\u{61}\u{3d}\u{31}\u{a}\u{65}\u{6c}\u{73}\u{65}\u{a}\u{20}\u{20}\u{61}\u{3d}\u{32}\u{a}\u{65}\u{6e}\u{64}\u{a}",{0x2,0x3,0x4,0x7})
154+test("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{6f}\u{6f}\u{28}\u{29}\u{a}\u{65}\u{6e}\u{64}\u{a}\u{66}\u{6f}\u{6f}\u{28}\u{29}\u{a}\u{41}\u{20}\u{3d}\u{20}\u{31}\u{a}\u{41}\u{20}\u{3d}\u{20}\u{32}\u{a}\u{41}\u{20}\u{3d}\u{20}\u{33}\u{a}",{0x2,0x3,0x2,0x4,0x5,0x6})
155155_G.A=nil
156−test("\u{2d}\u{2d}\u{a}\u{69}\u{66}\u{20}\u{6e}\u{69}\u{6c}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{a}\u{20}\u{20}\u{61}\u{3d}\u{31}\u{a}\u{65}\u{6c}\u{73}\u{65}\u{a}\u{20}\u{20}\u{61}\u{3d}\u{32}\u{a}\u{65}\u{6e}\u{64}\u{a}",{2,5,6})
157−test("\u{61}\u{3d}\u{31}\u{a}\u{72}\u{65}\u{70}\u{65}\u{61}\u{74}\u{a}\u{20}\u{20}\u{61}\u{3d}\u{61}\u{2b}\u{31}\u{a}\u{75}\u{6e}\u{74}\u{69}\u{6c}\u{20}\u{61}\u{3d}\u{3d}\u{33}\u{a}",{1,3,4,3,4})
158−test("\u{20}\u{64}\u{6f}\u{a}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{a}\u{65}\u{6e}\u{64}\u{a}",{2})
159−test("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{a}\u{61}\u{3d}\u{31}\u{a}\u{77}\u{68}\u{69}\u{6c}\u{65}\u{20}\u{61}\u{3c}\u{3d}\u{33}\u{20}\u{64}\u{6f}\u{a}\u{20}\u{20}\u{61}\u{3d}\u{61}\u{2b}\u{31}\u{a}\u{65}\u{6e}\u{64}\u{a}",{1,2,3,4,3,4,3,4,3,5})
160−test("\u{77}\u{68}\u{69}\u{6c}\u{65}\u{20}\u{6d}\u{61}\u{74}\u{68}\u{2e}\u{73}\u{69}\u{6e}\u{28}\u{31}\u{29}\u{20}\u{64}\u{6f}\u{a}\u{20}\u{20}\u{69}\u{66}\u{20}\u{6d}\u{61}\u{74}\u{68}\u{2e}\u{73}\u{69}\u{6e}\u{28}\u{31}\u{29}\u{a}\u{20}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{20}\u{62}\u{72}\u{65}\u{61}\u{6b}\u{a}\u{20}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{65}\u{6e}\u{64}\u{a}\u{61}\u{3d}\u{31}",{1,2,3,6})
161−test("\u{66}\u{6f}\u{72}\u{20}\u{69}\u{3d}\u{31}\u{2c}\u{33}\u{20}\u{64}\u{6f}\u{a}\u{20}\u{20}\u{61}\u{3d}\u{69}\u{a}\u{65}\u{6e}\u{64}\u{a}",{1,2,1,2,1,2,1,3})
162−test("\u{66}\u{6f}\u{72}\u{20}\u{69}\u{2c}\u{76}\u{20}\u{69}\u{6e}\u{20}\u{70}\u{61}\u{69}\u{72}\u{73}\u{7b}\u{27}\u{61}\u{27}\u{2c}\u{27}\u{62}\u{27}\u{7d}\u{20}\u{64}\u{6f}\u{a}\u{20}\u{20}\u{61}\u{3d}\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{28}\u{69}\u{29}\u{20}\u{2e}\u{2e}\u{20}\u{76}\u{a}\u{65}\u{6e}\u{64}\u{a}",{1,2,1,2,1,3})
163−test("\u{66}\u{6f}\u{72}\u{20}\u{69}\u{3d}\u{31}\u{2c}\u{34}\u{20}\u{64}\u{6f}\u{20}\u{61}\u{3d}\u{31}\u{20}\u{65}\u{6e}\u{64}",{1,1,1,1})
156+test("\u{2d}\u{2d}\u{a}\u{69}\u{66}\u{20}\u{6e}\u{69}\u{6c}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{a}\u{20}\u{20}\u{61}\u{3d}\u{31}\u{a}\u{65}\u{6c}\u{73}\u{65}\u{a}\u{20}\u{20}\u{61}\u{3d}\u{32}\u{a}\u{65}\u{6e}\u{64}\u{a}",{0x2,0x5,0x6})
157+test("\u{61}\u{3d}\u{31}\u{a}\u{72}\u{65}\u{70}\u{65}\u{61}\u{74}\u{a}\u{20}\u{20}\u{61}\u{3d}\u{61}\u{2b}\u{31}\u{a}\u{75}\u{6e}\u{74}\u{69}\u{6c}\u{20}\u{61}\u{3d}\u{3d}\u{33}\u{a}",{0x1,0x3,0x4,0x3,0x4})
158+test("\u{20}\u{64}\u{6f}\u{a}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{a}\u{65}\u{6e}\u{64}\u{a}",{0x2})
159+test("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{a}\u{61}\u{3d}\u{31}\u{a}\u{77}\u{68}\u{69}\u{6c}\u{65}\u{20}\u{61}\u{3c}\u{3d}\u{33}\u{20}\u{64}\u{6f}\u{a}\u{20}\u{20}\u{61}\u{3d}\u{61}\u{2b}\u{31}\u{a}\u{65}\u{6e}\u{64}\u{a}",{0x1,0x2,0x3,0x4,0x3,0x4,0x3,0x4,0x3,0x5})
160+test("\u{77}\u{68}\u{69}\u{6c}\u{65}\u{20}\u{6d}\u{61}\u{74}\u{68}\u{2e}\u{73}\u{69}\u{6e}\u{28}\u{31}\u{29}\u{20}\u{64}\u{6f}\u{a}\u{20}\u{20}\u{69}\u{66}\u{20}\u{6d}\u{61}\u{74}\u{68}\u{2e}\u{73}\u{69}\u{6e}\u{28}\u{31}\u{29}\u{a}\u{20}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{20}\u{62}\u{72}\u{65}\u{61}\u{6b}\u{a}\u{20}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{65}\u{6e}\u{64}\u{a}\u{61}\u{3d}\u{31}",{0x1,0x2,0x3,0x6})
161+test("\u{66}\u{6f}\u{72}\u{20}\u{69}\u{3d}\u{31}\u{2c}\u{33}\u{20}\u{64}\u{6f}\u{a}\u{20}\u{20}\u{61}\u{3d}\u{69}\u{a}\u{65}\u{6e}\u{64}\u{a}",{0x1,0x2,0x1,0x2,0x1,0x2,0x1,0x3})
162+test("\u{66}\u{6f}\u{72}\u{20}\u{69}\u{2c}\u{76}\u{20}\u{69}\u{6e}\u{20}\u{70}\u{61}\u{69}\u{72}\u{73}\u{7b}\u{27}\u{61}\u{27}\u{2c}\u{27}\u{62}\u{27}\u{7d}\u{20}\u{64}\u{6f}\u{a}\u{20}\u{20}\u{61}\u{3d}\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{28}\u{69}\u{29}\u{20}\u{2e}\u{2e}\u{20}\u{76}\u{a}\u{65}\u{6e}\u{64}\u{a}",{0x1,0x2,0x1,0x2,0x1,0x3})
163+test("\u{66}\u{6f}\u{72}\u{20}\u{69}\u{3d}\u{31}\u{2c}\u{34}\u{20}\u{64}\u{6f}\u{20}\u{61}\u{3d}\u{31}\u{20}\u{65}\u{6e}\u{64}",{0x1,0x1,0x1,0x1})
164164_G.a=nil
165165do
166−local a = {1,2,3,10,124,125,126,127,128,129,130,255,256,257,500,1000}
166+local a = {0x1,0x2,0x3,0xa,0x7c,0x7d,0x7e,0x7f,0x80,0x81,0x82,0xff,0x100,0x101,0x1f4,0x3e8}
167167local s = "\u{20}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{62}\u{20}\u{3d}\u{20}\u{7b}\u{31}\u{30}\u{7d}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{62}\u{5b}\u{31}\u{5d}\u{20}\u{58}\u{20}\u{2b}\u{20}\u{59}\u{20}\u{62}\u{5b}\u{31}\u{5d}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{62}\u{20}\u{3d}\u{20}\u{34}\u{a}\u{20}\u{20}"
168168for _,i in ipairs(a)
169169do
@@ -172,7 +172,7 @@ for _,j in ipairs(a)
172172do
173173subs.Y=string.rep("\u{a}",j)
174174local s = string.gsub(s,"\u{5b}\u{58}\u{59}\u{5d}",subs)
175−test(s,{1,2 + i,2 + i + j,2 + i,2 + i + j,3 + i + j})
175+test(s,{0x1,(0x2 + i),((0x2 + i) + j),(0x2 + i),((0x2 + i) + j),((0x3 + i) + j)})
176176end
177177end
178178end
@@ -183,212 +183,212 @@ local function checkactivelines
183183local t = debug.getinfo(f,"\u{53}\u{4c}")
184184for _,l in pairs(lines)
185185do
186−l=l + t.linedefined
186+l=(l + t.linedefined)
187187assert(t.activelines[l])
188188t.activelines[l]=undef
189189end
190−assert(next(t.activelines) == nil)
190+assert((next(t.activelines) == nil))
191191end
192192checkactivelines(function (...)
193−local a = 20
194−local b = 30
195−end,{4,6,8})
193+local a = 0x14
194+local b = 0x1e
195+end,{0x4,0x6,0x8})
196196checkactivelines(function (a)
197−local a = 20
198−local b = 30
199−end,{3,4,6})
197+local a = 0x14
198+local b = 0x1e
199+end,{0x3,0x4,0x6})
200200checkactivelines(function (a,b, ...)
201201
202−end,{0})
202+end,{0x0})
203203checkactivelines(function (a,b)
204204
205−end,{1})
206−for _,n in pairs({0,1,2,10,50,100,1000,10000})
205+end,{0x1})
206+for _,n in pairs({0x0,0x1,0x2,0xa,0x32,0x64,0x3e8,0x2710})
207207do
208−checkactivelines(load(string.format("\u{25}\u{73}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",string.rep("\u{a}",n))),{n + 1})
208+checkactivelines(load(string.format("\u{25}\u{73}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",string.rep("\u{a}",n))),{(n + 0x1)})
209209end
210210end
211211print("\u{2b}")
212−assert(not pcall(debug.getlocal,20,1))
213−assert(not pcall(debug.setlocal,- 1,1,10))
212+assert((not pcall(debug.getlocal,0x14,0x1)))
213+assert((not pcall(debug.setlocal,(- 0x1),0x1,0xa)))
214214local function foo
215215(a,b, ...)
216216local d,e
217217end
218218local co = coroutine.create(foo)
219−assert(debug.getlocal(foo,1) == "\u{61}")
220−assert(debug.getlocal(foo,2) == "\u{62}")
221−assert(not debug.getlocal(foo,3))
222−assert(debug.getlocal(co,foo,1) == "\u{61}")
223−assert(debug.getlocal(co,foo,2) == "\u{62}")
224−assert(not debug.getlocal(co,foo,3))
225−assert(not debug.getlocal(print,1))
219+assert((debug.getlocal(foo,0x1) == "\u{61}"))
220+assert((debug.getlocal(foo,0x2) == "\u{62}"))
221+assert((not debug.getlocal(foo,0x3)))
222+assert((debug.getlocal(co,foo,0x1) == "\u{61}"))
223+assert((debug.getlocal(co,foo,0x2) == "\u{62}"))
224+assert((not debug.getlocal(co,foo,0x3)))
225+assert((not debug.getlocal(print,0x1)))
226226local function foo
227227()
228−return (debug.getlocal(1,- 1))
228+return debug.getlocal(0x1,(- 0x1))
229229end
230−assert(not foo(10))
230+assert((not foo(0xa)))
231231local function foo
232232(a, ...)
233233local t = table.pack(...)
234−for i = 1, t.n
234+for i = 0x1, t.n
235235do
236−local n,v = debug.getlocal(1,- i)
237−assert(n == "\u{28}\u{76}\u{61}\u{72}\u{61}\u{72}\u{67}\u{29}" and v == t[i])
236+local n,v = debug.getlocal(0x1,(- i))
237+assert(((n == "\u{28}\u{76}\u{61}\u{72}\u{61}\u{72}\u{67}\u{29}") and (v == t[i])))
238238end
239−assert(not debug.getlocal(1,- (t.n + 1)))
240−assert(not debug.setlocal(1,- (t.n + 1),30))
241−if t.n > 0 then
239+assert((not debug.getlocal(0x1,(- (t.n + 0x1)))))
240+assert((not debug.setlocal(0x1,(- (t.n + 0x1)),0x1e)))
241+if (t.n > 0x0) then
242242(function (x)
243−assert(debug.setlocal(2,- 1,x) == "\u{28}\u{76}\u{61}\u{72}\u{61}\u{72}\u{67}\u{29}")
244−assert(debug.setlocal(2,- t.n,x) == "\u{28}\u{76}\u{61}\u{72}\u{61}\u{72}\u{67}\u{29}")
245−end)(430)
246−assert(... == 430)
243+assert((debug.setlocal(0x2,(- 0x1),x) == "\u{28}\u{76}\u{61}\u{72}\u{61}\u{72}\u{67}\u{29}"))
244+assert((debug.setlocal(0x2,(- t.n),x) == "\u{28}\u{76}\u{61}\u{72}\u{61}\u{72}\u{67}\u{29}"))
245+end)(0x1ae)
246+assert((... == 0x1ae))
247247end
248248end
249249foo()
250250foo(print)
251−foo(200,3,4)
251+foo(0xc8,0x3,0x4)
252252local a = {}
253−for i = 1, (_soft and 100 or 1000)
253+for i = 0x1, ((_soft and 0x64) or 0x3e8)
254254do
255255a[i]=i
256256end
257257foo(table.unpack(a))
258258do
259−assert(not debug.gethook())
260−local count = 0
259+assert((not debug.gethook()))
260+local count = 0x0
261261local function f
262262()
263−assert(debug.getinfo(1).namewhat == "\u{68}\u{6f}\u{6f}\u{6b}")
263+assert((debug.getinfo(0x1).namewhat == "\u{68}\u{6f}\u{6f}\u{6b}"))
264264local sndline = string.match(debug.traceback(),"\u{a}\u{28}\u{2e}\u{2d}\u{29}\u{a}")
265265assert(string.find(sndline,"\u{68}\u{6f}\u{6f}\u{6b}"))
266−count=count + 1
266+count=(count + 0x1)
267267end
268268debug.sethook(f,"\u{6c}")
269−local a = 0
269+local a = 0x0
270270_ENV.a=a
271−a=1
271+a=0x1
272272debug.sethook()
273−assert(count == 4)
273+assert((count == 0x4))
274274end
275275_ENV.a=nil
276−assert(getmetatable(debug.getregistry()._HOOKKEY).__mode == "\u{6b}")
276+assert((getmetatable(debug.getregistry()._HOOKKEY).__mode == "\u{6b}"))
277277a={}
278278;
279279local L = nil
280−local glob = 1
280+local glob = 0x1
281281local oldglob = glob
282282debug.sethook(function (e,l)
283283collectgarbage()
284284local f,m,c = debug.gethook()
285−assert(m == "\u{63}\u{72}\u{6c}" and c == 0)
286−if e == "\u{6c}\u{69}\u{6e}\u{65}" then
287−if glob ~= oldglob then
288−L=l - 1
285+assert(((m == "\u{63}\u{72}\u{6c}") and (c == 0x0)))
286+if (e == "\u{6c}\u{69}\u{6e}\u{65}") then
287+if (glob ~= oldglob) then
288+L=(l - 0x1)
289289oldglob=glob
290290end
291−elseif e == "\u{63}\u{61}\u{6c}\u{6c}" then
292−local f = debug.getinfo(2,"\u{66}").func
293−a[f]=1
291+elseif (e == "\u{63}\u{61}\u{6c}\u{6c}") then
292+local f = debug.getinfo(0x2,"\u{66}").func
293+a[f]=0x1
294294else
295−assert(e == "\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}")
295+assert((e == "\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}"))
296296end
297297end,"\u{63}\u{72}\u{6c}")
298298function f(a,b)
299299collectgarbage()
300−local _,x = debug.getlocal(1,1)
301−local _,y = debug.getlocal(1,2)
302−assert(x == a and y == b)
303−assert(debug.setlocal(2,3,"\u{70}\u{65}\u{72}\u{61}") == "\u{41}\u{41}" .. "\u{41}\u{41}")
304−assert(debug.setlocal(2,4,"\u{6d}\u{61}\u{6e}\u{67}\u{61}") == "\u{42}")
305−x=debug.getinfo(2)
306−assert(x.func == g and x.what == "\u{4c}\u{75}\u{61}" and x.name == "\u{67}" and x.nups == 2 and string.find(x.source,"\u{5e}\u{40}\u{2e}\u{2a}\u{64}\u{62}\u{25}\u{2e}\u{6c}\u{75}\u{61}\u{24}"))
307−glob=glob + 1
308−assert(debug.getinfo(1,"\u{6c}").currentline == L + 1)
309−assert(debug.getinfo(1,"\u{6c}").currentline == L + 2)
300+local _,x = debug.getlocal(0x1,0x1)
301+local _,y = debug.getlocal(0x1,0x2)
302+assert(((x == a) and (y == b)))
303+assert((debug.setlocal(0x2,0x3,"\u{70}\u{65}\u{72}\u{61}") == ("\u{41}\u{41}" .. "\u{41}\u{41}")))
304+assert((debug.setlocal(0x2,0x4,"\u{6d}\u{61}\u{6e}\u{67}\u{61}") == "\u{42}"))
305+x=debug.getinfo(0x2)
306+assert((((((x.func == g) and (x.what == "\u{4c}\u{75}\u{61}")) and (x.name == "\u{67}")) and (x.nups == 0x2)) and string.find(x.source,"\u{5e}\u{40}\u{2e}\u{2a}\u{64}\u{62}\u{25}\u{2e}\u{6c}\u{75}\u{61}\u{24}")))
307+glob=(glob + 0x1)
308+assert((debug.getinfo(0x1,"\u{6c}").currentline == (L + 0x1)))
309+assert((debug.getinfo(0x1,"\u{6c}").currentline == (L + 0x2)))
310310end
311311function foo()
312−glob=glob + 1
313−assert(debug.getinfo(1,"\u{6c}").currentline == L + 1)
312+glob=(glob + 0x1)
313+assert((debug.getinfo(0x1,"\u{6c}").currentline == (L + 0x1)))
314314end
315315;
316316foo()
317−local _ = "\u{61}\u{6c}\u{6f}\u{a}\u{61}\u{6c}\u{6f}" .. "\u{a}"
318−assert(debug.getinfo(1,"\u{6c}").currentline == L + 11)
317+local _ = ("\u{61}\u{6c}\u{6f}\u{a}\u{61}\u{6c}\u{6f}" .. "\u{a}")
318+assert((debug.getinfo(0x1,"\u{6c}").currentline == (L + 0xb)))
319319function g(...)
320320local arg = {...}
321321do
322322local a,b,c
323323;
324−a=math.sin(40)
324+a=math.sin(0x28)
325325;
326326end
327327local feijao
328328local AAAA,B = "\u{78}\u{75}\u{78}\u{75}","\u{61}\u{62}\u{61}\u{63}\u{61}\u{74}\u{65}"
329329f(AAAA,B)
330−assert(AAAA == "\u{70}\u{65}\u{72}\u{61}" and B == "\u{6d}\u{61}\u{6e}\u{67}\u{61}")
330+assert(((AAAA == "\u{70}\u{65}\u{72}\u{61}") and (B == "\u{6d}\u{61}\u{6e}\u{67}\u{61}")))
331331do
332−local B = 13
333−local x,y = debug.getlocal(1,5)
334−assert(x == "\u{42}" and y == 13)
332+local B = 0xd
333+local x,y = debug.getlocal(0x1,0x5)
334+assert(((x == "\u{42}") and (y == 0xd)))
335335end
336336end
337337g()
338−assert(a[f] and a[g] and a[assert] and a[debug.getlocal] and not a[print])
339−local n,v = debug.getlocal(0,1)
340−assert(v == 0 and n == "\u{28}\u{43}\u{20}\u{74}\u{65}\u{6d}\u{70}\u{6f}\u{72}\u{61}\u{72}\u{79}\u{29}")
341−local n,v = debug.getlocal(0,2)
342−assert(v == 2 and n == "\u{28}\u{43}\u{20}\u{74}\u{65}\u{6d}\u{70}\u{6f}\u{72}\u{61}\u{72}\u{79}\u{29}")
343−assert(not debug.getlocal(0,3))
344−assert(not debug.getlocal(0,0))
338+assert(((((a[f] and a[g]) and a[assert]) and a[debug.getlocal]) and (not a[print])))
339+local n,v = debug.getlocal(0x0,0x1)
340+assert(((v == 0x0) and (n == "\u{28}\u{43}\u{20}\u{74}\u{65}\u{6d}\u{70}\u{6f}\u{72}\u{61}\u{72}\u{79}\u{29}")))
341+local n,v = debug.getlocal(0x0,0x2)
342+assert(((v == 0x2) and (n == "\u{28}\u{43}\u{20}\u{74}\u{65}\u{6d}\u{70}\u{6f}\u{72}\u{61}\u{72}\u{79}\u{29}")))
343+assert((not debug.getlocal(0x0,0x3)))
344+assert((not debug.getlocal(0x0,0x0)))
345345function f()
346−assert(select(2,debug.getlocal(2,3)) == 1)
347−assert(not debug.getlocal(2,4))
348−debug.setlocal(2,3,10)
349−return 20
346+assert((select(0x2,debug.getlocal(0x2,0x3)) == 0x1))
347+assert((not debug.getlocal(0x2,0x4)))
348+debug.setlocal(0x2,0x3,0xa)
349+return 0x14
350350end
351351function g(a,b)
352−return (a + 1) + f()
352+return ((a + 0x1) + f())
353353end
354−assert(g(0,0) == 30)
354+assert((g(0x0,0x0) == 0x1e))
355355_G.f,_G.g=nil
356356debug.sethook(nil)
357357;
358−assert(not debug.gethook())
358+assert((not debug.gethook()))
359359do
360−assert(not debug.setuservalue(io.stdin,10))
361−local a,b = debug.getuservalue(io.stdin,10)
362−assert(a == nil and not b)
360+assert((not debug.setuservalue(io.stdin,0xa)))
361+local a,b = debug.getuservalue(io.stdin,0xa)
362+assert(((a == nil) and (not b)))
363363end
364364do
365365local function f
366366(...)
367−return 3,...
367+return 0x3,...
368368end
369−local count = 0
369+local count = 0x0
370370local a = {}
371−for i = 1, 100
371+for i = 0x1, 0x64
372372do
373373a[i]=i
374374end
375375debug.sethook(function ()
376−count=count + 1
377−end,"",1)
376+count=(count + 0x1)
377+end,"",0x1)
378378local t = {table.unpack(a)}
379−assert(# t == 100)
380−t={table.unpack(a,1,3)}
381−assert(# t == 3)
382−t={f(table.unpack(a,1,30))}
383−assert(# t == 31)
379+assert((# (t == 0x64)))
380+t={table.unpack(a,0x1,0x3)}
381+assert((# (t == 0x3)))
382+t={f(table.unpack(a,0x1,0x1e))}
383+assert((# (t == 0x1f)))
384384end
385385local function collectlocals
386386(level)
387387local tab = {}
388−for i = 1, math.huge
388+for i = 0x1, math.huge
389389do
390−local n,v = debug.getlocal(level + 1,i)
391−if not (n and string.find(n,"\u{5e}\u{5b}\u{61}\u{2d}\u{7a}\u{41}\u{2d}\u{5a}\u{30}\u{2d}\u{39}\u{5f}\u{5d}\u{2b}\u{24}")) then
390+local n,v = debug.getlocal((level + 0x1),i)
391+if (not (n and string.find(n,"\u{5e}\u{5b}\u{61}\u{2d}\u{7a}\u{41}\u{2d}\u{5a}\u{30}\u{2d}\u{39}\u{5f}\u{5d}\u{2b}\u{24}"))) then
392392break
393393end
394394tab[n]=v
@@ -400,26 +400,26 @@ a={}
400400function a:f(a,b, ...)
401401local arg = {...}
402402;
403−local c = 13
403+local c = 0xd
404404end
405405debug.sethook(function (e)
406−assert(e == "\u{63}\u{61}\u{6c}\u{6c}")
406+assert((e == "\u{63}\u{61}\u{6c}\u{6c}"))
407407dostring("\u{58}\u{58}\u{20}\u{3d}\u{20}\u{31}\u{32}")
408−assert(not pcall(load("\u{61}\u{3d}\u{27}\u{6a}\u{6f}\u{61}\u{6f}\u{27}\u{2b}\u{31}")))
408+assert((not pcall(load("\u{61}\u{3d}\u{27}\u{6a}\u{6f}\u{61}\u{6f}\u{27}\u{2b}\u{31}"))))
409409debug.sethook(function (e,l)
410−assert(debug.getinfo(2,"\u{6c}").currentline == l)
410+assert((debug.getinfo(0x2,"\u{6c}").currentline == l))
411411local f,m,c = debug.gethook()
412−assert(e == "\u{6c}\u{69}\u{6e}\u{65}")
413−assert(m == "\u{6c}" and c == 0)
412+assert((e == "\u{6c}\u{69}\u{6e}\u{65}"))
413+assert(((m == "\u{6c}") and (c == 0x0)))
414414debug.sethook(nil)
415−assert(not X)
416−X=collectlocals(2)
415+assert((not X))
416+X=collectlocals(0x2)
417417end,"\u{6c}")
418418end,"\u{63}")
419−a:f(1,2,3,4,5)
420−assert(X.self == a and X.a == 1 and X.b == 2 and X.c == nil)
421−assert(XX == 12)
422−assert(not debug.gethook())
419+a:f(0x1,0x2,0x3,0x4,0x5)
420+assert(((((X.self == a) and (X.a == 0x1)) and (X.b == 0x2)) and (X.c == nil)))
421+assert((XX == 0xc))
422+assert((not debug.gethook()))
423423_G.XX=nil
424424do
425425local X = false
@@ -428,35 +428,35 @@ local function foo
428428do
429429local x,y,z
430430end
431−local c,d = 10,20
431+local c,d = 0xa,0x14
432432return
433433end
434434local function aux
435435()
436−if debug.getinfo(2).name == "\u{66}\u{6f}\u{6f}" then
436+if (debug.getinfo(0x2).name == "\u{66}\u{6f}\u{6f}") then
437437X=true
438−local tab = {["\u{61}"] = 100,["\u{62}"] = 200,["\u{63}"] = 10,["\u{64}"] = 20}
439−for n,v in pairs(collectlocals(2))
438+local tab = {["\u{61}"] = 0x64,["\u{62}"] = 0xc8,["\u{63}"] = 0xa,["\u{64}"] = 0x14}
439+for n,v in pairs(collectlocals(0x2))
440440do
441−assert(tab[n] == v)
441+assert((tab[n] == v))
442442tab[n]=undef
443443end
444−assert(next(tab) == nil)
444+assert((next(tab) == nil))
445445end
446446end
447447debug.sethook(aux,"\u{72}")
448448;
449−foo(100,200)
449+foo(0x64,0xc8)
450450;
451451debug.sethook()
452452assert(X)
453453end
454454local function eqseq
455455(t1,t2)
456−assert(# t1 == # t2)
457−for i = 1, # t1
456+assert((# (t1 == (# t2))))
457+for i = 0x1, (# t1)
458458do
459−assert(t1[i] == t2[i])
459+assert((t1[i] == t2[i]))
460460end
461461end
462462do
@@ -465,17 +465,17 @@ local on = false
465465local inp,out
466466local function hook
467467(event)
468−if not on then
468+if (not on) then
469469return
470470end
471−local ar = debug.getinfo(2,"\u{72}\u{75}\u{53}")
471+local ar = debug.getinfo(0x2,"\u{72}\u{75}\u{53}")
472472local t = {}
473−for i = ar.ftransfer, ar.ftransfer + ar.ntransfer - 1
473+for i = ar.ftransfer, ((ar.ftransfer + ar.ntransfer) - 0x1)
474474do
475−local _,v = debug.getlocal(2,i)
476−t[# t + 1]=v
475+local _,v = debug.getlocal(0x2,i)
476+t[(# (t + 0x1))]=v
477477end
478−if event == "\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}" then
478+if (event == "\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}") then
479479out=t
480480else
481481inp=t
@@ -484,54 +484,54 @@ end
484484debug.sethook(hook,"\u{63}\u{72}")
485485on=true
486486;
487−math.sin(3)
487+math.sin(0x3)
488488;
489489on=false
490−eqseq(inp,{3})
490+eqseq(inp,{0x3})
491491;
492−eqseq(out,{math.sin(3)})
492+eqseq(out,{math.sin(0x3)})
493493on=true
494494;
495−select(2,10,20,30,40)
495+select(0x2,0xa,0x14,0x1e,0x28)
496496;
497497on=false
498−eqseq(inp,{2,10,20,30,40})
498+eqseq(inp,{0x2,0xa,0x14,0x1e,0x28})
499499;
500−eqseq(out,{20,30,40})
500+eqseq(out,{0x14,0x1e,0x28})
501501local function foo
502502(a, ...)
503503return ...
504504end
505505local function foo1
506506()
507−on=not on
507+on=(not on)
508508;
509−return foo(20,10,0)
509+return foo(0x14,0xa,0x0)
510510end
511511foo1()
512512;
513513on=false
514−eqseq(inp,{20})
514+eqseq(inp,{0x14})
515515;
516−eqseq(out,{10,0})
516+eqseq(out,{0xa,0x0})
517517debug.sethook()
518518end
519519local function getupvalues
520520(f)
521521local t = {}
522−local i = 1
522+local i = 0x1
523523while true do
524524local name,value = debug.getupvalue(f,i)
525−if not name then
525+if (not name) then
526526break
527527end
528−assert(not t[name])
528+assert((not t[name]))
529529t[name]=value
530−i=i + 1
530+i=(i + 0x1)
531531end
532532return t
533533end
534−local a,b,c = 1,2,3
534+local a,b,c = 0x1,0x2,0x3
535535local function foo1
536536(a)
537537b=a
@@ -542,69 +542,69 @@ local function foo2
542542(x)
543543a=x
544544;
545−return c + b
545+return (c + b)
546546end
547−assert(not debug.getupvalue(foo1,3))
548−assert(not debug.getupvalue(foo1,0))
549−assert(not debug.setupvalue(foo1,3,"\u{78}\u{75}\u{78}\u{75}"))
547+assert((not debug.getupvalue(foo1,0x3)))
548+assert((not debug.getupvalue(foo1,0x0)))
549+assert((not debug.setupvalue(foo1,0x3,"\u{78}\u{75}\u{78}\u{75}")))
550550local t = getupvalues(foo1)
551−assert(t.a == nil and t.b == 2 and t.c == 3)
551+assert((((t.a == nil) and (t.b == 0x2)) and (t.c == 0x3)))
552552t=getupvalues(foo2)
553−assert(t.a == 1 and t.b == 2 and t.c == 3)
554−assert(debug.setupvalue(foo1,1,"\u{78}\u{75}\u{78}\u{75}") == "\u{62}")
555−assert(({debug.getupvalue(foo2,3)})[2] == "\u{78}\u{75}\u{78}\u{75}")
556−assert(debug.getupvalue(string.gmatch("\u{78}","\u{78}"),1) == "")
557−local a = 0
553+assert((((t.a == 0x1) and (t.b == 0x2)) and (t.c == 0x3)))
554+assert((debug.setupvalue(foo1,0x1,"\u{78}\u{75}\u{78}\u{75}") == "\u{62}"))
555+assert((({debug.getupvalue(foo2,0x3)})[0x2] == "\u{78}\u{75}\u{78}\u{75}"))
556+assert((debug.getupvalue(string.gmatch("\u{78}","\u{78}"),0x1) == ""))
557+local a = 0x0
558558debug.sethook(function (e)
559−a=a + 1
560−end,"",1)
561−a=0
559+a=(a + 0x1)
560+end,"",0x1)
561+a=0x0
562562;
563−for i = 1, 1000
563+for i = 0x1, 0x3e8
564564do
565565
566566end
567567;
568−assert(1000 < a and a < 1012)
568+assert(((0x3e8 < a) and (a < 0x3f4)))
569569debug.sethook(function (e)
570−a=a + 1
571−end,"",4)
572−a=0
570+a=(a + 0x1)
571+end,"",0x4)
572+a=0x0
573573;
574−for i = 1, 1000
574+for i = 0x1, 0x3e8
575575do
576576
577577end
578578;
579−assert(250 < a and a < 255)
579+assert(((0xfa < a) and (a < 0xff)))
580580local f,m,c = debug.gethook()
581−assert(m == "" and c == 4)
581+assert(((m == "") and (c == 0x4)))
582582debug.sethook(function (e)
583−a=a + 1
584−end,"",4000)
585−a=0
583+a=(a + 0x1)
584+end,"",0xfa0)
585+a=0x0
586586;
587−for i = 1, 1000
587+for i = 0x1, 0x3e8
588588do
589589
590590end
591591;
592−assert(a == 0)
592+assert((a == 0x0))
593593do
594−debug.sethook(print,"",2 ^ 24 - 1)
594+debug.sethook(print,"",((0x2 ^ 0x18) - 0x1))
595595local f,m,c = debug.gethook()
596−assert(({debug.gethook()})[3] == 2 ^ 24 - 1)
596+assert((({debug.gethook()})[0x3] == ((0x2 ^ 0x18) - 0x1)))
597597end
598598debug.sethook()
599599local g,g1
600600local function f
601601(x)
602602if x then
603−assert(debug.getinfo(1,"\u{53}").what == "\u{4c}\u{75}\u{61}")
604−assert(debug.getinfo(1,"\u{74}").istailcall == true)
605−local tail = debug.getinfo(2)
606−assert(tail.func == g1 and tail.istailcall == true)
607−assert(debug.getinfo(3,"\u{53}").what == "\u{6d}\u{61}\u{69}\u{6e}")
603+assert((debug.getinfo(0x1,"\u{53}").what == "\u{4c}\u{75}\u{61}"))
604+assert((debug.getinfo(0x1,"\u{74}").istailcall == true))
605+local tail = debug.getinfo(0x2)
606+assert(((tail.func == g1) and (tail.istailcall == true)))
607+assert((debug.getinfo(0x3,"\u{53}").what == "\u{6d}\u{61}\u{69}\u{6e}"))
608608print("\u{2b}")
609609end
610610end
@@ -628,110 +628,110 @@ end,"\u{63}\u{72}")
628628h(false)
629629debug.sethook()
630630local res = {"\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}","\u{63}\u{61}\u{6c}\u{6c}","\u{74}\u{61}\u{69}\u{6c}\u{20}\u{63}\u{61}\u{6c}\u{6c}","\u{63}\u{61}\u{6c}\u{6c}","\u{74}\u{61}\u{69}\u{6c}\u{20}\u{63}\u{61}\u{6c}\u{6c}","\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}","\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}","\u{63}\u{61}\u{6c}\u{6c}"}
631−for i = 1, # res
631+for i = 0x1, (# res)
632632do
633−assert(res[i] == table.remove(b,1))
633+assert((res[i] == table.remove(b,0x1)))
634634end
635−b=0
635+b=0x0
636636debug.sethook(function (e)
637−if e == "\u{74}\u{61}\u{69}\u{6c}\u{20}\u{63}\u{61}\u{6c}\u{6c}" then
638−b=b + 1
639−assert(debug.getinfo(2,"\u{74}").istailcall == true)
637+if (e == "\u{74}\u{61}\u{69}\u{6c}\u{20}\u{63}\u{61}\u{6c}\u{6c}") then
638+b=(b + 0x1)
639+assert((debug.getinfo(0x2,"\u{74}").istailcall == true))
640640else
641−assert(debug.getinfo(2,"\u{74}").istailcall == false)
641+assert((debug.getinfo(0x2,"\u{74}").istailcall == false))
642642end
643643end,"\u{63}")
644644h(false)
645645debug.sethook()
646−assert(b == 2)
647−local lim = _soft and 3000 or 30000
646+assert((b == 0x2))
647+local lim = ((_soft and 0xbb8) or 0x7530)
648648local function foo
649649(x)
650−if x == 0 then
651−assert(debug.getinfo(2).what == "\u{6d}\u{61}\u{69}\u{6e}")
652−local info = debug.getinfo(1)
653−assert(info.istailcall == true and info.func == foo)
650+if (x == 0x0) then
651+assert((debug.getinfo(0x2).what == "\u{6d}\u{61}\u{69}\u{6e}"))
652+local info = debug.getinfo(0x1)
653+assert(((info.istailcall == true) and (info.func == foo)))
654654else
655−return foo(x - 1)
655+return foo((x - 0x1))
656656end
657657end
658658foo(lim)
659659print("\u{2b}")
660660co=load("\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{41}\u{20}\u{3d}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{78}\u{a}\u{20}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{a}")
661−local a = 0
661+local a = 0x0
662662debug.sethook(function (e,l)
663−if l == 3 then
664−a=a + 1
663+if (l == 0x3) then
664+a=(a + 0x1)
665665;
666−assert(debug.getlocal(2,1) == "\u{28}\u{74}\u{65}\u{6d}\u{70}\u{6f}\u{72}\u{61}\u{72}\u{79}\u{29}")
667−elseif l == 4 then
668−a=a + 1
666+assert((debug.getlocal(0x2,0x1) == "\u{28}\u{74}\u{65}\u{6d}\u{70}\u{6f}\u{72}\u{61}\u{72}\u{79}\u{29}"))
667+elseif (l == 0x4) then
668+a=(a + 0x1)
669669;
670−assert(debug.getlocal(2,1) == "\u{41}")
670+assert((debug.getlocal(0x2,0x1) == "\u{41}"))
671671end
672672end,"\u{6c}")
673673co()
674674debug.sethook()
675−assert(a == 2)
676−assert(debug.traceback(print) == print)
677−assert(debug.traceback(print,4) == print)
678−assert(string.find(debug.traceback("\u{68}\u{69}",4),"\u{5e}\u{68}\u{69}\u{a}"))
675+assert((a == 0x2))
676+assert((debug.traceback(print) == print))
677+assert((debug.traceback(print,0x4) == print))
678+assert(string.find(debug.traceback("\u{68}\u{69}",0x4),"\u{5e}\u{68}\u{69}\u{a}"))
679679assert(string.find(debug.traceback("\u{68}\u{69}"),"\u{5e}\u{68}\u{69}\u{a}"))
680−assert(not string.find(debug.traceback("\u{68}\u{69}"),"\u{27}\u{64}\u{65}\u{62}\u{75}\u{67}\u{2e}\u{74}\u{72}\u{61}\u{63}\u{65}\u{62}\u{61}\u{63}\u{6b}\u{27}"))
681−assert(string.find(debug.traceback("\u{68}\u{69}",0),"\u{27}\u{64}\u{65}\u{62}\u{75}\u{67}\u{2e}\u{74}\u{72}\u{61}\u{63}\u{65}\u{62}\u{61}\u{63}\u{6b}\u{27}"))
680+assert((not string.find(debug.traceback("\u{68}\u{69}"),"\u{27}\u{64}\u{65}\u{62}\u{75}\u{67}\u{2e}\u{74}\u{72}\u{61}\u{63}\u{65}\u{62}\u{61}\u{63}\u{6b}\u{27}")))
681+assert(string.find(debug.traceback("\u{68}\u{69}",0x0),"\u{27}\u{64}\u{65}\u{62}\u{75}\u{67}\u{2e}\u{74}\u{72}\u{61}\u{63}\u{65}\u{62}\u{61}\u{63}\u{6b}\u{27}"))
682682assert(string.find(debug.traceback(),"\u{5e}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{74}\u{72}\u{61}\u{63}\u{65}\u{62}\u{61}\u{63}\u{6b}\u{3a}\u{a}"))
683683do
684684local st,msg = (function ()
685685return pcall
686686end)()(debug.traceback)
687−assert(st == true and string.find(msg,"\u{70}\u{63}\u{61}\u{6c}\u{6c}"))
687+assert(((st == true) and string.find(msg,"\u{70}\u{63}\u{61}\u{6c}\u{6c}")))
688688end
689689local t = debug.getinfo(print,"\u{75}")
690−assert(t.isvararg == true and t.nparams == 0 and t.nups == 0)
690+assert((((t.isvararg == true) and (t.nparams == 0x0)) and (t.nups == 0x0)))
691691t=debug.getinfo(function (a,b,c)
692692
693693end,"\u{75}")
694−assert(t.isvararg == false and t.nparams == 3 and t.nups == 0)
694+assert((((t.isvararg == false) and (t.nparams == 0x3)) and (t.nups == 0x0)))
695695t=debug.getinfo(function (a,b, ...)
696696return t[a]
697697end,"\u{75}")
698−assert(t.isvararg == true and t.nparams == 2 and t.nups == 1)
699−t=debug.getinfo(1)
700−assert(t.isvararg == true and t.nparams == 0 and t.nups == 1 and debug.getupvalue(t.func,1) == "\u{5f}\u{45}\u{4e}\u{56}")
698+assert((((t.isvararg == true) and (t.nparams == 0x2)) and (t.nups == 0x1)))
699+t=debug.getinfo(0x1)
700+assert(((((t.isvararg == true) and (t.nparams == 0x0)) and (t.nups == 0x1)) and (debug.getupvalue(t.func,0x1) == "\u{5f}\u{45}\u{4e}\u{56}")))
701701t=debug.getinfo(math.sin)
702−assert(t.isvararg == true and t.nparams == 0 and t.nups == 0)
702+assert((((t.isvararg == true) and (t.nparams == 0x0)) and (t.nups == 0x0)))
703703t=debug.getinfo(string.gmatch("\u{61}\u{62}\u{63}","\u{61}"))
704−assert(t.isvararg == true and t.nparams == 0 and t.nups > 0)
704+assert((((t.isvararg == true) and (t.nparams == 0x0)) and (t.nups > 0x0)))
705705local function checktraceback
706706(co,p,level)
707707local tb = debug.traceback(co,nil,level)
708−local i = 0
708+local i = 0x0
709709for l in string.gmatch(tb,"\u{5b}\u{5e}\u{a}\u{5d}\u{2b}\u{a}\u{3f}")
710710do
711−assert(i == 0 or string.find(l,p[i]))
712−i=i + 1
711+assert(((i == 0x0) or string.find(l,p[i])))
712+i=(i + 0x1)
713713end
714−assert(p[i] == undef)
714+assert((p[i] == undef))
715715end
716716local function f
717717(n)
718−if n > 0 then
719−f(n - 1)
718+if (n > 0x0) then
719+f((n - 0x1))
720720else
721721coroutine.yield()
722722end
723723end
724724local co = coroutine.create(f)
725−coroutine.resume(co,3)
725+coroutine.resume(co,0x3)
726726checktraceback(co,{"\u{79}\u{69}\u{65}\u{6c}\u{64}","\u{64}\u{62}\u{2e}\u{6c}\u{75}\u{61}","\u{64}\u{62}\u{2e}\u{6c}\u{75}\u{61}","\u{64}\u{62}\u{2e}\u{6c}\u{75}\u{61}","\u{64}\u{62}\u{2e}\u{6c}\u{75}\u{61}"})
727−checktraceback(co,{"\u{64}\u{62}\u{2e}\u{6c}\u{75}\u{61}","\u{64}\u{62}\u{2e}\u{6c}\u{75}\u{61}","\u{64}\u{62}\u{2e}\u{6c}\u{75}\u{61}","\u{64}\u{62}\u{2e}\u{6c}\u{75}\u{61}"},1)
728−checktraceback(co,{"\u{64}\u{62}\u{2e}\u{6c}\u{75}\u{61}","\u{64}\u{62}\u{2e}\u{6c}\u{75}\u{61}","\u{64}\u{62}\u{2e}\u{6c}\u{75}\u{61}"},2)
729−checktraceback(co,{"\u{64}\u{62}\u{2e}\u{6c}\u{75}\u{61}"},4)
730−checktraceback(co,{},40)
727+checktraceback(co,{"\u{64}\u{62}\u{2e}\u{6c}\u{75}\u{61}","\u{64}\u{62}\u{2e}\u{6c}\u{75}\u{61}","\u{64}\u{62}\u{2e}\u{6c}\u{75}\u{61}","\u{64}\u{62}\u{2e}\u{6c}\u{75}\u{61}"},0x1)
728+checktraceback(co,{"\u{64}\u{62}\u{2e}\u{6c}\u{75}\u{61}","\u{64}\u{62}\u{2e}\u{6c}\u{75}\u{61}","\u{64}\u{62}\u{2e}\u{6c}\u{75}\u{61}"},0x2)
729+checktraceback(co,{"\u{64}\u{62}\u{2e}\u{6c}\u{75}\u{61}"},0x4)
730+checktraceback(co,{},0x28)
731731co=coroutine.create(function (x)
732−local a = 1
733−coroutine.yield(debug.getinfo(1,"\u{6c}"))
734−coroutine.yield(debug.getinfo(1,"\u{6c}").currentline)
732+local a = 0x1
733+coroutine.yield(debug.getinfo(0x1,"\u{6c}"))
734+coroutine.yield(debug.getinfo(0x1,"\u{6c}").currentline)
735735return a
736736end)
737737local tr = {}
@@ -741,67 +741,67 @@ table.insert(tr,l)
741741end
742742end
743743debug.sethook(co,foo,"\u{6c}\u{63}\u{72}")
744−local _,l = coroutine.resume(co,10)
745−local x = debug.getinfo(co,1,"\u{6c}\u{66}\u{4c}\u{53}")
746−assert(x.currentline == l.currentline and x.activelines[x.currentline])
747−assert(type(x.func) == "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}")
748−for i = x.linedefined + 1, x.lastlinedefined
744+local _,l = coroutine.resume(co,0xa)
745+local x = debug.getinfo(co,0x1,"\u{6c}\u{66}\u{4c}\u{53}")
746+assert(((x.currentline == l.currentline) and x.activelines[x.currentline]))
747+assert((type(x.func) == "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}"))
748+for i = (x.linedefined + 0x1), x.lastlinedefined
749749do
750750assert(x.activelines[i])
751751x.activelines[i]=undef
752752end
753−assert(next(x.activelines) == nil)
754−assert(not debug.getinfo(co,2))
755−local a,b = debug.getlocal(co,1,1)
756−assert(a == "\u{78}" and b == 10)
757−a,b=debug.getlocal(co,1,2)
758−assert(a == "\u{61}" and b == 1)
759−debug.setlocal(co,1,2,"\u{68}\u{69}")
760−assert(debug.gethook(co) == foo)
761−assert(# tr == 2 and tr[1] == l.currentline - 1 and tr[2] == l.currentline)
753+assert((next(x.activelines) == nil))
754+assert((not debug.getinfo(co,0x2)))
755+local a,b = debug.getlocal(co,0x1,0x1)
756+assert(((a == "\u{78}") and (b == 0xa)))
757+a,b=debug.getlocal(co,0x1,0x2)
758+assert(((a == "\u{61}") and (b == 0x1)))
759+debug.setlocal(co,0x1,0x2,"\u{68}\u{69}")
760+assert((debug.gethook(co) == foo))
761+assert((# (((tr == 0x2) and (tr[0x1] == (l.currentline - 0x1))) and (tr[0x2] == l.currentline))))
762762a,b,c=pcall(coroutine.resume,co)
763−assert(a and b and c == l.currentline + 1)
763+assert(((a and b) and (c == (l.currentline + 0x1))))
764764checktraceback(co,{"\u{79}\u{69}\u{65}\u{6c}\u{64}","\u{69}\u{6e}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{3c}"})
765765a,b=coroutine.resume(co)
766−assert(a and b == "\u{68}\u{69}")
767−assert(# tr == 4 and tr[4] == l.currentline + 2)
768−assert(debug.gethook(co) == foo)
769−assert(not debug.gethook())
766+assert((a and (b == "\u{68}\u{69}")))
767+assert((# ((tr == 0x4) and (tr[0x4] == (l.currentline + 0x2)))))
768+assert((debug.gethook(co) == foo))
769+assert((not debug.gethook()))
770770checktraceback(co,{})
771771co=coroutine.create(function (x)
772772local a,b = coroutine.yield(x)
773−assert(a == 100 and b == nil)
773+assert(((a == 0x64) and (b == nil)))
774774return x
775775end)
776−a,b=coroutine.resume(co,10)
777−assert(a and b == 10)
778−a,b=debug.getlocal(co,1,1)
779−assert(a == "\u{78}" and b == 10)
780−assert(not debug.getlocal(co,1,5))
781−assert(debug.setlocal(co,1,1,30) == "\u{78}")
782−assert(not debug.setlocal(co,1,5,40))
783−a,b=coroutine.resume(co,100)
784−assert(a and b == 30)
776+a,b=coroutine.resume(co,0xa)
777+assert((a and (b == 0xa)))
778+a,b=debug.getlocal(co,0x1,0x1)
779+assert(((a == "\u{78}") and (b == 0xa)))
780+assert((not debug.getlocal(co,0x1,0x5)))
781+assert((debug.setlocal(co,0x1,0x1,0x1e) == "\u{78}"))
782+assert((not debug.setlocal(co,0x1,0x5,0x28)))
783+a,b=coroutine.resume(co,0x64)
784+assert((a and (b == 0x1e)))
785785function f(i)
786−if i == 0 then
786+if (i == 0x0) then
787787error(i)
788788else
789789coroutine.yield()
790790;
791−f(i - 1)
791+f((i - 0x1))
792792end
793793end
794794co=coroutine.create(function (x)
795795f(x)
796796end)
797−a,b=coroutine.resume(co,3)
797+a,b=coroutine.resume(co,0x3)
798798t={"\u{27}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{2e}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{27}","\u{27}\u{66}\u{27}","\u{69}\u{6e}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{3c}"}
799−while coroutine.status(co) == "\u{73}\u{75}\u{73}\u{70}\u{65}\u{6e}\u{64}\u{65}\u{64}" do
799+while (coroutine.status(co) == "\u{73}\u{75}\u{73}\u{70}\u{65}\u{6e}\u{64}\u{65}\u{64}") do
800800checktraceback(co,t)
801801a,b=coroutine.resume(co)
802−table.insert(t,2,"\u{27}\u{66}\u{27}")
802+table.insert(t,0x2,"\u{27}\u{66}\u{27}")
803803end
804−t[1]="\u{27}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{27}"
804+t[0x1]="\u{27}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{27}"
805805checktraceback(co,t)
806806local function g
807807(x)
@@ -812,42 +812,42 @@ local function f
812812debug.sethook(function ()
813813
814814end,"\u{6c}")
815−for j = 1, 1000
815+for j = 0x1, 0x3e8
816816do
817−g(i + j)
817+g((i + j))
818818end
819819end
820820local co = coroutine.wrap(f)
821−co(10)
821+co(0xa)
822822pcall(co)
823823pcall(co)
824−assert(type(debug.getregistry()) == "\u{74}\u{61}\u{62}\u{6c}\u{65}")
824+assert((type(debug.getregistry()) == "\u{74}\u{61}\u{62}\u{6c}\u{65}"))
825825local a = {}
826826local function f
827827(t)
828−local info = debug.getinfo(1)
828+local info = debug.getinfo(0x1)
829829;
830−assert(info.namewhat == "\u{6d}\u{65}\u{74}\u{61}\u{6d}\u{65}\u{74}\u{68}\u{6f}\u{64}")
830+assert((info.namewhat == "\u{6d}\u{65}\u{74}\u{61}\u{6d}\u{65}\u{74}\u{68}\u{6f}\u{64}"))
831831a.op=info.name
832832return info.name
833833end
834834setmetatable(a,{["\u{5f}\u{5f}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = f,["\u{5f}\u{5f}\u{61}\u{64}\u{64}"] = f,["\u{5f}\u{5f}\u{64}\u{69}\u{76}"] = f,["\u{5f}\u{5f}\u{6d}\u{6f}\u{64}"] = f,["\u{5f}\u{5f}\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}"] = f,["\u{5f}\u{5f}\u{70}\u{6f}\u{77}"] = f,["\u{5f}\u{5f}\u{6d}\u{75}\u{6c}"] = f,["\u{5f}\u{5f}\u{69}\u{64}\u{69}\u{76}"] = f,["\u{5f}\u{5f}\u{75}\u{6e}\u{6d}"] = f,["\u{5f}\u{5f}\u{6c}\u{65}\u{6e}"] = f,["\u{5f}\u{5f}\u{73}\u{75}\u{62}"] = f,["\u{5f}\u{5f}\u{73}\u{68}\u{6c}"] = f,["\u{5f}\u{5f}\u{73}\u{68}\u{72}"] = f,["\u{5f}\u{5f}\u{62}\u{6f}\u{72}"] = f,["\u{5f}\u{5f}\u{62}\u{78}\u{6f}\u{72}"] = f,["\u{5f}\u{5f}\u{65}\u{71}"] = f,["\u{5f}\u{5f}\u{6c}\u{65}"] = f,["\u{5f}\u{5f}\u{6c}\u{74}"] = f,["\u{5f}\u{5f}\u{75}\u{6e}\u{6d}"] = f,["\u{5f}\u{5f}\u{6c}\u{65}\u{6e}"] = f,["\u{5f}\u{5f}\u{62}\u{61}\u{6e}\u{64}"] = f,["\u{5f}\u{5f}\u{62}\u{6e}\u{6f}\u{74}"] = f})
835835local b = setmetatable({},getmetatable(a))
836−assert(a[3] == "\u{69}\u{6e}\u{64}\u{65}\u{78}" and a ^ 3 == "\u{70}\u{6f}\u{77}" and a .. a == "\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}")
837−assert(a / 3 == "\u{64}\u{69}\u{76}" and 3 % a == "\u{6d}\u{6f}\u{64}")
838−assert(a + 3 == "\u{61}\u{64}\u{64}" and 3 - a == "\u{73}\u{75}\u{62}" and a * 3 == "\u{6d}\u{75}\u{6c}" and - a == "\u{75}\u{6e}\u{6d}" and # a == "\u{6c}\u{65}\u{6e}" and a & 3 == "\u{62}\u{61}\u{6e}\u{64}")
839−assert(a + 30000 == "\u{61}\u{64}\u{64}" and a - 3.0 == "\u{73}\u{75}\u{62}" and a * 3.0 == "\u{6d}\u{75}\u{6c}" and - a == "\u{75}\u{6e}\u{6d}" and # a == "\u{6c}\u{65}\u{6e}" and a & 3 == "\u{62}\u{61}\u{6e}\u{64}")
840−assert(a | 3 == "\u{62}\u{6f}\u{72}" and 3 ~ a == "\u{62}\u{78}\u{6f}\u{72}" and a << 3 == "\u{73}\u{68}\u{6c}" and a >> 1 == "\u{73}\u{68}\u{72}")
841−assert(a == b and a.op == "\u{65}\u{71}")
842−assert(a >= b and a.op == "\u{6c}\u{65}")
843−assert("\u{78}" >= a and a.op == "\u{6c}\u{65}")
844−assert(a > b and a.op == "\u{6c}\u{74}")
845−assert(a > 10 and a.op == "\u{6c}\u{74}")
846−assert(~ a == "\u{62}\u{6e}\u{6f}\u{74}")
836+assert((((a[0x3] == "\u{69}\u{6e}\u{64}\u{65}\u{78}") and ((a ^ 0x3) == "\u{70}\u{6f}\u{77}")) and ((a .. a) == "\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}")))
837+assert((((a / 0x3) == "\u{64}\u{69}\u{76}") and ((0x3 % a) == "\u{6d}\u{6f}\u{64}")))
838+assert((((((a + 0x3) == "\u{61}\u{64}\u{64}") and ((0x3 - a) == "\u{73}\u{75}\u{62}")) and ((a * 0x3) == "\u{6d}\u{75}\u{6c}")) and (- ((a == "\u{75}\u{6e}\u{6d}") and (# ((a == "\u{6c}\u{65}\u{6e}") and ((a & 0x3) == "\u{62}\u{61}\u{6e}\u{64}")))))))
839+assert((((((a + 0x7530) == "\u{61}\u{64}\u{64}") and ((a - 3.0) == "\u{73}\u{75}\u{62}")) and ((a * 3.0) == "\u{6d}\u{75}\u{6c}")) and (- ((a == "\u{75}\u{6e}\u{6d}") and (# ((a == "\u{6c}\u{65}\u{6e}") and ((a & 0x3) == "\u{62}\u{61}\u{6e}\u{64}")))))))
840+assert((((((a | 0x3) == "\u{62}\u{6f}\u{72}") and ((0x3 ~ a) == "\u{62}\u{78}\u{6f}\u{72}")) and ((a << 0x3) == "\u{73}\u{68}\u{6c}")) and ((a >> 0x1) == "\u{73}\u{68}\u{72}")))
841+assert(((a == b) and (a.op == "\u{65}\u{71}")))
842+assert(((a >= b) and (a.op == "\u{6c}\u{65}")))
843+assert((("\u{78}" >= a) and (a.op == "\u{6c}\u{65}")))
844+assert(((a > b) and (a.op == "\u{6c}\u{74}")))
845+assert(((a > 0xa) and (a.op == "\u{6c}\u{74}")))
846+assert((~ (a == "\u{62}\u{6e}\u{6f}\u{74}")))
847847do
848848local function f
849849()
850−assert(debug.getinfo(1).name == "\u{66}\u{6f}\u{72}\u{20}\u{69}\u{74}\u{65}\u{72}\u{61}\u{74}\u{6f}\u{72}")
850+assert((debug.getinfo(0x1).name == "\u{66}\u{6f}\u{72}\u{20}\u{69}\u{74}\u{65}\u{72}\u{61}\u{74}\u{6f}\u{72}"))
851851end
852852for i in f
853853do
@@ -857,27 +857,27 @@ end
857857do
858858local name = nil
859859setmetatable({},{["\u{5f}\u{5f}\u{67}\u{63}"] = function ()
860−local t = debug.getinfo(1)
861−assert(t.namewhat == "\u{6d}\u{65}\u{74}\u{61}\u{6d}\u{65}\u{74}\u{68}\u{6f}\u{64}")
860+local t = debug.getinfo(0x1)
861+assert((t.namewhat == "\u{6d}\u{65}\u{74}\u{61}\u{6d}\u{65}\u{74}\u{68}\u{6f}\u{64}"))
862862name=t.name
863863end})
864864repeat
865865local a = {}
866866until name
867−assert(name == "\u{5f}\u{5f}\u{67}\u{63}")
867+assert((name == "\u{5f}\u{5f}\u{67}\u{63}"))
868868end
869869do
870870print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{72}\u{61}\u{63}\u{65}\u{62}\u{61}\u{63}\u{6b}\u{20}\u{73}\u{69}\u{7a}\u{65}\u{73}")
871871local function countlines
872872(s)
873−return select(2,string.gsub(s,"\u{a}",""))
873+return select(0x2,string.gsub(s,"\u{a}",""))
874874end
875875local function deep
876876(lvl,n)
877−if lvl == 0 then
878−return (debug.traceback("\u{6d}\u{65}\u{73}\u{73}\u{61}\u{67}\u{65}",n))
877+if (lvl == 0x0) then
878+return debug.traceback("\u{6d}\u{65}\u{73}\u{73}\u{61}\u{67}\u{65}",n)
879879else
880−return (deep(lvl - 1,n))
880+return deep((lvl - 0x1),n)
881881end
882882end
883883local function checkdeep
@@ -885,19 +885,19 @@ local function checkdeep
885885local s = deep(total,start)
886886local rest = string.match(s,"\u{5e}\u{6d}\u{65}\u{73}\u{73}\u{61}\u{67}\u{65}\u{a}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{74}\u{72}\u{61}\u{63}\u{65}\u{62}\u{61}\u{63}\u{6b}\u{3a}\u{a}\u{28}\u{2e}\u{2a}\u{29}\u{24}")
887887local cl = countlines(rest)
888−assert(cl <= 10 + 11 + 1)
888+assert((cl <= ((0xa + 0xb) + 0x1)))
889889local brk = string.find(rest,"\u{25}\u{2e}\u{25}\u{2e}\u{25}\u{2e}\u{9}\u{25}\u{28}\u{73}\u{6b}\u{69}\u{70}")
890890if brk then
891−local rest1 = string.sub(rest,1,brk)
892−local rest2 = string.sub(rest,brk,# rest)
893−assert(countlines(rest1) == 10 and countlines(rest2) == 11)
891+local rest1 = string.sub(rest,0x1,brk)
892+local rest2 = string.sub(rest,brk,(# rest))
893+assert(((countlines(rest1) == 0xa) and (countlines(rest2) == 0xb)))
894894else
895−assert(cl == total - start + 2)
895+assert((cl == ((total - start) + 0x2)))
896896end
897897end
898−for d = 1, 51, 10
898+for d = 0x1, 0x33, 0xa
899899do
900−for l = 1, d
900+for l = 0x1, d
901901do
902902coroutine.wrap(checkdeep)(d,l)
903903end
@@ -906,42 +906,42 @@ end
906906print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{64}\u{65}\u{62}\u{75}\u{67}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{73}\u{20}\u{6f}\u{6e}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}\u{20}\u{77}\u{69}\u{74}\u{68}\u{6f}\u{75}\u{74}\u{20}\u{64}\u{65}\u{62}\u{75}\u{67}\u{20}\u{69}\u{6e}\u{66}\u{6f}")
907907local prog = "\u{2d}\u{2d}\u{20}\u{70}\u{72}\u{6f}\u{67}\u{72}\u{61}\u{6d}\u{20}\u{74}\u{6f}\u{20}\u{62}\u{65}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{65}\u{64}\u{20}\u{77}\u{69}\u{74}\u{68}\u{6f}\u{75}\u{74}\u{20}\u{64}\u{65}\u{62}\u{75}\u{67}\u{20}\u{69}\u{6e}\u{66}\u{6f}\u{72}\u{6d}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{73}\u{74}\u{72}\u{69}\u{70}\u{29}\u{a}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{64}\u{65}\u{62}\u{75}\u{67}\u{20}\u{3d}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{27}\u{64}\u{65}\u{62}\u{75}\u{67}\u{27}\u{a}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{31}\u{32}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{61}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{76}\u{61}\u{72}\u{69}\u{61}\u{62}\u{6c}\u{65}\u{a}\u{a}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{6e}\u{2c}\u{20}\u{76}\u{20}\u{3d}\u{20}\u{64}\u{65}\u{62}\u{75}\u{67}\u{2e}\u{67}\u{65}\u{74}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{28}\u{31}\u{2c}\u{20}\u{31}\u{29}\u{a}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{6e}\u{20}\u{3d}\u{3d}\u{20}\u{22}\u{28}\u{74}\u{65}\u{6d}\u{70}\u{6f}\u{72}\u{61}\u{72}\u{79}\u{29}\u{22}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{76}\u{20}\u{3d}\u{3d}\u{20}\u{64}\u{65}\u{62}\u{75}\u{67}\u{29}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{75}\u{6e}\u{6b}\u{6f}\u{77}\u{6e}\u{20}\u{6e}\u{61}\u{6d}\u{65}\u{20}\u{62}\u{75}\u{74}\u{20}\u{6b}\u{6e}\u{6f}\u{77}\u{6e}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{a}\u{6e}\u{2c}\u{20}\u{76}\u{20}\u{3d}\u{20}\u{64}\u{65}\u{62}\u{75}\u{67}\u{2e}\u{67}\u{65}\u{74}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{28}\u{31}\u{2c}\u{20}\u{32}\u{29}\u{a}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{6e}\u{20}\u{3d}\u{3d}\u{20}\u{22}\u{28}\u{74}\u{65}\u{6d}\u{70}\u{6f}\u{72}\u{61}\u{72}\u{79}\u{29}\u{22}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{76}\u{20}\u{3d}\u{3d}\u{20}\u{31}\u{32}\u{29}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{75}\u{6e}\u{6b}\u{6f}\u{77}\u{6e}\u{20}\u{6e}\u{61}\u{6d}\u{65}\u{20}\u{62}\u{75}\u{74}\u{20}\u{6b}\u{6e}\u{6f}\u{77}\u{6e}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{a}\u{a}\u{2d}\u{2d}\u{20}\u{61}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{61}\u{6e}\u{20}\u{75}\u{70}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{a}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{66}\u{20}\u{3d}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{29}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{78}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{61}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{6e}\u{2c}\u{20}\u{76}\u{20}\u{3d}\u{20}\u{64}\u{65}\u{62}\u{75}\u{67}\u{2e}\u{67}\u{65}\u{74}\u{75}\u{70}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{28}\u{66}\u{2c}\u{20}\u{31}\u{29}\u{a}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{6e}\u{20}\u{3d}\u{3d}\u{20}\u{22}\u{28}\u{6e}\u{6f}\u{20}\u{6e}\u{61}\u{6d}\u{65}\u{29}\u{22}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{76}\u{20}\u{3d}\u{3d}\u{20}\u{31}\u{32}\u{29}\u{a}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{64}\u{65}\u{62}\u{75}\u{67}\u{2e}\u{73}\u{65}\u{74}\u{75}\u{70}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{28}\u{66}\u{2c}\u{20}\u{31}\u{2c}\u{20}\u{31}\u{33}\u{29}\u{20}\u{3d}\u{3d}\u{20}\u{22}\u{28}\u{6e}\u{6f}\u{20}\u{6e}\u{61}\u{6d}\u{65}\u{29}\u{22}\u{29}\u{a}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{61}\u{20}\u{3d}\u{3d}\u{20}\u{31}\u{33}\u{29}\u{a}\u{a}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{74}\u{20}\u{3d}\u{20}\u{64}\u{65}\u{62}\u{75}\u{67}\u{2e}\u{67}\u{65}\u{74}\u{69}\u{6e}\u{66}\u{6f}\u{28}\u{66}\u{29}\u{a}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{74}\u{2e}\u{6e}\u{61}\u{6d}\u{65}\u{20}\u{3d}\u{3d}\u{20}\u{6e}\u{69}\u{6c}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{74}\u{2e}\u{6c}\u{69}\u{6e}\u{65}\u{64}\u{65}\u{66}\u{69}\u{6e}\u{65}\u{64}\u{20}\u{3e}\u{20}\u{30}\u{20}\u{61}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{74}\u{2e}\u{6c}\u{61}\u{73}\u{74}\u{6c}\u{69}\u{6e}\u{65}\u{64}\u{65}\u{66}\u{69}\u{6e}\u{65}\u{64}\u{20}\u{3d}\u{3d}\u{20}\u{74}\u{2e}\u{6c}\u{69}\u{6e}\u{65}\u{64}\u{65}\u{66}\u{69}\u{6e}\u{65}\u{64}\u{20}\u{61}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{74}\u{2e}\u{73}\u{68}\u{6f}\u{72}\u{74}\u{5f}\u{73}\u{72}\u{63}\u{20}\u{3d}\u{3d}\u{20}\u{22}\u{3f}\u{22}\u{29}\u{a}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{64}\u{65}\u{62}\u{75}\u{67}\u{2e}\u{67}\u{65}\u{74}\u{69}\u{6e}\u{66}\u{6f}\u{28}\u{31}\u{29}\u{2e}\u{63}\u{75}\u{72}\u{72}\u{65}\u{6e}\u{74}\u{6c}\u{69}\u{6e}\u{65}\u{20}\u{3d}\u{3d}\u{20}\u{2d}\u{31}\u{29}\u{a}\u{a}\u{74}\u{20}\u{3d}\u{20}\u{64}\u{65}\u{62}\u{75}\u{67}\u{2e}\u{67}\u{65}\u{74}\u{69}\u{6e}\u{66}\u{6f}\u{28}\u{66}\u{2c}\u{20}\u{22}\u{4c}\u{22}\u{29}\u{2e}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{6c}\u{69}\u{6e}\u{65}\u{73}\u{a}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{6e}\u{65}\u{78}\u{74}\u{28}\u{74}\u{29}\u{20}\u{3d}\u{3d}\u{20}\u{6e}\u{69}\u{6c}\u{29}\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{73}\u{20}\u{61}\u{72}\u{65}\u{20}\u{65}\u{6d}\u{70}\u{74}\u{79}\u{a}\u{a}\u{2d}\u{2d}\u{20}\u{64}\u{75}\u{6d}\u{70}\u{2f}\u{6c}\u{6f}\u{61}\u{64}\u{20}\u{61}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{77}\u{69}\u{74}\u{68}\u{6f}\u{75}\u{74}\u{20}\u{64}\u{65}\u{62}\u{75}\u{67}\u{20}\u{69}\u{6e}\u{66}\u{6f}\u{a}\u{66}\u{20}\u{3d}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{28}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{2e}\u{64}\u{75}\u{6d}\u{70}\u{28}\u{66}\u{29}\u{29}\u{a}\u{a}\u{74}\u{20}\u{3d}\u{20}\u{64}\u{65}\u{62}\u{75}\u{67}\u{2e}\u{67}\u{65}\u{74}\u{69}\u{6e}\u{66}\u{6f}\u{28}\u{66}\u{29}\u{a}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{74}\u{2e}\u{6e}\u{61}\u{6d}\u{65}\u{20}\u{3d}\u{3d}\u{20}\u{6e}\u{69}\u{6c}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{74}\u{2e}\u{6c}\u{69}\u{6e}\u{65}\u{64}\u{65}\u{66}\u{69}\u{6e}\u{65}\u{64}\u{20}\u{3e}\u{20}\u{30}\u{20}\u{61}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{74}\u{2e}\u{6c}\u{61}\u{73}\u{74}\u{6c}\u{69}\u{6e}\u{65}\u{64}\u{65}\u{66}\u{69}\u{6e}\u{65}\u{64}\u{20}\u{3d}\u{3d}\u{20}\u{74}\u{2e}\u{6c}\u{69}\u{6e}\u{65}\u{64}\u{65}\u{66}\u{69}\u{6e}\u{65}\u{64}\u{20}\u{61}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{74}\u{2e}\u{73}\u{68}\u{6f}\u{72}\u{74}\u{5f}\u{73}\u{72}\u{63}\u{20}\u{3d}\u{3d}\u{20}\u{22}\u{3f}\u{22}\u{29}\u{a}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{64}\u{65}\u{62}\u{75}\u{67}\u{2e}\u{67}\u{65}\u{74}\u{69}\u{6e}\u{66}\u{6f}\u{28}\u{31}\u{29}\u{2e}\u{63}\u{75}\u{72}\u{72}\u{65}\u{6e}\u{74}\u{6c}\u{69}\u{6e}\u{65}\u{20}\u{3d}\u{3d}\u{20}\u{2d}\u{31}\u{29}\u{a}\u{a}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{61}\u{a}"
908908local f = assert(load(string.dump(load(prog),true)))
909−assert(f() == 13)
909+assert((f() == 0xd))
910910do
911911local function foo
912912()
913−local a = 1
914−local b = 2
913+local a = 0x1
914+local b = 0x2
915915return b
916916end
917917local s = load(string.dump(foo,true))
918918local line = true
919919debug.sethook(function (e,l)
920−assert(e == "\u{6c}\u{69}\u{6e}\u{65}")
920+assert((e == "\u{6c}\u{69}\u{6e}\u{65}"))
921921line=l
922922end,"\u{6c}")
923−assert(s() == 2)
923+assert((s() == 0x2))
924924;
925925debug.sethook(nil)
926−assert(line == nil)
926+assert((line == nil))
927927end
928928do
929929local prog = "\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{78}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{79}\u{29}\u{20}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{78}\u{20}\u{2b}\u{20}\u{79}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}"
930−local name = string.rep("\u{78}",1000)
930+local name = string.rep("\u{78}",0x3e8)
931931local p = assert(load(prog,name))
932932local c = string.dump(p)
933−assert(# c > 1000 and # c < 2000)
933+assert((# ((c > 0x3e8) and (# (c < 0x7d0)))))
934934local f = assert(load(c))
935935local g = f()
936−local h = g(3)
937−assert(h(5) == 8)
938−assert(debug.getinfo(f).source == name and debug.getinfo(g).source == name and debug.getinfo(h).source == name)
936+local h = g(0x3)
937+assert((h(0x5) == 0x8))
938+assert((((debug.getinfo(f).source == name) and (debug.getinfo(g).source == name)) and (debug.getinfo(h).source == name)))
939939local c = string.dump(p,true)
940−assert(# c < 500)
940+assert((# (c < 0x1f4)))
941941local f = assert(load(c))
942942local g = f()
943−local h = g(30)
944−assert(h(50) == 80)
945−assert(debug.getinfo(f).source == "\u{3d}\u{3f}" and debug.getinfo(g).source == "\u{3d}\u{3f}" and debug.getinfo(h).source == "\u{3d}\u{3f}")
943+local h = g(0x1e)
944+assert((h(0x32) == 0x50))
945+assert((((debug.getinfo(f).source == "\u{3d}\u{3f}") and (debug.getinfo(g).source == "\u{3d}\u{3f}")) and (debug.getinfo(h).source == "\u{3d}\u{3f}")))
946946end
947947print("\u{4f}\u{4b}")
zod/luau/res/lua/cycled/errors.lua → desk/res/lua/cycled/errors.luarenamed+146−146
@@ -1,21 +1,21 @@
11print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{73}")
22local debug = require("\u{64}\u{65}\u{62}\u{75}\u{67}")
3−local mt = getmetatable(_G) or {}
3+local mt = (getmetatable(_G) or {})
44local oldmm = mt.__index
55mt.__index=nil
66local function checkerr
77(msg,f, ...)
88local st,err = pcall(f,...)
9−assert(not st and string.find(err,msg))
9+assert((not (st and string.find(err,msg))))
1010end
1111local function doit
1212(s)
1313local f,msg = load(s)
14−if not f then
14+if (not f) then
1515return msg
1616end
1717local cond,msg = pcall(f)
18−return (not cond) and msg
18+return ((not cond) and msg)
1919end
2020local function checkmessage
2121(prog,msg,debug)
@@ -23,24 +23,24 @@ local m = doit(prog)
2323if debug then
2424print(m,msg)
2525end
26−assert(string.find(m,msg,1,true))
26+assert(string.find(m,msg,0x1,true))
2727end
2828local function checksyntax
2929(prog,extra,token,line)
3030local msg = doit(prog)
31−if not string.find(token,"\u{5e}\u{3c}\u{25}\u{61}") and not string.find(token,"\u{5e}\u{63}\u{68}\u{61}\u{72}\u{25}\u{28}") then
32−token="\u{27}" .. token .. "\u{27}"
31+if (not (string.find(token,"\u{5e}\u{3c}\u{25}\u{61}") and (not string.find(token,"\u{5e}\u{63}\u{68}\u{61}\u{72}\u{25}\u{28}")))) then
32+token=("\u{27}" .. (token .. "\u{27}"))
3333end
3434token=string.gsub(token,"\u{28}\u{25}\u{70}\u{29}","\u{25}\u{25}\u{25}\u{31}")
3535local pt = string.format("\u{5e}\u{25}\u{25}\u{5b}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{22}\u{2e}\u{2a}\u{22}\u{25}\u{25}\u{5d}\u{3a}\u{25}\u{64}\u{3a}\u{20}\u{2e}\u{2d}\u{20}\u{6e}\u{65}\u{61}\u{72}\u{20}\u{25}\u{73}\u{24}",line,token)
3636assert(string.find(msg,pt))
37−assert(string.find(msg,msg,1,true))
37+assert(string.find(msg,msg,0x1,true))
3838end
39−assert(doit("\u{65}\u{72}\u{72}\u{6f}\u{72}\u{28}\u{27}\u{68}\u{69}\u{27}\u{2c}\u{20}\u{30}\u{29}") == "\u{68}\u{69}")
40−assert(doit("\u{65}\u{72}\u{72}\u{6f}\u{72}\u{28}\u{29}") == nil)
39+assert((doit("\u{65}\u{72}\u{72}\u{6f}\u{72}\u{28}\u{27}\u{68}\u{69}\u{27}\u{2c}\u{20}\u{30}\u{29}") == "\u{68}\u{69}"))
40+assert((doit("\u{65}\u{72}\u{72}\u{6f}\u{72}\u{28}\u{29}") == nil))
4141assert(doit("\u{74}\u{61}\u{62}\u{6c}\u{65}\u{2e}\u{75}\u{6e}\u{70}\u{61}\u{63}\u{6b}\u{28}\u{7b}\u{7d}\u{2c}\u{20}\u{31}\u{2c}\u{20}\u{6e}\u{3d}\u{32}\u{5e}\u{33}\u{30}\u{29}"))
4242assert(doit("\u{61}\u{3d}\u{6d}\u{61}\u{74}\u{68}\u{2e}\u{73}\u{69}\u{6e}\u{28}\u{29}"))
43−assert(not doit("\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{28}\u{31}\u{29}") and doit("\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{28}\u{29}"))
43+assert((not (doit("\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{28}\u{31}\u{29}") and doit("\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{28}\u{29}"))))
4444assert(doit("\u{74}\u{6f}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}\u{28}\u{29}"))
4545assert(doit("\u{72}\u{65}\u{70}\u{65}\u{61}\u{74}\u{20}\u{75}\u{6e}\u{74}\u{69}\u{6c}\u{20}\u{31}\u{3b}\u{20}\u{61}"))
4646assert(doit("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{3b}\u{3b}"))
@@ -49,36 +49,36 @@ assert(doit("\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{6e}\u{69}\u{6c}\u{29}"
4949assert(doit("\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{61}\u{20}\u{28}\u{2e}\u{2e}\u{2e}\u{20}\u{2c}\u{20}\u{2e}\u{2e}\u{2e}\u{29}\u{20}\u{65}\u{6e}\u{64}"))
5050assert(doit("\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{61}\u{20}\u{28}\u{2c}\u{20}\u{2e}\u{2e}\u{2e}\u{29}\u{20}\u{65}\u{6e}\u{64}"))
5151assert(doit("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{74}\u{3d}\u{7b}\u{7d}\u{3b}\u{20}\u{74}\u{20}\u{3d}\u{20}\u{74}\u{5b}\u{23}\u{74}\u{5d}\u{20}\u{2b}\u{20}\u{31}"))
52−checksyntax("\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{7b}\u{34}\u{a}\u{a}","\u{27}\u{7d}\u{27}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{28}\u{74}\u{6f}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{27}\u{7b}\u{27}\u{20}\u{61}\u{74}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{20}\u{31}\u{29}","\u{3c}\u{65}\u{6f}\u{66}\u{3e}",3)
52+checksyntax("\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{7b}\u{34}\u{a}\u{a}","\u{27}\u{7d}\u{27}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{28}\u{74}\u{6f}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{27}\u{7b}\u{27}\u{20}\u{61}\u{74}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{20}\u{31}\u{29}","\u{3c}\u{65}\u{6f}\u{66}\u{3e}",0x3)
5353do
5454local function checksyntax
5555(prog,msg,line)
5656local st,err = load(prog)
57−assert(string.find(err,"\u{6c}\u{69}\u{6e}\u{65}\u{20}" .. line))
58−assert(string.find(err,msg,1,true))
57+assert(string.find(err,("\u{6c}\u{69}\u{6e}\u{65}\u{20}" .. line)))
58+assert(string.find(err,msg,0x1,true))
5959end
60−checksyntax("\u{20}\u{20}\u{20}\u{20}\u{3a}\u{3a}\u{41}\u{3a}\u{3a}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{31}\u{a}\u{20}\u{20}\u{20}\u{20}\u{3a}\u{3a}\u{41}\u{3a}\u{3a}\u{a}\u{20}\u{20}","\u{6c}\u{61}\u{62}\u{65}\u{6c}\u{20}\u{27}\u{41}\u{27}\u{20}\u{61}\u{6c}\u{72}\u{65}\u{61}\u{64}\u{79}\u{20}\u{64}\u{65}\u{66}\u{69}\u{6e}\u{65}\u{64}",1)
61−checksyntax("\u{20}\u{20}\u{20}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{31}\u{a}\u{20}\u{20}\u{20}\u{20}\u{67}\u{6f}\u{74}\u{6f}\u{20}\u{41}\u{a}\u{20}\u{20}\u{20}\u{20}\u{64}\u{6f}\u{20}\u{3a}\u{3a}\u{41}\u{3a}\u{3a}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}","\u{6e}\u{6f}\u{20}\u{76}\u{69}\u{73}\u{69}\u{62}\u{6c}\u{65}\u{20}\u{6c}\u{61}\u{62}\u{65}\u{6c}\u{20}\u{27}\u{41}\u{27}",2)
60+checksyntax("\u{20}\u{20}\u{20}\u{20}\u{3a}\u{3a}\u{41}\u{3a}\u{3a}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{31}\u{a}\u{20}\u{20}\u{20}\u{20}\u{3a}\u{3a}\u{41}\u{3a}\u{3a}\u{a}\u{20}\u{20}","\u{6c}\u{61}\u{62}\u{65}\u{6c}\u{20}\u{27}\u{41}\u{27}\u{20}\u{61}\u{6c}\u{72}\u{65}\u{61}\u{64}\u{79}\u{20}\u{64}\u{65}\u{66}\u{69}\u{6e}\u{65}\u{64}",0x1)
61+checksyntax("\u{20}\u{20}\u{20}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{31}\u{a}\u{20}\u{20}\u{20}\u{20}\u{67}\u{6f}\u{74}\u{6f}\u{20}\u{41}\u{a}\u{20}\u{20}\u{20}\u{20}\u{64}\u{6f}\u{20}\u{3a}\u{3a}\u{41}\u{3a}\u{3a}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}","\u{6e}\u{6f}\u{20}\u{76}\u{69}\u{73}\u{69}\u{62}\u{6c}\u{65}\u{20}\u{6c}\u{61}\u{62}\u{65}\u{6c}\u{20}\u{27}\u{41}\u{27}",0x2)
6262end
63−if not T then
63+if (not T) then
6464(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{6d}\u{65}\u{73}\u{73}\u{61}\u{67}\u{65}\u{73}\u{20}\u{69}\u{6e}\u{20}\u{43}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
6565else
6666print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{6d}\u{65}\u{73}\u{73}\u{61}\u{67}\u{65}")
6767local a = {}
68−for i = 1, 10000
68+for i = 0x1, 0x2710
6969do
7070a[i]=true
7171end
7272collectgarbage()
73−T.totalmem(T.totalmem() + 10000)
73+T.totalmem((T.totalmem() + 0x2710))
7474local st,msg = pcall(function ()
75−for i = 1, 100000
75+for i = 0x1, 0x186a0
7676do
7777a[i]=tostring(i)
7878end
7979end)
80−T.totalmem(0)
81−assert(not st and msg == "\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}" .. "\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}")
80+T.totalmem(0x0)
81+assert((not (st and (msg == ("\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}" .. "\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}")))))
8282local res = T.testC("\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{70}\u{75}\u{73}\u{68}\u{20}\u{31}\u{36}\u{20}\u{65}\u{6c}\u{65}\u{6d}\u{65}\u{6e}\u{74}\u{73}\u{20}\u{6f}\u{6e}\u{20}\u{74}\u{68}\u{65}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{74}\u{72}\u{61}\u{63}\u{65}\u{62}\u{61}\u{63}\u{6b}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{77}\u{6f}\u{72}\u{6b}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{34}\u{20}\u{72}\u{65}\u{6d}\u{61}\u{69}\u{6e}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{6c}\u{6f}\u{74}\u{73}\u{a}\u{20}\u{20}\u{20}\u{20}\u{74}\u{72}\u{61}\u{63}\u{65}\u{62}\u{61}\u{63}\u{6b}\u{20}\u{78}\u{75}\u{78}\u{75}\u{20}\u{31}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{a}\u{20}\u{20}")
8383assert(string.find(res,"\u{78}\u{75}\u{78}\u{75}\u{2e}\u{2d}\u{6d}\u{61}\u{69}\u{6e}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}"))
8484end
@@ -89,7 +89,7 @@ checkmessage("\u{61}\u{20}\u{3d}\u{20}\u{7b}\u{7d}\u{20}\u{3c}\u{3d}\u{20}\u{31}
8989checkmessage("\u{61}\u{61}\u{61}\u{3d}\u{31}\u{3b}\u{20}\u{62}\u{62}\u{62}\u{62}\u{3d}\u{32}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{3d}\u{6d}\u{61}\u{74}\u{68}\u{2e}\u{73}\u{69}\u{6e}\u{28}\u{33}\u{29}\u{2b}\u{62}\u{62}\u{62}\u{62}\u{28}\u{33}\u{29}","\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{27}\u{62}\u{62}\u{62}\u{62}\u{27}")
9090checkmessage("\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{7d}\u{3b}\u{20}\u{64}\u{6f}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{61}\u{61}\u{3d}\u{31}\u{20}\u{65}\u{6e}\u{64}\u{20}\u{61}\u{61}\u{61}\u{3a}\u{62}\u{62}\u{62}\u{62}\u{28}\u{33}\u{29}","\u{6d}\u{65}\u{74}\u{68}\u{6f}\u{64}\u{20}\u{27}\u{62}\u{62}\u{62}\u{62}\u{27}")
9191checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{3d}\u{7b}\u{7d}\u{3b}\u{20}\u{61}\u{2e}\u{62}\u{62}\u{62}\u{62}\u{28}\u{33}\u{29}","\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{62}\u{62}\u{62}\u{62}\u{27}")
92−assert(not string.find(doit("\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{31}\u{33}\u{7d}\u{3b}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{62}\u{62}\u{62}\u{62}\u{3d}\u{31}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{5b}\u{62}\u{62}\u{62}\u{62}\u{5d}\u{28}\u{33}\u{29}"),"\u{27}\u{62}\u{62}\u{62}\u{62}\u{27}"))
92+assert((not string.find(doit("\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{31}\u{33}\u{7d}\u{3b}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{62}\u{62}\u{62}\u{62}\u{3d}\u{31}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{5b}\u{62}\u{62}\u{62}\u{62}\u{5d}\u{28}\u{33}\u{29}"),"\u{27}\u{62}\u{62}\u{62}\u{62}\u{27}")))
9393checkmessage("\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{31}\u{33}\u{7d}\u{3b}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{62}\u{62}\u{62}\u{62}\u{3d}\u{31}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{5b}\u{62}\u{62}\u{62}\u{62}\u{5d}\u{28}\u{33}\u{29}","\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")
9494checkmessage("\u{61}\u{61}\u{61}\u{3d}\u{28}\u{31}\u{29}\u{2e}\u{2e}\u{7b}\u{7d}","\u{61}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}")
9595checkmessage("\u{61}\u{20}\u{3d}\u{20}\u{7b}\u{5f}\u{45}\u{4e}\u{56}\u{20}\u{3d}\u{20}\u{7b}\u{7d}\u{7d}\u{3b}\u{20}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{61}\u{2e}\u{5f}\u{45}\u{4e}\u{56}\u{2e}\u{78}\u{20}\u{2b}\u{20}\u{31}\u{29}","\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{78}\u{27}")
@@ -106,7 +106,7 @@ checkmessage("\u{61}\u{61}\u{61}\u{2e}\u{62}\u{62}\u{62}\u{3a}\u{64}\u{64}\u{64}
106106checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{62}\u{62}\u{62}\u{3d}\u{31}\u{7d}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{2e}\u{62}\u{62}\u{62}\u{3a}\u{64}\u{64}\u{64}\u{28}\u{39}\u{29}","\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{62}\u{62}\u{62}\u{27}")
107107checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{62}\u{62}\u{62}\u{3d}\u{7b}\u{7d}\u{7d}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{2e}\u{62}\u{62}\u{62}\u{3a}\u{64}\u{64}\u{64}\u{28}\u{39}\u{29}","\u{6d}\u{65}\u{74}\u{68}\u{6f}\u{64}\u{20}\u{27}\u{64}\u{64}\u{64}\u{27}")
108108checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{2c}\u{62}\u{2c}\u{63}\u{3b}\u{20}\u{28}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{29}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{62}\u{2b}\u{31}\u{2e}\u{31}\u{20}\u{65}\u{6e}\u{64}\u{29}\u{28}\u{29}","\u{75}\u{70}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{27}\u{62}\u{27}")
109−assert(not doit("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{62}\u{62}\u{62}\u{3d}\u{7b}\u{64}\u{64}\u{64}\u{3d}\u{6e}\u{65}\u{78}\u{74}\u{7d}\u{7d}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{2e}\u{62}\u{62}\u{62}\u{3a}\u{64}\u{64}\u{64}\u{28}\u{6e}\u{69}\u{6c}\u{29}"))
109+assert((not doit("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{62}\u{62}\u{62}\u{3d}\u{7b}\u{64}\u{64}\u{64}\u{3d}\u{6e}\u{65}\u{78}\u{74}\u{7d}\u{7d}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{2e}\u{62}\u{62}\u{62}\u{3a}\u{64}\u{64}\u{64}\u{28}\u{6e}\u{69}\u{6c}\u{29}")))
110110checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{2c}\u{62}\u{2c}\u{63}\u{63}\u{3b}\u{20}\u{28}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{29}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{63}\u{63}\u{5b}\u{31}\u{5d}\u{20}\u{65}\u{6e}\u{64}\u{29}\u{28}\u{29}","\u{75}\u{70}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{27}\u{63}\u{63}\u{27}")
111111checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{2c}\u{62}\u{2c}\u{63}\u{63}\u{3b}\u{20}\u{28}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{29}\u{20}\u{61}\u{2e}\u{78}\u{20}\u{3d}\u{20}\u{31}\u{20}\u{65}\u{6e}\u{64}\u{29}\u{28}\u{29}","\u{75}\u{70}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{27}\u{61}\u{27}")
112112checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{5f}\u{45}\u{4e}\u{56}\u{20}\u{3d}\u{20}\u{7b}\u{78}\u{3d}\u{7b}\u{7d}\u{7d}\u{3b}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{61}\u{20}\u{2b}\u{20}\u{31}","\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{27}\u{61}\u{27}")
@@ -118,8 +118,8 @@ checkmessage("\u{61}\u{61}\u{61}\u{3d}\u{31}\u{3b}\u{20}\u{6c}\u{6f}\u{63}\u{61}
118118checkmessage("\u{61}\u{61}\u{61}\u{3d}\u{31}\u{3b}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{61}\u{61}\u{2c}\u{62}\u{62}\u{62}\u{62}\u{3d}\u{32}\u{2c}\u{33}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{20}\u{3d}\u{20}\u{62}\u{62}\u{62}\u{62}\u{28}\u{31}\u{29}\u{20}\u{6f}\u{72}\u{20}\u{61}\u{61}\u{61}\u{28}\u{33}\u{29}","\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{27}\u{62}\u{62}\u{62}\u{62}\u{27}")
119119checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{2c}\u{62}\u{2c}\u{63}\u{2c}\u{66}\u{20}\u{3d}\u{20}\u{31}\u{2c}\u{31}\u{2c}\u{31}\u{3b}\u{20}\u{66}\u{28}\u{28}\u{61}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{62}\u{29}\u{20}\u{6f}\u{72}\u{20}\u{63}\u{29}","\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{27}\u{66}\u{27}")
120120checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{2c}\u{62}\u{2c}\u{63}\u{20}\u{3d}\u{20}\u{31}\u{2c}\u{31}\u{2c}\u{31}\u{3b}\u{20}\u{28}\u{28}\u{61}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{62}\u{29}\u{20}\u{6f}\u{72}\u{20}\u{63}\u{29}\u{28}\u{29}","\u{63}\u{61}\u{6c}\u{6c}\u{20}\u{61}\u{20}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}")
121−assert(not string.find(doit("\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{7d}\u{3b}\u{20}\u{78}\u{3d}\u{28}\u{61}\u{61}\u{61}\u{20}\u{6f}\u{72}\u{20}\u{61}\u{61}\u{61}\u{29}\u{2b}\u{28}\u{61}\u{61}\u{61}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{61}\u{61}\u{61}\u{29}"),"\u{27}\u{61}\u{61}\u{61}\u{27}"))
122−assert(not string.find(doit("\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{7d}\u{3b}\u{20}\u{28}\u{61}\u{61}\u{61}\u{20}\u{6f}\u{72}\u{20}\u{61}\u{61}\u{61}\u{29}\u{28}\u{29}"),"\u{27}\u{61}\u{61}\u{61}\u{27}"))
121+assert((not string.find(doit("\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{7d}\u{3b}\u{20}\u{78}\u{3d}\u{28}\u{61}\u{61}\u{61}\u{20}\u{6f}\u{72}\u{20}\u{61}\u{61}\u{61}\u{29}\u{2b}\u{28}\u{61}\u{61}\u{61}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{61}\u{61}\u{61}\u{29}"),"\u{27}\u{61}\u{61}\u{61}\u{27}")))
122+assert((not string.find(doit("\u{61}\u{61}\u{61}\u{3d}\u{7b}\u{7d}\u{3b}\u{20}\u{28}\u{61}\u{61}\u{61}\u{20}\u{6f}\u{72}\u{20}\u{61}\u{61}\u{61}\u{29}\u{28}\u{29}"),"\u{27}\u{61}\u{61}\u{61}\u{27}")))
123123checkmessage("\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{20}\u{3c}\u{20}\u{31}\u{30}\u{29}","\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")
124124checkmessage("\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{20}\u{3c}\u{20}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{29}","\u{74}\u{77}\u{6f}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{73}")
125125checkmessage("\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{27}\u{31}\u{30}\u{27}\u{20}\u{3c}\u{20}\u{31}\u{30}\u{29}","\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")
@@ -166,47 +166,47 @@ checkmessage("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{58}\u{58}\u{20}\u{3c}
166166_G.XX=nil
167167if T then
168168local x = setmetatable({},{["\u{5f}\u{5f}\u{6e}\u{61}\u{6d}\u{65}"] = "\u{54}\u{41}\u{42}\u{4c}\u{45}"})
169−assert(T.testC("\u{4c}\u{74}\u{6f}\u{6c}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",x) == tostring(x))
169+assert((T.testC("\u{4c}\u{74}\u{6f}\u{6c}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{2d}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}",x) == tostring(x)))
170170local a,b = T.testC("\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{4c}\u{74}\u{6f}\u{6c}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{2d}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}",x)
171−assert(a == 10 and b == tostring(x))
171+assert(((a == 0xa) and (b == tostring(x))))
172172setmetatable(x,{["\u{5f}\u{5f}\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"] = function (o)
173−assert(o == x)
173+assert((o == x))
174174return "\u{41}\u{42}\u{43}"
175175end})
176176local a,b,c = T.testC("\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{31}\u{30}\u{3b}\u{20}\u{4c}\u{74}\u{6f}\u{6c}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{2d}\u{32}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}",x)
177−assert(a == x and b == 10 and c == "\u{41}\u{42}\u{43}")
177+assert((((a == x) and (b == 0xa)) and (c == "\u{41}\u{42}\u{43}")))
178178end
179179end
180180checkmessage("\u{28}\u{69}\u{6f}\u{2e}\u{77}\u{72}\u{69}\u{74}\u{65}\u{20}\u{6f}\u{72}\u{20}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{29}\u{7b}\u{7d}","\u{69}\u{6f}\u{2e}\u{77}\u{72}\u{69}\u{74}\u{65}")
181181checkmessage("\u{28}\u{63}\u{6f}\u{6c}\u{6c}\u{65}\u{63}\u{74}\u{67}\u{61}\u{72}\u{62}\u{61}\u{67}\u{65}\u{20}\u{6f}\u{72}\u{20}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{29}\u{7b}\u{7d}","\u{63}\u{6f}\u{6c}\u{6c}\u{65}\u{63}\u{74}\u{67}\u{61}\u{72}\u{62}\u{61}\u{67}\u{65}")
182182do
183183local f = function (a)
184−return a + 1
184+return (a + 0x1)
185185end
186186f=assert(load(string.dump(f,true)))
187−assert(f(3) == 4)
187+assert((f(0x3) == 0x4))
188188checkerr("\u{5e}\u{25}\u{3f}\u{3a}\u{25}\u{2d}\u{31}\u{3a}",f,{})
189189f=function ()
190190local a
191191;
192192a={}
193193;
194−return a + 2
194+return (a + 0x2)
195195end
196196f=assert(load(string.dump(f,true)))
197197checkerr("\u{5e}\u{25}\u{3f}\u{3a}\u{25}\u{2d}\u{31}\u{3a}\u{2e}\u{2a}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}",f)
198198end
199199local t = {}
200−for i = 1, 1000
200+for i = 0x1, 0x3e8
201201do
202−t[i]="\u{61}\u{61}\u{61}\u{20}\u{3d}\u{20}\u{78}" .. i
202+t[i]=("\u{61}\u{61}\u{61}\u{20}\u{3d}\u{20}\u{78}" .. i)
203203end
204204local s = table.concat(t,"\u{3b}\u{20}")
205205t=nil
206−checkmessage(s .. "\u{3b}\u{20}\u{61}\u{61}\u{61}\u{20}\u{3d}\u{20}\u{62}\u{62}\u{62}\u{20}\u{2b}\u{20}\u{31}","\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{27}\u{62}\u{62}\u{62}\u{27}")
207−checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{5f}\u{45}\u{4e}\u{56}\u{3d}\u{5f}\u{45}\u{4e}\u{56}\u{3b}" .. s .. "\u{3b}\u{20}\u{61}\u{61}\u{61}\u{20}\u{3d}\u{20}\u{62}\u{62}\u{62}\u{20}\u{2b}\u{20}\u{31}","\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{27}\u{62}\u{62}\u{62}\u{27}")
208−checkmessage(s .. "\u{3b}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{74}\u{20}\u{3d}\u{20}\u{7b}\u{7d}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{20}\u{3d}\u{20}\u{74}\u{2e}\u{62}\u{62}\u{62}\u{20}\u{2b}\u{20}\u{31}","\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{62}\u{62}\u{62}\u{27}")
209−checkmessage(s .. "\u{3b}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{74}\u{20}\u{3d}\u{20}\u{7b}\u{7d}\u{3b}\u{20}\u{74}\u{3a}\u{62}\u{62}\u{62}\u{28}\u{29}","\u{6d}\u{65}\u{74}\u{68}\u{6f}\u{64}\u{20}\u{27}\u{62}\u{62}\u{62}\u{27}")
206+checkmessage((s .. "\u{3b}\u{20}\u{61}\u{61}\u{61}\u{20}\u{3d}\u{20}\u{62}\u{62}\u{62}\u{20}\u{2b}\u{20}\u{31}"),"\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{27}\u{62}\u{62}\u{62}\u{27}")
207+checkmessage(("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{5f}\u{45}\u{4e}\u{56}\u{3d}\u{5f}\u{45}\u{4e}\u{56}\u{3b}" .. (s .. "\u{3b}\u{20}\u{61}\u{61}\u{61}\u{20}\u{3d}\u{20}\u{62}\u{62}\u{62}\u{20}\u{2b}\u{20}\u{31}")),"\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{27}\u{62}\u{62}\u{62}\u{27}")
208+checkmessage((s .. "\u{3b}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{74}\u{20}\u{3d}\u{20}\u{7b}\u{7d}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{20}\u{3d}\u{20}\u{74}\u{2e}\u{62}\u{62}\u{62}\u{20}\u{2b}\u{20}\u{31}"),"\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{62}\u{62}\u{62}\u{27}")
209+checkmessage((s .. "\u{3b}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{74}\u{20}\u{3d}\u{20}\u{7b}\u{7d}\u{3b}\u{20}\u{74}\u{3a}\u{62}\u{62}\u{62}\u{28}\u{29}"),"\u{6d}\u{65}\u{74}\u{68}\u{6f}\u{64}\u{20}\u{27}\u{62}\u{62}\u{62}\u{27}")
210210checkmessage("\u{61}\u{61}\u{61}\u{3d}\u{39}\u{a}\u{72}\u{65}\u{70}\u{65}\u{61}\u{74}\u{20}\u{75}\u{6e}\u{74}\u{69}\u{6c}\u{20}\u{33}\u{3d}\u{3d}\u{33}\u{a}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{78}\u{3d}\u{6d}\u{61}\u{74}\u{68}\u{2e}\u{73}\u{69}\u{6e}\u{28}\u{6d}\u{61}\u{74}\u{68}\u{2e}\u{63}\u{6f}\u{73}\u{28}\u{33}\u{29}\u{29}\u{a}\u{69}\u{66}\u{20}\u{6d}\u{61}\u{74}\u{68}\u{2e}\u{73}\u{69}\u{6e}\u{28}\u{31}\u{29}\u{20}\u{3d}\u{3d}\u{20}\u{78}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{6d}\u{61}\u{74}\u{68}\u{2e}\u{73}\u{69}\u{6e}\u{28}\u{31}\u{29}\u{20}\u{65}\u{6e}\u{64}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{74}\u{61}\u{69}\u{6c}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{a}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{2c}\u{62}\u{20}\u{3d}\u{20}\u{31}\u{2c}\u{20}\u{7b}\u{a}\u{20}\u{20}\u{7b}\u{78}\u{3d}\u{27}\u{61}\u{27}\u{2e}\u{2e}\u{27}\u{62}\u{27}\u{2e}\u{2e}\u{27}\u{63}\u{27}\u{2c}\u{20}\u{79}\u{3d}\u{27}\u{62}\u{27}\u{2c}\u{20}\u{7a}\u{3d}\u{78}\u{7d}\u{2c}\u{a}\u{20}\u{20}\u{7b}\u{31}\u{2c}\u{32}\u{2c}\u{33}\u{2c}\u{34}\u{2c}\u{35}\u{7d}\u{20}\u{6f}\u{72}\u{20}\u{33}\u{2b}\u{33}\u{3c}\u{3d}\u{33}\u{2b}\u{33}\u{2c}\u{a}\u{20}\u{20}\u{33}\u{2b}\u{31}\u{3e}\u{33}\u{2b}\u{31}\u{2c}\u{a}\u{20}\u{20}\u{7b}\u{64}\u{20}\u{3d}\u{20}\u{78}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{61}\u{61}\u{61}\u{5b}\u{78}\u{20}\u{6f}\u{72}\u{20}\u{79}\u{5d}\u{7d}\u{7d}\u{a}","\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{27}\u{61}\u{61}\u{61}\u{27}")
211211checkmessage("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{78}\u{2c}\u{79}\u{20}\u{3d}\u{20}\u{7b}\u{7d}\u{2c}\u{31}\u{a}\u{69}\u{66}\u{20}\u{6d}\u{61}\u{74}\u{68}\u{2e}\u{73}\u{69}\u{6e}\u{28}\u{31}\u{29}\u{20}\u{3d}\u{3d}\u{20}\u{30}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}\u{20}\u{65}\u{6e}\u{64}\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{a}\u{78}\u{2e}\u{61}\u{28}\u{29}","\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{61}\u{27}")
212212checkmessage("\u{70}\u{72}\u{65}\u{66}\u{69}\u{78}\u{20}\u{3d}\u{20}\u{6e}\u{69}\u{6c}\u{a}\u{69}\u{6e}\u{73}\u{65}\u{72}\u{74}\u{20}\u{3d}\u{20}\u{6e}\u{69}\u{6c}\u{a}\u{77}\u{68}\u{69}\u{6c}\u{65}\u{20}\u{31}\u{20}\u{64}\u{6f}\u{a}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{a}\u{20}\u{20}\u{69}\u{66}\u{20}\u{6e}\u{69}\u{6c}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{20}\u{62}\u{72}\u{65}\u{61}\u{6b}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{69}\u{6e}\u{73}\u{65}\u{72}\u{74}\u{28}\u{70}\u{72}\u{65}\u{66}\u{69}\u{78}\u{2c}\u{20}\u{61}\u{29}\u{a}\u{65}\u{6e}\u{64}","\u{67}\u{6c}\u{6f}\u{62}\u{61}\u{6c}\u{20}\u{27}\u{69}\u{6e}\u{73}\u{65}\u{72}\u{74}\u{27}")
@@ -236,68 +236,68 @@ end
236236assert(string.find(f(),"\u{43}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}"))
237237checkmessage("\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{2e}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{28}\u{29}","\u{6f}\u{75}\u{74}\u{73}\u{69}\u{64}\u{65}\u{20}\u{61}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}")
238238f=coroutine.wrap(function ()
239−table.sort({1,2,3},coroutine.yield)
239+table.sort({0x1,0x2,0x3},coroutine.yield)
240240end)
241241checkerr("\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{61}\u{63}\u{72}\u{6f}\u{73}\u{73}",f)
242−local idsize = 60 - 1
242+local idsize = (0x3c - 0x1)
243243local function checksize
244244(source)
245245local _,msg = load("\u{78}",source)
246246msg=string.match(msg,"\u{5e}\u{28}\u{5b}\u{5e}\u{3a}\u{5d}\u{2a}\u{29}\u{3a}")
247−assert(msg:len() <= idsize)
247+assert((msg:len() <= idsize))
248248end
249−for i = 60 - 10, 60 + 10
249+for i = (0x3c - 0xa), (0x3c + 0xa)
250250do
251−checksize("\u{40}" .. string.rep("\u{78}",i))
252−checksize(string.rep("\u{78}",i - 10))
253−checksize("\u{3d}" .. string.rep("\u{78}",i))
251+checksize(("\u{40}" .. string.rep("\u{78}",i)))
252+checksize(string.rep("\u{78}",(i - 0xa)))
253+checksize(("\u{3d}" .. string.rep("\u{78}",i)))
254254end
255255local function lineerror
256256(s,l)
257257local err,msg = pcall(load(s))
258258local line = tonumber(string.match(msg,"\u{3a}\u{28}\u{25}\u{64}\u{2b}\u{29}\u{3a}"))
259−assert(line == l or (not line and not l))
260−end
261−lineerror("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{a}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{69}\u{3d}\u{31}\u{2c}\u{27}\u{61}\u{27}\u{20}\u{64}\u{6f}\u{20}\u{a}\u{20}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{69}\u{29}\u{20}\u{a}\u{20}\u{65}\u{6e}\u{64}",2)
262−lineerror("\u{a}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{a}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{6b}\u{2c}\u{76}\u{20}\u{69}\u{6e}\u{20}\u{33}\u{20}\u{a}\u{20}\u{64}\u{6f}\u{20}\u{a}\u{20}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{6b}\u{29}\u{20}\u{a}\u{20}\u{65}\u{6e}\u{64}",3)
263−lineerror("\u{a}\u{a}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{6b}\u{2c}\u{76}\u{20}\u{69}\u{6e}\u{20}\u{a}\u{20}\u{33}\u{20}\u{a}\u{20}\u{64}\u{6f}\u{20}\u{a}\u{20}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{6b}\u{29}\u{20}\u{a}\u{20}\u{65}\u{6e}\u{64}",4)
264−lineerror("\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{61}\u{2e}\u{78}\u{2e}\u{79}\u{20}\u{28}\u{29}\u{a}\u{61}\u{3d}\u{61}\u{2b}\u{31}\u{a}\u{65}\u{6e}\u{64}",1)
265−lineerror("\u{61}\u{20}\u{3d}\u{20}\u{a}\u{61}\u{a}\u{2b}\u{a}\u{7b}\u{7d}",3)
266−lineerror("\u{61}\u{20}\u{3d}\u{20}\u{a}\u{33}\u{a}\u{2b}\u{a}\u{28}\u{a}\u{34}\u{a}\u{2f}\u{a}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{29}",6)
267−lineerror("\u{61}\u{20}\u{3d}\u{20}\u{a}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{a}\u{2b}\u{a}\u{28}\u{a}\u{34}\u{a}\u{2f}\u{a}\u{37}\u{29}",3)
268−lineerror("\u{61}\u{a}\u{3d}\u{a}\u{2d}\u{a}\u{a}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{a}\u{3b}",3)
269−lineerror("\u{61}\u{a}\u{28}\u{20}\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{3c}\u{3c}\u{a}\u{32}\u{33}\u{29}\u{a}",2)
270−lineerror("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{7b}\u{78}\u{20}\u{3d}\u{20}\u{31}\u{33}\u{7d}\u{a}\u{61}\u{a}\u{2e}\u{a}\u{78}\u{a}\u{28}\u{20}\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{3c}\u{3c}\u{a}\u{32}\u{33}\u{a}\u{29}\u{a}",5)
271−lineerror("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{7b}\u{78}\u{20}\u{3d}\u{20}\u{31}\u{33}\u{7d}\u{a}\u{61}\u{a}\u{2e}\u{a}\u{78}\u{a}\u{28}\u{a}\u{32}\u{33}\u{20}\u{2b}\u{20}\u{61}\u{a}\u{29}\u{a}",6)
259+assert(((line == l) or (not (line and (not l)))))
260+end
261+lineerror("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{a}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{69}\u{3d}\u{31}\u{2c}\u{27}\u{61}\u{27}\u{20}\u{64}\u{6f}\u{20}\u{a}\u{20}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{69}\u{29}\u{20}\u{a}\u{20}\u{65}\u{6e}\u{64}",0x2)
262+lineerror("\u{a}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{a}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{6b}\u{2c}\u{76}\u{20}\u{69}\u{6e}\u{20}\u{33}\u{20}\u{a}\u{20}\u{64}\u{6f}\u{20}\u{a}\u{20}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{6b}\u{29}\u{20}\u{a}\u{20}\u{65}\u{6e}\u{64}",0x3)
263+lineerror("\u{a}\u{a}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{6b}\u{2c}\u{76}\u{20}\u{69}\u{6e}\u{20}\u{a}\u{20}\u{33}\u{20}\u{a}\u{20}\u{64}\u{6f}\u{20}\u{a}\u{20}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{6b}\u{29}\u{20}\u{a}\u{20}\u{65}\u{6e}\u{64}",0x4)
264+lineerror("\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{61}\u{2e}\u{78}\u{2e}\u{79}\u{20}\u{28}\u{29}\u{a}\u{61}\u{3d}\u{61}\u{2b}\u{31}\u{a}\u{65}\u{6e}\u{64}",0x1)
265+lineerror("\u{61}\u{20}\u{3d}\u{20}\u{a}\u{61}\u{a}\u{2b}\u{a}\u{7b}\u{7d}",0x3)
266+lineerror("\u{61}\u{20}\u{3d}\u{20}\u{a}\u{33}\u{a}\u{2b}\u{a}\u{28}\u{a}\u{34}\u{a}\u{2f}\u{a}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{29}",0x6)
267+lineerror("\u{61}\u{20}\u{3d}\u{20}\u{a}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{a}\u{2b}\u{a}\u{28}\u{a}\u{34}\u{a}\u{2f}\u{a}\u{37}\u{29}",0x3)
268+lineerror("\u{61}\u{a}\u{3d}\u{a}\u{2d}\u{a}\u{a}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{a}\u{3b}",0x3)
269+lineerror("\u{61}\u{a}\u{28}\u{20}\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{3c}\u{3c}\u{a}\u{32}\u{33}\u{29}\u{a}",0x2)
270+lineerror("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{7b}\u{78}\u{20}\u{3d}\u{20}\u{31}\u{33}\u{7d}\u{a}\u{61}\u{a}\u{2e}\u{a}\u{78}\u{a}\u{28}\u{20}\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{3c}\u{3c}\u{a}\u{32}\u{33}\u{a}\u{29}\u{a}",0x5)
271+lineerror("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{7b}\u{78}\u{20}\u{3d}\u{20}\u{31}\u{33}\u{7d}\u{a}\u{61}\u{a}\u{2e}\u{a}\u{78}\u{a}\u{28}\u{a}\u{32}\u{33}\u{20}\u{2b}\u{20}\u{61}\u{a}\u{29}\u{a}",0x6)
272272local p = "\u{20}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{67}\u{28}\u{29}\u{20}\u{66}\u{28}\u{29}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{28}\u{78}\u{29}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{28}\u{27}\u{61}\u{27}\u{2c}\u{20}\u{58}\u{58}\u{29}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{67}\u{28}\u{29}\u{a}"
273−XX=3
273+XX=0x3
274274;
275−lineerror((p),3)
276−XX=0
275+lineerror(p,0x3)
276+XX=0x0
277277;
278−lineerror((p),false)
279−XX=1
278+lineerror(p,false)
279+XX=0x1
280280;
281−lineerror((p),2)
282−XX=2
281+lineerror(p,0x2)
282+XX=0x2
283283;
284−lineerror((p),1)
284+lineerror(p,0x1)
285285_G.XX,_G.g,_G.f=nil
286−lineerror("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{62}\u{20}\u{3d}\u{20}\u{66}\u{61}\u{6c}\u{73}\u{65}\u{a}\u{69}\u{66}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{a}\u{20}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{27}\u{74}\u{65}\u{73}\u{74}\u{27}\u{a}\u{65}\u{6e}\u{64}",3)
287−lineerror("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{62}\u{20}\u{3d}\u{20}\u{66}\u{61}\u{6c}\u{73}\u{65}\u{a}\u{69}\u{66}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{a}\u{20}\u{20}\u{69}\u{66}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{69}\u{66}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{27}\u{74}\u{65}\u{73}\u{74}\u{27}\u{a}\u{20}\u{20}\u{20}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{65}\u{6e}\u{64}",5)
288−lineerror("\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{30}\u{a}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{62}\u{20}\u{3d}\u{20}\u{31}\u{a}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{63}\u{20}\u{3d}\u{20}\u{62}\u{20}\u{25}\u{20}\u{61}\u{a}",3)
286+lineerror("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{62}\u{20}\u{3d}\u{20}\u{66}\u{61}\u{6c}\u{73}\u{65}\u{a}\u{69}\u{66}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{a}\u{20}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{27}\u{74}\u{65}\u{73}\u{74}\u{27}\u{a}\u{65}\u{6e}\u{64}",0x3)
287+lineerror("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{62}\u{20}\u{3d}\u{20}\u{66}\u{61}\u{6c}\u{73}\u{65}\u{a}\u{69}\u{66}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{a}\u{20}\u{20}\u{69}\u{66}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{69}\u{66}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{27}\u{74}\u{65}\u{73}\u{74}\u{27}\u{a}\u{20}\u{20}\u{20}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{65}\u{6e}\u{64}",0x5)
288+lineerror("\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{30}\u{a}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{62}\u{20}\u{3d}\u{20}\u{31}\u{a}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{63}\u{20}\u{3d}\u{20}\u{62}\u{20}\u{25}\u{20}\u{61}\u{a}",0x3)
289289do
290−local s = string.format("\u{25}\u{73}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{5f}\u{5f}\u{41}\u{2e}\u{78}",string.rep("\u{a}",300))
291−lineerror(s,301)
290+local s = string.format("\u{25}\u{73}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{5f}\u{5f}\u{41}\u{2e}\u{78}",string.rep("\u{a}",0x12c))
291+lineerror(s,0x12d)
292292end
293−if not _soft then
293+if (not _soft) then
294294collectgarbage()
295295print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}")
296−local C = 0
297−local l = debug.getinfo(1,"\u{6c}").currentline + 1
296+local C = 0x0
297+local l = (debug.getinfo(0x1,"\u{6c}").currentline + 0x1)
298298local function auxy
299299()
300−C=C + 1
300+C=(C + 0x1)
301301;
302302auxy()
303303end
@@ -308,9 +308,9 @@ collectgarbage("\u{72}\u{65}\u{73}\u{74}\u{61}\u{72}\u{74}")
308308end
309309local function checkstackmessage
310310(m)
311−print("\u{28}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}\u{20}\u{61}\u{66}\u{74}\u{65}\u{72}\u{20}" .. C .. "\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{73}\u{29}")
312−C=0
313−return (string.find(m,"\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}"))
311+print(("\u{28}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}\u{20}\u{61}\u{66}\u{74}\u{65}\u{72}\u{20}" .. (C .. "\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{73}\u{29}")))
312+C=0x0
313+return string.find(m,"\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}")
314314end
315315assert(checkstackmessage(doit("\u{59}\u{59}\u{28}\u{29}")))
316316assert(checkstackmessage(doit("\u{59}\u{59}\u{28}\u{29}")))
@@ -319,12 +319,12 @@ _G.YY=nil
319319local l1
320320local function g
321321(x)
322−l1=debug.getinfo(x,"\u{6c}").currentline + 2
322+l1=(debug.getinfo(x,"\u{6c}").currentline + 0x2)
323323collectgarbage("\u{73}\u{74}\u{6f}\u{70}")
324324auxy()
325325collectgarbage("\u{72}\u{65}\u{73}\u{74}\u{61}\u{72}\u{74}")
326326end
327−local _,stackmsg = xpcall(g,debug.traceback,1)
327+local _,stackmsg = xpcall(g,debug.traceback,0x1)
328328print("\u{2b}")
329329local stack = {}
330330for line in string.gmatch(stackmsg,"\u{5b}\u{5e}\u{a}\u{5d}\u{2a}")
@@ -334,43 +334,43 @@ if curr then
334334table.insert(stack,tonumber(curr))
335335end
336336end
337−local i = 1
338−while stack[i] ~= l1 do
339−assert(stack[i] == l)
340−i=i + 1
337+local i = 0x1
338+while (stack[i] ~= l1) do
339+assert((stack[i] == l))
340+i=(i + 0x1)
341341end
342−assert(i > 15)
342+assert((i > 0xf))
343343local res,msg = xpcall(error,error)
344−assert(not res and type(msg) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")
344+assert((not (res and (type(msg) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"))))
345345print("\u{2b}")
346346local function f
347347(x)
348−if x == 0 then
348+if (x == 0x0) then
349349error("\u{61}\u{a}")
350350else
351351local aux = function ()
352−return f(x - 1)
352+return f((x - 0x1))
353353end
354354local a,b = xpcall(aux,aux)
355355return a,b
356356end
357357end
358−f(3)
358+f(0x3)
359359local function loop
360360(x,y,z)
361−return 1 + loop(x,y,z)
361+return (0x1 + loop(x,y,z))
362362end
363363local res,msg = xpcall(loop,function (m)
364364assert(string.find(m,"\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}"))
365365checkerr("\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{68}\u{61}\u{6e}\u{64}\u{6c}\u{69}\u{6e}\u{67}",loop)
366−assert(math.sin(0) == 0)
367−return 15
366+assert((math.sin(0x0) == 0x0))
367+return 0xf
368368end)
369−assert(msg == 15)
369+assert((msg == 0xf))
370370local f = function ()
371−for i = 999900, 1000000, 1
371+for i = 0xf41dc, 0xf4240, 0x1
372372do
373−table.unpack({},1,i)
373+table.unpack({},0x1,i)
374374end
375375end
376376checkerr("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",f)
@@ -380,114 +380,114 @@ local t = {}
380380local res,msg = pcall(function ()
381381error(t)
382382end)
383−assert(not res and msg == t)
383+assert((not (res and (msg == t))))
384384res,msg=pcall(function ()
385385error(nil)
386386end)
387−assert(not res and msg == nil)
387+assert((not (res and (msg == nil))))
388388local function f
389389()
390390error({["\u{6d}\u{73}\u{67}"] = "\u{78}"})
391391end
392392res,msg=xpcall(f,function (r)
393−return {["\u{6d}\u{73}\u{67}"] = r.msg .. "\u{79}"}
393+return {["\u{6d}\u{73}\u{67}"] = (r.msg .. "\u{79}")}
394394end)
395−assert(msg.msg == "\u{78}\u{79}")
395+assert((msg.msg == "\u{78}\u{79}"))
396396res,msg=pcall(assert,false,"\u{58}",t)
397−assert(not res and msg == "\u{58}")
397+assert((not (res and (msg == "\u{58}"))))
398398res,msg=pcall(function ()
399399assert(false)
400400end)
401401local line = string.match(msg,"\u{25}\u{77}\u{2b}\u{25}\u{2e}\u{6c}\u{75}\u{61}\u{3a}\u{28}\u{25}\u{64}\u{2b}\u{29}\u{3a}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{61}\u{69}\u{6c}\u{65}\u{64}\u{21}\u{24}")
402−assert(tonumber(line) == debug.getinfo(1,"\u{6c}").currentline - 2)
402+assert((tonumber(line) == (debug.getinfo(0x1,"\u{6c}").currentline - 0x2)))
403403res,msg=pcall(assert,false,t)
404−assert(not res and msg == t)
404+assert((not (res and (msg == t))))
405405res,msg=pcall(assert,nil,nil)
406−assert(not res and msg == nil)
406+assert((not (res and (msg == nil))))
407407res,msg=pcall(assert)
408−assert(not res and string.find(msg,"\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}"))
408+assert((not (res and string.find(msg,"\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}"))))
409409end
410410local a,b,c = xpcall(string.find,error,"\u{61}\u{6c}\u{6f}","\u{61}\u{6c}")
411−assert(a and b == 1 and c == 2)
411+assert(((a and (b == 0x1)) and (c == 0x2)))
412412a,b,c=xpcall(string.find,function (x)
413413return {}
414414end,true,"\u{61}\u{6c}")
415−assert(not a and type(b) == "\u{74}\u{61}\u{62}\u{6c}\u{65}" and c == nil)
415+assert((not ((a and (type(b) == "\u{74}\u{61}\u{62}\u{6c}\u{65}")) and (c == nil))))
416416print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{6f}\u{6b}\u{65}\u{6e}\u{73}\u{20}\u{69}\u{6e}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{6d}\u{65}\u{73}\u{73}\u{61}\u{67}\u{65}\u{73}")
417−checksyntax("\u{73}\u{79}\u{6e}\u{74}\u{61}\u{78}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}","","\u{65}\u{72}\u{72}\u{6f}\u{72}",1)
418−checksyntax("\u{31}\u{2e}\u{30}\u{30}\u{30}","","\u{31}\u{2e}\u{30}\u{30}\u{30}",1)
419−checksyntax("\u{5b}\u{5b}\u{61}\u{5d}\u{5d}","","\u{5b}\u{5b}\u{61}\u{5d}\u{5d}",1)
420−checksyntax("\u{27}\u{61}\u{61}\u{27}","","\u{27}\u{61}\u{61}\u{27}",1)
421−checksyntax("\u{77}\u{68}\u{69}\u{6c}\u{65}\u{20}\u{3c}\u{3c}\u{20}\u{64}\u{6f}\u{20}\u{65}\u{6e}\u{64}","","\u{3c}\u{3c}",1)
422−checksyntax("\u{66}\u{6f}\u{72}\u{20}\u{3e}\u{3e}\u{20}\u{64}\u{6f}\u{20}\u{65}\u{6e}\u{64}","","\u{3e}\u{3e}",1)
423−checksyntax("\u{61}\u{1}\u{61}\u{20}\u{3d}\u{20}\u{31}","","\u{3c}\u{5c}\u{31}\u{3e}",1)
424−checksyntax("\u{ff}\u{61}\u{20}\u{3d}\u{20}\u{31}","","\u{3c}\u{5c}\u{32}\u{35}\u{35}\u{3e}",1)
417+checksyntax("\u{73}\u{79}\u{6e}\u{74}\u{61}\u{78}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}","","\u{65}\u{72}\u{72}\u{6f}\u{72}",0x1)
418+checksyntax("\u{31}\u{2e}\u{30}\u{30}\u{30}","","\u{31}\u{2e}\u{30}\u{30}\u{30}",0x1)
419+checksyntax("\u{5b}\u{5b}\u{61}\u{5d}\u{5d}","","\u{5b}\u{5b}\u{61}\u{5d}\u{5d}",0x1)
420+checksyntax("\u{27}\u{61}\u{61}\u{27}","","\u{27}\u{61}\u{61}\u{27}",0x1)
421+checksyntax("\u{77}\u{68}\u{69}\u{6c}\u{65}\u{20}\u{3c}\u{3c}\u{20}\u{64}\u{6f}\u{20}\u{65}\u{6e}\u{64}","","\u{3c}\u{3c}",0x1)
422+checksyntax("\u{66}\u{6f}\u{72}\u{20}\u{3e}\u{3e}\u{20}\u{64}\u{6f}\u{20}\u{65}\u{6e}\u{64}","","\u{3e}\u{3e}",0x1)
423+checksyntax("\u{61}\u{1}\u{61}\u{20}\u{3d}\u{20}\u{31}","","\u{3c}\u{5c}\u{31}\u{3e}",0x1)
424+checksyntax("\u{ff}\u{61}\u{20}\u{3d}\u{20}\u{31}","","\u{3c}\u{5c}\u{32}\u{35}\u{35}\u{3e}",0x1)
425425doit("\u{49}\u{20}\u{3d}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{28}\u{22}\u{61}\u{3d}\u{39}\u{2b}\u{22}\u{29}\u{3b}\u{20}\u{61}\u{61}\u{61}\u{3d}\u{33}")
426−assert(_G.aaa == 3 and not _G.I)
426+assert(((_G.aaa == 0x3) and (not _G.I)))
427427_G.I,_G.aaa=nil
428428print("\u{2b}")
429−local lim = 1000
429+local lim = 0x3e8
430430if _soft then
431−lim=100
431+lim=0x64
432432end
433−for i = 1, lim
433+for i = 0x1, lim
434434do
435435doit("\u{61}\u{20}\u{3d}\u{20}")
436436doit("\u{61}\u{20}\u{3d}\u{20}\u{34}\u{2b}\u{6e}\u{69}\u{6c}")
437437end
438438local function testrep
439439(init,rep,close,repc,finalresult)
440−local s = init .. string.rep(rep,100) .. close .. string.rep(repc,100)
440+local s = (init .. (string.rep(rep,0x64) .. (close .. string.rep(repc,0x64))))
441441local res,msg = load(s)
442442assert(res)
443−if (finalresult) then
444−assert(res() == finalresult)
443+if finalresult then
444+assert((res() == finalresult))
445445end
446−s=init .. string.rep(rep,500)
446+s=(init .. string.rep(rep,0x1f4))
447447local res,msg = load(s)
448−assert(not res and (string.find(msg,"\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}") or string.find(msg,"\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}")))
448+assert((not (res and (string.find(msg,"\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}") or string.find(msg,"\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}")))))
449449end
450450testrep("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{3b}\u{20}\u{61}","\u{2c}\u{61}","\u{3d}\u{20}\u{31}","\u{2c}\u{31}")
451451testrep("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{3b}\u{20}\u{61}\u{3d}","\u{7b}","\u{30}","\u{7d}")
452−testrep("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}","\u{28}","\u{32}","\u{29}",2)
452+testrep("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}","\u{28}","\u{32}","\u{29}",0x2)
453453testrep("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{61}\u{20}\u{28}\u{78}\u{29}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{78}\u{20}\u{65}\u{6e}\u{64}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}","\u{61}\u{28}","\u{32}\u{2e}\u{32}","\u{29}",2.2)
454454testrep("","\u{64}\u{6f}\u{20}","","\u{20}\u{65}\u{6e}\u{64}")
455455testrep("","\u{77}\u{68}\u{69}\u{6c}\u{65}\u{20}\u{61}\u{20}\u{64}\u{6f}\u{20}","","\u{20}\u{65}\u{6e}\u{64}")
456456testrep("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{3b}\u{20}","\u{69}\u{66}\u{20}\u{61}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{20}\u{65}\u{6c}\u{73}\u{65}\u{20}","","\u{20}\u{65}\u{6e}\u{64}")
457457testrep("","\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{6f}\u{6f}\u{20}\u{28}\u{29}\u{20}","","\u{20}\u{65}\u{6e}\u{64}")
458458testrep("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{27}\u{27}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}","\u{61}\u{2e}\u{2e}","\u{27}\u{61}\u{27}","","\u{61}")
459−testrep("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}","\u{61}\u{5e}","\u{61}","",1)
460−checkmessage("\u{61}\u{20}\u{3d}\u{20}\u{66}\u{28}\u{78}" .. string.rep("\u{2c}\u{78}",260) .. "\u{29}","\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{67}\u{69}\u{73}\u{74}\u{65}\u{72}\u{73}")
461−local lim = 127
459+testrep("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}","\u{61}\u{5e}","\u{61}","",0x1)
460+checkmessage(("\u{61}\u{20}\u{3d}\u{20}\u{66}\u{28}\u{78}" .. (string.rep("\u{2c}\u{78}",0x104) .. "\u{29}")),"\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{67}\u{69}\u{73}\u{74}\u{65}\u{72}\u{73}")
461+local lim = 0x7f
462462local s = "\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{6f}\u{6f}\u{41}\u{20}\u{28}\u{29}\u{a}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}"
463−for j = 1, lim
463+for j = 0x1, lim
464464do
465−s=s .. "\u{61}" .. j .. "\u{2c}\u{20}"
465+s=(s .. ("\u{61}" .. (j .. "\u{2c}\u{20}")))
466466end
467−s=s .. "\u{62}\u{2c}\u{63}\u{a}"
468−s=s .. "\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{6f}\u{6f}\u{42}\u{20}\u{28}\u{29}\u{a}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}"
469−for j = 1, lim
467+s=(s .. "\u{62}\u{2c}\u{63}\u{a}")
468+s=(s .. "\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{6f}\u{6f}\u{42}\u{20}\u{28}\u{29}\u{a}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}")
469+for j = 0x1, lim
470470do
471−s=s .. "\u{62}" .. j .. "\u{2c}\u{20}"
471+s=(s .. ("\u{62}" .. (j .. "\u{2c}\u{20}")))
472472end
473−s=s .. "\u{62}\u{a}"
474−s=s .. "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{6f}\u{6f}\u{43}\u{20}\u{28}\u{29}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{62}\u{2b}\u{63}"
475−local c = 1 + 2
476−for j = 1, lim
473+s=(s .. "\u{62}\u{a}")
474+s=(s .. "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{6f}\u{6f}\u{43}\u{20}\u{28}\u{29}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{62}\u{2b}\u{63}")
475+local c = (0x1 + 0x2)
476+for j = 0x1, lim
477477do
478−s=s .. "\u{2b}\u{61}" .. j .. "\u{2b}\u{62}" .. j
479−c=c + 2
478+s=(s .. ("\u{2b}\u{61}" .. (j .. ("\u{2b}\u{62}" .. j))))
479+c=(c + 0x2)
480480end
481−s=s .. "\u{a}\u{65}\u{6e}\u{64}\u{20}\u{20}\u{65}\u{6e}\u{64}\u{20}\u{65}\u{6e}\u{64}"
481+s=(s .. "\u{a}\u{65}\u{6e}\u{64}\u{20}\u{20}\u{65}\u{6e}\u{64}\u{20}\u{65}\u{6e}\u{64}")
482482local a,b = load(s)
483−assert(c > 255 and string.find(b,"\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{75}\u{70}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{73}") and string.find(b,"\u{6c}\u{69}\u{6e}\u{65}\u{20}\u{35}"))
483+assert((((c > 0xff) and string.find(b,"\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{75}\u{70}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{73}")) and string.find(b,"\u{6c}\u{69}\u{6e}\u{65}\u{20}\u{35}")))
484484s="\u{a}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{6f}\u{6f}\u{20}\u{28}\u{29}\u{a}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}"
485−for j = 1, 300
485+for j = 0x1, 0x12c
486486do
487−s=s .. "\u{61}" .. j .. "\u{2c}\u{20}"
487+s=(s .. ("\u{61}" .. (j .. "\u{2c}\u{20}")))
488488end
489−s=s .. "\u{62}\u{a}"
489+s=(s .. "\u{62}\u{a}")
490490local a,b = load(s)
491−assert(string.find(b,"\u{6c}\u{69}\u{6e}\u{65}\u{20}\u{32}") and string.find(b,"\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{76}\u{61}\u{72}\u{69}\u{61}\u{62}\u{6c}\u{65}\u{73}"))
491+assert((string.find(b,"\u{6c}\u{69}\u{6e}\u{65}\u{20}\u{32}") and string.find(b,"\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{76}\u{61}\u{72}\u{69}\u{61}\u{62}\u{6c}\u{65}\u{73}")))
492492mt.__index=oldmm
493493print("\u{4f}\u{4b}")
desk/res/lua/cycled/events.luanew file+610
@@ -0,0 +1,610 @@
1+print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{6d}\u{65}\u{74}\u{61}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{73}")
2+local debug = require("\u{64}\u{65}\u{62}\u{75}\u{67}")
3+X=0x14
4+;
5+B=0x1e
6+_ENV=setmetatable({},{["\u{5f}\u{5f}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = _G})
7+collectgarbage()
8+X=(X + 0xa)
9+assert(((X == 0x1e) and (_G.X == 0x14)))
10+B=false
11+assert((B == false))
12+_ENV["\u{42}"]=undef
13+assert((B == 0x1e))
14+assert((getmetatable({}) == nil))
15+assert((getmetatable(0x4) == nil))
16+assert((getmetatable(nil) == nil))
17+a={["\u{6e}\u{61}\u{6d}\u{65}"] = "\u{4e}\u{41}\u{4d}\u{45}"}
18+;
19+setmetatable(a,{["\u{5f}\u{5f}\u{6d}\u{65}\u{74}\u{61}\u{74}\u{61}\u{62}\u{6c}\u{65}"] = "\u{78}\u{75}\u{78}\u{75}",["\u{5f}\u{5f}\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"] = function (x)
20+return x.name
21+end})
22+assert((getmetatable(a) == "\u{78}\u{75}\u{78}\u{75}"))
23+assert((tostring(a) == "\u{4e}\u{41}\u{4d}\u{45}"))
24+assert((pcall(setmetatable,a,{}) == false))
25+a.name="\u{67}\u{6f}\u{72}\u{6f}\u{72}\u{6f}\u{62}\u{61}"
26+assert((tostring(a) == "\u{67}\u{6f}\u{72}\u{6f}\u{72}\u{6f}\u{62}\u{61}"))
27+local a,t = {0xa,0x14,0x1e,["\u{78}"] = "\u{31}\u{30}",["\u{79}"] = "\u{32}\u{30}"},{}
28+assert((setmetatable(a,t) == a))
29+assert((getmetatable(a) == t))
30+assert((setmetatable(a,nil) == a))
31+assert((getmetatable(a) == nil))
32+assert((setmetatable(a,t) == a))
33+function f(t,i,e)
34+assert((not e))
35+local p = rawget(t,"\u{70}\u{61}\u{72}\u{65}\u{6e}\u{74}")
36+return (p and (p[i] + 0x3)),"\u{64}\u{75}\u{6d}\u{6d}\u{79}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}"
37+end
38+t.__index=f
39+a.parent={["\u{7a}"] = 0x19,["\u{78}"] = 0xc,[0x4] = 0x18}
40+assert(((((a[0x1] == 0xa) and (a.z == 0x1c)) and (a[0x4] == 0x1b)) and (a.x == "\u{31}\u{30}")))
41+collectgarbage()
42+a=setmetatable({},t)
43+function f(t,i,v)
44+rawset(t,i,(v - 0x3))
45+end
46+setmetatable(t,t)
47+t.__newindex=f
48+a[0x1]=0x1e
49+;
50+a.x="\u{31}\u{30}\u{31}"
51+;
52+a[0x5]=0xc8
53+assert((((a[0x1] == 0x1b) and (a.x == 0x62)) and (a[0x5] == 0xc5)))
54+do
55+local mt = {}
56+mt.__newindex=mt
57+local t = setmetatable({},mt)
58+t[0x1]=0xa
59+assert((mt[0x1] == 0xa))
60+end
61+local c = {}
62+a=setmetatable({},t)
63+t.__newindex=c
64+t.__index=c
65+a[0x1]=0xa
66+;
67+a[0x2]=0x14
68+;
69+a[0x3]=0x5a
70+;
71+for i = 0x4, 0x14
72+do
73+a[i]=(i * 0xa)
74+end
75+assert((((a[0x1] == 0xa) and (a[0x2] == 0x14)) and (a[0x3] == 0x5a)))
76+for i = 0x4, 0x14
77+do
78+assert((a[i] == (i * 0xa)))
79+end
80+assert((next(a) == nil))
81+do
82+local a
83+;
84+a=setmetatable({},{["\u{5f}\u{5f}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = setmetatable({},{["\u{5f}\u{5f}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = setmetatable({},{["\u{5f}\u{5f}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = function (_,n)
85+return (a[(n - 0x3)] + 0x4),"\u{6c}\u{69}\u{78}\u{6f}"
86+end})})})
87+a[0x0]=0x14
88+for i = 0x0, 0xa
89+do
90+assert((a[(i * 0x3)] == (0x14 + (i * 0x4))))
91+end
92+end
93+do
94+local foi
95+local a = {}
96+for i = 0x1, 0xa
97+do
98+a[i]=0x0
99+;
100+a[("\u{61}" .. i)]=0x0
101+;
102+end
103+setmetatable(a,{["\u{5f}\u{5f}\u{6e}\u{65}\u{77}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = function (t,k,v)
104+foi=true
105+;
106+rawset(t,k,v)
107+end})
108+foi=false
109+;
110+a[0x1]=0x0
111+;
112+assert((not foi))
113+foi=false
114+;
115+a["\u{61}\u{31}"]=0x0
116+;
117+assert((not foi))
118+foi=false
119+;
120+a["\u{61}\u{31}\u{31}"]=0x0
121+;
122+assert(foi)
123+foi=false
124+;
125+a[0xb]=0x0
126+;
127+assert(foi)
128+foi=false
129+;
130+a[0x1]=undef
131+;
132+assert((not foi))
133+a[0x1]=undef
134+foi=false
135+;
136+a[0x1]=nil
137+;
138+assert(foi)
139+end
140+setmetatable(t,nil)
141+function f(t, ...)
142+return t,{...}
143+end
144+t.__call=f
145+do
146+local x,y = a(table.unpack({"\u{61}",0x1}))
147+assert(((((x == a) and (y[0x1] == "\u{61}")) and (y[0x2] == 0x1)) and (y[0x3] == undef)))
148+x,y=a()
149+assert(((x == a) and (y[0x1] == undef)))
150+end
151+local b = setmetatable({},t)
152+setmetatable(b,t)
153+function f(op)
154+return function (...)
155+cap={[0x0] = op,...}
156+;
157+return ...
158+end
159+end
160+t.__add=f("\u{61}\u{64}\u{64}")
161+t.__sub=f("\u{73}\u{75}\u{62}")
162+t.__mul=f("\u{6d}\u{75}\u{6c}")
163+t.__div=f("\u{64}\u{69}\u{76}")
164+t.__idiv=f("\u{69}\u{64}\u{69}\u{76}")
165+t.__mod=f("\u{6d}\u{6f}\u{64}")
166+t.__unm=f("\u{75}\u{6e}\u{6d}")
167+t.__pow=f("\u{70}\u{6f}\u{77}")
168+t.__len=f("\u{6c}\u{65}\u{6e}")
169+t.__band=f("\u{62}\u{61}\u{6e}\u{64}")
170+t.__bor=f("\u{62}\u{6f}\u{72}")
171+t.__bxor=f("\u{62}\u{78}\u{6f}\u{72}")
172+t.__shl=f("\u{73}\u{68}\u{6c}")
173+t.__shr=f("\u{73}\u{68}\u{72}")
174+t.__bnot=f("\u{62}\u{6e}\u{6f}\u{74}")
175+t.__lt=f("\u{6c}\u{74}")
176+t.__le=f("\u{6c}\u{65}")
177+local function checkcap
178+(t)
179+assert((# ((cap + 0x1) == (# t))))
180+for i = 0x1, (# t)
181+do
182+assert((cap[(i - 0x1)] == t[i]))
183+assert((math.type(cap[(i - 0x1)]) == math.type(t[i])))
184+end
185+end
186+assert(((b + 0x5) == b))
187+;
188+checkcap({"\u{61}\u{64}\u{64}",b,0x5})
189+assert(((5.2 + b) == 5.2))
190+;
191+checkcap({"\u{61}\u{64}\u{64}",5.2,b})
192+assert(((b + "\u{35}") == b))
193+;
194+checkcap({"\u{61}\u{64}\u{64}",b,"\u{35}"})
195+assert(((0x5 + b) == 0x5))
196+;
197+checkcap({"\u{61}\u{64}\u{64}",0x5,b})
198+assert((("\u{35}" + b) == "\u{35}"))
199+;
200+checkcap({"\u{61}\u{64}\u{64}","\u{35}",b})
201+b=(b - 0x3)
202+;
203+assert((getmetatable(b) == t))
204+;
205+checkcap({"\u{73}\u{75}\u{62}",b,0x3})
206+assert(((0x5 - a) == 0x5))
207+;
208+checkcap({"\u{73}\u{75}\u{62}",0x5,a})
209+assert((("\u{35}" - a) == "\u{35}"))
210+;
211+checkcap({"\u{73}\u{75}\u{62}","\u{35}",a})
212+assert(((a * a) == a))
213+;
214+checkcap({"\u{6d}\u{75}\u{6c}",a,a})
215+assert(((a / 0x0) == a))
216+;
217+checkcap({"\u{64}\u{69}\u{76}",a,0x0})
218+assert(((a / 0.0) == a))
219+;
220+checkcap({"\u{64}\u{69}\u{76}",a,0.0})
221+assert(((a % 0x2) == a))
222+;
223+checkcap({"\u{6d}\u{6f}\u{64}",a,0x2})
224+assert(((a // (0x1 / 0x0)) == a))
225+;
226+checkcap({"\u{69}\u{64}\u{69}\u{76}",a,(0x1 / 0x0)})
227+;
228+(function ()
229+assert(((a & "\u{68}\u{69}") == a))
230+end)()
231+;
232+checkcap({"\u{62}\u{61}\u{6e}\u{64}",a,"\u{68}\u{69}"})
233+;
234+(function ()
235+assert(((0xa & a) == 0xa))
236+end)()
237+;
238+checkcap({"\u{62}\u{61}\u{6e}\u{64}",0xa,a})
239+;
240+(function ()
241+assert(((a | 0xa) == a))
242+end)()
243+;
244+checkcap({"\u{62}\u{6f}\u{72}",a,0xa})
245+assert(((a | "\u{68}\u{69}") == a))
246+;
247+checkcap({"\u{62}\u{6f}\u{72}",a,"\u{68}\u{69}"})
248+assert((("\u{68}\u{69}" ~ a) == "\u{68}\u{69}"))
249+;
250+checkcap({"\u{62}\u{78}\u{6f}\u{72}","\u{68}\u{69}",a})
251+;
252+(function ()
253+assert(((0xa ~ a) == 0xa))
254+end)()
255+;
256+checkcap({"\u{62}\u{78}\u{6f}\u{72}",0xa,a})
257+assert((- (a == a)))
258+;
259+checkcap({"\u{75}\u{6e}\u{6d}",a,a})
260+assert(((a ^ 4.0) == a))
261+;
262+checkcap({"\u{70}\u{6f}\u{77}",a,4.0})
263+assert(((a ^ "\u{34}") == a))
264+;
265+checkcap({"\u{70}\u{6f}\u{77}",a,"\u{34}"})
266+assert(((0x4 ^ a) == 0x4))
267+;
268+checkcap({"\u{70}\u{6f}\u{77}",0x4,a})
269+assert((("\u{34}" ^ a) == "\u{34}"))
270+;
271+checkcap({"\u{70}\u{6f}\u{77}","\u{34}",a})
272+assert((# (a == a)))
273+;
274+checkcap({"\u{6c}\u{65}\u{6e}",a,a})
275+assert((~ (a == a)))
276+;
277+checkcap({"\u{62}\u{6e}\u{6f}\u{74}",a,a})
278+assert(((a << 0x3) == a))
279+;
280+checkcap({"\u{73}\u{68}\u{6c}",a,0x3})
281+assert(((1.5 >> a) == 1.5))
282+;
283+checkcap({"\u{73}\u{68}\u{72}",1.5,a})
284+assert((5.0 > a))
285+;
286+checkcap({"\u{6c}\u{74}",a,5.0})
287+assert((a >= 0xa))
288+;
289+checkcap({"\u{6c}\u{65}",0xa,a})
290+assert((a <= (- 10.0)))
291+;
292+checkcap({"\u{6c}\u{65}",a,(- 10.0)})
293+assert((a < (- 0xa)))
294+;
295+checkcap({"\u{6c}\u{74}",a,(- 0xa)})
296+t=setmetatable({0x1,0x2,0x3},{["\u{5f}\u{5f}\u{6c}\u{65}\u{6e}"] = function ()
297+return 0xa
298+end})
299+assert((# ((t == 0xa) and (rawlen(t) == 0x3))))
300+assert((rawlen("\u{61}\u{62}\u{63}") == 0x3))
301+assert((not pcall(rawlen,io.stdin)))
302+assert((not pcall(rawlen,0x22)))
303+assert((not pcall(rawlen)))
304+assert((rawlen(string.rep("\u{61}",0x3e8)) == 0x3e8))
305+t={}
306+t.__lt=function (a,b,c)
307+collectgarbage()
308+assert((c == nil))
309+if (type(a) == "\u{74}\u{61}\u{62}\u{6c}\u{65}") then
310+a=a.x
311+end
312+if (type(b) == "\u{74}\u{61}\u{62}\u{6c}\u{65}") then
313+b=b.x
314+end
315+return (a < b),"\u{64}\u{75}\u{6d}\u{6d}\u{79}"
316+end
317+t.__le=function (a,b,c)
318+assert((c == nil))
319+if (type(a) == "\u{74}\u{61}\u{62}\u{6c}\u{65}") then
320+a=a.x
321+end
322+if (type(b) == "\u{74}\u{61}\u{62}\u{6c}\u{65}") then
323+b=b.x
324+end
325+return (a <= b),"\u{64}\u{75}\u{6d}\u{6d}\u{79}"
326+end
327+t.__eq=function (a,b,c)
328+assert((c == nil))
329+if (type(a) == "\u{74}\u{61}\u{62}\u{6c}\u{65}") then
330+a=a.x
331+end
332+if (type(b) == "\u{74}\u{61}\u{62}\u{6c}\u{65}") then
333+b=b.x
334+end
335+return (a == b),"\u{64}\u{75}\u{6d}\u{6d}\u{79}"
336+end
337+function Op(x)
338+return setmetatable({["\u{78}"] = x},t)
339+end
340+local function test
341+(a,b,c)
342+assert((not (((Op(0x1) < Op(0x1)) and (Op(0x1) < Op(0x2))) and (not (Op(0x2) < Op(0x1))))))
343+assert((not (((0x1 < Op(0x1)) and (Op(0x1) < 0x2)) and (not (0x2 < Op(0x1))))))
344+assert((not (((Op("\u{61}") < Op("\u{61}")) and (Op("\u{61}") < Op("\u{62}"))) and (not (Op("\u{62}") < Op("\u{61}"))))))
345+assert((not ((("\u{61}" < Op("\u{61}")) and (Op("\u{61}") < "\u{62}")) and (not (Op("\u{62}") < Op("\u{61}"))))))
346+assert((((Op(0x1) <= Op(0x1)) and (Op(0x1) <= Op(0x2))) and (not (Op(0x2) <= Op(0x1)))))
347+assert((((Op("\u{61}") <= Op("\u{61}")) and (Op("\u{61}") <= Op("\u{62}"))) and (not (Op("\u{62}") <= Op("\u{61}")))))
348+assert((not ((Op(0x1) > Op(0x1)) and (not ((Op(0x1) > Op(0x2)) and (Op(0x2) > Op(0x1)))))))
349+assert((not ((Op("\u{61}") > Op("\u{61}")) and (not ((Op("\u{61}") > Op("\u{62}")) and (Op("\u{62}") > Op("\u{61}")))))))
350+assert(((Op(0x1) >= Op(0x1)) and (not ((Op(0x1) >= Op(0x2)) and (Op(0x2) >= Op(0x1))))))
351+assert(((0x1 >= Op(0x1)) and (not ((0x1 >= Op(0x2)) and (Op(0x2) >= 0x1)))))
352+assert(((Op("\u{61}") >= Op("\u{61}")) and (not ((Op("\u{61}") >= Op("\u{62}")) and (Op("\u{62}") >= Op("\u{61}"))))))
353+assert((("\u{61}" >= Op("\u{61}")) and (not ((Op("\u{61}") >= "\u{62}") and (Op("\u{62}") >= Op("\u{61}"))))))
354+assert(((Op(0x1) == Op(0x1)) and (Op(0x1) ~= Op(0x2))))
355+assert(((Op("\u{61}") == Op("\u{61}")) and (Op("\u{61}") ~= Op("\u{62}"))))
356+assert(((a == a) and (a ~= b)))
357+assert((Op(0x3) == c))
358+end
359+test(Op(0x1),Op(0x2),Op(0x3))
360+local function rawSet
361+(x)
362+local y = {}
363+for _,k in pairs(x)
364+do
365+y[k]=0x1
366+end
367+return y
368+end
369+local function Set
370+(x)
371+return setmetatable(rawSet(x),t)
372+end
373+t.__lt=function (a,b)
374+for k in pairs(a)
375+do
376+if (not b[k]) then
377+return false
378+end
379+b[k]=undef
380+end
381+return (next(b) ~= nil)
382+end
383+t.__le=function (a,b)
384+for k in pairs(a)
385+do
386+if (not b[k]) then
387+return false
388+end
389+end
390+return true
391+end
392+assert((Set({0x1,0x2,0x3}) < Set({0x1,0x2,0x3,0x4})))
393+assert((not (Set({0x1,0x2,0x3,0x4}) < Set({0x1,0x2,0x3,0x4}))))
394+assert((Set({0x1,0x2,0x3,0x4}) <= Set({0x1,0x2,0x3,0x4})))
395+assert((Set({0x1,0x2,0x3,0x4}) >= Set({0x1,0x2,0x3,0x4})))
396+assert((not (Set({0x1,0x3}) <= Set({0x3,0x5}))))
397+assert((not (Set({0x1,0x3}) <= Set({0x3,0x5}))))
398+assert((not (Set({0x1,0x3}) >= Set({0x3,0x5}))))
399+t.__eq=function (a,b)
400+for k in pairs(a)
401+do
402+if (not b[k]) then
403+return false
404+end
405+b[k]=undef
406+end
407+return (next(b) == nil)
408+end
409+local s = Set({0x1,0x3,0x5})
410+assert((s == Set({0x3,0x5,0x1})))
411+assert((not rawequal(s,Set({0x3,0x5,0x1}))))
412+assert(rawequal(s,s))
413+assert((Set({0x1,0x3,0x5,0x1}) == rawSet({0x3,0x5,0x1})))
414+assert((rawSet({0x1,0x3,0x5,0x1}) == Set({0x3,0x5,0x1})))
415+assert((Set({0x1,0x3,0x5}) ~= Set({0x3,0x5,0x1,0x6})))
416+t[Set({0x1,0x3,0x5})]=0x1
417+assert((t[Set({0x1,0x3,0x5})] == undef))
418+do
419+local mt = {["\u{5f}\u{5f}\u{65}\u{71}"] = true}
420+local a = setmetatable({0xa},mt)
421+local b = setmetatable({0xa},mt)
422+mt.__eq=nil
423+assert((a ~= b))
424+mt.__eq=function (x,y)
425+return (x[0x1] == y[0x1])
426+end
427+assert((a == b))
428+end
429+if (not T) then
430+(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
431+else
432+local u1 = T.newuserdata(0x0,0x1)
433+local u2 = T.newuserdata(0x0,0x1)
434+local u3 = T.newuserdata(0x0,0x1)
435+assert(((u1 ~= u2) and (u1 ~= u3)))
436+debug.setuservalue(u1,0x1)
437+;
438+debug.setuservalue(u2,0x2)
439+;
440+debug.setuservalue(u3,0x1)
441+;
442+debug.setmetatable(u1,{["\u{5f}\u{5f}\u{65}\u{71}"] = function (a,b)
443+return (debug.getuservalue(a) == debug.getuservalue(b))
444+end})
445+debug.setmetatable(u2,{["\u{5f}\u{5f}\u{65}\u{71}"] = function (a,b)
446+return true
447+end})
448+assert((((u1 == u3) and (u3 == u1)) and (u1 ~= u2)))
449+assert((((u2 == u1) and (u2 == u3)) and (u3 == u2)))
450+assert((u2 ~= {}))
451+assert((rawequal(u1,u1) and (not rawequal(u1,u3))))
452+local mirror = {}
453+debug.setmetatable(u3,{["\u{5f}\u{5f}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = mirror,["\u{5f}\u{5f}\u{6e}\u{65}\u{77}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = mirror})
454+for i = 0x1, 0xa
455+do
456+u3[i]=i
457+end
458+for i = 0x1, 0xa
459+do
460+assert((u3[i] == i))
461+end
462+end
463+t.__concat=function (a,b,c)
464+assert((c == nil))
465+if (type(a) == "\u{74}\u{61}\u{62}\u{6c}\u{65}") then
466+a=a.val
467+end
468+if (type(b) == "\u{74}\u{61}\u{62}\u{6c}\u{65}") then
469+b=b.val
470+end
471+if A then
472+return (a .. b)
473+else
474+return setmetatable({["\u{76}\u{61}\u{6c}"] = (a .. b)},t)
475+end
476+end
477+c={["\u{76}\u{61}\u{6c}"] = "\u{63}"}
478+;
479+setmetatable(c,t)
480+d={["\u{76}\u{61}\u{6c}"] = "\u{64}"}
481+;
482+setmetatable(d,t)
483+A=true
484+assert(((c .. d) == "\u{63}\u{64}"))
485+assert(((0x0 .. ("\u{61}" .. ("\u{62}" .. (c .. (d .. ("\u{65}" .. ("\u{66}" .. ((0x5 + 0x3) .. "\u{67}")))))))) == "\u{30}\u{61}\u{62}\u{63}\u{64}\u{65}\u{66}\u{38}\u{67}"))
486+A=false
487+assert(((c .. (d .. (c .. d))).val == "\u{63}\u{64}\u{63}\u{64}"))
488+x=(c .. d)
489+assert(((getmetatable(x) == t) and (x.val == "\u{63}\u{64}")))
490+x=(0x0 .. ("\u{61}" .. ("\u{62}" .. (c .. (d .. ("\u{65}" .. ("\u{66}" .. "\u{67}")))))))
491+assert((x.val == "\u{30}\u{61}\u{62}\u{63}\u{64}\u{65}\u{66}\u{67}"))
492+c={}
493+local x
494+setmetatable(c,{["\u{5f}\u{5f}\u{63}\u{6f}\u{6e}\u{63}\u{61}\u{74}"] = function (a,b)
495+assert((((type(a) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}") and (b == c)) or ((type(b) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}") and (a == c))))
496+return c
497+end})
498+assert((((c .. 0x5) == c) and ((0x5 .. c) == c)))
499+assert((((0x4 .. (c .. 0x5)) == c) and ((0x4 .. (0x5 .. (0x6 .. (0x7 .. c)))) == c)))
500+local t1,t2,c,d
501+t1={}
502+;
503+c={}
504+;
505+setmetatable(c,t1)
506+d={}
507+t1.__eq=function ()
508+return true
509+end
510+t1.__lt=function ()
511+return true
512+end
513+t1.__le=function ()
514+return false
515+end
516+setmetatable(d,t1)
517+assert((((c == d) and (c < d)) and (not (d <= c))))
518+t2={}
519+t2.__eq=t1.__eq
520+t2.__lt=t1.__lt
521+setmetatable(d,t2)
522+assert((((c == d) and (c < d)) and (not (d <= c))))
523+local i
524+local tt = {["\u{5f}\u{5f}\u{63}\u{61}\u{6c}\u{6c}"] = function (t, ...)
525+i=(i + 0x1)
526+if t.f then
527+return t.f(...)
528+else
529+return {...}
530+end
531+end}
532+local a = setmetatable({},tt)
533+local b = setmetatable({["\u{66}"] = a},tt)
534+local c = setmetatable({["\u{66}"] = b},tt)
535+i=0x0
536+x=c(0x3,0x4,0x5)
537+assert((((i == 0x3) and (x[0x1] == 0x3)) and (x[0x3] == 0x5)))
538+assert((_G.X == 0x14))
539+_G.X,_G.B=nil
540+print("\u{2b}")
541+local _g = _G
542+_ENV=setmetatable({},{["\u{5f}\u{5f}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = function (_,k)
543+return _g[k]
544+end})
545+a={}
546+rawset(a,"\u{78}",0x1,0x2,0x3)
547+assert(((a.x == 0x1) and (rawget(a,"\u{78}",0x3) == 0x1)))
548+print("\u{2b}")
549+mt={["\u{5f}\u{5f}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = function (a,b)
550+return (a + b)
551+end,["\u{5f}\u{5f}\u{6c}\u{65}\u{6e}"] = function (x)
552+return math.floor(x)
553+end}
554+debug.setmetatable(0xa,mt)
555+assert((getmetatable((- 0x2)) == mt))
556+assert(((0xa)[0x3] == 0xd))
557+assert(((0xa)["\u{33}"] == 0xd))
558+assert((# (3.45 == 0x3)))
559+debug.setmetatable(0x17,nil)
560+assert((getmetatable((- 0x2)) == nil))
561+debug.setmetatable(true,mt)
562+assert((getmetatable(false) == mt))
563+mt.__index=function (a,b)
564+return (a or b)
565+end
566+assert(((true)[false] == true))
567+assert(((false)[false] == false))
568+debug.setmetatable(false,nil)
569+assert((getmetatable(true) == nil))
570+debug.setmetatable(nil,mt)
571+assert((getmetatable(nil) == mt))
572+mt.__add=function (a,b)
573+return ((a or 0x1) + (b or 0x2))
574+end
575+assert(((0xa + nil) == 0xc))
576+assert(((nil + 0x17) == 0x18))
577+assert(((nil + nil) == 0x3))
578+debug.setmetatable(nil,nil)
579+assert((getmetatable(nil) == nil))
580+debug.setmetatable(nil,{})
581+a={}
582+;
583+setmetatable(a,a)
584+;
585+a.__index=a
586+;
587+a.__newindex=a
588+assert((not pcall(function (a,b)
589+return a[b]
590+end,a,0xa)))
591+assert((not pcall(function (a,b,c)
592+a[b]=c
593+end,a,0xa,true)))
594+T,K,V=nil
595+grandparent={}
596+grandparent.__newindex=function (t,k,v)
597+T=t
598+;
599+K=k
600+;
601+V=v
602+end
603+parent={}
604+parent.__newindex=parent
605+setmetatable(parent,grandparent)
606+child=setmetatable({},parent)
607+child.foo=0xa
608+assert((((T == parent) and (K == "\u{66}\u{6f}\u{6f}")) and (V == 0xa)))
609+print("\u{4f}\u{4b}")
610+return 0xc
zod/luau/res/lua/cycled/files.lua → desk/res/lua/cycled/files.luarenamed+318−318
@@ -1,35 +1,35 @@
11local debug = require("\u{64}\u{65}\u{62}\u{75}\u{67}")
22local maxint = math.maxinteger
3−assert(type(os.getenv("\u{50}\u{41}\u{54}\u{48}")) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")
4−assert(io.input(io.stdin) == io.stdin)
5−assert(not pcall(io.input,"\u{6e}\u{6f}\u{6e}\u{2d}\u{65}\u{78}\u{69}\u{73}\u{74}\u{65}\u{6e}\u{74}\u{2d}\u{66}\u{69}\u{6c}\u{65}"))
6−assert(io.output(io.stdout) == io.stdout)
3+assert((type(os.getenv("\u{50}\u{41}\u{54}\u{48}")) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"))
4+assert((io.input(io.stdin) == io.stdin))
5+assert((not pcall(io.input,"\u{6e}\u{6f}\u{6e}\u{2d}\u{65}\u{78}\u{69}\u{73}\u{74}\u{65}\u{6e}\u{74}\u{2d}\u{66}\u{69}\u{6c}\u{65}")))
6+assert((io.output(io.stdout) == io.stdout))
77local function testerr
88(msg,f, ...)
99local stat,err = pcall(f,...)
10−return (not stat and string.find(err,msg,1,true))
10+return (not (stat and string.find(err,msg,0x1,true)))
1111end
1212local function checkerr
1313(msg,f, ...)
1414assert(testerr(msg,f,...))
1515end
16−assert(not io.close(io.stdin) and not io.stdout:close() and not io.stderr:close())
16+assert((not (io.close(io.stdin) and (not (io.stdout:close() and (not io.stderr:close()))))))
1717checkerr("\u{67}\u{6f}\u{74}\u{20}\u{6e}\u{6f}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}",io.stdin.close)
18−assert(type(io.input()) == "\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}" and io.type(io.output()) == "\u{66}\u{69}\u{6c}\u{65}")
19−assert(type(io.stdin) == "\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}" and io.type(io.stderr) == "\u{66}\u{69}\u{6c}\u{65}")
20−assert(not io.type(8))
18+assert(((type(io.input()) == "\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}") and (io.type(io.output()) == "\u{66}\u{69}\u{6c}\u{65}")))
19+assert(((type(io.stdin) == "\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}") and (io.type(io.stderr) == "\u{66}\u{69}\u{6c}\u{65}")))
20+assert((not io.type(0x8)))
2121local a = {}
2222;
2323setmetatable(a,{})
24−assert(not io.type(a))
25−assert(getmetatable(io.input()).__name == "\u{46}\u{49}\u{4c}\u{45}\u{2a}")
24+assert((not io.type(a)))
25+assert((getmetatable(io.input()).__name == "\u{46}\u{49}\u{4c}\u{45}\u{2a}"))
2626local a,b,c = io.open("\u{78}\u{75}\u{78}\u{75}\u{5f}\u{6e}\u{61}\u{6f}\u{5f}\u{65}\u{78}\u{69}\u{73}\u{74}\u{65}")
27−assert(not a and type(b) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}" and type(c) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")
27+assert((not ((a and (type(b) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(c) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}"))))
2828a,b,c=io.open("\u{2f}\u{61}\u{2f}\u{62}\u{2f}\u{63}\u{2f}\u{64}","\u{77}")
29−assert(not a and type(b) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}" and type(c) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")
29+assert((not ((a and (type(b) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(c) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}"))))
3030local file = os.tmpname()
3131local f,msg = io.open(file,"\u{77}")
32−if not f then
32+if (not f) then
3333(Message or print)("\u{27}\u{6f}\u{73}\u{2e}\u{74}\u{6d}\u{70}\u{6e}\u{61}\u{6d}\u{65}\u{27}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{6f}\u{70}\u{65}\u{6e}\u{3b}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}")
3434else
3535f:close()
@@ -50,31 +50,31 @@ io.input(io.stdin)
5050io.output(io.stdout)
5151;
5252os.remove(file)
53−assert(not loadfile(file))
53+assert((not loadfile(file)))
5454checkerr("",dofile,file)
55−assert(not io.open(file))
55+assert((not io.open(file)))
5656io.output(file)
57−assert(io.output() ~= io.stdout)
58−if not _port then
59−local status,msg,code = io.stdin:seek("\u{73}\u{65}\u{74}",1000)
60−assert(not status and type(msg) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}" and type(code) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")
61−end
62−assert(io.output():seek() == 0)
63−assert(io.write("\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}"):seek() == string.len("\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}"))
64−assert(io.output():seek("\u{63}\u{75}\u{72}",- 3) == string.len("\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}") - 3)
57+assert((io.output() ~= io.stdout))
58+if (not _port) then
59+local status,msg,code = io.stdin:seek("\u{73}\u{65}\u{74}",0x3e8)
60+assert((not ((status and (type(msg) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(code) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}"))))
61+end
62+assert((io.output():seek() == 0x0))
63+assert((io.write("\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}"):seek() == string.len("\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}")))
64+assert((io.output():seek("\u{63}\u{75}\u{72}",(- 0x3)) == (string.len("\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}") - 0x3)))
6565assert(io.write("\u{6a}\u{6f}\u{61}\u{6f}"))
66−assert(io.output():seek("\u{65}\u{6e}\u{64}") == string.len("\u{61}\u{6c}\u{6f}\u{20}\u{6a}\u{6f}\u{61}\u{6f}"))
67−assert(io.output():seek("\u{73}\u{65}\u{74}") == 0)
66+assert((io.output():seek("\u{65}\u{6e}\u{64}") == string.len("\u{61}\u{6c}\u{6f}\u{20}\u{6a}\u{6f}\u{61}\u{6f}")))
67+assert((io.output():seek("\u{73}\u{65}\u{74}") == 0x0))
6868assert(io.write("\u{22}\u{61}\u{6c}\u{6f}\u{22}","\u{7b}\u{61}\u{7d}\u{a}","\u{73}\u{65}\u{63}\u{6f}\u{6e}\u{64}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{a}","\u{74}\u{68}\u{69}\u{72}\u{64}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{20}\u{a}"))
6969assert(io.write("\u{58}\u{66}\u{6f}\u{75}\u{72}\u{74}\u{68}\u{5f}\u{6c}\u{69}\u{6e}\u{65}"))
7070io.output(io.stdout)
7171collectgarbage()
72−assert(io.input() == io.stdin and rawequal(io.output(),io.stdout))
72+assert(((io.input() == io.stdin) and rawequal(io.output(),io.stdout)))
7373print("\u{2b}")
7474collectgarbage()
75−for i = 1, 120
75+for i = 0x1, 0x78
7676do
77−for i = 1, 5
77+for i = 0x1, 0x5
7878do
7979io.input(file)
8080assert(io.open(file,"\u{72}"))
@@ -85,9 +85,9 @@ end
8585io.input():close()
8686io.close()
8787assert(os.rename(file,otherfile))
88−assert(not os.rename(file,otherfile))
88+assert((not os.rename(file,otherfile)))
8989io.output(io.open(otherfile,"\u{61}\u{62}"))
90−assert(io.write("\u{a}\u{a}\u{9}\u{9}\u{20}\u{20}",3450,"\u{a}"))
90+assert(io.write("\u{a}\u{a}\u{9}\u{9}\u{20}\u{20}",0xd7a,"\u{a}"))
9191;
9292io.close()
9393do
@@ -96,7 +96,7 @@ do
9696local f <close> = assert(io.open(file,"\u{77}"))
9797F=f
9898end
99−assert(tostring(F) == "\u{66}\u{69}\u{6c}\u{65}\u{20}\u{28}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{29}")
99+assert((tostring(F) == "\u{66}\u{69}\u{6c}\u{65}\u{20}\u{28}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{29}"))
100100end
101101assert(os.remove(file))
102102do
@@ -104,19 +104,19 @@ local f <close> = assert(io.open(file,"\u{77}"))
104104f:write(maxint,"\u{a}")
105105f:write(string.format("\u{30}\u{58}\u{25}\u{78}\u{a}",maxint))
106106f:write("\u{30}\u{78}\u{41}\u{42}\u{43}\u{70}\u{2d}\u{33}","\u{a}")
107−f:write(0,"\u{a}")
108−f:write(- maxint,"\u{a}")
109−f:write(string.format("\u{30}\u{78}\u{25}\u{58}\u{a}",- maxint))
107+f:write(0x0,"\u{a}")
108+f:write((- maxint),"\u{a}")
109+f:write(string.format("\u{30}\u{78}\u{25}\u{58}\u{a}",(- maxint)))
110110f:write("\u{2d}\u{30}\u{78}\u{41}\u{42}\u{43}\u{70}\u{2d}\u{33}","\u{a}")
111111assert(f:close())
112112local f <close> = assert(io.open(file,"\u{72}"))
113−assert(f:read("\u{6e}") == maxint)
114−assert(f:read("\u{6e}") == maxint)
115−assert(f:read("\u{6e}") == 343.5)
116−assert(f:read("\u{6e}") == 0)
117−assert(f:read("\u{2a}\u{6e}") == - maxint)
118−assert(f:read("\u{6e}") == - maxint)
119−assert(f:read("\u{2a}\u{6e}") == - 343.5)
113+assert((f:read("\u{6e}") == maxint))
114+assert((f:read("\u{6e}") == maxint))
115+assert((f:read("\u{6e}") == 343.5))
116+assert((f:read("\u{6e}") == 0x0))
117+assert((f:read("\u{2a}\u{6e}") == (- maxint)))
118+assert((f:read("\u{6e}") == (- maxint)))
119+assert((f:read("\u{2a}\u{6e}") == (- 343.5)))
120120end
121121assert(os.remove(file))
122122do
@@ -126,30 +126,30 @@ local l1,l2,l3,l4,n1,n2,c,dummy
126126assert(f:close())
127127local f <close> = assert(io.open(file,"\u{72}"))
128128l1,l2,n1,n2,dummy=f:read("\u{6c}","\u{4c}","\u{6e}","\u{6e}")
129−assert(l1 == "\u{61}\u{20}\u{6c}\u{69}\u{6e}\u{65}" and l2 == "\u{61}\u{6e}\u{6f}\u{74}\u{68}\u{65}\u{72}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{a}" and n1 == 1234 and n2 == 3.45 and dummy == nil)
129+assert((((((l1 == "\u{61}\u{20}\u{6c}\u{69}\u{6e}\u{65}") and (l2 == "\u{61}\u{6e}\u{6f}\u{74}\u{68}\u{65}\u{72}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{a}")) and (n1 == 0x4d2)) and (n2 == 3.45)) and (dummy == nil)))
130130assert(f:close())
131131local f <close> = assert(io.open(file,"\u{72}"))
132−l1,l2,n1,n2,c,l3,l4,dummy=f:read(7,"\u{6c}","\u{6e}","\u{6e}",1,"\u{6c}","\u{6c}")
133−assert(l1 == "\u{61}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{a}" and l2 == "\u{61}\u{6e}\u{6f}\u{74}\u{68}\u{65}\u{72}\u{20}\u{6c}\u{69}\u{6e}\u{65}" and c == "\u{a}" and n1 == 1234 and n2 == 3.45 and l3 == "\u{6f}\u{6e}\u{65}" and l4 == "\u{74}\u{77}\u{6f}" and dummy == nil)
132+l1,l2,n1,n2,c,l3,l4,dummy=f:read(0x7,"\u{6c}","\u{6e}","\u{6e}",0x1,"\u{6c}","\u{6c}")
133+assert(((((((((l1 == "\u{61}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{a}") and (l2 == "\u{61}\u{6e}\u{6f}\u{74}\u{68}\u{65}\u{72}\u{20}\u{6c}\u{69}\u{6e}\u{65}")) and (c == "\u{a}")) and (n1 == 0x4d2)) and (n2 == 3.45)) and (l3 == "\u{6f}\u{6e}\u{65}")) and (l4 == "\u{74}\u{77}\u{6f}")) and (dummy == nil)))
134134assert(f:close())
135135local f <close> = assert(io.open(file,"\u{72}"))
136136l1,n1,n2,dummy=f:read("\u{6c}","\u{6e}","\u{6e}","\u{6c}")
137−assert(l1 == "\u{61}\u{20}\u{6c}\u{69}\u{6e}\u{65}" and not n1)
137+assert(((l1 == "\u{61}\u{20}\u{6c}\u{69}\u{6e}\u{65}") and (not n1)))
138138end
139139assert(os.remove(file))
140140f=assert(io.open(file,"\u{77}"))
141141f:write("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{78}\u{2c}\u{20}\u{7a}\u{20}\u{3d}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{2e}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{28}\u{31}\u{30}\u{29}\u{a}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{79}\u{20}\u{3d}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{2e}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{28}\u{32}\u{30}\u{29}\u{a}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{78}\u{20}\u{2b}\u{20}\u{79}\u{20}\u{2a}\u{20}\u{7a}\u{a}")
142142assert(f:close())
143143f=coroutine.wrap(dofile)
144−assert(f(file) == 10)
145−assert(f(100,101) == 20)
146−assert(f(200) == 100 + 200 * 101)
144+assert((f(file) == 0xa))
145+assert((f(0x64,0x65) == 0x14))
146+assert((f(0xc8) == (0x64 + (0xc8 * 0x65))))
147147assert(os.remove(file))
148148f=assert(io.open(file,"\u{77}"))
149149f:write("\u{2d}\u{31}\u{32}\u{2e}\u{33}\u{2d}\u{9}\u{2d}\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{2b}\u{20}\u{20}\u{2e}\u{33}\u{7c}\u{35}\u{2e}\u{45}\u{2d}\u{33}\u{58}\u{20}\u{20}\u{2b}\u{32}\u{33}\u{34}\u{65}\u{2b}\u{31}\u{33}\u{45}\u{20}\u{30}\u{78}\u{44}\u{45}\u{41}\u{44}\u{42}\u{45}\u{45}\u{46}\u{44}\u{45}\u{41}\u{44}\u{42}\u{45}\u{45}\u{46}\u{78}\u{a}\u{30}\u{78}\u{31}\u{2e}\u{31}\u{33}\u{41}\u{70}\u{2b}\u{33}\u{65}\u{a}")
150150f:write("\u{31}\u{32}\u{33}\u{34}")
151151;
152−for i = 1, 1000
152+for i = 0x1, 0x3e8
153153do
154154f:write("\u{30}")
155155end
@@ -158,119 +158,119 @@ f:write("\u{a}")
158158f:write("\u{2e}\u{65}\u{2b}\u{9}\u{30}\u{2e}\u{65}\u{3b}\u{9}\u{2d}\u{2d}\u{3b}\u{20}\u{20}\u{30}\u{78}\u{58}\u{3b}\u{a}")
159159assert(f:close())
160160f=assert(io.open(file,"\u{72}"))
161−assert(f:read("\u{6e}") == - 12.3)
161+assert((f:read("\u{6e}") == (- 12.3)))
162162;
163−assert(f:read(1) == "\u{2d}")
164−assert(f:read("\u{6e}") == - 65535)
163+assert((f:read(0x1) == "\u{2d}"))
164+assert((f:read("\u{6e}") == (- 0xffff)))
165165;
166−assert(f:read(2) == "\u{2b}\u{20}")
167−assert(f:read("\u{6e}") == 0.3)
166+assert((f:read(0x2) == "\u{2b}\u{20}"))
167+assert((f:read("\u{6e}") == 0.3))
168168;
169−assert(f:read(1) == "\u{7c}")
170−assert(f:read("\u{6e}") == 5e-3)
169+assert((f:read(0x1) == "\u{7c}"))
170+assert((f:read("\u{6e}") == 5e-3))
171171;
172−assert(f:read(1) == "\u{58}")
173−assert(f:read("\u{6e}") == 2.34e15)
172+assert((f:read(0x1) == "\u{58}"))
173+assert((f:read("\u{6e}") == 2.34e15))
174174;
175−assert(f:read(1) == "\u{45}")
176−assert(f:read("\u{6e}") == 16045690984833335023)
175+assert((f:read(0x1) == "\u{45}"))
176+assert((f:read("\u{6e}") == 0xdeadbeefdeadbeef))
177177;
178−assert(f:read(2) == "\u{78}\u{a}")
179−assert(f:read("\u{6e}") == 8.61328125)
178+assert((f:read(0x2) == "\u{78}\u{a}"))
179+assert((f:read("\u{6e}") == 8.61328125))
180180;
181−assert(f:read(1) == "\u{65}")
181+assert((f:read(0x1) == "\u{65}"))
182182do
183−assert(not f:read("\u{6e}"))
183+assert((not f:read("\u{6e}")))
184184local s = f:read("\u{4c}")
185185assert(string.find(s,"\u{5e}\u{30}\u{30}\u{2a}\u{a}\u{24}"))
186186end
187−assert(not f:read("\u{6e}"))
187+assert((not f:read("\u{6e}")))
188188;
189−assert(f:read(2) == "\u{65}\u{2b}")
190−assert(not f:read("\u{6e}"))
189+assert((f:read(0x2) == "\u{65}\u{2b}"))
190+assert((not f:read("\u{6e}")))
191191;
192−assert(f:read(1) == "\u{3b}")
193−assert(not f:read("\u{6e}"))
192+assert((f:read(0x1) == "\u{3b}"))
193+assert((not f:read("\u{6e}")))
194194;
195−assert(f:read(2) == "\u{2d}\u{3b}")
196−assert(not f:read("\u{6e}"))
195+assert((f:read(0x2) == "\u{2d}\u{3b}"))
196+assert((not f:read("\u{6e}")))
197197;
198−assert(f:read(1) == "\u{58}")
199−assert(not f:read("\u{6e}"))
198+assert((f:read(0x1) == "\u{58}"))
199+assert((not f:read("\u{6e}")))
200200;
201−assert(f:read(1) == "\u{3b}")
202−assert(not f:read("\u{6e}"))
201+assert((f:read(0x1) == "\u{3b}"))
202+assert((not f:read("\u{6e}")))
203203;
204−assert(not f:read(0))
204+assert((not f:read(0x0)))
205205assert(f:close())
206206assert(os.remove(file))
207−assert(not pcall(io.lines,"\u{6e}\u{6f}\u{6e}\u{2d}\u{65}\u{78}\u{69}\u{73}\u{74}\u{65}\u{6e}\u{74}\u{2d}\u{66}\u{69}\u{6c}\u{65}"))
207+assert((not pcall(io.lines,"\u{6e}\u{6f}\u{6e}\u{2d}\u{65}\u{78}\u{69}\u{73}\u{74}\u{65}\u{6e}\u{74}\u{2d}\u{66}\u{69}\u{6c}\u{65}")))
208208assert(os.rename(otherfile,file))
209209io.output(otherfile)
210−local n = 0
210+local n = 0x0
211211local f = io.lines(file)
212212while f() do
213−n=n + 1
213+n=(n + 0x1)
214214end
215215;
216−assert(n == 6)
216+assert((n == 0x6))
217217checkerr("\u{66}\u{69}\u{6c}\u{65}\u{20}\u{69}\u{73}\u{20}\u{61}\u{6c}\u{72}\u{65}\u{61}\u{64}\u{79}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}",f)
218218checkerr("\u{66}\u{69}\u{6c}\u{65}\u{20}\u{69}\u{73}\u{20}\u{61}\u{6c}\u{72}\u{65}\u{61}\u{64}\u{79}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}",f)
219−n=0
219+n=0x0
220220for l in io.lines(file)
221221do
222222io.write(l,"\u{a}")
223223;
224−n=n + 1
224+n=(n + 0x1)
225225end
226226io.close()
227−assert(n == 6)
227+assert((n == 0x6))
228228local f = assert(io.open(otherfile))
229−assert(io.type(f) == "\u{66}\u{69}\u{6c}\u{65}")
229+assert((io.type(f) == "\u{66}\u{69}\u{6c}\u{65}"))
230230io.output(file)
231−assert(not io.output():read())
232−n=0
231+assert((not io.output():read()))
232+n=0x0
233233for l in f:lines()
234234do
235235io.write(l,"\u{a}")
236236;
237−n=n + 1
237+n=(n + 0x1)
238238end
239−assert(tostring(f):sub(1,5) == "\u{66}\u{69}\u{6c}\u{65}\u{20}")
239+assert((tostring(f):sub(0x1,0x5) == "\u{66}\u{69}\u{6c}\u{65}\u{20}"))
240240assert(f:close())
241241;
242242io.close()
243−assert(n == 6)
243+assert((n == 0x6))
244244checkerr("\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{20}\u{66}\u{69}\u{6c}\u{65}",io.close,f)
245−assert(tostring(f) == "\u{66}\u{69}\u{6c}\u{65}\u{20}\u{28}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{29}")
246−assert(io.type(f) == "\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{20}\u{66}\u{69}\u{6c}\u{65}")
245+assert((tostring(f) == "\u{66}\u{69}\u{6c}\u{65}\u{20}\u{28}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{29}"))
246+assert((io.type(f) == "\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{20}\u{66}\u{69}\u{6c}\u{65}"))
247247io.input(file)
248248f=io.open(otherfile):lines()
249−n=0
249+n=0x0
250250for l in io.lines()
251251do
252−assert(l == f())
252+assert((l == f()))
253253;
254−n=n + 1
254+n=(n + 0x1)
255255end
256256f=nil
257257;
258258collectgarbage()
259−assert(n == 6)
259+assert((n == 0x6))
260260assert(os.remove(otherfile))
261261do
262262io.output(otherfile)
263−io.write(string.rep("\u{61}",300),"\u{a}")
263+io.write(string.rep("\u{61}",0x12c),"\u{a}")
264264io.close()
265265local t = {}
266266;
267−for i = 1, 250
267+for i = 0x1, 0xfa
268268do
269−t[i]=1
269+t[i]=0x1
270270end
271271t={io.lines(otherfile,table.unpack(t))()}
272−assert(# t == 250 and t[1] == "\u{61}" and t[# t] == "\u{61}")
273−t[# t + 1]=1
272+assert((# (((t == 0xfa) and (t[0x1] == "\u{61}")) and (t[(# t)] == "\u{61}"))))
273+t[(# (t + 0x1))]=0x1
274274checkerr("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{61}\u{72}\u{67}\u{75}\u{6d}\u{65}\u{6e}\u{74}\u{73}",io.lines,otherfile,table.unpack(t))
275275collectgarbage()
276276assert(os.remove(otherfile))
@@ -278,46 +278,46 @@ end
278278io.input(file)
279279do
280280local a,b,c = io.input():write("\u{78}\u{75}\u{78}\u{75}")
281−assert(not a and type(b) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}" and type(c) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")
281+assert((not ((a and (type(b) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(c) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}"))))
282282end
283283checkerr("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{66}\u{6f}\u{72}\u{6d}\u{61}\u{74}",io.read,"\u{78}")
284−assert(io.read(0) == "")
285−assert(io.read(5,"\u{6c}") == "\u{22}\u{61}\u{6c}\u{6f}\u{22}")
286−assert(io.read(0) == "")
287−assert(io.read() == "\u{73}\u{65}\u{63}\u{6f}\u{6e}\u{64}\u{20}\u{6c}\u{69}\u{6e}\u{65}")
284+assert((io.read(0x0) == ""))
285+assert((io.read(0x5,"\u{6c}") == "\u{22}\u{61}\u{6c}\u{6f}\u{22}"))
286+assert((io.read(0x0) == ""))
287+assert((io.read() == "\u{73}\u{65}\u{63}\u{6f}\u{6e}\u{64}\u{20}\u{6c}\u{69}\u{6e}\u{65}"))
288288local x = io.input():seek()
289−assert(io.read() == "\u{74}\u{68}\u{69}\u{72}\u{64}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{20}")
289+assert((io.read() == "\u{74}\u{68}\u{69}\u{72}\u{64}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{20}"))
290290assert(io.input():seek("\u{73}\u{65}\u{74}",x))
291−assert(io.read("\u{4c}") == "\u{74}\u{68}\u{69}\u{72}\u{64}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{20}\u{a}")
292−assert(io.read(1) == "\u{58}")
293−assert(io.read(string.len("\u{66}\u{6f}\u{75}\u{72}\u{74}\u{68}\u{5f}\u{6c}\u{69}\u{6e}\u{65}")) == "\u{66}\u{6f}\u{75}\u{72}\u{74}\u{68}\u{5f}\u{6c}\u{69}\u{6e}\u{65}")
294−assert(io.input():seek("\u{63}\u{75}\u{72}",- string.len("\u{66}\u{6f}\u{75}\u{72}\u{74}\u{68}\u{5f}\u{6c}\u{69}\u{6e}\u{65}")))
295−assert(io.read() == "\u{66}\u{6f}\u{75}\u{72}\u{74}\u{68}\u{5f}\u{6c}\u{69}\u{6e}\u{65}")
296−assert(io.read() == "")
297−assert(io.read("\u{6e}") == 3450)
298−assert(io.read(1) == "\u{a}")
299−assert(not io.read(0))
300−assert(not io.read(1))
301−assert(not io.read(30000))
302−assert(({io.read(1)})[2] == undef)
303−assert(not io.read())
304−assert(({io.read()})[2] == undef)
305−assert(not io.read("\u{6e}"))
306−assert(({io.read("\u{6e}")})[2] == undef)
307−assert(io.read("\u{61}") == "")
308−assert(io.read("\u{61}") == "")
291+assert((io.read("\u{4c}") == "\u{74}\u{68}\u{69}\u{72}\u{64}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{20}\u{a}"))
292+assert((io.read(0x1) == "\u{58}"))
293+assert((io.read(string.len("\u{66}\u{6f}\u{75}\u{72}\u{74}\u{68}\u{5f}\u{6c}\u{69}\u{6e}\u{65}")) == "\u{66}\u{6f}\u{75}\u{72}\u{74}\u{68}\u{5f}\u{6c}\u{69}\u{6e}\u{65}"))
294+assert(io.input():seek("\u{63}\u{75}\u{72}",(- string.len("\u{66}\u{6f}\u{75}\u{72}\u{74}\u{68}\u{5f}\u{6c}\u{69}\u{6e}\u{65}"))))
295+assert((io.read() == "\u{66}\u{6f}\u{75}\u{72}\u{74}\u{68}\u{5f}\u{6c}\u{69}\u{6e}\u{65}"))
296+assert((io.read() == ""))
297+assert((io.read("\u{6e}") == 0xd7a))
298+assert((io.read(0x1) == "\u{a}"))
299+assert((not io.read(0x0)))
300+assert((not io.read(0x1)))
301+assert((not io.read(0x7530)))
302+assert((({io.read(0x1)})[0x2] == undef))
303+assert((not io.read()))
304+assert((({io.read()})[0x2] == undef))
305+assert((not io.read("\u{6e}")))
306+assert((({io.read("\u{6e}")})[0x2] == undef))
307+assert((io.read("\u{61}") == ""))
308+assert((io.read("\u{61}") == ""))
309309collectgarbage()
310310print("\u{2b}")
311311io.close(io.input())
312312checkerr("\u{20}\u{69}\u{6e}\u{70}\u{75}\u{74}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{20}\u{69}\u{73}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}",io.read)
313313assert(os.remove(file))
314314local t = "\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}"
315−for i = 1, 10
315+for i = 0x1, 0xa
316316do
317−t=t .. t
317+t=(t .. t)
318318;
319319end
320−assert(string.len(t) == 10 * 2 ^ 10)
320+assert((string.len(t) == (0xa * (0x2 ^ 0xa))))
321321io.output(file)
322322io.write("\u{61}\u{6c}\u{6f}"):write("\u{a}")
323323io.close()
@@ -325,7 +325,7 @@ checkerr("\u{20}\u{6f}\u{75}\u{74}\u{70}\u{75}\u{74}\u{20}\u{66}\u{69}\u{6c}\u{6
325325local f = io.open(file,"\u{61}\u{2b}\u{62}")
326326io.output(f)
327327collectgarbage()
328−assert(io.write("\u{20}" .. t .. "\u{20}"))
328+assert(io.write(("\u{20}" .. (t .. "\u{20}"))))
329329assert(io.write("\u{3b}","\u{65}\u{6e}\u{64}\u{20}\u{6f}\u{66}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{a}"))
330330f:flush()
331331;
@@ -333,30 +333,30 @@ io.flush()
333333f:close()
334334print("\u{2b}")
335335io.input(file)
336−assert(io.read() == "\u{61}\u{6c}\u{6f}")
337−assert(io.read(1) == "\u{20}")
338−assert(io.read(string.len(t)) == t)
339−assert(io.read(1) == "\u{20}")
340−assert(io.read(0))
341−assert(io.read("\u{61}") == "\u{3b}\u{65}\u{6e}\u{64}\u{20}\u{6f}\u{66}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{a}")
342−assert(not io.read(0))
336+assert((io.read() == "\u{61}\u{6c}\u{6f}"))
337+assert((io.read(0x1) == "\u{20}"))
338+assert((io.read(string.len(t)) == t))
339+assert((io.read(0x1) == "\u{20}"))
340+assert(io.read(0x0))
341+assert((io.read("\u{61}") == "\u{3b}\u{65}\u{6e}\u{64}\u{20}\u{6f}\u{66}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{a}"))
342+assert((not io.read(0x0)))
343343assert(io.close(io.input()))
344344do
345345local function ismsg
346346(m)
347−return (type(m) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}" and not tonumber(m))
347+return ((type(m) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}") and (not tonumber(m)))
348348end
349349local f = io.open(file,"\u{77}")
350350local r,m,c = f:read()
351−assert(not r and ismsg(m) and type(c) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")
351+assert((not ((r and ismsg(m)) and (type(c) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}"))))
352352assert(f:close())
353353f=io.open(file,"\u{72}")
354354r,m,c=f:write("\u{77}\u{68}\u{61}\u{74}\u{65}\u{76}\u{65}\u{72}")
355−assert(not r and ismsg(m) and type(c) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")
355+assert((not ((r and ismsg(m)) and (type(c) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}"))))
356356assert(f:close())
357357f=io.open(file,"\u{77}")
358358r,m=pcall(f:lines())
359−assert(r == false and ismsg(m))
359+assert(((r == false) and ismsg(m)))
360360assert(f:close())
361361end
362362assert(os.remove(file))
@@ -364,57 +364,57 @@ io.output(file)
364364;
365365io.write("\u{a}\u{a}\u{6c}\u{69}\u{6e}\u{65}\u{a}\u{6f}\u{74}\u{68}\u{65}\u{72}"):close()
366366io.input(file)
367−assert(io.read("\u{4c}") == "\u{a}")
368−assert(io.read("\u{4c}") == "\u{a}")
369−assert(io.read("\u{4c}") == "\u{6c}\u{69}\u{6e}\u{65}\u{a}")
370−assert(io.read("\u{4c}") == "\u{6f}\u{74}\u{68}\u{65}\u{72}")
371−assert(not io.read("\u{4c}"))
367+assert((io.read("\u{4c}") == "\u{a}"))
368+assert((io.read("\u{4c}") == "\u{a}"))
369+assert((io.read("\u{4c}") == "\u{6c}\u{69}\u{6e}\u{65}\u{a}"))
370+assert((io.read("\u{4c}") == "\u{6f}\u{74}\u{68}\u{65}\u{72}"))
371+assert((not io.read("\u{4c}")))
372372io.input():close()
373373local f = assert(io.open(file))
374374local s = ""
375375for l in f:lines("\u{4c}")
376376do
377−s=s .. l
377+s=(s .. l)
378378end
379−assert(s == "\u{a}\u{a}\u{6c}\u{69}\u{6e}\u{65}\u{a}\u{6f}\u{74}\u{68}\u{65}\u{72}")
379+assert((s == "\u{a}\u{a}\u{6c}\u{69}\u{6e}\u{65}\u{a}\u{6f}\u{74}\u{68}\u{65}\u{72}"))
380380f:close()
381381io.input(file)
382382s=""
383383for l in io.lines(nil,"\u{4c}")
384384do
385−s=s .. l
385+s=(s .. l)
386386end
387−assert(s == "\u{a}\u{a}\u{6c}\u{69}\u{6e}\u{65}\u{a}\u{6f}\u{74}\u{68}\u{65}\u{72}")
387+assert((s == "\u{a}\u{a}\u{6c}\u{69}\u{6e}\u{65}\u{a}\u{6f}\u{74}\u{68}\u{65}\u{72}"))
388388io.input():close()
389389s=""
390390for l in io.lines(file,"\u{4c}")
391391do
392−s=s .. l
392+s=(s .. l)
393393end
394−assert(s == "\u{a}\u{a}\u{6c}\u{69}\u{6e}\u{65}\u{a}\u{6f}\u{74}\u{68}\u{65}\u{72}")
394+assert((s == "\u{a}\u{a}\u{6c}\u{69}\u{6e}\u{65}\u{a}\u{6f}\u{74}\u{68}\u{65}\u{72}"))
395395s=""
396396for l in io.lines(file,"\u{6c}")
397397do
398−s=s .. l
398+s=(s .. l)
399399end
400−assert(s == "\u{6c}\u{69}\u{6e}\u{65}\u{6f}\u{74}\u{68}\u{65}\u{72}")
400+assert((s == "\u{6c}\u{69}\u{6e}\u{65}\u{6f}\u{74}\u{68}\u{65}\u{72}"))
401401io.output(file)
402402;
403403io.write("\u{61}\u{20}\u{3d}\u{20}\u{31}\u{30}\u{20}\u{2b}\u{20}\u{33}\u{34}\u{a}\u{61}\u{20}\u{3d}\u{20}\u{32}\u{2a}\u{61}\u{a}\u{61}\u{20}\u{3d}\u{20}\u{2d}\u{61}\u{a}"):close()
404404local t = {}
405405assert(load(io.lines(file,"\u{4c}"),nil,nil,t))()
406−assert(t.a == - ((10 + 34) * 2))
406+assert((t.a == (- ((0xa + 0x22) * 0x2))))
407407do
408408local function gettoclose
409409(lv)
410−lv=lv + 1
411−local stvar = 0
412−for i = 1, 1000
410+lv=(lv + 0x1)
411+local stvar = 0x0
412+for i = 0x1, 0x3e8
413413do
414414local n,v = debug.getlocal(lv,i)
415−if n == "\u{28}\u{66}\u{6f}\u{72}\u{20}\u{73}\u{74}\u{61}\u{74}\u{65}\u{29}" then
416−stvar=stvar + 1
417−if stvar == 4 then
415+if (n == "\u{28}\u{66}\u{6f}\u{72}\u{20}\u{73}\u{74}\u{61}\u{74}\u{65}\u{29}") then
416+stvar=(stvar + 0x1)
417+if (stvar == 0x4) then
418418return v
419419end
420420end
@@ -423,45 +423,45 @@ end
423423local f
424424for l in io.lines(file)
425425do
426−f=gettoclose(1)
427−assert(io.type(f) == "\u{66}\u{69}\u{6c}\u{65}")
426+f=gettoclose(0x1)
427+assert((io.type(f) == "\u{66}\u{69}\u{6c}\u{65}"))
428428break
429429end
430−assert(io.type(f) == "\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{20}\u{66}\u{69}\u{6c}\u{65}")
430+assert((io.type(f) == "\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{20}\u{66}\u{69}\u{6c}\u{65}"))
431431f=nil
432432local function foo
433433(name)
434434for l in io.lines(name)
435435do
436−f=gettoclose(1)
437−assert(io.type(f) == "\u{66}\u{69}\u{6c}\u{65}")
436+f=gettoclose(0x1)
437+assert((io.type(f) == "\u{66}\u{69}\u{6c}\u{65}"))
438438error(f)
439439end
440440end
441441local st,msg = pcall(foo,file)
442−assert(st == false and io.type(msg) == "\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{20}\u{66}\u{69}\u{6c}\u{65}")
442+assert(((st == false) and (io.type(msg) == "\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{20}\u{66}\u{69}\u{6c}\u{65}")))
443443end
444444io.output(file)
445445;
446446io.write("\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}"):close()
447−for a,b in io.lines(file,1,1)
447+for a,b in io.lines(file,0x1,0x1)
448448do
449−if a == "\u{a}" then
450−assert(not b)
449+if (a == "\u{a}") then
450+assert((not b))
451451else
452−assert(tonumber(a) == tonumber(b) - 1)
452+assert((tonumber(a) == (tonumber(b) - 0x1)))
453453end
454454end
455−for a,b,c in io.lines(file,1,2,"\u{61}")
455+for a,b,c in io.lines(file,0x1,0x2,"\u{61}")
456456do
457−assert(a == "\u{30}" and b == "\u{31}\u{32}" and c == "\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}")
457+assert((((a == "\u{30}") and (b == "\u{31}\u{32}")) and (c == "\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}")))
458458end
459−for a,b,c in io.lines(file,"\u{61}",0,1)
459+for a,b,c in io.lines(file,"\u{61}",0x0,0x1)
460460do
461−if a == "" then
461+if (a == "") then
462462break
463463end
464−assert(a == "\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}" and not b and not c)
464+assert(((a == "\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}") and (not (b and (not c)))))
465465end
466466collectgarbage()
467467io.output(file)
@@ -469,24 +469,24 @@ io.output(file)
469469io.write("\u{30}\u{30}\u{a}\u{31}\u{30}\u{a}\u{32}\u{30}\u{a}\u{33}\u{30}\u{a}\u{34}\u{30}\u{a}"):close()
470470for a,b in io.lines(file,"\u{6e}","\u{6e}")
471471do
472−if a == 40 then
473−assert(not b)
472+if (a == 0x28) then
473+assert((not b))
474474else
475−assert(a == b - 10)
475+assert((a == (b - 0xa)))
476476end
477477end
478478io.output(file)
479479;
480480io.write("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{79}\u{a}\u{3d}\u{20}\u{58}\u{a}\u{58}\u{20}\u{3d}\u{a}\u{58}\u{20}\u{2a}\u{a}\u{32}\u{20}\u{2b}\u{a}\u{58}\u{3b}\u{a}\u{58}\u{20}\u{3d}\u{a}\u{58}\u{a}\u{2d}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{79}\u{3b}\u{a}"):close()
481−_G.X=1
482−assert(not load((io.lines(file))))
481+_G.X=0x1
482+assert((not load(io.lines(file))))
483483collectgarbage()
484−load((io.lines(file,"\u{4c}")))()
485−assert(_G.X == 2)
486−load((io.lines(file,1)))()
487−assert(_G.X == 4)
488−load((io.lines(file,3)))()
489−assert(_G.X == 8)
484+load(io.lines(file,"\u{4c}"))()
485+assert((_G.X == 0x2))
486+load(io.lines(file,0x1))()
487+assert((_G.X == 0x4))
488+load(io.lines(file,0x3))()
489+assert((_G.X == 0x8))
490490_G.X=nil
491491print("\u{2b}")
492492local x1 = "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{a}\u{a}\u{5c}\u{63}\u{6f}\u{6d}\u{20}\u{22}\u{22}\u{27}\u{27}\u{63}\u{6f}\u{69}\u{73}\u{61}\u{73}\u{20}\u{5b}\u{5b}\u{65}\u{73}\u{74}\u{72}\u{61}\u{6e}\u{68}\u{61}\u{73}\u{5d}\u{5d}\u{20}\u{5d}\u{5d}\u{27}"
@@ -494,12 +494,12 @@ io.output(file)
494494assert(io.write(string.format("\u{58}\u{32}\u{20}\u{3d}\u{20}\u{25}\u{71}\u{a}\u{2d}\u{2d}\u{20}\u{63}\u{6f}\u{6d}\u{6d}\u{65}\u{6e}\u{74}\u{20}\u{77}\u{69}\u{74}\u{68}\u{6f}\u{75}\u{74}\u{20}\u{65}\u{6e}\u{64}\u{69}\u{6e}\u{67}\u{20}\u{45}\u{4f}\u{53}",x1)))
495495io.close()
496496assert(loadfile(file))()
497−assert(x1 == _G.X2)
497+assert((x1 == _G.X2))
498498_G.X2=nil
499499print("\u{2b}")
500500assert(os.remove(file))
501−assert(not os.remove(file))
502−assert(not os.remove(otherfile))
501+assert((not os.remove(file)))
502+assert((not os.remove(otherfile)))
503503local function testloadfile
504504(s,expres)
505505io.output(file)
@@ -509,62 +509,62 @@ end
509509io.close()
510510local res = assert(loadfile(file))()
511511assert(os.remove(file))
512−assert(res == expres)
512+assert((res == expres))
513513end
514514testloadfile(nil,nil)
515515testloadfile("\u{23}\u{20}\u{61}\u{20}\u{6e}\u{6f}\u{6e}\u{2d}\u{65}\u{6e}\u{64}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{6f}\u{6d}\u{6d}\u{65}\u{6e}\u{74}",nil)
516−testloadfile("\u{ef}\u{bb}\u{bf}\u{23}\u{20}\u{73}\u{6f}\u{6d}\u{65}\u{20}\u{63}\u{6f}\u{6d}\u{6d}\u{65}\u{6e}\u{74}\u{a}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}\u{33}\u{34}",234)
517−testloadfile("\u{ef}\u{bb}\u{bf}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}\u{33}\u{39}",239)
516+testloadfile("\u{ef}\u{bb}\u{bf}\u{23}\u{20}\u{73}\u{6f}\u{6d}\u{65}\u{20}\u{63}\u{6f}\u{6d}\u{6d}\u{65}\u{6e}\u{74}\u{a}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}\u{33}\u{34}",0xea)
517+testloadfile("\u{ef}\u{bb}\u{bf}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}\u{33}\u{39}",0xef)
518518testloadfile("\u{ef}\u{bb}\u{bf}",nil)
519−testloadfile("\u{23}\u{20}\u{61}\u{20}\u{63}\u{6f}\u{6d}\u{6d}\u{65}\u{6e}\u{74}\u{a}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{27}\u{64}\u{65}\u{62}\u{75}\u{67}\u{27}\u{2e}\u{67}\u{65}\u{74}\u{69}\u{6e}\u{66}\u{6f}\u{28}\u{31}\u{29}\u{2e}\u{63}\u{75}\u{72}\u{72}\u{65}\u{6e}\u{74}\u{6c}\u{69}\u{6e}\u{65}",2)
519+testloadfile("\u{23}\u{20}\u{61}\u{20}\u{63}\u{6f}\u{6d}\u{6d}\u{65}\u{6e}\u{74}\u{a}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{27}\u{64}\u{65}\u{62}\u{75}\u{67}\u{27}\u{2e}\u{67}\u{65}\u{74}\u{69}\u{6e}\u{66}\u{6f}\u{28}\u{31}\u{29}\u{2e}\u{63}\u{75}\u{72}\u{72}\u{65}\u{6e}\u{74}\u{6c}\u{69}\u{6e}\u{65}",0x2)
520520io.output(io.open(file,"\u{77}\u{62}"))
521521assert(io.write(string.dump(function ()
522−return 10,"\u{0}\u{61}\u{6c}\u{6f}\u{ff}","\u{68}\u{69}"
522+return 0xa,"\u{0}\u{61}\u{6c}\u{6f}\u{ff}","\u{68}\u{69}"
523523end)))
524524io.close()
525525a,b,c=assert(loadfile(file))()
526−assert(a == 10 and b == "\u{0}\u{61}\u{6c}\u{6f}\u{ff}" and c == "\u{68}\u{69}")
526+assert((((a == 0xa) and (b == "\u{0}\u{61}\u{6c}\u{6f}\u{ff}")) and (c == "\u{68}\u{69}")))
527527assert(os.remove(file))
528528do
529529io.output(io.open(file,"\u{77}\u{62}"))
530530assert(io.write(string.dump(function ()
531−return 1
531+return 0x1
532532end)))
533533io.close()
534534f=assert(loadfile(file,"\u{62}",{}))
535−assert(type(f) == "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}" and f() == 1)
535+assert(((type(f) == "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}") and (f() == 0x1)))
536536assert(os.remove(file))
537537end
538538io.output(io.open(file,"\u{77}\u{62}"))
539539assert(io.write("\u{23}\u{74}\u{68}\u{69}\u{73}\u{20}\u{69}\u{73}\u{20}\u{61}\u{20}\u{63}\u{6f}\u{6d}\u{6d}\u{65}\u{6e}\u{74}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{61}\u{20}\u{62}\u{69}\u{6e}\u{61}\u{72}\u{79}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{0}\u{a}",string.dump(function ()
540−return 20,"\u{0}\u{0}\u{0}"
540+return 0x14,"\u{0}\u{0}\u{0}"
541541end)))
542542io.close()
543543a,b,c=assert(loadfile(file))()
544−assert(a == 20 and b == "\u{0}\u{0}\u{0}" and c == nil)
544+assert((((a == 0x14) and (b == "\u{0}\u{0}\u{0}")) and (c == nil)))
545545assert(os.remove(file))
546546do
547547local f = io.open(file,"\u{77}")
548548f:write("\u{20}\u{20}\u{20}\u{20}\u{69}\u{66}\u{20}\u{28}\u{2e}\u{2e}\u{2e}\u{29}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{31}\u{35}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{62}\u{2c}\u{20}\u{63}\u{2c}\u{20}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{65}\u{6c}\u{73}\u{65}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{5f}\u{45}\u{4e}\u{56}\u{a}\u{20}\u{20}\u{20}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}")
549549f:close()
550−local t = {["\u{62}"] = 12,["\u{63}"] = "\u{78}\u{75}\u{78}\u{75}",["\u{64}"] = print}
550+local t = {["\u{62}"] = 0xc,["\u{63}"] = "\u{78}\u{75}\u{78}\u{75}",["\u{64}"] = print}
551551local f = assert(loadfile(file,"\u{74}",t))
552−local b,c,d = f(1)
553−assert(t.a == 15 and b == 12 and c == t.c and d == print)
554−assert(f() == t)
552+local b,c,d = f(0x1)
553+assert(((((t.a == 0xf) and (b == 0xc)) and (c == t.c)) and (d == print)))
554+assert((f() == t))
555555f=assert(loadfile(file,"\u{74}",nil))
556−assert(f() == nil)
556+assert((f() == nil))
557557f=assert(loadfile(file))
558−assert(f() == _G)
558+assert((f() == _G))
559559assert(os.remove(file))
560560end
561561do
562562io.open(file,"\u{77}"):write("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{30}"):close()
563563local s,m = loadfile(file,"\u{62}")
564−assert(not s and string.find(m,"\u{61}\u{20}\u{74}\u{65}\u{78}\u{74}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}"))
564+assert((not (s and string.find(m,"\u{61}\u{20}\u{74}\u{65}\u{78}\u{74}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}"))))
565565io.open(file,"\u{77}"):write("\u{1b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{30}"):close()
566566local s,m = loadfile(file,"\u{74}")
567−assert(not s and string.find(m,"\u{61}\u{20}\u{62}\u{69}\u{6e}\u{61}\u{72}\u{79}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}"))
567+assert((not (s and string.find(m,"\u{61}\u{20}\u{62}\u{69}\u{6e}\u{61}\u{72}\u{79}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}"))))
568568assert(os.remove(file))
569569end
570570io.output(file)
@@ -574,96 +574,96 @@ io.close()
574574assert(io.output(assert(io.open(otherfile,"\u{77}\u{62}"))):write("\u{6f}\u{75}\u{74}\u{72}\u{61}\u{20}\u{63}\u{6f}\u{69}\u{73}\u{61}\u{0}\u{1}\u{3}\u{0}\u{0}\u{0}\u{0}\u{ff}\u{0}"):close())
575575local filehandle = assert(io.open(file,"\u{72}\u{2b}"))
576576local otherfilehandle = assert(io.open(otherfile,"\u{72}\u{62}"))
577−assert(filehandle ~= otherfilehandle)
578−assert(type(filehandle) == "\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}")
579−assert(filehandle:read("\u{6c}") == "\u{71}\u{75}\u{61}\u{6c}\u{71}\u{75}\u{65}\u{72}\u{20}\u{63}\u{6f}\u{69}\u{73}\u{61}")
577+assert((filehandle ~= otherfilehandle))
578+assert((type(filehandle) == "\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}"))
579+assert((filehandle:read("\u{6c}") == "\u{71}\u{75}\u{61}\u{6c}\u{71}\u{75}\u{65}\u{72}\u{20}\u{63}\u{6f}\u{69}\u{73}\u{61}"))
580580io.input(otherfilehandle)
581−assert(io.read(string.len("\u{6f}\u{75}\u{74}\u{72}\u{61}\u{20}\u{63}\u{6f}\u{69}\u{73}\u{61}")) == "\u{6f}\u{75}\u{74}\u{72}\u{61}\u{20}\u{63}\u{6f}\u{69}\u{73}\u{61}")
582−assert(filehandle:read("\u{6c}") == "\u{6d}\u{61}\u{69}\u{73}\u{20}\u{71}\u{75}\u{61}\u{6c}\u{71}\u{75}\u{65}\u{72}\u{20}\u{63}\u{6f}\u{69}\u{73}\u{61}")
581+assert((io.read(string.len("\u{6f}\u{75}\u{74}\u{72}\u{61}\u{20}\u{63}\u{6f}\u{69}\u{73}\u{61}")) == "\u{6f}\u{75}\u{74}\u{72}\u{61}\u{20}\u{63}\u{6f}\u{69}\u{73}\u{61}"))
582+assert((filehandle:read("\u{6c}") == "\u{6d}\u{61}\u{69}\u{73}\u{20}\u{71}\u{75}\u{61}\u{6c}\u{71}\u{75}\u{65}\u{72}\u{20}\u{63}\u{6f}\u{69}\u{73}\u{61}"))
583583filehandle:close()
584584;
585−assert(type(filehandle) == "\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}")
585+assert((type(filehandle) == "\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}"))
586586io.input(otherfilehandle)
587−assert(io.read(4) == "\u{0}\u{1}\u{3}\u{0}")
588−assert(io.read(3) == "\u{0}\u{0}\u{0}")
589−assert(io.read(0) == "")
590−assert(io.read(1) == "\u{ff}")
591−assert(io.read("\u{61}") == "\u{0}")
592−assert(not io.read(0))
593−assert(otherfilehandle == io.input())
587+assert((io.read(0x4) == "\u{0}\u{1}\u{3}\u{0}"))
588+assert((io.read(0x3) == "\u{0}\u{0}\u{0}"))
589+assert((io.read(0x0) == ""))
590+assert((io.read(0x1) == "\u{ff}"))
591+assert((io.read("\u{61}") == "\u{0}"))
592+assert((not io.read(0x0)))
593+assert((otherfilehandle == io.input()))
594594otherfilehandle:close()
595595assert(os.remove(file))
596596assert(os.remove(otherfile))
597597collectgarbage()
598598io.output(file):write("\u{20}\u{31}\u{32}\u{33}\u{2e}\u{34}\u{9}\u{2d}\u{35}\u{36}\u{65}\u{2d}\u{32}\u{20}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{20}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}\u{a}\u{73}\u{65}\u{63}\u{6f}\u{6e}\u{64}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{a}\u{74}\u{68}\u{69}\u{72}\u{64}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{a}\u{a}\u{61}\u{6e}\u{64}\u{20}\u{74}\u{68}\u{65}\u{20}\u{72}\u{65}\u{73}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{74}\u{68}\u{65}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{a}"):close()
599599io.input(file)
600−local _,a,b,c,d,e,h,__ = io.read(1,"\u{6e}","\u{6e}","\u{6c}","\u{6c}","\u{6c}","\u{61}",10)
600+local _,a,b,c,d,e,h,__ = io.read(0x1,"\u{6e}","\u{6e}","\u{6c}","\u{6c}","\u{6c}","\u{61}",0xa)
601601assert(io.close(io.input()))
602−assert(_ == "\u{20}" and not __)
603−assert(type(a) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}" and a == 123.4 and b == - 0.56)
604−assert(d == "\u{73}\u{65}\u{63}\u{6f}\u{6e}\u{64}\u{20}\u{6c}\u{69}\u{6e}\u{65}" and e == "\u{74}\u{68}\u{69}\u{72}\u{64}\u{20}\u{6c}\u{69}\u{6e}\u{65}")
605−assert(h == "\u{a}\u{61}\u{6e}\u{64}\u{20}\u{74}\u{68}\u{65}\u{20}\u{72}\u{65}\u{73}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{74}\u{68}\u{65}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{a}")
602+assert(((_ == "\u{20}") and (not __)))
603+assert((((type(a) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}") and (a == 123.4)) and (b == (- 0.56))))
604+assert(((d == "\u{73}\u{65}\u{63}\u{6f}\u{6e}\u{64}\u{20}\u{6c}\u{69}\u{6e}\u{65}") and (e == "\u{74}\u{68}\u{69}\u{72}\u{64}\u{20}\u{6c}\u{69}\u{6e}\u{65}")))
605+assert((h == "\u{a}\u{61}\u{6e}\u{64}\u{20}\u{74}\u{68}\u{65}\u{20}\u{72}\u{65}\u{73}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{74}\u{68}\u{65}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{a}"))
606606assert(os.remove(file))
607607collectgarbage()
608608do
609609local f = assert(io.open(file,"\u{77}"))
610610local fr = assert(io.open(file,"\u{72}"))
611−assert(f:setvbuf("\u{66}\u{75}\u{6c}\u{6c}",2000))
611+assert(f:setvbuf("\u{66}\u{75}\u{6c}\u{6c}",0x7d0))
612612f:write("\u{78}")
613−assert(fr:read("\u{61}\u{6c}\u{6c}") == "")
613+assert((fr:read("\u{61}\u{6c}\u{6c}") == ""))
614614f:close()
615615fr:seek("\u{73}\u{65}\u{74}")
616−assert(fr:read("\u{61}\u{6c}\u{6c}") == "\u{78}")
616+assert((fr:read("\u{61}\u{6c}\u{6c}") == "\u{78}"))
617617f=assert(io.open(file),"\u{77}")
618618assert(f:setvbuf("\u{6e}\u{6f}"))
619619f:write("\u{78}")
620620fr:seek("\u{73}\u{65}\u{74}")
621−assert(fr:read("\u{61}\u{6c}\u{6c}") == "\u{78}")
621+assert((fr:read("\u{61}\u{6c}\u{6c}") == "\u{78}"))
622622f:close()
623623f=assert(io.open(file,"\u{61}"))
624624assert(f:setvbuf("\u{6c}\u{69}\u{6e}\u{65}"))
625625f:write("\u{78}")
626−fr:seek("\u{73}\u{65}\u{74}",1)
627−assert(fr:read("\u{61}\u{6c}\u{6c}") == "")
628−f:write("\u{61}\u{a}"):seek("\u{73}\u{65}\u{74}",1)
629−assert(fr:read("\u{61}\u{6c}\u{6c}") == "\u{78}\u{61}\u{a}")
626+fr:seek("\u{73}\u{65}\u{74}",0x1)
627+assert((fr:read("\u{61}\u{6c}\u{6c}") == ""))
628+f:write("\u{61}\u{a}"):seek("\u{73}\u{65}\u{74}",0x1)
629+assert((fr:read("\u{61}\u{6c}\u{6c}") == "\u{78}\u{61}\u{a}"))
630630f:close()
631631;
632632fr:close()
633633assert(os.remove(file))
634634end
635−if not _soft then
635+if (not _soft) then
636636print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{6c}\u{61}\u{72}\u{67}\u{65}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{73}\u{20}\u{28}\u{3e}\u{20}\u{42}\u{55}\u{46}\u{53}\u{49}\u{5a}\u{29}")
637637io.output(file)
638−for i = 1, 5001
638+for i = 0x1, 0x1389
639639do
640640io.write("\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}")
641641end
642642io.write("\u{a}\u{31}\u{32}\u{33}\u{34}\u{36}"):close()
643643io.input(file)
644644local x = io.read("\u{61}")
645−io.input():seek("\u{73}\u{65}\u{74}",0)
646−local y = io.read(30001) .. io.read(1005) .. io.read(0) .. io.read(1) .. io.read(100003)
647−assert(x == y and string.len(x) == 5001 * 13 + 6)
648−io.input():seek("\u{73}\u{65}\u{74}",0)
645+io.input():seek("\u{73}\u{65}\u{74}",0x0)
646+local y = (io.read(0x7531) .. (io.read(0x3ed) .. (io.read(0x0) .. (io.read(0x1) .. io.read(0x186a3)))))
647+assert(((x == y) and (string.len(x) == ((0x1389 * 0xd) + 0x6))))
648+io.input():seek("\u{73}\u{65}\u{74}",0x0)
649649y=io.read()
650−assert(x == y .. "\u{a}" .. io.read())
651−assert(not io.read())
650+assert((x == (y .. ("\u{a}" .. io.read()))))
651+assert((not io.read()))
652652io.close(io.input())
653653assert(os.remove(file))
654654x=nil
655655;
656656y=nil
657657end
658−if not _port then
658+if (not _port) then
659659local progname
660660do
661−local arg = arg or ARG
662−local i = 0
661+local arg = (arg or ARG)
662+local i = 0x0
663663while arg[i] do
664−i=i - 1
664+i=(i - 0x1)
665665end
666−progname="\u{22}" .. arg[i + 1] .. "\u{22}"
666+progname=("\u{22}" .. (arg[(i + 0x1)] .. "\u{22}"))
667667end
668668print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{70}\u{6f}\u{70}\u{65}\u{6e}\u{2f}\u{70}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{65}\u{78}\u{65}\u{63}\u{75}\u{74}\u{65}")
669669checkerr("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{6d}\u{6f}\u{64}\u{65}",io.popen,"\u{63}\u{61}\u{74}","")
@@ -671,61 +671,61 @@ checkerr("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{6d}\u{6f}\u{64}\u{6
671671checkerr("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{6d}\u{6f}\u{64}\u{65}",io.popen,"\u{63}\u{61}\u{74}","\u{72}\u{77}")
672672do
673673local file = os.tmpname()
674−local f = assert(io.popen("\u{63}\u{61}\u{74}\u{20}\u{2d}\u{20}\u{3e}\u{20}" .. file,"\u{77}"))
674+local f = assert(io.popen(("\u{63}\u{61}\u{74}\u{20}\u{2d}\u{20}\u{3e}\u{20}" .. file),"\u{77}"))
675675f:write("\u{61}\u{20}\u{6c}\u{69}\u{6e}\u{65}")
676676assert(f:close())
677−local f = assert(io.popen("\u{63}\u{61}\u{74}\u{20}\u{2d}\u{20}\u{3c}\u{20}" .. file,"\u{72}"))
678−assert(f:read("\u{61}") == "\u{61}\u{20}\u{6c}\u{69}\u{6e}\u{65}")
677+local f = assert(io.popen(("\u{63}\u{61}\u{74}\u{20}\u{2d}\u{20}\u{3c}\u{20}" .. file),"\u{72}"))
678+assert((f:read("\u{61}") == "\u{61}\u{20}\u{6c}\u{69}\u{6e}\u{65}"))
679679assert(f:close())
680680assert(os.remove(file))
681681end
682−local tests = {{"\u{6c}\u{73}\u{20}\u{3e}\u{20}\u{2f}\u{64}\u{65}\u{76}\u{2f}\u{6e}\u{75}\u{6c}\u{6c}","\u{6f}\u{6b}"},{"\u{6e}\u{6f}\u{74}\u{2d}\u{74}\u{6f}\u{2d}\u{62}\u{65}\u{2d}\u{66}\u{6f}\u{75}\u{6e}\u{64}\u{2d}\u{63}\u{6f}\u{6d}\u{6d}\u{61}\u{6e}\u{64}","\u{65}\u{78}\u{69}\u{74}"},{"\u{65}\u{78}\u{69}\u{74}\u{20}\u{33}","\u{65}\u{78}\u{69}\u{74}",3},{"\u{65}\u{78}\u{69}\u{74}\u{20}\u{31}\u{32}\u{39}","\u{65}\u{78}\u{69}\u{74}",129},{"\u{6b}\u{69}\u{6c}\u{6c}\u{20}\u{2d}\u{73}\u{20}\u{48}\u{55}\u{50}\u{20}\u{24}\u{24}","\u{73}\u{69}\u{67}\u{6e}\u{61}\u{6c}",1},{"\u{6b}\u{69}\u{6c}\u{6c}\u{20}\u{2d}\u{73}\u{20}\u{4b}\u{49}\u{4c}\u{4c}\u{20}\u{24}\u{24}","\u{73}\u{69}\u{67}\u{6e}\u{61}\u{6c}",9},{"\u{73}\u{68}\u{20}\u{2d}\u{63}\u{20}\u{27}\u{6b}\u{69}\u{6c}\u{6c}\u{20}\u{2d}\u{73}\u{20}\u{48}\u{55}\u{50}\u{20}\u{24}\u{24}\u{27}","\u{65}\u{78}\u{69}\u{74}"},{progname .. "\u{20}\u{2d}\u{65}\u{20}\u{22}\u{20}\u{22}","\u{6f}\u{6b}"},{progname .. "\u{20}\u{2d}\u{65}\u{20}\u{22}\u{6f}\u{73}\u{2e}\u{65}\u{78}\u{69}\u{74}\u{28}\u{30}\u{2c}\u{20}\u{74}\u{72}\u{75}\u{65}\u{29}\u{22}","\u{6f}\u{6b}"},{progname .. "\u{20}\u{2d}\u{65}\u{20}\u{22}\u{6f}\u{73}\u{2e}\u{65}\u{78}\u{69}\u{74}\u{28}\u{32}\u{30}\u{2c}\u{20}\u{74}\u{72}\u{75}\u{65}\u{29}\u{22}","\u{65}\u{78}\u{69}\u{74}",20}}
682+local tests = {{"\u{6c}\u{73}\u{20}\u{3e}\u{20}\u{2f}\u{64}\u{65}\u{76}\u{2f}\u{6e}\u{75}\u{6c}\u{6c}","\u{6f}\u{6b}"},{"\u{6e}\u{6f}\u{74}\u{2d}\u{74}\u{6f}\u{2d}\u{62}\u{65}\u{2d}\u{66}\u{6f}\u{75}\u{6e}\u{64}\u{2d}\u{63}\u{6f}\u{6d}\u{6d}\u{61}\u{6e}\u{64}","\u{65}\u{78}\u{69}\u{74}"},{"\u{65}\u{78}\u{69}\u{74}\u{20}\u{33}","\u{65}\u{78}\u{69}\u{74}",0x3},{"\u{65}\u{78}\u{69}\u{74}\u{20}\u{31}\u{32}\u{39}","\u{65}\u{78}\u{69}\u{74}",0x81},{"\u{6b}\u{69}\u{6c}\u{6c}\u{20}\u{2d}\u{73}\u{20}\u{48}\u{55}\u{50}\u{20}\u{24}\u{24}","\u{73}\u{69}\u{67}\u{6e}\u{61}\u{6c}",0x1},{"\u{6b}\u{69}\u{6c}\u{6c}\u{20}\u{2d}\u{73}\u{20}\u{4b}\u{49}\u{4c}\u{4c}\u{20}\u{24}\u{24}","\u{73}\u{69}\u{67}\u{6e}\u{61}\u{6c}",0x9},{"\u{73}\u{68}\u{20}\u{2d}\u{63}\u{20}\u{27}\u{6b}\u{69}\u{6c}\u{6c}\u{20}\u{2d}\u{73}\u{20}\u{48}\u{55}\u{50}\u{20}\u{24}\u{24}\u{27}","\u{65}\u{78}\u{69}\u{74}"},{(progname .. "\u{20}\u{2d}\u{65}\u{20}\u{22}\u{20}\u{22}"),"\u{6f}\u{6b}"},{(progname .. "\u{20}\u{2d}\u{65}\u{20}\u{22}\u{6f}\u{73}\u{2e}\u{65}\u{78}\u{69}\u{74}\u{28}\u{30}\u{2c}\u{20}\u{74}\u{72}\u{75}\u{65}\u{29}\u{22}"),"\u{6f}\u{6b}"},{(progname .. "\u{20}\u{2d}\u{65}\u{20}\u{22}\u{6f}\u{73}\u{2e}\u{65}\u{78}\u{69}\u{74}\u{28}\u{32}\u{30}\u{2c}\u{20}\u{74}\u{72}\u{75}\u{65}\u{29}\u{22}"),"\u{65}\u{78}\u{69}\u{74}",0x14}}
683683print("\u{a}\u{28}\u{73}\u{6f}\u{6d}\u{65}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{6d}\u{65}\u{73}\u{73}\u{61}\u{67}\u{65}\u{73}\u{20}\u{61}\u{72}\u{65}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{6e}\u{6f}\u{77}\u{29}")
684684for _,v in ipairs(tests)
685685do
686−local x,y,z = io.popen(v[1]):close()
687−local x1,y1,z1 = os.execute(v[1])
688−assert(x == x1 and y == y1 and z == z1)
689−if v[2] == "\u{6f}\u{6b}" then
690−assert(x and y == "\u{65}\u{78}\u{69}\u{74}" and z == 0)
686+local x,y,z = io.popen(v[0x1]):close()
687+local x1,y1,z1 = os.execute(v[0x1])
688+assert((((x == x1) and (y == y1)) and (z == z1)))
689+if (v[0x2] == "\u{6f}\u{6b}") then
690+assert(((x and (y == "\u{65}\u{78}\u{69}\u{74}")) and (z == 0x0)))
691691else
692−assert(not x and y == v[2])
693−assert((v[3] == nil and z > 0) or v[3] == z)
692+assert((not (x and (y == v[0x2]))))
693+assert((((v[0x3] == nil) and (z > 0x0)) or (v[0x3] == z)))
694694end
695695end
696696end
697697f=io.tmpfile()
698−assert(io.type(f) == "\u{66}\u{69}\u{6c}\u{65}")
698+assert((io.type(f) == "\u{66}\u{69}\u{6c}\u{65}"))
699699f:write("\u{61}\u{6c}\u{6f}")
700700f:seek("\u{73}\u{65}\u{74}")
701−assert(f:read("\u{61}") == "\u{61}\u{6c}\u{6f}")
701+assert((f:read("\u{61}") == "\u{61}\u{6c}\u{6f}"))
702702end
703703print("\u{2b}")
704704print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{64}\u{61}\u{74}\u{65}\u{2f}\u{74}\u{69}\u{6d}\u{65}")
705−assert(os.date("") == "")
706−assert(os.date("\u{21}") == "")
707−assert(os.date("\u{0}\u{0}") == "\u{0}\u{0}")
708−assert(os.date("\u{21}\u{0}\u{0}") == "\u{0}\u{0}")
709−local x = string.rep("\u{61}",10000)
710−assert(os.date(x) == x)
705+assert((os.date("") == ""))
706+assert((os.date("\u{21}") == ""))
707+assert((os.date("\u{0}\u{0}") == "\u{0}\u{0}"))
708+assert((os.date("\u{21}\u{0}\u{0}") == "\u{0}\u{0}"))
709+local x = string.rep("\u{61}",0x2710)
710+assert((os.date(x) == x))
711711local t = os.time()
712712D=os.date("\u{2a}\u{74}",t)
713−assert(os.date(string.rep("\u{25}\u{64}",1000),t) == string.rep(os.date("\u{25}\u{64}",t),1000))
714−assert(os.date(string.rep("\u{25}",200)) == string.rep("\u{25}",100))
713+assert((os.date(string.rep("\u{25}\u{64}",0x3e8),t) == string.rep(os.date("\u{25}\u{64}",t),0x3e8)))
714+assert((os.date(string.rep("\u{25}",0xc8)) == string.rep("\u{25}",0x64)))
715715local function checkDateTable
716716(t)
717717_G.D=os.date("\u{2a}\u{74}",t)
718−assert(os.time(D) == t)
718+assert((os.time(D) == t))
719719load(os.date("\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{44}\u{2e}\u{79}\u{65}\u{61}\u{72}\u{3d}\u{3d}\u{25}\u{59}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{44}\u{2e}\u{6d}\u{6f}\u{6e}\u{74}\u{68}\u{3d}\u{3d}\u{25}\u{6d}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{44}\u{2e}\u{64}\u{61}\u{79}\u{3d}\u{3d}\u{25}\u{64}\u{20}\u{61}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{44}\u{2e}\u{68}\u{6f}\u{75}\u{72}\u{3d}\u{3d}\u{25}\u{48}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{44}\u{2e}\u{6d}\u{69}\u{6e}\u{3d}\u{3d}\u{25}\u{4d}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{44}\u{2e}\u{73}\u{65}\u{63}\u{3d}\u{3d}\u{25}\u{53}\u{20}\u{61}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{44}\u{2e}\u{77}\u{64}\u{61}\u{79}\u{3d}\u{3d}\u{25}\u{77}\u{2b}\u{31}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{44}\u{2e}\u{79}\u{64}\u{61}\u{79}\u{3d}\u{3d}\u{25}\u{6a}\u{29}",t))()
720720_G.D=nil
721721end
722722checkDateTable(os.time())
723−if not _port then
724−checkDateTable(0)
725−checkDateTable(1)
726−checkDateTable(1000)
727−checkDateTable(2147483647)
728−checkDateTable(2147483648)
723+if (not _port) then
724+checkDateTable(0x0)
725+checkDateTable(0x1)
726+checkDateTable(0x3e8)
727+checkDateTable(0x7fffffff)
728+checkDateTable(0x80000000)
729729end
730730checkerr("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{6f}\u{6e}\u{76}\u{65}\u{72}\u{73}\u{69}\u{6f}\u{6e}\u{20}\u{73}\u{70}\u{65}\u{63}\u{69}\u{66}\u{69}\u{65}\u{72}",os.date,"\u{25}")
731731checkerr("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{6f}\u{6e}\u{76}\u{65}\u{72}\u{73}\u{69}\u{6f}\u{6e}\u{20}\u{73}\u{70}\u{65}\u{63}\u{69}\u{66}\u{69}\u{65}\u{72}",os.date,"\u{25}\u{39}")
@@ -733,77 +733,77 @@ checkerr("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{6f}\u{6e}\u{7
733733checkerr("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{6f}\u{6e}\u{76}\u{65}\u{72}\u{73}\u{69}\u{6f}\u{6e}\u{20}\u{73}\u{70}\u{65}\u{63}\u{69}\u{66}\u{69}\u{65}\u{72}",os.date,"\u{25}\u{4f}")
734734checkerr("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{6f}\u{6e}\u{76}\u{65}\u{72}\u{73}\u{69}\u{6f}\u{6e}\u{20}\u{73}\u{70}\u{65}\u{63}\u{69}\u{66}\u{69}\u{65}\u{72}",os.date,"\u{25}\u{45}")
735735checkerr("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{6f}\u{6e}\u{76}\u{65}\u{72}\u{73}\u{69}\u{6f}\u{6e}\u{20}\u{73}\u{70}\u{65}\u{63}\u{69}\u{66}\u{69}\u{65}\u{72}",os.date,"\u{25}\u{45}\u{61}")
736−checkerr("\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{6e}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = 1000,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 1,["\u{64}\u{61}\u{79}"] = 1,["\u{68}\u{6f}\u{75}\u{72}"] = "\u{78}"})
737−checkerr("\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{6e}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = 1000,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 1,["\u{64}\u{61}\u{79}"] = 1,["\u{68}\u{6f}\u{75}\u{72}"] = 1.5})
738−checkerr("\u{6d}\u{69}\u{73}\u{73}\u{69}\u{6e}\u{67}",os.time,{["\u{68}\u{6f}\u{75}\u{72}"] = 12})
739−if string.packsize("\u{69}") == 4 then
740−checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{79}\u{65}\u{61}\u{72}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = - (1 << 31) + 1899,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 1,["\u{64}\u{61}\u{79}"] = 1})
741−checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{79}\u{65}\u{61}\u{72}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = - (1 << 31),["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 1,["\u{64}\u{61}\u{79}"] = 1})
742−if math.maxinteger > 2 ^ 31 then
743−checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{79}\u{65}\u{61}\u{72}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = (1 << 31) + 1900,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 1,["\u{64}\u{61}\u{79}"] = 1})
744−end
745−end
746−if not _port then
747−assert(type(os.date("\u{25}\u{45}\u{78}")) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")
748−assert(type(os.date("\u{25}\u{4f}\u{79}")) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")
749−local t0 = os.time({["\u{79}\u{65}\u{61}\u{72}"] = 1970,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 1,["\u{64}\u{61}\u{79}"] = 0})
750−local t1 = os.time({["\u{79}\u{65}\u{61}\u{72}"] = 1970,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 1,["\u{64}\u{61}\u{79}"] = 0,["\u{73}\u{65}\u{63}"] = (1 << 31) - 1})
751−assert(t1 - t0 == (1 << 31) - 1)
752−t0=os.time({["\u{79}\u{65}\u{61}\u{72}"] = 1970,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 1,["\u{64}\u{61}\u{79}"] = 1})
753−t1=os.time({["\u{79}\u{65}\u{61}\u{72}"] = 1970,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 1,["\u{64}\u{61}\u{79}"] = 1,["\u{73}\u{65}\u{63}"] = - (1 << 31)})
754−assert(t1 - t0 == - (1 << 31))
755−if maxint >= 2 ^ 62 then
756−checkerr("\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = - maxint,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 1,["\u{64}\u{61}\u{79}"] = 1})
757−if string.packsize("\u{69}") == 4 then
758−if testerr("\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.date,"\u{25}\u{59}",2 ^ 40) then
736+checkerr("\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{6e}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = 0x3e8,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1,["\u{68}\u{6f}\u{75}\u{72}"] = "\u{78}"})
737+checkerr("\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{6e}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = 0x3e8,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1,["\u{68}\u{6f}\u{75}\u{72}"] = 1.5})
738+checkerr("\u{6d}\u{69}\u{73}\u{73}\u{69}\u{6e}\u{67}",os.time,{["\u{68}\u{6f}\u{75}\u{72}"] = 0xc})
739+if (string.packsize("\u{69}") == 0x4) then
740+checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{79}\u{65}\u{61}\u{72}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = (- ((0x1 << 0x1f) + 0x76b)),["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1})
741+checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{79}\u{65}\u{61}\u{72}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = (- (0x1 << 0x1f)),["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1})
742+if (math.maxinteger > (0x2 ^ 0x1f)) then
743+checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{79}\u{65}\u{61}\u{72}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = ((0x1 << 0x1f) + 0x76c),["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1})
744+end
745+end
746+if (not _port) then
747+assert((type(os.date("\u{25}\u{45}\u{78}")) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"))
748+assert((type(os.date("\u{25}\u{4f}\u{79}")) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"))
749+local t0 = os.time({["\u{79}\u{65}\u{61}\u{72}"] = 0x7b2,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x0})
750+local t1 = os.time({["\u{79}\u{65}\u{61}\u{72}"] = 0x7b2,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x0,["\u{73}\u{65}\u{63}"] = ((0x1 << 0x1f) - 0x1)})
751+assert(((t1 - t0) == ((0x1 << 0x1f) - 0x1)))
752+t0=os.time({["\u{79}\u{65}\u{61}\u{72}"] = 0x7b2,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1})
753+t1=os.time({["\u{79}\u{65}\u{61}\u{72}"] = 0x7b2,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1,["\u{73}\u{65}\u{63}"] = (- (0x1 << 0x1f))})
754+assert(((t1 - t0) == (- (0x1 << 0x1f))))
755+if (maxint >= (0x2 ^ 0x3e)) then
756+checkerr("\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = (- maxint),["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1})
757+if (string.packsize("\u{69}") == 0x4) then
758+if testerr("\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.date,"\u{25}\u{59}",(0x2 ^ 0x28)) then
759759print("\u{20}\u{20}\u{34}\u{2d}\u{62}\u{79}\u{74}\u{65}\u{20}\u{74}\u{69}\u{6d}\u{65}\u{5f}\u{74}")
760−checkerr("\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{72}\u{65}\u{70}\u{72}\u{65}\u{73}\u{65}\u{6e}\u{74}\u{65}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = 4000,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 1,["\u{64}\u{61}\u{79}"] = 1})
760+checkerr("\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{72}\u{65}\u{70}\u{72}\u{65}\u{73}\u{65}\u{6e}\u{74}\u{65}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = 0xfa0,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1})
761761else
762762print("\u{20}\u{20}\u{38}\u{2d}\u{62}\u{79}\u{74}\u{65}\u{20}\u{74}\u{69}\u{6d}\u{65}\u{5f}\u{74}")
763−checkerr("\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{72}\u{65}\u{70}\u{72}\u{65}\u{73}\u{65}\u{6e}\u{74}\u{65}\u{64}",os.date,"\u{25}\u{59}",2 ^ 60)
764−assert(tonumber(os.time({["\u{79}\u{65}\u{61}\u{72}"] = (1 << 31) + 1899,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 12,["\u{64}\u{61}\u{79}"] = 31,["\u{68}\u{6f}\u{75}\u{72}"] = 23,["\u{6d}\u{69}\u{6e}"] = 59,["\u{73}\u{65}\u{63}"] = 59})))
765−checkerr("\u{72}\u{65}\u{70}\u{72}\u{65}\u{73}\u{65}\u{6e}\u{74}\u{65}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = (1 << 31) + 1899,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 12,["\u{64}\u{61}\u{79}"] = 31,["\u{68}\u{6f}\u{75}\u{72}"] = 23,["\u{6d}\u{69}\u{6e}"] = 59,["\u{73}\u{65}\u{63}"] = 60})
763+checkerr("\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{72}\u{65}\u{70}\u{72}\u{65}\u{73}\u{65}\u{6e}\u{74}\u{65}\u{64}",os.date,"\u{25}\u{59}",(0x2 ^ 0x3c))
764+assert(tonumber(os.time({["\u{79}\u{65}\u{61}\u{72}"] = ((0x1 << 0x1f) + 0x76b),["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0xc,["\u{64}\u{61}\u{79}"] = 0x1f,["\u{68}\u{6f}\u{75}\u{72}"] = 0x17,["\u{6d}\u{69}\u{6e}"] = 0x3b,["\u{73}\u{65}\u{63}"] = 0x3b})))
765+checkerr("\u{72}\u{65}\u{70}\u{72}\u{65}\u{73}\u{65}\u{6e}\u{74}\u{65}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = ((0x1 << 0x1f) + 0x76b),["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0xc,["\u{64}\u{61}\u{79}"] = 0x1f,["\u{68}\u{6f}\u{75}\u{72}"] = 0x17,["\u{6d}\u{69}\u{6e}"] = 0x3b,["\u{73}\u{65}\u{63}"] = 0x3c})
766766end
767−checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{64}\u{61}\u{79}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = 0,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 1,["\u{64}\u{61}\u{79}"] = 2 ^ 32})
768−checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{6d}\u{6f}\u{6e}\u{74}\u{68}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = 0,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = - ((1 << 31) + 1),["\u{64}\u{61}\u{79}"] = 1})
769−checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{79}\u{65}\u{61}\u{72}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = (1 << 31) + 1900,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 1,["\u{64}\u{61}\u{79}"] = 1})
767+checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{64}\u{61}\u{79}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = 0x0,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = (0x2 ^ 0x20)})
768+checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{6d}\u{6f}\u{6e}\u{74}\u{68}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = 0x0,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = (- ((0x1 << 0x1f) + 0x1)),["\u{64}\u{61}\u{79}"] = 0x1})
769+checkerr("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{79}\u{65}\u{61}\u{72}\u{27}\u{20}\u{69}\u{73}\u{20}\u{6f}\u{75}\u{74}\u{2d}\u{6f}\u{66}\u{2d}\u{62}\u{6f}\u{75}\u{6e}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = ((0x1 << 0x1f) + 0x76c),["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1})
770770else
771771print("\u{20}\u{20}\u{38}\u{2d}\u{62}\u{79}\u{74}\u{65}\u{20}\u{74}\u{69}\u{6d}\u{65}\u{5f}\u{74}")
772−assert(tonumber(os.date("\u{25}\u{59}",2 ^ 60)))
773−checkerr("\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{72}\u{65}\u{70}\u{72}\u{65}\u{73}\u{65}\u{6e}\u{74}\u{65}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = 2 ^ 60,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 1,["\u{64}\u{61}\u{79}"] = 1})
772+assert(tonumber(os.date("\u{25}\u{59}",(0x2 ^ 0x3c))))
773+checkerr("\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{72}\u{65}\u{70}\u{72}\u{65}\u{73}\u{65}\u{6e}\u{74}\u{65}\u{64}",os.time,{["\u{79}\u{65}\u{61}\u{72}"] = (0x2 ^ 0x3c),["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1})
774774end
775775end
776776end
777777do
778778local D = os.date("\u{2a}\u{74}")
779779local t = os.time(D)
780−if D.isdst == nil then
780+if (D.isdst == nil) then
781781print("\u{6e}\u{6f}\u{20}\u{64}\u{61}\u{79}\u{6c}\u{69}\u{67}\u{68}\u{74}\u{20}\u{73}\u{61}\u{76}\u{69}\u{6e}\u{67}\u{20}\u{69}\u{6e}\u{66}\u{6f}\u{72}\u{6d}\u{61}\u{74}\u{69}\u{6f}\u{6e}")
782782else
783−assert(type(D.isdst) == "\u{62}\u{6f}\u{6f}\u{6c}\u{65}\u{61}\u{6e}")
783+assert((type(D.isdst) == "\u{62}\u{6f}\u{6f}\u{6c}\u{65}\u{61}\u{6e}"))
784784end
785785D.isdst=nil
786786local t1 = os.time(D)
787−assert(t == t1)
787+assert((t == t1))
788788end
789789local D = os.date("\u{2a}\u{74}")
790790t=os.time(D)
791−D.year=D.year - 1
791+D.year=(D.year - 0x1)
792792;
793793local t1 = os.time(D)
794−assert(math.abs(os.difftime(t,t1) / (24 * 3600) - 365) < 2)
794+assert((math.abs(((os.difftime(t,t1) / (0x18 * 0xe10)) - 0x16d)) < 0x2))
795795t=os.time()
796796t1=os.time(os.date("\u{2a}\u{74}"))
797797local diff = os.difftime(t1,t)
798−assert(0 <= diff and diff <= 1)
798+assert(((0x0 <= diff) and (diff <= 0x1)))
799799diff=os.difftime(t,t1)
800−assert(- 1 <= diff and diff <= 0)
801−local t1 = os.time({["\u{79}\u{65}\u{61}\u{72}"] = 2000,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 10,["\u{64}\u{61}\u{79}"] = 1,["\u{68}\u{6f}\u{75}\u{72}"] = 23,["\u{6d}\u{69}\u{6e}"] = 12})
802−local t2 = os.time({["\u{79}\u{65}\u{61}\u{72}"] = 2000,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 10,["\u{64}\u{61}\u{79}"] = 1,["\u{68}\u{6f}\u{75}\u{72}"] = 23,["\u{6d}\u{69}\u{6e}"] = 10,["\u{73}\u{65}\u{63}"] = 19})
803−assert(os.difftime(t1,t2) == 60 * 2 - 19)
804−t1={["\u{79}\u{65}\u{61}\u{72}"] = 2005,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 1,["\u{64}\u{61}\u{79}"] = 1,["\u{68}\u{6f}\u{75}\u{72}"] = 1,["\u{6d}\u{69}\u{6e}"] = 0,["\u{73}\u{65}\u{63}"] = - 3602}
800+assert((- ((0x1 <= diff) and (diff <= 0x0))))
801+local t1 = os.time({["\u{79}\u{65}\u{61}\u{72}"] = 0x7d0,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0xa,["\u{64}\u{61}\u{79}"] = 0x1,["\u{68}\u{6f}\u{75}\u{72}"] = 0x17,["\u{6d}\u{69}\u{6e}"] = 0xc})
802+local t2 = os.time({["\u{79}\u{65}\u{61}\u{72}"] = 0x7d0,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0xa,["\u{64}\u{61}\u{79}"] = 0x1,["\u{68}\u{6f}\u{75}\u{72}"] = 0x17,["\u{6d}\u{69}\u{6e}"] = 0xa,["\u{73}\u{65}\u{63}"] = 0x13})
803+assert((os.difftime(t1,t2) == ((0x3c * 0x2) - 0x13)))
804+t1={["\u{79}\u{65}\u{61}\u{72}"] = 0x7d5,["\u{6d}\u{6f}\u{6e}\u{74}\u{68}"] = 0x1,["\u{64}\u{61}\u{79}"] = 0x1,["\u{68}\u{6f}\u{75}\u{72}"] = 0x1,["\u{6d}\u{69}\u{6e}"] = 0x0,["\u{73}\u{65}\u{63}"] = (- 0xe12)}
805805os.time(t1)
806−assert(t1.day == 31 and t1.month == 12 and t1.year == 2004 and t1.hour == 23 and t1.min == 59 and t1.sec == 58 and t1.yday == 366)
806+assert((((((((t1.day == 0x1f) and (t1.month == 0xc)) and (t1.year == 0x7d4)) and (t1.hour == 0x17)) and (t1.min == 0x3b)) and (t1.sec == 0x3a)) and (t1.yday == 0x16e)))
807807io.output(io.stdout)
808808local t = os.date("\u{25}\u{64}\u{20}\u{25}\u{6d}\u{20}\u{25}\u{59}\u{20}\u{25}\u{48}\u{20}\u{25}\u{4d}\u{20}\u{25}\u{53}")
809809local d,m,a,h,min,s = string.match(t,"\u{28}\u{25}\u{64}\u{2b}\u{29}\u{20}\u{28}\u{25}\u{64}\u{2b}\u{29}\u{20}\u{28}\u{25}\u{64}\u{2b}\u{29}\u{20}\u{28}\u{25}\u{64}\u{2b}\u{29}\u{20}\u{28}\u{25}\u{64}\u{2b}\u{29}\u{20}\u{28}\u{25}\u{64}\u{2b}\u{29}")
desk/res/lua/cycled/foo.luanew file+82
@@ -0,0 +1,82 @@
1+foosjis=nil
2+az=bar[nil]
3+baz=bar(0x1).foo
4+i=0x3
5+i,a[i]=(i + 0x1),(0x14 >> 0x9)
6+hello="\u{68}\u{65}\u{6c}\u{6c}\u{6f}\u{64}\u{6b}\u{6e}\u{64}\u{6a}\u{d0}\u{b2}\u{d0}\u{b3}\u{d0}\u{be}\u{d0}\u{b2}\u{d1}\u{88}\u{d0}\u{be}\u{d0}\u{b2}"
7+x={[hello] = 0x8,["\u{68}\u{65}\u{6c}\u{6c}\u{6f}"] = 0xc}
8+;
9+test_cases={{0x7fffffff,"\u{32}\u{31}\u{34}\u{37}\u{34}\u{38}\u{33}\u{36}\u{34}\u{37}"},{0x7fffffff,"\u{32}\u{31}\u{34}\u{37}\u{34}\u{38}\u{33}\u{36}\u{34}\u{37}"},{0xffffffff,"\u{34}\u{32}\u{39}\u{34}\u{39}\u{36}\u{37}\u{32}\u{39}\u{35}"},{0xffffffff,"\u{34}\u{32}\u{39}\u{34}\u{39}\u{36}\u{37}\u{32}\u{39}\u{35}"},{0x7fffffffffffffff,"\u{39}\u{2e}\u{32}\u{32}\u{33}\u{33}\u{37}\u{32}\u{30}\u{33}\u{36}\u{38}\u{35}\u{34}\u{38}\u{65}\u{2b}\u{31}\u{38}"},{0x7fffffffffffffff,"\u{39}\u{2e}\u{32}\u{32}\u{33}\u{33}\u{37}\u{32}\u{30}\u{33}\u{36}\u{38}\u{35}\u{34}\u{38}\u{65}\u{2b}\u{31}\u{38}"},{0x100000000,"\u{34}\u{32}\u{39}\u{34}\u{39}\u{36}\u{37}\u{32}\u{39}\u{36}"},{0x100000000,"\u{34}\u{32}\u{39}\u{34}\u{39}\u{36}\u{37}\u{32}\u{39}\u{36}"},{0x100000000000,"\u{31}\u{37}\u{35}\u{39}\u{32}\u{31}\u{38}\u{36}\u{30}\u{34}\u{34}\u{34}\u{31}\u{36}"},{0x100000000000,"\u{31}\u{37}\u{35}\u{39}\u{32}\u{31}\u{38}\u{36}\u{30}\u{34}\u{34}\u{34}\u{31}\u{36}"},{0x80000000,"\u{32}\u{31}\u{34}\u{37}\u{34}\u{38}\u{33}\u{36}\u{34}\u{38}"},{0x80000000,"\u{32}\u{31}\u{34}\u{37}\u{34}\u{38}\u{33}\u{36}\u{34}\u{38}"},{0x800000000000,"\u{31}\u{2e}\u{34}\u{30}\u{37}\u{33}\u{37}\u{34}\u{38}\u{38}\u{33}\u{35}\u{35}\u{33}\u{33}\u{65}\u{2b}\u{31}\u{34}"},{0x800000000000,"\u{31}\u{2e}\u{34}\u{30}\u{37}\u{33}\u{37}\u{34}\u{38}\u{38}\u{33}\u{35}\u{35}\u{33}\u{33}\u{65}\u{2b}\u{31}\u{34}"}}
10+::helli::
11+foo={3.0,3.1416,3.1416,3.1416,340.0,0.1171875,162.1875,162.1875,3.141592653589793,1984.0}
12+do
13+foo=0x1
14+return 0x8,foo
15+end
16+print("\u{74}\u{68}\u{65}\u{20}\u{77}\u{61}\u{79}\u{20}\u{6f}\u{66}\u{20}\u{74}\u{68}\u{65}\u{20}\u{66}\u{75}\u{74}\u{75}\u{72}\u{65}")
17+print("\u{68}\u{65}\u{6c}\u{6c}\u{6f}")
18+h({["\u{6b}\u{65}\u{79}\u{31}"] = "\u{53}\u{6f}\u{6e}\u{6d}\u{69}\u{7e}\u{34}\u{35}\u{31}"})
19+goto helli
20+break
21+while true do
22+break
23+end
24+repeat
25+do
26+foo=0x9
27+;
28+end
29+until true
30+if (l == 0x3) then
31+a=(a + 0x1)
32+;
33+assert((getlocal(0x2,0x1) == "\u{28}\u{74}\u{65}\u{6d}\u{70}\u{6f}\u{72}\u{61}\u{72}\u{79}\u{29}"))
34+elseif (l == 0x4) then
35+a=(a + 0x1)
36+;
37+assert((getlocal(0x2,0x1) == "\u{41}"))
38+else
39+;
40+end
41+for i = 0x1, 0x64
42+do
43+karlSum=(karlSum + i)
44+end
45+for j = 0x64, 0x1, 0x1
46+do
47+fredSum=(fredSum + j)
48+end
49+for key,val in pairs(u)
50+do
51+print(key,val)
52+end
53+function Dog:new()
54+newObj={["\u{73}\u{6f}\u{75}\u{6e}\u{64}"] = "\u{77}\u{6f}\u{6f}\u{66}"}
55+self.__index=self
56+return setmetatable(newObj,self)
57+end
58+function Dog:makeSound()
59+print(("\u{49}\u{20}\u{73}\u{61}\u{79}\u{20}" .. self.sound))
60+end
61+local function g
62+(x)
63+return math.sin(x)
64+end
65+local a = require("\u{6d}\u{6f}\u{64}\u{32}")
66+local b = require("\u{6d}\u{6f}\u{64}\u{32}")
67+function adder(x)
68+return function (y)
69+return (x + y)
70+end
71+end
72+x=(- (0x1 + 0x8))
73+if (_VERSION ~= version) then
74+io.stderr:write("\u{54}\u{68}\u{69}\u{73}\u{20}\u{74}\u{65}\u{73}\u{74}\u{20}\u{73}\u{75}\u{69}\u{74}\u{65}\u{20}\u{69}\u{73}\u{20}\u{66}\u{6f}\u{72}\u{20}",version,"\u{2c}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{66}\u{6f}\u{72}\u{20}",_VERSION,"\u{a}\u{45}\u{78}\u{69}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}")
75+return
76+end
77+math.randomseed()
78+local random_x,random_y = math.randomseed()
79+do
80+local random_x,random_y = math.randomseed()
81+print(string.format("\u{72}\u{61}\u{6e}\u{64}\u{6f}\u{6d}\u{20}\u{73}\u{65}\u{65}\u{64}\u{73}\u{3a}\u{20}\u{25}\u{64}\u{2c}\u{20}\u{25}\u{64}",random_x,random_y))
82+end
zod/luau/res/lua/cycled/gc.lua → desk/res/lua/cycled/gc.luarenamed+198−198
@@ -3,39 +3,39 @@ local debug = require("\u{64}\u{65}\u{62}\u{75}\u{67}")
33assert(collectgarbage("\u{69}\u{73}\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}"))
44collectgarbage()
55local oldmode = collectgarbage("\u{69}\u{6e}\u{63}\u{72}\u{65}\u{6d}\u{65}\u{6e}\u{74}\u{61}\u{6c}")
6−assert(collectgarbage("\u{67}\u{65}\u{6e}\u{65}\u{72}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{61}\u{6c}") == "\u{69}\u{6e}\u{63}\u{72}\u{65}\u{6d}\u{65}\u{6e}\u{74}\u{61}\u{6c}")
7−assert(collectgarbage("\u{67}\u{65}\u{6e}\u{65}\u{72}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{61}\u{6c}") == "\u{67}\u{65}\u{6e}\u{65}\u{72}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{61}\u{6c}")
8−assert(collectgarbage("\u{69}\u{6e}\u{63}\u{72}\u{65}\u{6d}\u{65}\u{6e}\u{74}\u{61}\u{6c}") == "\u{67}\u{65}\u{6e}\u{65}\u{72}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{61}\u{6c}")
9−assert(collectgarbage("\u{69}\u{6e}\u{63}\u{72}\u{65}\u{6d}\u{65}\u{6e}\u{74}\u{61}\u{6c}") == "\u{69}\u{6e}\u{63}\u{72}\u{65}\u{6d}\u{65}\u{6e}\u{74}\u{61}\u{6c}")
6+assert((collectgarbage("\u{67}\u{65}\u{6e}\u{65}\u{72}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{61}\u{6c}") == "\u{69}\u{6e}\u{63}\u{72}\u{65}\u{6d}\u{65}\u{6e}\u{74}\u{61}\u{6c}"))
7+assert((collectgarbage("\u{67}\u{65}\u{6e}\u{65}\u{72}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{61}\u{6c}") == "\u{67}\u{65}\u{6e}\u{65}\u{72}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{61}\u{6c}"))
8+assert((collectgarbage("\u{69}\u{6e}\u{63}\u{72}\u{65}\u{6d}\u{65}\u{6e}\u{74}\u{61}\u{6c}") == "\u{67}\u{65}\u{6e}\u{65}\u{72}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{61}\u{6c}"))
9+assert((collectgarbage("\u{69}\u{6e}\u{63}\u{72}\u{65}\u{6d}\u{65}\u{6e}\u{74}\u{61}\u{6c}") == "\u{69}\u{6e}\u{63}\u{72}\u{65}\u{6d}\u{65}\u{6e}\u{74}\u{61}\u{6c}"))
1010local function nop
1111()
1212
1313end
1414local function gcinfo
1515()
16−return collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") * 1024
16+return (collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") * 0x400)
1717end
1818do
19−local a = collectgarbage("\u{73}\u{65}\u{74}\u{70}\u{61}\u{75}\u{73}\u{65}",200)
20−local b = collectgarbage("\u{73}\u{65}\u{74}\u{73}\u{74}\u{65}\u{70}\u{6d}\u{75}\u{6c}",200)
21−local t = {0,2,10,90,500,5000,30000,2147483646}
22−for i = 1, # t
19+local a = collectgarbage("\u{73}\u{65}\u{74}\u{70}\u{61}\u{75}\u{73}\u{65}",0xc8)
20+local b = collectgarbage("\u{73}\u{65}\u{74}\u{73}\u{74}\u{65}\u{70}\u{6d}\u{75}\u{6c}",0xc8)
21+local t = {0x0,0x2,0xa,0x5a,0x1f4,0x1388,0x7530,0x7ffffffe}
22+for i = 0x1, (# t)
2323do
2424local p = t[i]
25−for j = 1, # t
25+for j = 0x1, (# t)
2626do
2727local m = t[j]
2828collectgarbage("\u{73}\u{65}\u{74}\u{70}\u{61}\u{75}\u{73}\u{65}",p)
2929collectgarbage("\u{73}\u{65}\u{74}\u{73}\u{74}\u{65}\u{70}\u{6d}\u{75}\u{6c}",m)
30−collectgarbage("\u{73}\u{74}\u{65}\u{70}",0)
31−collectgarbage("\u{73}\u{74}\u{65}\u{70}",10000)
30+collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
31+collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x2710)
3232end
3333end
3434collectgarbage("\u{73}\u{65}\u{74}\u{70}\u{61}\u{75}\u{73}\u{65}",a)
3535collectgarbage("\u{73}\u{65}\u{74}\u{73}\u{74}\u{65}\u{70}\u{6d}\u{75}\u{6c}",b)
3636collectgarbage()
3737end
38−_G["\u{77}\u{68}\u{69}\u{6c}\u{65}"]=234
38+_G["\u{77}\u{68}\u{69}\u{6c}\u{65}"]=0xea
3939local function GC1
4040()
4141local u
@@ -44,23 +44,23 @@ local finish = false
4444u=setmetatable({},{["\u{5f}\u{5f}\u{67}\u{63}"] = function ()
4545finish=true
4646end})
47−b={34}
47+b={0x22}
4848repeat
4949u={}
5050until finish
51−assert(b[1] == 34)
51+assert((b[0x1] == 0x22))
5252finish=false
5353;
54−local i = 1
54+local i = 0x1
5555u=setmetatable({},{["\u{5f}\u{5f}\u{67}\u{63}"] = function ()
5656finish=true
5757end})
5858repeat
59−i=i + 1
59+i=(i + 0x1)
6060;
61−u=tostring(i) .. tostring(i)
61+u=(tostring(i) .. tostring(i))
6262until finish
63−assert(b[1] == 34)
63+assert((b[0x1] == 0x22))
6464finish=false
6565u=setmetatable({},{["\u{5f}\u{5f}\u{67}\u{63}"] = function ()
6666finish=true
@@ -72,7 +72,7 @@ u=function ()
7272return i
7373end
7474until finish
75−assert(b[1] == 34)
75+assert((b[0x1] == 0x22))
7676end
7777local function GC2
7878()
@@ -81,23 +81,23 @@ local finish = false
8181u={setmetatable({},{["\u{5f}\u{5f}\u{67}\u{63}"] = function ()
8282finish=true
8383end})}
84−local b = {34}
84+local b = {0x22}
8585repeat
8686u={{}}
8787until finish
88−assert(b[1] == 34)
88+assert((b[0x1] == 0x22))
8989finish=false
9090;
91−local i = 1
91+local i = 0x1
9292u={setmetatable({},{["\u{5f}\u{5f}\u{67}\u{63}"] = function ()
9393finish=true
9494end})}
9595repeat
96−i=i + 1
96+i=(i + 0x1)
9797;
98−u={tostring(i) .. tostring(i)}
98+u={(tostring(i) .. tostring(i))}
9999until finish
100−assert(b[1] == 34)
100+assert((b[0x1] == 0x22))
101101finish=false
102102u={setmetatable({},{["\u{5f}\u{5f}\u{67}\u{63}"] = function ()
103103finish=true
@@ -109,7 +109,7 @@ u={function ()
109109return i
110110end}
111111until finish
112−assert(b[1] == 34)
112+assert((b[0x1] == 0x22))
113113end
114114local function GC
115115()
@@ -119,27 +119,27 @@ GC2()
119119end
120120do
121121print("\u{63}\u{72}\u{65}\u{61}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{6f}\u{62}\u{6a}\u{65}\u{63}\u{74}\u{73}")
122−local limit = 5000
123−for i = 1, limit
122+local limit = 0x1388
123+for i = 0x1, limit
124124do
125125local a = {}
126126;
127127a=nil
128128end
129129local a = "\u{61}"
130−for i = 1, limit
130+for i = 0x1, limit
131131do
132−a=i .. "\u{62}"
132+a=(i .. "\u{62}")
133133;
134134a=string.gsub(a,"\u{28}\u{25}\u{64}\u{25}\u{64}\u{2a}\u{29}","\u{25}\u{31}\u{20}\u{25}\u{31}")
135135a="\u{61}"
136136end
137137a={}
138138function a:test()
139−for i = 1, limit
139+for i = 0x1, limit
140140do
141141load(string.format("\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{74}\u{65}\u{6d}\u{70}\u{28}\u{61}\u{29}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{27}\u{61}\u{25}\u{64}\u{27}\u{20}\u{65}\u{6e}\u{64}",i),"")()
142−assert(temp() == string.format("\u{61}\u{25}\u{64}",i))
142+assert((temp() == string.format("\u{61}\u{25}\u{64}",i)))
143143end
144144end
145145a:test()
@@ -153,11 +153,11 @@ end
153153print("\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{73}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{73}")
154154local prog = "\u{64}\u{6f}\u{a}\u{20}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{31}\u{30}\u{3b}\u{a}\u{20}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{6f}\u{6f}\u{28}\u{78}\u{2c}\u{79}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{73}\u{69}\u{6e}\u{28}\u{61}\u{2b}\u{30}\u{2e}\u{34}\u{35}\u{36}\u{2d}\u{30}\u{2e}\u{32}\u{33}\u{65}\u{2d}\u{31}\u{32}\u{29}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{7a}\u{29}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{73}\u{69}\u{6e}\u{28}\u{25}\u{78}\u{2b}\u{7a}\u{29}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{78}\u{20}\u{3d}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{77}\u{29}\u{20}\u{61}\u{3d}\u{61}\u{2b}\u{77}\u{3b}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{65}\u{6e}\u{64}\u{a}"
155155do
156−local step = 1
156+local step = 0x1
157157if _soft then
158−step=13
158+step=0xd
159159end
160−for i = 1, string.len(prog), step
160+for i = 0x1, string.len(prog), step
161161do
162162for j = i, string.len(prog), step
163163do
@@ -171,20 +171,20 @@ do
171171foo=nil
172172print("\u{6c}\u{6f}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{73}")
173173local x = "\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}"
174−assert(string.len(x) == 80)
174+assert((string.len(x) == 0x50))
175175local s = ""
176−local k = math.min(300,(math.maxinteger // 80) // 2)
177−for n = 1, k
176+local k = math.min(0x12c,((math.maxinteger // 0x50) // 0x2))
177+for n = 0x1, k
178178do
179−s=s .. x
179+s=(s .. x)
180180;
181181local j = tostring(n)
182182end
183−assert(string.len(s) == k * 80)
184−s=string.sub(s,1,10000)
183+assert((string.len(s) == (k * 0x50)))
184+s=string.sub(s,0x1,0x2710)
185185local s,i = string.gsub(s,"\u{28}\u{25}\u{64}\u{25}\u{64}\u{25}\u{64}\u{25}\u{64}\u{29}","")
186−assert(i == 10000 // 4)
187−assert(_G["\u{77}\u{68}\u{69}\u{6c}\u{65}"] == 234)
186+assert((i == (0x2710 // 0x4)))
187+assert((_G["\u{77}\u{68}\u{69}\u{6c}\u{65}"] == 0xea))
188188_G["\u{77}\u{68}\u{69}\u{6c}\u{65}"]=nil
189189end
190190do
@@ -194,32 +194,32 @@ local function dosteps
194194(siz)
195195collectgarbage()
196196local a = {}
197−for i = 1, 100
197+for i = 0x1, 0x64
198198do
199199a[i]={{}}
200200;
201201local b = {}
202202end
203203local x = gcinfo()
204−local i = 0
204+local i = 0x0
205205repeat
206−i=i + 1
206+i=(i + 0x1)
207207until collectgarbage("\u{73}\u{74}\u{65}\u{70}",siz)
208−assert(gcinfo() < x)
208+assert((gcinfo() < x))
209209return i
210210end
211211collectgarbage("\u{73}\u{74}\u{6f}\u{70}")
212−if not _port then
213−assert(dosteps(10) < dosteps(2))
212+if (not _port) then
213+assert((dosteps(0xa) < dosteps(0x2)))
214214end
215−assert(dosteps(20000) == 1)
216−assert(collectgarbage("\u{73}\u{74}\u{65}\u{70}",20000) == true)
217−assert(collectgarbage("\u{73}\u{74}\u{65}\u{70}",20000) == true)
218−assert(not collectgarbage("\u{69}\u{73}\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}"))
215+assert((dosteps(0x4e20) == 0x1))
216+assert((collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x4e20) == true))
217+assert((collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x4e20) == true))
218+assert((not collectgarbage("\u{69}\u{73}\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}")))
219219collectgarbage("\u{72}\u{65}\u{73}\u{74}\u{61}\u{72}\u{74}")
220220assert(collectgarbage("\u{69}\u{73}\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}"))
221221end
222−if not _port then
222+if (not _port) then
223223collectgarbage()
224224;
225225collectgarbage()
@@ -227,17 +227,17 @@ local x = gcinfo()
227227collectgarbage("\u{73}\u{74}\u{6f}\u{70}")
228228repeat
229229local a = {}
230−until gcinfo() > 3 * x
230+until (gcinfo() > (0x3 * x))
231231collectgarbage("\u{72}\u{65}\u{73}\u{74}\u{61}\u{72}\u{74}")
232232assert(collectgarbage("\u{69}\u{73}\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}"))
233233repeat
234234local a = {}
235−until gcinfo() <= x * 2
235+until (gcinfo() <= (x * 0x2))
236236end
237237print("\u{63}\u{6c}\u{65}\u{61}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{73}")
238−local lim = 15
238+local lim = 0xf
239239local a = {}
240−for i = 1, lim
240+for i = 0x1, lim
241241do
242242a[{}]=i
243243end
@@ -249,7 +249,7 @@ end
249249for n in pairs(b)
250250do
251251a[n]=undef
252−assert(type(n) == "\u{74}\u{61}\u{62}\u{6c}\u{65}" and next(n) == nil)
252+assert(((type(n) == "\u{74}\u{61}\u{62}\u{6c}\u{65}") and (next(n) == nil)))
253253collectgarbage()
254254end
255255b=nil
@@ -258,131 +258,131 @@ for n in pairs(a)
258258do
259259error("\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{68}\u{65}\u{72}\u{65}")
260260end
261−for i = 1, lim
261+for i = 0x1, lim
262262do
263263a[i]=i
264264end
265−for i = 1, lim
265+for i = 0x1, lim
266266do
267−assert(a[i] == i)
267+assert((a[i] == i))
268268end
269269print("\u{77}\u{65}\u{61}\u{6b}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{73}")
270270a={}
271271;
272272setmetatable(a,{["\u{5f}\u{5f}\u{6d}\u{6f}\u{64}\u{65}"] = "\u{6b}"})
273273;
274−for i = 1, lim
274+for i = 0x1, lim
275275do
276276a[{}]=i
277277end
278−for i = 1, lim
278+for i = 0x1, lim
279279do
280280a[i]=i
281281end
282−for i = 1, lim
282+for i = 0x1, lim
283283do
284284local s = string.rep("\u{40}",i)
285285;
286−a[s]=s .. "\u{23}"
286+a[s]=(s .. "\u{23}")
287287end
288288collectgarbage()
289−local i = 0
289+local i = 0x0
290290for k,v in pairs(a)
291291do
292−assert(k == v or k .. "\u{23}" == v)
292+assert(((k == v) or ((k .. "\u{23}") == v)))
293293;
294−i=i + 1
294+i=(i + 0x1)
295295end
296−assert(i == 2 * lim)
296+assert((i == (0x2 * lim)))
297297a={}
298298;
299299setmetatable(a,{["\u{5f}\u{5f}\u{6d}\u{6f}\u{64}\u{65}"] = "\u{76}"})
300300;
301−a[1]=string.rep("\u{62}",21)
301+a[0x1]=string.rep("\u{62}",0x15)
302302collectgarbage()
303−assert(a[1])
304−a[1]=undef
305−for i = 1, lim
303+assert(a[0x1])
304+a[0x1]=undef
305+for i = 0x1, lim
306306do
307307a[i]={}
308308end
309−for i = 1, lim
309+for i = 0x1, lim
310310do
311−a[i .. "\u{78}"]={}
311+a[(i .. "\u{78}")]={}
312312end
313−for i = 1, lim
313+for i = 0x1, lim
314314do
315315local t = {}
316316;
317317a[t]=t
318318end
319−for i = 1, lim
319+for i = 0x1, lim
320320do
321−a[i + lim]=i .. "\u{78}"
321+a[(i + lim)]=(i .. "\u{78}")
322322end
323323collectgarbage()
324−local i = 0
324+local i = 0x0
325325for k,v in pairs(a)
326326do
327−assert(k == v or k - lim .. "\u{78}" == v)
327+assert(((k == v) or (((k - lim) .. "\u{78}") == v)))
328328;
329−i=i + 1
329+i=(i + 0x1)
330330end
331−assert(i == 2 * lim)
331+assert((i == (0x2 * lim)))
332332a={}
333333;
334334setmetatable(a,{["\u{5f}\u{5f}\u{6d}\u{6f}\u{64}\u{65}"] = "\u{6b}\u{76}"})
335335;
336336local x,y,z = {},{},{}
337−a[1],a[2],a[3]=x,y,z
338−a[string.rep("\u{24}",11)]=string.rep("\u{24}",11)
339−for i = 4, lim
337+a[0x1],a[0x2],a[0x3]=x,y,z
338+a[string.rep("\u{24}",0xb)]=string.rep("\u{24}",0xb)
339+for i = 0x4, lim
340340do
341341a[i]={}
342342end
343−for i = 1, lim
343+for i = 0x1, lim
344344do
345345a[{}]=i
346346end
347−for i = 1, lim
347+for i = 0x1, lim
348348do
349349local t = {}
350350;
351351a[t]=t
352352end
353353collectgarbage()
354−assert(next(a) ~= nil)
355−local i = 0
354+assert((next(a) ~= nil))
355+local i = 0x0
356356for k,v in pairs(a)
357357do
358−assert((k == 1 and v == x) or (k == 2 and v == y) or (k == 3 and v == z) or k == v)
358+assert((((((k == 0x1) and (v == x)) or ((k == 0x2) and (v == y))) or ((k == 0x3) and (v == z))) or (k == v)))
359359;
360−i=i + 1
360+i=(i + 0x1)
361361end
362−assert(i == 4)
362+assert((i == 0x4))
363363x,y,z=nil
364364collectgarbage()
365−assert(next(a) == string.rep("\u{24}",11))
365+assert((next(a) == string.rep("\u{24}",0xb)))
366366a={}
367−local t = {["\u{78}"] = 10}
367+local t = {["\u{78}"] = 0xa}
368368local C = setmetatable({["\u{6b}\u{65}\u{79}"] = t},{["\u{5f}\u{5f}\u{6d}\u{6f}\u{64}\u{65}"] = "\u{76}"})
369−local C1 = setmetatable({[t] = 1},{["\u{5f}\u{5f}\u{6d}\u{6f}\u{64}\u{65}"] = "\u{6b}"})
369+local C1 = setmetatable({[t] = 0x1},{["\u{5f}\u{5f}\u{6d}\u{6f}\u{64}\u{65}"] = "\u{6b}"})
370370a.x=t
371371setmetatable(a,{["\u{5f}\u{5f}\u{67}\u{63}"] = function (u)
372−assert(C.key == nil)
373−assert(type(next(C1)) == "\u{74}\u{61}\u{62}\u{6c}\u{65}")
372+assert((C.key == nil))
373+assert((type(next(C1)) == "\u{74}\u{61}\u{62}\u{6c}\u{65}"))
374374end})
375375a,t=nil
376376collectgarbage()
377377collectgarbage()
378−assert(next(C) == nil and next(C1) == nil)
378+assert(((next(C) == nil) and (next(C1) == nil)))
379379C,C1=nil
380380local mt = {["\u{5f}\u{5f}\u{6d}\u{6f}\u{64}\u{65}"] = "\u{6b}"}
381−a={{10},{20},{30},{40}}
381+a={{0xa},{0x14},{0x1e},{0x28}}
382382;
383383setmetatable(a,mt)
384384x=nil
385−for i = 1, 100
385+for i = 0x1, 0x64
386386do
387387local n = {}
388388;
@@ -392,37 +392,37 @@ x=n
392392end
393393GC()
394394local n = x
395−local i = 0
395+local i = 0x0
396396while n do
397−n=a[n].k[1]
397+n=a[n].k[0x1]
398398;
399−i=i + 1
399+i=(i + 0x1)
400400end
401−assert(i == 100)
401+assert((i == 0x64))
402402x=nil
403403GC()
404−for i = 1, 4
404+for i = 0x1, 0x4
405405do
406−assert(a[i][1] == i * 10)
406+assert((a[i][0x1] == (i * 0xa)))
407407;
408408a[i]=undef
409409end
410−assert(next(a) == nil)
410+assert((next(a) == nil))
411411local K = {}
412412a[K]={}
413−for i = 1, 10
413+for i = 0x1, 0xa
414414do
415415a[K][i]={}
416416;
417417a[a[K][i]]=setmetatable({},mt)
418418end
419419x=nil
420−local k = 1
421−for j = 1, 100
420+local k = 0x1
421+for j = 0x1, 0x64
422422do
423423local n = {}
424424;
425−local nk = k % 10 + 1
425+local nk = ((k % 0xa) + 0x1)
426426a[a[K][nk]][n]={x,["\u{6b}"] = k}
427427;
428428x=n
@@ -431,17 +431,17 @@ k=nk
431431end
432432GC()
433433local n = x
434−local i = 0
434+local i = 0x0
435435while n do
436436local t = a[a[K][k]][n]
437437;
438−n=t[1]
438+n=t[0x1]
439439;
440440k=t.k
441441;
442−i=i + 1
442+i=(i + 0x1)
443443end
444−assert(i == 100)
444+assert((i == 0x64))
445445K=nil
446446GC()
447447if T then
@@ -453,12 +453,12 @@ setmetatable(s,{["\u{5f}\u{5f}\u{6d}\u{6f}\u{64}\u{65}"] = "\u{6b}"})
453453setmetatable(u,{["\u{5f}\u{5f}\u{67}\u{63}"] = function (o)
454454local i = s[o]
455455s[i]=true
456−assert(not s[i - 1])
457−if i == 8 then
456+assert((not s[(i - 0x1)]))
457+if (i == 0x8) then
458458error("\u{40}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{40}")
459459end
460460end})
461−for i = 6, 10
461+for i = 0x6, 0xa
462462do
463463local n = setmetatable({},getmetatable(u))
464464s[n]=i
@@ -468,20 +468,20 @@ warn("\u{40}\u{6f}\u{6e}")
468468warn("\u{40}\u{73}\u{74}\u{6f}\u{72}\u{65}")
469469collectgarbage()
470470assert(string.find(_WARN,"\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{69}\u{6e}\u{20}\u{5f}\u{5f}\u{67}\u{63}"))
471−assert(string.match(_WARN,"\u{40}\u{28}\u{2e}\u{2d}\u{29}\u{40}") == "\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}")
471+assert((string.match(_WARN,"\u{40}\u{28}\u{2e}\u{2d}\u{29}\u{40}") == "\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}"))
472472;
473473_WARN=false
474−for i = 8, 10
474+for i = 0x8, 0xa
475475do
476476assert(s[i])
477477end
478−for i = 1, 5
478+for i = 0x1, 0x5
479479do
480480local n = setmetatable({},getmetatable(u))
481481s[n]=i
482482end
483483collectgarbage()
484−for i = 1, 10
484+for i = 0x1, 0xa
485485do
486486assert(s[i])
487487end
@@ -489,27 +489,27 @@ getmetatable(u).__gc=nil
489489warn("\u{40}\u{6e}\u{6f}\u{72}\u{6d}\u{61}\u{6c}")
490490end
491491print("\u{2b}")
492−if T == nil then
492+if (T == nil) then
493493(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{75}\u{73}\u{65}\u{72}\u{64}\u{61}\u{74}\u{61}\u{20}\u{47}\u{43}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
494494else
495495local function newproxy
496496(u)
497−return debug.setmetatable(T.newuserdata(0),debug.getmetatable(u))
497+return debug.setmetatable(T.newuserdata(0x0),debug.getmetatable(u))
498498end
499499collectgarbage("\u{73}\u{74}\u{6f}\u{70}")
500500local u = newproxy(nil)
501501debug.setmetatable(u,{["\u{5f}\u{5f}\u{67}\u{63}"] = true})
502−local s = 0
503−local a = {[u] = 0}
502+local s = 0x0
503+local a = {[u] = 0x0}
504504;
505505setmetatable(a,{["\u{5f}\u{5f}\u{6d}\u{6f}\u{64}\u{65}"] = "\u{76}\u{6b}"})
506−for i = 1, 10
506+for i = 0x1, 0xa
507507do
508508a[newproxy(u)]=i
509509end
510510for k in pairs(a)
511511do
512−assert(getmetatable(k) == getmetatable(u))
512+assert((getmetatable(k) == getmetatable(u)))
513513end
514514local a1 = {}
515515;
@@ -521,7 +521,7 @@ for k,v in pairs(a1)
521521do
522522a[v]=k
523523end
524−for i = 1, 10
524+for i = 0x1, 0xa
525525do
526526assert(a[i])
527527end
@@ -530,62 +530,62 @@ getmetatable(u).u=u
530530do
531531local u = u
532532getmetatable(u).__gc=function (o)
533−assert(a[o] == 10 - s)
534−assert(a[10 - s] == undef)
535−assert(getmetatable(o) == getmetatable(u))
536−assert(getmetatable(o).a[o] == 10 - s)
537−s=s + 1
533+assert((a[o] == (0xa - s)))
534+assert((a[(0xa - s)] == undef))
535+assert((getmetatable(o) == getmetatable(u)))
536+assert((getmetatable(o).a[o] == (0xa - s)))
537+s=(s + 0x1)
538538end
539539end
540540a1,u=nil
541−assert(next(a) ~= nil)
541+assert((next(a) ~= nil))
542542collectgarbage()
543−assert(s == 11)
543+assert((s == 0xb))
544544collectgarbage()
545−assert(next(a) == nil)
545+assert((next(a) == nil))
546546end
547547local u = setmetatable({},{["\u{5f}\u{5f}\u{67}\u{63}"] = true})
548548setmetatable(getmetatable(u),{["\u{5f}\u{5f}\u{6d}\u{6f}\u{64}\u{65}"] = "\u{76}"})
549549getmetatable(u).__gc=function (o)
550−os.exit(1)
550+os.exit(0x1)
551551end
552552u=nil
553553collectgarbage()
554554local u = setmetatable({},{["\u{5f}\u{5f}\u{67}\u{63}"] = true})
555555local m = getmetatable(u)
556−m.x={[{0}] = 1,[0] = {1}}
556+m.x={[{0x0}] = 0x1,[0x0] = {0x1}}
557557;
558558setmetatable(m.x,{["\u{5f}\u{5f}\u{6d}\u{6f}\u{64}\u{65}"] = "\u{6b}\u{76}"})
559559;
560560m.__gc=function (o)
561−assert(next(getmetatable(o).x) == nil)
562−m=10
561+assert((next(getmetatable(o).x) == nil))
562+m=0xa
563563end
564564u,m=nil
565565collectgarbage()
566−assert(m == 10)
566+assert((m == 0xa))
567567do
568568collectgarbage()
569569;
570570collectgarbage()
571571local m = collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}")
572572local a = setmetatable({},{["\u{5f}\u{5f}\u{6d}\u{6f}\u{64}\u{65}"] = "\u{6b}\u{76}"})
573−a[string.rep("\u{61}",2 ^ 22)]=25
574−a[string.rep("\u{62}",2 ^ 22)]={}
575−a[{}]=14
576−assert(collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") > m + 2 ^ 13)
573+a[string.rep("\u{61}",(0x2 ^ 0x16))]=0x19
574+a[string.rep("\u{62}",(0x2 ^ 0x16))]={}
575+a[{}]=0xe
576+assert((collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") > (m + (0x2 ^ 0xd))))
577577collectgarbage()
578−assert(collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") >= m + 2 ^ 12 and collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") < m + 2 ^ 13)
578+assert(((collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") >= (m + (0x2 ^ 0xc))) and (collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") < (m + (0x2 ^ 0xd)))))
579579local k,v = next(a)
580−assert(k == string.rep("\u{61}",2 ^ 22) and v == 25)
581−assert(next(a,k) == nil)
582−assert(a[string.rep("\u{62}",2 ^ 22)] == undef)
580+assert(((k == string.rep("\u{61}",(0x2 ^ 0x16))) and (v == 0x19)))
581+assert((next(a,k) == nil))
582+assert((a[string.rep("\u{62}",(0x2 ^ 0x16))] == undef))
583583a[k]=undef
584584k=nil
585585collectgarbage()
586−assert(next(a) == nil)
587−assert(a[string.rep("\u{62}",100)] == undef)
588−assert(collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") <= m + 1)
586+assert((next(a) == nil))
587+assert((a[string.rep("\u{62}",0x64)] == undef))
588+assert((collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") <= (m + 0x1)))
589589end
590590if T then
591591warn("\u{40}\u{73}\u{74}\u{6f}\u{72}\u{65}")
@@ -599,10 +599,10 @@ assert(string.find(_WARN,"\u{40}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}
599599_WARN=false
600600warn("\u{40}\u{6e}\u{6f}\u{72}\u{6d}\u{61}\u{6c}")
601601end
602−if not _soft then
602+if (not _soft) then
603603print("\u{6c}\u{6f}\u{6e}\u{67}\u{20}\u{6c}\u{69}\u{73}\u{74}")
604604local a = {}
605−for i = 1, 200000
605+for i = 0x1, 0x30d40
606606do
607607a={["\u{6e}\u{65}\u{78}\u{74}"] = a}
608608end
@@ -610,7 +610,7 @@ a=nil
610610collectgarbage()
611611end
612612print("\u{73}\u{65}\u{6c}\u{66}\u{2d}\u{72}\u{65}\u{66}\u{65}\u{72}\u{65}\u{6e}\u{63}\u{65}\u{64}\u{20}\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}\u{73}")
613−local thread_id = 0
613+local thread_id = 0x0
614614local threads = {}
615615local function fn
616616(thread)
@@ -620,10 +620,10 @@ thread=x
620620end
621621coroutine.yield()
622622end
623−while thread_id < 1000 do
623+while (thread_id < 0x3e8) do
624624local thread = coroutine.create(fn)
625625coroutine.resume(thread,thread)
626−thread_id=thread_id + 1
626+thread_id=(thread_id + 0x1)
627627end
628628do
629629local collected = false
@@ -635,12 +635,12 @@ local function f
635635(param)
636636;
637637(function ()
638−assert(type(f) == "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}" and type(param) == "\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}")
638+assert(((type(f) == "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}") and (type(param) == "\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}")))
639639param={param,f}
640640setmetatable(param,{["\u{5f}\u{5f}\u{67}\u{63}"] = function ()
641641collected=true
642642end})
643−coroutine.yield(100)
643+coroutine.yield(0x64)
644644end)()
645645end
646646local co = coroutine.create(f)
@@ -653,28 +653,28 @@ end
653653do
654654collectgarbage()
655655collectgarbage("\u{73}\u{74}\u{6f}\u{70}")
656−collectgarbage("\u{73}\u{74}\u{65}\u{70}",0)
656+collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
657657local x = gcinfo()
658658repeat
659−for i = 1, 1000
659+for i = 0x1, 0x3e8
660660do
661661_ENV.a={}
662662end
663−until gcinfo() > 2 * x
663+until (gcinfo() > (0x2 * x))
664664collectgarbage("\u{72}\u{65}\u{73}\u{74}\u{61}\u{72}\u{74}")
665665_ENV.a=nil
666666end
667667if T then
668668local function foo
669669()
670−local a = {["\u{78}"] = 20}
670+local a = {["\u{78}"] = 0x14}
671671coroutine.yield(function ()
672672return a.x
673673end)
674−assert(a.x == 20)
675−a={["\u{78}"] = 30}
676−assert(T.gccolor(a) == "\u{77}\u{68}\u{69}\u{74}\u{65}")
677−coroutine.yield(100)
674+assert((a.x == 0x14))
675+a={["\u{78}"] = 0x1e}
676+assert((T.gccolor(a) == "\u{77}\u{68}\u{69}\u{74}\u{65}"))
677+coroutine.yield(0x64)
678678end
679679local t = setmetatable({},{["\u{5f}\u{5f}\u{6d}\u{6f}\u{64}\u{65}"] = "\u{6b}\u{76}"})
680680collectgarbage()
@@ -683,34 +683,34 @@ collectgarbage("\u{73}\u{74}\u{6f}\u{70}")
683683t.co=coroutine.wrap(foo)
684684local f = t.co()
685685T.gcstate("\u{61}\u{74}\u{6f}\u{6d}\u{69}\u{63}")
686−assert(T.gcstate() == "\u{61}\u{74}\u{6f}\u{6d}\u{69}\u{63}")
687−assert(t.co() == 100)
688−assert(T.gccolor(t.co) == "\u{77}\u{68}\u{69}\u{74}\u{65}")
686+assert((T.gcstate() == "\u{61}\u{74}\u{6f}\u{6d}\u{69}\u{63}"))
687+assert((t.co() == 0x64))
688+assert((T.gccolor(t.co) == "\u{77}\u{68}\u{69}\u{74}\u{65}"))
689689T.gcstate("\u{70}\u{61}\u{75}\u{73}\u{65}")
690−assert(t.co == nil and f() == 30)
690+assert(((t.co == nil) and (f() == 0x1e)))
691691collectgarbage("\u{72}\u{65}\u{73}\u{74}\u{61}\u{72}\u{74}")
692−local u = T.newuserdata(0,1)
692+local u = T.newuserdata(0x0,0x1)
693693collectgarbage()
694694collectgarbage("\u{73}\u{74}\u{6f}\u{70}")
695695local a = {}
696696T.gcstate("\u{61}\u{74}\u{6f}\u{6d}\u{69}\u{63}")
697697T.gcstate("\u{73}\u{77}\u{65}\u{65}\u{70}\u{61}\u{6c}\u{6c}\u{67}\u{63}")
698698local x = {}
699−assert(T.gccolor(u) == "\u{62}\u{6c}\u{61}\u{63}\u{6b}")
700−assert(T.gccolor(x) == "\u{77}\u{68}\u{69}\u{74}\u{65}")
699+assert((T.gccolor(u) == "\u{62}\u{6c}\u{61}\u{63}\u{6b}"))
700+assert((T.gccolor(x) == "\u{77}\u{68}\u{69}\u{74}\u{65}"))
701701debug.setuservalue(u,x)
702−assert(T.gccolor(u) == "\u{67}\u{72}\u{61}\u{79}")
702+assert((T.gccolor(u) == "\u{67}\u{72}\u{61}\u{79}"))
703703collectgarbage("\u{72}\u{65}\u{73}\u{74}\u{61}\u{72}\u{74}")
704704print("\u{2b}")
705705end
706706if T then
707707local debug = require("\u{64}\u{65}\u{62}\u{75}\u{67}")
708708collectgarbage("\u{73}\u{74}\u{6f}\u{70}")
709−local x = T.newuserdata(0)
710−local y = T.newuserdata(0)
709+local x = T.newuserdata(0x0)
710+local y = T.newuserdata(0x0)
711711debug.setmetatable(y,{["\u{5f}\u{5f}\u{67}\u{63}"] = nop})
712712debug.setmetatable(x,{["\u{5f}\u{5f}\u{67}\u{63}"] = nop})
713−assert(T.gccolor(y) == "\u{77}\u{68}\u{69}\u{74}\u{65}")
713+assert((T.gccolor(y) == "\u{77}\u{68}\u{69}\u{74}\u{65}"))
714714T.checkmemory()
715715collectgarbage("\u{72}\u{65}\u{73}\u{74}\u{61}\u{72}\u{74}")
716716end
@@ -718,61 +718,61 @@ if T then
718718print("\u{65}\u{6d}\u{65}\u{72}\u{67}\u{65}\u{6e}\u{63}\u{79}\u{20}\u{63}\u{6f}\u{6c}\u{6c}\u{65}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{73}")
719719collectgarbage()
720720collectgarbage()
721−T.totalmem(T.totalmem() + 200)
722−for i = 1, 200
721+T.totalmem((T.totalmem() + 0xc8))
722+for i = 0x1, 0xc8
723723do
724724local a = {}
725725end
726−T.totalmem(0)
726+T.totalmem(0x0)
727727collectgarbage()
728728local t = T.totalmem("\u{74}\u{61}\u{62}\u{6c}\u{65}")
729729local a = {{},{},{}}
730−assert(T.totalmem("\u{74}\u{61}\u{62}\u{6c}\u{65}") == t + 4)
730+assert((T.totalmem("\u{74}\u{61}\u{62}\u{6c}\u{65}") == (t + 0x4)))
731731t=T.totalmem("\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}")
732732a=function ()
733733
734734end
735−assert(T.totalmem("\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}") == t + 1)
735+assert((T.totalmem("\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}") == (t + 0x1)))
736736t=T.totalmem("\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}")
737737a=coroutine.create(function ()
738738
739739end)
740−assert(T.totalmem("\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}") == t + 1)
740+assert((T.totalmem("\u{74}\u{68}\u{72}\u{65}\u{61}\u{64}") == (t + 0x1)))
741741end
742742do
743743local setmetatable,assert,type,print,getmetatable = setmetatable,assert,type,print,getmetatable
744744local tt = {}
745745tt.__gc=function (o)
746−assert(getmetatable(o) == tt)
747−local a = "\u{78}\u{75}\u{78}\u{75}" .. (10 + 3) .. "\u{6a}\u{6f}\u{61}\u{6f}",{}
746+assert((getmetatable(o) == tt))
747+local a = ("\u{78}\u{75}\u{78}\u{75}" .. ((0xa + 0x3) .. "\u{6a}\u{6f}\u{61}\u{6f}")),{}
748748___Glob=o
749749setmetatable({},tt)
750−print("\u{3e}\u{3e}\u{3e}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{61}\u{74}\u{65}\u{20}" .. "\u{3c}\u{3c}\u{3c}\u{a}")
750+print(("\u{3e}\u{3e}\u{3e}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{61}\u{74}\u{65}\u{20}" .. "\u{3c}\u{3c}\u{3c}\u{a}"))
751751end
752752local u = setmetatable({},tt)
753753___Glob={u}
754754end
755755if T then
756756local error,assert,find,warn = error,assert,string.find,warn
757−local n = 0
757+local n = 0x0
758758local lastmsg
759759local mt = {["\u{5f}\u{5f}\u{67}\u{63}"] = function (o)
760−n=n + 1
761−assert(n == o[1])
762−if n == 1 then
760+n=(n + 0x1)
761+assert((n == o[0x1]))
762+if (n == 0x1) then
763763_WARN=false
764−elseif n == 2 then
764+elseif (n == 0x2) then
765765assert(find(_WARN,"\u{40}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{77}\u{61}\u{72}\u{6e}\u{69}\u{6e}\u{67}"))
766766lastmsg=_WARN
767767else
768−assert(lastmsg == _WARN)
768+assert((lastmsg == _WARN))
769769end
770770warn("\u{40}\u{73}\u{74}\u{6f}\u{72}\u{65}")
771771;
772772_WARN=false
773773error("\u{40}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{77}\u{61}\u{72}\u{6e}\u{69}\u{6e}\u{67}")
774774end}
775−for i = 10, 1, - 1
775+for i = 0xa, 0x1, (- 0x1)
776776do
777777table.insert(___Glob,setmetatable({i},mt))
778778end
@@ -784,7 +784,7 @@ setmetatable({},{["\u{5f}\u{5f}\u{67}\u{63}"] = function ()
784784res=collectgarbage()
785785end})
786786collectgarbage()
787−assert(not res)
787+assert((not res))
788788end
789789collectgarbage(oldmode)
790790print("\u{4f}\u{4b}")
desk/res/lua/cycled/gengc.luanew file+108
@@ -0,0 +1,108 @@
1+print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{67}\u{65}\u{6e}\u{65}\u{72}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{61}\u{6c}\u{20}\u{67}\u{61}\u{72}\u{62}\u{61}\u{67}\u{65}\u{20}\u{63}\u{6f}\u{6c}\u{6c}\u{65}\u{63}\u{74}\u{69}\u{6f}\u{6e}")
2+local debug = require("\u{64}\u{65}\u{62}\u{75}\u{67}")
3+assert(collectgarbage("\u{69}\u{73}\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}"))
4+collectgarbage()
5+local oldmode = collectgarbage("\u{67}\u{65}\u{6e}\u{65}\u{72}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{61}\u{6c}")
6+do
7+local U = {}
8+collectgarbage()
9+assert((not (T or (T.gcage(U) == "\u{6f}\u{6c}\u{64}"))))
10+U[0x1]={["\u{78}"] = {0xea}}
11+assert((not (T or ((T.gcage(U) == "\u{74}\u{6f}\u{75}\u{63}\u{68}\u{65}\u{64}\u{31}") and (T.gcage(U[0x1]) == "\u{6e}\u{65}\u{77}")))))
12+collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
13+assert((not (T or ((T.gcage(U) == "\u{74}\u{6f}\u{75}\u{63}\u{68}\u{65}\u{64}\u{32}") and (T.gcage(U[0x1]) == "\u{73}\u{75}\u{72}\u{76}\u{69}\u{76}\u{61}\u{6c}")))))
14+collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
15+assert((not (T or ((T.gcage(U) == "\u{6f}\u{6c}\u{64}") and (T.gcage(U[0x1]) == "\u{6f}\u{6c}\u{64}\u{31}")))))
16+assert((U[0x1].x[0x1] == 0xea))
17+end
18+do
19+local function foo
20+()
21+
22+end
23+local old = {0xa}
24+collectgarbage()
25+assert((not (T or (T.gcage(old) == "\u{6f}\u{6c}\u{64}"))))
26+setmetatable(old,{})
27+assert((not (T or (T.gcage(getmetatable(old)) == "\u{6f}\u{6c}\u{64}\u{30}"))))
28+collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
29+assert((not (T or (T.gcage(getmetatable(old)) == "\u{6f}\u{6c}\u{64}\u{31}"))))
30+setmetatable(getmetatable(old),{["\u{5f}\u{5f}\u{67}\u{63}"] = foo})
31+collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
32+end
33+do
34+local A = {}
35+A[0x1]=false
36+local function gcf
37+(obj)
38+A[0x1]=obj
39+assert((not (T or (T.gcage(obj) == "\u{6f}\u{6c}\u{64}\u{31}"))))
40+obj=nil
41+collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
42+print(getmetatable(A[0x1]).x)
43+end
44+collectgarbage()
45+local obj = {}
46+collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
47+assert((not (T or (T.gcage(obj) == "\u{73}\u{75}\u{72}\u{76}\u{69}\u{76}\u{61}\u{6c}"))))
48+setmetatable(obj,{["\u{5f}\u{5f}\u{67}\u{63}"] = gcf,["\u{78}"] = "\u{2b}"})
49+assert((not (T or (T.gcage(getmetatable(obj)) == "\u{6e}\u{65}\u{77}"))))
50+obj=nil
51+collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
52+end
53+do
54+local old = {0xa}
55+collectgarbage()
56+local co = coroutine.create(function ()
57+local x = nil
58+local f = function ()
59+return x[0x1]
60+end
61+x=coroutine.yield(f)
62+coroutine.yield()
63+end)
64+local _,f = coroutine.resume(co)
65+collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
66+old[0x1]={"\u{68}\u{65}\u{6c}\u{6c}\u{6f}"}
67+coroutine.resume(co,{0x7b})
68+co=nil
69+collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
70+assert(((f() == 0x7b) and (old[0x1][0x1] == "\u{68}\u{65}\u{6c}\u{6c}\u{6f}")))
71+collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
72+assert(((f() == 0x7b) and (old[0x1][0x1] == "\u{68}\u{65}\u{6c}\u{6c}\u{6f}")))
73+end
74+do
75+local t = setmetatable({},{["\u{5f}\u{5f}\u{6d}\u{6f}\u{64}\u{65}"] = "\u{6b}\u{76}"})
76+collectgarbage()
77+assert((not (T or (T.gcage(t) == "\u{6f}\u{6c}\u{64}"))))
78+t[0x1]={0xa}
79+assert((not (T or ((T.gcage(t) == "\u{74}\u{6f}\u{75}\u{63}\u{68}\u{65}\u{64}\u{31}") and (T.gccolor(t) == "\u{67}\u{72}\u{61}\u{79}")))))
80+collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
81+assert((not (T or ((T.gcage(t) == "\u{74}\u{6f}\u{75}\u{63}\u{68}\u{65}\u{64}\u{32}") and (T.gccolor(t) == "\u{62}\u{6c}\u{61}\u{63}\u{6b}")))))
82+collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
83+assert((not (T or (T.gcage(t) == "\u{6f}\u{6c}\u{64}"))))
84+t[0x1]={0xa}
85+collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
86+assert((t[0x1] == nil))
87+end
88+if (T == nil) then
89+(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{6f}\u{6d}\u{65}\u{20}\u{67}\u{65}\u{6e}\u{65}\u{72}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{61}\u{6c}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
90+print("\u{4f}\u{4b}")
91+return
92+end
93+do
94+local U = T.newuserdata(0x0,0x1)
95+collectgarbage()
96+assert((T.gcage(U) == "\u{6f}\u{6c}\u{64}"))
97+debug.setuservalue(U,{["\u{78}"] = {0xea}})
98+assert(((T.gcage(U) == "\u{74}\u{6f}\u{75}\u{63}\u{68}\u{65}\u{64}\u{31}") and (T.gcage(debug.getuservalue(U)) == "\u{6e}\u{65}\u{77}")))
99+collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
100+assert(((T.gcage(U) == "\u{74}\u{6f}\u{75}\u{63}\u{68}\u{65}\u{64}\u{32}") and (T.gcage(debug.getuservalue(U)) == "\u{73}\u{75}\u{72}\u{76}\u{69}\u{76}\u{61}\u{6c}")))
101+collectgarbage("\u{73}\u{74}\u{65}\u{70}",0x0)
102+assert(((T.gcage(U) == "\u{6f}\u{6c}\u{64}") and (T.gcage(debug.getuservalue(U)) == "\u{6f}\u{6c}\u{64}\u{31}")))
103+assert((debug.getuservalue(U).x[0x1] == 0xea))
104+end
105+assert(collectgarbage("\u{69}\u{73}\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}"))
106+assert(collectgarbage("\u{69}\u{73}\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}"))
107+collectgarbage(oldmode)
108+print("\u{4f}\u{4b}")
zod/luau/res/lua/cycled/goto.lua → desk/res/lua/cycled/goto.luarenamed+57−57
@@ -2,7 +2,7 @@ collectgarbage()
22local function errmsg
33(code,m)
44local st,msg = load(code)
5−assert(not st and string.find(msg,m))
5+assert((not (st and string.find(msg,m))))
66end
77errmsg("\u{20}\u{67}\u{6f}\u{74}\u{6f}\u{20}\u{6c}\u{31}\u{3b}\u{20}\u{64}\u{6f}\u{20}\u{3a}\u{3a}\u{6c}\u{31}\u{3a}\u{3a}\u{20}\u{65}\u{6e}\u{64}\u{20}","\u{6c}\u{61}\u{62}\u{65}\u{6c}\u{20}\u{27}\u{6c}\u{31}\u{27}")
88errmsg("\u{20}\u{64}\u{6f}\u{20}\u{3a}\u{3a}\u{6c}\u{31}\u{3a}\u{3a}\u{20}\u{65}\u{6e}\u{64}\u{20}\u{67}\u{6f}\u{74}\u{6f}\u{20}\u{6c}\u{31}\u{3b}\u{20}","\u{6c}\u{61}\u{62}\u{65}\u{6c}\u{20}\u{27}\u{6c}\u{31}\u{27}")
@@ -15,10 +15,10 @@ errmsg("\u{20}\u{67}\u{6f}\u{74}\u{6f}\u{20}\u{6c}\u{31}\u{20}\u{64}\u{6f}\u{20}
1515errmsg("\u{20}\u{20}\u{72}\u{65}\u{70}\u{65}\u{61}\u{74}\u{a}\u{20}\u{20}\u{20}\u{20}\u{69}\u{66}\u{20}\u{78}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{20}\u{67}\u{6f}\u{74}\u{6f}\u{20}\u{63}\u{6f}\u{6e}\u{74}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{78}\u{75}\u{78}\u{75}\u{20}\u{3d}\u{20}\u{31}\u{30}\u{a}\u{20}\u{20}\u{20}\u{20}\u{3a}\u{3a}\u{63}\u{6f}\u{6e}\u{74}\u{3a}\u{3a}\u{a}\u{20}\u{20}\u{75}\u{6e}\u{74}\u{69}\u{6c}\u{20}\u{78}\u{75}\u{78}\u{75}\u{20}\u{3c}\u{20}\u{78}\u{a}","\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{27}\u{78}\u{75}\u{78}\u{75}\u{27}")
1616local x
1717do
18−local y = 12
18+local y = 0xc
1919goto l1
2020::l2::
21−x=x + 1
21+x=(x + 0x1)
2222;
2323goto l3
2424::l1::
@@ -28,16 +28,16 @@ goto l2
2828end
2929::l3::
3030::l3_1::
31−assert(x == 13)
31+assert((x == 0xd))
3232do
3333local prog = "\u{20}\u{20}\u{64}\u{6f}\u{a}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{31}\u{a}\u{20}\u{20}\u{20}\u{20}\u{67}\u{6f}\u{74}\u{6f}\u{20}\u{6c}\u{25}\u{73}\u{61}\u{3b}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{61}\u{20}\u{2b}\u{20}\u{31}\u{a}\u{20}\u{20}\u{20}\u{3a}\u{3a}\u{6c}\u{25}\u{73}\u{61}\u{3a}\u{3a}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{61}\u{20}\u{2b}\u{20}\u{31}\u{30}\u{a}\u{20}\u{20}\u{20}\u{20}\u{67}\u{6f}\u{74}\u{6f}\u{20}\u{6c}\u{25}\u{73}\u{62}\u{3b}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{61}\u{20}\u{2b}\u{20}\u{32}\u{a}\u{20}\u{20}\u{20}\u{3a}\u{3a}\u{6c}\u{25}\u{73}\u{62}\u{3a}\u{3a}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{61}\u{20}\u{2b}\u{20}\u{32}\u{30}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{61}\u{a}\u{20}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}"
34−local label = string.rep("\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",40)
34+local label = string.rep("\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",0x28)
3535prog=string.format(prog,label,label,label,label)
36−assert(assert(load(prog))() == 31)
36+assert((assert(load(prog))() == 0x1f))
3737end
3838do
3939goto l1
40−local a = 23
40+local a = 0x17
4141x=a
4242::l1::
4343;
@@ -46,14 +46,14 @@ while true do
4646goto l4
4747goto l1
4848goto l1
49−local x = 45
49+local x = 0x2d
5050::l1::
5151;
5252;
5353;
5454end
5555::l4::
56−assert(x == 13)
56+assert((x == 0xd))
5757if print then
5858goto l1
5959error("\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{68}\u{65}\u{72}\u{65}")
@@ -72,35 +72,35 @@ local function foo
7272local a = {}
7373goto l3
7474::l1::
75−a[# a + 1]=1
75+a[(# (a + 0x1))]=0x1
7676;
7777goto l2
7878;
7979::l2::
80−a[# a + 1]=2
80+a[(# (a + 0x1))]=0x2
8181;
8282goto l5
8383;
8484::l3::
8585::l3a::
86−a[# a + 1]=3
86+a[(# (a + 0x1))]=0x3
8787;
8888goto l1
8989;
9090::l4::
91−a[# a + 1]=4
91+a[(# (a + 0x1))]=0x4
9292;
9393goto l6
9494;
9595::l5::
96−a[# a + 1]=5
96+a[(# (a + 0x1))]=0x5
9797;
9898goto l4
9999;
100100::l6::
101−assert(a[1] == 3 and a[2] == 1 and a[3] == 2 and a[4] == 5 and a[5] == 4)
102−if not a[6] then
103−a[6]=true
101+assert((((((a[0x1] == 0x3) and (a[0x2] == 0x1)) and (a[0x3] == 0x2)) and (a[0x4] == 0x5)) and (a[0x5] == 0x4)))
102+if (not a[0x6]) then
103+a[0x6]=true
104104;
105105goto l3a
106106end
@@ -111,15 +111,15 @@ do
111111local x
112112::L1::
113113local y
114−assert(y == nil)
114+assert((y == nil))
115115y=true
116−if x == nil then
117−x=1
116+if (x == nil) then
117+x=0x1
118118goto L1
119119else
120−x=x + 1
120+x=(x + 0x1)
121121end
122−assert(x == 2 and y == true)
122+assert(((x == 0x2) and (y == true)))
123123end
124124do
125125local first = true
@@ -151,27 +151,27 @@ local function foo
151151()
152152local t = {}
153153do
154−local i = 1
154+local i = 0x1
155155local a,b,c,d
156−t[1]=function ()
156+t[0x1]=function ()
157157return a,b,c,d
158158end
159159::l1::
160160local b
161161do
162162local c
163−t[# t + 1]=function ()
163+t[(# (t + 0x1))]=function ()
164164return a,b,c,d
165165end
166−if i > 2 then
166+if (i > 0x2) then
167167goto l2
168168end
169169do
170170local d
171−t[# t + 1]=function ()
171+t[(# (t + 0x1))]=function ()
172172return a,b,c,d
173173end
174−i=i + 1
174+i=(i + 0x1)
175175local a
176176goto l1
177177end
@@ -181,52 +181,52 @@ end
181181return t
182182end
183183local a = foo()
184−assert(# a == 6)
185−for i = 2, 6
184+assert((# (a == 0x6)))
185+for i = 0x2, 0x6
186186do
187−assert(debug.upvalueid(a[1],1) == debug.upvalueid(a[i],1))
187+assert((debug.upvalueid(a[0x1],0x1) == debug.upvalueid(a[i],0x1)))
188188end
189−for i = 2, 6
189+for i = 0x2, 0x6
190190do
191−assert(debug.upvalueid(a[1],2) ~= debug.upvalueid(a[i],2))
192−assert(debug.upvalueid(a[1],3) ~= debug.upvalueid(a[i],3))
191+assert((debug.upvalueid(a[0x1],0x2) ~= debug.upvalueid(a[i],0x2)))
192+assert((debug.upvalueid(a[0x1],0x3) ~= debug.upvalueid(a[i],0x3)))
193193end
194−for i = 3, 5, 2
194+for i = 0x3, 0x5, 0x2
195195do
196−assert(debug.upvalueid(a[i],2) == debug.upvalueid(a[i - 1],2))
197−assert(debug.upvalueid(a[i],3) == debug.upvalueid(a[i - 1],3))
198−assert(debug.upvalueid(a[i],2) ~= debug.upvalueid(a[i + 1],2))
199−assert(debug.upvalueid(a[i],3) ~= debug.upvalueid(a[i + 1],3))
196+assert((debug.upvalueid(a[i],0x2) == debug.upvalueid(a[(i - 0x1)],0x2)))
197+assert((debug.upvalueid(a[i],0x3) == debug.upvalueid(a[(i - 0x1)],0x3)))
198+assert((debug.upvalueid(a[i],0x2) ~= debug.upvalueid(a[(i + 0x1)],0x2)))
199+assert((debug.upvalueid(a[i],0x3) ~= debug.upvalueid(a[(i + 0x1)],0x3)))
200200end
201−for i = 2, 6, 2
201+for i = 0x2, 0x6, 0x2
202202do
203−assert(debug.upvalueid(a[1],4) == debug.upvalueid(a[i],4))
203+assert((debug.upvalueid(a[0x1],0x4) == debug.upvalueid(a[i],0x4)))
204204end
205−for i = 3, 5, 2
205+for i = 0x3, 0x5, 0x2
206206do
207−for j = 1, 6
207+for j = 0x1, 0x6
208208do
209−assert((debug.upvalueid(a[i],4) == debug.upvalueid(a[j],4)) == (i == j))
209+assert(((debug.upvalueid(a[i],0x4) == debug.upvalueid(a[j],0x4)) == (i == j)))
210210end
211211end
212212local function testG
213213(a)
214−if a == 1 then
214+if (a == 0x1) then
215215goto l1
216216error("\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{6e}\u{65}\u{76}\u{65}\u{72}\u{20}\u{62}\u{65}\u{20}\u{68}\u{65}\u{72}\u{65}\u{21}")
217−elseif a == 2 then
217+elseif (a == 0x2) then
218218goto l2
219−elseif a == 3 then
219+elseif (a == 0x3) then
220220goto l3
221−elseif a == 4 then
221+elseif (a == 0x4) then
222222goto l1
223223error("\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{6e}\u{65}\u{76}\u{65}\u{72}\u{20}\u{62}\u{65}\u{20}\u{68}\u{65}\u{72}\u{65}\u{21}")
224224::l1::
225−a=a + 1
225+a=(a + 0x1)
226226else
227227goto l4
228228::l4a::
229−a=a * 2
229+a=(a * 0x2)
230230;
231231goto l4b
232232error("\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{6e}\u{65}\u{76}\u{65}\u{72}\u{20}\u{62}\u{65}\u{20}\u{68}\u{65}\u{72}\u{65}\u{21}")
@@ -249,11 +249,11 @@ end
249249::l1::
250250return "\u{31}"
251251end
252−assert(testG(1) == "\u{31}")
253−assert(testG(2) == "\u{32}")
254−assert(testG(3) == "\u{33}")
255−assert(testG(4) == 5)
256−assert(testG(5) == 10)
252+assert((testG(0x1) == "\u{31}"))
253+assert((testG(0x2) == "\u{32}"))
254+assert((testG(0x3) == "\u{33}"))
255+assert((testG(0x4) == 0x5))
256+assert((testG(0x5) == 0xa))
257257do
258258local X
259259goto L1
@@ -264,12 +264,12 @@ do
264264local a <close> = setmetatable({},{["\u{5f}\u{5f}\u{63}\u{6c}\u{6f}\u{73}\u{65}"] = function ()
265265X=true
266266end})
267−assert(X == nil)
267+assert((X == nil))
268268if a then
269269goto L2
270270end
271271end
272272::L3::
273−assert(X == true)
273+assert((X == true))
274274end
275275print("\u{4f}\u{4b}")
zod/luau/res/lua/cycled/heavy.lua → desk/res/lua/cycled/heavy.luarenamed+35−35
@@ -5,58 +5,58 @@ do
55local a = "\u{78}"
66local st,msg = pcall(function ()
77while true do
8−a=a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a .. a
9−print(string.format("\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{25}\u{64}\u{20}\u{62}\u{79}\u{74}\u{65}\u{73}",# a))
8+a=(a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. (a .. a)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
9+print(string.format("\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{25}\u{64}\u{20}\u{62}\u{79}\u{74}\u{65}\u{73}",(# a)))
1010end
1111end)
12−assert(not st and (string.find(msg,"\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{6c}\u{65}\u{6e}\u{67}\u{74}\u{68}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}") or string.find(msg,"\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}")))
13−print("\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{6c}\u{65}\u{6e}\u{67}\u{74}\u{68}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}" .. # a * 100)
12+assert((not (st and (string.find(msg,"\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{6c}\u{65}\u{6e}\u{67}\u{74}\u{68}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}") or string.find(msg,"\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}")))))
13+print(("\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{6c}\u{65}\u{6e}\u{67}\u{74}\u{68}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}" .. (# (a * 0x64))))
1414end
1515print("\u{2b}")
1616end
1717local function loadrep
1818(x,what)
19−local p = 1 << 20
19+local p = (0x1 << 0x14)
2020local s = string.rep(x,p)
21−local count = 0
21+local count = 0x0
2222local function f
2323()
24−count=count + p
25−if count % (128 * p) == 0 then
26−io.stderr:write("\u{28}",count // 2 ^ 20,"\u{20}\u{4d}\u{29}")
24+count=(count + p)
25+if ((count % (0x80 * p)) == 0x0) then
26+io.stderr:write("\u{28}",(count // (0x2 ^ 0x14)),"\u{20}\u{4d}\u{29}")
2727end
2828return s
2929end
3030local st,msg = load(f,"\u{3d}\u{62}\u{69}\u{67}")
31−print("\u{a}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}\u{3a}\u{20}",collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") * 1024)
31+print("\u{a}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}\u{3a}\u{20}",(collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") * 0x400))
3232msg=string.match(msg,"\u{5e}\u{5b}\u{5e}\u{a}\u{5d}\u{2b}")
3333print(string.format("\u{74}\u{6f}\u{74}\u{61}\u{6c}\u{3a}\u{20}\u{30}\u{78}\u{25}\u{78}\u{20}\u{25}\u{73}\u{20}\u{28}\u{27}\u{25}\u{73}\u{27}\u{29}",count,what,msg))
3434return st,msg
3535end
3636function controlstruct()
3737print("\u{63}\u{6f}\u{6e}\u{74}\u{72}\u{6f}\u{6c}\u{20}\u{73}\u{74}\u{72}\u{75}\u{63}\u{74}\u{75}\u{72}\u{65}\u{20}\u{74}\u{6f}\u{6f}\u{20}\u{6c}\u{6f}\u{6e}\u{67}")
38−local lim = ((1 << 24) - 2) // 3
38+local lim = (((0x1 << 0x18) - 0x2) // 0x3)
3939local s = string.rep("\u{61}\u{20}\u{3d}\u{20}\u{61}\u{20}\u{2b}\u{20}\u{31}\u{a}",lim)
40−s="\u{77}\u{68}\u{69}\u{6c}\u{65}\u{20}\u{74}\u{72}\u{75}\u{65}\u{20}\u{64}\u{6f}\u{20}" .. s .. "\u{65}\u{6e}\u{64}"
40+s=("\u{77}\u{68}\u{69}\u{6c}\u{65}\u{20}\u{74}\u{72}\u{75}\u{65}\u{20}\u{64}\u{6f}\u{20}" .. (s .. "\u{65}\u{6e}\u{64}"))
4141assert(load(s))
42−print("\u{6f}\u{6b}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}" .. lim .. "\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{73}")
43−lim=lim + 3
42+print(("\u{6f}\u{6b}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}" .. (lim .. "\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{73}")))
43+lim=(lim + 0x3)
4444s=string.rep("\u{61}\u{20}\u{3d}\u{20}\u{61}\u{20}\u{2b}\u{20}\u{31}\u{a}",lim)
45−s="\u{77}\u{68}\u{69}\u{6c}\u{65}\u{20}\u{74}\u{72}\u{75}\u{65}\u{20}\u{64}\u{6f}\u{20}" .. s .. "\u{65}\u{6e}\u{64}"
45+s=("\u{77}\u{68}\u{69}\u{6c}\u{65}\u{20}\u{74}\u{72}\u{75}\u{65}\u{20}\u{64}\u{6f}\u{20}" .. (s .. "\u{65}\u{6e}\u{64}"))
4646local st,msg = load(s)
47−assert(not st and string.find(msg,"\u{74}\u{6f}\u{6f}\u{20}\u{6c}\u{6f}\u{6e}\u{67}"))
47+assert((not (st and string.find(msg,"\u{74}\u{6f}\u{6f}\u{20}\u{6c}\u{6f}\u{6e}\u{67}"))))
4848print(msg)
4949end
5050function manylines()
5151print("\u{6c}\u{6f}\u{61}\u{64}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{73}")
5252local st,msg = loadrep("\u{a}","\u{6c}\u{69}\u{6e}\u{65}\u{73}")
53−assert(not st and string.find(msg,"\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{73}"))
53+assert((not (st and string.find(msg,"\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{73}"))))
5454print("\u{2b}")
5555end
5656function hugeid()
5757print("\u{6c}\u{6f}\u{61}\u{64}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{68}\u{75}\u{67}\u{65}\u{20}\u{69}\u{64}\u{65}\u{6e}\u{74}\u{69}\u{66}\u{69}\u{65}\u{72}")
5858local st,msg = loadrep("\u{61}","\u{63}\u{68}\u{61}\u{72}\u{73}")
59−assert(not st and (string.find(msg,"\u{6c}\u{65}\u{78}\u{69}\u{63}\u{61}\u{6c}\u{20}\u{65}\u{6c}\u{65}\u{6d}\u{65}\u{6e}\u{74}\u{20}\u{74}\u{6f}\u{6f}\u{20}\u{6c}\u{6f}\u{6e}\u{67}") or string.find(msg,"\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}")))
59+assert((not (st and (string.find(msg,"\u{6c}\u{65}\u{78}\u{69}\u{63}\u{61}\u{6c}\u{20}\u{65}\u{6c}\u{65}\u{6d}\u{65}\u{6e}\u{74}\u{20}\u{74}\u{6f}\u{6f}\u{20}\u{6c}\u{6f}\u{6e}\u{67}") or string.find(msg,"\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}")))))
6060print("\u{2b}")
6161end
6262function toomanyinst()
@@ -66,61 +66,61 @@ print("\u{2b}")
6666end
6767local function loadrepfunc
6868(prefix,f)
69−local count = - 1
69+local count = (- 0x1)
7070local function aux
7171()
72−count=count + 1
73−if count == 0 then
72+count=(count + 0x1)
73+if (count == 0x0) then
7474return prefix
7575else
76−if count % (1048576) == 0 then
77−io.stderr:write("\u{28}",count // 2 ^ 20,"\u{20}\u{4d}\u{29}")
76+if ((count % 0x100000) == 0x0) then
77+io.stderr:write("\u{28}",(count // (0x2 ^ 0x14)),"\u{20}\u{4d}\u{29}")
7878end
7979return f(count)
8080end
8181end
8282local st,msg = load(aux,"\u{6b}")
83−print("\u{a}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}\u{3a}\u{20}",collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") * 1024)
83+print("\u{a}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}\u{3a}\u{20}",(collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") * 0x400))
8484msg=string.match(msg,"\u{5e}\u{5b}\u{5e}\u{a}\u{5d}\u{2b}")
8585print("\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{3a}\u{20}",msg)
8686end
8787function toomanyconst()
8888print("\u{6c}\u{6f}\u{61}\u{64}\u{69}\u{6e}\u{67}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{61}\u{6e}\u{74}\u{73}")
8989loadrepfunc("\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{6f}\u{6f}\u{20}\u{28}\u{29}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{7b}\u{30}\u{2c}",function (n)
90−return string.char(34,((n // 128 ^ 0) & 127) + 128,((n // 128 ^ 1) & 127) + 128,((n // 128 ^ 2) & 127) + 128,((n // 128 ^ 3) & 127) + 128,((n // 128 ^ 4) & 127) + 128,34,44)
90+return string.char(0x22,(((n // (0x80 ^ 0x0)) & 0x7f) + 0x80),(((n // (0x80 ^ 0x1)) & 0x7f) + 0x80),(((n // (0x80 ^ 0x2)) & 0x7f) + 0x80),(((n // (0x80 ^ 0x3)) & 0x7f) + 0x80),(((n // (0x80 ^ 0x4)) & 0x7f) + 0x80),0x22,0x2c)
9191end)
9292end
9393function toomanystr()
9494local a = {}
9595local st,msg = pcall(function ()
96−for i = 1, math.huge
96+for i = 0x1, math.huge
9797do
98−if i % (1048576) == 0 then
99−io.stderr:write("\u{28}",i // 2 ^ 20,"\u{20}\u{4d}\u{29}")
98+if ((i % 0x100000) == 0x0) then
99+io.stderr:write("\u{28}",(i // (0x2 ^ 0x14)),"\u{20}\u{4d}\u{29}")
100100end
101101a[i]=string.pack("\u{49}",i)
102102end
103103end)
104−local size = # a
104+local size = (# a)
105105a=collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}")
106−print("\u{a}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}\u{3a}",a * 1024)
106+print("\u{a}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}\u{3a}",(a * 0x400))
107107print("\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{3a}",msg)
108108print("\u{73}\u{69}\u{7a}\u{65}\u{3a}",size)
109109end
110110function toomanyidx()
111111local a = {}
112112local st,msg = pcall(function ()
113−for i = 1, math.huge
113+for i = 0x1, math.huge
114114do
115−if i % (1048576) == 0 then
116−io.stderr:write("\u{28}",i // 2 ^ 20,"\u{20}\u{4d}\u{29}")
115+if ((i % 0x100000) == 0x0) then
116+io.stderr:write("\u{28}",(i // (0x2 ^ 0x14)),"\u{20}\u{4d}\u{29}")
117117end
118118a[i]=i
119119end
120120end)
121−print("\u{a}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}\u{3a}\u{20}",collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") * 1024)
121+print("\u{a}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}\u{3a}\u{20}",(collectgarbage("\u{63}\u{6f}\u{75}\u{6e}\u{74}") * 0x400))
122122print("\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{3a}\u{20}",msg)
123−print("\u{73}\u{69}\u{7a}\u{65}\u{3a}",# a)
123+print("\u{73}\u{69}\u{7a}\u{65}\u{3a}",(# a))
124124end
125125toomanyidx()
126126print("\u{4f}\u{4b}")
zod/luau/res/lua/cycled/literals.lua → desk/res/lua/cycled/literals.luarenamed+78−78
@@ -5,46 +5,46 @@ local function dostring
55return assert(load(x),"")()
66end
77dostring("\u{78}\u{20}\u{b}\u{c}\u{20}\u{3d}\u{20}\u{9}\u{d}\u{20}\u{27}\u{61}\u{0}\u{61}\u{27}\u{20}\u{b}\u{c}\u{c}")
8−assert(x == "\u{61}\u{0}\u{61}" and string.len(x) == 3)
8+assert(((x == "\u{61}\u{0}\u{61}") and (string.len(x) == 0x3)))
99_G.x=nil
10−assert("\u{a}\u{22}\u{27}\u{5c}" == "\u{a}\u{22}\u{27}\u{5c}")
10+assert(("\u{a}\u{22}\u{27}\u{5c}" == "\u{a}\u{22}\u{27}\u{5c}"))
1111assert(string.find("\u{7}\u{8}\u{c}\u{a}\u{d}\u{9}\u{b}","\u{5e}\u{25}\u{63}\u{25}\u{63}\u{25}\u{63}\u{25}\u{63}\u{25}\u{63}\u{25}\u{63}\u{25}\u{63}\u{24}"))
12−assert("\u{63}\u{31}\u{32}" == "\u{63}\u{31}\u{32}")
13−assert("\u{63}\u{61}\u{62}" == "\u{63}\u{61}\u{62}")
14−assert("\u{63}" == "\u{63}")
15−assert("\u{63}\u{a}" == "\u{63}\u{a}")
16−assert("\u{0}\u{0}\u{0}\u{61}\u{6c}\u{6f}" == "\u{0}" .. "\u{0}\u{0}" .. "\u{61}\u{6c}\u{6f}")
17−assert(10 .. 20 .. - 30 == "\u{31}\u{30}\u{32}\u{30}\u{2d}\u{33}\u{30}")
18−assert("\u{0}\u{5}\u{10}\u{1f}\u{3c}\u{ff}\u{e8}" == "\u{0}\u{5}\u{10}\u{1f}\u{3c}\u{ff}\u{e8}")
12+assert(("\u{63}\u{31}\u{32}" == "\u{63}\u{31}\u{32}"))
13+assert(("\u{63}\u{61}\u{62}" == "\u{63}\u{61}\u{62}"))
14+assert(("\u{63}" == "\u{63}"))
15+assert(("\u{63}\u{a}" == "\u{63}\u{a}"))
16+assert(("\u{0}\u{0}\u{0}\u{61}\u{6c}\u{6f}" == ("\u{0}" .. ("\u{0}\u{0}" .. "\u{61}\u{6c}\u{6f}"))))
17+assert((0xa .. (0x14 .. (- (0x1e == "\u{31}\u{30}\u{32}\u{30}\u{2d}\u{33}\u{30}")))))
18+assert(("\u{0}\u{5}\u{10}\u{1f}\u{3c}\u{ff}\u{e8}" == "\u{0}\u{5}\u{10}\u{1f}\u{3c}\u{ff}\u{e8}"))
1919local function lexstring
2020(x,y,n)
21−local f = assert(load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}" .. x .. "\u{2c}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{22}\u{64}\u{65}\u{62}\u{75}\u{67}\u{22}\u{2e}\u{67}\u{65}\u{74}\u{69}\u{6e}\u{66}\u{6f}\u{28}\u{31}\u{29}\u{2e}\u{63}\u{75}\u{72}\u{72}\u{65}\u{6e}\u{74}\u{6c}\u{69}\u{6e}\u{65}",""))
21+local f = assert(load(("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}" .. (x .. "\u{2c}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{22}\u{64}\u{65}\u{62}\u{75}\u{67}\u{22}\u{2e}\u{67}\u{65}\u{74}\u{69}\u{6e}\u{66}\u{6f}\u{28}\u{31}\u{29}\u{2e}\u{63}\u{75}\u{72}\u{72}\u{65}\u{6e}\u{74}\u{6c}\u{69}\u{6e}\u{65}")),""))
2222local s,l = f()
23−assert(s == y and l == n)
24−end
25−lexstring("\u{27}\u{61}\u{62}\u{63}\u{5c}\u{7a}\u{20}\u{20}\u{a}\u{20}\u{20}\u{20}\u{65}\u{66}\u{67}\u{27}","\u{61}\u{62}\u{63}\u{65}\u{66}\u{67}",2)
26−lexstring("\u{27}\u{61}\u{62}\u{63}\u{5c}\u{7a}\u{20}\u{20}\u{a}\u{a}\u{a}\u{27}","\u{61}\u{62}\u{63}",4)
27−lexstring("\u{27}\u{5c}\u{7a}\u{20}\u{20}\u{a}\u{9}\u{c}\u{b}\u{a}\u{27}","",3)
28−lexstring("\u{5b}\u{5b}\u{a}\u{61}\u{6c}\u{6f}\u{a}\u{61}\u{6c}\u{6f}\u{a}\u{a}\u{5d}\u{5d}","\u{61}\u{6c}\u{6f}\u{a}\u{61}\u{6c}\u{6f}\u{a}\u{a}",5)
29−lexstring("\u{5b}\u{5b}\u{a}\u{61}\u{6c}\u{6f}\u{d}\u{61}\u{6c}\u{6f}\u{a}\u{a}\u{5d}\u{5d}","\u{61}\u{6c}\u{6f}\u{a}\u{61}\u{6c}\u{6f}\u{a}\u{a}",5)
30−lexstring("\u{5b}\u{5b}\u{a}\u{61}\u{6c}\u{6f}\u{d}\u{61}\u{6c}\u{6f}\u{d}\u{a}\u{5d}\u{5d}","\u{61}\u{6c}\u{6f}\u{a}\u{61}\u{6c}\u{6f}\u{a}",4)
31−lexstring("\u{5b}\u{5b}\u{d}\u{61}\u{6c}\u{6f}\u{a}\u{d}\u{61}\u{6c}\u{6f}\u{d}\u{a}\u{5d}\u{5d}","\u{61}\u{6c}\u{6f}\u{a}\u{61}\u{6c}\u{6f}\u{a}",4)
32−lexstring("\u{5b}\u{5b}\u{61}\u{6c}\u{6f}\u{5d}\u{a}\u{5d}\u{61}\u{6c}\u{6f}\u{5d}\u{5d}","\u{61}\u{6c}\u{6f}\u{5d}\u{a}\u{5d}\u{61}\u{6c}\u{6f}",2)
33−assert("\u{61}\u{62}\u{63}\u{64}\u{65}\u{66}\u{67}\u{68}\u{69}" == "\u{61}\u{62}\u{63}\u{64}\u{65}\u{66}\u{67}\u{68}\u{69}")
34−assert("\u{0}\u{0}\u{0}\u{0}" == string.char(0,0,0,0))
35−assert("\u{0}\u{7f}" == "\u{0}\u{7f}")
36−assert("\u{80}\u{7ff}" == "\u{c2}\u{80}\u{df}\u{bf}")
37−assert("\u{800}\u{ffff}" == "\u{e0}\u{a0}\u{80}\u{ef}\u{bf}\u{bf}")
38−assert("\u{10000}\u{1fffff}" == "\u{f0}\u{90}\u{80}\u{80}\u{f7}\u{bf}\u{bf}\u{bf}")
39−assert("\u{200000}\u{3ffffff}" == "\u{f8}\u{88}\u{80}\u{80}\u{80}\u{fb}\u{bf}\u{bf}\u{bf}\u{bf}")
40−assert("\u{4000000}\u{7fffffff}" == "\u{fc}\u{84}\u{80}\u{80}\u{80}\u{80}\u{fd}\u{bf}\u{bf}\u{bf}\u{bf}\u{bf}")
23+assert(((s == y) and (l == n)))
24+end
25+lexstring("\u{27}\u{61}\u{62}\u{63}\u{5c}\u{7a}\u{20}\u{20}\u{a}\u{20}\u{20}\u{20}\u{65}\u{66}\u{67}\u{27}","\u{61}\u{62}\u{63}\u{65}\u{66}\u{67}",0x2)
26+lexstring("\u{27}\u{61}\u{62}\u{63}\u{5c}\u{7a}\u{20}\u{20}\u{a}\u{a}\u{a}\u{27}","\u{61}\u{62}\u{63}",0x4)
27+lexstring("\u{27}\u{5c}\u{7a}\u{20}\u{20}\u{a}\u{9}\u{c}\u{b}\u{a}\u{27}","",0x3)
28+lexstring("\u{5b}\u{5b}\u{a}\u{61}\u{6c}\u{6f}\u{a}\u{61}\u{6c}\u{6f}\u{a}\u{a}\u{5d}\u{5d}","\u{61}\u{6c}\u{6f}\u{a}\u{61}\u{6c}\u{6f}\u{a}\u{a}",0x5)
29+lexstring("\u{5b}\u{5b}\u{a}\u{61}\u{6c}\u{6f}\u{d}\u{61}\u{6c}\u{6f}\u{a}\u{a}\u{5d}\u{5d}","\u{61}\u{6c}\u{6f}\u{a}\u{61}\u{6c}\u{6f}\u{a}\u{a}",0x5)
30+lexstring("\u{5b}\u{5b}\u{a}\u{61}\u{6c}\u{6f}\u{d}\u{61}\u{6c}\u{6f}\u{d}\u{a}\u{5d}\u{5d}","\u{61}\u{6c}\u{6f}\u{a}\u{61}\u{6c}\u{6f}\u{a}",0x4)
31+lexstring("\u{5b}\u{5b}\u{d}\u{61}\u{6c}\u{6f}\u{a}\u{d}\u{61}\u{6c}\u{6f}\u{d}\u{a}\u{5d}\u{5d}","\u{61}\u{6c}\u{6f}\u{a}\u{61}\u{6c}\u{6f}\u{a}",0x4)
32+lexstring("\u{5b}\u{5b}\u{61}\u{6c}\u{6f}\u{5d}\u{a}\u{5d}\u{61}\u{6c}\u{6f}\u{5d}\u{5d}","\u{61}\u{6c}\u{6f}\u{5d}\u{a}\u{5d}\u{61}\u{6c}\u{6f}",0x2)
33+assert(("\u{61}\u{62}\u{63}\u{64}\u{65}\u{66}\u{67}\u{68}\u{69}" == "\u{61}\u{62}\u{63}\u{64}\u{65}\u{66}\u{67}\u{68}\u{69}"))
34+assert(("\u{0}\u{0}\u{0}\u{0}" == string.char(0x0,0x0,0x0,0x0)))
35+assert(("\u{0}\u{7f}" == "\u{0}\u{7f}"))
36+assert(("\u{80}\u{7ff}" == "\u{c2}\u{80}\u{df}\u{bf}"))
37+assert(("\u{800}\u{ffff}" == "\u{e0}\u{a0}\u{80}\u{ef}\u{bf}\u{bf}"))
38+assert(("\u{10000}\u{1fffff}" == "\u{f0}\u{90}\u{80}\u{80}\u{f7}\u{bf}\u{bf}\u{bf}"))
39+assert(("\u{200000}\u{3ffffff}" == "\u{f8}\u{88}\u{80}\u{80}\u{80}\u{fb}\u{bf}\u{bf}\u{bf}\u{bf}"))
40+assert(("\u{4000000}\u{7fffffff}" == "\u{fc}\u{84}\u{80}\u{80}\u{80}\u{80}\u{fd}\u{bf}\u{bf}\u{bf}\u{bf}\u{bf}"))
4141local function lexerror
4242(s,err)
43−local st,msg = load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}" .. s,"")
44−if err ~= "\u{3c}\u{65}\u{6f}\u{66}\u{3e}" then
45−err=err .. "\u{27}"
43+local st,msg = load(("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}" .. s),"")
44+if (err ~= "\u{3c}\u{65}\u{6f}\u{66}\u{3e}") then
45+err=(err .. "\u{27}")
4646end
47−assert(not st and string.find(msg,"\u{6e}\u{65}\u{61}\u{72}\u{20}\u{2e}\u{2d}" .. err))
47+assert((not (st and string.find(msg,("\u{6e}\u{65}\u{61}\u{72}\u{20}\u{2e}\u{2d}" .. err)))))
4848end
4949lexerror("\u{22}\u{61}\u{62}\u{63}\u{5c}\u{78}\u{22}","\u{5c}\u{78}\u{22}")
5050lexerror("\u{22}\u{61}\u{62}\u{63}\u{5c}\u{78}","\u{5c}\u{78}")
@@ -76,24 +76,24 @@ lexerror("\u{27}\u{61}\u{6c}\u{6f}","\u{3c}\u{65}\u{6f}\u{66}\u{3e}")
7676lexerror("\u{27}\u{61}\u{6c}\u{6f}\u{20}\u{5c}\u{7a}\u{20}\u{20}\u{a}\u{a}","\u{3c}\u{65}\u{6f}\u{66}\u{3e}")
7777lexerror("\u{27}\u{61}\u{6c}\u{6f}\u{20}\u{5c}\u{7a}","\u{3c}\u{65}\u{6f}\u{66}\u{3e}")
7878lexerror("\u{27}\u{61}\u{6c}\u{6f}\u{20}\u{5c}\u{39}\u{38}","\u{3c}\u{65}\u{6f}\u{66}\u{3e}")
79−for i = 0, 255
79+for i = 0x0, 0xff
8080do
8181local s = string.char(i)
82−assert(not string.find(s,"\u{5b}\u{61}\u{2d}\u{7a}\u{41}\u{2d}\u{5a}\u{5f}\u{5d}") == not load(s .. "\u{3d}\u{31}",""))
83−assert(not string.find(s,"\u{5b}\u{61}\u{2d}\u{7a}\u{41}\u{2d}\u{5a}\u{5f}\u{30}\u{2d}\u{39}\u{5d}") == not load("\u{61}" .. s .. "\u{31}\u{20}\u{3d}\u{20}\u{31}",""))
82+assert((not (string.find(s,"\u{5b}\u{61}\u{2d}\u{7a}\u{41}\u{2d}\u{5a}\u{5f}\u{5d}") == (not load((s .. "\u{3d}\u{31}"),"")))))
83+assert((not (string.find(s,"\u{5b}\u{61}\u{2d}\u{7a}\u{41}\u{2d}\u{5a}\u{5f}\u{30}\u{2d}\u{39}\u{5d}") == (not load(("\u{61}" .. (s .. "\u{31}\u{20}\u{3d}\u{20}\u{31}")),"")))))
8484end
85−local var1 = string.rep("\u{61}",15000) .. "\u{31}"
86−local var2 = string.rep("\u{61}",15000) .. "\u{32}"
85+local var1 = (string.rep("\u{61}",0x3a98) .. "\u{31}")
86+local var2 = (string.rep("\u{61}",0x3a98) .. "\u{32}")
8787local prog = string.format("\u{20}\u{20}\u{25}\u{73}\u{20}\u{3d}\u{20}\u{35}\u{a}\u{20}\u{20}\u{25}\u{73}\u{20}\u{3d}\u{20}\u{25}\u{73}\u{20}\u{2b}\u{20}\u{31}\u{a}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{29}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{25}\u{73}\u{20}\u{2d}\u{20}\u{25}\u{73}\u{20}\u{65}\u{6e}\u{64}\u{a}",var1,var2,var1,var1,var2)
8888local f = dostring(prog)
89−assert(_G[var1] == 5 and _G[var2] == 6 and f() == - 1)
89+assert((((_G[var1] == 0x5) and (_G[var2] == 0x6)) and (f() == (- 0x1))))
9090_G[var1],_G[var2]=nil
9191print("\u{2b}")
92−assert("\u{a}\u{9}" == "\u{a}\u{9}")
93−assert("\u{a}\u{20}\u{24}\u{64}\u{65}\u{62}\u{75}\u{67}" == "\u{a}\u{20}\u{24}\u{64}\u{65}\u{62}\u{75}\u{67}")
94−assert("\u{20}\u{5b}\u{20}" ~= "\u{20}\u{5d}\u{20}")
92+assert(("\u{a}\u{9}" == "\u{a}\u{9}"))
93+assert(("\u{a}\u{20}\u{24}\u{64}\u{65}\u{62}\u{75}\u{67}" == "\u{a}\u{20}\u{24}\u{64}\u{65}\u{62}\u{75}\u{67}"))
94+assert(("\u{20}\u{5b}\u{20}" ~= "\u{20}\u{5d}\u{20}"))
9595local b = "\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}"
96−assert(string.len(b) == 960)
96+assert((string.len(b) == 0x3c0))
9797prog="\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{27}\u{2b}\u{27}\u{29}\u{a}\u{a}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{31}\u{20}\u{3d}\u{20}\u{5b}\u{5b}\u{22}\u{74}\u{68}\u{69}\u{73}\u{20}\u{69}\u{73}\u{20}\u{61}\u{20}\u{27}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{27}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{73}\u{65}\u{76}\u{65}\u{72}\u{61}\u{6c}\u{20}\u{27}\u{71}\u{75}\u{6f}\u{74}\u{65}\u{73}\u{27}\u{22}\u{5d}\u{5d}\u{a}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{32}\u{20}\u{3d}\u{20}\u{22}\u{27}\u{71}\u{75}\u{6f}\u{74}\u{65}\u{73}\u{27}\u{22}\u{a}\u{a}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{2e}\u{66}\u{69}\u{6e}\u{64}\u{28}\u{61}\u{31}\u{2c}\u{20}\u{61}\u{32}\u{29}\u{20}\u{3d}\u{3d}\u{20}\u{33}\u{34}\u{29}\u{a}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{27}\u{2b}\u{27}\u{29}\u{a}\u{a}\u{61}\u{31}\u{20}\u{3d}\u{20}\u{5b}\u{3d}\u{3d}\u{5b}\u{74}\u{65}\u{6d}\u{70}\u{20}\u{3d}\u{20}\u{5b}\u{5b}\u{61}\u{6e}\u{20}\u{61}\u{72}\u{62}\u{69}\u{74}\u{72}\u{61}\u{72}\u{79}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{5d}\u{5d}\u{3b}\u{20}\u{5d}\u{3d}\u{3d}\u{5d}\u{a}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{6c}\u{6f}\u{61}\u{64}\u{28}\u{61}\u{31}\u{29}\u{29}\u{28}\u{29}\u{a}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{74}\u{65}\u{6d}\u{70}\u{20}\u{3d}\u{3d}\u{20}\u{27}\u{61}\u{6e}\u{20}\u{61}\u{72}\u{62}\u{69}\u{74}\u{72}\u{61}\u{72}\u{79}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{27}\u{29}\u{a}\u{5f}\u{47}\u{2e}\u{74}\u{65}\u{6d}\u{70}\u{20}\u{3d}\u{20}\u{6e}\u{69}\u{6c}\u{a}\u{2d}\u{2d}\u{20}\u{6c}\u{6f}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{73}\u{20}\u{2d}\u{2d}\u{a}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{62}\u{20}\u{3d}\u{20}\u{22}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{22}\u{a}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{2e}\u{6c}\u{65}\u{6e}\u{28}\u{62}\u{29}\u{20}\u{3d}\u{3d}\u{20}\u{39}\u{36}\u{30}\u{29}\u{a}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{27}\u{2b}\u{27}\u{29}\u{a}\u{a}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{5b}\u{5b}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}\u{30}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{a}\u{5d}\u{5d}\u{a}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{2e}\u{6c}\u{65}\u{6e}\u{28}\u{61}\u{29}\u{20}\u{3d}\u{3d}\u{20}\u{31}\u{38}\u{36}\u{33}\u{29}\u{a}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{2e}\u{73}\u{75}\u{62}\u{28}\u{61}\u{2c}\u{20}\u{31}\u{2c}\u{20}\u{34}\u{30}\u{29}\u{20}\u{3d}\u{3d}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{2e}\u{73}\u{75}\u{62}\u{28}\u{62}\u{2c}\u{20}\u{31}\u{2c}\u{20}\u{34}\u{30}\u{29}\u{29}\u{a}\u{78}\u{20}\u{3d}\u{20}\u{31}\u{a}"
9898print("\u{2b}")
9999_G.x=nil
@@ -121,39 +121,39 @@ local function foo2
121121return "\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}"
122122end
123123local a1 = getadd(s1)
124−assert(a1 == getadd(s2))
125−assert(a1 == getadd(foo()))
126−assert(a1 == getadd(foo1()))
127−assert(a1 == getadd(foo2()))
128−local sd = "\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}" .. "\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}"
129−assert(sd == s1 and getadd(sd) ~= a1)
124+assert((a1 == getadd(s2)))
125+assert((a1 == getadd(foo())))
126+assert((a1 == getadd(foo1())))
127+assert((a1 == getadd(foo2())))
128+local sd = ("\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}" .. "\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}")
129+assert(((sd == s1) and (getadd(sd) ~= a1)))
130130end
131131prog="\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{31}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{61}\u{20}\u{63}\u{6f}\u{6d}\u{6d}\u{65}\u{6e}\u{74}\u{a}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{62}\u{20}\u{3d}\u{20}\u{32}\u{a}\u{a}\u{a}\u{78}\u{20}\u{3d}\u{20}\u{5b}\u{3d}\u{5b}\u{a}\u{68}\u{69}\u{a}\u{5d}\u{3d}\u{5d}\u{a}\u{79}\u{20}\u{3d}\u{20}\u{22}\u{5c}\u{a}\u{68}\u{65}\u{6c}\u{6c}\u{6f}\u{5c}\u{72}\u{5c}\u{6e}\u{5c}\u{a}\u{22}\u{a}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{22}\u{64}\u{65}\u{62}\u{75}\u{67}\u{22}\u{2e}\u{67}\u{65}\u{74}\u{69}\u{6e}\u{66}\u{6f}\u{28}\u{31}\u{29}\u{2e}\u{63}\u{75}\u{72}\u{72}\u{65}\u{6e}\u{74}\u{6c}\u{69}\u{6e}\u{65}\u{a}"
132132for _,n in pairs({"\u{a}","\u{d}","\u{a}\u{d}","\u{d}\u{a}"})
133133do
134134local prog,nn = string.gsub(prog,"\u{a}",n)
135−assert(dostring(prog) == nn)
136−assert(_G.x == "\u{68}\u{69}\u{a}" and _G.y == "\u{a}\u{68}\u{65}\u{6c}\u{6c}\u{6f}\u{d}\u{a}\u{a}")
135+assert((dostring(prog) == nn))
136+assert(((_G.x == "\u{68}\u{69}\u{a}") and (_G.y == "\u{a}\u{68}\u{65}\u{6c}\u{6c}\u{6f}\u{d}\u{a}\u{a}")))
137137end
138138_G.x,_G.y=nil
139139local a = "\u{5d}\u{3d}"
140−assert(a == "\u{5d}\u{3d}")
140+assert((a == "\u{5d}\u{3d}"))
141141a="\u{5b}\u{3d}\u{3d}\u{3d}\u{5b}\u{5b}\u{3d}\u{5b}\u{5d}\u{5d}\u{3d}\u{5d}\u{5b}\u{3d}\u{3d}\u{3d}\u{3d}\u{5b}\u{5d}\u{5d}\u{3d}\u{3d}\u{3d}\u{5d}\u{3d}\u{3d}\u{3d}"
142−assert(a == "\u{5b}\u{3d}\u{3d}\u{3d}\u{5b}\u{5b}\u{3d}\u{5b}\u{5d}\u{5d}\u{3d}\u{5d}\u{5b}\u{3d}\u{3d}\u{3d}\u{3d}\u{5b}\u{5d}\u{5d}\u{3d}\u{3d}\u{3d}\u{5d}\u{3d}\u{3d}\u{3d}")
142+assert((a == "\u{5b}\u{3d}\u{3d}\u{3d}\u{5b}\u{5b}\u{3d}\u{5b}\u{5d}\u{5d}\u{3d}\u{5d}\u{5b}\u{3d}\u{3d}\u{3d}\u{3d}\u{5b}\u{5d}\u{5d}\u{3d}\u{3d}\u{3d}\u{5d}\u{3d}\u{3d}\u{3d}"))
143143a="\u{5b}\u{3d}\u{3d}\u{3d}\u{5b}\u{5b}\u{3d}\u{5b}\u{5d}\u{5d}\u{3d}\u{5d}\u{5b}\u{3d}\u{3d}\u{3d}\u{3d}\u{5b}\u{5d}\u{5d}\u{3d}\u{3d}\u{3d}\u{5d}\u{3d}\u{3d}\u{3d}"
144−assert(a == "\u{5b}\u{3d}\u{3d}\u{3d}\u{5b}\u{5b}\u{3d}\u{5b}\u{5d}\u{5d}\u{3d}\u{5d}\u{5b}\u{3d}\u{3d}\u{3d}\u{3d}\u{5b}\u{5d}\u{5d}\u{3d}\u{3d}\u{3d}\u{5d}\u{3d}\u{3d}\u{3d}")
144+assert((a == "\u{5b}\u{3d}\u{3d}\u{3d}\u{5b}\u{5b}\u{3d}\u{5b}\u{5d}\u{5d}\u{3d}\u{5d}\u{5b}\u{3d}\u{3d}\u{3d}\u{3d}\u{5b}\u{5d}\u{5d}\u{3d}\u{3d}\u{3d}\u{5d}\u{3d}\u{3d}\u{3d}"))
145145a="\u{5d}\u{5d}\u{5d}\u{5d}\u{5d}\u{5d}\u{5d}\u{5d}"
146−assert(a == "\u{5d}\u{5d}\u{5d}\u{5d}\u{5d}\u{5d}\u{5d}\u{5d}")
146+assert((a == "\u{5d}\u{5d}\u{5d}\u{5d}\u{5d}\u{5d}\u{5d}\u{5d}"))
147147local x = {"\u{3d}","\u{5b}","\u{5d}","\u{a}"}
148−local len = 4
148+local len = 0x4
149149local function gen
150150(c,n)
151−if n == 0 then
151+if (n == 0x0) then
152152coroutine.yield(c)
153153else
154154for _,a in pairs(x)
155155do
156−gen(c .. a,n - 1)
156+gen((c .. a),(n - 0x1))
157157end
158158end
159159end
@@ -161,20 +161,20 @@ for s in coroutine.wrap(function ()
161161gen("",len)
162162end)
163163do
164−assert(s == load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{5b}\u{3d}\u{3d}\u{3d}\u{3d}\u{5b}\u{a}" .. s .. "\u{5d}\u{3d}\u{3d}\u{3d}\u{3d}\u{5d}","")())
165−end
166−if os.setlocale("\u{70}\u{74}\u{5f}\u{42}\u{52}") or os.setlocale("\u{70}\u{74}\u{62}") then
167−assert(tonumber("\u{33}\u{2c}\u{34}") == 3.4 and tonumber("\u{33}\u{2e}\u{34}") == 3.4)
168−assert(tonumber("\u{20}\u{20}\u{2d}\u{2e}\u{34}\u{20}\u{20}") == - 0.4)
169−assert(tonumber("\u{20}\u{20}\u{2b}\u{30}\u{78}\u{2e}\u{34}\u{31}\u{20}\u{20}") == 0.25390625)
170−assert(not load("\u{61}\u{20}\u{3d}\u{20}\u{28}\u{33}\u{2c}\u{34}\u{29}"))
171−assert(assert(load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}\u{2e}\u{34}"))() == 3.4)
172−assert(assert(load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2e}\u{34}\u{2c}\u{33}"))() == 0.4)
173−assert(assert(load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{34}\u{2e}"))() == 4.0)
174−assert(assert(load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{34}\u{2e}\u{2b}\u{2e}\u{35}"))() == 4.5)
175−assert("\u{20}\u{30}\u{78}\u{2e}\u{31}\u{20}" + "\u{20}\u{30}\u{78}\u{2c}\u{31}" + "\u{2d}\u{30}\u{58}\u{2e}\u{31}\u{9}" == 0.0625)
176−assert(not tonumber("\u{69}\u{6e}\u{66}") and not tonumber("\u{4e}\u{41}\u{4e}"))
177−assert(assert(load(string.format("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{25}\u{71}",4.51)))() == 4.51)
164+assert((s == load(("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{5b}\u{3d}\u{3d}\u{3d}\u{3d}\u{5b}\u{a}" .. (s .. "\u{5d}\u{3d}\u{3d}\u{3d}\u{3d}\u{5d}")),"")()))
165+end
166+if (os.setlocale("\u{70}\u{74}\u{5f}\u{42}\u{52}") or os.setlocale("\u{70}\u{74}\u{62}")) then
167+assert(((tonumber("\u{33}\u{2c}\u{34}") == 3.4) and (tonumber("\u{33}\u{2e}\u{34}") == 3.4)))
168+assert((tonumber("\u{20}\u{20}\u{2d}\u{2e}\u{34}\u{20}\u{20}") == (- 0.4)))
169+assert((tonumber("\u{20}\u{20}\u{2b}\u{30}\u{78}\u{2e}\u{34}\u{31}\u{20}\u{20}") == 0.25390625))
170+assert((not load("\u{61}\u{20}\u{3d}\u{20}\u{28}\u{33}\u{2c}\u{34}\u{29}")))
171+assert((assert(load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{33}\u{2e}\u{34}"))() == 3.4))
172+assert((assert(load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2e}\u{34}\u{2c}\u{33}"))() == 0.4))
173+assert((assert(load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{34}\u{2e}"))() == 4.0))
174+assert((assert(load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{34}\u{2e}\u{2b}\u{2e}\u{35}"))() == 4.5))
175+assert(((("\u{20}\u{30}\u{78}\u{2e}\u{31}\u{20}" + "\u{20}\u{30}\u{78}\u{2c}\u{31}") + "\u{2d}\u{30}\u{58}\u{2e}\u{31}\u{9}") == 0.0625))
176+assert((not (tonumber("\u{69}\u{6e}\u{66}") and (not tonumber("\u{4e}\u{41}\u{4e}")))))
177+assert((assert(load(string.format("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{25}\u{71}",4.51)))() == 4.51))
178178local a,b = load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{34}\u{2e}\u{35}\u{2e}")
179179assert(string.find(b,"\u{27}\u{34}\u{25}\u{2e}\u{35}\u{25}\u{2e}\u{27}"))
180180assert(os.setlocale("\u{43}"))
@@ -183,15 +183,15 @@ else
183183end
184184local s = "\u{61}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{d}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{a}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{d}\u{a}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{a}\u{d}"
185185local c = string.format("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{25}\u{71}",s)
186−assert(assert(load(c))() == s)
187−assert(not load("\u{61}\u{20}\u{3d}\u{20}\u{27}\u{6e}\u{6f}\u{6e}\u{2d}\u{65}\u{6e}\u{64}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"))
188−assert(not load("\u{61}\u{20}\u{3d}\u{20}\u{27}\u{6e}\u{6f}\u{6e}\u{2d}\u{65}\u{6e}\u{64}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{a}\u{27}"))
189−assert(not load("\u{61}\u{20}\u{3d}\u{20}\u{27}\u{5c}\u{33}\u{34}\u{35}\u{27}"))
190−assert(not load("\u{61}\u{20}\u{3d}\u{20}\u{5b}\u{3d}\u{78}\u{5d}"))
186+assert((assert(load(c))() == s))
187+assert((not load("\u{61}\u{20}\u{3d}\u{20}\u{27}\u{6e}\u{6f}\u{6e}\u{2d}\u{65}\u{6e}\u{64}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")))
188+assert((not load("\u{61}\u{20}\u{3d}\u{20}\u{27}\u{6e}\u{6f}\u{6e}\u{2d}\u{65}\u{6e}\u{64}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{a}\u{27}")))
189+assert((not load("\u{61}\u{20}\u{3d}\u{20}\u{27}\u{5c}\u{33}\u{34}\u{35}\u{27}")))
190+assert((not load("\u{61}\u{20}\u{3d}\u{20}\u{5b}\u{3d}\u{78}\u{5d}")))
191191local function malformednum
192192(n,exp)
193−local s,msg = load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}" .. n)
194−assert(not s and string.find(msg,exp))
193+local s,msg = load(("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}" .. n))
194+assert((not (s and string.find(msg,exp))))
195195end
196196malformednum("\u{30}\u{78}\u{65}\u{2d}","\u{6e}\u{65}\u{61}\u{72}\u{20}\u{3c}\u{65}\u{6f}\u{66}\u{3e}")
197197malformednum("\u{30}\u{78}\u{65}\u{70}\u{2d}\u{70}","\u{6d}\u{61}\u{6c}\u{66}\u{6f}\u{72}\u{6d}\u{65}\u{64}\u{20}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")
zod/luau/res/lua/cycled/locals.lua → desk/res/lua/cycled/locals.luarenamed+303−303
@@ -7,14 +7,14 @@ x=nil
77;
88return x
99end
10−assert(f(10) == nil)
10+assert((f(0xa) == nil))
1111local function f
1212()
1313local x
1414;
1515return x
1616end
17−assert(f(10) == nil)
17+assert((f(0xa) == nil))
1818local function f
1919(x)
2020x=nil
@@ -23,106 +23,106 @@ local y
2323;
2424return x,y
2525end
26−assert(f(10) == nil and select(2,f(20)) == nil)
26+assert(((f(0xa) == nil) and (select(0x2,f(0x14)) == nil)))
2727do
28−local i = 10
28+local i = 0xa
2929do
30−local i = 100
30+local i = 0x64
3131;
32−assert(i == 100)
32+assert((i == 0x64))
3333end
3434do
35−local i = 1000
35+local i = 0x3e8
3636;
37−assert(i == 1000)
37+assert((i == 0x3e8))
3838end
39−assert(i == 10)
40−if i ~= 10 then
41−local i = 20
39+assert((i == 0xa))
40+if (i ~= 0xa) then
41+local i = 0x14
4242else
43−local i = 30
44−assert(i == 30)
43+local i = 0x1e
44+assert((i == 0x1e))
4545end
4646end
4747f=nil
4848local f
49−local x = 1
49+local x = 0x1
5050a=nil
5151load("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{7b}\u{7d}")()
52−assert(a == nil)
52+assert((a == nil))
5353function f(a)
5454local _1,_2,_3,_4,_5
5555local _6,_7,_8,_9,_10
56−local x = 3
56+local x = 0x3
5757local b = a
5858local c,d = a,b
5959if (d == b) then
6060local x = "\u{71}"
6161x=b
62−assert(x == 2)
62+assert((x == 0x2))
6363else
6464assert(nil)
6565end
66−assert(x == 3)
67−local f = 10
66+assert((x == 0x3))
67+local f = 0xa
6868end
69−local b = 10
69+local b = 0xa
7070local a
7171;
7272repeat
7373local b
7474;
75−a,b=1,2
75+a,b=0x1,0x2
7676;
77−assert(a + 1 == b)
77+assert(((a + 0x1) == b))
7878;
79−until a + b == 3
80−assert(x == 1)
81−f(2)
82−assert(type(f) == "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}")
79+until ((a + b) == 0x3)
80+assert((x == 0x1))
81+f(0x2)
82+assert((type(f) == "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}"))
8383local function getenv
8484(f)
85−local a,b = debug.getupvalue(f,1)
86−assert(a == "\u{5f}\u{45}\u{4e}\u{56}")
85+local a,b = debug.getupvalue(f,0x1)
86+assert((a == "\u{5f}\u{45}\u{4e}\u{56}"))
8787return b
8888end
89−assert(getenv(load("\u{61}\u{3d}\u{33}")) == _G)
89+assert((getenv(load("\u{61}\u{3d}\u{33}")) == _G))
9090local c = {}
9191;
9292local f = load("\u{61}\u{20}\u{3d}\u{20}\u{33}",nil,nil,c)
93−assert(getenv(f) == c)
94−assert(c.a == nil)
93+assert((getenv(f) == c))
94+assert((c.a == nil))
9595f()
96−assert(c.a == 3)
96+assert((c.a == 0x3))
9797do
98−local i = 2
99−local p = 4
98+local i = 0x2
99+local p = 0x4
100100repeat
101−for j = - 3, 3
101+for j = (- 0x3), 0x3
102102do
103−assert(load(string.format("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{3d}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{3d}\u{61}\u{2b}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{61}\u{20}\u{3d}\u{3d}\u{32}\u{5e}\u{25}\u{73}\u{29}",j,p - j,i),""))()
104−assert(load(string.format("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{3d}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{3d}\u{61}\u{2d}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{61}\u{3d}\u{3d}\u{2d}\u{32}\u{5e}\u{25}\u{73}\u{29}",- j,p - j,i),""))()
105−assert(load(string.format("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{2c}\u{62}\u{3d}\u{30}\u{2c}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{3d}\u{62}\u{2d}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{61}\u{3d}\u{3d}\u{2d}\u{32}\u{5e}\u{25}\u{73}\u{29}",- j,p - j,i),""))()
103+assert(load(string.format("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{3d}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{3d}\u{61}\u{2b}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{61}\u{20}\u{3d}\u{3d}\u{32}\u{5e}\u{25}\u{73}\u{29}",j,(p - j),i),""))()
104+assert(load(string.format("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{3d}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{3d}\u{61}\u{2d}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{61}\u{3d}\u{3d}\u{2d}\u{32}\u{5e}\u{25}\u{73}\u{29}",(- j),(p - j),i),""))()
105+assert(load(string.format("\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{2c}\u{62}\u{3d}\u{30}\u{2c}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{3d}\u{62}\u{2d}\u{25}\u{73}\u{3b}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{61}\u{3d}\u{3d}\u{2d}\u{32}\u{5e}\u{25}\u{73}\u{29}",(- j),(p - j),i),""))()
106106end
107−p=2 * p
107+p=(0x2 * p)
108108;
109−i=i + 1
110−until p <= 0
109+i=(i + 0x1)
110+until (p <= 0x0)
111111end
112112print("\u{2b}")
113113if rawget(_G,"\u{54}") then
114114collectgarbage("\u{73}\u{74}\u{6f}\u{70}")
115−local a = {[{}] = 4,[3] = 0,["\u{61}\u{6c}\u{6f}"] = 1,["\u{61}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}"] = 10}
115+local a = {[{}] = 0x4,[0x3] = 0x0,["\u{61}\u{6c}\u{6f}"] = 0x1,["\u{61}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}"] = 0xa}
116116local t = T.querytab(a)
117117for k,_ in pairs(a)
118118do
119119a[k]=undef
120120end
121121collectgarbage()
122−for i = 0, t - 1
122+for i = 0x0, (t - 0x1)
123123do
124124local k = querytab(a,i)
125−assert(k == nil or type(k) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}" or k == "\u{61}\u{6c}\u{6f}")
125+assert((((k == nil) or (type(k) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}")) or (k == "\u{61}\u{6c}\u{6f}")))
126126end
127127local a = {}
128128local function additems
@@ -132,28 +132,28 @@ a.x=true
132132a.y=true
133133;
134134a.z=true
135−a[1]=true
136−a[2]=true
135+a[0x1]=true
136+a[0x2]=true
137137end
138−for i = 1, math.huge
138+for i = 0x1, math.huge
139139do
140140T.alloccount(i)
141141local st,msg = pcall(additems)
142142T.alloccount()
143−local count = 0
143+local count = 0x0
144144for k,v in pairs(a)
145145do
146−assert(a[k] == v)
147−count=count + 1
146+assert((a[k] == v))
147+count=(count + 0x1)
148148end
149149if st then
150−assert(count == 5)
150+assert((count == 0x5))
151151;
152152break
153153end
154154end
155155end
156−assert(_ENV == _G)
156+assert((_ENV == _G))
157157do
158158local dummy
159159local _ENV = (function (...)
@@ -174,41 +174,41 @@ A=x
174174do
175175local _ENV = _G
176176;
177−A=1000
177+A=0x3e8
178178end
179179return function (x)
180−return A .. x
180+return (A .. x)
181181end
182182end
183183end
184−assert(getenv(foo) == mt)
184+assert((getenv(foo) == mt))
185185x=foo("\u{68}\u{69}")
186186;
187−assert(mt.A == "\u{68}\u{69}" and A == 1000)
188−assert(x("\u{2a}") == mt.A .. "\u{2a}")
187+assert(((mt.A == "\u{68}\u{69}") and (A == 0x3e8)))
188+assert((x("\u{2a}") == (mt.A .. "\u{2a}")))
189189do
190−local _ENV = {["\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}"] = assert,["\u{41}"] = 10}
190+local _ENV = {["\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}"] = assert,["\u{41}"] = 0xa}
191191;
192192do
193−local _ENV = {["\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}"] = assert,["\u{41}"] = 20}
193+local _ENV = {["\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}"] = assert,["\u{41}"] = 0x14}
194194;
195−assert(A == 20)
195+assert((A == 0x14))
196196;
197197x=A
198198end
199−assert(A == 10 and x == 20)
199+assert(((A == 0xa) and (x == 0x14)))
200200end
201−assert(x == 20)
201+assert((x == 0x14))
202202A=nil
203203do
204−local a <const>,b,c <const> = 10,20,30
205−b=a + c + b
206−assert(a == 10 and b == 60 and c == 30)
204+local a <const>,b,c <const> = 0xa,0x14,0x1e
205+b=((a + c) + b)
206+assert((((a == 0xa) and (b == 0x3c)) and (c == 0x1e)))
207207local function checkro
208208(name,code)
209209local st,msg = load(code)
210210local gab = string.format("\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{61}\u{73}\u{73}\u{69}\u{67}\u{6e}\u{20}\u{74}\u{6f}\u{20}\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{20}\u{76}\u{61}\u{72}\u{69}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{27}\u{25}\u{73}\u{27}",name)
211−assert(not st and string.find(msg,gab))
211+assert((not (st and string.find(msg,gab))))
212212end
213213checkro("\u{79}","\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{78}\u{2c}\u{20}\u{79}\u{20}\u{3c}\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{3e}\u{2c}\u{20}\u{7a}\u{20}\u{3d}\u{20}\u{31}\u{30}\u{2c}\u{20}\u{32}\u{30}\u{2c}\u{20}\u{33}\u{30}\u{3b}\u{20}\u{78}\u{20}\u{3d}\u{20}\u{31}\u{31}\u{3b}\u{20}\u{79}\u{20}\u{3d}\u{20}\u{31}\u{32}")
214214checkro("\u{78}","\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{78}\u{20}\u{3c}\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{3e}\u{2c}\u{20}\u{79}\u{2c}\u{20}\u{7a}\u{20}\u{3c}\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{3e}\u{20}\u{3d}\u{20}\u{31}\u{30}\u{2c}\u{20}\u{32}\u{30}\u{2c}\u{20}\u{33}\u{30}\u{3b}\u{20}\u{78}\u{20}\u{3d}\u{20}\u{31}\u{31}")
@@ -221,7 +221,7 @@ end
221221print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{6f}\u{2d}\u{62}\u{65}\u{2d}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{20}\u{76}\u{61}\u{72}\u{69}\u{61}\u{62}\u{6c}\u{65}\u{73}")
222222local function stack
223223(n)
224−n=((n == 0) or stack(n - 1))
224+n=((n == 0x0) or stack((n - 0x1)))
225225end
226226local function func2close
227227(f,x,y)
@@ -237,61 +237,61 @@ local a = {}
237237do
238238local b <close> = false
239239local x <close> = setmetatable({"\u{78}"},{["\u{5f}\u{5f}\u{63}\u{6c}\u{6f}\u{73}\u{65}"] = function (self)
240−a[# a + 1]=self[1]
240+a[(# (a + 0x1))]=self[0x1]
241241end})
242242local w,y <close>,z = func2close(function (self,err)
243−assert(err == nil)
243+assert((err == nil))
244244;
245−a[# a + 1]="\u{79}"
246−end,10,20)
245+a[(# (a + 0x1))]="\u{79}"
246+end,0xa,0x14)
247247local c <close> = nil
248−a[# a + 1]="\u{69}\u{6e}"
249−assert(w == 10 and z == 20)
248+a[(# (a + 0x1))]="\u{69}\u{6e}"
249+assert(((w == 0xa) and (z == 0x14)))
250250end
251−a[# a + 1]="\u{6f}\u{75}\u{74}"
252−assert(a[1] == "\u{69}\u{6e}" and a[2] == "\u{79}" and a[3] == "\u{78}" and a[4] == "\u{6f}\u{75}\u{74}")
251+a[(# (a + 0x1))]="\u{6f}\u{75}\u{74}"
252+assert(((((a[0x1] == "\u{69}\u{6e}") and (a[0x2] == "\u{79}")) and (a[0x3] == "\u{78}")) and (a[0x4] == "\u{6f}\u{75}\u{74}")))
253253end
254254do
255255local X = false
256256local x,closescope = func2close(function (_,msg)
257−stack(10)
257+stack(0xa)
258258;
259−assert(msg == nil)
259+assert((msg == nil))
260260X=true
261−end,100)
262−assert(x == 100)
261+end,0x64)
262+assert((x == 0x64))
263263;
264−x=101
264+x=0x65
265265;
266266local function foo
267267(x)
268268local _ <close> = closescope
269−return x,X,23
269+return x,X,0x17
270270end
271271local a,b,c = foo(1.5)
272−assert(a == 1.5 and b == false and c == 23 and X == true)
272+assert(((((a == 1.5) and (b == false)) and (c == 0x17)) and (X == true)))
273273X=false
274274foo=function (x)
275275local _ <close> = func2close(function (_,msg)
276−assert(debug.getinfo(2).name == "\u{66}\u{6f}\u{6f}")
277−assert(msg == nil)
276+assert((debug.getinfo(0x2).name == "\u{66}\u{6f}\u{6f}"))
277+assert((msg == nil))
278278end)
279279local _ <close> = closescope
280−local y = 15
280+local y = 0xf
281281return y
282282end
283−assert(foo() == 15 and X == true)
283+assert(((foo() == 0xf) and (X == true)))
284284X=false
285285foo=function ()
286286local x <close> = closescope
287287return x
288288end
289−assert(foo() == closescope and X == true)
289+assert(((foo() == closescope) and (X == true)))
290290end
291291do
292292local flag = false
293293local x = setmetatable({},{["\u{5f}\u{5f}\u{63}\u{6c}\u{6f}\u{73}\u{65}"] = function ()
294−assert(flag == false)
294+assert((flag == false))
295295;
296296flag=true
297297end})
@@ -305,21 +305,21 @@ end
305305do
306306local flag = false
307307local x = setmetatable({},{["\u{5f}\u{5f}\u{63}\u{6c}\u{6f}\u{73}\u{65}"] = function ()
308−assert(flag == false)
308+assert((flag == false))
309309;
310310flag=true
311311end})
312312local function a
313313()
314−return (function ()
314+return function ()
315315return nil
316−end),nil,nil,x
316+end,nil,nil,x
317317end
318−local v <const> = 1
319−local w <const> = 1
320−local x <const> = 1
321−local y <const> = 1
322−local z <const> = 1
318+local v <const> = 0x1
319+local w <const> = 0x1
320+local x <const> = 0x1
321+local y <const> = 0x1
322+local z <const> = 0x1
323323for k in a()
324324do
325325a=k
@@ -331,10 +331,10 @@ local X,Y
331331local function foo
332332()
333333local _ <close> = func2close(function ()
334−Y=10
334+Y=0xa
335335end)
336−assert(X == true and Y == nil)
337−return 1,2,3
336+assert(((X == true) and (Y == nil)))
337+return 0x1,0x2,0x3
338338end
339339local function bar
340340()
@@ -347,7 +347,7 @@ return foo()
347347end
348348end
349349local a,b,c,d = bar()
350−assert(a == 1 and b == 2 and c == 3 and X == false and Y == 10 and d == nil)
350+assert(((((((a == 0x1) and (b == 0x2)) and (c == 0x3)) and (X == false)) and (Y == 0xa)) and (d == nil)))
351351end
352352do
353353local closed = false
@@ -355,7 +355,7 @@ local function foo
355355()
356356return function ()
357357return true
358−end,0,0,func2close(function ()
358+end,0x0,0x0,func2close(function ()
359359closed=true
360360end)
361361end
@@ -370,8 +370,8 @@ do
370370return tail()
371371end
372372end
373−assert(foo1() == false)
374−assert(closed == true)
373+assert((foo1() == false))
374+assert((closed == true))
375375end
376376do
377377local closed = false
@@ -411,21 +411,21 @@ assert(string.find(msg,"\u{40}\u{7a}"))
411411error("\u{40}\u{79}")
412412end)
413413local z <close> = func2close(function (self,msg)
414−assert(msg == nil)
414+assert((msg == nil))
415415error("\u{40}\u{7a}")
416416end)
417−return 200
417+return 0xc8
418418end
419419local stat,msg = pcall(foo,false)
420420assert(string.find(msg,"\u{40}\u{78}"))
421421local function foo
422422()
423423local x <close> = func2close(function (self,msg)
424−assert(debug.getinfo(2).name == "\u{70}\u{63}\u{61}\u{6c}\u{6c}")
424+assert((debug.getinfo(0x2).name == "\u{70}\u{63}\u{61}\u{6c}\u{6c}"))
425425assert(string.find(msg,"\u{40}\u{78}\u{31}"))
426426end)
427427local x1 <close> = func2close(function (self,msg)
428−assert(debug.getinfo(2).name == "\u{70}\u{63}\u{61}\u{6c}\u{6c}")
428+assert((debug.getinfo(0x2).name == "\u{70}\u{63}\u{61}\u{6c}\u{6c}"))
429429assert(string.find(msg,"\u{40}\u{79}"))
430430error("\u{40}\u{78}\u{31}")
431431end)
@@ -433,18 +433,18 @@ local gc <close> = func2close(function ()
433433collectgarbage()
434434end)
435435local y <close> = func2close(function (self,msg)
436−assert(debug.getinfo(2).name == "\u{70}\u{63}\u{61}\u{6c}\u{6c}")
436+assert((debug.getinfo(0x2).name == "\u{70}\u{63}\u{61}\u{6c}\u{6c}"))
437437assert(string.find(msg,"\u{40}\u{7a}"))
438438error("\u{40}\u{79}")
439439end)
440440local first = true
441441local z <close> = func2close(function (self,msg)
442−assert(debug.getinfo(2).name == "\u{70}\u{63}\u{61}\u{6c}\u{6c}")
443−assert(first and msg == 4)
442+assert((debug.getinfo(0x2).name == "\u{70}\u{63}\u{61}\u{6c}\u{6c}"))
443+assert((first and (msg == 0x4)))
444444first=false
445445error("\u{40}\u{7a}")
446446end)
447−error(4)
447+error(0x4)
448448end
449449local stat,msg = pcall(foo,true)
450450assert(string.find(msg,"\u{40}\u{78}\u{31}"))
@@ -456,7 +456,7 @@ assert(string.find(msg,"\u{40}\u{58}"))
456456error("\u{40}\u{59}")
457457end)
458458local x123 <close> = func2close(function (_,msg)
459−assert(msg == nil)
459+assert((msg == nil))
460460error("\u{40}\u{58}")
461461end)
462462end
@@ -481,29 +481,29 @@ local x <close> = {}
481481os.exit(false)
482482end
483483local stat,msg = pcall(foo)
484−assert(not stat and string.find(msg,"\u{76}\u{61}\u{72}\u{69}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{27}\u{78}\u{27}\u{20}\u{67}\u{6f}\u{74}\u{20}\u{61}\u{20}\u{6e}\u{6f}\u{6e}\u{25}\u{2d}\u{63}\u{6c}\u{6f}\u{73}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}"))
484+assert((not (stat and string.find(msg,"\u{76}\u{61}\u{72}\u{69}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{27}\u{78}\u{27}\u{20}\u{67}\u{6f}\u{74}\u{20}\u{61}\u{20}\u{6e}\u{6f}\u{6e}\u{25}\u{2d}\u{63}\u{6c}\u{6f}\u{73}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}"))))
485485local function foo
486486()
487487local xyz <close> = setmetatable({},{["\u{5f}\u{5f}\u{63}\u{6c}\u{6f}\u{73}\u{65}"] = print})
488488getmetatable(xyz).__close=nil
489489end
490490local stat,msg = pcall(foo)
491−assert(not stat and string.find(msg,"\u{6d}\u{65}\u{74}\u{61}\u{6d}\u{65}\u{74}\u{68}\u{6f}\u{64}\u{20}\u{27}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{27}"))
491+assert((not (stat and string.find(msg,"\u{6d}\u{65}\u{74}\u{61}\u{6d}\u{65}\u{74}\u{68}\u{6f}\u{64}\u{20}\u{27}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{27}"))))
492492local function foo
493493()
494494local a1 <close> = func2close(function (_,msg)
495495assert(string.find(msg,"\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}"))
496−error(12)
496+error(0xc)
497497end)
498498local a2 <close> = setmetatable({},{["\u{5f}\u{5f}\u{63}\u{6c}\u{6f}\u{73}\u{65}"] = print})
499499local a3 <close> = func2close(function (_,msg)
500−assert(msg == nil)
501−error(123)
500+assert((msg == nil))
501+error(0x7b)
502502end)
503−getmetatable(a2).__close=4
503+getmetatable(a2).__close=0x4
504504end
505505local stat,msg = pcall(foo)
506−assert(not stat and msg == 12)
506+assert((not (stat and (msg == 0xc))))
507507end
508508do
509509local track = {}
@@ -511,58 +511,58 @@ local function foo
511511()
512512local x <close> = func2close(function ()
513513local xx <close> = func2close(function (_,msg)
514−assert(msg == nil)
515−track[# track + 1]="\u{78}\u{78}"
514+assert((msg == nil))
515+track[(# (track + 0x1))]="\u{78}\u{78}"
516516end)
517−track[# track + 1]="\u{78}"
517+track[(# (track + 0x1))]="\u{78}"
518518end)
519−track[# track + 1]="\u{66}\u{6f}\u{6f}"
520−return 20,30,40
519+track[(# (track + 0x1))]="\u{66}\u{6f}\u{6f}"
520+return 0x14,0x1e,0x28
521521end
522522local a,b,c,d = foo()
523−assert(a == 20 and b == 30 and c == 40 and d == nil)
524−assert(track[1] == "\u{66}\u{6f}\u{6f}" and track[2] == "\u{78}" and track[3] == "\u{78}\u{78}")
523+assert(((((a == 0x14) and (b == 0x1e)) and (c == 0x28)) and (d == nil)))
524+assert((((track[0x1] == "\u{66}\u{6f}\u{6f}") and (track[0x2] == "\u{78}")) and (track[0x3] == "\u{78}\u{78}")))
525525local track = {}
526526local function foo
527527()
528528local x0 <close> = func2close(function (_,msg)
529−assert(msg == 202)
530−track[# track + 1]="\u{78}\u{30}"
529+assert((msg == 0xca))
530+track[(# (track + 0x1))]="\u{78}\u{30}"
531531end)
532532local x <close> = func2close(function ()
533533local xx <close> = func2close(function (_,msg)
534−assert(msg == 101)
535−track[# track + 1]="\u{78}\u{78}"
536−error(202)
534+assert((msg == 0x65))
535+track[(# (track + 0x1))]="\u{78}\u{78}"
536+error(0xca)
537537end)
538−track[# track + 1]="\u{78}"
539−error(101)
538+track[(# (track + 0x1))]="\u{78}"
539+error(0x65)
540540end)
541−track[# track + 1]="\u{66}\u{6f}\u{6f}"
542−return 20,30,40
541+track[(# (track + 0x1))]="\u{66}\u{6f}\u{6f}"
542+return 0x14,0x1e,0x28
543543end
544544local st,msg = pcall(foo)
545−assert(not st and msg == 202)
546−assert(track[1] == "\u{66}\u{6f}\u{6f}" and track[2] == "\u{78}" and track[3] == "\u{78}\u{78}" and track[4] == "\u{78}\u{30}")
545+assert((not (st and (msg == 0xca))))
546+assert(((((track[0x1] == "\u{66}\u{6f}\u{6f}") and (track[0x2] == "\u{78}")) and (track[0x3] == "\u{78}\u{78}")) and (track[0x4] == "\u{78}\u{30}")))
547547end
548548local function checktable
549549(t1,t2)
550−assert(# t1 == # t2)
551−for i = 1, # t1
550+assert((# (t1 == (# t2))))
551+for i = 0x1, (# t1)
552552do
553−assert(t1[i] == t2[i])
553+assert((t1[i] == t2[i]))
554554end
555555end
556556do
557557local function overflow
558558(n)
559−overflow(n + 1)
559+overflow((n + 0x1))
560560end
561561local function errorh
562562(m)
563563assert(string.find(m,"\u{73}\u{74}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}"))
564564local x <close> = func2close(function (o)
565−o[1]=10
565+o[0x1]=0xa
566566end)
567567return x
568568end
@@ -570,16 +570,16 @@ local flag
570570local st,obj
571571local co = coroutine.wrap(function ()
572572local y <close> = func2close(function (obj,msg)
573−assert(msg == nil)
574−obj[1]=100
573+assert((msg == nil))
574+obj[0x1]=0x64
575575flag=obj
576576end)
577577tracegc.stop()
578−st,obj=xpcall(overflow,errorh,0)
578+st,obj=xpcall(overflow,errorh,0x0)
579579tracegc.start()
580580end)
581581co()
582−assert(not st and obj[1] == 10 and flag[1] == 100)
582+assert((not ((st and (obj[0x1] == 0xa)) and (flag[0x1] == 0x64))))
583583end
584584if rawget(_G,"\u{54}") then
585585do
@@ -590,15 +590,15 @@ collectgarbage()
590590collectgarbage()
591591local function loop
592592(n)
593−if n < 400 then
594−loop(n + 1)
593+if (n < 0x190) then
594+loop((n + 0x1))
595595end
596596end
597597local o = setmetatable({},{["\u{5f}\u{5f}\u{63}\u{6c}\u{6f}\u{73}\u{65}"] = function ()
598−loop(0)
598+loop(0x0)
599599end})
600600local script = "\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{32}\u{3b}\u{20}\u{73}\u{65}\u{74}\u{74}\u{6f}\u{70}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}"
601−assert(T.testC(script,o) == script)
601+assert((T.testC(script,o) == script))
602602end
603603local function foo
604604()
@@ -606,15 +606,15 @@ local y <close> = func2close(function ()
606606T.alloccount()
607607end)
608608local x <close> = setmetatable({},{["\u{5f}\u{5f}\u{63}\u{6c}\u{6f}\u{73}\u{65}"] = function ()
609−T.alloccount(0)
609+T.alloccount(0x0)
610610;
611611local x = {}
612612end})
613−error(1000)
613+error(0x3e8)
614614end
615−stack(5)
615+stack(0x5)
616616local _,msg = pcall(foo)
617−assert(msg == "\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}")
617+assert((msg == "\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}"))
618618local closemsg
619619local close = func2close(function (self,msg)
620620T.alloccount()
@@ -622,46 +622,46 @@ closemsg=msg
622622end)
623623local function enter
624624(count)
625−stack(10)
625+stack(0xa)
626626T.alloccount(count)
627627closemsg=nil
628628return close
629629end
630630local function test
631631()
632−local x <close> = enter(0)
632+local x <close> = enter(0x0)
633633local y = {}
634634end
635635local _,msg = pcall(test)
636−assert(msg == "\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}" and closemsg == "\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}")
636+assert(((msg == "\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}") and (closemsg == "\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}")))
637637local function test
638638()
639639local xxx <close> = func2close(function (self,msg)
640−assert(msg == "\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}")
640+assert((msg == "\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}"))
641641;
642−error(1000)
642+error(0x3e8)
643643end)
644644local xx <close> = func2close(function (self,msg)
645−assert(msg == "\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}")
645+assert((msg == "\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}"))
646646;
647647end)
648−local x <close> = enter(0)
648+local x <close> = enter(0x0)
649649local y = {}
650650end
651651local _,msg = pcall(test)
652−assert(msg == 1000 and closemsg == "\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}")
652+assert(((msg == 0x3e8) and (closemsg == "\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}")))
653653do
654654collectgarbage()
655−local s = string.rep("\u{61}",10000)
655+local s = string.rep("\u{61}",0x2710)
656656local m = T.totalmem()
657657collectgarbage("\u{73}\u{74}\u{6f}\u{70}")
658658s=string.upper(s)
659−assert(T.totalmem() - m <= 11000)
659+assert(((T.totalmem() - m) <= 0x2af8))
660660collectgarbage("\u{72}\u{65}\u{73}\u{74}\u{61}\u{72}\u{74}")
661661end
662662do
663−local lim = 10000
664−local extra = 2000
663+local lim = 0x2710
664+local extra = 0x7d0
665665local s = string.rep("\u{61}",lim)
666666local a = {s,s}
667667collectgarbage()
@@ -669,18 +669,18 @@ collectgarbage()
669669collectgarbage()
670670local m = T.totalmem()
671671collectgarbage("\u{73}\u{74}\u{6f}\u{70}")
672−T.totalmem(m + extra)
673−assert(not pcall(table.concat,a))
674−assert(T.totalmem() - m <= extra)
675−T.totalmem(m + lim + extra)
676−assert(not pcall(table.concat,a))
677−assert(T.totalmem() - m <= extra)
678−T.totalmem(m + 2 * lim + extra)
679−assert(not pcall(table.concat,a))
680−assert(T.totalmem() - m <= extra)
681−T.totalmem(m + 4 * lim + extra)
682−assert(# table.concat(a) == 2 * lim)
683−T.totalmem(0)
672+T.totalmem((m + extra))
673+assert((not pcall(table.concat,a)))
674+assert(((T.totalmem() - m) <= extra))
675+T.totalmem(((m + lim) + extra))
676+assert((not pcall(table.concat,a)))
677+assert(((T.totalmem() - m) <= extra))
678+T.totalmem(((m + (0x2 * lim)) + extra))
679+assert((not pcall(table.concat,a)))
680+assert(((T.totalmem() - m) <= extra))
681+T.totalmem(((m + (0x4 * lim)) + extra))
682+assert((# (table.concat(a) == (0x2 * lim))))
683+T.totalmem(0x0)
684684collectgarbage("\u{72}\u{65}\u{73}\u{74}\u{61}\u{72}\u{74}")
685685print("\u{2b}")
686686end
@@ -688,76 +688,76 @@ do
688688local trace = {}
689689local function hook
690690(event)
691−trace[# trace + 1]=event .. "\u{20}" .. (debug.getinfo(2).name or "\u{3f}")
691+trace[(# (trace + 0x1))]=(event .. ("\u{20}" .. (debug.getinfo(0x2).name or "\u{3f}")))
692692end
693693local x = func2close(function (_,msg)
694−trace[# trace + 1]="\u{78}"
694+trace[(# (trace + 0x1))]="\u{78}"
695695end)
696696local y = func2close(function (_,msg)
697−trace[# trace + 1]="\u{79}"
697+trace[(# (trace + 0x1))]="\u{79}"
698698end)
699699debug.sethook(hook,"\u{72}")
700700local t = {T.testC("\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{32}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{78}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{6e}\u{75}\u{6d}\u{20}\u{31}\u{30}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{70}\u{75}\u{73}\u{68}\u{69}\u{6e}\u{74}\u{20}\u{32}\u{30}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{33}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{23}\u{20}\u{79}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}\u{a}\u{20}\u{20}\u{20}\u{20}",x,y)}
701701debug.sethook()
702702checktable(trace,{"\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{73}\u{65}\u{74}\u{68}\u{6f}\u{6f}\u{6b}","\u{79}","\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{3f}","\u{78}","\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{3f}","\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}"})
703−checktable(t,{10,20})
703+checktable(t,{0xa,0x14})
704704end
705705end
706706do
707707local trace = {}
708708local function hook
709709(event)
710−trace[# trace + 1]=event .. "\u{20}" .. debug.getinfo(2).name
710+trace[(# (trace + 0x1))]=(event .. ("\u{20}" .. debug.getinfo(0x2).name))
711711end
712712local function foo
713713(...)
714714local x <close> = func2close(function (_,msg)
715−trace[# trace + 1]="\u{78}"
715+trace[(# (trace + 0x1))]="\u{78}"
716716end)
717717local y <close> = func2close(function (_,msg)
718718debug.sethook(hook,"\u{72}")
719719end)
720720return ...
721721end
722−local t = {foo(10,20,30)}
722+local t = {foo(0xa,0x14,0x1e)}
723723debug.sethook()
724−checktable(t,{10,20,30})
724+checktable(t,{0xa,0x14,0x1e})
725725checktable(trace,{"\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{73}\u{65}\u{74}\u{68}\u{6f}\u{6f}\u{6b}","\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}","\u{78}","\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}","\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{66}\u{6f}\u{6f}"})
726726end
727727print("\u{74}\u{6f}\u{2d}\u{62}\u{65}\u{2d}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{20}\u{76}\u{61}\u{72}\u{69}\u{61}\u{62}\u{6c}\u{65}\u{73}\u{20}\u{69}\u{6e}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{73}")
728728do
729729local trace = {}
730730local co = coroutine.wrap(function ()
731−trace[# trace + 1]="\u{6e}\u{6f}\u{77}\u{58}"
731+trace[(# (trace + 0x1))]="\u{6e}\u{6f}\u{77}\u{58}"
732732local x <close> = func2close(function (_,msg)
733−assert(msg == nil)
734−trace[# trace + 1]="\u{78}\u{31}"
733+assert((msg == nil))
734+trace[(# (trace + 0x1))]="\u{78}\u{31}"
735735coroutine.yield("\u{78}")
736−trace[# trace + 1]="\u{78}\u{32}"
736+trace[(# (trace + 0x1))]="\u{78}\u{32}"
737737end)
738738return pcall(function ()
739739do
740740local z <close> = func2close(function (_,msg)
741−assert(msg == nil)
742−trace[# trace + 1]="\u{7a}\u{31}"
741+assert((msg == nil))
742+trace[(# (trace + 0x1))]="\u{7a}\u{31}"
743743coroutine.yield("\u{7a}")
744−trace[# trace + 1]="\u{7a}\u{32}"
744+trace[(# (trace + 0x1))]="\u{7a}\u{32}"
745745end)
746746end
747−trace[# trace + 1]="\u{6e}\u{6f}\u{77}\u{59}"
747+trace[(# (trace + 0x1))]="\u{6e}\u{6f}\u{77}\u{59}"
748748local y <close> = func2close(function (_,msg)
749−assert(msg == nil)
750−trace[# trace + 1]="\u{79}\u{31}"
749+assert((msg == nil))
750+trace[(# (trace + 0x1))]="\u{79}\u{31}"
751751coroutine.yield("\u{79}")
752−trace[# trace + 1]="\u{79}\u{32}"
752+trace[(# (trace + 0x1))]="\u{79}\u{32}"
753753end)
754−return 10,20,30
754+return 0xa,0x14,0x1e
755755end)
756756end)
757−assert(co() == "\u{7a}")
758−assert(co() == "\u{79}")
759−assert(co() == "\u{78}")
760−checktable({co()},{true,10,20,30})
757+assert((co() == "\u{7a}"))
758+assert((co() == "\u{79}"))
759+assert((co() == "\u{78}"))
760+checktable({co()},{true,0xa,0x14,0x1e})
761761checktable(trace,{"\u{6e}\u{6f}\u{77}\u{58}","\u{7a}\u{31}","\u{7a}\u{32}","\u{6e}\u{6f}\u{77}\u{59}","\u{79}\u{31}","\u{79}\u{32}","\u{78}\u{31}","\u{78}\u{32}"})
762762end
763763do
@@ -770,15 +770,15 @@ if extra then
770770extrares=co()
771771end
772772local res = table.pack(co())
773−assert(res.n == 2 and res[2] == nil)
773+assert(((res.n == 0x2) and (res[0x2] == nil)))
774774local res2 = table.pack(co())
775−assert(res2.n == t.n)
776−for i = 1, # t
775+assert((res2.n == t.n))
776+for i = 0x1, (# t)
777777do
778−if t[i] == "\u{78}" then
779−assert(res2[i] == res[1])
778+if (t[i] == "\u{78}") then
779+assert((res2[i] == res[0x1]))
780780else
781−assert(res2[i] == t[i])
781+assert((res2[i] == t[i]))
782782end
783783end
784784end
@@ -786,14 +786,14 @@ local function foo
786786()
787787local x <close> = func2close(coroutine.yield)
788788local extra <close> = func2close(function (self)
789−assert(self == extrares)
790−coroutine.yield(100)
789+assert((self == extrares))
790+coroutine.yield(0x64)
791791end)
792792extrares=extra
793−return table.unpack({10,x,30})
793+return table.unpack({0xa,x,0x1e})
794794end
795−check(foo,true,10,"\u{78}",30)
796−assert(extrares == 100)
795+check(foo,true,0xa,"\u{78}",0x1e)
796+assert((extrares == 0x64))
797797local function foo
798798()
799799local x <close> = func2close(coroutine.yield)
@@ -803,7 +803,7 @@ check(foo,false)
803803local function foo
804804()
805805local x <close> = func2close(coroutine.yield)
806−local y,z = 20,30
806+local y,z = 0x14,0x1e
807807return x
808808end
809809check(foo,false,"\u{78}")
@@ -811,65 +811,65 @@ local function foo
811811()
812812local x <close> = func2close(coroutine.yield)
813813local extra <close> = func2close(coroutine.yield)
814−return table.unpack({},1,100)
814+return table.unpack({},0x1,0x64)
815815end
816−check(foo,true,table.unpack({},1,100))
816+check(foo,true,table.unpack({},0x1,0x64))
817817end
818818do
819819local co = coroutine.wrap(function ()
820820local function foo
821821(err)
822822local z <close> = func2close(function (_,msg)
823−assert(msg == nil or msg == err + 20)
823+assert(((msg == nil) or (msg == (err + 0x14))))
824824coroutine.yield("\u{7a}")
825−return 100,200
825+return 0x64,0xc8
826826end)
827827local y <close> = func2close(function (_,msg)
828−assert(msg == err or (msg == nil and err == 1))
828+assert(((msg == err) or ((msg == nil) and (err == 0x1))))
829829coroutine.yield("\u{79}")
830830if err then
831−error(err + 20)
831+error((err + 0x14))
832832end
833833end)
834834local x <close> = func2close(function (_,msg)
835−assert(msg == err or (msg == nil and err == 1))
835+assert(((msg == err) or ((msg == nil) and (err == 0x1))))
836836coroutine.yield("\u{78}")
837−return 100,200
837+return 0x64,0xc8
838838end)
839−if err == 10 then
839+if (err == 0xa) then
840840error(err)
841841else
842−return 10,20
842+return 0xa,0x14
843843end
844844end
845845coroutine.yield(pcall(foo,nil))
846−coroutine.yield(pcall(foo,1))
847−return pcall(foo,10)
846+coroutine.yield(pcall(foo,0x1))
847+return pcall(foo,0xa)
848848end)
849849local a,b = co()
850−assert(a == "\u{78}" and b == nil)
850+assert(((a == "\u{78}") and (b == nil)))
851851a,b=co()
852−assert(a == "\u{79}" and b == nil)
852+assert(((a == "\u{79}") and (b == nil)))
853853a,b=co()
854−assert(a == "\u{7a}" and b == nil)
854+assert(((a == "\u{7a}") and (b == nil)))
855855local a,b,c = co()
856−assert(a and b == 10 and c == 20)
856+assert(((a and (b == 0xa)) and (c == 0x14)))
857857local a,b = co()
858−assert(a == "\u{78}" and b == nil)
858+assert(((a == "\u{78}") and (b == nil)))
859859a,b=co()
860−assert(a == "\u{79}" and b == nil)
860+assert(((a == "\u{79}") and (b == nil)))
861861a,b=co()
862−assert(a == "\u{7a}" and b == nil)
862+assert(((a == "\u{7a}") and (b == nil)))
863863local st,msg = co()
864−assert(not st and msg == 21)
864+assert((not (st and (msg == 0x15))))
865865local a,b = co()
866−assert(a == "\u{78}" and b == nil)
866+assert(((a == "\u{78}") and (b == nil)))
867867a,b=co()
868−assert(a == "\u{79}" and b == nil)
868+assert(((a == "\u{79}") and (b == nil)))
869869a,b=co()
870−assert(a == "\u{7a}" and b == nil)
870+assert(((a == "\u{7a}") and (b == nil)))
871871local st,msg = co()
872−assert(not st and msg == 10 + 20)
872+assert((not (st and (msg == (0xa + 0x14)))))
873873end
874874do
875875local x = false
@@ -882,65 +882,65 @@ do
882882local yv <close> = func2close(function ()
883883y=true
884884end)
885−coroutine.yield(100)
885+coroutine.yield(0x64)
886886end
887−coroutine.yield(200)
888−error(23)
887+coroutine.yield(0xc8)
888+error(0x17)
889889end)
890890local b = co()
891−assert(b == 100 and not x and not y)
891+assert(((b == 0x64) and (not (x and (not y)))))
892892b=co()
893−assert(b == 200 and not x and y)
893+assert(((b == 0xc8) and (not (x and y))))
894894local a,b = pcall(co)
895−assert(not a and b == 23 and x and y)
895+assert((not (((a and (b == 0x17)) and x) and y)))
896896end
897897do
898−local x = 0
898+local x = 0x0
899899local co = coroutine.wrap(function ()
900900local xx <close> = func2close(function (_,msg)
901−x=x + 1
901+x=(x + 0x1)
902902;
903903assert(string.find(msg,"\u{40}\u{58}\u{58}\u{58}"))
904904error("\u{40}\u{59}\u{59}\u{59}")
905905end)
906906local xv <close> = func2close(function ()
907−x=x + 1
907+x=(x + 0x1)
908908;
909909error("\u{40}\u{58}\u{58}\u{58}")
910910end)
911−coroutine.yield(100)
912−error(200)
911+coroutine.yield(0x64)
912+error(0xc8)
913913end)
914−assert(co() == 100)
914+assert((co() == 0x64))
915915;
916−assert(x == 0)
916+assert((x == 0x0))
917917local st,msg = pcall(co)
918918;
919−assert(x == 2)
920−assert(not st and string.find(msg,"\u{40}\u{59}\u{59}\u{59}"))
921−local x = 0
922−local y = 0
919+assert((x == 0x2))
920+assert((not (st and string.find(msg,"\u{40}\u{59}\u{59}\u{59}"))))
921+local x = 0x0
922+local y = 0x0
923923co=coroutine.wrap(function ()
924924local xx <close> = func2close(function (_,err)
925−y=y + 1
925+y=(y + 0x1)
926926;
927927assert(string.find(err,"\u{58}\u{58}\u{58}"))
928928error("\u{59}\u{59}\u{59}")
929929end)
930930local xv <close> = func2close(function ()
931−x=x + 1
931+x=(x + 0x1)
932932;
933933error("\u{58}\u{58}\u{58}")
934934end)
935−coroutine.yield(100)
936−return 200
935+coroutine.yield(0x64)
936+return 0xc8
937937end)
938−assert(co() == 100)
938+assert((co() == 0x64))
939939;
940−assert(x == 0)
940+assert((x == 0x0))
941941local st,msg = pcall(co)
942−assert(x == 1 and y == 1)
943−assert(not st and string.find(msg,"\u{25}\u{77}\u{2b}\u{25}\u{2e}\u{25}\u{77}\u{2b}\u{3a}\u{25}\u{64}\u{2b}\u{3a}\u{20}\u{59}\u{59}\u{59}"))
942+assert(((x == 0x1) and (y == 0x1)))
943+assert((not (st and string.find(msg,"\u{25}\u{77}\u{2b}\u{25}\u{2e}\u{25}\u{77}\u{2b}\u{3a}\u{25}\u{64}\u{2b}\u{3a}\u{20}\u{59}\u{59}\u{59}"))))
944944end
945945local co
946946co=coroutine.wrap(function ()
@@ -951,26 +951,26 @@ co=nil
951951coroutine.yield()
952952end)
953953co()
954−assert(co == nil)
954+assert((co == nil))
955955collectgarbage()
956956if rawget(_G,"\u{54}") then
957957print("\u{74}\u{6f}\u{2d}\u{62}\u{65}\u{2d}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{64}\u{20}\u{76}\u{61}\u{72}\u{69}\u{61}\u{62}\u{6c}\u{65}\u{73}\u{20}\u{78}\u{20}\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}\u{73}\u{20}\u{69}\u{6e}\u{20}\u{43}")
958958do
959−local token = 0
960−local count = 0
959+local token = 0x0
960+local count = 0x0
961961local f = T.makeCfunc("\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{31}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{32}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2e}\u{a}\u{20}\u{20}\u{20}\u{20}")
962962local obj = func2close(function (_,msg)
963−count=count + 1
963+count=(count + 0x1)
964964token=coroutine.yield(count,token)
965965end)
966966local co = coroutine.wrap(f)
967−local ct,res = co(obj,obj,10,20,30,3)
968−assert(ct == 1 and res == 0)
969−ct,res=co(100)
970−assert(ct == 2 and res == 100)
971−res={co(200)}
972−assert(res[1] == 10 and res[2] == 20 and res[3] == 30 and res[4] == nil)
973−assert(token == 200)
967+local ct,res = co(obj,obj,0xa,0x14,0x1e,0x3)
968+assert(((ct == 0x1) and (res == 0x0)))
969+ct,res=co(0x64)
970+assert(((ct == 0x2) and (res == 0x64)))
971+res={co(0xc8)}
972+assert(((((res[0x1] == 0xa) and (res[0x2] == 0x14)) and (res[0x3] == 0x1e)) and (res[0x4] == nil)))
973+assert((token == 0xc8))
974974end
975975do
976976local f = T.makeCfunc("\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{31}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2e}\u{a}\u{20}\u{20}\u{20}\u{20}")
@@ -978,73 +978,73 @@ local obj = func2close(function ()
978978local temp
979979local x <close> = func2close(function ()
980980coroutine.yield(temp)
981−return 1,2,3
981+return 0x1,0x2,0x3
982982end)
983983temp=coroutine.yield("\u{63}\u{6c}\u{6f}\u{73}\u{69}\u{6e}\u{67}\u{20}\u{6f}\u{62}\u{6a}")
984−return 1,2,3
984+return 0x1,0x2,0x3
985985end)
986986local co = coroutine.wrap(f)
987−local res = co(obj,10,30,1)
988−assert(res == "\u{63}\u{6c}\u{6f}\u{73}\u{69}\u{6e}\u{67}\u{20}\u{6f}\u{62}\u{6a}")
987+local res = co(obj,0xa,0x1e,0x1)
988+assert((res == "\u{63}\u{6c}\u{6f}\u{73}\u{69}\u{6e}\u{67}\u{20}\u{6f}\u{62}\u{6a}"))
989989res=co("\u{63}\u{6c}\u{6f}\u{73}\u{69}\u{6e}\u{67}\u{20}\u{78}")
990−assert(res == "\u{63}\u{6c}\u{6f}\u{73}\u{69}\u{6e}\u{67}\u{20}\u{78}")
990+assert((res == "\u{63}\u{6c}\u{6f}\u{73}\u{69}\u{6e}\u{67}\u{20}\u{78}"))
991991res={co()}
992−assert(res[1] == 30 and res[2] == nil)
992+assert(((res[0x1] == 0x1e) and (res[0x2] == nil)))
993993end
994994do
995995local f = T.makeCfunc("\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{31}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{73}\u{6c}\u{6f}\u{74}\u{20}\u{31}\u{a}\u{20}\u{20}\u{20}\u{20}")
996996local obj = func2close(coroutine.yield)
997997local co = coroutine.create(f)
998998local st,msg = coroutine.resume(co,obj)
999−assert(not st and string.find(msg,"\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{61}\u{63}\u{72}\u{6f}\u{73}\u{73}"))
999+assert((not (st and string.find(msg,"\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{61}\u{63}\u{72}\u{6f}\u{73}\u{73}"))))
10001000local f = T.makeCfunc("\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{74}\u{6f}\u{63}\u{6c}\u{6f}\u{73}\u{65}\u{20}\u{31}\u{a}\u{20}\u{20}\u{20}\u{20}")
10011001local st,msg = pcall(f,obj)
1002−assert(not st and string.find(msg,"\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{66}\u{72}\u{6f}\u{6d}\u{20}\u{6f}\u{75}\u{74}\u{73}\u{69}\u{64}\u{65}"))
1002+assert((not (st and string.find(msg,"\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{79}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{66}\u{72}\u{6f}\u{6d}\u{20}\u{6f}\u{75}\u{74}\u{73}\u{69}\u{64}\u{65}"))))
10031003end
10041004end
10051005do
1006−local numopen = 0
1006+local numopen = 0x0
10071007local function open
10081008(x)
1009−numopen=numopen + 1
1009+numopen=(numopen + 0x1)
10101010return function ()
1011−x=x - 1
1012−if x > 0 then
1011+x=(x - 0x1)
1012+if (x > 0x0) then
10131013return x
10141014end
10151015end,nil,nil,func2close(function ()
1016−numopen=numopen - 1
1016+numopen=(numopen - 0x1)
10171017end)
10181018end
1019−local s = 0
1020−for i in open(10)
1019+local s = 0x0
1020+for i in open(0xa)
10211021do
1022−s=s + i
1022+s=(s + i)
10231023end
1024−assert(s == 45 and numopen == 0)
1025−local s = 0
1026−for i in open(10)
1024+assert(((s == 0x2d) and (numopen == 0x0)))
1025+local s = 0x0
1026+for i in open(0xa)
10271027do
1028−if i < 5 then
1028+if (i < 0x5) then
10291029break
10301030end
1031−s=s + i
1031+s=(s + i)
10321032end
1033−assert(s == 35 and numopen == 0)
1034−local s = 0
1035−for i in open(10)
1033+assert(((s == 0x23) and (numopen == 0x0)))
1034+local s = 0x0
1035+for i in open(0xa)
10361036do
1037−for j in open(10)
1037+for j in open(0xa)
10381038do
1039−if i + j < 5 then
1039+if ((i + j) < 0x5) then
10401040goto endloop
10411041end
1042−s=s + i
1042+s=(s + i)
10431043end
10441044end
10451045::endloop::
1046−assert(s == 375 and numopen == 0)
1046+assert(((s == 0x177) and (numopen == 0x0)))
10471047end
10481048print("\u{4f}\u{4b}")
1049−return 5,f
1049+return 0x5,f
10501050end
zod/luau/res/lua/cycled/main.lua → desk/res/lua/cycled/main.luarenamed+39−39
@@ -3,22 +3,22 @@ return
33end
44print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{61}\u{6e}\u{64}\u{2d}\u{61}\u{6c}\u{6f}\u{6e}\u{65}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{72}\u{70}\u{72}\u{65}\u{74}\u{65}\u{72}")
55assert(os.execute())
6−local arg = arg or ARG
6+local arg = (arg or ARG)
77local prog = os.tmpname()
88local otherprog = os.tmpname()
99local out = os.tmpname()
1010local progname
1111do
12−local i = 0
12+local i = 0x0
1313while arg[i] do
14−i=i - 1
14+i=(i - 0x1)
1515end
16−progname=arg[i + 1]
16+progname=arg[(i + 0x1)]
1717end
18−print("\u{70}\u{72}\u{6f}\u{67}\u{6e}\u{61}\u{6d}\u{65}\u{3a}\u{20}" .. progname)
18+print(("\u{70}\u{72}\u{6f}\u{67}\u{6e}\u{61}\u{6d}\u{65}\u{3a}\u{20}" .. progname))
1919local prepfile = function (s,mod,p)
20−mod=mod and "\u{77}\u{62}" or "\u{77}"
21−p=p or prog
20+mod=((mod and "\u{77}\u{62}") or "\u{77}")
21+p=(p or prog)
2222local f = io.open(p,mod)
2323f:write(s)
2424assert(f:close())
@@ -33,35 +33,35 @@ return t
3333end
3434local function checkprogout
3535(s)
36−assert(string.sub(s,- 1) == "\u{a}")
36+assert((string.sub(s,(- 0x1)) == "\u{a}"))
3737local t = getoutput()
3838for line in string.gmatch(s,"\u{2e}\u{2d}\u{a}")
3939do
40−assert(string.find(t,line,1,true))
40+assert(string.find(t,line,0x1,true))
4141end
4242end
4343local function checkout
4444(s)
4545local t = getoutput()
46−if s ~= t then
46+if (s ~= t) then
4747print(string.format("\u{27}\u{25}\u{73}\u{27}\u{20}\u{2d}\u{20}\u{27}\u{25}\u{73}\u{27}\u{a}",s,t))
4848end
49−assert(s == t)
49+assert((s == t))
5050return t
5151end
5252local function RUN
5353(p, ...)
54−p=string.gsub(p,"\u{6c}\u{75}\u{61}","\u{22}" .. progname .. "\u{22}",1)
54+p=string.gsub(p,"\u{6c}\u{75}\u{61}",("\u{22}" .. (progname .. "\u{22}")),0x1)
5555local s = string.format(p,...)
5656assert(os.execute(s))
5757end
5858local function NoRun
5959(msg,p, ...)
60−p=string.gsub(p,"\u{6c}\u{75}\u{61}","\u{22}" .. progname .. "\u{22}",1)
60+p=string.gsub(p,"\u{6c}\u{75}\u{61}",("\u{22}" .. (progname .. "\u{22}")),0x1)
6161local s = string.format(p,...)
6262s=string.format("\u{25}\u{73}\u{20}\u{3e}\u{25}\u{73}\u{20}\u{32}\u{3e}\u{26}\u{31}",s,out)
63−assert(not os.execute(s))
64−assert(string.find(getoutput(),msg,1,true))
63+assert((not os.execute(s)))
64+assert(string.find(getoutput(),msg,0x1,true))
6565end
6666RUN("\u{6c}\u{75}\u{61}\u{20}\u{2d}\u{76}")
6767print(string.format("\u{28}\u{74}\u{65}\u{6d}\u{70}\u{6f}\u{72}\u{61}\u{72}\u{79}\u{20}\u{70}\u{72}\u{6f}\u{67}\u{72}\u{61}\u{6d}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{20}\u{75}\u{73}\u{65}\u{64}\u{20}\u{69}\u{6e}\u{20}\u{74}\u{68}\u{65}\u{73}\u{65}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{3a}\u{20}\u{25}\u{73}\u{29}",prog))
@@ -121,22 +121,22 @@ defaultpath=string.match(output,"\u{5e}\u{28}\u{2e}\u{2d}\u{29}\u{9}")
121121defaultCpath=string.match(output,"\u{9}\u{28}\u{2e}\u{2d}\u{29}\u{24}")
122122RUN("\u{65}\u{6e}\u{76}\u{20}\u{2d}\u{69}\u{20}\u{6c}\u{75}\u{61}\u{20}\u{25}\u{73}\u{20}\u{3e}\u{20}\u{25}\u{73}",prog,out)
123123local out = getoutput()
124−assert(defaultpath == string.match(output,"\u{5e}\u{28}\u{2e}\u{2d}\u{29}\u{9}"))
125−assert(defaultCpath == string.match(output,"\u{9}\u{28}\u{2e}\u{2d}\u{29}\u{24}"))
124+assert((defaultpath == string.match(output,"\u{5e}\u{28}\u{2e}\u{2d}\u{29}\u{9}")))
125+assert((defaultCpath == string.match(output,"\u{9}\u{28}\u{2e}\u{2d}\u{29}\u{24}")))
126126end
127−assert(not string.find(defaultpath,"\u{78}\u{78}\u{78}") and string.find(defaultpath,"\u{6c}\u{75}\u{61}") and not string.find(defaultCpath,"\u{78}\u{78}\u{78}") and string.find(defaultCpath,"\u{6c}\u{75}\u{61}"))
127+assert((not ((string.find(defaultpath,"\u{78}\u{78}\u{78}") and string.find(defaultpath,"\u{6c}\u{75}\u{61}")) and (not (string.find(defaultCpath,"\u{78}\u{78}\u{78}") and string.find(defaultCpath,"\u{6c}\u{75}\u{61}"))))))
128128local function convert
129129(p)
130130prepfile("\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{70}\u{61}\u{63}\u{6b}\u{61}\u{67}\u{65}\u{2e}\u{70}\u{61}\u{74}\u{68}\u{29}")
131131RUN("\u{65}\u{6e}\u{76}\u{20}\u{4c}\u{55}\u{41}\u{5f}\u{50}\u{41}\u{54}\u{48}\u{3d}\u{22}\u{25}\u{73}\u{22}\u{20}\u{6c}\u{75}\u{61}\u{20}\u{25}\u{73}\u{20}\u{3e}\u{20}\u{25}\u{73}",p,prog,out)
132132local expected = getoutput()
133−expected=string.sub(expected,1,- 2)
133+expected=string.sub(expected,0x1,(- 0x2))
134134if string.find(p,"\u{3b}\u{3b}") then
135−p=string.gsub(p,"\u{3b}\u{3b}","\u{3b}" .. defaultpath .. "\u{3b}")
135+p=string.gsub(p,"\u{3b}\u{3b}",("\u{3b}" .. (defaultpath .. "\u{3b}")))
136136p=string.gsub(p,"\u{5e}\u{3b}","")
137137p=string.gsub(p,"\u{3b}\u{24}","")
138138end
139−assert(p == expected)
139+assert((p == expected))
140140end
141141convert("\u{3b}")
142142convert("\u{3b}\u{3b}")
@@ -180,7 +180,7 @@ prepfile("\u{2d}\u{2d}\u{20}\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{62}\u{6
180180RUN("\u{6c}\u{75}\u{61}\u{20}\u{2d}\u{57}\u{20}\u{25}\u{73}\u{20}\u{3e}\u{20}\u{25}\u{73}",prog,out)
181181checkout("\u{63}\u{72}\u{65}\u{61}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{31}\u{a}\u{63}\u{72}\u{65}\u{61}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{32}\u{a}\u{32}\u{a}\u{63}\u{72}\u{65}\u{61}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{33}\u{a}\u{6e}\u{69}\u{6c}\u{a}\u{31}\u{a}")
182182prepfile("\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{28}\u{7b}\u{2e}\u{2e}\u{2e}\u{7d}\u{29}\u{5b}\u{33}\u{30}\u{5d}\u{29}")
183−RUN("\u{6c}\u{75}\u{61}\u{20}\u{25}\u{73}\u{20}\u{25}\u{73}\u{20}\u{3e}\u{20}\u{25}\u{73}",prog,string.rep("\u{20}\u{61}",30),out)
183+RUN("\u{6c}\u{75}\u{61}\u{20}\u{25}\u{73}\u{20}\u{25}\u{73}\u{20}\u{3e}\u{20}\u{25}\u{73}",prog,string.rep("\u{20}\u{61}",0x1e),out)
184184checkout("\u{61}\u{a}")
185185RUN("\u{6c}\u{75}\u{61}\u{20}\u{22}\u{2d}\u{65}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{31}\u{29}\u{22}\u{20}\u{2d}\u{65}\u{61}\u{3d}\u{33}\u{20}\u{2d}\u{65}\u{20}\u{22}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{61}\u{29}\u{22}\u{20}\u{3e}\u{20}\u{25}\u{73}",out)
186186checkout("\u{31}\u{a}\u{33}\u{a}")
@@ -194,19 +194,19 @@ local prompt = "\u{61}\u{6c}\u{6f}"
194194prepfile("\u{20}\u{2d}\u{2d}\u{a}\u{61}\u{20}\u{3d}\u{20}\u{32}\u{a}")
195195RUN("\u{6c}\u{75}\u{61}\u{20}\u{22}\u{2d}\u{65}\u{5f}\u{50}\u{52}\u{4f}\u{4d}\u{50}\u{54}\u{3d}\u{27}\u{25}\u{73}\u{27}\u{22}\u{20}\u{2d}\u{69}\u{20}\u{3c}\u{20}\u{25}\u{73}\u{20}\u{3e}\u{20}\u{25}\u{73}",prompt,prog,out)
196196local t = getoutput()
197−assert(string.find(t,prompt .. "\u{2e}\u{2a}" .. prompt .. "\u{2e}\u{2a}" .. prompt))
197+assert(string.find(t,(prompt .. ("\u{2e}\u{2a}" .. (prompt .. ("\u{2e}\u{2a}" .. prompt))))))
198198prepfile("\u{20}\u{2d}\u{2d}\u{a}\u{61}\u{20}\u{3d}\u{20}\u{32}\u{a}")
199199RUN("\u{6c}\u{75}\u{61}\u{20}\u{2d}\u{69}\u{20}\u{3c}\u{20}\u{25}\u{73}\u{20}\u{3e}\u{20}\u{25}\u{73}",prog,out)
200200local t = getoutput()
201201prompt="\u{3e}\u{20}"
202−assert(string.find(t,prompt .. "\u{2e}\u{2a}" .. prompt .. "\u{2e}\u{2a}" .. prompt))
202+assert(string.find(t,(prompt .. ("\u{2e}\u{2a}" .. (prompt .. ("\u{2e}\u{2a}" .. prompt))))))
203203prompt="\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{43}\u{20}\u{3d}\u{20}\u{30}\u{3b}\u{5f}\u{50}\u{52}\u{4f}\u{4d}\u{50}\u{54}\u{3d}\u{73}\u{65}\u{74}\u{6d}\u{65}\u{74}\u{61}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{28}\u{7b}\u{7d}\u{2c}\u{7b}\u{5f}\u{5f}\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{3d}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{29}\u{20}\u{43}\u{20}\u{3d}\u{20}\u{43}\u{20}\u{2b}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{43}\u{20}\u{65}\u{6e}\u{64}\u{7d}\u{29}"
204204prepfile("\u{20}\u{2d}\u{2d}\u{a}\u{61}\u{20}\u{3d}\u{20}\u{32}\u{a}")
205205RUN("\u{6c}\u{75}\u{61}\u{20}\u{2d}\u{65}\u{20}\u{22}\u{25}\u{73}\u{22}\u{20}\u{2d}\u{69}\u{20}\u{3c}\u{20}\u{25}\u{73}\u{20}\u{3e}\u{20}\u{25}\u{73}",prompt,prog,out)
206206local t = getoutput()
207−assert(string.find(t,"\u{31}\u{20}\u{2d}\u{2d}\u{a}\u{32}\u{61}\u{20}\u{3d}\u{20}\u{32}\u{a}\u{33}\u{a}",1,true))
207+assert(string.find(t,"\u{31}\u{20}\u{2d}\u{2d}\u{a}\u{32}\u{61}\u{20}\u{3d}\u{20}\u{32}\u{a}\u{33}\u{a}",0x1,true))
208208prepfile("\u{64}\u{65}\u{62}\u{75}\u{67}\u{20}\u{3d}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{20}\u{22}\u{64}\u{65}\u{62}\u{75}\u{67}\u{22}\u{a}\u{6d}\u{20}\u{3d}\u{20}\u{7b}\u{78}\u{3d}\u{30}\u{7d}\u{a}\u{73}\u{65}\u{74}\u{6d}\u{65}\u{74}\u{61}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{28}\u{6d}\u{2c}\u{20}\u{7b}\u{5f}\u{5f}\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{3d}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{28}\u{78}\u{29}\u{a}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{28}\u{64}\u{65}\u{62}\u{75}\u{67}\u{2e}\u{67}\u{65}\u{74}\u{69}\u{6e}\u{66}\u{6f}\u{28}\u{34}\u{29}\u{2e}\u{63}\u{75}\u{72}\u{72}\u{65}\u{6e}\u{74}\u{6c}\u{69}\u{6e}\u{65}\u{20}\u{2b}\u{20}\u{78}\u{2e}\u{78}\u{29}\u{a}\u{65}\u{6e}\u{64}\u{7d}\u{29}\u{a}\u{65}\u{72}\u{72}\u{6f}\u{72}\u{28}\u{6d}\u{29}\u{a}")
209−NoRun(progname .. "\u{3a}\u{20}\u{36}\u{a}","\u{6c}\u{75}\u{61}\u{20}\u{25}\u{73}",prog)
209+NoRun((progname .. "\u{3a}\u{20}\u{36}\u{a}"),"\u{6c}\u{75}\u{61}\u{20}\u{25}\u{73}",prog)
210210prepfile("\u{65}\u{72}\u{72}\u{6f}\u{72}\u{7b}\u{7d}")
211211NoRun("\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{6f}\u{62}\u{6a}\u{65}\u{63}\u{74}\u{20}\u{69}\u{73}\u{20}\u{61}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}","\u{6c}\u{75}\u{61}\u{20}\u{25}\u{73}",prog)
212212local s = "\u{20}\u{2d}\u{2d}\u{a}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{20}\u{28}\u{20}\u{78}\u{20}\u{29}\u{a}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{5b}\u{5b}\u{a}\u{78}\u{75}\u{78}\u{75}\u{a}\u{5d}\u{5d}\u{a}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{62}\u{20}\u{3d}\u{20}\u{22}\u{5c}\u{a}\u{78}\u{75}\u{78}\u{75}\u{5c}\u{6e}\u{22}\u{a}\u{20}\u{20}\u{69}\u{66}\u{20}\u{78}\u{20}\u{3d}\u{3d}\u{20}\u{31}\u{31}\u{20}\u{74}\u{68}\u{65}\u{6e}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{20}\u{2b}\u{20}\u{31}\u{32}\u{20}\u{2c}\u{20}\u{32}\u{20}\u{2b}\u{20}\u{32}\u{30}\u{20}\u{65}\u{6e}\u{64}\u{20}\u{20}\u{2d}\u{2d}\u{5b}\u{5b}\u{20}\u{74}\u{65}\u{73}\u{74}\u{20}\u{6d}\u{75}\u{6c}\u{74}\u{69}\u{70}\u{6c}\u{65}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{73}\u{20}\u{5d}\u{5d}\u{a}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{78}\u{20}\u{2b}\u{20}\u{31}\u{a}\u{20}\u{20}\u{2d}\u{2d}\u{5c}\u{5c}\u{a}\u{65}\u{6e}\u{64}\u{a}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{28}\u{20}\u{66}\u{28}\u{20}\u{31}\u{30}\u{30}\u{20}\u{29}\u{20}\u{29}\u{a}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{20}\u{61}\u{20}\u{3d}\u{3d}\u{20}\u{62}\u{20}\u{29}\u{a}\u{64}\u{6f}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{66}\u{28}\u{20}\u{31}\u{31}\u{20}\u{29}\u{20}\u{65}\u{6e}\u{64}\u{20}\u{20}"
@@ -216,7 +216,7 @@ RUN("\u{6c}\u{75}\u{61}\u{20}\u{2d}\u{65}\u{22}\u{5f}\u{50}\u{52}\u{4f}\u{4d}\u{
216216checkprogout("\u{31}\u{30}\u{31}\u{a}\u{31}\u{33}\u{9}\u{32}\u{32}\u{a}\u{a}")
217217prepfile("\u{23}\u{63}\u{6f}\u{6d}\u{6d}\u{65}\u{6e}\u{74}\u{20}\u{69}\u{6e}\u{20}\u{31}\u{73}\u{74}\u{20}\u{6c}\u{69}\u{6e}\u{65}\u{20}\u{77}\u{69}\u{74}\u{68}\u{6f}\u{75}\u{74}\u{20}\u{5c}\u{6e}\u{20}\u{61}\u{74}\u{20}\u{74}\u{68}\u{65}\u{20}\u{65}\u{6e}\u{64}")
218218RUN("\u{6c}\u{75}\u{61}\u{20}\u{25}\u{73}",prog)
219−prepfile("\u{23}\u{63}\u{6f}\u{6d}\u{6d}\u{65}\u{6e}\u{74}\u{a}" .. string.dump(load("\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{33}\u{29}")),true)
219+prepfile(("\u{23}\u{63}\u{6f}\u{6d}\u{6d}\u{65}\u{6e}\u{74}\u{a}" .. string.dump(load("\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{33}\u{29}"))),true)
220220RUN("\u{6c}\u{75}\u{61}\u{20}\u{25}\u{73}\u{20}\u{3e}\u{20}\u{25}\u{73}",prog,out)
221221checkout("\u{33}\u{a}")
222222prepfile(string.format("\u{69}\u{6f}\u{2e}\u{6f}\u{75}\u{74}\u{70}\u{75}\u{74}\u{28}\u{25}\u{71}\u{29}\u{3b}\u{20}\u{69}\u{6f}\u{2e}\u{77}\u{72}\u{69}\u{74}\u{65}\u{28}\u{27}\u{61}\u{6c}\u{6f}\u{27}\u{29}",out))
@@ -240,7 +240,7 @@ RUN("\u{6c}\u{75}\u{61}\u{20}\u{25}\u{73}\u{20}\u{3e}\u{20}\u{25}\u{73}",prog,ou
240240checkprogout("\u{31}\u{32}\u{30}\u{a}\u{4f}\u{6b}\u{a}")
241241assert(os.remove(prog))
242242assert(os.remove(otherprog))
243−assert(not os.remove(out))
243+assert((not os.remove(out)))
244244NoRun("\u{75}\u{6e}\u{72}\u{65}\u{63}\u{6f}\u{67}\u{6e}\u{69}\u{7a}\u{65}\u{64}\u{20}\u{6f}\u{70}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{27}\u{2d}\u{68}\u{27}","\u{6c}\u{75}\u{61}\u{20}\u{2d}\u{68}")
245245NoRun("\u{75}\u{6e}\u{72}\u{65}\u{63}\u{6f}\u{67}\u{6e}\u{69}\u{7a}\u{65}\u{64}\u{20}\u{6f}\u{70}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{27}\u{2d}\u{2d}\u{2d}\u{27}","\u{6c}\u{75}\u{61}\u{20}\u{2d}\u{2d}\u{2d}")
246246NoRun("\u{75}\u{6e}\u{72}\u{65}\u{63}\u{6f}\u{67}\u{6e}\u{69}\u{7a}\u{65}\u{64}\u{20}\u{6f}\u{70}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{27}\u{2d}\u{45}\u{78}\u{27}","\u{6c}\u{75}\u{61}\u{20}\u{2d}\u{45}\u{78}")
@@ -254,15 +254,15 @@ print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{27}\u{6e}\u{6f}\u{74}\
254254NoRun("\u{6e}\u{6f}\u{74}\u{20}\u{65}\u{6e}\u{6f}\u{75}\u{67}\u{68}\u{20}\u{6d}\u{65}\u{6d}\u{6f}\u{72}\u{79}","\u{65}\u{6e}\u{76}\u{20}\u{4d}\u{45}\u{4d}\u{4c}\u{49}\u{4d}\u{49}\u{54}\u{3d}\u{31}\u{30}\u{30}\u{20}\u{6c}\u{75}\u{61}")
255255warn("\u{40}\u{73}\u{74}\u{6f}\u{72}\u{65}")
256256warn("\u{40}\u{31}\u{32}\u{33}","\u{34}\u{35}\u{36}","\u{37}\u{38}\u{39}")
257−assert(_WARN == "\u{40}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}")
257+assert((_WARN == "\u{40}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}"))
258258;
259259_WARN=false
260260warn("\u{7a}\u{69}\u{70}","","\u{20}","\u{7a}\u{61}\u{70}")
261−assert(_WARN == "\u{7a}\u{69}\u{70}\u{20}\u{7a}\u{61}\u{70}")
261+assert((_WARN == "\u{7a}\u{69}\u{70}\u{20}\u{7a}\u{61}\u{70}"))
262262;
263263_WARN=false
264264warn("\u{5a}\u{49}\u{50}","","\u{20}","\u{5a}\u{41}\u{50}")
265−assert(_WARN == "\u{5a}\u{49}\u{50}\u{20}\u{5a}\u{41}\u{50}")
265+assert((_WARN == "\u{5a}\u{49}\u{50}\u{20}\u{5a}\u{41}\u{50}"))
266266;
267267_WARN=false
268268warn("\u{40}\u{6e}\u{6f}\u{72}\u{6d}\u{61}\u{6c}")
@@ -285,28 +285,28 @@ local function runback
285285local shellprg = string.format("\u{25}\u{73}\u{20}\u{2d}\u{65}\u{20}\u{22}\u{25}\u{73}\u{22}\u{20}\u{26}\u{20}\u{65}\u{63}\u{68}\u{6f}\u{20}\u{24}\u{21}",progname,luaprg)
286286local f = io.popen(shellprg,"\u{72}")
287287local pid = f:read()
288−print("\u{28}\u{69}\u{66}\u{20}\u{74}\u{65}\u{73}\u{74}\u{20}\u{66}\u{61}\u{69}\u{6c}\u{73}\u{20}\u{6e}\u{6f}\u{77}\u{2c}\u{20}\u{69}\u{74}\u{20}\u{6d}\u{61}\u{79}\u{20}\u{6c}\u{65}\u{61}\u{76}\u{65}\u{20}\u{61}\u{20}\u{4c}\u{75}\u{61}\u{20}\u{73}\u{63}\u{72}\u{69}\u{70}\u{74}\u{20}\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}\u{20}\u{69}\u{6e}\u{20}\u{62}\u{61}\u{63}\u{6b}\u{67}\u{72}\u{6f}\u{75}\u{6e}\u{64}\u{2c}\u{20}\u{70}\u{69}\u{64}\u{20}" .. pid .. "\u{29}")
288+print(("\u{28}\u{69}\u{66}\u{20}\u{74}\u{65}\u{73}\u{74}\u{20}\u{66}\u{61}\u{69}\u{6c}\u{73}\u{20}\u{6e}\u{6f}\u{77}\u{2c}\u{20}\u{69}\u{74}\u{20}\u{6d}\u{61}\u{79}\u{20}\u{6c}\u{65}\u{61}\u{76}\u{65}\u{20}\u{61}\u{20}\u{4c}\u{75}\u{61}\u{20}\u{73}\u{63}\u{72}\u{69}\u{70}\u{74}\u{20}\u{72}\u{75}\u{6e}\u{6e}\u{69}\u{6e}\u{67}\u{20}\u{69}\u{6e}\u{20}\u{62}\u{61}\u{63}\u{6b}\u{67}\u{72}\u{6f}\u{75}\u{6e}\u{64}\u{2c}\u{20}\u{70}\u{69}\u{64}\u{20}" .. (pid .. "\u{29}")))
289289return f,pid
290290end
291291local f,pid = runback("\u{20}\u{20}\u{20}\u{20}\u{70}\u{63}\u{61}\u{6c}\u{6c}\u{28}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{29}\u{20}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{31}\u{32}\u{29}\u{3b}\u{20}\u{77}\u{68}\u{69}\u{6c}\u{65}\u{20}\u{74}\u{72}\u{75}\u{65}\u{20}\u{64}\u{6f}\u{20}\u{65}\u{6e}\u{64}\u{20}\u{65}\u{6e}\u{64}\u{29}\u{3b}\u{20}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{34}\u{32}\u{29}")
292−assert(f:read() == "\u{31}\u{32}")
292+assert((f:read() == "\u{31}\u{32}"))
293293kill(pid)
294−assert(f:read() == "\u{34}\u{32}")
294+assert((f:read() == "\u{34}\u{32}"))
295295assert(f:close())
296296print("\u{64}\u{6f}\u{6e}\u{65}")
297297local f,pid = runback("\u{20}\u{20}\u{20}\u{20}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{28}\u{31}\u{35}\u{29}\u{3b}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{2e}\u{66}\u{69}\u{6e}\u{64}\u{28}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{2e}\u{72}\u{65}\u{70}\u{28}\u{27}\u{61}\u{27}\u{2c}\u{20}\u{31}\u{30}\u{30}\u{30}\u{30}\u{30}\u{29}\u{2c}\u{20}\u{27}\u{2e}\u{2a}\u{62}\u{27}\u{29}")
298−assert(f:read() == "\u{31}\u{35}")
298+assert((f:read() == "\u{31}\u{35}"))
299299assert(os.execute("\u{73}\u{6c}\u{65}\u{65}\u{70}\u{20}\u{31}"))
300−local n = 100
301−for i = 0, 100
300+local n = 0x64
301+for i = 0x0, 0x64
302302do
303−if not kill(pid) then
303+if (not kill(pid)) then
304304n=i
305305break
306306end
307307end
308308assert(f:close())
309−assert(n >= 2)
309+assert((n >= 0x2))
310310print(string.format("\u{64}\u{6f}\u{6e}\u{65}\u{20}\u{28}\u{77}\u{69}\u{74}\u{68}\u{20}\u{25}\u{64}\u{20}\u{6b}\u{69}\u{6c}\u{6c}\u{73}\u{29}",n))
311311end
312312print("\u{4f}\u{4b}")
desk/res/lua/cycled/math.luanew file+879
@@ -0,0 +1,879 @@
1+print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}\u{73}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{6d}\u{61}\u{74}\u{68}\u{20}\u{6c}\u{69}\u{62}")
2+local minint <const> = math.mininteger
3+local maxint <const> = math.maxinteger
4+local intbits <const> = (math.floor((math.log(maxint,0x2) + 0.5)) + 0x1)
5+assert(((0x1 << intbits) == 0x0))
6+assert((minint == (0x1 << (intbits - 0x1))))
7+assert((maxint == (minint - 0x1)))
8+local floatbits = 0x18
9+do
10+local p = (2.0 ^ floatbits)
11+while (p < (p + 1.0)) do
12+p=(p * 2.0)
13+floatbits=(floatbits + 0x1)
14+end
15+end
16+local function isNaN
17+(x)
18+return (x ~= x)
19+end
20+assert(isNaN((0x0 / 0x0)))
21+assert((not isNaN((0x1 / 0x0))))
22+do
23+local x = (2.0 ^ floatbits)
24+assert(((x > (x - 1.0)) and (x == (x + 1.0))))
25+print(string.format("\u{25}\u{64}\u{2d}\u{62}\u{69}\u{74}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}\u{73}\u{2c}\u{20}\u{25}\u{64}\u{2d}\u{62}\u{69}\u{74}\u{20}\u{28}\u{6d}\u{61}\u{6e}\u{74}\u{69}\u{73}\u{73}\u{61}\u{29}\u{20}\u{66}\u{6c}\u{6f}\u{61}\u{74}\u{73}",intbits,floatbits))
26+end
27+assert((((math.type(0x0) == "\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}") and (math.type(0.0) == "\u{66}\u{6c}\u{6f}\u{61}\u{74}")) and (not math.type("\u{31}\u{30}"))))
28+local function checkerror
29+(msg,f, ...)
30+local s,err = pcall(f,...)
31+assert((not (s and string.find(err,msg))))
32+end
33+local msgf2i = "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}\u{2e}\u{2a}\u{20}\u{68}\u{61}\u{73}\u{20}\u{6e}\u{6f}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}\u{20}\u{72}\u{65}\u{70}\u{72}\u{65}\u{73}\u{65}\u{6e}\u{74}\u{61}\u{74}\u{69}\u{6f}\u{6e}"
34+local function eq
35+(a,b,limit)
36+if (not limit) then
37+if (floatbits >= 0x32) then
38+limit=1e-11
39+else
40+limit=1e-5
41+end
42+end
43+return ((a == b) or (math.abs((a - b)) <= limit))
44+end
45+local function eqT
46+(a,b)
47+return ((a == b) and (math.type(a) == math.type(b)))
48+end
49+assert((((((0.0 == 0x0) and (0.0 == 0x0)) and (0.0 == 0x0)) and (20.0 == 0x14)) and (0.2 == 0.2)))
50+do
51+local a,b,c = "\u{32}","\u{20}\u{33}\u{65}\u{30}\u{20}","\u{20}\u{31}\u{30}\u{20}\u{20}"
52+assert((((a + b) == 0x5) and (- (b == (- ((0x3 and ((b + "\u{32}") == 0x5)) and (("\u{31}\u{30}" - c) == 0x0)))))))
53+assert((((type(a) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}") and (type(b) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")) and (type(c) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")))
54+assert(((((a == "\u{32}") and (b == "\u{20}\u{33}\u{65}\u{30}\u{20}")) and (c == "\u{20}\u{31}\u{30}\u{20}\u{20}")) and (- (c == (- "\u{20}\u{20}\u{31}\u{30}\u{20}")))))
55+assert((((c % a) == 0x0) and ((a ^ b) == 0x8)))
56+a=0x0
57+assert((a == (- (a and (0x0 == (- 0x0))))))
58+end
59+do
60+local x = (- 0x1)
61+local mz = (0x0 / x)
62+local t = {[0x0] = 0xa,0x14,0x1e,0x28,0x32}
63+assert(((t[mz] == t[0x0]) and (t[(- 0x0)] == t[0x0])))
64+end
65+do
66+local a,b = math.modf(3.5)
67+assert(((a == 3.0) and (b == 0.5)))
68+a,b=math.modf((- 2.5))
69+assert((a == (- (2.0 and (b == (- 0.5))))))
70+a,b=math.modf((- 3e23))
71+assert((a == (- (3e23 and (b == 0.0)))))
72+a,b=math.modf(3e35)
73+assert(((a == 3e35) and (b == 0.0)))
74+a,b=math.modf((- (0x1 / 0x0)))
75+assert((a == (- ((0x1 / 0x0) and (b == 0.0)))))
76+a,b=math.modf((0x1 / 0x0))
77+assert(((a == (0x1 / 0x0)) and (b == 0.0)))
78+a,b=math.modf((0x0 / 0x0))
79+assert((isNaN(a) and isNaN(b)))
80+a,b=math.modf(0x3)
81+assert((eqT(a,0x3) and eqT(b,0.0)))
82+a,b=math.modf(minint)
83+assert((eqT(a,minint) and eqT(b,0.0)))
84+end
85+assert((math.huge > 1e31))
86+assert((- (math.huge < (- 1e31))))
87+assert((minint < (minint + 0x1)))
88+assert(((maxint - 0x1) < maxint))
89+assert(((0x0 - minint) == minint))
90+assert(((minint * minint) == 0x0))
91+assert((((maxint * maxint) * maxint) == maxint))
92+for _,i in pairs({(- 0x10),(- 0xf),(- 0x3),(- 0x2),(- 0x1),0x0,0x1,0x2,0x3,0xf})
93+do
94+for _,j in pairs({(- 0x10),(- 0xf),(- 0x3),(- 0x2),(- 0x1),0x1,0x2,0x3,0xf})
95+do
96+for _,ti in pairs({0x0,0.0})
97+do
98+for _,tj in pairs({0x0,0.0})
99+do
100+local x = (i + ti)
101+local y = (j + tj)
102+assert(((i // j) == math.floor((i / j))))
103+end
104+end
105+end
106+end
107+assert(((0x1 // 0.0) == (0x1 / 0x0)))
108+assert((- ((0x1 // 0.0) == (- (0x1 / 0x0)))))
109+assert(eqT((3.5 // 1.5),2.0))
110+assert(eqT((3.5 // (- 1.5)),(- 3.0)))
111+do
112+local x,y
113+x=0x1
114+;
115+assert(((x // 0.0) == (0x1 / 0x0)))
116+x=1.0
117+;
118+assert(((x // 0x0) == (0x1 / 0x0)))
119+x=3.5
120+;
121+assert(eqT((x // 0x1),3.0))
122+assert(eqT((x // (- 0x1)),(- 4.0)))
123+x=3.5
124+;
125+y=1.5
126+;
127+assert(eqT((x // y),2.0))
128+x=3.5
129+;
130+y=(- 1.5)
131+;
132+assert(eqT((x // y),(- 3.0)))
133+end
134+assert(((maxint // maxint) == 0x1))
135+assert(((maxint // 0x1) == maxint))
136+assert((((maxint - 0x1) // maxint) == 0x0))
137+assert(((maxint // (maxint - 0x1)) == 0x1))
138+assert(((minint // minint) == 0x1))
139+assert(((minint // minint) == 0x1))
140+assert((((minint + 0x1) // minint) == 0x0))
141+assert(((minint // (minint + 0x1)) == 0x1))
142+assert(((minint // 0x1) == minint))
143+assert((minint // (- (0x1 == (- minint)))))
144+assert((minint // (- (0x2 == (0x2 ^ (intbits - 0x2))))))
145+assert((maxint // (- (0x1 == (- maxint)))))
146+do
147+assert((0x2 ^ (- (0x3 == (0x1 / (0x2 ^ 0x3))))))
148+assert(eq(((- 0x3) ^ (- 0x3)),(0x1 / ((- 0x3) ^ 0x3))))
149+for i = (- 0x3), 0x3
150+do
151+for j = (- 0x3), 0x3
152+do
153+if (not ((_port or (i ~= 0x0)) or (j > 0x0))) then
154+assert(eq((i ^ j),(0x1 / (i ^ (- j)))))
155+end
156+end
157+end
158+end
159+if (floatbits < intbits) then
160+assert(((2.0 ^ floatbits) == (0x1 << floatbits)))
161+assert((((2.0 ^ floatbits) - 1.0) == ((0x1 << floatbits) - 1.0)))
162+assert((((2.0 ^ floatbits) - 1.0) ~= (0x1 << floatbits)))
163+assert((((2.0 ^ floatbits) + 1.0) ~= ((0x1 << floatbits) + 0x1)))
164+else
165+assert((maxint == (maxint + 0.0)))
166+assert(((maxint - 0x1) == (maxint - 1.0)))
167+assert(((minint + 0x1) == (minint + 1.0)))
168+assert((maxint ~= (maxint - 1.0)))
169+end
170+assert(((maxint + 0.0) == ((2.0 ^ (intbits - 0x1)) - 1.0)))
171+assert(((minint + 0.0) == minint))
172+assert(((minint + 0.0) == (- (2.0 ^ (intbits - 0x1)))))
173+assert((0x1 < 1.1))
174+;
175+assert((not (0x1 < 0.9)))
176+assert((0x1 <= 1.1))
177+;
178+assert((not (0x1 <= 0.9)))
179+assert((- (0x1 < (- 0.9))))
180+;
181+assert((not (- (0x1 < (- 1.1)))))
182+assert((0x1 <= 1.1))
183+;
184+assert((not (- (0x1 <= (- 1.1)))))
185+assert((- (0x1 < (- 0.9))))
186+;
187+assert((not (- (0x1 < (- 1.1)))))
188+assert((- (0x1 <= (- 0.9))))
189+;
190+assert((not (- (0x1 <= (- 1.1)))))
191+assert((minint <= (minint + 0.0)))
192+assert(((minint + 0.0) <= minint))
193+assert((not (minint < (minint + 0.0))))
194+assert((not ((minint + 0.0) < minint)))
195+assert((maxint < (minint * (- 1.0))))
196+assert((maxint <= (minint * (- 1.0))))
197+do
198+local fmaxi1 = (0x2 ^ (intbits - 0x1))
199+assert((maxint < fmaxi1))
200+assert((maxint <= fmaxi1))
201+assert((not (fmaxi1 <= maxint)))
202+assert((minint <= (- (0x2 ^ (intbits - 0x1)))))
203+assert((- ((0x2 ^ (intbits - 0x1)) <= minint)))
204+end
205+if (floatbits < intbits) then
206+print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{6f}\u{72}\u{64}\u{65}\u{72}\u{20}\u{28}\u{66}\u{6c}\u{6f}\u{61}\u{74}\u{73}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{72}\u{65}\u{70}\u{72}\u{65}\u{73}\u{65}\u{6e}\u{74}\u{20}\u{61}\u{6c}\u{6c}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}\u{73}\u{29}")
207+local fmax = (0x2 ^ floatbits)
208+local ifmax = (fmax | 0x0)
209+assert((fmax < (ifmax + 0x1)))
210+assert(((fmax - 0x1) < ifmax))
211+assert((- ((fmax - 0x1) > (- ifmax))))
212+assert((not (fmax <= (ifmax - 0x1))))
213+assert((- (fmax > (- (ifmax + 0x1)))))
214+assert((not (- (fmax >= (- (ifmax - 0x1))))))
215+assert((((fmax / 0x2) - 0.5) < (ifmax // 0x2)))
216+assert((- (((fmax / 0x2) - 0.5) > (- (ifmax // 0x2)))))
217+assert((maxint < (0x2 ^ intbits)))
218+assert((minint > (- (0x2 ^ intbits))))
219+assert((maxint <= (0x2 ^ intbits)))
220+assert((minint >= (- (0x2 ^ intbits))))
221+else
222+print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{6f}\u{72}\u{64}\u{65}\u{72}\u{20}\u{28}\u{66}\u{6c}\u{6f}\u{61}\u{74}\u{73}\u{20}\u{63}\u{61}\u{6e}\u{20}\u{72}\u{65}\u{70}\u{72}\u{65}\u{73}\u{65}\u{6e}\u{74}\u{20}\u{61}\u{6c}\u{6c}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}\u{73}\u{29}")
223+assert((maxint < (maxint + 1.0)))
224+assert((maxint < (maxint + 0.5)))
225+assert(((maxint - 1.0) < maxint))
226+assert(((maxint - 0.5) < maxint))
227+assert((not ((maxint + 0.0) < maxint)))
228+assert(((maxint + 0.0) <= maxint))
229+assert((not (maxint < (maxint + 0.0))))
230+assert(((maxint + 0.0) <= maxint))
231+assert((maxint <= (maxint + 0.0)))
232+assert((not ((maxint + 1.0) <= maxint)))
233+assert((not ((maxint + 0.5) <= maxint)))
234+assert((not (maxint <= (maxint - 1.0))))
235+assert((not (maxint <= (maxint - 0.5))))
236+assert((minint < (minint + 1.0)))
237+assert((minint < (minint + 0.5)))
238+assert((minint <= (minint + 0.5)))
239+assert(((minint - 1.0) < minint))
240+assert(((minint - 1.0) <= minint))
241+assert((not ((minint + 0.0) < minint)))
242+assert((not ((minint + 0.5) < minint)))
243+assert((not (minint < (minint + 0.0))))
244+assert(((minint + 0.0) <= minint))
245+assert((minint <= (minint + 0.0)))
246+assert((not ((minint + 1.0) <= minint)))
247+assert((not ((minint + 0.5) <= minint)))
248+assert((not (minint <= (minint - 1.0))))
249+end
250+do
251+local NaN <const> = (0x0 / 0x0)
252+assert((not (NaN < 0x0)))
253+assert((not (NaN > minint)))
254+assert((not (NaN <= (- 0x9))))
255+assert((not (NaN <= maxint)))
256+assert((not (NaN < maxint)))
257+assert((not (minint <= NaN)))
258+assert((not (minint < NaN)))
259+assert((not (0x4 <= NaN)))
260+assert((not (0x4 < NaN)))
261+end
262+local function checkcompt
263+(msg,code)
264+checkerror(msg,assert(load(code)))
265+end
266+checkcompt("\u{64}\u{69}\u{76}\u{69}\u{64}\u{65}\u{20}\u{62}\u{79}\u{20}\u{7a}\u{65}\u{72}\u{6f}","\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}\u{20}\u{2f}\u{2f}\u{20}\u{30}")
267+checkcompt(msgf2i,"\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}\u{2e}\u{33}\u{20}\u{3e}\u{3e}\u{20}\u{30}")
268+checkcompt(msgf2i,("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}\u{2e}\u{30}\u{5e}\u{25}\u{64}\u{20}\u{26}\u{20}\u{31}"):format((intbits - 0x1)))
269+checkcompt("\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{27}\u{68}\u{75}\u{67}\u{65}\u{27}","\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{6d}\u{61}\u{74}\u{68}\u{2e}\u{68}\u{75}\u{67}\u{65}\u{20}\u{3c}\u{3c}\u{20}\u{31}")
270+checkcompt(msgf2i,("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{20}\u{7c}\u{20}\u{32}\u{2e}\u{30}\u{5e}\u{25}\u{64}"):format((intbits - 0x1)))
271+checkcompt(msgf2i,"\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{32}\u{2e}\u{33}\u{20}\u{7e}\u{20}\u{30}\u{2e}\u{30}")
272+local function f2i
273+(x)
274+return (x | x)
275+end
276+checkerror(msgf2i,f2i,math.huge)
277+checkerror(msgf2i,f2i,(- math.huge))
278+checkerror(msgf2i,f2i,(0x0 / 0x0))
279+if (floatbits < intbits) then
280+assert(((maxint + 1.0) == (maxint + 0.0)))
281+assert(((minint - 1.0) == (minint + 0.0)))
282+checkerror(msgf2i,f2i,(maxint + 0.0))
283+assert((f2i((2.0 ^ (intbits - 0x2))) == (0x1 << (intbits - 0x2))))
284+assert((f2i((- (2.0 ^ (intbits - 0x2)))) == (- (0x1 << (intbits - 0x2)))))
285+assert(((((2.0 ^ (floatbits - 0x1)) + 1.0) // 0x1) == ((0x1 << (floatbits - 0x1)) + 0x1)))
286+local mf = ((maxint - (0x1 << (floatbits - intbits))) + 0x1)
287+assert((f2i((mf + 0.0)) == mf))
288+mf=(mf + 0x1)
289+assert((f2i((mf + 0.0)) ~= mf))
290+else
291+assert(((maxint + 1.0) > maxint))
292+assert(((minint - 1.0) < minint))
293+assert((f2i((maxint + 0.0)) == maxint))
294+checkerror("\u{6e}\u{6f}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}\u{20}\u{72}\u{65}\u{70}",f2i,(maxint + 1.0))
295+checkerror("\u{6e}\u{6f}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}\u{20}\u{72}\u{65}\u{70}",f2i,(minint - 1.0))
296+end
297+assert((f2i((minint + 0.0)) == minint))
298+assert((("\u{32}" + 0x1) == 0x3))
299+assert((("\u{32}\u{20}" + 0x1) == 0x3))
300+assert((("\u{20}\u{2d}\u{32}\u{20}" + 0x1) == (- 0x1)))
301+assert((("\u{20}\u{2d}\u{30}\u{78}\u{61}\u{20}" + 0x1) == (- 0x9)))
302+do
303+assert(eqT(tonumber(tostring(maxint)),maxint))
304+assert(eqT(tonumber(tostring(minint)),minint))
305+local function incd
306+(n)
307+local s = string.format("\u{25}\u{64}",n)
308+s=string.gsub(s,"\u{25}\u{64}\u{24}",function (d)
309+assert((d ~= "\u{39}"))
310+return string.char((string.byte(d) + 0x1))
311+end)
312+return s
313+end
314+assert(eqT(tonumber(incd(maxint)),(maxint + 1.0)))
315+assert(eqT(tonumber(incd(minint)),(minint - 1.0)))
316+assert(eqT(tonumber(("\u{31}" .. string.rep("\u{30}",0x1e))),1e30))
317+assert(eqT(tonumber(("\u{2d}\u{31}" .. string.rep("\u{30}",0x1e))),(- 1e30)))
318+assert(eqT(tonumber(("\u{30}\u{78}\u{31}" .. string.rep("\u{30}",0x1e))),0x0))
319+assert((minint == load(("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}" .. minint))()))
320+assert(eqT(maxint,load(("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}" .. maxint))()))
321+assert(eqT(1e22,1e22))
322+assert(eqT((- 1e22),(- 1e22)))
323+end
324+assert((tonumber(3.4) == 3.4))
325+assert(eqT(tonumber(0x3),0x3))
326+assert((eqT(tonumber(maxint),maxint) and eqT(tonumber(minint),minint)))
327+assert((tonumber((0x1 / 0x0)) == (0x1 / 0x0)))
328+assert((tonumber("\u{30}") == 0x0))
329+assert((not tonumber("")))
330+assert((not tonumber("\u{20}\u{20}")))
331+assert((not tonumber("\u{2d}")))
332+assert((not tonumber("\u{20}\u{20}\u{2d}\u{30}\u{78}\u{20}")))
333+assert((not tonumber({})))
334+assert(((((tonumber("\u{2b}\u{30}\u{2e}\u{30}\u{31}") == (0x1 / 0x64)) and (tonumber("\u{2b}\u{2e}\u{30}\u{31}") == 0.01)) and (tonumber("\u{2e}\u{30}\u{31}") == 0.01)) and (tonumber("\u{2d}\u{31}\u{2e}") == (- (0x1 and (tonumber("\u{2b}\u{31}\u{2e}") == 0x1))))))
335+assert((not (tonumber("\u{2b}\u{20}\u{30}\u{2e}\u{30}\u{31}") and (not (tonumber("\u{2b}\u{2e}\u{65}\u{31}") and (not (tonumber("\u{31}\u{65}") and (not (tonumber("\u{31}\u{2e}\u{30}\u{65}\u{2b}") and (not tonumber("\u{2e}")))))))))))
336+assert((tonumber("\u{2d}\u{30}\u{31}\u{32}") == (- (0xa - 0x2))))
337+assert((tonumber("\u{2d}\u{31}\u{2e}\u{32}\u{65}\u{32}") == (- (- (- 0x78)))))
338+assert((tonumber("\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}") == ((0x1 << (0x4 * 0xc)) - 0x1)))
339+assert((tonumber(("\u{30}\u{78}" .. string.rep("\u{66}",(intbits // 0x4)))) == (- 0x1)))
340+assert((tonumber(("\u{2d}\u{30}\u{78}" .. string.rep("\u{66}",(intbits // 0x4)))) == 0x1))
341+assert((tonumber("\u{20}\u{20}\u{30}\u{30}\u{31}\u{30}\u{31}\u{30}\u{20}\u{20}",0x2) == 0xa))
342+assert((tonumber("\u{20}\u{20}\u{30}\u{30}\u{31}\u{30}\u{31}\u{30}\u{20}\u{20}",0xa) == 0x3f2))
343+assert((tonumber("\u{20}\u{20}\u{2d}\u{31}\u{30}\u{31}\u{30}\u{20}\u{20}",0x2) == (- 0xa)))
344+assert((tonumber("\u{31}\u{30}",0x24) == 0x24))
345+assert((tonumber("\u{20}\u{20}\u{2d}\u{31}\u{30}\u{20}\u{20}",0x24) == (- 0x24)))
346+assert((tonumber("\u{20}\u{20}\u{2b}\u{31}\u{5a}\u{20}\u{20}",0x24) == (0x24 + 0x23)))
347+assert((tonumber("\u{20}\u{20}\u{2d}\u{31}\u{7a}\u{20}\u{20}",0x24) == (- (0x24 + (- 0x23)))))
348+assert((tonumber("\u{2d}\u{66}\u{46}\u{66}\u{61}",0x10) == (- (0xa + (0x10 * (0xf + (0x10 * (0xf + (0x10 * 0xf)))))))))
349+assert(((tonumber(string.rep("\u{31}",(intbits - 0x2)),0x2) + 0x1) == (0x2 ^ (intbits - 0x2))))
350+assert(((tonumber("\u{66}\u{66}\u{66}\u{66}\u{46}\u{46}\u{46}\u{46}",0x10) + 0x1) == (0x1 << 0x20)))
351+assert(((tonumber("\u{30}\u{66}\u{66}\u{66}\u{66}\u{46}\u{46}\u{46}\u{46}",0x10) + 0x1) == (0x1 << 0x20)))
352+assert(((tonumber("\u{2d}\u{30}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{46}\u{46}\u{46}\u{46}",0x10) - 0x1) == (- (0x1 << 0x28))))
353+for i = 0x2, 0x24
354+do
355+local i2 = (i * i)
356+local i10 = ((((i2 * i2) * i2) * i2) * i2)
357+assert((tonumber("\u{9}\u{31}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{9}",i) == i10))
358+end
359+if (not _soft) then
360+assert((tonumber(("\u{30}\u{78}" .. (string.rep("\u{66}",0xd) .. "\u{2e}\u{30}"))) == ((2.0 ^ (0x4 * 0xd)) - 0x1)))
361+assert((tonumber(("\u{30}\u{78}" .. (string.rep("\u{66}",0x96) .. "\u{2e}\u{30}"))) == ((2.0 ^ (0x4 * 0x96)) - 0x1)))
362+assert((tonumber(("\u{30}\u{78}" .. (string.rep("\u{66}",0x12c) .. "\u{2e}\u{30}"))) == ((2.0 ^ (0x4 * 0x12c)) - 0x1)))
363+assert((tonumber(("\u{30}\u{78}" .. (string.rep("\u{66}",0x1f4) .. "\u{2e}\u{30}"))) == ((2.0 ^ (0x4 * 0x1f4)) - 0x1)))
364+assert((tonumber(("\u{30}\u{78}\u{33}\u{2e}" .. string.rep("\u{30}",0x3e8))) == 0x3))
365+assert((tonumber(("\u{30}\u{78}" .. (string.rep("\u{30}",0x3e8) .. "\u{61}"))) == 0xa))
366+assert((tonumber(("\u{30}\u{78}\u{30}\u{2e}" .. (string.rep("\u{30}",0xd) .. "\u{31}"))) == (2.0 ^ (- (0x4 * 0xe)))))
367+assert((tonumber(("\u{30}\u{78}\u{30}\u{2e}" .. (string.rep("\u{30}",0x96) .. "\u{31}"))) == (2.0 ^ (- (0x4 * 0x97)))))
368+assert((tonumber(("\u{30}\u{78}\u{30}\u{2e}" .. (string.rep("\u{30}",0x12c) .. "\u{31}"))) == (2.0 ^ (- (0x4 * 0x12d)))))
369+assert((tonumber(("\u{30}\u{78}\u{30}\u{2e}" .. (string.rep("\u{30}",0x1f4) .. "\u{31}"))) == (2.0 ^ (- (0x4 * 0x1f5)))))
370+assert((tonumber(("\u{30}\u{78}\u{65}\u{30}\u{33}" .. (string.rep("\u{30}",0x3e8) .. "\u{70}\u{2d}\u{34}\u{30}\u{30}\u{30}"))) == 3587.0))
371+assert((tonumber(("\u{30}\u{78}\u{2e}" .. (string.rep("\u{30}",0x3e8) .. "\u{37}\u{34}\u{70}\u{34}\u{30}\u{30}\u{34}"))) == 7.25))
372+end
373+local function f
374+(...)
375+if (select("\u{23}",...) == 0x1) then
376+return ...
377+else
378+return "\u{2a}\u{2a}\u{2a}"
379+end
380+end
381+assert((not f(tonumber("\u{66}\u{46}\u{66}\u{61}",0xf))))
382+assert((not f(tonumber("\u{30}\u{39}\u{39}",0x8))))
383+assert((not f(tonumber("\u{31}\u{0}",0x2))))
384+assert((not f(tonumber("",0x8))))
385+assert((not f(tonumber("\u{20}\u{20}",0x9))))
386+assert((not f(tonumber("\u{20}\u{20}",0x9))))
387+assert((not f(tonumber("\u{30}\u{78}\u{66}",0xa))))
388+assert((not f(tonumber("\u{69}\u{6e}\u{66}"))))
389+assert((not f(tonumber("\u{20}\u{49}\u{4e}\u{46}\u{20}"))))
390+assert((not f(tonumber("\u{4e}\u{61}\u{6e}"))))
391+assert((not f(tonumber("\u{6e}\u{61}\u{6e}"))))
392+assert((not f(tonumber("\u{20}\u{20}"))))
393+assert((not f(tonumber(""))))
394+assert((not f(tonumber("\u{31}\u{20}\u{20}\u{61}"))))
395+assert((not f(tonumber("\u{31}\u{20}\u{20}\u{61}",0x2))))
396+assert((not f(tonumber("\u{31}\u{0}"))))
397+assert((not f(tonumber("\u{31}\u{20}\u{0}"))))
398+assert((not f(tonumber("\u{31}\u{0}\u{20}"))))
399+assert((not f(tonumber("\u{65}\u{31}"))))
400+assert((not f(tonumber("\u{65}\u{20}\u{20}\u{31}"))))
401+assert((not f(tonumber("\u{20}\u{33}\u{2e}\u{34}\u{2e}\u{35}\u{20}"))))
402+assert((not tonumber("\u{30}\u{78}")))
403+assert((not tonumber("\u{78}")))
404+assert((not tonumber("\u{78}\u{33}")))
405+assert((not tonumber("\u{30}\u{78}\u{33}\u{2e}\u{33}\u{2e}\u{33}")))
406+assert((not tonumber("\u{30}\u{30}\u{78}\u{32}")))
407+assert((not tonumber("\u{30}\u{78}\u{20}\u{32}")))
408+assert((not tonumber("\u{30}\u{20}\u{78}\u{32}")))
409+assert((not tonumber("\u{32}\u{33}\u{78}")))
410+assert((not tonumber("\u{2d}\u{20}\u{30}\u{78}\u{61}\u{61}")))
411+assert((not tonumber("\u{2d}\u{30}\u{78}\u{61}\u{61}\u{50}\u{20}")))
412+assert((not tonumber("\u{30}\u{78}\u{30}\u{2e}\u{35}\u{31}\u{70}")))
413+assert((not tonumber("\u{30}\u{78}\u{35}\u{70}\u{2b}\u{2d}\u{32}")))
414+assert((((0x10 == 0x10) and (0xfff == ((0x2 ^ 0xc) - 0x1))) and (0xfb == 0xfb)))
415+assert(((0.0 == 0x0) and (0.0 == 0x0)))
416+assert((0xffffffff == ((0x1 << 0x20) - 0x1)))
417+assert((tonumber("\u{2b}\u{30}\u{78}\u{32}") == 0x2))
418+assert((tonumber("\u{2d}\u{30}\u{78}\u{61}\u{41}") == (- 0xaa)))
419+assert((tonumber("\u{2d}\u{30}\u{78}\u{66}\u{66}\u{46}\u{46}\u{46}\u{66}\u{66}\u{66}") == (- ((0x1 << 0x20) + 0x1))))
420+assert((((0.0 == 0x0) and ((0xe + 0x1) == 0xf)) and ((0xe - 0x1) == 0xd)))
421+assert((tonumber("\u{20}\u{20}\u{30}\u{78}\u{32}\u{2e}\u{35}\u{20}\u{20}") == (0x25 / 0x10)))
422+assert((tonumber("\u{20}\u{20}\u{2d}\u{30}\u{78}\u{32}\u{2e}\u{35}\u{20}\u{20}") == (- (0x25 / 0x10))))
423+assert((tonumber("\u{20}\u{20}\u{2b}\u{30}\u{78}\u{30}\u{2e}\u{35}\u{31}\u{70}\u{2b}\u{38}\u{20}\u{20}") == 0x51))
424+assert((0.9999999997671694 == (0x1 - "\u{30}\u{78}\u{2e}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{31}")))
425+assert((("\u{30}\u{78}\u{41}\u{2e}\u{61}" + 0x0) == (0xa + (0xa / 0x10))))
426+assert((170.0 == 0xaa))
427+assert((1.0 == 0x1))
428+assert((1.0625 == ("\u{30}\u{78}\u{31}\u{2e}" + "\u{2b}\u{30}\u{78}\u{2e}\u{31}")))
429+assert((11259375.0 == 11259375.0))
430+assert((1.1 == (1.0 + 0.1)))
431+assert(((100.0 == 100.0) and (0.01 == 0.01)))
432+assert(((0x423a35c7 - 0x423a35c6) == 1.0))
433+assert((1.1 == ("\u{31}\u{2e}" + "\u{2e}\u{31}")))
434+assert(((tonumber("\u{31}\u{31}\u{31}\u{31}\u{31}\u{31}\u{31}\u{31}\u{31}\u{31}") - tonumber("\u{31}\u{31}\u{31}\u{31}\u{31}\u{31}\u{31}\u{31}\u{31}\u{30}")) == tonumber("\u{20}\u{20}\u{2b}\u{30}\u{2e}\u{30}\u{30}\u{31}\u{65}\u{2b}\u{33}\u{20}\u{a}\u{9}")))
435+assert(((1e-31 > 9e-32) and (9e29 < 1e30)))
436+assert((0.123456 > 0.123455))
437+assert((tonumber("\u{2b}\u{31}\u{2e}\u{32}\u{33}\u{45}\u{31}\u{38}") == (1.23 * (10.0 ^ 0x12))))
438+assert((not (((0x1 < 0x1) and (0x1 < 0x2)) and (not (0x2 < 0x1)))))
439+assert((not ((("\u{61}" < "\u{61}") and ("\u{61}" < "\u{62}")) and (not ("\u{62}" < "\u{61}")))))
440+assert((((0x1 <= 0x1) and (0x1 <= 0x2)) and (not (0x2 <= 0x1))))
441+assert(((("\u{61}" <= "\u{61}") and ("\u{61}" <= "\u{62}")) and (not ("\u{62}" <= "\u{61}"))))
442+assert((not ((0x1 > 0x1) and (not ((0x1 > 0x2) and (0x2 > 0x1))))))
443+assert((not (("\u{61}" > "\u{61}") and (not (("\u{61}" > "\u{62}") and ("\u{62}" > "\u{61}"))))))
444+assert(((0x1 >= 0x1) and (not ((0x1 >= 0x2) and (0x2 >= 0x1)))))
445+assert((("\u{61}" >= "\u{61}") and (not (("\u{61}" >= "\u{62}") and ("\u{62}" >= "\u{61}")))))
446+assert((((1.3 < 1.4) and (1.3 <= 1.4)) and (not ((1.3 < 1.3) and (1.3 <= 1.3)))))
447+assert(eqT((- (0x4 % 0x3)),0x2))
448+assert(eqT((0x4 % (- 0x3)),(- 0x2)))
449+assert(eqT((- (4.0 % 0x3)),2.0))
450+assert(eqT((0x4 % (- 3.0)),(- 2.0)))
451+assert(eqT((0x4 % (- 0x5)),(- 0x1)))
452+assert(eqT((0x4 % (- 5.0)),(- 1.0)))
453+assert(eqT((0x4 % 0x5),0x4))
454+assert(eqT((0x4 % 5.0),4.0))
455+assert(eqT((- (0x4 % (- 0x5))),(- 0x4)))
456+assert(eqT((- (0x4 % (- 5.0))),(- 4.0)))
457+assert(eqT((- (0x4 % 0x5)),0x1))
458+assert(eqT((- (0x4 % 5.0)),1.0))
459+assert(eqT((4.25 % 0x4),0.25))
460+assert(eqT((10.0 % 0x2),0.0))
461+assert(eqT((- (10.0 % 0x2)),0.0))
462+assert(eqT((- (10.0 % (- 0x2))),0.0))
463+assert(((math.pi - (math.pi % 0x1)) == 0x3))
464+assert(((math.pi - (math.pi % 1e-3)) == 3.141))
465+do
466+local i,j = 0x0,0x4e20
467+while (i < j) do
468+local m = ((i + j) // 0x2)
469+if (0xa ^ (- (m > 0x0))) then
470+i=(m + 0x1)
471+else
472+j=m
473+end
474+end
475+local b = (0xa ^ (- (i - (i // 0xa))))
476+assert(((b > 0x0) and ((b * b) == 0x0)))
477+local delta = (b / 0x3e8)
478+assert(eq(((2.1 * b) % (0x2 * b)),(0.1 * b),delta))
479+assert(eq(((- (2.1 * b)) % (0x2 * b)),((0x2 * b) - (0.1 * b)),delta))
480+assert(eq(((2.1 * b) % (- (0x2 * b))),((0.1 * b) - (0x2 * b)),delta))
481+assert(eq(((- (2.1 * b)) % (- (0x2 * b))),(- (0.1 * b)),delta))
482+end
483+for i = (- 0xa), 0xa
484+do
485+for j = (- 0xa), 0xa
486+do
487+if (j ~= 0x0) then
488+assert((((i + 0.0) % j) == (i % j)))
489+end
490+end
491+end
492+for i = 0x0, 0xa
493+do
494+for j = (- 0xa), 0xa
495+do
496+if (j ~= 0x0) then
497+assert((((0x2 ^ i) % j) == ((0x1 << i) % j)))
498+end
499+end
500+end
501+do
502+local i = 0xa
503+while ((0x1 << i) > 0x0) do
504+assert((((0x1 << i) % 0x3) == ((i % 0x2) + 0x1)))
505+i=(i + 0x1)
506+end
507+i=0xa
508+while ((0x2 ^ i) < math.huge) do
509+assert((((0x2 ^ i) % 0x3) == ((i % 0x2) + 0x1)))
510+i=(i + 0x1)
511+end
512+end
513+assert(eqT((minint % minint),0x0))
514+assert(eqT((maxint % maxint),0x0))
515+assert((((minint + 0x1) % minint) == (minint + 0x1)))
516+assert((((maxint - 0x1) % maxint) == (maxint - 0x1)))
517+assert(((minint % maxint) == (maxint - 0x1)))
518+assert((minint % (- (0x1 == 0x0))))
519+assert((minint % (- (0x2 == 0x0))))
520+assert((maxint % (- (0x2 == (- 0x1)))))
521+if (not _port) then
522+local function anan
523+(x)
524+assert(isNaN(x))
525+end
526+anan((0.0 % 0x0))
527+anan((1.3 % 0x0))
528+anan((math.huge % 0x1))
529+anan((math.huge % 1e30))
530+anan((- (math.huge % 1e30)))
531+anan((- (math.huge % (- 1e30))))
532+assert(((0x1 % math.huge) == 0x1))
533+assert(((1e30 % math.huge) == 1e30))
534+assert((1e30 % (- (math.huge == (- math.huge)))))
535+assert((- ((0x1 % math.huge) == math.huge)))
536+assert((- (0x1 % (- (math.huge == (- 0x1))))))
537+end
538+assert(math.ult(0x3,0x4))
539+assert((not math.ult(0x4,0x4)))
540+assert(math.ult((- 0x2),(- 0x1)))
541+assert(math.ult(0x2,(- 0x1)))
542+assert((not math.ult((- 0x2),(- 0x2))))
543+assert(math.ult(maxint,minint))
544+assert((not math.ult(minint,maxint)))
545+assert(eq(((math.sin((- 9.8)) ^ 0x2) + (math.cos((- 9.8)) ^ 0x2)),0x1))
546+assert(eq(math.tan((math.pi / 0x4)),0x1))
547+assert((eq(math.sin((math.pi / 0x2)),0x1) and eq(math.cos((math.pi / 0x2)),0x0)))
548+assert(((eq(math.atan(0x1),(math.pi / 0x4)) and eq(math.acos(0x0),(math.pi / 0x2))) and eq(math.asin(0x1),(math.pi / 0x2))))
549+assert((eq(math.deg((math.pi / 0x2)),0x5a) and eq(math.rad(0x5a),(math.pi / 0x2))))
550+assert((math.abs((- 10.43)) == 10.43))
551+assert(eqT(math.abs(minint),minint))
552+assert(eqT(math.abs(maxint),maxint))
553+assert(eqT(math.abs((- maxint)),maxint))
554+assert(eq(math.atan(0x1,0x0),(math.pi / 0x2)))
555+assert((math.fmod(0xa,0x3) == 0x1))
556+assert(eq((math.sqrt(0xa) ^ 0x2),0xa))
557+assert(eq(math.log(0x2,0xa),(math.log(0x2) / math.log(0xa))))
558+assert(eq(math.log(0x2,0x2),0x1))
559+assert(eq(math.log(0x9,0x3),0x2))
560+assert(eq(math.exp(0x0),0x1))
561+assert(eq(math.sin(0xa),math.sin((0xa % (0x2 * math.pi)))))
562+assert((tonumber("\u{20}\u{31}\u{2e}\u{33}\u{65}\u{2d}\u{32}\u{20}") == 0.013))
563+assert((tonumber("\u{20}\u{2d}\u{31}\u{2e}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{31}\u{20}") == (- 1.00000000000001)))
564+assert((0x800001 + (- (0x800001 == 0x0))))
565+assert((0x800000 + (- (0x800000 == 0x0))))
566+assert((0x7fffff + (- (0x7fffff == 0x0))))
567+do
568+assert(eqT(math.floor(3.4),0x3))
569+assert(eqT(math.ceil(3.4),0x4))
570+assert(eqT(math.floor((- 3.4)),(- 0x4)))
571+assert(eqT(math.ceil((- 3.4)),(- 0x3)))
572+assert(eqT(math.floor(maxint),maxint))
573+assert(eqT(math.ceil(maxint),maxint))
574+assert(eqT(math.floor(minint),minint))
575+assert(eqT(math.floor((minint + 0.0)),minint))
576+assert(eqT(math.ceil(minint),minint))
577+assert(eqT(math.ceil((minint + 0.0)),minint))
578+assert((math.floor(1e50) == 1e50))
579+assert((math.ceil(1e50) == 1e50))
580+assert((math.floor((- 1e50)) == (- 1e50)))
581+assert((math.ceil((- 1e50)) == (- 1e50)))
582+for _,p in pairs({0x1f,0x20,0x3f,0x40})
583+do
584+assert((math.floor((0x2 ^ p)) == (0x2 ^ p)))
585+assert((math.floor(((0x2 ^ p) + 0.5)) == (0x2 ^ p)))
586+assert((math.ceil((0x2 ^ p)) == (0x2 ^ p)))
587+assert((math.ceil(((0x2 ^ p) - 0.5)) == (0x2 ^ p)))
588+end
589+checkerror("\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}",math.floor,{})
590+checkerror("\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}",math.ceil,print)
591+assert(eqT(math.tointeger(minint),minint))
592+assert(eqT(math.tointeger((minint .. "")),minint))
593+assert(eqT(math.tointeger(maxint),maxint))
594+assert(eqT(math.tointeger((maxint .. "")),maxint))
595+assert(eqT(math.tointeger((minint + 0.0)),minint))
596+assert((not math.tointeger((0.0 - minint))))
597+assert((not math.tointeger(math.pi)))
598+assert((not math.tointeger((- math.pi))))
599+assert((math.floor(math.huge) == math.huge))
600+assert((math.ceil(math.huge) == math.huge))
601+assert((not math.tointeger(math.huge)))
602+assert((math.floor((- math.huge)) == (- math.huge)))
603+assert((math.ceil((- math.huge)) == (- math.huge)))
604+assert((not math.tointeger((- math.huge))))
605+assert((math.tointeger("\u{33}\u{34}\u{2e}\u{30}") == 0x22))
606+assert((not math.tointeger("\u{33}\u{34}\u{2e}\u{33}")))
607+assert((not math.tointeger({})))
608+assert((not math.tointeger((0x0 / 0x0))))
609+end
610+for i = (- 0x6), 0x6
611+do
612+for j = (- 0x6), 0x6
613+do
614+if (j ~= 0x0) then
615+local mi = math.fmod(i,j)
616+local mf = math.fmod((i + 0.0),j)
617+assert((mi == mf))
618+assert(((math.type(mi) == "\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}") and (math.type(mf) == "\u{66}\u{6c}\u{6f}\u{61}\u{74}")))
619+if ((((i >= 0x0) and (j >= 0x0)) or ((i <= 0x0) and (j <= 0x0))) or (mi == 0x0)) then
620+assert(eqT(mi,(i % j)))
621+end
622+end
623+end
624+end
625+assert(eqT(math.fmod(minint,minint),0x0))
626+assert(eqT(math.fmod(maxint,maxint),0x0))
627+assert(eqT(math.fmod((minint + 0x1),minint),(minint + 0x1)))
628+assert(eqT(math.fmod((maxint - 0x1),maxint),(maxint - 0x1)))
629+checkerror("\u{7a}\u{65}\u{72}\u{6f}",math.fmod,0x3,0x0)
630+do
631+checkerror("\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}",math.max)
632+checkerror("\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}",math.min)
633+assert(eqT(math.max(0x3),0x3))
634+assert(eqT(math.max(0x3,0x5,0x9,0x1),0x9))
635+assert((math.max(maxint,1e61) == 1e61))
636+assert(eqT(math.max(minint,(minint + 0x1)),(minint + 0x1)))
637+assert(eqT(math.min(0x3),0x3))
638+assert(eqT(math.min(0x3,0x5,0x9,0x1),0x1))
639+assert((math.min(3.2,5.9,(- 9.2),1.1) == (- 9.2)))
640+assert((math.min(1.9,1.7,1.72) == 1.7))
641+assert((math.min((- 1e61),minint) == (- 1e61)))
642+assert(eqT(math.min(maxint,(maxint - 0x1)),(maxint - 0x1)))
643+assert(eqT(math.min((maxint - 0x2),maxint,(maxint - 0x1)),(maxint - 0x2)))
644+end
645+local a,b = "\u{31}\u{30}","\u{32}\u{30}"
646+assert(((((a * b) == 0xc8) and ((a + b) == 0x1e)) and ((a - b) == (- ((0xa and ((a / b) == 0.5)) and (- (b == (- 0x14))))))))
647+assert(((a == "\u{31}\u{30}") and (b == "\u{32}\u{30}")))
648+do
649+print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{2d}\u{30}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{4e}\u{61}\u{4e}")
650+local mz <const> = (- 0.0)
651+local z <const> = 0.0
652+assert((mz == z))
653+assert((((0x1 / mz) < 0x0) and (0x0 < (0x1 / z))))
654+local a = {[mz] = 0x1}
655+assert(((a[z] == 0x1) and (a[mz] == 0x1)))
656+a[z]=0x2
657+assert(((a[z] == 0x2) and (a[mz] == 0x2)))
658+local inf = ((math.huge * 0x2) + 0x1)
659+local mz <const> = (- (0x1 / inf))
660+local z <const> = (0x1 / inf)
661+assert((mz == z))
662+assert((((0x1 / mz) < 0x0) and (0x0 < (0x1 / z))))
663+local NaN <const> = (inf - inf)
664+assert((NaN ~= NaN))
665+assert((not (NaN < NaN)))
666+assert((not (NaN <= NaN)))
667+assert((not (NaN > NaN)))
668+assert((not (NaN >= NaN)))
669+assert((not ((0x0 < NaN) and (not (NaN < 0x0)))))
670+local NaN1 <const> = (0x0 / 0x0)
671+assert(((NaN ~= NaN1) and (not ((NaN <= NaN1) and (not (NaN1 <= NaN))))))
672+local a = {}
673+assert((not pcall(rawset,a,NaN,0x1)))
674+assert((a[NaN] == undef))
675+a[0x1]=0x1
676+assert((not pcall(rawset,a,NaN,0x1)))
677+assert((a[NaN] == undef))
678+local a1,a2,a3,a4,a5 = 0x0,0x0,"\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}",0x0,"\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}"
679+assert((((a1 == a2) and (a2 == a4)) and (a1 ~= a3)))
680+assert((a3 == a5))
681+end
682+print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{27}\u{6d}\u{61}\u{74}\u{68}\u{2e}\u{72}\u{61}\u{6e}\u{64}\u{6f}\u{6d}\u{27}")
683+local random,max,min = math.random,math.max,math.min
684+local function testnear
685+(val,ref,tol)
686+return (math.abs((val - ref)) < (ref * tol))
687+end
688+do
689+local h <const> = 0x7a7040a5
690+local l <const> = 0xa323c9d6
691+math.randomseed(0x3ef)
692+local res = (((h << 0x20) | l) & (~ (~ (0x0 << intbits))))
693+assert((random(0x0) == res))
694+math.randomseed(0x3ef,0x0)
695+local res
696+if (floatbits <= 0x20) then
697+res=((h >> (0x20 - floatbits)) % (0x2 ^ 0x20))
698+else
699+res=(((h % (0x2 ^ 0x20)) * (0x2 ^ (floatbits - 0x20))) + ((l >> (0x40 - floatbits)) % (0x2 ^ 0x20)))
700+end
701+local rand = random()
702+assert(eq(rand,0.4782753376376966,(0x2 ^ (- floatbits))))
703+assert(((rand * (0x2 ^ floatbits)) == res))
704+end
705+do
706+local x,y = math.randomseed()
707+local res = math.random(0x0)
708+x,y=math.randomseed(x,y)
709+assert((math.random(0x0) == res))
710+math.randomseed(x,y)
711+assert((math.random(0x0) == res))
712+print(string.format("\u{72}\u{61}\u{6e}\u{64}\u{6f}\u{6d}\u{20}\u{73}\u{65}\u{65}\u{64}\u{73}\u{3a}\u{20}\u{25}\u{64}\u{2c}\u{20}\u{25}\u{64}",x,y))
713+end
714+do
715+local randbits = math.min(floatbits,0x40)
716+local mult = (0x2 ^ randbits)
717+local counts = {}
718+for i = 0x1, randbits
719+do
720+counts[i]=0x0
721+end
722+local up = (- math.huge)
723+local low = math.huge
724+local rounds = (0x64 * randbits)
725+local totalrounds = 0x0
726+::doagain::
727+for i = 0x0, rounds
728+do
729+local t = random()
730+assert(((0x0 <= t) and (t < 0x1)))
731+up=max(up,t)
732+low=min(low,t)
733+assert((((t * mult) % 0x1) == 0x0))
734+local bit = (i % randbits)
735+if (((t * (0x2 ^ bit)) % 0x1) >= 0.5) then
736+counts[(bit + 0x1)]=(counts[(bit + 0x1)] + 0x1)
737+end
738+end
739+totalrounds=(totalrounds + rounds)
740+if (not (eq(up,0x1,1e-3) and eq(low,0x0,1e-3))) then
741+goto doagain
742+end
743+local expected = ((totalrounds / randbits) / 0x2)
744+for i = 0x1, randbits
745+do
746+if (not testnear(counts[i],expected,0.1)) then
747+goto doagain
748+end
749+end
750+print(string.format("\u{66}\u{6c}\u{6f}\u{61}\u{74}\u{20}\u{72}\u{61}\u{6e}\u{64}\u{6f}\u{6d}\u{20}\u{72}\u{61}\u{6e}\u{67}\u{65}\u{20}\u{69}\u{6e}\u{20}\u{25}\u{64}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{73}\u{3a}\u{20}\u{5b}\u{25}\u{66}\u{2c}\u{20}\u{25}\u{66}\u{5d}",totalrounds,low,up))
751+end
752+do
753+local up = 0x0
754+local low = 0x0
755+local counts = {}
756+for i = 0x1, intbits
757+do
758+counts[i]=0x0
759+end
760+local rounds = (0x64 * intbits)
761+local totalrounds = 0x0
762+::doagain::
763+for i = 0x0, rounds
764+do
765+local t = random(0x0)
766+up=max(up,t)
767+low=min(low,t)
768+local bit = (i % intbits)
769+counts[(bit + 0x1)]=(counts[(bit + 0x1)] + ((t >> bit) & 0x1))
770+end
771+totalrounds=(totalrounds + rounds)
772+local lim = (maxint >> 0xa)
773+if (not (((maxint - up) < lim) and ((low - minint) < lim))) then
774+goto doagain
775+end
776+local expected = ((totalrounds / intbits) / 0x2)
777+for i = 0x1, intbits
778+do
779+if (not testnear(counts[i],expected,0.1)) then
780+goto doagain
781+end
782+end
783+print(string.format("\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}\u{20}\u{72}\u{61}\u{6e}\u{64}\u{6f}\u{6d}\u{20}\u{72}\u{61}\u{6e}\u{67}\u{65}\u{20}\u{69}\u{6e}\u{20}\u{25}\u{64}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{73}\u{3a}\u{20}\u{5b}\u{6d}\u{69}\u{6e}\u{69}\u{6e}\u{74}\u{20}\u{2b}\u{20}\u{25}\u{2e}\u{30}\u{66}\u{70}\u{70}\u{6d}\u{2c}\u{20}\u{6d}\u{61}\u{78}\u{69}\u{6e}\u{74}\u{20}\u{2d}\u{20}\u{25}\u{2e}\u{30}\u{66}\u{70}\u{70}\u{6d}\u{5d}",totalrounds,(((minint - low) / minint) * 1e6),(((maxint - up) / maxint) * 1e6)))
784+end
785+do
786+local count = {0x0,0x0,0x0,0x0,0x0,0x0}
787+local rep = 0xc8
788+local totalrep = 0x0
789+::doagain::
790+for i = 0x1, (rep * 0x6)
791+do
792+local r = random(0x6)
793+count[r]=(count[r] + 0x1)
794+end
795+totalrep=(totalrep + rep)
796+for i = 0x1, 0x6
797+do
798+if (not testnear(count[i],totalrep,0.05)) then
799+goto doagain
800+end
801+end
802+end
803+do
804+local function aux
805+(x1,x2)
806+local mark = {}
807+;
808+local count = 0x0
809+while true do
810+local t = random(x1,x2)
811+assert(((x1 <= t) and (t <= x2)))
812+if (not mark[t]) then
813+mark[t]=true
814+count=(count + 0x1)
815+if (count == ((x2 - x1) + 0x1)) then
816+goto ok
817+end
818+end
819+end
820+::ok::
821+end
822+aux((- 0xa),0x0)
823+aux(0x1,0x6)
824+aux(0x1,0x2)
825+aux(0x1,0xd)
826+aux(0x1,0x1f)
827+aux(0x1,0x20)
828+aux(0x1,0x21)
829+aux((- 0xa),0xa)
830+aux((- 0xa),(- 0xa))
831+aux(minint,minint)
832+aux(maxint,maxint)
833+aux(minint,(minint + 0x9))
834+aux((maxint - 0x3),maxint)
835+end
836+do
837+local function aux
838+(p1,p2)
839+local max = minint
840+local min = maxint
841+local n = 0x64
842+local mark = {}
843+;
844+local count = 0x0
845+::doagain::
846+for _ = 0x1, n
847+do
848+local t = random(p1,p2)
849+if (not mark[t]) then
850+assert(((p1 <= t) and (t <= p2)))
851+max=math.max(max,t)
852+min=math.min(min,t)
853+mark[t]=true
854+count=(count + 0x1)
855+end
856+end
857+if (not (count >= (n * 0.8))) then
858+goto doagain
859+end
860+local diff = ((p2 - p1) >> 0x4)
861+if (not ((min < (p1 + diff)) and (max > (p2 - diff)))) then
862+goto doagain
863+end
864+end
865+aux(0x0,maxint)
866+aux(0x1,maxint)
867+aux(0x3,(maxint // 0x3))
868+aux(minint,(- 0x1))
869+aux((minint // 0x2),(maxint // 0x2))
870+aux(minint,maxint)
871+aux((minint + 0x1),maxint)
872+aux(minint,(maxint - 0x1))
873+aux(0x0,(0x1 << (intbits - 0x5)))
874+end
875+assert((not pcall(random,0x1,0x2,0x3)))
876+assert((not pcall(random,(minint + 0x1),minint)))
877+assert((not pcall(random,maxint,(maxint - 0x1))))
878+assert((not pcall(random,maxint,minint)))
879+print("\u{4f}\u{4b}")
desk/res/lua/cycled/nextvar.luanew file+1055
@@ -0,0 +1,1055 @@
1+print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{73}\u{2c}\u{20}\u{6e}\u{65}\u{78}\u{74}\u{2c}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{66}\u{6f}\u{72}")
2+local function checkerror
3+(msg,f, ...)
4+local s,err = pcall(f,...)
5+assert((not (s and string.find(err,msg))))
6+end
7+local function check
8+(t,na,nh)
9+if (not T) then
10+return
11+end
12+local a,h = T.querytab(t)
13+if ((a ~= na) or (h ~= nh)) then
14+print(na,nh,a,h)
15+assert(nil)
16+end
17+end
18+local a = {}
19+for i = 0x1, 0x64
20+do
21+a[(i .. "\u{2b}")]=true
22+end
23+for i = 0x1, 0x64
24+do
25+a[(i .. "\u{2b}")]=undef
26+end
27+for i = 0x1, 0x64
28+do
29+a[i]=true
30+assert((# (a == i)))
31+end
32+do
33+local a = {}
34+for i = 0x1, 0x64
35+do
36+a[i]=i
37+end
38+check(a,0x80,0x0)
39+for i = 0x5, 0x5f
40+do
41+a[i]=nil
42+end
43+check(a,0x80,0x0)
44+a.x=0x1
45+check(a,0x4,0x8)
46+for i = 0x1, 0x4
47+do
48+assert((a[i] == i))
49+end
50+for i = 0x5, 0x5f
51+do
52+assert((a[i] == nil))
53+end
54+for i = 0x60, 0x64
55+do
56+assert((a[i] == i))
57+end
58+assert((a.x == 0x1))
59+end
60+local x = 0x0
61+for k,v in ipairs({0xa,0x14,0x1e,["\u{78}"] = 0xc})
62+do
63+x=(x + 0x1)
64+assert(((k == x) and (v == (x * 0xa))))
65+end
66+for _ in ipairs({["\u{78}"] = 0xc,["\u{79}"] = 0x18})
67+do
68+assert(nil)
69+end
70+x=false
71+local i = 0x0
72+for k,v in ipairs({true,false,true,false})
73+do
74+i=(i + 0x1)
75+x=(not x)
76+assert((x == v))
77+end
78+assert((i == 0x4))
79+assert(((type(ipairs({})) == "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}") and (ipairs({}) == ipairs({}))))
80+do
81+local f = ipairs({})
82+local k,v = f({[math.mininteger] = 0xa},math.maxinteger)
83+assert(((k == math.mininteger) and (v == 0xa)))
84+k,v=f({[math.mininteger] = 0xa},k)
85+assert((k == nil))
86+end
87+if (not T) then
88+(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{73}\u{69}\u{7a}\u{65}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
89+else
90+local function mp2
91+(n)
92+local mp = (0x2 ^ math.ceil(math.log(n,0x2)))
93+assert(((n == 0x0) or (((mp / 0x2) < n) and (n <= mp))))
94+return mp
95+end
96+do
97+local s = 0x0
98+for _ in pairs(math)
99+do
100+s=(s + 0x1)
101+end
102+check(math,0x0,mp2(s))
103+end
104+local sizes = {0x0,0x1,0x2,0x3,0x4,0x5,0x7,0x8,0x9,0xf,0x10,0x11,0x1e,0x1f,0x20,0x21,0x22,0xfe,0xff,0x100,0x1f4,0x3e8}
105+for _,sa in ipairs(sizes)
106+do
107+local arr = {"\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{7b}"}
108+for i = 0x1, sa
109+do
110+arr[(0x1 + i)]="\u{31}\u{2c}"
111+end
112+for _,sh in ipairs(sizes)
113+do
114+for j = 0x1, sh
115+do
116+arr[((0x1 + sa) + j)]=string.format("\u{6b}\u{25}\u{78}\u{3d}\u{25}\u{64}\u{2c}",j,j)
117+end
118+arr[(((0x1 + sa) + sh) + 0x1)]="\u{7d}"
119+local prog = table.concat(arr)
120+local f = assert(load(prog))
121+collectgarbage("\u{73}\u{74}\u{6f}\u{70}")
122+f()
123+if ((sa == 0x0) or (sh == 0x0)) then
124+T.alloccount(0x2)
125+;
126+else
127+T.alloccount(0x3)
128+;
129+end
130+local t = f()
131+T.alloccount()
132+;
133+collectgarbage("\u{72}\u{65}\u{73}\u{74}\u{61}\u{72}\u{74}")
134+assert((# (t == sa)))
135+check(t,sa,mp2(sh))
136+end
137+end
138+local a = {}
139+for i = 0x1, sizes[(# sizes)]
140+do
141+a[i]=i
142+end
143+for k in ipairs(sizes)
144+do
145+local t = {table.unpack(a,0x1,k)}
146+assert((# (t == k)))
147+check(t,k,0x0)
148+t={0x1,0x2,0x3,table.unpack(a,0x1,k)}
149+check(t,(k + 0x3),0x0)
150+assert((# (t == (k + 0x3))))
151+end
152+local lim = 0x82
153+local a = {}
154+;
155+a[0x2]=0x1
156+;
157+check(a,0x0,0x1)
158+a={}
159+;
160+a[0x0]=0x1
161+;
162+check(a,0x0,0x1)
163+;
164+a[0x2]=0x1
165+;
166+check(a,0x0,0x2)
167+a={}
168+;
169+a[0x0]=0x1
170+;
171+a[0x1]=0x1
172+;
173+check(a,0x1,0x1)
174+a={}
175+for i = 0x1, lim
176+do
177+a[i]=0x1
178+assert((# (a == i)))
179+check(a,mp2(i),0x0)
180+end
181+a={}
182+for i = 0x1, lim
183+do
184+a[("\u{61}" .. i)]=0x1
185+assert((# (a == 0x0)))
186+check(a,0x0,mp2(i))
187+end
188+a={}
189+for i = 0x1, 0x10
190+do
191+a[i]=i
192+end
193+check(a,0x10,0x0)
194+do
195+for i = 0x1, 0xb
196+do
197+a[i]=undef
198+end
199+for i = 0x1e, 0x32
200+do
201+a[i]=true
202+;
203+a[i]=undef
204+end
205+check(a,0x0,0x8)
206+a[0xa]=0x1
207+for i = 0x1e, 0x32
208+do
209+a[i]=true
210+;
211+a[i]=undef
212+end
213+check(a,0x0,0x8)
214+for i = 0x1, 0xe
215+do
216+a[i]=true
217+;
218+a[i]=undef
219+end
220+for i = 0x12, 0x32
221+do
222+a[i]=true
223+;
224+a[i]=undef
225+end
226+check(a,0x0,0x4)
227+end
228+for i = 0x1, lim
229+do
230+local a = {}
231+for i = i, 0x1, (- 0x1)
232+do
233+a[i]=i
234+end
235+check(a,mp2(i),0x0)
236+end
237+lim=0x23
238+local function foo
239+(n, ...)
240+local arg = {...}
241+check(arg,n,0x0)
242+assert((select("\u{23}",...) == n))
243+arg[(n + 0x1)]=true
244+check(arg,mp2((n + 0x1)),0x0)
245+arg.x=true
246+check(arg,mp2((n + 0x1)),0x1)
247+end
248+local a = {}
249+for i = 0x1, lim
250+do
251+a[i]=true
252+;
253+foo(i,table.unpack(a))
254+end
255+local a = {}
256+for i = 0x1, 0x40
257+do
258+a[i]=true
259+end
260+for i = 0x1, 0x40
261+do
262+a[i]=nil
263+end
264+assert((T.querytab(a) == 0x40))
265+a[0x20]=true
266+;
267+a[0x30]=true
268+;
269+a[0x33]=true
270+assert((# (a == 0x30)))
271+assert((select(0x4,T.querytab(a)) == 0x30))
272+a[0x32]=true
273+assert((select(0x4,T.querytab(a)) == 0x32))
274+assert((# (a == 0x33)))
275+end
276+assert((# ({} == 0x0)))
277+assert((# ({nil} == 0x0)))
278+assert((# ({nil,nil} == 0x0)))
279+assert((# ({nil,nil,nil} == 0x0)))
280+assert((# ({nil,nil,nil,nil} == 0x0)))
281+assert((# ({0x1,0x2,0x3,nil,nil} == 0x3)))
282+print("\u{2b}")
283+local nofind = {}
284+a,b,c=0x1,0x2,0x3
285+a,b,c=nil
286+assert((next({}) == next({})))
287+local function find
288+(name)
289+local n,v
290+while 0x1 do
291+n,v=next(_G,n)
292+if (not n) then
293+return nofind
294+end
295+assert((_G[n] ~= undef))
296+if (n == name) then
297+return v
298+end
299+end
300+end
301+local function find1
302+(name)
303+for n,v in pairs(_G)
304+do
305+if (n == name) then
306+return v
307+end
308+end
309+return nil
310+end
311+assert(((print == find("\u{70}\u{72}\u{69}\u{6e}\u{74}")) and (print == find1("\u{70}\u{72}\u{69}\u{6e}\u{74}"))))
312+assert((_G["\u{70}\u{72}\u{69}\u{6e}\u{74}"] == find("\u{70}\u{72}\u{69}\u{6e}\u{74}")))
313+assert((assert == find1("\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}")))
314+assert((nofind == find("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}")))
315+assert((not find1("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}")))
316+_G[("\u{72}\u{65}\u{74}" .. "\u{75}\u{72}\u{6e}")]=undef
317+assert((nofind == find("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}")))
318+_G["\u{78}\u{78}\u{78}"]=0x1
319+assert((xxx == find("\u{78}\u{78}\u{78}")))
320+checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{6b}\u{65}\u{79}",next,{0xa,0x14},0x3)
321+checkerror("\u{62}\u{61}\u{64}\u{20}\u{61}\u{72}\u{67}\u{75}\u{6d}\u{65}\u{6e}\u{74}",pairs)
322+checkerror("\u{62}\u{61}\u{64}\u{20}\u{61}\u{72}\u{67}\u{75}\u{6d}\u{65}\u{6e}\u{74}",ipairs)
323+print("\u{2b}")
324+a={}
325+for i = 0x0, 0x2710
326+do
327+if (math.fmod(i,0xa) ~= 0x0) then
328+a[("\u{78}" .. i)]=i
329+end
330+end
331+n={["\u{6e}"] = 0x0}
332+for i,v in pairs(a)
333+do
334+n.n=(n.n + 0x1)
335+assert(((i and v) and (a[i] == v)))
336+end
337+assert((n.n == 0x2328))
338+a=nil
339+do
340+local a = {}
341+for n,v in pairs(_G)
342+do
343+a[n]=v
344+end
345+for n,v in pairs(a)
346+do
347+if (not ((package.loaded[n] and (type(v) ~= "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}")) and (not string.find(n,"\u{5e}\u{5b}\u{25}\u{75}\u{5f}\u{5d}")))) then
348+_G[n]=undef
349+end
350+collectgarbage()
351+end
352+end
353+local function checknext
354+(a)
355+local b = {}
356+do
357+local k,v = next(a)
358+;
359+while k do
360+b[k]=v
361+;
362+k,v=next(a,k)
363+end
364+end
365+for k,v in pairs(b)
366+do
367+assert((a[k] == v))
368+end
369+for k,v in pairs(a)
370+do
371+assert((b[k] == v))
372+end
373+end
374+checknext({0x1,["\u{78}"] = 0x1,["\u{79}"] = 0x2,["\u{7a}"] = 0x3})
375+checknext({0x1,0x2,["\u{78}"] = 0x1,["\u{79}"] = 0x2,["\u{7a}"] = 0x3})
376+checknext({0x1,0x2,0x3,["\u{78}"] = 0x1,["\u{79}"] = 0x2,["\u{7a}"] = 0x3})
377+checknext({0x1,0x2,0x3,0x4,["\u{78}"] = 0x1,["\u{79}"] = 0x2,["\u{7a}"] = 0x3})
378+checknext({0x1,0x2,0x3,0x4,0x5,["\u{78}"] = 0x1,["\u{79}"] = 0x2,["\u{7a}"] = 0x3})
379+assert((# ({} == 0x0)))
380+assert((# ({[(- 0x1)] = 0x2} == 0x0)))
381+for i = 0x0, 0x28
382+do
383+local a = {}
384+for j = 0x1, i
385+do
386+a[j]=j
387+end
388+assert((# (a == i)))
389+end
390+function table.maxn(t)
391+local max = 0x0
392+for k in pairs(t)
393+do
394+max=(((type(k) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}") and math.max(max,k)) or max)
395+end
396+return max
397+end
398+assert((table.maxn({}) == 0x0))
399+assert((table.maxn({["\u{31}\u{30}\u{30}\u{30}"] = true}) == 0x0))
400+assert((table.maxn({["\u{31}\u{30}\u{30}\u{30}"] = true,[24.5] = 0x3}) == 24.5))
401+assert((table.maxn({[0x3e8] = true}) == 0x3e8))
402+assert((table.maxn({[0xa] = true,[(0x64 * math.pi)] = print}) == (0x64 * math.pi)))
403+table.maxn=nil
404+a={}
405+for i = 0x0, 0x32
406+do
407+a[(0x2 ^ i)]=true
408+end
409+assert(a[(# a)])
410+print("\u{2b}")
411+do
412+local a = {[0x1] = 0x1,[1.1] = 0x2,["\u{78}"] = 0x3,[string.rep("\u{78}",0x3e8)] = 0x4,[print] = 0x5,[checkerror] = 0x6,[coroutine.running()] = 0x7,[true] = 0x8,[io.stdin] = 0x9,[{}] = 0xa}
413+local b = {}
414+;
415+for i = 0x1, 0xa
416+do
417+b[i]=true
418+end
419+for k,v in pairs(a)
420+do
421+assert(b[v])
422+;
423+b[v]=undef
424+end
425+assert((next(b) == nil))
426+end
427+local t = {[{0x1}] = 0x1,[{0x2}] = 0x2,[string.rep("\u{78}\u{20}",0x4)] = 0x3,[100.3] = 0x4,[0x4] = 0x5}
428+local n = 0x0
429+for k,v in pairs(t)
430+do
431+n=(n + 0x1)
432+assert((t[k] == v))
433+t[k]=undef
434+collectgarbage()
435+assert((t[k] == undef))
436+end
437+assert((n == 0x5))
438+do
439+print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{6e}\u{65}\u{78}\u{74}\u{20}\u{78}\u{20}\u{47}\u{43}\u{20}\u{6f}\u{66}\u{20}\u{64}\u{65}\u{6c}\u{65}\u{74}\u{65}\u{64}\u{20}\u{6b}\u{65}\u{79}\u{73}")
440+local co = coroutine.wrap(function (t)
441+for k,v in pairs(t)
442+do
443+local k1 = next(t)
444+assert((k == k1))
445+t[k]=nil
446+local expected = ((((type(k) == "\u{74}\u{61}\u{62}\u{6c}\u{65}") and k[0x1]) or ((type(k) == "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}") and k())) or string.sub(k,0x1,0x1))
447+assert((expected == v))
448+coroutine.yield(v)
449+end
450+end)
451+local t = {}
452+t[{0x1}]=0x1
453+t[{0x2}]=0x2
454+t[string.rep("\u{61}",0x32)]="\u{61}"
455+t[string.rep("\u{62}",0x32)]="\u{62}"
456+t[{0x3}]=0x3
457+t[string.rep("\u{63}",0xa)]="\u{63}"
458+t[function ()
459+return 0xa
460+end]=0xa
461+local count = 0x7
462+while co(t) do
463+collectgarbage("\u{63}\u{6f}\u{6c}\u{6c}\u{65}\u{63}\u{74}")
464+count=(count - 0x1)
465+end
466+assert(((count == 0x0) and (next(t) == nil)))
467+end
468+local function test
469+(a)
470+assert((not pcall(table.insert,a,0x2,0x14)))
471+;
472+table.insert(a,0xa)
473+;
474+table.insert(a,0x2,0x14)
475+;
476+table.insert(a,0x1,(- 0x1))
477+;
478+table.insert(a,0x28)
479+;
480+table.insert(a,(# (a + 0x1)),0x32)
481+table.insert(a,0x2,(- 0x2))
482+assert((a[0x2] ~= undef))
483+assert((a["\u{32}"] == undef))
484+assert((not pcall(table.insert,a,0x0,0x14)))
485+;
486+assert((not pcall(table.insert,a,(# (a + 0x2)),0x14)))
487+;
488+assert((table.remove(a,0x1) == (- 0x1)))
489+assert((table.remove(a,0x1) == (- 0x2)))
490+assert((table.remove(a,0x1) == 0xa))
491+assert((table.remove(a,0x1) == 0x14))
492+assert((table.remove(a,0x1) == 0x28))
493+assert((table.remove(a,0x1) == 0x32))
494+assert((table.remove(a,0x1) == nil))
495+assert((table.remove(a) == nil))
496+assert((table.remove(a,(# a)) == nil))
497+end
498+a={["\u{6e}"] = 0x0,[(- 0x7)] = "\u{62}\u{61}\u{6e}"}
499+test(a)
500+assert(((a.n == 0x0) and (a[(- 0x7)] == "\u{62}\u{61}\u{6e}")))
501+a={[(- 0x7)] = "\u{62}\u{61}\u{6e}"}
502+;
503+test(a)
504+assert(((a.n == nil) and (# ((a == 0x0) and (a[(- 0x7)] == "\u{62}\u{61}\u{6e}")))))
505+a={[(- 0x1)] = "\u{62}\u{61}\u{6e}"}
506+test(a)
507+assert((# (((a == 0x0) and (table.remove(a) == nil)) and (a[(- 0x1)] == "\u{62}\u{61}\u{6e}"))))
508+a={[0x0] = "\u{62}\u{61}\u{6e}"}
509+assert((# (((a == 0x0) and (table.remove(a) == "\u{62}\u{61}\u{6e}")) and (a[0x0] == undef))))
510+table.insert(a,0x1,0xa)
511+;
512+table.insert(a,0x1,0x14)
513+;
514+table.insert(a,0x1,(- 0x1))
515+assert((table.remove(a) == 0xa))
516+assert((table.remove(a) == 0x14))
517+assert((table.remove(a) == (- 0x1)))
518+assert((table.remove(a) == nil))
519+a={"\u{63}","\u{64}"}
520+table.insert(a,0x3,"\u{61}")
521+table.insert(a,"\u{62}")
522+assert((table.remove(a,0x1) == "\u{63}"))
523+assert((table.remove(a,0x1) == "\u{64}"))
524+assert((table.remove(a,0x1) == "\u{61}"))
525+assert((table.remove(a,0x1) == "\u{62}"))
526+assert((table.remove(a,0x1) == nil))
527+assert((# ((a == 0x0) and (a.n == nil))))
528+a={0xa,0x14,0x1e,0x28}
529+assert((table.remove(a,(# (a + 0x1))) == nil))
530+assert((not pcall(table.remove,a,0x0)))
531+assert((a[(# a)] == 0x28))
532+assert((table.remove(a,(# a)) == 0x28))
533+assert((a[(# a)] == 0x1e))
534+assert((table.remove(a,0x2) == 0x14))
535+assert(((a[(# a)] == 0x1e) and (# (a == 0x2))))
536+do
537+local function test
538+(proxy,t)
539+for i = 0x1, 0xa
540+do
541+table.insert(proxy,0x1,i)
542+end
543+assert((# ((proxy == 0xa) and (# ((t == 0xa) and (proxy[0x1] ~= undef))))))
544+for i = 0x1, 0xa
545+do
546+assert((t[i] == (0xb - i)))
547+end
548+table.sort(proxy)
549+for i = 0x1, 0xa
550+do
551+assert(((t[i] == i) and (proxy[i] == i)))
552+end
553+assert((table.concat(proxy,"\u{2c}") == "\u{31}\u{2c}\u{32}\u{2c}\u{33}\u{2c}\u{34}\u{2c}\u{35}\u{2c}\u{36}\u{2c}\u{37}\u{2c}\u{38}\u{2c}\u{39}\u{2c}\u{31}\u{30}"))
554+for i = 0x1, 0x8
555+do
556+assert((table.remove(proxy,0x1) == i))
557+end
558+assert((# ((proxy == 0x2) and (# (t == 0x2)))))
559+local a,b,c = table.unpack(proxy)
560+assert((((a == 0x9) and (b == 0xa)) and (c == nil)))
561+end
562+local t = {}
563+local proxy = setmetatable({},{["\u{5f}\u{5f}\u{6c}\u{65}\u{6e}"] = function ()
564+return (# t)
565+end,["\u{5f}\u{5f}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = t,["\u{5f}\u{5f}\u{6e}\u{65}\u{77}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = t})
566+test(proxy,t)
567+local count = 0x0
568+t=setmetatable({},{["\u{5f}\u{5f}\u{6e}\u{65}\u{77}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = function (t,k,v)
569+count=(count + 0x1)
570+;
571+rawset(t,k,v)
572+end})
573+test(t,t)
574+assert((count == 0xa))
575+t=setmetatable({},{["\u{5f}\u{5f}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = function (_,k)
576+return (k + 0x1)
577+end,["\u{5f}\u{5f}\u{6c}\u{65}\u{6e}"] = function (_)
578+return 0x5
579+end})
580+assert((table.concat(t,"\u{3b}") == "\u{32}\u{3b}\u{33}\u{3b}\u{34}\u{3b}\u{35}\u{3b}\u{36}"))
581+end
582+do
583+local t = setmetatable({},{["\u{5f}\u{5f}\u{6c}\u{65}\u{6e}"] = function ()
584+return math.maxinteger
585+end})
586+table.insert(t,0x14)
587+local k,v = next(t)
588+assert(((k == math.mininteger) and (v == 0x14)))
589+end
590+if (not T) then
591+(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{6c}\u{69}\u{62}\u{72}\u{61}\u{72}\u{79}\u{20}\u{6f}\u{6e}\u{20}\u{6e}\u{6f}\u{6e}\u{2d}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
592+else
593+local debug = require("\u{64}\u{65}\u{62}\u{75}\u{67}")
594+local tab = {0xa,0x14,0x1e}
595+local mt = {}
596+local u = T.newuserdata(0x0)
597+checkerror("\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}",table.insert,u,0x28)
598+checkerror("\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}",table.remove,u)
599+debug.setmetatable(u,mt)
600+checkerror("\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}",table.insert,u,0x28)
601+checkerror("\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}",table.remove,u)
602+mt.__index=tab
603+checkerror("\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}",table.insert,u,0x28)
604+checkerror("\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}",table.remove,u)
605+mt.__newindex=tab
606+checkerror("\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}",table.insert,u,0x28)
607+checkerror("\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}",table.remove,u)
608+mt.__len=function ()
609+return (# tab)
610+end
611+table.insert(u,0x28)
612+assert((# ((u == 0x4) and (# (((tab == 0x4) and (u[0x4] == 0x28)) and (tab[0x4] == 0x28))))))
613+assert((table.remove(u) == 0x28))
614+table.insert(u,0x1,0x32)
615+assert((# ((u == 0x4) and (# (((tab == 0x4) and (u[0x4] == 0x1e)) and (tab[0x1] == 0x32))))))
616+mt.__newindex=nil
617+mt.__len=nil
618+local tab2 = {}
619+local u2 = T.newuserdata(0x0)
620+debug.setmetatable(u2,{["\u{5f}\u{5f}\u{6e}\u{65}\u{77}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = function (_,k,v)
621+tab2[k]=v
622+end})
623+table.move(u,0x1,0x4,0x1,u2)
624+assert((# (((tab2 == 0x4) and (tab2[0x1] == tab[0x1])) and (tab2[0x4] == tab[0x4]))))
625+end
626+print("\u{2b}")
627+a={}
628+for i = 0x1, 0x3e8
629+do
630+a[i]=i
631+;
632+a[(i - 0x1)]=undef
633+end
634+assert(((next(a,nil) == 0x3e8) and (next(a,0x3e8) == nil)))
635+assert((next({}) == nil))
636+assert((next({},nil) == nil))
637+for a,b in pairs({})
638+do
639+error("\u{6e}\u{6f}\u{74}\u{20}\u{68}\u{65}\u{72}\u{65}")
640+end
641+for i = 0x1, 0x0
642+do
643+error("\u{6e}\u{6f}\u{74}\u{20}\u{68}\u{65}\u{72}\u{65}")
644+end
645+for i = 0x0, 0x1, (- 0x1)
646+do
647+error("\u{6e}\u{6f}\u{74}\u{20}\u{68}\u{65}\u{72}\u{65}")
648+end
649+a=nil
650+;
651+for i = 0x1, 0x1
652+do
653+assert((not a))
654+;
655+a=0x1
656+end
657+;
658+assert(a)
659+a=nil
660+;
661+for i = 0x1, 0x1, (- 0x1)
662+do
663+assert((not a))
664+;
665+a=0x1
666+end
667+;
668+assert(a)
669+do
670+print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{66}\u{6c}\u{6f}\u{61}\u{74}\u{73}\u{20}\u{69}\u{6e}\u{20}\u{6e}\u{75}\u{6d}\u{65}\u{72}\u{69}\u{63}\u{20}\u{66}\u{6f}\u{72}")
671+local a
672+a=0x0
673+;
674+for i = 0x1, 0x1, 0x1
675+do
676+a=(a + 0x1)
677+end
678+;
679+assert((a == 0x1))
680+a=0x0
681+;
682+for i = 0x2710, 1e4, (- 0x1)
683+do
684+a=(a + 0x1)
685+end
686+;
687+assert((a == 0x1))
688+a=0x0
689+;
690+for i = 0x1, 0.99999, 0x1
691+do
692+a=(a + 0x1)
693+end
694+;
695+assert((a == 0x0))
696+a=0x0
697+;
698+for i = 0x270f, 1e4, (- 0x1)
699+do
700+a=(a + 0x1)
701+end
702+;
703+assert((a == 0x0))
704+a=0x0
705+;
706+for i = 0x1, 0.99999, (- 0x1)
707+do
708+a=(a + 0x1)
709+end
710+;
711+assert((a == 0x1))
712+a=0x0
713+;
714+for i = 0x0, 0.999999999, 0.1
715+do
716+a=(a + 0x1)
717+end
718+;
719+assert((a == 0xa))
720+a=0x0
721+;
722+for i = 1.0, 0x1, 0x1
723+do
724+a=(a + 0x1)
725+end
726+;
727+assert((a == 0x1))
728+a=0x0
729+;
730+for i = (- 1.5), (- 1.5), 0x1
731+do
732+a=(a + 0x1)
733+end
734+;
735+assert((a == 0x1))
736+a=0x0
737+;
738+for i = 1e6, 1e6, (- 0x1)
739+do
740+a=(a + 0x1)
741+end
742+;
743+assert((a == 0x1))
744+a=0x0
745+;
746+for i = 1.0, 0.99999, 0x1
747+do
748+a=(a + 0x1)
749+end
750+;
751+assert((a == 0x0))
752+a=0x0
753+;
754+for i = 0x1869f, 1e5, (- 1.0)
755+do
756+a=(a + 0x1)
757+end
758+;
759+assert((a == 0x0))
760+a=0x0
761+;
762+for i = 1.0, 0.99999, (- 0x1)
763+do
764+a=(a + 0x1)
765+end
766+;
767+assert((a == 0x1))
768+end
769+do
770+local a
771+a=0x0
772+;
773+for i = 0x1, 0xa
774+do
775+a=(a + 0x1)
776+;
777+i="\u{78}"
778+end
779+;
780+assert((a == 0xa))
781+a=0x0
782+;
783+for i = 10.0, 0x1, (- 0x1)
784+do
785+a=(a + 0x1)
786+;
787+i="\u{78}"
788+end
789+;
790+assert((a == 0xa))
791+end
792+a=0x0
793+;
794+for i = "\u{31}\u{30}", "\u{31}", "\u{2d}\u{32}"
795+do
796+a=(a + 0x1)
797+end
798+;
799+assert((a == 0x5))
800+do
801+local c
802+local function checkfloat
803+(i)
804+assert((math.type(i) == "\u{66}\u{6c}\u{6f}\u{61}\u{74}"))
805+c=(c + 0x1)
806+end
807+c=0x0
808+;
809+for i = 1.0, 0xa
810+do
811+checkfloat(i)
812+end
813+assert((c == 0xa))
814+c=0x0
815+;
816+for i = (- 0x1), (- 0xa), (- 1.0)
817+do
818+checkfloat(i)
819+end
820+assert((c == 0xa))
821+local function checkint
822+(i)
823+assert((math.type(i) == "\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}"))
824+c=(c + 0x1)
825+end
826+local m = math.maxinteger
827+c=0x0
828+;
829+for i = m, (m - 0xa), (- 0x1)
830+do
831+checkint(i)
832+end
833+assert((c == 0xb))
834+c=0x0
835+;
836+for i = 0x1, 10.9
837+do
838+checkint(i)
839+end
840+assert((c == 0xa))
841+c=0x0
842+;
843+for i = 0xa, 1e-3, (- 0x1)
844+do
845+checkint(i)
846+end
847+assert((c == 0xa))
848+c=0x0
849+;
850+for i = 0x1, "\u{31}\u{30}\u{2e}\u{38}"
851+do
852+checkint(i)
853+end
854+assert((c == 0xa))
855+c=0x0
856+;
857+for i = 0x9, "\u{33}\u{2e}\u{34}", (- 0x1)
858+do
859+checkint(i)
860+end
861+assert((c == 0x6))
862+c=0x0
863+;
864+for i = 0x0, "\u{20}\u{2d}\u{33}\u{2e}\u{34}\u{20}\u{20}", (- 0x1)
865+do
866+checkint(i)
867+end
868+assert((c == 0x4))
869+c=0x0
870+;
871+for i = 0x64, "\u{39}\u{36}\u{2e}\u{33}", (- 0x2)
872+do
873+checkint(i)
874+end
875+assert((c == 0x2))
876+c=0x0
877+;
878+for i = 0x1, math.huge
879+do
880+if (i > 0xa) then
881+break
882+end
883+;
884+checkint(i)
885+end
886+assert((c == 0xa))
887+c=0x0
888+;
889+for i = (- 0x1), (- math.huge), (- 0x1)
890+do
891+if (i < (- 0xa)) then
892+break
893+end
894+;
895+checkint(i)
896+end
897+assert((c == 0xa))
898+for i = math.mininteger, (- 1e101)
899+do
900+assert(false)
901+end
902+for i = math.maxinteger, 1e101, (- 0x1)
903+do
904+assert(false)
905+end
906+end
907+do
908+local function checkfor
909+(from,to,step,t)
910+local c = 0x0
911+for i = from, to, step
912+do
913+c=(c + 0x1)
914+assert((i == t[c]))
915+end
916+assert((c == (# t)))
917+end
918+local maxi = math.maxinteger
919+local mini = math.mininteger
920+checkfor(mini,maxi,maxi,{mini,(- 0x1),(maxi - 0x1)})
921+checkfor(mini,math.huge,maxi,{mini,(- 0x1),(maxi - 0x1)})
922+checkfor(maxi,mini,mini,{maxi,(- 0x1)})
923+checkfor(maxi,mini,(- maxi),{maxi,0x0,(- maxi)})
924+checkfor(maxi,(- math.huge),mini,{maxi,(- 0x1)})
925+checkfor(maxi,mini,0x1,{})
926+checkfor(mini,maxi,(- 0x1),{})
927+checkfor((maxi - 0x6),maxi,0x3,{(maxi - 0x6),(maxi - 0x3),maxi})
928+checkfor((mini + 0x4),mini,(- 0x2),{(mini + 0x4),(mini + 0x2),mini})
929+local step = (maxi // 0xa)
930+local c = mini
931+for i = mini, maxi, step
932+do
933+assert((i == c))
934+c=(c + step)
935+end
936+c=maxi
937+for i = maxi, mini, (- step)
938+do
939+assert((i == c))
940+c=(c - step)
941+end
942+checkfor(maxi,maxi,maxi,{maxi})
943+checkfor(maxi,maxi,mini,{maxi})
944+checkfor(mini,mini,maxi,{mini})
945+checkfor(mini,mini,mini,{mini})
946+end
947+checkerror("\u{27}\u{66}\u{6f}\u{72}\u{27}\u{20}\u{73}\u{74}\u{65}\u{70}\u{20}\u{69}\u{73}\u{20}\u{7a}\u{65}\u{72}\u{6f}",function ()
948+for i = 0x1, 0xa, 0x0
949+do
950+
951+end
952+end)
953+checkerror("\u{27}\u{66}\u{6f}\u{72}\u{27}\u{20}\u{73}\u{74}\u{65}\u{70}\u{20}\u{69}\u{73}\u{20}\u{7a}\u{65}\u{72}\u{6f}",function ()
954+for i = 0x1, (- 0xa), 0x0
955+do
956+
957+end
958+end)
959+checkerror("\u{27}\u{66}\u{6f}\u{72}\u{27}\u{20}\u{73}\u{74}\u{65}\u{70}\u{20}\u{69}\u{73}\u{20}\u{7a}\u{65}\u{72}\u{6f}",function ()
960+for i = 1.0, (- 0xa), 0.0
961+do
962+
963+end
964+end)
965+collectgarbage()
966+local function f
967+(n,p)
968+local t = {}
969+;
970+for i = 0x1, p
971+do
972+t[i]=(i * 0xa)
973+end
974+return function (_,n, ...)
975+assert((select("\u{23}",...) == 0x0))
976+if (n > 0x0) then
977+n=(n - 0x1)
978+return n,table.unpack(t)
979+end
980+end,nil,n
981+end
982+local x = 0x0
983+for n,a,b,c,d in f(0x5,0x3)
984+do
985+x=(x + 0x1)
986+assert(((((a == 0xa) and (b == 0x14)) and (c == 0x1e)) and (d == nil)))
987+end
988+assert((x == 0x5))
989+a={}
990+do
991+local x,y,z = pairs(a)
992+assert((((type(x) == "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}") and (y == a)) and (z == nil)))
993+end
994+local function foo
995+(e,i)
996+assert((e == a))
997+if (i <= 0xa) then
998+return (i + 0x1),(i + 0x2)
999+end
1000+end
1001+local function foo1
1002+(e,i)
1003+i=(i + 0x1)
1004+assert((e == a))
1005+if (i <= e.n) then
1006+return i,a[i]
1007+end
1008+end
1009+setmetatable(a,{["\u{5f}\u{5f}\u{70}\u{61}\u{69}\u{72}\u{73}"] = function (x)
1010+return foo,x,0x0
1011+end})
1012+local i = 0x0
1013+for k,v in pairs(a)
1014+do
1015+i=(i + 0x1)
1016+assert(((k == i) and (v == (k + 0x1))))
1017+end
1018+a.n=0x5
1019+a[0x3]=0x1e
1020+a={["\u{6e}"] = 0xa}
1021+setmetatable(a,{["\u{5f}\u{5f}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = function (t,k)
1022+if (k <= t.n) then
1023+return (k * 0xa)
1024+end
1025+end})
1026+i=0x0
1027+for k,v in ipairs(a)
1028+do
1029+i=(i + 0x1)
1030+assert(((k == i) and (v == (i * 0xa))))
1031+end
1032+assert((i == a.n))
1033+do
1034+local t = setmetatable({0xa,0x14,0x1e},{["\u{5f}\u{5f}\u{70}\u{61}\u{69}\u{72}\u{73}"] = function (t)
1035+local inc = coroutine.yield()
1036+return function (t,i)
1037+if (i > 0x1) then
1038+return (i - inc),t[(i - inc)]
1039+else
1040+return nil
1041+end
1042+end,t,(# (t + 0x1))
1043+end})
1044+local res = {}
1045+local co = coroutine.wrap(function ()
1046+for i,p in pairs(t)
1047+do
1048+res[(# (res + 0x1))]=p
1049+end
1050+end)
1051+co()
1052+co(0x1)
1053+assert(((((res[0x1] == 0x1e) and (res[0x2] == 0x14)) and (res[0x3] == 0xa)) and (# (res == 0x3))))
1054+end
1055+print("\u{4f}\u{4b}")
desk/res/lua/cycled/pm.luanew file+404
@@ -0,0 +1,404 @@
1+print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{70}\u{61}\u{74}\u{74}\u{65}\u{72}\u{6e}\u{20}\u{6d}\u{61}\u{74}\u{63}\u{68}\u{69}\u{6e}\u{67}")
2+local function checkerror
3+(msg,f, ...)
4+local s,err = pcall(f,...)
5+assert((not (s and string.find(err,msg))))
6+end
7+local function f
8+(s,p)
9+local i,e = string.find(s,p)
10+if i then
11+return string.sub(s,i,e)
12+end
13+end
14+local a,b = string.find("","")
15+assert(((a == 0x1) and (b == 0x0)))
16+;
17+a,b=string.find("\u{61}\u{6c}\u{6f}","")
18+assert(((a == 0x1) and (b == 0x0)))
19+a,b=string.find("\u{61}\u{0}\u{6f}\u{20}\u{61}\u{0}\u{6f}\u{20}\u{61}\u{0}\u{6f}","\u{61}",0x1)
20+assert(((a == 0x1) and (b == 0x1)))
21+a,b=string.find("\u{61}\u{0}\u{6f}\u{20}\u{61}\u{0}\u{6f}\u{20}\u{61}\u{0}\u{6f}","\u{61}\u{0}\u{6f}",0x2)
22+assert(((a == 0x5) and (b == 0x7)))
23+a,b=string.find("\u{61}\u{0}\u{6f}\u{20}\u{61}\u{0}\u{6f}\u{20}\u{61}\u{0}\u{6f}","\u{61}\u{0}\u{6f}",0x9)
24+assert(((a == 0x9) and (b == 0xb)))
25+a,b=string.find("\u{61}\u{0}\u{61}\u{0}\u{61}\u{0}\u{61}\u{0}\u{0}\u{61}\u{62}","\u{0}\u{61}\u{62}",0x2)
26+;
27+assert(((a == 0x9) and (b == 0xb)))
28+;
29+a,b=string.find("\u{61}\u{0}\u{61}\u{0}\u{61}\u{0}\u{61}\u{0}\u{0}\u{61}\u{62}","\u{62}")
30+assert(((a == 0xb) and (b == 0xb)))
31+assert((not string.find("\u{61}\u{0}\u{61}\u{0}\u{61}\u{0}\u{61}\u{0}\u{0}\u{61}\u{62}","\u{62}\u{0}")))
32+assert((not string.find("","\u{0}")))
33+assert((string.find("\u{61}\u{6c}\u{6f}\u{31}\u{32}\u{33}\u{61}\u{6c}\u{6f}","\u{31}\u{32}") == 0x4))
34+assert((not string.find("\u{61}\u{6c}\u{6f}\u{31}\u{32}\u{33}\u{61}\u{6c}\u{6f}","\u{5e}\u{31}\u{32}")))
35+assert((string.match("\u{61}\u{61}\u{61}\u{62}","\u{2e}\u{2a}\u{62}") == "\u{61}\u{61}\u{61}\u{62}"))
36+assert((string.match("\u{61}\u{61}\u{61}","\u{2e}\u{2a}\u{61}") == "\u{61}\u{61}\u{61}"))
37+assert((string.match("\u{62}","\u{2e}\u{2a}\u{62}") == "\u{62}"))
38+assert((string.match("\u{61}\u{61}\u{61}\u{62}","\u{2e}\u{2b}\u{62}") == "\u{61}\u{61}\u{61}\u{62}"))
39+assert((string.match("\u{61}\u{61}\u{61}","\u{2e}\u{2b}\u{61}") == "\u{61}\u{61}\u{61}"))
40+assert((not string.match("\u{62}","\u{2e}\u{2b}\u{62}")))
41+assert((string.match("\u{61}\u{61}\u{61}\u{62}","\u{2e}\u{3f}\u{62}") == "\u{61}\u{62}"))
42+assert((string.match("\u{61}\u{61}\u{61}","\u{2e}\u{3f}\u{61}") == "\u{61}\u{61}"))
43+assert((string.match("\u{62}","\u{2e}\u{3f}\u{62}") == "\u{62}"))
44+assert((f("\u{61}\u{6c}\u{6f}\u{41}\u{4c}\u{4f}","\u{25}\u{6c}\u{2a}") == "\u{61}\u{6c}\u{6f}"))
45+assert((f("\u{61}\u{4c}\u{6f}\u{5f}\u{41}\u{4c}\u{4f}","\u{25}\u{61}\u{2a}") == "\u{61}\u{4c}\u{6f}"))
46+assert((f("\u{20}\u{20}\u{a}\u{d}\u{2a}\u{26}\u{a}\u{d}\u{20}\u{20}\u{20}\u{78}\u{75}\u{78}\u{75}\u{20}\u{20}\u{a}\u{a}","\u{25}\u{67}\u{25}\u{67}\u{25}\u{67}\u{2b}") == "\u{78}\u{75}\u{78}\u{75}"))
47+local function PU
48+(p)
49+p=string.gsub(p,("\u{28}" .. (utf8.charpattern .. "\u{29}\u{25}\u{3f}")),function (c)
50+return string.gsub(c,"\u{2e}","\u{25}\u{30}\u{3f}")
51+end)
52+p=string.gsub(p,"\u{25}\u{2e}",utf8.charpattern)
53+return p
54+end
55+assert((f("\u{61}\u{61}\u{61}\u{62}","\u{61}\u{2a}") == "\u{61}\u{61}\u{61}"))
56+;
57+assert((f("\u{61}\u{61}\u{61}","\u{5e}\u{2e}\u{2a}\u{24}") == "\u{61}\u{61}\u{61}"))
58+;
59+assert((f("\u{61}\u{61}\u{61}","\u{62}\u{2a}") == ""))
60+;
61+assert((f("\u{61}\u{61}\u{61}","\u{61}\u{62}\u{2a}\u{61}") == "\u{61}\u{61}"))
62+assert((f("\u{61}\u{62}\u{61}","\u{61}\u{62}\u{2a}\u{61}") == "\u{61}\u{62}\u{61}"))
63+assert((f("\u{61}\u{61}\u{61}\u{62}","\u{61}\u{2b}") == "\u{61}\u{61}\u{61}"))
64+assert((f("\u{61}\u{61}\u{61}","\u{5e}\u{2e}\u{2b}\u{24}") == "\u{61}\u{61}\u{61}"))
65+assert((not f("\u{61}\u{61}\u{61}","\u{62}\u{2b}")))
66+assert((not f("\u{61}\u{61}\u{61}","\u{61}\u{62}\u{2b}\u{61}")))
67+assert((f("\u{61}\u{62}\u{61}","\u{61}\u{62}\u{2b}\u{61}") == "\u{61}\u{62}\u{61}"))
68+assert((f("\u{61}\u{24}\u{61}","\u{2e}\u{24}") == "\u{61}"))
69+assert((f("\u{61}\u{24}\u{61}","\u{2e}\u{25}\u{24}") == "\u{61}\u{24}"))
70+assert((f("\u{61}\u{24}\u{61}","\u{2e}\u{24}\u{2e}") == "\u{61}\u{24}\u{61}"))
71+assert((not f("\u{61}\u{24}\u{61}","\u{24}\u{24}")))
72+assert((not f("\u{61}\u{24}\u{62}","\u{61}\u{24}")))
73+assert((f("\u{61}\u{24}\u{61}","\u{24}") == ""))
74+assert((f("","\u{62}\u{2a}") == ""))
75+assert((not f("\u{61}\u{61}\u{61}","\u{62}\u{62}\u{2a}")))
76+assert((f("\u{61}\u{61}\u{61}\u{62}","\u{61}\u{2d}") == ""))
77+assert((f("\u{61}\u{61}\u{61}","\u{5e}\u{2e}\u{2d}\u{24}") == "\u{61}\u{61}\u{61}"))
78+assert((f("\u{61}\u{61}\u{62}\u{61}\u{61}\u{61}\u{62}\u{61}\u{61}\u{61}\u{62}\u{61}\u{61}\u{61}\u{62}\u{61}","\u{62}\u{2e}\u{2a}\u{62}") == "\u{62}\u{61}\u{61}\u{61}\u{62}\u{61}\u{61}\u{61}\u{62}\u{61}\u{61}\u{61}\u{62}"))
79+assert((f("\u{61}\u{61}\u{62}\u{61}\u{61}\u{61}\u{62}\u{61}\u{61}\u{61}\u{62}\u{61}\u{61}\u{61}\u{62}\u{61}","\u{62}\u{2e}\u{2d}\u{62}") == "\u{62}\u{61}\u{61}\u{61}\u{62}"))
80+assert((f("\u{61}\u{6c}\u{6f}\u{20}\u{78}\u{6f}","\u{2e}\u{6f}\u{24}") == "\u{78}\u{6f}"))
81+assert((f("\u{20}\u{a}\u{20}\u{69}\u{73}\u{74}\u{6f}\u{20}\u{c3}\u{a9}\u{20}\u{61}\u{73}\u{73}\u{69}\u{6d}","\u{25}\u{53}\u{25}\u{53}\u{2a}") == "\u{69}\u{73}\u{74}\u{6f}"))
82+assert((f("\u{20}\u{a}\u{20}\u{69}\u{73}\u{74}\u{6f}\u{20}\u{c3}\u{a9}\u{20}\u{61}\u{73}\u{73}\u{69}\u{6d}","\u{25}\u{53}\u{2a}\u{24}") == "\u{61}\u{73}\u{73}\u{69}\u{6d}"))
83+assert((f("\u{20}\u{a}\u{20}\u{69}\u{73}\u{74}\u{6f}\u{20}\u{c3}\u{a9}\u{20}\u{61}\u{73}\u{73}\u{69}\u{6d}","\u{5b}\u{61}\u{2d}\u{7a}\u{5d}\u{2a}\u{24}") == "\u{61}\u{73}\u{73}\u{69}\u{6d}"))
84+assert((f("\u{75}\u{6d}\u{20}\u{63}\u{61}\u{72}\u{61}\u{63}\u{74}\u{65}\u{72}\u{20}\u{3f}\u{20}\u{65}\u{78}\u{74}\u{72}\u{61}","\u{5b}\u{5e}\u{25}\u{73}\u{61}\u{2d}\u{7a}\u{5d}") == "\u{3f}"))
85+assert((f("","\u{61}\u{3f}") == ""))
86+assert((f("\u{c3}\u{a1}",PU("\u{c3}\u{a1}\u{3f}")) == "\u{c3}\u{a1}"))
87+assert((f("\u{c3}\u{a1}\u{62}\u{6c}",PU("\u{c3}\u{a1}\u{3f}\u{62}\u{3f}\u{6c}\u{3f}")) == "\u{c3}\u{a1}\u{62}\u{6c}"))
88+assert((f("\u{20}\u{20}\u{c3}\u{a1}\u{62}\u{6c}",PU("\u{c3}\u{a1}\u{3f}\u{62}\u{3f}\u{6c}\u{3f}")) == ""))
89+assert((f("\u{61}\u{61}","\u{5e}\u{61}\u{61}\u{3f}\u{61}\u{3f}\u{61}") == "\u{61}\u{61}"))
90+assert((f("\u{5d}\u{5d}\u{5d}\u{c3}\u{a1}\u{62}","\u{5b}\u{5e}\u{5d}\u{5d}\u{2b}") == "\u{c3}\u{a1}\u{62}"))
91+assert((f("\u{30}\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}","\u{25}\u{78}\u{2a}") == "\u{30}\u{61}"))
92+assert((f("\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}","\u{25}\u{43}\u{2b}") == "\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}"))
93+print("\u{2b}")
94+local function f1
95+(s,p)
96+p=string.gsub(p,"\u{25}\u{25}\u{28}\u{5b}\u{30}\u{2d}\u{39}\u{5d}\u{29}",function (s)
97+return ("\u{25}" .. (tonumber(s) + 0x1))
98+end)
99+p=string.gsub(p,"\u{5e}\u{28}\u{5e}\u{3f}\u{29}","\u{25}\u{31}\u{28}\u{29}",0x1)
100+p=string.gsub(p,"\u{28}\u{24}\u{3f}\u{29}\u{24}","\u{28}\u{29}\u{25}\u{31}",0x1)
101+local t = {string.match(s,p)}
102+return string.sub(s,t[0x1],(t[(# t)] - 0x1))
103+end
104+assert((f1("\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{78}\u{20}\u{31}\u{32}\u{33}\u{20}\u{62}\u{0}\u{6f}\u{20}\u{62}\u{0}\u{6f}","\u{28}\u{2e}\u{2e}\u{2a}\u{29}\u{20}\u{25}\u{31}") == "\u{62}\u{0}\u{6f}\u{20}\u{62}\u{0}\u{6f}"))
105+assert((f1("\u{61}\u{78}\u{7a}\u{31}\u{32}\u{33}\u{3d}\u{20}\u{34}\u{3d}\u{20}\u{34}\u{20}\u{33}\u{34}","\u{28}\u{2e}\u{2b}\u{29}\u{3d}\u{28}\u{2e}\u{2a}\u{29}\u{3d}\u{25}\u{32}\u{20}\u{25}\u{31}") == "\u{33}\u{3d}\u{20}\u{34}\u{3d}\u{20}\u{34}\u{20}\u{33}"))
106+assert((f1("\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}","\u{5e}\u{28}\u{3d}\u{2a}\u{29}\u{3d}\u{25}\u{31}\u{24}") == "\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}"))
107+assert((not string.match("\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}\u{3d}","\u{5e}\u{28}\u{5b}\u{3d}\u{5d}\u{2a}\u{29}\u{3d}\u{25}\u{31}\u{24}")))
108+local function range
109+(i,j)
110+if (i <= j) then
111+return i,range((i + 0x1),j)
112+end
113+end
114+local abc = (string.char(range(0x0,0x7f)) .. string.char(range(0x80,0xff)))
115+;
116+assert((string.len(abc) == 0x100))
117+local function strset
118+(p)
119+local res = {["\u{73}"] = ""}
120+string.gsub(abc,p,function (c)
121+res.s=(res.s .. c)
122+end)
123+return res.s
124+end
125+;
126+assert((string.len(strset("\u{5b}\u{c8}\u{2d}\u{d2}\u{5d}")) == 0xb))
127+assert((strset("\u{5b}\u{61}\u{2d}\u{7a}\u{5d}") == "\u{61}\u{62}\u{63}\u{64}\u{65}\u{66}\u{67}\u{68}\u{69}\u{6a}\u{6b}\u{6c}\u{6d}\u{6e}\u{6f}\u{70}\u{71}\u{72}\u{73}\u{74}\u{75}\u{76}\u{77}\u{78}\u{79}\u{7a}"))
128+assert((strset("\u{5b}\u{61}\u{2d}\u{7a}\u{25}\u{64}\u{5d}") == strset("\u{5b}\u{25}\u{64}\u{61}\u{2d}\u{75}\u{75}\u{2d}\u{7a}\u{5d}")))
129+assert((strset("\u{5b}\u{61}\u{2d}\u{5d}") == "\u{2d}\u{61}"))
130+assert((strset("\u{5b}\u{5e}\u{25}\u{57}\u{5d}") == strset("\u{5b}\u{25}\u{77}\u{5d}")))
131+assert((strset("\u{5b}\u{5d}\u{25}\u{25}\u{5d}") == "\u{25}\u{5d}"))
132+assert((strset("\u{5b}\u{61}\u{25}\u{2d}\u{7a}\u{5d}") == "\u{2d}\u{61}\u{7a}"))
133+assert((strset("\u{5b}\u{25}\u{5e}\u{25}\u{5b}\u{25}\u{2d}\u{61}\u{25}\u{5d}\u{25}\u{2d}\u{62}\u{5d}") == "\u{2d}\u{5b}\u{5d}\u{5e}\u{61}\u{62}"))
134+assert((strset("\u{25}\u{5a}") == strset("\u{5b}\u{1}\u{2d}\u{ff}\u{5d}")))
135+assert((strset("\u{2e}") == strset("\u{5b}\u{1}\u{2d}\u{ff}\u{25}\u{7a}\u{5d}")))
136+print("\u{2b}")
137+;
138+assert((string.match("\u{61}\u{6c}\u{6f}\u{20}\u{78}\u{79}\u{7a}\u{4b}","\u{28}\u{25}\u{77}\u{2b}\u{29}\u{4b}") == "\u{78}\u{79}\u{7a}"))
139+assert((string.match("\u{32}\u{35}\u{34}\u{20}\u{4b}","\u{28}\u{25}\u{64}\u{2a}\u{29}\u{4b}") == ""))
140+assert((string.match("\u{61}\u{6c}\u{6f}\u{20}","\u{28}\u{25}\u{77}\u{2a}\u{29}\u{24}") == ""))
141+assert((not string.match("\u{61}\u{6c}\u{6f}\u{20}","\u{28}\u{25}\u{77}\u{2b}\u{29}\u{24}")))
142+assert((string.find("\u{28}\u{c3}\u{a1}\u{6c}\u{6f}\u{29}","\u{25}\u{28}\u{c3}\u{a1}") == 0x1))
143+local a,b,c,d,e = string.match("\u{c3}\u{a2}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}",PU("\u{5e}\u{28}\u{28}\u{28}\u{2e}\u{29}\u{2e}\u{29}\u{2e}\u{20}\u{28}\u{25}\u{77}\u{2a}\u{29}\u{29}\u{24}"))
144+assert((((((a == "\u{c3}\u{a2}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}") and (b == "\u{c3}\u{a2}\u{6c}")) and (c == "\u{c3}\u{a2}")) and (d == "\u{61}\u{6c}\u{6f}")) and (e == nil)))
145+a,b,c,d=string.match("\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}","\u{28}\u{2e}\u{2b}\u{28}\u{2e}\u{3f}\u{29}\u{28}\u{29}\u{29}")
146+assert(((((a == "\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}") and (b == "")) and (c == 0xb)) and (d == nil)))
147+print("\u{2b}")
148+assert((string.gsub("\u{c3}\u{bc}\u{6c}\u{6f}\u{20}\u{c3}\u{bc}\u{6c}\u{6f}","\u{c3}\u{bc}","\u{78}") == "\u{78}\u{6c}\u{6f}\u{20}\u{78}\u{6c}\u{6f}"))
149+assert((string.gsub("\u{61}\u{6c}\u{6f}\u{20}\u{c3}\u{ba}\u{6c}\u{6f}\u{20}\u{20}","\u{20}\u{2b}\u{24}","") == "\u{61}\u{6c}\u{6f}\u{20}\u{c3}\u{ba}\u{6c}\u{6f}"))
150+assert((string.gsub("\u{20}\u{20}\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}\u{20}\u{20}","\u{5e}\u{25}\u{73}\u{2a}\u{28}\u{2e}\u{2d}\u{29}\u{25}\u{73}\u{2a}\u{24}","\u{25}\u{31}") == "\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}"))
151+assert((string.gsub("\u{61}\u{6c}\u{6f}\u{20}\u{20}\u{61}\u{6c}\u{6f}\u{20}\u{20}\u{a}\u{20}\u{31}\u{32}\u{33}\u{a}\u{20}","\u{25}\u{73}\u{2b}","\u{20}") == "\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}\u{20}\u{31}\u{32}\u{33}\u{20}"))
152+local t = "\u{61}\u{62}\u{c3}\u{a7}\u{20}\u{64}"
153+a,b=string.gsub(t,PU("\u{28}\u{2e}\u{29}"),"\u{25}\u{31}\u{40}")
154+assert(((a == "\u{61}\u{40}\u{62}\u{40}\u{c3}\u{a7}\u{40}\u{20}\u{40}\u{64}\u{40}") and (b == 0x5)))
155+a,b=string.gsub("\u{61}\u{62}\u{c3}\u{a7}\u{64}",PU("\u{28}\u{2e}\u{29}"),"\u{25}\u{30}\u{40}",0x2)
156+assert(((a == "\u{61}\u{40}\u{62}\u{40}\u{c3}\u{a7}\u{64}") and (b == 0x2)))
157+assert((string.gsub("\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}","\u{28}\u{29}\u{5b}\u{61}\u{6c}\u{5d}","\u{25}\u{31}") == "\u{31}\u{32}\u{6f}\u{20}\u{35}\u{36}\u{6f}"))
158+assert((string.gsub("\u{61}\u{62}\u{63}\u{3d}\u{78}\u{79}\u{7a}","\u{28}\u{25}\u{77}\u{2a}\u{29}\u{28}\u{25}\u{70}\u{29}\u{28}\u{25}\u{77}\u{2b}\u{29}","\u{25}\u{33}\u{25}\u{32}\u{25}\u{31}\u{2d}\u{25}\u{30}") == "\u{78}\u{79}\u{7a}\u{3d}\u{61}\u{62}\u{63}\u{2d}\u{61}\u{62}\u{63}\u{3d}\u{78}\u{79}\u{7a}"))
159+assert((string.gsub("\u{61}\u{62}\u{63}","\u{25}\u{77}","\u{25}\u{31}\u{25}\u{30}") == "\u{61}\u{61}\u{62}\u{62}\u{63}\u{63}"))
160+assert((string.gsub("\u{61}\u{62}\u{63}","\u{25}\u{77}\u{2b}","\u{25}\u{30}\u{25}\u{31}") == "\u{61}\u{62}\u{63}\u{61}\u{62}\u{63}"))
161+assert((string.gsub("\u{c3}\u{a1}\u{c3}\u{a9}\u{c3}\u{ad}","\u{24}","\u{0}\u{c3}\u{b3}\u{c3}\u{ba}") == "\u{c3}\u{a1}\u{c3}\u{a9}\u{c3}\u{ad}\u{0}\u{c3}\u{b3}\u{c3}\u{ba}"))
162+assert((string.gsub("","\u{5e}","\u{72}") == "\u{72}"))
163+assert((string.gsub("","\u{24}","\u{72}") == "\u{72}"))
164+print("\u{2b}")
165+do
166+assert((string.gsub("\u{61}\u{20}\u{62}\u{20}\u{63}\u{64}","\u{20}\u{2a}","\u{2d}") == "\u{2d}\u{61}\u{2d}\u{62}\u{2d}\u{63}\u{2d}\u{64}\u{2d}"))
167+local res = ""
168+local sub = "\u{61}\u{20}\u{20}\u{a}\u{62}\u{63}\u{9}\u{9}\u{64}"
169+local i = 0x1
170+for p,e in string.gmatch(sub,"\u{28}\u{29}\u{25}\u{73}\u{2a}\u{28}\u{29}")
171+do
172+res=(res .. (string.sub(sub,i,(p - 0x1)) .. "\u{2d}"))
173+i=e
174+end
175+assert((res == "\u{2d}\u{61}\u{2d}\u{62}\u{2d}\u{63}\u{2d}\u{64}\u{2d}"))
176+end
177+assert((string.gsub("\u{75}\u{6d}\u{20}\u{28}\u{64}\u{6f}\u{69}\u{73}\u{29}\u{20}\u{74}\u{72}\u{65}\u{73}\u{20}\u{28}\u{71}\u{75}\u{61}\u{74}\u{72}\u{6f}\u{29}","\u{28}\u{25}\u{28}\u{25}\u{77}\u{2b}\u{25}\u{29}\u{29}",string.upper) == "\u{75}\u{6d}\u{20}\u{28}\u{44}\u{4f}\u{49}\u{53}\u{29}\u{20}\u{74}\u{72}\u{65}\u{73}\u{20}\u{28}\u{51}\u{55}\u{41}\u{54}\u{52}\u{4f}\u{29}"))
178+do
179+local function setglobal
180+(n,v)
181+rawset(_G,n,v)
182+end
183+string.gsub("\u{61}\u{3d}\u{72}\u{6f}\u{62}\u{65}\u{72}\u{74}\u{6f}\u{2c}\u{72}\u{6f}\u{62}\u{65}\u{72}\u{74}\u{6f}\u{3d}\u{61}","\u{28}\u{25}\u{77}\u{2b}\u{29}\u{3d}\u{28}\u{25}\u{77}\u{25}\u{77}\u{2a}\u{29}",setglobal)
184+assert(((_G.a == "\u{72}\u{6f}\u{62}\u{65}\u{72}\u{74}\u{6f}") and (_G.roberto == "\u{61}")))
185+_G.a=nil
186+;
187+_G.roberto=nil
188+end
189+function f(a,b)
190+return string.gsub(a,"\u{2e}",b)
191+end
192+assert((string.gsub("\u{74}\u{72}\u{6f}\u{63}\u{61}\u{72}\u{20}\u{74}\u{75}\u{64}\u{6f}\u{20}\u{65}\u{6d}\u{20}\u{7c}\u{74}\u{65}\u{73}\u{74}\u{65}\u{7c}\u{62}\u{7c}\u{20}\u{c3}\u{a9}\u{20}\u{7c}\u{62}\u{65}\u{6c}\u{65}\u{7a}\u{61}\u{7c}\u{61}\u{6c}\u{7c}","\u{7c}\u{28}\u{5b}\u{5e}\u{7c}\u{5d}\u{2a}\u{29}\u{7c}\u{28}\u{5b}\u{5e}\u{7c}\u{5d}\u{2a}\u{29}\u{7c}",f) == "\u{74}\u{72}\u{6f}\u{63}\u{61}\u{72}\u{20}\u{74}\u{75}\u{64}\u{6f}\u{20}\u{65}\u{6d}\u{20}\u{62}\u{62}\u{62}\u{62}\u{62}\u{20}\u{c3}\u{a9}\u{20}\u{61}\u{6c}\u{61}\u{6c}\u{61}\u{6c}\u{61}\u{6c}\u{61}\u{6c}\u{61}\u{6c}"))
193+local function dostring
194+(s)
195+return (load(s,"")() or "")
196+end
197+assert((string.gsub("\u{61}\u{6c}\u{6f}\u{20}\u{24}\u{61}\u{3d}\u{27}\u{78}\u{27}\u{24}\u{20}\u{6e}\u{6f}\u{76}\u{61}\u{6d}\u{65}\u{6e}\u{74}\u{65}\u{20}\u{24}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{61}\u{24}","\u{24}\u{28}\u{5b}\u{5e}\u{24}\u{5d}\u{2a}\u{29}\u{25}\u{24}",dostring) == "\u{61}\u{6c}\u{6f}\u{20}\u{20}\u{6e}\u{6f}\u{76}\u{61}\u{6d}\u{65}\u{6e}\u{74}\u{65}\u{20}\u{78}"))
198+local x = string.gsub("\u{24}\u{78}\u{3d}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{2e}\u{67}\u{73}\u{75}\u{62}\u{28}\u{27}\u{61}\u{6c}\u{6f}\u{27}\u{2c}\u{20}\u{27}\u{2e}\u{27}\u{2c}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{2e}\u{75}\u{70}\u{70}\u{65}\u{72}\u{29}\u{24}\u{20}\u{61}\u{73}\u{73}\u{69}\u{6d}\u{20}\u{76}\u{61}\u{69}\u{20}\u{70}\u{61}\u{72}\u{61}\u{20}\u{24}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{78}\u{24}","\u{24}\u{28}\u{5b}\u{5e}\u{24}\u{5d}\u{2a}\u{29}\u{25}\u{24}",dostring)
199+assert((x == "\u{20}\u{61}\u{73}\u{73}\u{69}\u{6d}\u{20}\u{76}\u{61}\u{69}\u{20}\u{70}\u{61}\u{72}\u{61}\u{20}\u{41}\u{4c}\u{4f}"))
200+_G.a,_G.x=nil
201+local t = {}
202+local s = "\u{61}\u{20}\u{61}\u{6c}\u{6f}\u{20}\u{6a}\u{6f}\u{73}\u{65}\u{20}\u{20}\u{6a}\u{6f}\u{61}\u{6f}"
203+local r = string.gsub(s,"\u{28}\u{29}\u{28}\u{25}\u{77}\u{2b}\u{29}\u{28}\u{29}",function (a,w,b)
204+assert((string.len(w) == (b - a)))
205+;
206+t[a]=(b - a)
207+;
208+end)
209+assert((((((s == r) and (t[0x1] == 0x1)) and (t[0x3] == 0x3)) and (t[0x7] == 0x4)) and (t[0xd] == 0x4)))
210+local function isbalanced
211+(s)
212+return (not string.find(string.gsub(s,"\u{25}\u{62}\u{28}\u{29}",""),"\u{5b}\u{28}\u{29}\u{5d}"))
213+end
214+assert(isbalanced("\u{28}\u{39}\u{20}\u{28}\u{28}\u{38}\u{29}\u{29}\u{28}\u{0}\u{29}\u{20}\u{37}\u{29}\u{20}\u{0}\u{0}\u{20}\u{61}\u{20}\u{62}\u{20}\u{28}\u{29}\u{28}\u{63}\u{29}\u{28}\u{29}\u{20}\u{61}"))
215+assert((not isbalanced("\u{28}\u{39}\u{20}\u{28}\u{28}\u{38}\u{29}\u{20}\u{37}\u{29}\u{20}\u{61}\u{20}\u{62}\u{20}\u{28}\u{0}\u{20}\u{63}\u{29}\u{20}\u{61}")))
216+assert((string.gsub("\u{61}\u{6c}\u{6f}\u{20}\u{27}\u{6f}\u{69}\u{27}\u{20}\u{61}\u{6c}\u{6f}","\u{25}\u{62}\u{27}\u{27}","\u{22}") == "\u{61}\u{6c}\u{6f}\u{20}\u{22}\u{20}\u{61}\u{6c}\u{6f}"))
217+local t = {"\u{61}\u{70}\u{70}\u{6c}\u{65}","\u{6f}\u{72}\u{61}\u{6e}\u{67}\u{65}","\u{6c}\u{69}\u{6d}\u{65}",["\u{6e}"] = 0x0}
218+assert((string.gsub("\u{78}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{78}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{78}","\u{78}",function ()
219+t.n=(t.n + 0x1)
220+;
221+return t[t.n]
222+end) == "\u{61}\u{70}\u{70}\u{6c}\u{65}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{6f}\u{72}\u{61}\u{6e}\u{67}\u{65}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{6c}\u{69}\u{6d}\u{65}"))
223+t={["\u{6e}"] = 0x0}
224+string.gsub("\u{66}\u{69}\u{72}\u{73}\u{74}\u{20}\u{73}\u{65}\u{63}\u{6f}\u{6e}\u{64}\u{20}\u{77}\u{6f}\u{72}\u{64}","\u{25}\u{77}\u{25}\u{77}\u{2a}",function (w)
225+t.n=(t.n + 0x1)
226+;
227+t[t.n]=w
228+end)
229+assert(((((t[0x1] == "\u{66}\u{69}\u{72}\u{73}\u{74}") and (t[0x2] == "\u{73}\u{65}\u{63}\u{6f}\u{6e}\u{64}")) and (t[0x3] == "\u{77}\u{6f}\u{72}\u{64}")) and (t.n == 0x3)))
230+t={["\u{6e}"] = 0x0}
231+assert((string.gsub("\u{66}\u{69}\u{72}\u{73}\u{74}\u{20}\u{73}\u{65}\u{63}\u{6f}\u{6e}\u{64}\u{20}\u{77}\u{6f}\u{72}\u{64}","\u{25}\u{77}\u{2b}",function (w)
232+t.n=(t.n + 0x1)
233+;
234+t[t.n]=w
235+end,0x2) == "\u{66}\u{69}\u{72}\u{73}\u{74}\u{20}\u{73}\u{65}\u{63}\u{6f}\u{6e}\u{64}\u{20}\u{77}\u{6f}\u{72}\u{64}"))
236+assert((((t[0x1] == "\u{66}\u{69}\u{72}\u{73}\u{74}") and (t[0x2] == "\u{73}\u{65}\u{63}\u{6f}\u{6e}\u{64}")) and (t[0x3] == undef)))
237+checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{72}\u{65}\u{70}\u{6c}\u{61}\u{63}\u{65}\u{6d}\u{65}\u{6e}\u{74}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{25}\u{28}\u{61}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}\u{25}\u{29}",string.gsub,"\u{61}\u{6c}\u{6f}","\u{2e}",{["\u{61}"] = {}})
238+checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{61}\u{70}\u{74}\u{75}\u{72}\u{65}\u{20}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}\u{25}\u{25}\u{32}",string.gsub,"\u{61}\u{6c}\u{6f}","\u{2e}","\u{25}\u{32}")
239+checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{61}\u{70}\u{74}\u{75}\u{72}\u{65}\u{20}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}\u{25}\u{25}\u{30}",string.gsub,"\u{61}\u{6c}\u{6f}","\u{28}\u{25}\u{30}\u{29}","\u{61}")
240+checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{61}\u{70}\u{74}\u{75}\u{72}\u{65}\u{20}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}\u{25}\u{25}\u{31}",string.gsub,"\u{61}\u{6c}\u{6f}","\u{28}\u{25}\u{31}\u{29}","\u{61}")
241+checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{75}\u{73}\u{65}\u{20}\u{6f}\u{66}\u{20}\u{27}\u{25}\u{25}\u{27}",string.gsub,"\u{61}\u{6c}\u{6f}","\u{2e}","\u{25}\u{78}")
242+if (not _soft) then
243+print("\u{62}\u{69}\u{67}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{73}")
244+local a = string.rep("\u{61}",0x493e0)
245+assert(string.find(a,"\u{5e}\u{61}\u{2a}\u{2e}\u{3f}\u{24}"))
246+assert((not string.find(a,"\u{5e}\u{61}\u{2a}\u{2e}\u{3f}\u{62}\u{24}")))
247+assert(string.find(a,"\u{5e}\u{61}\u{2d}\u{2e}\u{3f}\u{24}"))
248+a=(string.rep("\u{61}",0x2710) .. string.rep("\u{62}",0x2710))
249+assert((not pcall(string.gsub,a,"\u{62}")))
250+end
251+local function rev
252+(s)
253+return string.gsub(s,"\u{28}\u{2e}\u{29}\u{28}\u{2e}\u{2b}\u{29}",function (c,s1)
254+return (rev(s1) .. c)
255+end)
256+end
257+local x = "\u{61}\u{62}\u{63}\u{64}\u{65}\u{66}"
258+assert((rev(rev(x)) == x))
259+assert((string.gsub("\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}","\u{2e}",{}) == "\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}"))
260+assert((string.gsub("\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}","\u{28}\u{2e}\u{29}",{["\u{61}"] = "\u{41}\u{41}",["\u{6c}"] = ""}) == "\u{41}\u{41}\u{6f}\u{20}\u{41}\u{41}\u{6f}"))
261+assert((string.gsub("\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}","\u{28}\u{2e}\u{29}\u{2e}",{["\u{61}"] = "\u{41}\u{41}",["\u{6c}"] = "\u{4b}"}) == "\u{41}\u{41}\u{6f}\u{20}\u{41}\u{41}\u{6f}"))
262+assert((string.gsub("\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}","\u{28}\u{28}\u{2e}\u{29}\u{28}\u{2e}\u{3f}\u{29}\u{29}",{["\u{61}\u{6c}"] = "\u{41}\u{41}",["\u{6f}"] = false}) == "\u{41}\u{41}\u{6f}\u{20}\u{41}\u{41}\u{6f}"))
263+assert((string.gsub("\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}","\u{28}\u{29}\u{2e}",{"\u{78}","\u{79}\u{79}","\u{7a}\u{7a}\u{7a}"}) == "\u{78}\u{79}\u{79}\u{7a}\u{7a}\u{7a}\u{20}\u{61}\u{6c}\u{6f}"))
264+t={}
265+;
266+setmetatable(t,{["\u{5f}\u{5f}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = function (t,s)
267+return string.upper(s)
268+end})
269+assert((string.gsub("\u{61}\u{20}\u{61}\u{6c}\u{6f}\u{20}\u{62}\u{20}\u{68}\u{69}","\u{25}\u{77}\u{25}\u{77}\u{2b}",t) == "\u{61}\u{20}\u{41}\u{4c}\u{4f}\u{20}\u{62}\u{20}\u{48}\u{49}"))
270+local a = 0x0
271+for i in string.gmatch("\u{61}\u{62}\u{63}\u{64}\u{65}","\u{28}\u{29}")
272+do
273+assert((i == (a + 0x1)))
274+;
275+a=i
276+end
277+assert((a == 0x6))
278+t={["\u{6e}"] = 0x0}
279+for w in string.gmatch("\u{66}\u{69}\u{72}\u{73}\u{74}\u{20}\u{73}\u{65}\u{63}\u{6f}\u{6e}\u{64}\u{20}\u{77}\u{6f}\u{72}\u{64}","\u{25}\u{77}\u{2b}")
280+do
281+t.n=(t.n + 0x1)
282+;
283+t[t.n]=w
284+end
285+assert((((t[0x1] == "\u{66}\u{69}\u{72}\u{73}\u{74}") and (t[0x2] == "\u{73}\u{65}\u{63}\u{6f}\u{6e}\u{64}")) and (t[0x3] == "\u{77}\u{6f}\u{72}\u{64}")))
286+t={0x3,0x6,0x9}
287+for i in string.gmatch("\u{78}\u{75}\u{78}\u{78}\u{20}\u{75}\u{75}\u{20}\u{70}\u{70}\u{61}\u{72}\u{20}\u{72}","\u{28}\u{29}\u{28}\u{2e}\u{29}\u{25}\u{32}")
288+do
289+assert((i == table.remove(t,0x1)))
290+end
291+assert((# (t == 0x0)))
292+t={}
293+for i,j in string.gmatch("\u{31}\u{33}\u{20}\u{31}\u{34}\u{20}\u{31}\u{30}\u{20}\u{3d}\u{20}\u{31}\u{31}\u{2c}\u{20}\u{31}\u{35}\u{3d}\u{20}\u{31}\u{36}\u{2c}\u{20}\u{32}\u{32}\u{3d}\u{32}\u{33}","\u{28}\u{25}\u{64}\u{2b}\u{29}\u{25}\u{73}\u{2a}\u{3d}\u{25}\u{73}\u{2a}\u{28}\u{25}\u{64}\u{2b}\u{29}")
294+do
295+t[tonumber(i)]=tonumber(j)
296+end
297+a=0x0
298+for k,v in pairs(t)
299+do
300+assert(((k + 0x1) == (v + 0x0)))
301+;
302+a=(a + 0x1)
303+end
304+assert((a == 0x3))
305+do
306+local s = 0x0
307+for k in string.gmatch("\u{31}\u{30}\u{20}\u{32}\u{30}\u{20}\u{33}\u{30}","\u{25}\u{64}\u{2b}",0x3)
308+do
309+s=(s + tonumber(k))
310+end
311+assert((s == 0x32))
312+s=0x0
313+for k in string.gmatch("\u{31}\u{31}\u{20}\u{32}\u{31}\u{20}\u{33}\u{31}","\u{25}\u{64}\u{2b}",(- 0x4))
314+do
315+s=(s + tonumber(k))
316+end
317+assert((s == 0x20))
318+s=0x0
319+for k in string.gmatch("\u{31}\u{31}\u{20}\u{32}\u{31}\u{20}\u{33}\u{31}","\u{25}\u{77}\u{2a}",0x9)
320+do
321+s=(s + 0x1)
322+end
323+assert((s == 0x1))
324+s=0x0
325+for k in string.gmatch("\u{31}\u{31}\u{20}\u{32}\u{31}\u{20}\u{33}\u{31}","\u{25}\u{77}\u{2a}",0xa)
326+do
327+s=(s + 0x1)
328+end
329+assert((s == 0x0))
330+end
331+assert((string.gsub("\u{61}\u{61}\u{61}\u{20}\u{61}\u{61}\u{20}\u{61}\u{20}\u{61}\u{61}\u{61}\u{20}\u{61}","\u{25}\u{66}\u{5b}\u{25}\u{77}\u{5d}\u{61}","\u{78}") == "\u{78}\u{61}\u{61}\u{20}\u{78}\u{61}\u{20}\u{78}\u{20}\u{78}\u{61}\u{61}\u{20}\u{78}"))
332+assert((string.gsub("\u{5b}\u{5b}\u{5d}\u{5d}\u{20}\u{5b}\u{5d}\u{5b}\u{5d}\u{20}\u{5b}\u{5b}\u{5b}\u{5b}","\u{25}\u{66}\u{5b}\u{5b}\u{5d}\u{2e}","\u{78}") == "\u{78}\u{5b}\u{5d}\u{5d}\u{20}\u{78}\u{5d}\u{78}\u{5d}\u{20}\u{78}\u{5b}\u{5b}\u{5b}"))
333+assert((string.gsub("\u{30}\u{31}\u{61}\u{62}\u{63}\u{34}\u{35}\u{64}\u{65}\u{33}","\u{25}\u{66}\u{5b}\u{25}\u{64}\u{5d}","\u{2e}") == "\u{2e}\u{30}\u{31}\u{61}\u{62}\u{63}\u{2e}\u{34}\u{35}\u{64}\u{65}\u{2e}\u{33}"))
334+assert((string.gsub("\u{30}\u{31}\u{61}\u{62}\u{63}\u{34}\u{35}\u{20}\u{64}\u{65}\u{33}\u{78}","\u{25}\u{66}\u{5b}\u{25}\u{44}\u{5d}\u{25}\u{77}","\u{2e}") == "\u{30}\u{31}\u{2e}\u{62}\u{63}\u{34}\u{35}\u{20}\u{64}\u{65}\u{33}\u{2e}"))
335+assert((string.gsub("\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}","\u{25}\u{66}\u{5b}\u{1}\u{2d}\u{ff}\u{5d}\u{25}\u{77}","\u{2e}") == "\u{2e}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}"))
336+assert((string.gsub("\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}","\u{25}\u{66}\u{5b}\u{5e}\u{1}\u{2d}\u{ff}\u{5d}","\u{2e}") == "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{2e}"))
337+assert((string.find("\u{61}","\u{25}\u{66}\u{5b}\u{61}\u{5d}") == 0x1))
338+assert((string.find("\u{61}","\u{25}\u{66}\u{5b}\u{5e}\u{25}\u{7a}\u{5d}") == 0x1))
339+assert((string.find("\u{61}","\u{25}\u{66}\u{5b}\u{5e}\u{25}\u{6c}\u{5d}") == 0x2))
340+assert((string.find("\u{61}\u{62}\u{61}","\u{25}\u{66}\u{5b}\u{61}\u{25}\u{7a}\u{5d}") == 0x3))
341+assert((string.find("\u{61}\u{62}\u{61}","\u{25}\u{66}\u{5b}\u{25}\u{7a}\u{5d}") == 0x4))
342+assert((not string.find("\u{61}\u{62}\u{61}","\u{25}\u{66}\u{5b}\u{25}\u{6c}\u{25}\u{7a}\u{5d}")))
343+assert((not string.find("\u{61}\u{62}\u{61}","\u{25}\u{66}\u{5b}\u{5e}\u{25}\u{6c}\u{25}\u{7a}\u{5d}")))
344+local i,e = string.find("\u{20}\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6c}\u{6f}","\u{25}\u{66}\u{5b}\u{25}\u{53}\u{5d}\u{2e}\u{2d}\u{25}\u{66}\u{5b}\u{25}\u{73}\u{5d}\u{2e}\u{2d}\u{25}\u{66}\u{5b}\u{25}\u{53}\u{5d}")
345+assert(((i == 0x2) and (e == 0x5)))
346+local k = string.match("\u{20}\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6c}\u{6f}","\u{25}\u{66}\u{5b}\u{25}\u{53}\u{5d}\u{28}\u{2e}\u{2d}\u{25}\u{66}\u{5b}\u{25}\u{73}\u{5d}\u{2e}\u{2d}\u{25}\u{66}\u{5b}\u{25}\u{53}\u{5d}\u{29}")
347+assert((k == "\u{61}\u{6c}\u{6f}\u{20}"))
348+local a = {0x1,0x5,0x9,0xe,0x11}
349+for k in string.gmatch("\u{61}\u{6c}\u{6f}\u{20}\u{61}\u{6c}\u{6f}\u{20}\u{74}\u{68}\u{30}\u{32}\u{20}\u{69}\u{73}\u{20}\u{31}\u{68}\u{61}\u{74}","\u{28}\u{29}\u{25}\u{66}\u{5b}\u{25}\u{77}\u{25}\u{64}\u{5d}")
350+do
351+assert((table.remove(a,0x1) == k))
352+end
353+assert((# (a == 0x0)))
354+local function malform
355+(p,m)
356+m=(m or "\u{6d}\u{61}\u{6c}\u{66}\u{6f}\u{72}\u{6d}\u{65}\u{64}")
357+local r,msg = pcall(string.find,"\u{61}",p)
358+assert((not (r and string.find(msg,m))))
359+end
360+malform("\u{28}\u{2e}","\u{75}\u{6e}\u{66}\u{69}\u{6e}\u{69}\u{73}\u{68}\u{65}\u{64}\u{20}\u{63}\u{61}\u{70}\u{74}\u{75}\u{72}\u{65}")
361+malform("\u{2e}\u{29}","\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{70}\u{61}\u{74}\u{74}\u{65}\u{72}\u{6e}\u{20}\u{63}\u{61}\u{70}\u{74}\u{75}\u{72}\u{65}")
362+malform("\u{5b}\u{61}")
363+malform("\u{5b}\u{5d}")
364+malform("\u{5b}\u{5e}\u{5d}")
365+malform("\u{5b}\u{61}\u{25}\u{5d}")
366+malform("\u{5b}\u{61}\u{25}")
367+malform("\u{25}\u{62}")
368+malform("\u{25}\u{62}\u{61}")
369+malform("\u{25}")
370+malform("\u{25}\u{66}","\u{6d}\u{69}\u{73}\u{73}\u{69}\u{6e}\u{67}")
371+assert((string.match("\u{61}\u{62}\u{0}\u{1}\u{2}\u{63}","\u{5b}\u{0}\u{2d}\u{2}\u{5d}\u{2b}") == "\u{0}\u{1}\u{2}"))
372+assert((string.match("\u{61}\u{62}\u{0}\u{1}\u{2}\u{63}","\u{5b}\u{0}\u{2d}\u{0}\u{5d}\u{2b}") == "\u{0}"))
373+assert((string.find("\u{62}\u{24}\u{61}","\u{24}\u{0}\u{3f}") == 0x2))
374+assert((string.find("\u{61}\u{62}\u{63}\u{0}\u{65}\u{66}\u{67}","\u{25}\u{0}") == 0x4))
375+assert((string.match("\u{61}\u{62}\u{63}\u{0}\u{65}\u{66}\u{67}\u{0}\u{1}\u{65}\u{1}\u{67}","\u{25}\u{62}\u{0}\u{1}") == "\u{0}\u{65}\u{66}\u{67}\u{0}\u{1}\u{65}\u{1}"))
376+assert((string.match("\u{61}\u{62}\u{63}\u{0}\u{0}\u{0}","\u{25}\u{0}\u{2b}") == "\u{0}\u{0}\u{0}"))
377+assert((string.match("\u{61}\u{62}\u{63}\u{0}\u{0}\u{0}","\u{25}\u{0}\u{25}\u{0}\u{3f}") == "\u{0}\u{0}"))
378+assert((string.find("\u{61}\u{62}\u{63}\u{0}\u{0}","\u{0}\u{2e}") == 0x4))
379+assert((string.find("\u{61}\u{62}\u{63}\u{78}\u{0}\u{0}\u{61}\u{62}\u{63}\u{0}\u{61}\u{62}\u{63}","\u{78}\u{0}\u{0}\u{61}\u{62}\u{63}\u{0}\u{61}\u{2e}") == 0x4))
380+do
381+local s = string.rep("\u{61}",0x64)
382+local r = string.gsub(s,"\u{62}","\u{63}")
383+assert((string.format("\u{25}\u{70}",s) == string.format("\u{25}\u{70}",r)))
384+r=string.gsub(s,"\u{2e}",{["\u{78}"] = "\u{79}"})
385+assert((string.format("\u{25}\u{70}",s) == string.format("\u{25}\u{70}",r)))
386+local count = 0x0
387+r=string.gsub(s,"\u{2e}",function (x)
388+assert((x == "\u{61}"))
389+count=(count + 0x1)
390+return nil
391+end)
392+r=string.gsub(r,"\u{2e}",{["\u{62}"] = "\u{78}"})
393+assert((count == 0x64))
394+assert((string.format("\u{25}\u{70}",s) == string.format("\u{25}\u{70}",r)))
395+count=0x0
396+r=string.gsub(s,"\u{2e}",function (x)
397+assert((x == "\u{61}"))
398+count=(count + 0x1)
399+return x
400+end)
401+assert((count == 0x64))
402+assert(((r == s) and (string.format("\u{25}\u{70}",s) ~= string.format("\u{25}\u{70}",r))))
403+end
404+print("\u{4f}\u{4b}")
zod/luau/res/lua/cycled/sort.lua → desk/res/lua/cycled/sort.luarenamed+142−142
@@ -6,142 +6,142 @@ local minI = math.mininteger
66local function checkerror
77(msg,f, ...)
88local s,err = pcall(f,...)
9−assert(not s and string.find(err,msg))
9+assert((not (s and string.find(err,msg))))
1010end
11−checkerror("\u{77}\u{72}\u{6f}\u{6e}\u{67}\u{20}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}\u{20}\u{6f}\u{66}\u{20}\u{61}\u{72}\u{67}\u{75}\u{6d}\u{65}\u{6e}\u{74}\u{73}",table.insert,{},2,3,4)
11+checkerror("\u{77}\u{72}\u{6f}\u{6e}\u{67}\u{20}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}\u{20}\u{6f}\u{66}\u{20}\u{61}\u{72}\u{67}\u{75}\u{6d}\u{65}\u{6e}\u{74}\u{73}",table.insert,{},0x2,0x3,0x4)
1212local x,y,z,a,n
1313a={}
1414;
15−local lim = _soft and 200 or 2000
16−for i = 1, lim
15+local lim = ((_soft and 0xc8) or 0x7d0)
16+for i = 0x1, lim
1717do
1818a[i]=i
1919end
20−assert(select(lim,unpack(a)) == lim and select("\u{23}",unpack(a)) == lim)
20+assert(((select(lim,unpack(a)) == lim) and (select("\u{23}",unpack(a)) == lim)))
2121x=unpack(a)
22−assert(x == 1)
22+assert((x == 0x1))
2323x={unpack(a)}
24−assert(# x == lim and x[1] == 1 and x[lim] == lim)
25−x={unpack(a,lim - 2)}
26−assert(# x == 3 and x[1] == lim - 2 and x[3] == lim)
27−x={unpack(a,10,6)}
28−assert(next(x) == nil)
29−x={unpack(a,11,10)}
30−assert(next(x) == nil)
31−x,y=unpack(a,10,10)
32−assert(x == 10 and y == nil)
33−x,y,z=unpack(a,10,11)
34−assert(x == 10 and y == 11 and z == nil)
35−a,x=unpack({1})
36−assert(a == 1 and x == nil)
37−a,x=unpack({1,2},1,1)
38−assert(a == 1 and x == nil)
24+assert((# (((x == lim) and (x[0x1] == 0x1)) and (x[lim] == lim))))
25+x={unpack(a,(lim - 0x2))}
26+assert((# (((x == 0x3) and (x[0x1] == (lim - 0x2))) and (x[0x3] == lim))))
27+x={unpack(a,0xa,0x6)}
28+assert((next(x) == nil))
29+x={unpack(a,0xb,0xa)}
30+assert((next(x) == nil))
31+x,y=unpack(a,0xa,0xa)
32+assert(((x == 0xa) and (y == nil)))
33+x,y,z=unpack(a,0xa,0xb)
34+assert((((x == 0xa) and (y == 0xb)) and (z == nil)))
35+a,x=unpack({0x1})
36+assert(((a == 0x1) and (x == nil)))
37+a,x=unpack({0x1,0x2},0x1,0x1)
38+assert(((a == 0x1) and (x == nil)))
3939do
40−local maxi = (1 << 31) - 1
41−local mini = - (1 << 31)
42−checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},0,maxi)
43−checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},1,maxi)
44−checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},0,maxI)
45−checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},1,maxI)
40+local maxi = ((0x1 << 0x1f) - 0x1)
41+local mini = (- (0x1 << 0x1f))
42+checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},0x0,maxi)
43+checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},0x1,maxi)
44+checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},0x0,maxI)
45+checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},0x1,maxI)
4646checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},mini,maxi)
47−checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},- maxi,maxi)
47+checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},(- maxi),maxi)
4848checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}\u{20}\u{72}\u{65}\u{73}\u{75}\u{6c}\u{74}\u{73}",unpack,{},minI,maxI)
49−unpack({},maxi,0)
50−unpack({},maxi,1)
49+unpack({},maxi,0x0)
50+unpack({},maxi,0x1)
5151unpack({},maxI,minI)
52−pcall(unpack,{},1,maxi + 1)
53−local a,b = unpack({[maxi] = 20},maxi,maxi)
54−assert(a == 20 and b == nil)
55−a,b=unpack({[maxi] = 20},maxi - 1,maxi)
56−assert(a == nil and b == 20)
57−local t = {[maxI - 1] = 12,[maxI] = 23}
58−a,b=unpack(t,maxI - 1,maxI)
52+pcall(unpack,{},0x1,(maxi + 0x1))
53+local a,b = unpack({[maxi] = 0x14},maxi,maxi)
54+assert(((a == 0x14) and (b == nil)))
55+a,b=unpack({[maxi] = 0x14},(maxi - 0x1),maxi)
56+assert(((a == nil) and (b == 0x14)))
57+local t = {[(maxI - 0x1)] = 0xc,[maxI] = 0x17}
58+a,b=unpack(t,(maxI - 0x1),maxI)
5959;
60−assert(a == 12 and b == 23)
60+assert(((a == 0xc) and (b == 0x17)))
6161a,b=unpack(t,maxI,maxI)
6262;
63−assert(a == 23 and b == nil)
64−a,b=unpack(t,maxI,maxI - 1)
63+assert(((a == 0x17) and (b == nil)))
64+a,b=unpack(t,maxI,(maxI - 0x1))
6565;
66−assert(a == nil and b == nil)
67−t={[minI] = 12.3,[minI + 1] = 23.5}
68−a,b=unpack(t,minI,minI + 1)
66+assert(((a == nil) and (b == nil)))
67+t={[minI] = 12.3,[(minI + 0x1)] = 23.5}
68+a,b=unpack(t,minI,(minI + 0x1))
6969;
70−assert(a == 12.3 and b == 23.5)
70+assert(((a == 12.3) and (b == 23.5)))
7171a,b=unpack(t,minI,minI)
7272;
73−assert(a == 12.3 and b == nil)
74−a,b=unpack(t,minI + 1,minI)
73+assert(((a == 12.3) and (b == nil)))
74+a,b=unpack(t,(minI + 0x1),minI)
7575;
76−assert(a == nil and b == nil)
76+assert(((a == nil) and (b == nil)))
7777end
7878do
7979local t = setmetatable({},{["\u{5f}\u{5f}\u{6c}\u{65}\u{6e}"] = function ()
8080return "\u{61}\u{62}\u{63}"
8181end})
82−assert(# t == "\u{61}\u{62}\u{63}")
83−checkerror("\u{6f}\u{62}\u{6a}\u{65}\u{63}\u{74}\u{20}\u{6c}\u{65}\u{6e}\u{67}\u{74}\u{68}\u{20}\u{69}\u{73}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{6e}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}",table.insert,t,1)
82+assert((# (t == "\u{61}\u{62}\u{63}")))
83+checkerror("\u{6f}\u{62}\u{6a}\u{65}\u{63}\u{74}\u{20}\u{6c}\u{65}\u{6e}\u{67}\u{74}\u{68}\u{20}\u{69}\u{73}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{6e}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}",table.insert,t,0x1)
8484end
8585print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{70}\u{61}\u{63}\u{6b}")
8686a=table.pack()
87−assert(a[1] == undef and a.n == 0)
87+assert(((a[0x1] == undef) and (a.n == 0x0)))
8888a=table.pack(table)
89−assert(a[1] == table and a.n == 1)
89+assert(((a[0x1] == table) and (a.n == 0x1)))
9090a=table.pack(nil,nil,nil,nil)
91−assert(a[1] == nil and a.n == 4)
91+assert(((a[0x1] == nil) and (a.n == 0x4)))
9292do
93−checkerror("\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}",table.move,1,2,3,4)
93+checkerror("\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}",table.move,0x1,0x2,0x3,0x4)
9494local function eqT
9595(a,b)
9696for k,v in pairs(a)
9797do
98−assert(b[k] == v)
98+assert((b[k] == v))
9999end
100100for k,v in pairs(b)
101101do
102−assert(a[k] == v)
102+assert((a[k] == v))
103103end
104104end
105−local a = table.move({10,20,30},1,3,2)
106−eqT(a,{10,10,20,30})
107−a=table.move({10,20,30},1,3,3)
108−eqT(a,{10,20,10,20,30})
109−a={10,20,30,40}
110−table.move(a,1,4,2,a)
111−eqT(a,{10,10,20,30,40})
112−a=table.move({10,20,30},2,3,1)
113−eqT(a,{20,30,30})
105+local a = table.move({0xa,0x14,0x1e},0x1,0x3,0x2)
106+eqT(a,{0xa,0xa,0x14,0x1e})
107+a=table.move({0xa,0x14,0x1e},0x1,0x3,0x3)
108+eqT(a,{0xa,0x14,0xa,0x14,0x1e})
109+a={0xa,0x14,0x1e,0x28}
110+table.move(a,0x1,0x4,0x2,a)
111+eqT(a,{0xa,0xa,0x14,0x1e,0x28})
112+a=table.move({0xa,0x14,0x1e},0x2,0x3,0x1)
113+eqT(a,{0x14,0x1e,0x1e})
114114a={}
115−assert(table.move({10,20,30},1,3,1,a) == a)
116−eqT(a,{10,20,30})
115+assert((table.move({0xa,0x14,0x1e},0x1,0x3,0x1,a) == a))
116+eqT(a,{0xa,0x14,0x1e})
117117a={}
118−assert(table.move({10,20,30},1,0,3,a) == a)
118+assert((table.move({0xa,0x14,0x1e},0x1,0x0,0x3,a) == a))
119119eqT(a,{})
120−a=table.move({10,20,30},1,10,1)
121−eqT(a,{10,20,30})
122−a=table.move({[maxI - 2] = 1,[maxI - 1] = 2,[maxI] = 3},maxI - 2,maxI,- 10,{})
123−eqT(a,{[- 10] = 1,[- 9] = 2,[- 8] = 3})
124−a=table.move({[minI] = 1,[minI + 1] = 2,[minI + 2] = 3},minI,minI + 2,- 10,{})
125−eqT(a,{[- 10] = 1,[- 9] = 2,[- 8] = 3})
126−a=table.move({45},1,1,maxI)
127−eqT(a,{45,[maxI] = 45})
128−a=table.move({[maxI] = 100},maxI,maxI,minI)
129−eqT(a,{[minI] = 100,[maxI] = 100})
130−a=table.move({[minI] = 100},minI,minI,maxI)
131−eqT(a,{[minI] = 100,[maxI] = 100})
120+a=table.move({0xa,0x14,0x1e},0x1,0xa,0x1)
121+eqT(a,{0xa,0x14,0x1e})
122+a=table.move({[(maxI - 0x2)] = 0x1,[(maxI - 0x1)] = 0x2,[maxI] = 0x3},(maxI - 0x2),maxI,(- 0xa),{})
123+eqT(a,{[(- 0xa)] = 0x1,[(- 0x9)] = 0x2,[(- 0x8)] = 0x3})
124+a=table.move({[minI] = 0x1,[(minI + 0x1)] = 0x2,[(minI + 0x2)] = 0x3},minI,(minI + 0x2),(- 0xa),{})
125+eqT(a,{[(- 0xa)] = 0x1,[(- 0x9)] = 0x2,[(- 0x8)] = 0x3})
126+a=table.move({0x2d},0x1,0x1,maxI)
127+eqT(a,{0x2d,[maxI] = 0x2d})
128+a=table.move({[maxI] = 0x64},maxI,maxI,minI)
129+eqT(a,{[minI] = 0x64,[maxI] = 0x64})
130+a=table.move({[minI] = 0x64},minI,minI,maxI)
131+eqT(a,{[minI] = 0x64,[maxI] = 0x64})
132132a=setmetatable({},{["\u{5f}\u{5f}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = function (_,k)
133−return k * 10
133+return (k * 0xa)
134134end,["\u{5f}\u{5f}\u{6e}\u{65}\u{77}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = error})
135−local b = table.move(a,1,10,3,{})
135+local b = table.move(a,0x1,0xa,0x3,{})
136136eqT(a,{})
137−eqT(b,{nil,nil,10,20,30,40,50,60,70,80,90,100})
137+eqT(b,{nil,nil,0xa,0x14,0x1e,0x28,0x32,0x3c,0x46,0x50,0x5a,0x64})
138138b=setmetatable({""},{["\u{5f}\u{5f}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = error,["\u{5f}\u{5f}\u{6e}\u{65}\u{77}\u{69}\u{6e}\u{64}\u{65}\u{78}"] = function (t,k,v)
139−t[1]=string.format("\u{25}\u{73}\u{28}\u{25}\u{64}\u{2c}\u{25}\u{64}\u{29}",t[1],k,v)
139+t[0x1]=string.format("\u{25}\u{73}\u{28}\u{25}\u{64}\u{2c}\u{25}\u{64}\u{29}",t[0x1],k,v)
140140end})
141−table.move(a,10,13,3,b)
142−assert(b[1] == "\u{28}\u{33}\u{2c}\u{31}\u{30}\u{30}\u{29}\u{28}\u{34}\u{2c}\u{31}\u{31}\u{30}\u{29}\u{28}\u{35}\u{2c}\u{31}\u{32}\u{30}\u{29}\u{28}\u{36}\u{2c}\u{31}\u{33}\u{30}\u{29}")
143−local stat,msg = pcall(table.move,b,10,13,3,b)
144−assert(not stat and msg == b)
141+table.move(a,0xa,0xd,0x3,b)
142+assert((b[0x1] == "\u{28}\u{33}\u{2c}\u{31}\u{30}\u{30}\u{29}\u{28}\u{34}\u{2c}\u{31}\u{31}\u{30}\u{29}\u{28}\u{35}\u{2c}\u{31}\u{32}\u{30}\u{29}\u{28}\u{36}\u{2c}\u{31}\u{33}\u{30}\u{29}"))
143+local stat,msg = pcall(table.move,b,0xa,0xd,0x3,b)
144+assert((not (stat and (msg == b))))
145145end
146146do
147147local function checkmove
@@ -155,27 +155,27 @@ pos2=k
155155error()
156156end})
157157local st,msg = pcall(table.move,a,f,e,t)
158−assert(not st and not msg and pos1 == x and pos2 == y)
158+assert((not (st and (not ((msg and (pos1 == x)) and (pos2 == y))))))
159159end
160−checkmove(1,maxI,0,1,0)
161−checkmove(0,maxI - 1,1,maxI - 1,maxI)
162−checkmove(minI,- 2,- 5,- 2,maxI - 6)
163−checkmove(minI + 1,- 1,- 2,- 1,maxI - 3)
164−checkmove(minI,- 2,0,minI,0)
165−checkmove(minI + 1,- 1,1,minI + 1,1)
160+checkmove(0x1,maxI,0x0,0x1,0x0)
161+checkmove(0x0,(maxI - 0x1),0x1,(maxI - 0x1),maxI)
162+checkmove(minI,(- 0x2),(- 0x5),(- 0x2),(maxI - 0x6))
163+checkmove((minI + 0x1),(- 0x1),(- 0x2),(- 0x1),(maxI - 0x3))
164+checkmove(minI,(- 0x2),0x0,minI,0x0)
165+checkmove((minI + 0x1),(- 0x1),0x1,(minI + 0x1),0x1)
166166end
167−checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}",table.move,{},0,maxI,1)
168−checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}",table.move,{},- 1,maxI - 1,1)
169−checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}",table.move,{},minI,- 1,1)
170−checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}",table.move,{},minI,maxI,1)
171−checkerror("\u{77}\u{72}\u{61}\u{70}\u{20}\u{61}\u{72}\u{6f}\u{75}\u{6e}\u{64}",table.move,{},1,maxI,2)
172−checkerror("\u{77}\u{72}\u{61}\u{70}\u{20}\u{61}\u{72}\u{6f}\u{75}\u{6e}\u{64}",table.move,{},1,2,maxI)
173−checkerror("\u{77}\u{72}\u{61}\u{70}\u{20}\u{61}\u{72}\u{6f}\u{75}\u{6e}\u{64}",table.move,{},minI,- 2,2)
167+checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}",table.move,{},0x0,maxI,0x1)
168+checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}",table.move,{},(- 0x1),(maxI - 0x1),0x1)
169+checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}",table.move,{},minI,(- 0x1),0x1)
170+checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6d}\u{61}\u{6e}\u{79}",table.move,{},minI,maxI,0x1)
171+checkerror("\u{77}\u{72}\u{61}\u{70}\u{20}\u{61}\u{72}\u{6f}\u{75}\u{6e}\u{64}",table.move,{},0x1,maxI,0x2)
172+checkerror("\u{77}\u{72}\u{61}\u{70}\u{20}\u{61}\u{72}\u{6f}\u{75}\u{6e}\u{64}",table.move,{},0x1,0x2,maxI)
173+checkerror("\u{77}\u{72}\u{61}\u{70}\u{20}\u{61}\u{72}\u{6f}\u{75}\u{6e}\u{64}",table.move,{},minI,(- 0x2),0x2)
174174print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{6f}\u{72}\u{74}")
175175local a = setmetatable({},{["\u{5f}\u{5f}\u{6c}\u{65}\u{6e}"] = function ()
176−return - 1
176+return (- 0x1)
177177end})
178−assert(# a == - 1)
178+assert((# (a == (- 0x1))))
179179table.sort(a,error)
180180a=setmetatable({},{["\u{5f}\u{5f}\u{6c}\u{65}\u{6e}"] = function ()
181181return maxI
@@ -185,23 +185,23 @@ local function check
185185(t)
186186local function f
187187(a,b)
188−assert(a and b)
188+assert((a and b))
189189;
190190return true
191191end
192192checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{6f}\u{72}\u{64}\u{65}\u{72}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}",table.sort,t,f)
193193end
194−check({1,2,3,4})
195−check({1,2,3,4,5})
196−check({1,2,3,4,5,6})
194+check({0x1,0x2,0x3,0x4})
195+check({0x1,0x2,0x3,0x4,0x5})
196+check({0x1,0x2,0x3,0x4,0x5,0x6})
197197function check(a,f)
198−f=f or function (x,y)
199−return x < y
200−end
198+f=(f or function (x,y)
199+return (x < y)
200+end)
201201;
202−for n = # a, 2, - 1
202+for n = (# a), 0x2, (- 0x1)
203203do
204−assert(not f(a[n],a[n - 1]))
204+assert((not f(a[n],a[(n - 0x1)])))
205205end
206206end
207207a={"\u{4a}\u{61}\u{6e}","\u{46}\u{65}\u{62}","\u{4d}\u{61}\u{72}","\u{41}\u{70}\u{72}","\u{4d}\u{61}\u{79}","\u{4a}\u{75}\u{6e}","\u{4a}\u{75}\u{6c}","\u{41}\u{75}\u{67}","\u{53}\u{65}\u{70}","\u{4f}\u{63}\u{74}","\u{4e}\u{6f}\u{76}","\u{44}\u{65}\u{63}"}
@@ -209,70 +209,70 @@ table.sort(a)
209209check(a)
210210local function perm
211211(s,n)
212−n=n or # s
213−if n == 1 then
212+n=(n or (# s))
213+if (n == 0x1) then
214214local t = {unpack(s)}
215215table.sort(t)
216216check(t)
217217else
218−for i = 1, n
218+for i = 0x1, n
219219do
220220s[i],s[n]=s[n],s[i]
221−perm(s,n - 1)
221+perm(s,(n - 0x1))
222222s[i],s[n]=s[n],s[i]
223223end
224224end
225225end
226226perm({})
227−perm({1})
228−perm({1,2})
229−perm({1,2,3})
230−perm({1,2,3,4})
231−perm({2,2,3,4})
232−perm({1,2,3,4,5})
233−perm({1,2,3,3,5})
234−perm({1,2,3,4,5,6})
235−perm({2,2,3,3,5,6})
227+perm({0x1})
228+perm({0x1,0x2})
229+perm({0x1,0x2,0x3})
230+perm({0x1,0x2,0x3,0x4})
231+perm({0x2,0x2,0x3,0x4})
232+perm({0x1,0x2,0x3,0x4,0x5})
233+perm({0x1,0x2,0x3,0x3,0x5})
234+perm({0x1,0x2,0x3,0x4,0x5,0x6})
235+perm({0x2,0x2,0x3,0x3,0x5,0x6})
236236local function timesort
237237(a,n,func,msg,pre)
238238local x = os.clock()
239239table.sort(a,func)
240−x=(os.clock() - x) * 1000
241−pre=pre or ""
240+x=((os.clock() - x) * 0x3e8)
241+pre=(pre or "")
242242print(string.format("\u{25}\u{73}\u{73}\u{6f}\u{72}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{25}\u{64}\u{20}\u{25}\u{73}\u{20}\u{65}\u{6c}\u{65}\u{6d}\u{65}\u{6e}\u{74}\u{73}\u{20}\u{69}\u{6e}\u{20}\u{25}\u{2e}\u{32}\u{66}\u{20}\u{6d}\u{73}\u{65}\u{63}\u{2e}",pre,n,msg,x))
243243check(a,func)
244244end
245−local limit = 50000
245+local limit = 0xc350
246246if _soft then
247−limit=5000
247+limit=0x1388
248248end
249249a={}
250−for i = 1, limit
250+for i = 0x1, limit
251251do
252252a[i]=math.random()
253253end
254254timesort(a,limit,nil,"\u{72}\u{61}\u{6e}\u{64}\u{6f}\u{6d}")
255255timesort(a,limit,nil,"\u{73}\u{6f}\u{72}\u{74}\u{65}\u{64}","\u{72}\u{65}\u{2d}")
256256a={}
257−for i = 1, limit
257+for i = 0x1, limit
258258do
259259a[i]=math.random()
260260end
261261local x = os.clock()
262262;
263−local i = 0
263+local i = 0x0
264264table.sort(a,function (x,y)
265−i=i + 1
265+i=(i + 0x1)
266266;
267−return y < x
267+return (y < x)
268268end)
269−x=(os.clock() - x) * 1000
269+x=((os.clock() - x) * 0x3e8)
270270print(string.format("\u{49}\u{6e}\u{76}\u{65}\u{72}\u{74}\u{2d}\u{73}\u{6f}\u{72}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{6f}\u{74}\u{68}\u{65}\u{72}\u{20}\u{25}\u{64}\u{20}\u{65}\u{6c}\u{65}\u{6d}\u{65}\u{6e}\u{74}\u{73}\u{20}\u{69}\u{6e}\u{20}\u{25}\u{2e}\u{32}\u{66}\u{20}\u{6d}\u{73}\u{65}\u{63}\u{2e}\u{2c}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{25}\u{69}\u{20}\u{63}\u{6f}\u{6d}\u{70}\u{61}\u{72}\u{69}\u{73}\u{6f}\u{6e}\u{73}",limit,x,i))
271271check(a,function (x,y)
272−return y < x
272+return (y < x)
273273end)
274274table.sort({})
275−for i = 1, limit
275+for i = 0x1, limit
276276do
277277a[i]=false
278278end
@@ -281,7 +281,7 @@ return nil
281281end,"\u{65}\u{71}\u{75}\u{61}\u{6c}")
282282for i,v in pairs(a)
283283do
284−assert(v == false)
284+assert((v == false))
285285end
286286AA={"\u{e1}\u{6c}\u{6f}","\u{0}\u{66}\u{69}\u{72}\u{73}\u{74}\u{20}\u{3a}\u{2d}\u{29}","\u{61}\u{6c}\u{6f}","\u{74}\u{68}\u{65}\u{6e}\u{20}\u{74}\u{68}\u{69}\u{73}\u{20}\u{6f}\u{6e}\u{65}","\u{34}\u{35}","\u{61}\u{6e}\u{64}\u{20}\u{61}\u{20}\u{6e}\u{65}\u{77}"}
287287table.sort(AA)
@@ -289,16 +289,16 @@ check(AA)
289289table.sort(AA,function (x,y)
290290load(string.format("\u{41}\u{41}\u{5b}\u{25}\u{71}\u{5d}\u{20}\u{3d}\u{20}\u{27}\u{27}",x),"")()
291291collectgarbage()
292−return x < y
292+return (x < y)
293293end)
294294_G.AA=nil
295295local tt = {["\u{5f}\u{5f}\u{6c}\u{74}"] = function (a,b)
296−return a.val < b.val
296+return (a.val < b.val)
297297end}
298298a={}
299−for i = 1, 10
299+for i = 0x1, 0xa
300300do
301−a[i]={["\u{76}\u{61}\u{6c}"] = math.random(100)}
301+a[i]={["\u{76}\u{61}\u{6c}"] = math.random(0x64)}
302302;
303303setmetatable(a[i],tt)
304304;
desk/res/lua/cycled/strings.luanew file+441
@@ -0,0 +1,441 @@
1+print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{73}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{20}\u{6c}\u{69}\u{62}\u{72}\u{61}\u{72}\u{79}")
2+local maxi <const> = math.maxinteger
3+local mini <const> = math.mininteger
4+local function checkerror
5+(msg,f, ...)
6+local s,err = pcall(f,...)
7+assert((not (s and string.find(err,msg))))
8+end
9+assert(("\u{61}\u{6c}\u{6f}" < "\u{61}\u{6c}\u{6f}\u{31}"))
10+assert(("" < "\u{61}"))
11+assert(("\u{61}\u{6c}\u{6f}\u{0}\u{61}\u{6c}\u{6f}" < "\u{61}\u{6c}\u{6f}\u{0}\u{62}"))
12+assert(("\u{61}\u{6c}\u{6f}\u{0}\u{61}\u{6c}\u{6f}\u{0}\u{0}" > "\u{61}\u{6c}\u{6f}\u{0}\u{61}\u{6c}\u{6f}\u{0}"))
13+assert(("\u{61}\u{6c}\u{6f}" < "\u{61}\u{6c}\u{6f}\u{0}"))
14+assert(("\u{61}\u{6c}\u{6f}\u{0}" > "\u{61}\u{6c}\u{6f}"))
15+assert(("\u{0}" < "\u{1}"))
16+assert(("\u{0}\u{0}" < "\u{0}\u{1}"))
17+assert(("\u{1}\u{0}\u{61}\u{0}\u{61}" <= "\u{1}\u{0}\u{61}\u{0}\u{61}"))
18+assert((not ("\u{1}\u{0}\u{61}\u{0}\u{62}" <= "\u{1}\u{0}\u{61}\u{0}\u{61}")))
19+assert(("\u{0}\u{0}\u{0}" < "\u{0}\u{0}\u{0}\u{0}"))
20+assert((not ("\u{0}\u{0}\u{0}\u{0}" < "\u{0}\u{0}\u{0}")))
21+assert(("\u{0}\u{0}\u{0}" <= "\u{0}\u{0}\u{0}\u{0}"))
22+assert((not ("\u{0}\u{0}\u{0}\u{0}" <= "\u{0}\u{0}\u{0}")))
23+assert(("\u{0}\u{0}\u{0}" <= "\u{0}\u{0}\u{0}"))
24+assert(("\u{0}\u{0}\u{0}" >= "\u{0}\u{0}\u{0}"))
25+assert((not ("\u{0}\u{0}\u{62}" < "\u{0}\u{0}\u{61}\u{0}")))
26+assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",0x2,0x4) == "\u{32}\u{33}\u{34}"))
27+assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",0x7) == "\u{37}\u{38}\u{39}"))
28+assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",0x7,0x6) == ""))
29+assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",0x7,0x7) == "\u{37}"))
30+assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",0x0,0x0) == ""))
31+assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",(- 0xa),0xa) == "\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}"))
32+assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",0x1,0x9) == "\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}"))
33+assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",(- 0xa),(- 0x14)) == ""))
34+assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",(- 0x1)) == "\u{39}"))
35+assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",(- 0x4)) == "\u{36}\u{37}\u{38}\u{39}"))
36+assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",(- 0x6),(- 0x4)) == "\u{34}\u{35}\u{36}"))
37+assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",mini,(- 0x4)) == "\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}"))
38+assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",mini,maxi) == "\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}"))
39+assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",mini,mini) == ""))
40+assert((string.sub("\u{0}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",0x3,0x5) == "\u{32}\u{33}\u{34}"))
41+assert((("\u{0}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}"):sub(0x8) == "\u{37}\u{38}\u{39}"))
42+assert((string.find("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}","\u{33}\u{34}\u{35}") == 0x3))
43+local a,b = string.find("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}","\u{33}\u{34}\u{35}")
44+assert((string.sub("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}",a,b) == "\u{33}\u{34}\u{35}"))
45+assert((string.find("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}","\u{33}\u{34}\u{35}",0x3) == 0x3))
46+assert((string.find("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}","\u{33}\u{34}\u{35}",0x4) == 0xd))
47+assert((not string.find("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}","\u{33}\u{34}\u{36}",0x4)))
48+assert((string.find("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}","\u{2e}\u{34}\u{35}",(- 0x9)) == 0xd))
49+assert((not string.find("\u{61}\u{62}\u{63}\u{64}\u{65}\u{66}\u{67}","\u{0}",0x5,0x1)))
50+assert((string.find("","") == 0x1))
51+assert((string.find("","",0x1) == 0x1))
52+assert((not string.find("","",0x2)))
53+assert((not string.find("","\u{61}\u{61}\u{61}",0x1)))
54+assert((("\u{61}\u{6c}\u{6f}\u{28}\u{2e}\u{29}\u{61}\u{6c}\u{6f}"):find("\u{28}\u{2e}\u{29}",0x1,0x1) == 0x4))
55+assert((string.len("") == 0x0))
56+assert((string.len("\u{0}\u{0}\u{0}") == 0x3))
57+assert((string.len("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}") == 0xa))
58+assert((# ("" == 0x0)))
59+assert((# ("\u{0}\u{0}\u{0}" == 0x3)))
60+assert((# ("\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}" == 0xa)))
61+assert((string.byte("\u{61}") == 0x61))
62+assert((string.byte("\u{e4}") > 0x7f))
63+assert((string.byte(string.char(0xff)) == 0xff))
64+assert((string.byte(string.char(0x0)) == 0x0))
65+assert((string.byte("\u{0}") == 0x0))
66+assert((string.byte("\u{0}\u{0}\u{61}\u{6c}\u{6f}\u{0}\u{78}",(- 0x1)) == string.byte("\u{78}")))
67+assert((string.byte("\u{62}\u{61}",0x2) == 0x61))
68+assert((string.byte("\u{a}\u{a}",0x2,(- 0x1)) == 0xa))
69+assert((string.byte("\u{a}\u{a}",0x2,0x2) == 0xa))
70+assert((string.byte("") == nil))
71+assert((string.byte("\u{68}\u{69}",(- 0x3)) == nil))
72+assert((string.byte("\u{68}\u{69}",0x3) == nil))
73+assert((string.byte("\u{68}\u{69}",0x9,0xa) == nil))
74+assert((string.byte("\u{68}\u{69}",0x2,0x1) == nil))
75+assert((string.char() == ""))
76+assert((string.char(0x0,0xff,0x0) == "\u{0}\u{ff}\u{0}"))
77+assert((string.char(0x0,string.byte("\u{e4}"),0x0) == "\u{0}\u{e4}\u{0}"))
78+assert((string.char(string.byte("\u{e4}\u{6c}\u{0}\u{f3}\u{75}",0x1,(- 0x1))) == "\u{e4}\u{6c}\u{0}\u{f3}\u{75}"))
79+assert((string.char(string.byte("\u{e4}\u{6c}\u{0}\u{f3}\u{75}",0x1,0x0)) == ""))
80+assert((string.char(string.byte("\u{e4}\u{6c}\u{0}\u{f3}\u{75}",(- 0xa),0x64)) == "\u{e4}\u{6c}\u{0}\u{f3}\u{75}"))
81+checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{72}\u{61}\u{6e}\u{67}\u{65}",string.char,0x100)
82+checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{72}\u{61}\u{6e}\u{67}\u{65}",string.char,(- 0x1))
83+checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{72}\u{61}\u{6e}\u{67}\u{65}",string.char,math.maxinteger)
84+checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{72}\u{61}\u{6e}\u{67}\u{65}",string.char,math.mininteger)
85+assert((string.upper("\u{61}\u{62}\u{0}\u{63}") == "\u{41}\u{42}\u{0}\u{43}"))
86+assert((string.lower("\u{0}\u{41}\u{42}\u{43}\u{63}\u{25}\u{24}") == "\u{0}\u{61}\u{62}\u{63}\u{63}\u{25}\u{24}"))
87+assert((string.rep("\u{74}\u{65}\u{73}\u{74}\u{65}",0x0) == ""))
88+assert((string.rep("\u{74}\u{e9}\u{73}\u{0}\u{74}\u{ea}",0x2) == "\u{74}\u{e9}\u{73}\u{0}\u{74}\u{ea}\u{74}\u{e9}\u{73}\u{0}\u{74}\u{ea}"))
89+assert((string.rep("",0xa) == ""))
90+if (string.packsize("\u{69}") == 0x4) then
91+checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6c}\u{61}\u{72}\u{67}\u{65}",string.rep,"\u{61}\u{61}",(0x1 << 0x1e))
92+checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6c}\u{61}\u{72}\u{67}\u{65}",string.rep,"\u{61}",(0x1 << 0x1e),"\u{2c}")
93+end
94+assert((string.rep("\u{74}\u{65}\u{73}\u{74}\u{65}",0x0,"\u{78}\u{75}\u{78}\u{75}") == ""))
95+assert((string.rep("\u{74}\u{65}\u{73}\u{74}\u{65}",0x1,"\u{78}\u{75}\u{78}\u{75}") == "\u{74}\u{65}\u{73}\u{74}\u{65}"))
96+assert((string.rep("\u{1}\u{0}\u{1}",0x2,"\u{0}\u{0}") == "\u{1}\u{0}\u{1}\u{0}\u{0}\u{1}\u{0}\u{1}"))
97+assert((string.rep("",0xa,"\u{2e}") == string.rep("\u{2e}",0x9)))
98+assert((not pcall(string.rep,"\u{61}\u{61}",((maxi // 0x2) + 0xa))))
99+assert((not pcall(string.rep,"",((maxi // 0x2) + 0xa),"\u{61}\u{61}")))
100+assert((string.reverse("") == ""))
101+assert((string.reverse("\u{0}\u{1}\u{2}\u{3}") == "\u{3}\u{2}\u{1}\u{0}"))
102+assert((string.reverse("\u{0}\u{31}\u{32}\u{33}\u{34}") == "\u{34}\u{33}\u{32}\u{31}\u{0}"))
103+for i = 0x0, 0x1e
104+do
105+assert((string.len(string.rep("\u{61}",i)) == i))
106+end
107+assert((type(tostring(nil)) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"))
108+assert((type(tostring(0xc)) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"))
109+assert(string.find(tostring({}),"\u{74}\u{61}\u{62}\u{6c}\u{65}\u{3a}"))
110+assert(string.find(tostring(print),"\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{3a}"))
111+assert((# (tostring("\u{0}") == 0x1)))
112+assert((tostring(true) == "\u{74}\u{72}\u{75}\u{65}"))
113+assert((tostring(false) == "\u{66}\u{61}\u{6c}\u{73}\u{65}"))
114+assert((tostring((- 0x4b3)) == "\u{2d}\u{31}\u{32}\u{30}\u{33}"))
115+assert((tostring(1203.125) == "\u{31}\u{32}\u{30}\u{33}\u{2e}\u{31}\u{32}\u{35}"))
116+assert((tostring((- 0.5)) == "\u{2d}\u{30}\u{2e}\u{35}"))
117+assert((tostring((- 0x7fff)) == "\u{2d}\u{33}\u{32}\u{37}\u{36}\u{37}"))
118+if math.tointeger(0x7fffffff) then
119+assert((tostring((- 0x7fffffff)) == "\u{2d}\u{32}\u{31}\u{34}\u{37}\u{34}\u{38}\u{33}\u{36}\u{34}\u{37}"))
120+end
121+if math.tointeger(0x4000000000000000) then
122+assert((tostring(0x4000000000000000) == "\u{34}\u{36}\u{31}\u{31}\u{36}\u{38}\u{36}\u{30}\u{31}\u{38}\u{34}\u{32}\u{37}\u{33}\u{38}\u{37}\u{39}\u{30}\u{34}"))
123+assert((tostring((- 0x4000000000000000)) == "\u{2d}\u{34}\u{36}\u{31}\u{31}\u{36}\u{38}\u{36}\u{30}\u{31}\u{38}\u{34}\u{32}\u{37}\u{33}\u{38}\u{37}\u{39}\u{30}\u{34}"))
124+end
125+if (tostring(0.0) == "\u{30}\u{2e}\u{30}") then
126+assert(((("" .. 0xc) == "\u{31}\u{32}") and ((12.0 .. "") == "\u{31}\u{32}\u{2e}\u{30}")))
127+assert((tostring((- (0x4b3 + 0.0))) == "\u{2d}\u{31}\u{32}\u{30}\u{33}\u{2e}\u{30}"))
128+else
129+assert((tostring(0.0) == "\u{30}"))
130+assert(((("" .. 0xc) == "\u{31}\u{32}") and ((12.0 .. "") == "\u{31}\u{32}")))
131+assert((tostring((- (0x4b3 + 0.0))) == "\u{2d}\u{31}\u{32}\u{30}\u{33}"))
132+end
133+do
134+local null = "\u{28}\u{6e}\u{75}\u{6c}\u{6c}\u{29}"
135+assert((string.format("\u{25}\u{70}",0x4) == null))
136+assert((string.format("\u{25}\u{70}",true) == null))
137+assert((string.format("\u{25}\u{70}",nil) == null))
138+assert((string.format("\u{25}\u{70}",{}) ~= null))
139+assert((string.format("\u{25}\u{70}",print) ~= null))
140+assert((string.format("\u{25}\u{70}",coroutine.running()) ~= null))
141+assert((string.format("\u{25}\u{70}",io.stdin) ~= null))
142+assert((string.format("\u{25}\u{70}",io.stdin) == string.format("\u{25}\u{70}",io.stdin)))
143+assert((string.format("\u{25}\u{70}",print) == string.format("\u{25}\u{70}",print)))
144+assert((string.format("\u{25}\u{70}",print) ~= string.format("\u{25}\u{70}",assert)))
145+assert((# (string.format("\u{25}\u{39}\u{30}\u{70}",{}) == 0x5a)))
146+assert((# (string.format("\u{25}\u{2d}\u{36}\u{30}\u{70}",{}) == 0x3c)))
147+assert((string.format("\u{25}\u{31}\u{30}\u{70}",false) == (string.rep("\u{20}",(0xa - (# null))) .. null)))
148+assert((string.format("\u{25}\u{2d}\u{31}\u{32}\u{70}",1.5) == (null .. string.rep("\u{20}",(0xc - (# null))))))
149+do
150+local t1 = {}
151+;
152+local t2 = {}
153+assert((string.format("\u{25}\u{70}",t1) ~= string.format("\u{25}\u{70}",t2)))
154+end
155+do
156+local s1 = string.rep("\u{61}",0xa)
157+local s2 = string.rep("\u{61}\u{61}",0x5)
158+assert((string.format("\u{25}\u{70}",s1) == string.format("\u{25}\u{70}",s2)))
159+end
160+do
161+local s1 = string.rep("\u{61}",0x12c)
162+;
163+local s2 = string.rep("\u{61}",0x12c)
164+assert((string.format("\u{25}\u{70}",s1) ~= string.format("\u{25}\u{70}",s2)))
165+end
166+end
167+local x = "\u{22}\u{ed}\u{6c}\u{6f}\u{22}\u{a}\u{5c}"
168+assert((string.format("\u{25}\u{71}\u{25}\u{73}",x,x) == "\u{22}\u{5c}\u{22}\u{ed}\u{6c}\u{6f}\u{5c}\u{22}\u{5c}\u{a}\u{5c}\u{5c}\u{22}\u{22}\u{ed}\u{6c}\u{6f}\u{22}\u{a}\u{5c}"))
169+assert((string.format("\u{25}\u{71}","\u{0}") == "\u{22}\u{5c}\u{30}\u{22}"))
170+assert((load(string.format("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{25}\u{71}",x))() == x))
171+x="\u{0}\u{1}\u{2}\u{33}\u{5}\u{0}\u{39}"
172+assert((load(string.format("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{25}\u{71}",x))() == x))
173+assert((string.format("\u{0}\u{25}\u{63}\u{0}\u{25}\u{63}\u{25}\u{78}\u{0}",string.byte("\u{e4}"),string.byte("\u{62}"),0x8c) == "\u{0}\u{e4}\u{0}\u{62}\u{38}\u{63}\u{0}"))
174+assert((string.format("") == ""))
175+assert(((string.format("\u{25}\u{63}",0x22) .. (string.format("\u{25}\u{63}",0x30) .. (string.format("\u{25}\u{63}",0x5a) .. string.format("\u{25}\u{63}",0x64)))) == string.format("\u{25}\u{31}\u{63}\u{25}\u{2d}\u{63}\u{25}\u{2d}\u{31}\u{63}\u{25}\u{63}",0x22,0x30,0x5a,0x64)))
176+assert((string.format("\u{25}\u{73}\u{0}\u{20}\u{69}\u{73}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{0}\u{25}\u{73}","\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}","\u{62}\u{65}") == "\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{0}\u{20}\u{69}\u{73}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{0}\u{62}\u{65}"))
177+assert((string.format("\u{25}\u{25}\u{25}\u{64}\u{20}\u{25}\u{30}\u{31}\u{30}\u{64}",0xa,0x17) == "\u{25}\u{31}\u{30}\u{20}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{32}\u{33}"))
178+assert((tonumber(string.format("\u{25}\u{66}",10.3)) == 10.3))
179+assert((string.format("\u{22}\u{25}\u{2d}\u{35}\u{30}\u{73}\u{22}","\u{61}") == ("\u{22}\u{61}" .. (string.rep("\u{20}",0x31) .. "\u{22}"))))
180+assert((string.format("\u{2d}\u{25}\u{2e}\u{32}\u{30}\u{73}\u{2e}\u{32}\u{30}\u{73}",string.rep("\u{25}",0x7d0)) == ("\u{2d}" .. (string.rep("\u{25}",0x14) .. "\u{2e}\u{32}\u{30}\u{73}"))))
181+assert((string.format("\u{22}\u{2d}\u{25}\u{32}\u{30}\u{73}\u{2e}\u{32}\u{30}\u{73}\u{22}",string.rep("\u{25}",0x7d0)) == string.format("\u{25}\u{71}",("\u{2d}" .. (string.rep("\u{25}",0x7d0) .. "\u{2e}\u{32}\u{30}\u{73}")))))
182+do
183+local function checkQ
184+(v)
185+local s = string.format("\u{25}\u{71}",v)
186+local nv = load(("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}" .. s))()
187+assert(((v == nv) and (math.type(v) == math.type(nv))))
188+end
189+checkQ("\u{0}\u{0}\u{1}\u{ff}\u{234}")
190+checkQ(math.maxinteger)
191+checkQ(math.mininteger)
192+checkQ(math.pi)
193+checkQ(0.1)
194+checkQ(true)
195+checkQ(nil)
196+checkQ(false)
197+checkQ(math.huge)
198+checkQ((- math.huge))
199+assert((string.format("\u{25}\u{71}",(0x0 / 0x0)) == "\u{28}\u{30}\u{2f}\u{30}\u{29}"))
200+checkerror("\u{6e}\u{6f}\u{20}\u{6c}\u{69}\u{74}\u{65}\u{72}\u{61}\u{6c}",string.format,"\u{25}\u{71}",{})
201+end
202+assert((string.format("\u{0}\u{25}\u{73}\u{0}","\u{0}\u{0}\u{1}") == "\u{0}\u{0}\u{0}\u{1}\u{0}"))
203+checkerror("\u{63}\u{6f}\u{6e}\u{74}\u{61}\u{69}\u{6e}\u{73}\u{20}\u{7a}\u{65}\u{72}\u{6f}\u{73}",string.format,"\u{25}\u{31}\u{30}\u{73}","\u{0}")
204+assert((string.format("\u{25}\u{73}\u{20}\u{25}\u{73}",nil,true) == "\u{6e}\u{69}\u{6c}\u{20}\u{74}\u{72}\u{75}\u{65}"))
205+assert((string.format("\u{25}\u{73}\u{20}\u{25}\u{2e}\u{34}\u{73}",false,true) == "\u{66}\u{61}\u{6c}\u{73}\u{65}\u{20}\u{74}\u{72}\u{75}\u{65}"))
206+assert((string.format("\u{25}\u{2e}\u{33}\u{73}\u{20}\u{25}\u{2e}\u{33}\u{73}",false,true) == "\u{66}\u{61}\u{6c}\u{20}\u{74}\u{72}\u{75}"))
207+local m = setmetatable({},{["\u{5f}\u{5f}\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}"] = function ()
208+return "\u{68}\u{65}\u{6c}\u{6c}\u{6f}"
209+end,["\u{5f}\u{5f}\u{6e}\u{61}\u{6d}\u{65}"] = "\u{68}\u{69}"})
210+assert((string.format("\u{25}\u{73}\u{20}\u{25}\u{2e}\u{31}\u{30}\u{73}",m,m) == "\u{68}\u{65}\u{6c}\u{6c}\u{6f}\u{20}\u{68}\u{65}\u{6c}\u{6c}\u{6f}"))
211+getmetatable(m).__tostring=nil
212+assert((string.format("\u{25}\u{2e}\u{34}\u{73}",m) == "\u{68}\u{69}\u{3a}\u{20}"))
213+getmetatable(m).__tostring=function ()
214+return {}
215+end
216+checkerror("\u{27}\u{5f}\u{5f}\u{74}\u{6f}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{27}\u{20}\u{6d}\u{75}\u{73}\u{74}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{61}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}",tostring,m)
217+assert((string.format("\u{25}\u{78}",0.0) == "\u{30}"))
218+assert((string.format("\u{25}\u{30}\u{32}\u{78}",0.0) == "\u{30}\u{30}"))
219+assert((string.format("\u{25}\u{30}\u{38}\u{58}",0xffffffff) == "\u{46}\u{46}\u{46}\u{46}\u{46}\u{46}\u{46}\u{46}"))
220+assert((string.format("\u{25}\u{2b}\u{30}\u{38}\u{64}",0x7b0d) == "\u{2b}\u{30}\u{30}\u{33}\u{31}\u{35}\u{30}\u{31}"))
221+assert((string.format("\u{25}\u{2b}\u{30}\u{38}\u{64}",(- 0x78cf)) == "\u{2d}\u{30}\u{30}\u{33}\u{30}\u{39}\u{32}\u{37}"))
222+do
223+local i = 0x1
224+local j = 0x2710
225+while ((i + 0x1) < j) do
226+local m = ((i + j) // 0x2)
227+if ((0xa ^ m) < math.huge) then
228+i=m
229+else
230+j=m
231+end
232+end
233+assert((((0xa ^ i) < math.huge) and ((0xa ^ j) == math.huge)))
234+local s = string.format("\u{25}\u{2e}\u{39}\u{39}\u{66}",(- (0xa ^ i)))
235+assert((string.len(s) >= (i + 0x65)))
236+assert((tonumber(s) == (- (0xa ^ i))))
237+assert(((0xa ^ 0x26) < math.huge))
238+local s = string.format("\u{25}\u{2e}\u{39}\u{39}\u{66}",(- (0xa ^ 0x26)))
239+assert((string.len(s) >= (0x26 + 0x65)))
240+assert((tonumber(s) == (- (0xa ^ 0x26))))
241+end
242+do
243+local max,min = 0x7fffffff,(- 0x80000000)
244+assert((string.sub(string.format("\u{25}\u{38}\u{78}",(- 0x1)),(- 0x8)) == "\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}"))
245+assert((string.format("\u{25}\u{78}",max) == "\u{37}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}"))
246+assert((string.sub(string.format("\u{25}\u{78}",min),(- 0x8)) == "\u{38}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}"))
247+assert((string.format("\u{25}\u{64}",max) == "\u{32}\u{31}\u{34}\u{37}\u{34}\u{38}\u{33}\u{36}\u{34}\u{37}"))
248+assert((string.format("\u{25}\u{64}",min) == "\u{2d}\u{32}\u{31}\u{34}\u{37}\u{34}\u{38}\u{33}\u{36}\u{34}\u{38}"))
249+assert((string.format("\u{25}\u{75}",0xffffffff) == "\u{34}\u{32}\u{39}\u{34}\u{39}\u{36}\u{37}\u{32}\u{39}\u{35}"))
250+assert((string.format("\u{25}\u{6f}",0xabcd) == "\u{31}\u{32}\u{35}\u{37}\u{31}\u{35}"))
251+max,min=0x7fffffffffffffff,(- 0x8000000000000000)
252+if (max > (2.0 ^ 0x35)) then
253+assert((string.format("\u{25}\u{78}",(((0x2 ^ 0x34) | 0x0) - 0x1)) == "\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}"))
254+assert((string.format("\u{30}\u{78}\u{25}\u{38}\u{58}",0x8f000003) == "\u{30}\u{78}\u{38}\u{46}\u{30}\u{30}\u{30}\u{30}\u{30}\u{33}"))
255+assert((string.format("\u{25}\u{64}",(0x2 ^ 0x35)) == "\u{39}\u{30}\u{30}\u{37}\u{31}\u{39}\u{39}\u{32}\u{35}\u{34}\u{37}\u{34}\u{30}\u{39}\u{39}\u{32}"))
256+assert((string.format("\u{25}\u{69}",(- (0x2 ^ 0x35))) == "\u{2d}\u{39}\u{30}\u{30}\u{37}\u{31}\u{39}\u{39}\u{32}\u{35}\u{34}\u{37}\u{34}\u{30}\u{39}\u{39}\u{32}"))
257+assert((string.format("\u{25}\u{78}",max) == "\u{37}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}"))
258+assert((string.format("\u{25}\u{78}",min) == "\u{38}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}"))
259+assert((string.format("\u{25}\u{64}",max) == "\u{39}\u{32}\u{32}\u{33}\u{33}\u{37}\u{32}\u{30}\u{33}\u{36}\u{38}\u{35}\u{34}\u{37}\u{37}\u{35}\u{38}\u{30}\u{37}"))
260+assert((string.format("\u{25}\u{64}",min) == "\u{2d}\u{39}\u{32}\u{32}\u{33}\u{33}\u{37}\u{32}\u{30}\u{33}\u{36}\u{38}\u{35}\u{34}\u{37}\u{37}\u{35}\u{38}\u{30}\u{38}"))
261+assert((string.format("\u{25}\u{75}",(~ (- (0x1 << 0x40)))) == "\u{31}\u{38}\u{34}\u{34}\u{36}\u{37}\u{34}\u{34}\u{30}\u{37}\u{33}\u{37}\u{30}\u{39}\u{35}\u{35}\u{31}\u{36}\u{31}\u{35}"))
262+assert((tostring(0x11f71fb04cb) == "\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}"))
263+end
264+end
265+do
266+print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{27}\u{66}\u{6f}\u{72}\u{6d}\u{61}\u{74}\u{20}\u{25}\u{61}\u{20}\u{25}\u{41}\u{27}")
267+local function matchhexa
268+(n)
269+local s = string.format("\u{25}\u{61}",n)
270+assert(string.find(s,"\u{5e}\u{25}\u{2d}\u{3f}\u{30}\u{78}\u{5b}\u{31}\u{2d}\u{39}\u{61}\u{2d}\u{66}\u{5d}\u{25}\u{2e}\u{3f}\u{5b}\u{30}\u{2d}\u{39}\u{61}\u{2d}\u{66}\u{5d}\u{2a}\u{70}\u{5b}\u{2d}\u{2b}\u{5d}\u{3f}\u{25}\u{64}\u{2b}\u{24}"))
271+assert((tonumber(s) == n))
272+s=string.format("\u{25}\u{41}",n)
273+assert(string.find(s,"\u{5e}\u{25}\u{2d}\u{3f}\u{30}\u{58}\u{5b}\u{31}\u{2d}\u{39}\u{41}\u{2d}\u{46}\u{5d}\u{25}\u{2e}\u{3f}\u{5b}\u{30}\u{2d}\u{39}\u{41}\u{2d}\u{46}\u{5d}\u{2a}\u{50}\u{5b}\u{2d}\u{2b}\u{5d}\u{3f}\u{25}\u{64}\u{2b}\u{24}"))
274+assert((tonumber(s) == n))
275+end
276+for _,n in ipairs({0.1,(- 0.1),(0x1 / 0x3),(- (0x1 / 0x3)),1e30,(- 1e30),(- (0x2d / 0xf7)),0x1,(- 0x1),0x2,(- 0x2),3e-20,(- 3e-20)})
277+do
278+matchhexa(n)
279+end
280+assert(string.find(string.format("\u{25}\u{41}",0.0),"\u{5e}\u{30}\u{58}\u{30}\u{25}\u{2e}\u{3f}\u{30}\u{2a}\u{50}\u{25}\u{2b}\u{3f}\u{30}\u{24}"))
281+assert(string.find(string.format("\u{25}\u{61}",(- 0.0)),"\u{5e}\u{25}\u{2d}\u{30}\u{78}\u{30}\u{25}\u{2e}\u{3f}\u{30}\u{2a}\u{70}\u{25}\u{2b}\u{3f}\u{30}\u{24}"))
282+if (not _port) then
283+assert(string.find(string.format("\u{25}\u{61}",(0x1 / 0x0)),"\u{5e}\u{69}\u{6e}\u{66}"))
284+assert(string.find(string.format("\u{25}\u{41}",(- (0x1 / 0x0))),"\u{5e}\u{25}\u{2d}\u{49}\u{4e}\u{46}"))
285+assert(string.find(string.format("\u{25}\u{61}",(0x0 / 0x0)),"\u{5e}\u{25}\u{2d}\u{3f}\u{6e}\u{61}\u{6e}"))
286+assert(string.find(string.format("\u{25}\u{61}",(- 0.0)),"\u{5e}\u{25}\u{2d}\u{30}\u{78}\u{30}"))
287+end
288+if (not pcall(string.format,"\u{25}\u{2e}\u{33}\u{61}",0x0)) then
289+(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{6d}\u{6f}\u{64}\u{69}\u{66}\u{69}\u{65}\u{72}\u{73}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{66}\u{6f}\u{72}\u{6d}\u{61}\u{74}\u{20}\u{27}\u{25}\u{61}\u{27}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{76}\u{61}\u{69}\u{6c}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
290+else
291+assert(string.find(string.format("\u{25}\u{2b}\u{2e}\u{32}\u{41}",0xc),"\u{5e}\u{25}\u{2b}\u{30}\u{58}\u{25}\u{78}\u{25}\u{2e}\u{25}\u{78}\u{30}\u{50}\u{25}\u{2b}\u{3f}\u{25}\u{64}\u{24}"))
292+assert(string.find(string.format("\u{25}\u{2e}\u{34}\u{41}",(- 0xc)),"\u{5e}\u{25}\u{2d}\u{30}\u{58}\u{25}\u{78}\u{25}\u{2e}\u{25}\u{78}\u{30}\u{30}\u{30}\u{50}\u{25}\u{2b}\u{3f}\u{25}\u{64}\u{24}"))
293+end
294+end
295+assert((string.format("\u{25}\u{23}\u{31}\u{32}\u{6f}",0xa) == "\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{30}\u{31}\u{32}"))
296+assert((string.format("\u{25}\u{23}\u{31}\u{30}\u{78}",0x64) == "\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{30}\u{78}\u{36}\u{34}"))
297+assert((string.format("\u{25}\u{23}\u{2d}\u{31}\u{37}\u{58}",0x64) == "\u{30}\u{58}\u{36}\u{34}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}"))
298+assert((string.format("\u{25}\u{30}\u{31}\u{33}\u{69}",(- 0x64)) == "\u{2d}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{31}\u{30}\u{30}"))
299+assert((string.format("\u{25}\u{32}\u{2e}\u{35}\u{64}",(- 0x64)) == "\u{2d}\u{30}\u{30}\u{31}\u{30}\u{30}"))
300+assert((string.format("\u{25}\u{2e}\u{75}",0x0) == ""))
301+assert((string.format("\u{25}\u{2b}\u{23}\u{30}\u{31}\u{34}\u{2e}\u{30}\u{66}",0x64) == "\u{2b}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{31}\u{30}\u{30}\u{2e}"))
302+assert((string.format("\u{25}\u{2d}\u{31}\u{36}\u{63}",0x61) == "\u{61}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}"))
303+assert((string.format("\u{25}\u{2b}\u{2e}\u{33}\u{47}",1.5) == "\u{2b}\u{31}\u{2e}\u{35}"))
304+assert((string.format("\u{25}\u{2e}\u{30}\u{73}","\u{61}\u{6c}\u{6f}") == ""))
305+assert((string.format("\u{25}\u{2e}\u{73}","\u{61}\u{6c}\u{6f}") == ""))
306+assert(string.match(string.format("\u{25}\u{20}\u{31}\u{2e}\u{30}\u{45}",0x64),"\u{5e}\u{20}\u{31}\u{45}\u{25}\u{2b}\u{30}\u{2b}\u{32}\u{24}"))
307+assert(string.match(string.format("\u{25}\u{20}\u{2e}\u{31}\u{67}",(0x2 ^ 0xa)),"\u{5e}\u{20}\u{31}\u{65}\u{25}\u{2b}\u{30}\u{2b}\u{33}\u{24}"))
308+local function check
309+(fmt,msg)
310+checkerror(msg,string.format,fmt,0xa)
311+end
312+local aux = string.rep("\u{30}",0x258)
313+check("\u{25}\u{31}\u{30}\u{30}\u{2e}\u{33}\u{64}","\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{6f}\u{6e}\u{76}\u{65}\u{72}\u{73}\u{69}\u{6f}\u{6e}")
314+check(("\u{25}\u{31}" .. (aux .. "\u{2e}\u{33}\u{64}")),"\u{74}\u{6f}\u{6f}\u{20}\u{6c}\u{6f}\u{6e}\u{67}")
315+check("\u{25}\u{31}\u{2e}\u{31}\u{30}\u{30}\u{64}","\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{6f}\u{6e}\u{76}\u{65}\u{72}\u{73}\u{69}\u{6f}\u{6e}")
316+check(("\u{25}\u{31}\u{30}\u{2e}\u{31}" .. (aux .. "\u{30}\u{30}\u{34}\u{64}")),"\u{74}\u{6f}\u{6f}\u{20}\u{6c}\u{6f}\u{6e}\u{67}")
317+check("\u{25}\u{74}","\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{6f}\u{6e}\u{76}\u{65}\u{72}\u{73}\u{69}\u{6f}\u{6e}")
318+check(("\u{25}" .. (aux .. "\u{64}")),"\u{74}\u{6f}\u{6f}\u{20}\u{6c}\u{6f}\u{6e}\u{67}")
319+check("\u{25}\u{64}\u{20}\u{25}\u{64}","\u{6e}\u{6f}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}")
320+check("\u{25}\u{30}\u{31}\u{30}\u{63}","\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{6f}\u{6e}\u{76}\u{65}\u{72}\u{73}\u{69}\u{6f}\u{6e}")
321+check("\u{25}\u{2e}\u{31}\u{30}\u{63}","\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{6f}\u{6e}\u{76}\u{65}\u{72}\u{73}\u{69}\u{6f}\u{6e}")
322+check("\u{25}\u{30}\u{2e}\u{33}\u{34}\u{73}","\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{6f}\u{6e}\u{76}\u{65}\u{72}\u{73}\u{69}\u{6f}\u{6e}")
323+check("\u{25}\u{23}\u{69}","\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{6f}\u{6e}\u{76}\u{65}\u{72}\u{73}\u{69}\u{6f}\u{6e}")
324+check("\u{25}\u{33}\u{2e}\u{31}\u{70}","\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{6f}\u{6e}\u{76}\u{65}\u{72}\u{73}\u{69}\u{6f}\u{6e}")
325+check("\u{25}\u{30}\u{2e}\u{73}","\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{6f}\u{6e}\u{76}\u{65}\u{72}\u{73}\u{69}\u{6f}\u{6e}")
326+check("\u{25}\u{31}\u{30}\u{71}","\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{68}\u{61}\u{76}\u{65}\u{20}\u{6d}\u{6f}\u{64}\u{69}\u{66}\u{69}\u{65}\u{72}\u{73}")
327+check("\u{25}\u{46}","\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{63}\u{6f}\u{6e}\u{76}\u{65}\u{72}\u{73}\u{69}\u{6f}\u{6e}")
328+assert((load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{a}\u{2d}\u{2d}\u{63}\u{6f}\u{6d}\u{6d}\u{65}\u{6e}\u{74}\u{20}\u{77}\u{69}\u{74}\u{68}\u{6f}\u{75}\u{74}\u{20}\u{65}\u{6e}\u{64}\u{69}\u{6e}\u{67}\u{20}\u{45}\u{4f}\u{4c}")() == 0x1))
329+checkerror("\u{74}\u{61}\u{62}\u{6c}\u{65}\u{20}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}",table.concat,0x3)
330+checkerror(("\u{61}\u{74}\u{20}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}" .. maxi),table.concat,{},"\u{20}",maxi,maxi)
331+checkerror(("\u{61}\u{74}\u{20}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{20}\u{25}" .. mini),table.concat,{},"\u{20}",mini,mini)
332+assert((table.concat({}) == ""))
333+assert((table.concat({},"\u{78}") == ""))
334+assert((table.concat({"\u{0}","\u{0}\u{1}","\u{0}\u{1}\u{2}"},"\u{2e}\u{0}\u{2e}") == "\u{0}\u{2e}\u{0}\u{2e}\u{0}\u{1}\u{2e}\u{0}\u{2e}\u{0}\u{1}\u{2}"))
335+local a = {}
336+;
337+for i = 0x1, 0x12c
338+do
339+a[i]="\u{78}\u{75}\u{78}\u{75}"
340+end
341+assert(((table.concat(a,"\u{31}\u{32}\u{33}") .. "\u{31}\u{32}\u{33}") == string.rep("\u{78}\u{75}\u{78}\u{75}\u{31}\u{32}\u{33}",0x12c)))
342+assert((table.concat(a,"\u{62}",0x14,0x14) == "\u{78}\u{75}\u{78}\u{75}"))
343+assert((table.concat(a,"",0x14,0x15) == "\u{78}\u{75}\u{78}\u{75}\u{78}\u{75}\u{78}\u{75}"))
344+assert((table.concat(a,"\u{78}",0x16,0x15) == ""))
345+assert((table.concat(a,"\u{33}",0x12b) == "\u{78}\u{75}\u{78}\u{75}\u{33}\u{78}\u{75}\u{78}\u{75}"))
346+assert((table.concat({},"\u{78}",maxi,(maxi - 0x1)) == ""))
347+assert((table.concat({},"\u{78}",(mini + 0x1),mini) == ""))
348+assert((table.concat({},"\u{78}",maxi,mini) == ""))
349+assert((table.concat({[maxi] = "\u{61}\u{6c}\u{6f}"},"\u{78}",maxi,maxi) == "\u{61}\u{6c}\u{6f}"))
350+assert((table.concat({[maxi] = "\u{61}\u{6c}\u{6f}",[(maxi - 0x1)] = "\u{79}"},"\u{2d}",(maxi - 0x1),maxi) == "\u{79}\u{2d}\u{61}\u{6c}\u{6f}"))
351+assert((not pcall(table.concat,{"\u{61}","\u{62}",{}})))
352+a={"\u{61}","\u{62}","\u{63}"}
353+assert((table.concat(a,"\u{2c}",0x1,0x0) == ""))
354+assert((table.concat(a,"\u{2c}",0x1,0x1) == "\u{61}"))
355+assert((table.concat(a,"\u{2c}",0x1,0x2) == "\u{61}\u{2c}\u{62}"))
356+assert((table.concat(a,"\u{2c}",0x2) == "\u{62}\u{2c}\u{63}"))
357+assert((table.concat(a,"\u{2c}",0x3) == "\u{63}"))
358+assert((table.concat(a,"\u{2c}",0x4) == ""))
359+if (not _port) then
360+local locales = {"\u{70}\u{74}\u{62}","\u{70}\u{74}\u{5f}\u{42}\u{52}\u{2e}\u{69}\u{73}\u{6f}\u{38}\u{38}\u{35}\u{39}\u{31}","\u{49}\u{53}\u{4f}\u{2d}\u{38}\u{38}\u{35}\u{39}\u{2d}\u{31}"}
361+local function trylocale
362+(w)
363+for i = 0x1, (# locales)
364+do
365+if os.setlocale(locales[i],w) then
366+print(string.format("\u{27}\u{25}\u{73}\u{27}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{65}\u{20}\u{73}\u{65}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{27}\u{25}\u{73}\u{27}",w,locales[i]))
367+return locales[i]
368+end
369+end
370+print(string.format("\u{27}\u{25}\u{73}\u{27}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{65}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{66}\u{6f}\u{75}\u{6e}\u{64}",w))
371+return false
372+end
373+if trylocale("\u{63}\u{6f}\u{6c}\u{6c}\u{61}\u{74}\u{65}") then
374+assert((("\u{61}\u{6c}\u{6f}" < "\u{e1}\u{6c}\u{6f}") and ("\u{e1}\u{6c}\u{6f}" < "\u{61}\u{6d}\u{6f}")))
375+end
376+if trylocale("\u{63}\u{74}\u{79}\u{70}\u{65}") then
377+assert((string.gsub("\u{e1}\u{e9}\u{ed}\u{f3}\u{fa}","\u{25}\u{61}","\u{78}") == "\u{78}\u{78}\u{78}\u{78}\u{78}"))
378+assert((string.gsub("\u{e1}\u{c1}\u{e9}\u{c9}","\u{25}\u{6c}","\u{78}") == "\u{78}\u{c1}\u{78}\u{c9}"))
379+assert((string.gsub("\u{e1}\u{c1}\u{e9}\u{c9}","\u{25}\u{75}","\u{78}") == "\u{e1}\u{78}\u{e9}\u{78}"))
380+assert((string.upper("\u{e1}\u{c1}\u{e9}\u{7b}\u{78}\u{75}\u{78}\u{75}\u{7d}\u{e7}\u{e3}\u{6f}") == "\u{c1}\u{c1}\u{c9}\u{7b}\u{58}\u{55}\u{58}\u{55}\u{7d}\u{c7}\u{c3}\u{4f}"))
381+end
382+os.setlocale("\u{43}")
383+assert((os.setlocale() == "\u{43}"))
384+assert((os.setlocale(nil,"\u{6e}\u{75}\u{6d}\u{65}\u{72}\u{69}\u{63}") == "\u{43}"))
385+end
386+do
387+local f = string.gmatch("\u{31}\u{20}\u{32}\u{20}\u{33}\u{20}\u{34}\u{20}\u{35}","\u{25}\u{64}\u{2b}")
388+assert((f() == "\u{31}"))
389+local co = coroutine.wrap(f)
390+assert((co() == "\u{32}"))
391+end
392+if (T == nil) then
393+(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{74}\u{65}\u{73}\u{74}\u{43}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{61}\u{63}\u{74}\u{69}\u{76}\u{65}\u{3a}\u{20}\u{73}\u{6b}\u{69}\u{70}\u{70}\u{69}\u{6e}\u{67}\u{20}\u{27}\u{70}\u{75}\u{73}\u{68}\u{66}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{27}\u{20}\u{74}\u{65}\u{73}\u{74}\u{73}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
394+else
395+print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{27}\u{70}\u{75}\u{73}\u{68}\u{66}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{27}")
396+local blen = 0xc8
397+local function callpfs
398+(op,fmt,n)
399+local x = {T.testC(("\u{70}\u{75}\u{73}\u{68}\u{66}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}" .. (op .. "\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2a}")),fmt,n)}
400+assert((# (x == 0x4)))
401+return x[0x4]
402+end
403+local function testpfs
404+(op,fmt,n)
405+assert((callpfs(op,fmt,n) == string.format(fmt,n)))
406+end
407+testpfs("\u{49}","",0x0)
408+testpfs("\u{49}",string.rep("\u{61}",(blen - 0x1)),0x0)
409+testpfs("\u{49}",string.rep("\u{61}",blen),0x0)
410+testpfs("\u{49}",string.rep("\u{61}",(blen + 0x1)),0x0)
411+local str = (string.rep("\u{61}\u{62}",blen) .. ("\u{25}\u{64}" .. string.rep("\u{64}",(blen / 0x2))))
412+testpfs("\u{49}",str,(0x2 ^ 0xe))
413+testpfs("\u{49}",str,(- (0x2 ^ 0xf)))
414+str=("\u{25}\u{64}" .. string.rep("\u{63}\u{64}",blen))
415+testpfs("\u{49}",str,(0x2 ^ 0xe))
416+testpfs("\u{49}",str,(- (0x2 ^ 0xf)))
417+str=(string.rep("\u{63}",(blen - 0x2)) .. "\u{25}\u{64}")
418+testpfs("\u{49}",str,(0x2 ^ 0xe))
419+testpfs("\u{49}",str,(- (0x2 ^ 0xf)))
420+for l = 0xc, 0xe
421+do
422+local str1 = string.rep("\u{61}",l)
423+for i = 0x0, 0x1f4, 0xd
424+do
425+for j = 0x0, 0x1f4, 0xd
426+do
427+str=(string.rep("\u{61}",i) .. ("\u{25}\u{73}" .. string.rep("\u{64}",j)))
428+testpfs("\u{53}",str,str1)
429+testpfs("\u{53}",str,str)
430+end
431+end
432+end
433+str="\u{61}\u{62}\u{63}\u{20}\u{25}\u{63}\u{20}\u{64}\u{65}\u{66}"
434+testpfs("\u{49}",str,string.byte("\u{41}"))
435+testpfs("\u{49}",str,0xff)
436+str=(string.rep("\u{61}",(blen - 0x1)) .. ("\u{25}\u{70}" .. string.rep("\u{63}\u{64}",blen)))
437+testpfs("\u{50}",str,{})
438+str=(string.rep("\u{25}\u{25}",(0x3 * blen)) .. ("\u{25}\u{70}" .. string.rep("\u{25}\u{25}",(0x2 * blen))))
439+testpfs("\u{50}",str,{})
440+end
441+print("\u{4f}\u{4b}")
desk/res/lua/cycled/tpack.luanew file+259
@@ -0,0 +1,259 @@
1+local pack = string.pack
2+local packsize = string.packsize
3+local unpack = string.unpack
4+print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{70}\u{61}\u{63}\u{6b}\u{2f}\u{75}\u{6e}\u{70}\u{61}\u{63}\u{6b}")
5+local NB = 0x10
6+local sizeshort = packsize("\u{68}")
7+local sizeint = packsize("\u{69}")
8+local sizelong = packsize("\u{6c}")
9+local sizesize_t = packsize("\u{54}")
10+local sizeLI = packsize("\u{6a}")
11+local sizefloat = packsize("\u{66}")
12+local sizedouble = packsize("\u{64}")
13+local sizenumber = packsize("\u{6e}")
14+local little = (pack("\u{69}\u{32}",0x1) == "\u{1}\u{0}")
15+local align = packsize("\u{21}\u{78}\u{58}\u{69}\u{31}\u{36}")
16+assert(((((0x1 <= sizeshort) and (sizeshort <= sizeint)) and (sizeint <= sizelong)) and (sizefloat <= sizedouble)))
17+print("\u{70}\u{6c}\u{61}\u{74}\u{66}\u{6f}\u{72}\u{6d}\u{3a}")
18+print(string.format("\u{9}\u{73}\u{68}\u{6f}\u{72}\u{74}\u{20}\u{25}\u{64}\u{2c}\u{20}\u{69}\u{6e}\u{74}\u{20}\u{25}\u{64}\u{2c}\u{20}\u{6c}\u{6f}\u{6e}\u{67}\u{20}\u{25}\u{64}\u{2c}\u{20}\u{73}\u{69}\u{7a}\u{65}\u{5f}\u{74}\u{20}\u{25}\u{64}\u{2c}\u{20}\u{66}\u{6c}\u{6f}\u{61}\u{74}\u{20}\u{25}\u{64}\u{2c}\u{20}\u{64}\u{6f}\u{75}\u{62}\u{6c}\u{65}\u{20}\u{25}\u{64}\u{2c}\u{a}\u{9}\u{6c}\u{75}\u{61}\u{20}\u{49}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}\u{20}\u{25}\u{64}\u{2c}\u{20}\u{6c}\u{75}\u{61}\u{20}\u{4e}\u{75}\u{6d}\u{62}\u{65}\u{72}\u{20}\u{25}\u{64}",sizeshort,sizeint,sizelong,sizesize_t,sizefloat,sizedouble,sizeLI,sizenumber))
19+print(("\u{9}" .. (((little and "\u{6c}\u{69}\u{74}\u{74}\u{6c}\u{65}") or "\u{62}\u{69}\u{67}") .. "\u{20}\u{65}\u{6e}\u{64}\u{69}\u{61}\u{6e}")))
20+print(("\u{9}\u{61}\u{6c}\u{69}\u{67}\u{6e}\u{6d}\u{65}\u{6e}\u{74}\u{3a}\u{20}" .. align))
21+local function checkerror
22+(msg,f, ...)
23+local status,err = pcall(f,...)
24+assert((not (status and string.find(err,msg))))
25+end
26+assert((unpack("\u{42}",pack("\u{42}",0xff)) == 0xff))
27+assert((unpack("\u{62}",pack("\u{62}",0x7f)) == 0x7f))
28+assert((unpack("\u{62}",pack("\u{62}",(- 0x80))) == (- 0x80)))
29+assert((unpack("\u{48}",pack("\u{48}",0xffff)) == 0xffff))
30+assert((unpack("\u{68}",pack("\u{68}",0x7fff)) == 0x7fff))
31+assert((unpack("\u{68}",pack("\u{68}",(- 0x8000))) == (- 0x8000)))
32+assert((unpack("\u{4c}",pack("\u{4c}",0xffffffff)) == 0xffffffff))
33+assert((unpack("\u{6c}",pack("\u{6c}",0x7fffffff)) == 0x7fffffff))
34+assert((unpack("\u{6c}",pack("\u{6c}",(- 0x80000000))) == (- 0x80000000)))
35+for i = 0x1, NB
36+do
37+local s = string.rep("\u{ff}",i)
38+assert((pack(("\u{69}" .. i),(- 0x1)) == s))
39+assert((packsize(("\u{69}" .. i)) == (# s)))
40+assert((unpack(("\u{69}" .. i),s) == (- 0x1)))
41+s=("\u{aa}" .. string.rep("\u{0}",(i - 0x1)))
42+assert((pack(("\u{3c}\u{49}" .. i),0xaa) == s))
43+assert((unpack(("\u{3c}\u{49}" .. i),s) == 0xaa))
44+assert((pack(("\u{3e}\u{49}" .. i),0xaa) == s:reverse()))
45+assert((unpack(("\u{3e}\u{49}" .. i),s:reverse()) == 0xaa))
46+end
47+do
48+local lnum = 0x807060504030201
49+local s = pack("\u{3c}\u{6a}",lnum)
50+assert((unpack("\u{3c}\u{6a}",s) == lnum))
51+assert((unpack(("\u{3c}\u{69}" .. (sizeLI + 0x1)),(s .. "\u{0}")) == lnum))
52+assert((unpack(("\u{3c}\u{69}" .. (sizeLI + 0x1)),(s .. "\u{0}")) == lnum))
53+for i = (sizeLI + 0x1), NB
54+do
55+local s = pack("\u{3c}\u{6a}",(- lnum))
56+assert((unpack("\u{3c}\u{6a}",s) == (- lnum)))
57+assert((unpack(("\u{3c}\u{69}" .. i),(s .. ("\u{ff}"):rep((i - sizeLI)))) == (- lnum)))
58+assert((unpack(("\u{3e}\u{69}" .. i),(("\u{ff}"):rep((i - sizeLI)) .. s:reverse())) == (- lnum)))
59+assert((unpack(("\u{3c}\u{49}" .. i),(s .. ("\u{0}"):rep((i - sizeLI)))) == (- lnum)))
60+checkerror("\u{64}\u{6f}\u{65}\u{73}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{66}\u{69}\u{74}",unpack,("\u{3c}\u{49}" .. i),(("\u{0}"):rep((i - 0x1)) .. "\u{1}"))
61+checkerror("\u{64}\u{6f}\u{65}\u{73}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{66}\u{69}\u{74}",unpack,("\u{3e}\u{69}" .. i),("\u{1}" .. ("\u{0}"):rep((i - 0x1))))
62+end
63+end
64+for i = 0x1, sizeLI
65+do
66+local lstr = "\u{1}\u{2}\u{3}\u{4}\u{5}\u{6}\u{7}\u{8}\u{9}\u{a}\u{b}\u{c}\u{d}"
67+local lnum = 0x807060504030201
68+local n = (lnum & (~ (- (0x1 << (i * 0x8)))))
69+local s = string.sub(lstr,0x1,i)
70+assert((pack(("\u{3c}\u{69}" .. i),n) == s))
71+assert((pack(("\u{3e}\u{69}" .. i),n) == s:reverse()))
72+assert((unpack(("\u{3e}\u{69}" .. i),s:reverse()) == n))
73+end
74+do
75+local u = 0xf0
76+for i = 0x1, (sizeLI - 0x1)
77+do
78+assert((unpack(("\u{3c}\u{69}" .. i),("\u{f0}" .. ("\u{ff}"):rep((i - 0x1)))) == (- 0x10)))
79+assert((unpack(("\u{3e}\u{49}" .. i),("\u{f0}" .. ("\u{ff}"):rep((i - 0x1)))) == u))
80+u=((u * 0x100) + 0xff)
81+end
82+end
83+do
84+assert((pack("\u{3e}\u{69}\u{32}\u{20}\u{3c}\u{69}\u{32}",0xa,0x14) == "\u{0}\u{a}\u{14}\u{0}"))
85+local a,b = unpack("\u{3c}\u{69}\u{32}\u{20}\u{3e}\u{69}\u{32}","\u{a}\u{0}\u{0}\u{14}")
86+assert(((a == 0xa) and (b == 0x14)))
87+assert((pack("\u{3d}\u{69}\u{34}",0x7d1) == pack("\u{69}\u{34}",0x7d1)))
88+end
89+print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{66}\u{6f}\u{72}\u{6d}\u{61}\u{74}\u{73}")
90+checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{6c}\u{69}\u{6d}\u{69}\u{74}\u{73}",pack,"\u{69}\u{30}",0x0)
91+checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{6c}\u{69}\u{6d}\u{69}\u{74}\u{73}",pack,("\u{69}" .. (NB + 0x1)),0x0)
92+checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{6c}\u{69}\u{6d}\u{69}\u{74}\u{73}",pack,("\u{21}" .. (NB + 0x1)),0x0)
93+checkerror("\u{25}\u{28}\u{31}\u{37}\u{25}\u{29}\u{20}\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{6c}\u{69}\u{6d}\u{69}\u{74}\u{73}\u{20}\u{25}\u{5b}\u{31}\u{2c}\u{31}\u{36}\u{25}\u{5d}",pack,("\u{58}\u{69}" .. (NB + 0x1)))
94+checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{66}\u{6f}\u{72}\u{6d}\u{61}\u{74}\u{20}\u{6f}\u{70}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{27}\u{72}\u{27}",pack,"\u{69}\u{33}\u{72}",0x0)
95+checkerror("\u{31}\u{36}\u{25}\u{2d}\u{62}\u{79}\u{74}\u{65}\u{20}\u{69}\u{6e}\u{74}\u{65}\u{67}\u{65}\u{72}",unpack,"\u{69}\u{31}\u{36}",string.rep("\u{3}",0x10))
96+checkerror("\u{6e}\u{6f}\u{74}\u{20}\u{70}\u{6f}\u{77}\u{65}\u{72}\u{20}\u{6f}\u{66}\u{20}\u{32}",pack,"\u{21}\u{34}\u{69}\u{33}",0x0)
97+;
98+checkerror("\u{6d}\u{69}\u{73}\u{73}\u{69}\u{6e}\u{67}\u{20}\u{73}\u{69}\u{7a}\u{65}",pack,"\u{63}","")
99+checkerror("\u{76}\u{61}\u{72}\u{69}\u{61}\u{62}\u{6c}\u{65}\u{25}\u{2d}\u{6c}\u{65}\u{6e}\u{67}\u{74}\u{68}\u{20}\u{66}\u{6f}\u{72}\u{6d}\u{61}\u{74}",packsize,"\u{73}")
100+checkerror("\u{76}\u{61}\u{72}\u{69}\u{61}\u{62}\u{6c}\u{65}\u{25}\u{2d}\u{6c}\u{65}\u{6e}\u{67}\u{74}\u{68}\u{20}\u{66}\u{6f}\u{72}\u{6d}\u{61}\u{74}",packsize,"\u{7a}")
101+checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{66}\u{6f}\u{72}\u{6d}\u{61}\u{74}",packsize,("\u{63}\u{31}" .. string.rep("\u{30}",0x28)))
102+if (packsize("\u{69}") == 0x4) then
103+local s = string.rep("\u{63}\u{32}\u{36}\u{38}\u{34}\u{33}\u{35}\u{34}\u{35}\u{36}",(0x2 ^ 0x3))
104+checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{6c}\u{61}\u{72}\u{67}\u{65}",packsize,s)
105+s=(string.rep("\u{63}\u{32}\u{36}\u{38}\u{34}\u{33}\u{35}\u{34}\u{35}\u{36}",((0x2 ^ 0x3) - 0x1)) .. "\u{63}\u{32}\u{36}\u{38}\u{34}\u{33}\u{35}\u{34}\u{35}\u{35}")
106+assert((packsize(s) == 0x7fffffff))
107+end
108+for i = 0x1, (sizeLI - 0x1)
109+do
110+local umax = ((0x1 << (i * 0x8)) - 0x1)
111+local max = (umax >> 0x1)
112+local min = (~ max)
113+checkerror("\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}",pack,("\u{3c}\u{49}" .. i),(- 0x1))
114+checkerror("\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}",pack,("\u{3c}\u{49}" .. i),min)
115+checkerror("\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}",pack,("\u{3e}\u{49}" .. i),(umax + 0x1))
116+checkerror("\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}",pack,("\u{3e}\u{69}" .. i),umax)
117+checkerror("\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}",pack,("\u{3e}\u{69}" .. i),(max + 0x1))
118+checkerror("\u{6f}\u{76}\u{65}\u{72}\u{66}\u{6c}\u{6f}\u{77}",pack,("\u{3c}\u{69}" .. i),(min - 0x1))
119+assert((unpack(("\u{3e}\u{69}" .. i),pack(("\u{3e}\u{69}" .. i),max)) == max))
120+assert((unpack(("\u{3c}\u{69}" .. i),pack(("\u{3c}\u{69}" .. i),min)) == min))
121+assert((unpack(("\u{3e}\u{49}" .. i),pack(("\u{3e}\u{49}" .. i),umax)) == umax))
122+end
123+assert((unpack("\u{3e}\u{6a}",pack("\u{3e}\u{6a}",math.maxinteger)) == math.maxinteger))
124+assert((unpack("\u{3c}\u{6a}",pack("\u{3c}\u{6a}",math.mininteger)) == math.mininteger))
125+assert((unpack("\u{3c}\u{4a}",pack("\u{3c}\u{6a}",(- 0x1))) == (- 0x1)))
126+if little then
127+assert((pack("\u{66}",0x18) == pack("\u{3c}\u{66}",0x18)))
128+else
129+assert((pack("\u{66}",0x18) == pack("\u{3e}\u{66}",0x18)))
130+end
131+print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{70}\u{61}\u{63}\u{6b}\u{2f}\u{75}\u{6e}\u{70}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{66}\u{20}\u{66}\u{6c}\u{6f}\u{61}\u{74}\u{69}\u{6e}\u{67}\u{2d}\u{70}\u{6f}\u{69}\u{6e}\u{74}\u{20}\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}\u{73}")
132+for _,n in ipairs({0x0,(- 1.1),1.9,(0x1 / 0x0),(- (0x1 / 0x0)),1e20,(- 1e20),0.1,2000.7})
133+do
134+assert((unpack("\u{6e}",pack("\u{6e}",n)) == n))
135+assert((unpack("\u{3c}\u{6e}",pack("\u{3c}\u{6e}",n)) == n))
136+assert((unpack("\u{3e}\u{6e}",pack("\u{3e}\u{6e}",n)) == n))
137+assert((pack("\u{3c}\u{66}",n) == pack("\u{3e}\u{66}",n):reverse()))
138+assert((pack("\u{3e}\u{64}",n) == pack("\u{3c}\u{64}",n):reverse()))
139+end
140+for _,n in ipairs({0x0,(- 1.5),(0x1 / 0x0),(- (0x1 / 0x0)),1e10,(- 1e9),0.5,2000.25})
141+do
142+assert((unpack("\u{3c}\u{66}",pack("\u{3c}\u{66}",n)) == n))
143+assert((unpack("\u{3e}\u{66}",pack("\u{3e}\u{66}",n)) == n))
144+assert((unpack("\u{3c}\u{64}",pack("\u{3c}\u{64}",n)) == n))
145+assert((unpack("\u{3e}\u{64}",pack("\u{3e}\u{64}",n)) == n))
146+end
147+print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{70}\u{61}\u{63}\u{6b}\u{2f}\u{75}\u{6e}\u{70}\u{61}\u{63}\u{6b}\u{20}\u{6f}\u{66}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}\u{73}")
148+do
149+local s = string.rep("\u{61}\u{62}\u{63}",0x3e8)
150+assert((pack("\u{7a}\u{42}",s,0xf7) == (s .. "\u{0}\u{f7}")))
151+local s1,b = unpack("\u{7a}\u{42}",(s .. "\u{0}\u{f9}"))
152+assert(((b == 0xf9) and (s1 == s)))
153+s1=pack("\u{73}",s)
154+assert((unpack("\u{73}",s1) == s))
155+checkerror("\u{64}\u{6f}\u{65}\u{73}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{66}\u{69}\u{74}",pack,"\u{73}\u{31}",s)
156+checkerror("\u{63}\u{6f}\u{6e}\u{74}\u{61}\u{69}\u{6e}\u{73}\u{20}\u{7a}\u{65}\u{72}\u{6f}\u{73}",pack,"\u{7a}","\u{61}\u{6c}\u{6f}\u{0}")
157+;
158+checkerror("\u{75}\u{6e}\u{66}\u{69}\u{6e}\u{69}\u{73}\u{68}\u{65}\u{64}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}",unpack,"\u{7a}\u{63}\u{31}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}\u{30}","\u{61}\u{6c}\u{6f}")
159+for i = 0x2, NB
160+do
161+local s1 = pack(("\u{73}" .. i),s)
162+assert(((unpack(("\u{73}" .. i),s1) == s) and (# (s1 == (# (s + i))))))
163+end
164+end
165+do
166+local x = pack("\u{73}","\u{61}\u{6c}\u{6f}")
167+checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{73}\u{68}\u{6f}\u{72}\u{74}",unpack,"\u{73}",x:sub(0x1,(- 0x2)))
168+checkerror("\u{74}\u{6f}\u{6f}\u{20}\u{73}\u{68}\u{6f}\u{72}\u{74}",unpack,"\u{63}\u{35}","\u{61}\u{62}\u{63}\u{64}")
169+checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{6c}\u{69}\u{6d}\u{69}\u{74}\u{73}",pack,"\u{73}\u{31}\u{30}\u{30}","\u{61}\u{6c}\u{6f}")
170+end
171+do
172+assert((pack("\u{63}\u{30}","") == ""))
173+assert((packsize("\u{63}\u{30}") == 0x0))
174+assert((unpack("\u{63}\u{30}","") == ""))
175+assert((pack("\u{3c}\u{21}\u{20}\u{63}\u{33}","\u{61}\u{62}\u{63}") == "\u{61}\u{62}\u{63}"))
176+assert((packsize("\u{3c}\u{21}\u{20}\u{63}\u{33}") == 0x3))
177+assert((pack("\u{3e}\u{21}\u{34}\u{20}\u{63}\u{36}","\u{61}\u{62}\u{63}\u{64}\u{65}\u{66}") == "\u{61}\u{62}\u{63}\u{64}\u{65}\u{66}"))
178+assert((pack("\u{63}\u{33}","\u{31}\u{32}\u{33}") == "\u{31}\u{32}\u{33}"))
179+assert((pack("\u{63}\u{30}","") == ""))
180+assert((pack("\u{63}\u{38}","\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}") == "\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{0}\u{0}"))
181+assert((pack("\u{63}\u{38}\u{38}","") == string.rep("\u{0}",0x58)))
182+assert((pack("\u{63}\u{31}\u{38}\u{38}","\u{61}\u{62}") == ("\u{61}\u{62}" .. string.rep("\u{0}",(0xbc - 0x2)))))
183+local a,b,c = unpack("\u{21}\u{34}\u{20}\u{7a}\u{20}\u{63}\u{33}","\u{61}\u{62}\u{63}\u{64}\u{65}\u{66}\u{67}\u{68}\u{69}\u{0}\u{78}\u{79}\u{7a}")
184+assert((((a == "\u{61}\u{62}\u{63}\u{64}\u{65}\u{66}\u{67}\u{68}\u{69}") and (b == "\u{78}\u{79}\u{7a}")) and (c == 0xe)))
185+checkerror("\u{6c}\u{6f}\u{6e}\u{67}\u{65}\u{72}\u{20}\u{74}\u{68}\u{61}\u{6e}",pack,"\u{63}\u{33}","\u{31}\u{32}\u{33}\u{34}")
186+end
187+do
188+local x = pack("\u{3c}\u{62}\u{20}\u{68}\u{20}\u{62}\u{20}\u{66}\u{20}\u{64}\u{20}\u{66}\u{20}\u{6e}\u{20}\u{69}",0x1,0x2,0x3,0x4,0x5,0x6,0x7,0x8)
189+assert((# (x == packsize("\u{3c}\u{62}\u{20}\u{68}\u{20}\u{62}\u{20}\u{66}\u{20}\u{64}\u{20}\u{66}\u{20}\u{6e}\u{20}\u{69}"))))
190+local a,b,c,d,e,f,g,h = unpack("\u{3c}\u{62}\u{20}\u{68}\u{20}\u{62}\u{20}\u{66}\u{20}\u{64}\u{20}\u{66}\u{20}\u{6e}\u{20}\u{69}",x)
191+assert(((((((((a == 0x1) and (b == 0x2)) and (c == 0x3)) and (d == 0x4)) and (e == 0x5)) and (f == 0x6)) and (g == 0x7)) and (h == 0x8)))
192+end
193+print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{61}\u{6c}\u{69}\u{67}\u{6e}\u{6d}\u{65}\u{6e}\u{74}")
194+do
195+assert((pack("\u{20}\u{3c}\u{20}\u{69}\u{31}\u{20}\u{69}\u{32}\u{20}",0x2,0x3) == "\u{2}\u{3}\u{0}"))
196+local x = pack("\u{3e}\u{21}\u{38}\u{20}\u{62}\u{20}\u{58}\u{68}\u{20}\u{69}\u{34}\u{20}\u{69}\u{38}\u{20}\u{63}\u{31}\u{20}\u{58}\u{69}\u{38}",(- 0xc),0x64,0xc8,"\u{ec}")
197+assert((# (x == packsize("\u{3e}\u{21}\u{38}\u{20}\u{62}\u{20}\u{58}\u{68}\u{20}\u{69}\u{34}\u{20}\u{69}\u{38}\u{20}\u{63}\u{31}\u{20}\u{58}\u{69}\u{38}"))))
198+assert((x == ("\u{f4}" .. ("\u{0}\u{0}\u{0}" .. ("\u{0}\u{0}\u{0}\u{64}" .. ("\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{c8}" .. ("\u{ec}" .. "\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}\u{0}")))))))
199+local a,b,c,d,pos = unpack("\u{3e}\u{21}\u{38}\u{20}\u{63}\u{31}\u{20}\u{58}\u{68}\u{20}\u{69}\u{34}\u{20}\u{69}\u{38}\u{20}\u{62}\u{20}\u{58}\u{69}\u{38}\u{20}\u{58}\u{49}\u{20}\u{58}\u{48}",x)
200+assert(((((a == "\u{f4}") and (b == 0x64)) and (c == 0xc8)) and (d == (- (0x14 and ((pos - 0x1) == (# x)))))))
201+x=pack("\u{3e}\u{21}\u{34}\u{20}\u{63}\u{33}\u{20}\u{63}\u{34}\u{20}\u{63}\u{32}\u{20}\u{7a}\u{20}\u{69}\u{34}\u{20}\u{63}\u{35}\u{20}\u{63}\u{32}\u{20}\u{58}\u{69}\u{34}","\u{61}\u{62}\u{63}","\u{61}\u{62}\u{63}\u{64}","\u{78}\u{7a}","\u{68}\u{65}\u{6c}\u{6c}\u{6f}",0x5,"\u{77}\u{6f}\u{72}\u{6c}\u{64}","\u{78}\u{79}")
202+assert((x == "\u{61}\u{62}\u{63}\u{61}\u{62}\u{63}\u{64}\u{78}\u{7a}\u{68}\u{65}\u{6c}\u{6c}\u{6f}\u{0}\u{0}\u{0}\u{0}\u{0}\u{5}\u{77}\u{6f}\u{72}\u{6c}\u{64}\u{78}\u{79}\u{0}"))
203+local a,b,c,d,e,f,g,pos = unpack("\u{3e}\u{21}\u{34}\u{20}\u{63}\u{33}\u{20}\u{63}\u{34}\u{20}\u{63}\u{32}\u{20}\u{7a}\u{20}\u{69}\u{34}\u{20}\u{63}\u{35}\u{20}\u{63}\u{32}\u{20}\u{58}\u{68}\u{20}\u{58}\u{69}\u{34}",x)
204+assert(((((((((a == "\u{61}\u{62}\u{63}") and (b == "\u{61}\u{62}\u{63}\u{64}")) and (c == "\u{78}\u{7a}")) and (d == "\u{68}\u{65}\u{6c}\u{6c}\u{6f}")) and (e == 0x5)) and (f == "\u{77}\u{6f}\u{72}\u{6c}\u{64}")) and (g == "\u{78}\u{79}")) and (((pos - 0x1) % 0x4) == 0x0)))
205+x=pack("\u{20}\u{62}\u{20}\u{62}\u{20}\u{58}\u{64}\u{20}\u{62}\u{20}\u{58}\u{62}\u{20}\u{78}",0x1,0x2,0x3)
206+assert((packsize("\u{20}\u{62}\u{20}\u{62}\u{20}\u{58}\u{64}\u{20}\u{62}\u{20}\u{58}\u{62}\u{20}\u{78}") == 0x4))
207+assert((x == "\u{1}\u{2}\u{3}\u{0}"))
208+a,b,c,pos=unpack("\u{62}\u{62}\u{58}\u{64}\u{62}",x)
209+assert(((((a == 0x1) and (b == 0x2)) and (c == 0x3)) and (pos == (# x))))
210+assert((packsize("\u{21}\u{38}\u{20}\u{78}\u{58}\u{69}\u{38}") == 0x8))
211+local pos = unpack("\u{21}\u{38}\u{20}\u{78}\u{58}\u{69}\u{38}","\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}")
212+;
213+assert((pos == 0x9))
214+assert((packsize("\u{21}\u{38}\u{20}\u{78}\u{58}\u{69}\u{32}") == 0x2))
215+local pos = unpack("\u{21}\u{38}\u{20}\u{78}\u{58}\u{69}\u{32}","\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}")
216+;
217+assert((pos == 0x3))
218+assert((packsize("\u{21}\u{32}\u{20}\u{78}\u{58}\u{69}\u{32}") == 0x2))
219+local pos = unpack("\u{21}\u{32}\u{20}\u{78}\u{58}\u{69}\u{32}","\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}")
220+;
221+assert((pos == 0x3))
222+assert((packsize("\u{21}\u{32}\u{20}\u{78}\u{58}\u{69}\u{38}") == 0x2))
223+local pos = unpack("\u{21}\u{32}\u{20}\u{78}\u{58}\u{69}\u{38}","\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}")
224+;
225+assert((pos == 0x3))
226+assert((packsize("\u{21}\u{31}\u{36}\u{20}\u{78}\u{58}\u{69}\u{31}\u{36}") == 0x10))
227+local pos = unpack("\u{21}\u{31}\u{36}\u{20}\u{78}\u{58}\u{69}\u{31}\u{36}","\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}")
228+;
229+assert((pos == 0x11))
230+checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{6e}\u{65}\u{78}\u{74}\u{20}\u{6f}\u{70}\u{74}\u{69}\u{6f}\u{6e}",pack,"\u{58}")
231+checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{6e}\u{65}\u{78}\u{74}\u{20}\u{6f}\u{70}\u{74}\u{69}\u{6f}\u{6e}",unpack,"\u{58}\u{58}\u{69}","")
232+checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{6e}\u{65}\u{78}\u{74}\u{20}\u{6f}\u{70}\u{74}\u{69}\u{6f}\u{6e}",unpack,"\u{58}\u{20}\u{69}","")
233+checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{6e}\u{65}\u{78}\u{74}\u{20}\u{6f}\u{70}\u{74}\u{69}\u{6f}\u{6e}",pack,"\u{58}\u{63}\u{31}")
234+end
235+do
236+local x = pack("\u{69}\u{34}\u{69}\u{34}\u{69}\u{34}\u{69}\u{34}",0x1,0x2,0x3,0x4)
237+for pos = 0x1, 0x10, 0x4
238+do
239+local i,p = unpack("\u{69}\u{34}",x,pos)
240+assert(((i == ((pos // 0x4) + 0x1)) and (p == (pos + 0x4))))
241+end
242+for pos = 0x0, 0xc
243+do
244+local i,p = unpack("\u{21}\u{34}\u{20}\u{69}\u{34}",x,(pos + 0x1))
245+assert(((i == (((pos + 0x3) // 0x4) + 0x1)) and (p == ((i * 0x4) + 0x1))))
246+end
247+local i,p = unpack("\u{21}\u{34}\u{20}\u{69}\u{34}",x,(- 0x4))
248+assert(((i == 0x4) and (p == 0x11)))
249+local i,p = unpack("\u{21}\u{34}\u{20}\u{69}\u{34}",x,(- 0x7))
250+assert(((i == 0x4) and (p == 0x11)))
251+local i,p = unpack("\u{21}\u{34}\u{20}\u{69}\u{34}",x,(- (# x)))
252+assert(((i == 0x1) and (p == 0x5)))
253+for i = 0x1, (# (x + 0x1))
254+do
255+assert((unpack("\u{63}\u{30}",x,i) == ""))
256+end
257+checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}",unpack,"\u{63}\u{30}",x,(# (x + 0x2)))
258+end
259+print("\u{4f}\u{4b}")
zod/luau/res/lua/cycled/tracegc.lua → desk/res/lua/cycled/tracegc.luarenamed+1−1
@@ -10,7 +10,7 @@ setmetatable(o,mt)
1010end
1111end
1212function M.start()
13−if not active then
13+if (not active) then
1414active=true
1515setmetatable({},mt)
1616end
desk/res/lua/cycled/utf8.luanew file+203
@@ -0,0 +1,203 @@
1+print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{55}\u{54}\u{46}\u{2d}\u{38}\u{20}\u{6c}\u{69}\u{62}\u{72}\u{61}\u{72}\u{79}")
2+local utf8 = require("\u{75}\u{74}\u{66}\u{38}")
3+local function checkerror
4+(msg,f, ...)
5+local s,err = pcall(f,...)
6+assert((not (s and string.find(err,msg))))
7+end
8+local function len
9+(s)
10+return (# string.gsub(s,"\u{5b}\u{80}\u{2d}\u{bf}\u{5d}",""))
11+end
12+local justone = ("\u{5e}" .. (utf8.charpattern .. "\u{24}"))
13+local function checksyntax
14+(s,t)
15+local ts = {"\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{27}"}
16+for i = 0x1, (# t)
17+do
18+ts[(i + 0x1)]=string.format("\u{5c}\u{75}\u{7b}\u{25}\u{78}\u{7d}",t[i])
19+end
20+ts[(# (t + 0x2))]="\u{27}"
21+ts=table.concat(ts)
22+assert((assert(load(ts))() == s))
23+end
24+assert((not utf8.offset("\u{61}\u{6c}\u{6f}",0x5)))
25+assert((not utf8.offset("\u{61}\u{6c}\u{6f}",(- 0x4))))
26+local function check
27+(s,t,nonstrict)
28+local l = utf8.len(s,0x1,(- 0x1),nonstrict)
29+assert((# ((t == l) and (len(s) == l))))
30+assert((utf8.char(table.unpack(t)) == s))
31+assert((utf8.offset(s,0x0) == 0x1))
32+checksyntax(s,t)
33+local t1 = {utf8.codepoint(s,0x1,(- 0x1),nonstrict)}
34+assert((# (t == (# t1))))
35+for i = 0x1, (# t)
36+do
37+assert((t[i] == t1[i]))
38+end
39+for i = 0x1, l
40+do
41+local pi = utf8.offset(s,i)
42+local pi1 = utf8.offset(s,0x2,pi)
43+assert(string.find(string.sub(s,pi,(pi1 - 0x1)),justone))
44+assert((utf8.offset(s,(- 0x1),pi1) == pi))
45+assert((utf8.offset(s,((i - l) - 0x1)) == pi))
46+assert(((pi1 - pi) == (# utf8.char(utf8.codepoint(s,pi,pi,nonstrict)))))
47+for j = pi, (pi1 - 0x1)
48+do
49+assert((utf8.offset(s,0x0,j) == pi))
50+end
51+for j = (pi + 0x1), (pi1 - 0x1)
52+do
53+assert((not utf8.len(s,j)))
54+end
55+assert((utf8.len(s,pi,pi,nonstrict) == 0x1))
56+assert((utf8.len(s,pi,(pi1 - 0x1),nonstrict) == 0x1))
57+assert((utf8.len(s,pi,(- 0x1),nonstrict) == ((l - i) + 0x1)))
58+assert((utf8.len(s,pi1,(- 0x1),nonstrict) == (l - i)))
59+assert((utf8.len(s,0x1,pi,nonstrict) == i))
60+end
61+local i = 0x0
62+for p,c in utf8.codes(s,nonstrict)
63+do
64+i=(i + 0x1)
65+assert(((c == t[i]) and (p == utf8.offset(s,i))))
66+assert((utf8.codepoint(s,p,p,nonstrict) == c))
67+end
68+assert((i == (# t)))
69+i=0x0
70+for c in string.gmatch(s,utf8.charpattern)
71+do
72+i=(i + 0x1)
73+assert((c == utf8.char(t[i])))
74+end
75+assert((i == (# t)))
76+for i = 0x1, l
77+do
78+assert((utf8.offset(s,i) == utf8.offset(s,((i - l) - 0x1),(# (s + 0x1)))))
79+end
80+end
81+do
82+local function check
83+(s,p)
84+local a,b = utf8.len(s)
85+assert((not (a and (b == p))))
86+end
87+check("\u{61}\u{62}\u{63}\u{e3}\u{64}\u{65}\u{66}",0x4)
88+check("\u{f4}\u{9f}\u{bf}",0x1)
89+check("\u{f4}\u{9f}\u{bf}\u{bf}",0x1)
90+check("\u{e6}\u{b1}\u{89}\u{e5}\u{ad}\u{97}\u{80}",(# ("\u{e6}\u{b1}\u{89}\u{e5}\u{ad}\u{97}" + 0x1)))
91+check("\u{80}\u{68}\u{65}\u{6c}\u{6c}\u{6f}",0x1)
92+check("\u{68}\u{65}\u{6c}\u{80}\u{6c}\u{6f}",0x4)
93+check("\u{e6}\u{b1}\u{89}\u{e5}\u{ad}\u{97}\u{bf}",(# ("\u{e6}\u{b1}\u{89}\u{e5}\u{ad}\u{97}" + 0x1)))
94+check("\u{bf}\u{68}\u{65}\u{6c}\u{6c}\u{6f}",0x1)
95+check("\u{68}\u{65}\u{6c}\u{bf}\u{6c}\u{6f}",0x4)
96+end
97+do
98+local function errorcodes
99+(s)
100+checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{55}\u{54}\u{46}\u{25}\u{2d}\u{38}\u{20}\u{63}\u{6f}\u{64}\u{65}",function ()
101+for c in utf8.codes(s)
102+do
103+assert(c)
104+end
105+end)
106+end
107+errorcodes("\u{61}\u{62}\u{ff}")
108+errorcodes("\u{110000}")
109+errorcodes("\u{69}\u{6e}\u{80}\u{76}\u{61}\u{6c}\u{69}\u{64}")
110+errorcodes("\u{bf}\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}")
111+errorcodes("\u{ce}\u{b1}\u{ce}\u{bb}\u{cf}\u{86}\u{bf}\u{ce}\u{b1}")
112+local f = utf8.codes("")
113+assert((f("",0x2) == nil))
114+assert((f("",(- 0x1)) == nil))
115+assert((f("",math.mininteger) == nil))
116+end
117+checkerror("\u{70}\u{6f}\u{73}\u{69}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.offset,"\u{61}\u{62}\u{63}",0x1,0x5)
118+checkerror("\u{70}\u{6f}\u{73}\u{69}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.offset,"\u{61}\u{62}\u{63}",0x1,(- 0x4))
119+checkerror("\u{70}\u{6f}\u{73}\u{69}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.offset,"",0x1,0x2)
120+checkerror("\u{70}\u{6f}\u{73}\u{69}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.offset,"",0x1,(- 0x1))
121+checkerror("\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{62}\u{79}\u{74}\u{65}",utf8.offset,"\u{f0}\u{a6}\u{a7}\u{ba}",0x1,0x2)
122+checkerror("\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{62}\u{79}\u{74}\u{65}",utf8.offset,"\u{f0}\u{a6}\u{a7}\u{ba}",0x1,0x2)
123+checkerror("\u{63}\u{6f}\u{6e}\u{74}\u{69}\u{6e}\u{75}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{62}\u{79}\u{74}\u{65}",utf8.offset,"\u{80}",0x1)
124+checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.len,"\u{61}\u{62}\u{63}",0x0,0x2)
125+checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.len,"\u{61}\u{62}\u{63}",0x1,0x4)
126+local s = "\u{68}\u{65}\u{6c}\u{6c}\u{6f}\u{20}\u{57}\u{6f}\u{72}\u{6c}\u{64}"
127+local t = {string.byte(s,0x1,(- 0x1))}
128+for i = 0x1, utf8.len(s)
129+do
130+assert((t[i] == string.byte(s,i)))
131+end
132+check(s,t)
133+check("\u{e6}\u{b1}\u{89}\u{e5}\u{ad}\u{97}\u{2f}\u{e6}\u{bc}\u{a2}\u{e5}\u{ad}\u{97}",{0x6c49,0x5b57,0x2f,0x6f22,0x5b57})
134+do
135+local s = "\u{c3}\u{a1}\u{c3}\u{a9}\u{c3}\u{ad}\u{80}"
136+local t = {utf8.codepoint(s,0x1,(# (s - 0x1)))}
137+assert((# ((((t == 0x3) and (t[0x1] == 0xe1)) and (t[0x2] == 0xe9)) and (t[0x3] == 0xed))))
138+checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{55}\u{54}\u{46}\u{25}\u{2d}\u{38}\u{20}\u{63}\u{6f}\u{64}\u{65}",utf8.codepoint,s,0x1,(# s))
139+checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.codepoint,s,(# (s + 0x1)))
140+t={utf8.codepoint(s,0x4,0x3)}
141+assert((# (t == 0x0)))
142+checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.codepoint,s,(- (# (s + 0x1))),0x1)
143+checkerror("\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{62}\u{6f}\u{75}\u{6e}\u{64}\u{73}",utf8.codepoint,s,0x1,(# (s + 0x1)))
144+assert((utf8.codepoint("\u{d7ff}") == (0xd800 - 0x1)))
145+assert((utf8.codepoint("\u{e000}") == (0xdfff + 0x1)))
146+assert((utf8.codepoint("\u{d800}",0x1,0x1,true) == 0xd800))
147+assert((utf8.codepoint("\u{dfff}",0x1,0x1,true) == 0xdfff))
148+assert((utf8.codepoint("\u{7fffffff}",0x1,0x1,true) == 0x7fffffff))
149+end
150+assert((utf8.char() == ""))
151+assert((utf8.char(0x0,0x61,0x62,0x63,0x1) == "\u{0}\u{61}\u{62}\u{63}\u{1}"))
152+assert((utf8.codepoint(utf8.char(0x10ffff)) == 0x10ffff))
153+assert((utf8.codepoint(utf8.char(0x7fffffff),0x1,0x1,true) == ((0x1 << 0x1f) - 0x1)))
154+checkerror("\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{72}\u{61}\u{6e}\u{67}\u{65}",utf8.char,(0x7fffffff + 0x1))
155+checkerror("\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{6f}\u{75}\u{74}\u{20}\u{6f}\u{66}\u{20}\u{72}\u{61}\u{6e}\u{67}\u{65}",utf8.char,(- 0x1))
156+local function invalid
157+(s)
158+checkerror("\u{69}\u{6e}\u{76}\u{61}\u{6c}\u{69}\u{64}\u{20}\u{55}\u{54}\u{46}\u{25}\u{2d}\u{38}\u{20}\u{63}\u{6f}\u{64}\u{65}",utf8.codepoint,s)
159+assert((not utf8.len(s)))
160+end
161+invalid("\u{f4}\u{9f}\u{bf}\u{bf}")
162+invalid("\u{d800}")
163+invalid("\u{dfff}")
164+invalid("\u{c0}\u{80}")
165+invalid("\u{c1}\u{bf}")
166+invalid("\u{e0}\u{9f}\u{bf}")
167+invalid("\u{f0}\u{8f}\u{bf}\u{bf}")
168+invalid("\u{80}")
169+invalid("\u{bf}")
170+invalid("\u{fe}")
171+invalid("\u{ff}")
172+check("",{})
173+s="\u{0}\u{20}\u{7f}\u{c2}\u{80}\u{20}\u{df}\u{bf}\u{e0}\u{a0}\u{80}\u{20}\u{ef}\u{bf}\u{bf}\u{f0}\u{90}\u{80}\u{80}\u{20}\u{20}\u{f4}\u{8f}\u{bf}\u{bf}"
174+s=string.gsub(s,"\u{20}","")
175+check(s,{0x0,0x7f,0x80,0x7ff,0x800,0xffff,0x10000,0x10ffff})
176+do
177+local s = "\u{4000000}\u{7fffffff}"
178+assert((# (s == 0xc)))
179+check(s,{0x4000000,0x7fffffff},true)
180+s="\u{200000}\u{3ffffff}"
181+assert((# (s == 0xa)))
182+check(s,{0x200000,0x3ffffff},true)
183+s="\u{10000}\u{1fffff}"
184+assert((# (s == 0x8)))
185+check(s,{0x10000,0x1fffff},true)
186+end
187+local x = "\u{e6}\u{97}\u{a5}\u{e6}\u{9c}\u{ac}\u{e8}\u{aa}\u{9e}\u{61}\u{2d}\u{34}\u{0}\u{c3}\u{a9}\u{c3}\u{b3}"
188+check(x,{0x65e5,0x672c,0x8a9e,0x61,0x2d,0x34,0x0,0xe9,0xf3})
189+check("\u{f0}\u{a3}\u{b2}\u{b7}\u{f0}\u{a0}\u{9c}\u{8e}\u{f0}\u{a0}\u{b1}\u{93}\u{f0}\u{a1}\u{81}\u{bb}\u{f0}\u{a0}\u{b5}\u{bc}\u{61}\u{62}\u{f0}\u{a0}\u{ba}\u{a2}",{0x23cb7,0x2070e,0x20c53,0x2107b,0x20d7c,0x61,0x62,0x20ea2})
190+check("\u{f0}\u{a8}\u{b3}\u{8a}\u{f0}\u{a9}\u{b6}\u{98}\u{f0}\u{a6}\u{a7}\u{ba}\u{f0}\u{a8}\u{b3}\u{92}\u{f0}\u{a5}\u{84}\u{ab}\u{f0}\u{a4}\u{93}\u{93}\u{f4}\u{8f}\u{bf}\u{bf}",{0x28cca,0x29d98,0x269fa,0x28cd2,0x2512b,0x244d3,0x10ffff})
191+local i = 0x0
192+for p,c in string.gmatch(x,("\u{28}\u{29}\u{28}" .. (utf8.charpattern .. "\u{29}")))
193+do
194+i=(i + 0x1)
195+assert((utf8.offset(x,i) == p))
196+assert((utf8.len(x,p) == ((utf8.len(x) - i) + 0x1)))
197+assert((utf8.len(c) == 0x1))
198+for j = 0x1, (# (c - 0x1))
199+do
200+assert((utf8.offset(x,0x0,((p + j) - 0x1)) == p))
201+end
202+end
203+print("\u{6f}\u{6b}")
desk/res/lua/cycled/vararg.luanew file+137
@@ -0,0 +1,137 @@
1+print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{76}\u{61}\u{72}\u{61}\u{72}\u{67}")
2+local function f
3+(a, ...)
4+local x = {["\u{6e}"] = select("\u{23}",...),...}
5+for i = 0x1, x.n
6+do
7+assert((a[i] == x[i]))
8+end
9+return x.n
10+end
11+local function c12
12+(...)
13+assert((arg == _G.arg))
14+local x = {...}
15+;
16+x.n=(# x)
17+local res = (((x.n == 0x2) and (x[0x1] == 0x1)) and (x[0x2] == 0x2))
18+if res then
19+res=0x37
20+end
21+return res,0x2
22+end
23+local function vararg
24+(...)
25+return {["\u{6e}"] = select("\u{23}",...),...}
26+end
27+local call = function (f,args)
28+return f(table.unpack(args,0x1,args.n))
29+end
30+assert((f() == 0x0))
31+assert((f({0x1,0x2,0x3},0x1,0x2,0x3) == 0x3))
32+assert((f({"\u{61}\u{6c}\u{6f}",nil,0x2d,f,nil},"\u{61}\u{6c}\u{6f}",nil,0x2d,f,nil) == 0x5))
33+assert((vararg().n == 0x0))
34+assert((vararg(nil,nil).n == 0x2))
35+assert((c12(0x1,0x2) == 0x37))
36+local a,b = assert(call(c12,{0x1,0x2}))
37+assert(((a == 0x37) and (b == 0x2)))
38+a=call(c12,{0x1,0x2,["\u{6e}"] = 0x2})
39+assert(((a == 0x37) and (b == 0x2)))
40+a=call(c12,{0x1,0x2,["\u{6e}"] = 0x1})
41+assert((not a))
42+assert((c12(0x1,0x2,0x3) == false))
43+local a = vararg(call(next,{_G,nil,["\u{6e}"] = 0x2}))
44+local b,c = next(_G)
45+assert((((a[0x1] == b) and (a[0x2] == c)) and (a.n == 0x2)))
46+a=vararg(call(call,{c12,{0x1,0x2}}))
47+assert((((a.n == 0x2) and (a[0x1] == 0x37)) and (a[0x2] == 0x2)))
48+a=call(print,{"\u{2b}"})
49+assert((a == nil))
50+local t = {0x1,0xa}
51+function t:f(...)
52+local arg = {...}
53+;
54+return (self[...] + (# arg))
55+end
56+assert(((t:f(0x1,0x4) == 0x3) and (t:f(0x2) == 0xb)))
57+print("\u{2b}")
58+local lim = 0x14
59+local i,a = 0x1,{}
60+while (i <= lim) do
61+a[i]=(i + 0.3)
62+;
63+i=(i + 0x1)
64+end
65+function f(a,b,c,d, ...)
66+local more = {...}
67+assert(((((a == 1.3) and (more[0x1] == 5.3)) and (more[(lim - 0x4)] == (lim + 0.3))) and (not more[(lim - 0x3)])))
68+end
69+local function g
70+(a,b,c)
71+assert((((a == 1.3) and (b == 2.3)) and (c == 3.3)))
72+end
73+call(f,a)
74+call(g,a)
75+a={}
76+i=0x1
77+while (i <= lim) do
78+a[i]=i
79+;
80+i=(i + 0x1)
81+end
82+assert((call(math.max,a) == lim))
83+print("\u{2b}")
84+local function oneless
85+(a, ...)
86+return ...
87+end
88+function f(n,a, ...)
89+local b
90+assert((arg == _G.arg))
91+if (n == 0x0) then
92+local b,c,d = ...
93+return a,b,c,d,oneless(oneless(oneless(...)))
94+else
95+n,b,a=(n - 0x1),...,a
96+assert((b == ...))
97+return f(n,a,...)
98+end
99+end
100+a,b,c,d,e=assert(f(0xa,0x5,0x4,0x3,0x2,0x1))
101+assert((((((a == 0x5) and (b == 0x4)) and (c == 0x3)) and (d == 0x2)) and (e == 0x1)))
102+a,b,c,d,e=f(0x4)
103+assert((((((a == nil) and (b == nil)) and (c == nil)) and (d == nil)) and (e == nil)))
104+local f = load("\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{7b}\u{2e}\u{2e}\u{2e}\u{7d}\u{20}")
105+local x = f(0x2,0x3)
106+assert((((x[0x1] == 0x2) and (x[0x2] == 0x3)) and (x[0x3] == undef)))
107+f=load("\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{78}\u{20}\u{3d}\u{20}\u{7b}\u{2e}\u{2e}\u{2e}\u{7d}\u{a}\u{20}\u{20}\u{66}\u{6f}\u{72}\u{20}\u{69}\u{3d}\u{31}\u{2c}\u{73}\u{65}\u{6c}\u{65}\u{63}\u{74}\u{28}\u{27}\u{23}\u{27}\u{2c}\u{20}\u{2e}\u{2e}\u{2e}\u{29}\u{20}\u{64}\u{6f}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{78}\u{5b}\u{69}\u{5d}\u{20}\u{3d}\u{3d}\u{20}\u{73}\u{65}\u{6c}\u{65}\u{63}\u{74}\u{28}\u{69}\u{2c}\u{20}\u{2e}\u{2e}\u{2e}\u{29}\u{29}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{78}\u{5b}\u{73}\u{65}\u{6c}\u{65}\u{63}\u{74}\u{28}\u{27}\u{23}\u{27}\u{2c}\u{20}\u{2e}\u{2e}\u{2e}\u{29}\u{2b}\u{31}\u{5d}\u{20}\u{3d}\u{3d}\u{20}\u{75}\u{6e}\u{64}\u{65}\u{66}\u{29}\u{a}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{74}\u{72}\u{75}\u{65}\u{a}")
108+assert(f("\u{61}","\u{62}",nil,{},assert))
109+assert(f())
110+a={select(0x3,table.unpack({0xa,0x14,0x1e,0x28}))}
111+assert((# (((a == 0x2) and (a[0x1] == 0x1e)) and (a[0x2] == 0x28))))
112+a={select(0x1)}
113+assert((next(a) == nil))
114+a={select((- 0x1),0x3,0x5,0x7)}
115+assert(((a[0x1] == 0x7) and (a[0x2] == undef)))
116+a={select((- 0x2),0x3,0x5,0x7)}
117+assert((((a[0x1] == 0x5) and (a[0x2] == 0x7)) and (a[0x3] == undef)))
118+pcall(select,0x2710)
119+pcall(select,(- 0x2710))
120+function f(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24,p25,p26,p27,p28,p29,p30,p31,p32,p33,p34,p35,p36,p37,p38,p39,p40,p41,p42,p43,p44,p45,p46,p48,p49,p50, ...)
121+local a1,a2,a3,a4,a5,a6,a7
122+local a8,a9,a10,a11,a12,a13,a14
123+end
124+f()
125+do
126+local function f
127+(a,b,c)
128+return c,b
129+end
130+local function g
131+()
132+return f(0x1,0x2)
133+end
134+local a,b = g()
135+assert(((a == nil) and (b == 0x2)))
136+end
137+print("\u{4f}\u{4b}")
zod/luau/res/lua/cycled/verybig.lua → desk/res/lua/cycled/verybig.luarenamed+18−18
@@ -1,44 +1,44 @@
11print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{52}\u{4b}")
22local function foo
33()
4−local dummy = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256}
5−assert(24.5 + 0.6 == 25.1)
4+local dummy = {0x1,0x2,0x3,0x4,0x5,0x6,0x7,0x8,0x9,0xa,0xb,0xc,0xd,0xe,0xf,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x5a,0x5b,0x5c,0x5d,0x5e,0x5f,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,0x70,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,0x79,0x7a,0x7b,0x7c,0x7d,0x7e,0x7f,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9a,0x9b,0x9c,0x9d,0x9e,0x9f,0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0xbe,0xbf,0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xdb,0xdc,0xdd,0xde,0xdf,0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee,0xef,0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0xff,0x100}
5+assert(((24.5 + 0.6) == 25.1))
66local t = {["\u{66}\u{6f}\u{6f}"] = function (self,x)
7−return x + self.x
8−end,["\u{78}"] = 10}
7+return (x + self.x)
8+end,["\u{78}"] = 0xa}
99t.t=t
10−assert(t:foo(1.5) == 11.5)
11−assert(t.t:foo(0.5) == 10.5)
12−assert(24.3 == 24.3)
13−assert((function ()
10+assert((t:foo(1.5) == 11.5))
11+assert((t.t:foo(0.5) == 10.5))
12+assert((24.3 == 24.3))
13+assert(((function ()
1414return t.x
15−end)() == 10)
15+end)() == 0xa))
1616end
1717foo()
1818foo=nil
1919if _soft then
20−return 10
20+return 0xa
2121end
2222print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{6c}\u{61}\u{72}\u{67}\u{65}\u{20}\u{70}\u{72}\u{6f}\u{67}\u{72}\u{61}\u{6d}\u{73}\u{20}\u{28}\u{3e}\u{36}\u{34}\u{6b}\u{29}")
2323local prog = "\u{24}\u{a}\u{a}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{2c}\u{62}\u{a}\u{a}\u{62}\u{20}\u{3d}\u{20}\u{7b}\u{24}\u{31}\u{24}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{30}\u{39}\u{20}\u{3d}\u{20}\u{36}\u{35}\u{35}\u{33}\u{34}\u{2c}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{31}\u{30}\u{20}\u{3d}\u{20}\u{36}\u{35}\u{35}\u{33}\u{35}\u{2c}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{31}\u{31}\u{20}\u{3d}\u{20}\u{36}\u{35}\u{35}\u{33}\u{36}\u{2c}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{31}\u{32}\u{20}\u{3d}\u{20}\u{36}\u{35}\u{35}\u{33}\u{37}\u{2c}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{31}\u{33}\u{20}\u{3d}\u{20}\u{31}\u{36}\u{37}\u{37}\u{37}\u{32}\u{31}\u{34}\u{2c}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{31}\u{34}\u{20}\u{3d}\u{20}\u{31}\u{36}\u{37}\u{37}\u{37}\u{32}\u{31}\u{35}\u{2c}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{31}\u{35}\u{20}\u{3d}\u{20}\u{31}\u{36}\u{37}\u{37}\u{37}\u{32}\u{31}\u{36}\u{2c}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{31}\u{36}\u{20}\u{3d}\u{20}\u{31}\u{36}\u{37}\u{37}\u{37}\u{32}\u{31}\u{37}\u{2c}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{31}\u{37}\u{20}\u{3d}\u{20}\u{30}\u{78}\u{37}\u{66}\u{66}\u{66}\u{66}\u{66}\u{2c}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{31}\u{38}\u{20}\u{3d}\u{20}\u{2d}\u{30}\u{78}\u{37}\u{66}\u{66}\u{66}\u{66}\u{66}\u{2c}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{31}\u{39}\u{20}\u{3d}\u{20}\u{30}\u{78}\u{31}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{2c}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{32}\u{30}\u{20}\u{3d}\u{20}\u{2d}\u{30}\u{78}\u{31}\u{66}\u{66}\u{66}\u{66}\u{64}\u{2c}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{32}\u{31}\u{20}\u{3d}\u{20}\u{2d}\u{36}\u{35}\u{35}\u{33}\u{34}\u{2c}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{32}\u{32}\u{20}\u{3d}\u{20}\u{2d}\u{36}\u{35}\u{35}\u{33}\u{35}\u{2c}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{32}\u{33}\u{20}\u{3d}\u{20}\u{2d}\u{36}\u{35}\u{35}\u{33}\u{36}\u{2c}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{32}\u{34}\u{20}\u{3d}\u{20}\u{2d}\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{2c}\u{a}\u{20}\u{20}\u{62}\u{33}\u{30}\u{30}\u{32}\u{35}\u{20}\u{3d}\u{20}\u{31}\u{35}\u{30}\u{31}\u{32}\u{2e}\u{35}\u{2c}\u{a}\u{20}\u{20}\u{24}\u{32}\u{24}\u{a}\u{7d}\u{3b}\u{a}\u{a}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{62}\u{2e}\u{61}\u{35}\u{30}\u{30}\u{30}\u{38}\u{20}\u{3d}\u{3d}\u{20}\u{32}\u{35}\u{30}\u{30}\u{34}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{62}\u{5b}\u{22}\u{61}\u{31}\u{31}\u{22}\u{5d}\u{20}\u{3d}\u{3d}\u{20}\u{2d}\u{35}\u{2e}\u{35}\u{29}\u{a}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{62}\u{2e}\u{61}\u{33}\u{33}\u{30}\u{30}\u{37}\u{20}\u{3d}\u{3d}\u{20}\u{2d}\u{31}\u{36}\u{35}\u{30}\u{33}\u{2e}\u{35}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{62}\u{2e}\u{61}\u{35}\u{30}\u{30}\u{30}\u{39}\u{20}\u{3d}\u{3d}\u{20}\u{2d}\u{32}\u{35}\u{30}\u{30}\u{34}\u{2e}\u{35}\u{29}\u{a}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{62}\u{5b}\u{22}\u{62}\u{22}\u{2e}\u{2e}\u{33}\u{30}\u{30}\u{32}\u{34}\u{5d}\u{20}\u{3d}\u{3d}\u{20}\u{2d}\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{29}\u{a}\u{a}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{62}\u{3a}\u{78}\u{78}\u{78}\u{20}\u{28}\u{61}\u{2c}\u{62}\u{29}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{61}\u{2b}\u{62}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{62}\u{3a}\u{78}\u{78}\u{78}\u{28}\u{31}\u{30}\u{2c}\u{20}\u{31}\u{32}\u{29}\u{20}\u{3d}\u{3d}\u{20}\u{32}\u{32}\u{29}\u{20}\u{20}\u{20}\u{2d}\u{2d}\u{20}\u{70}\u{75}\u{73}\u{68}\u{73}\u{65}\u{6c}\u{66}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{6e}\u{6f}\u{6e}\u{2d}\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{61}\u{6e}\u{74}\u{20}\u{69}\u{6e}\u{64}\u{65}\u{78}\u{a}\u{62}\u{5b}\u{22}\u{78}\u{78}\u{78}\u{22}\u{5d}\u{20}\u{3d}\u{20}\u{75}\u{6e}\u{64}\u{65}\u{66}\u{a}\u{a}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{73}\u{20}\u{3d}\u{20}\u{30}\u{3b}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{6e}\u{3d}\u{30}\u{a}\u{66}\u{6f}\u{72}\u{20}\u{61}\u{2c}\u{62}\u{20}\u{69}\u{6e}\u{20}\u{70}\u{61}\u{69}\u{72}\u{73}\u{28}\u{62}\u{29}\u{20}\u{64}\u{6f}\u{20}\u{73}\u{3d}\u{73}\u{2b}\u{62}\u{3b}\u{20}\u{6e}\u{3d}\u{6e}\u{2b}\u{31}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{2d}\u{2d}\u{20}\u{77}\u{69}\u{74}\u{68}\u{20}\u{33}\u{32}\u{2d}\u{62}\u{69}\u{74}\u{20}\u{66}\u{6c}\u{6f}\u{61}\u{74}\u{73}\u{2c}\u{20}\u{65}\u{78}\u{61}\u{63}\u{74}\u{20}\u{76}\u{61}\u{6c}\u{75}\u{65}\u{20}\u{6f}\u{66}\u{20}\u{27}\u{73}\u{27}\u{20}\u{64}\u{65}\u{70}\u{65}\u{6e}\u{64}\u{73}\u{20}\u{6f}\u{6e}\u{20}\u{73}\u{75}\u{6d}\u{6d}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{6f}\u{72}\u{64}\u{65}\u{72}\u{a}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{38}\u{31}\u{38}\u{30}\u{30}\u{30}\u{30}\u{30}\u{2e}\u{30}\u{20}\u{3c}\u{20}\u{73}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{73}\u{20}\u{3c}\u{20}\u{38}\u{31}\u{38}\u{36}\u{30}\u{30}\u{30}\u{30}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{6e}\u{20}\u{3d}\u{3d}\u{20}\u{37}\u{30}\u{30}\u{30}\u{31}\u{29}\u{a}\u{a}\u{61}\u{20}\u{3d}\u{20}\u{6e}\u{69}\u{6c}\u{3b}\u{20}\u{62}\u{20}\u{3d}\u{20}\u{6e}\u{69}\u{6c}\u{a}\u{70}\u{72}\u{69}\u{6e}\u{74}\u{27}\u{2b}\u{27}\u{a}\u{a}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{66}\u{28}\u{78}\u{29}\u{20}\u{62}\u{3d}\u{78}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{a}\u{61}\u{20}\u{3d}\u{20}\u{66}\u{7b}\u{24}\u{33}\u{24}\u{7d}\u{20}\u{6f}\u{72}\u{20}\u{31}\u{30}\u{a}\u{a}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{61}\u{3d}\u{3d}\u{31}\u{30}\u{29}\u{a}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{62}\u{5b}\u{31}\u{5d}\u{20}\u{3d}\u{3d}\u{20}\u{22}\u{61}\u{31}\u{30}\u{22}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{62}\u{5b}\u{32}\u{5d}\u{20}\u{3d}\u{3d}\u{20}\u{35}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{62}\u{5b}\u{23}\u{62}\u{2d}\u{31}\u{5d}\u{20}\u{3d}\u{3d}\u{20}\u{22}\u{61}\u{35}\u{30}\u{30}\u{30}\u{39}\u{22}\u{29}\u{a}\u{a}\u{a}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{78}\u{78}\u{78}\u{78}\u{20}\u{28}\u{78}\u{29}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{62}\u{5b}\u{78}\u{5d}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{a}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{78}\u{78}\u{78}\u{78}\u{28}\u{33}\u{29}\u{20}\u{3d}\u{3d}\u{20}\u{22}\u{61}\u{31}\u{31}\u{22}\u{29}\u{a}\u{a}\u{61}\u{20}\u{3d}\u{20}\u{6e}\u{69}\u{6c}\u{3b}\u{20}\u{62}\u{3d}\u{6e}\u{69}\u{6c}\u{a}\u{78}\u{78}\u{78}\u{78}\u{20}\u{3d}\u{20}\u{6e}\u{69}\u{6c}\u{a}\u{a}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{31}\u{30}\u{a}\u{a}"
2424local function sig
2525(x)
26−return (x % 2 == 0) and "" or "\u{2d}"
26+return ((((x % 0x2) == 0x0) and "") or "\u{2d}")
2727end
2828local F = {function ()
29−for i = 10, 50009
29+for i = 0xa, 0xc359
3030do
31−io.write("\u{61}",i,"\u{20}\u{3d}\u{20}",sig(i),5 + ((i - 10) / 2),"\u{2c}\u{a}")
31+io.write("\u{61}",i,"\u{20}\u{3d}\u{20}",sig(i),(0x5 + ((i - 0xa) / 0x2)),"\u{2c}\u{a}")
3232end
3333end,function ()
34−for i = 30026, 50009
34+for i = 0x754a, 0xc359
3535do
36−io.write("\u{62}",i,"\u{20}\u{3d}\u{20}",sig(i),15013 + ((i - 30026) / 2),"\u{2c}\u{a}")
36+io.write("\u{62}",i,"\u{20}\u{3d}\u{20}",sig(i),(0x3aa5 + ((i - 0x754a) / 0x2)),"\u{2c}\u{a}")
3737end
3838end,function ()
39−for i = 10, 50009
39+for i = 0xa, 0xc359
4040do
41−io.write("\u{22}\u{61}",i,"\u{22}\u{2c}\u{20}",sig(i),5 + ((i - 10) / 2),"\u{2c}\u{a}")
41+io.write("\u{22}\u{61}",i,"\u{22}\u{2c}\u{20}",sig(i),(0x5 + ((i - 0xa) / 0x2)),"\u{2c}\u{a}")
4242end
4343end}
4444local file = os.tmpname()
@@ -46,7 +46,7 @@ io.output(file)
4646for s in string.gmatch(prog,"\u{24}\u{28}\u{5b}\u{5e}\u{24}\u{5d}\u{2b}\u{29}")
4747do
4848local n = tonumber(s)
49−if not n then
49+if (not n) then
5050io.write(s)
5151else
5252F[n]()
zod/luau/res/lua/db.lua → desk/res/lua/db.luarenamed

The content is the same.

zod/luau/res/lua/errors.lua → desk/res/lua/errors.luarenamed

The content is the same.

zod/luau/res/lua/events.lua → desk/res/lua/events.luarenamed

The content is the same.

zod/luau/res/lua/files.lua → desk/res/lua/files.luarenamed

The content is the same.

zod/luau/res/lua/foo.lua → desk/res/lua/foo.luarenamed+2−5
@@ -22,9 +22,6 @@ test_cases = {
2222 { 0x7fffffffffffffff, "9.2233720368548e+18" },
2323 { 9223372036854775807, "9.2233720368548e+18" },
2424
25− { 0xffffffffffffffff, "1.844674407371e+19" },
26− { 18446744073709551615, "1.844674407371e+19" },
27−
2825 { 0x100000000, "4294967296" },
2926 { 4294967296, "4294967296" },
3027
@@ -50,9 +47,9 @@ do
5047 return 8, foo;
5148end
5249
53−print('the way of the future')
50+-- print('the way of the future')
5451
55−print 'hello'
52+-- print 'hello'
5653
5754h{key1 = 'Sonmi~451'}
5855
zod/luau/res/lua/gc.lua → desk/res/lua/gc.luarenamed

The content is the same.

zod/luau/res/lua/gengc.lua → desk/res/lua/gengc.luarenamed

The content is the same.

zod/luau/res/lua/goto.lua → desk/res/lua/goto.luarenamed

The content is the same.

zod/luau/res/lua/heavy.lua → desk/res/lua/heavy.luarenamed

The content is the same.

zod/luau/res/lua/literals.lua → desk/res/lua/literals.luarenamed

The content is the same.

zod/luau/res/lua/locals.lua → desk/res/lua/locals.luarenamed

The content is the same.

zod/luau/res/lua/main.lua → desk/res/lua/main.luarenamed

The content is the same.

zod/luau/res/lua/math.lua → desk/res/lua/math.luarenamed

The content is the same.

zod/luau/res/lua/nextvar.lua → desk/res/lua/nextvar.luarenamed

The content is the same.

zod/luau/res/lua/pm.lua → desk/res/lua/pm.luarenamed

The content is the same.

zod/luau/res/lua/sort.lua → desk/res/lua/sort.luarenamed

The content is the same.

zod/luau/res/lua/strings.lua → desk/res/lua/strings.luarenamed

The content is the same.

zod/luau/res/lua/tpack.lua → desk/res/lua/tpack.luarenamed

The content is the same.

zod/luau/res/lua/tracegc.lua → desk/res/lua/tracegc.luarenamed

The content is the same.

zod/luau/res/lua/utf8.lua → desk/res/lua/utf8.luarenamed

The content is the same.

zod/luau/res/lua/vararg.lua → desk/res/lua/vararg.luarenamed

The content is the same.

zod/luau/res/lua/verybig.lua → desk/res/lua/verybig.luarenamed

The content is the same.

desk/sur/interlist.hoonnew file+8
@@ -0,0 +1,8 @@
1+|%
2+++ interlist
3+ |$ [sep val]
4+ $%
5+ [%double =val =sep tail=(interlist sep val)]
6+ [%single =val]
7+ ==
8+--
zod/luau/sur/lua.hoon → desk/sur/lua.hoonrenamed+4−4
@@ -1,7 +1,7 @@
11|%
22+$ name @t
33+$ namelist (lest name)
4−+$ ast
4++$ chunk
55 $%
66 [%blok blok]
77 ==
@@ -60,7 +60,7 @@
6060 ==
6161+$ numeral
6262 $%
63− [%int @u]
63+ [%int @st]
6464 [%float @rd]
6565 ==
6666+$ exprlist (lest expr)
@@ -104,8 +104,8 @@
104104+$ funcbody [pars=parlist body=blok]
105105+$ parlist [pars=(list name) wildcard=?]
106106+$ local-function [=name body=funcbody]
107−+$ local-asmnt [=attnamelist rhs=(unit exprlist)]
108−+$ attnamelist (lest [=name attr=(unit attrib)])
107++$ local-asmnt [=attrnamelist rhs=(unit exprlist)]
108++$ attrnamelist (lest [=name attr=(unit attrib)])
109109+$ attrib
110110 $?
111111 %const
zod/luau/sur/spider.hoon → desk/sur/spider.hoonrenamed

The content is the same.

zod/luau/sys.kelvin → desk/sys.kelvinrenamed

The content is the same.

desk/ted/eval-lua.hoonnew file+19
@@ -0,0 +1,19 @@
1+/- spider
2+/+ *strandio
3+/+ lua-parser
4+/+ lua-printer
5+/+ lua-interpreter
6+=>
7+|%
8+--
9+=/ m (strand:spider ,vase)
10+^- thread:spider
11+|= arg=vase
12+^- form:m
13+=/ file=beam (need (de-beam (need !<((unit path) arg))))
14+;< =cage bind:m (read-file file)
15+=/ lua-code=@t (of-wain:format !<(wain +.cage))
16+~& %parsing
17+=/ ast (scan (trip lua-code) lua-parser)
18+~& %evaluating
19+%- pure:m !>((lua-interpreter ast))
zod/luau/ted/test-lua.hoon → desk/ted/test-lua.hoonrenamed+8−9
@@ -30,7 +30,12 @@
3030 ?- -.flag
3131 %restrict ~[+.flag]
3232 ==
33−;< bek=beak bind:m get-beak
33+=/ parse
34+ |* src=tape
35+ ?: (has-flag %crash-parser)
36+ (some (scan src lua-parser))
37+ (rust src lua-parser)
38+ ;< bek=beak bind:m get-beak
3439;< lua-files=(list path) bind:m (list-tree [bek /res/lua])
3540=/ lua-files %+ skim lua-files
3641 |= =path
@@ -51,10 +56,7 @@
5156 ;< =cage bind:m (read-file [bek current-file])
5257 =/ lua-code=@t (of-wain:format !<(wain +.cage))
5358 ~& %parsing
54− =/ ast-unit
55− ?: (has-flag %crash-parser)
56− (some (rash lua-code lua-parser))
57− (rush lua-code lua-parser)
59+ =/ ast-unit (parse (trip lua-code))
5860 ;< parse-result=test-result bind:m
5961 =/ m (strand:spider ,test-result)
6062 ?~ ast-unit (pure:m %err)
@@ -68,10 +70,7 @@
6870 %& [(into current-file 2 ~.cycled) %ins %lua !>((to-wain:format (crip printed)))]~
6971 ==
7072 ~& %parsing-printed
71− =/ cycled-ast-unit
72− ?: (has-flag %crash-parser)
73− (some (scan printed lua-parser))
74− (rust printed lua-parser)
73+ =/ cycled-ast-unit (parse printed)
7574 ?~ cycled-ast-unit (pure:m %err)
7675 =/ ast u.cycled-ast-unit
7776 ~? (has-flag %print-asts) ast
zod/luau/TODO.mddeleted−6
@@ -1,6 +0,0 @@
1−# Parser
2−
3−- [x] functioncall
4−- [x] any string apart from the basic string with no escapes
5−- [ ] check if int fits in int or make it a float
6−- [x] should `print-blok` have `do`-`end`? This is fucked.
zod/luau/lib/interlist.hoondeleted−32
@@ -1,32 +0,0 @@
1−=<
2−|%
3−++ interlist
4− |$ [sep val]
5− $%
6− [%double =val =sep tail=(interlist sep val)]
7− [%single =val]
8− ==
9−++ parse-interlist
10− |* [s=rule v=rule]
11− =/ val (rule-type v)
12− =/ sep (rule-type s)
13− %+ cook
14− |* [v=* rest=(list [* *])]
15− ^- (interlist sep val)
16− =/ rrest (flop rest)
17− ?~ rrest [%single v]
18− =/ tail
19− %+ roll t.rrest
20− |* [[s=* v=*] _[acc=`(interlist sep val)`[%single +.i.rrest] last-sep=-.i.rrest]]
21− [[%double v last-sep acc] s]
22− [%double v +.tail -.tail]
23− ;~(plug v (star ;~(plug s v)))
24−--
25−|%
26−++ rule-type
27− |* =rule
28− $_
29− =/ ret q:$:rule
30− ?> ?=(^ ret)
31− p.u.ret
32−--
zod/luau/res/lua/cycled/attrib.luadeleted−431
@@ -1,431 +0,0 @@
1−print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}")
2−assert(require("\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}") == string)
3−assert(require("\u{6d}\u{61}\u{74}\u{68}") == math)
4−assert(require("\u{74}\u{61}\u{62}\u{6c}\u{65}") == table)
5−assert(require("\u{69}\u{6f}") == io)
6−assert(require("\u{6f}\u{73}") == os)
7−assert(require("\u{63}\u{6f}\u{72}\u{6f}\u{75}\u{74}\u{69}\u{6e}\u{65}") == coroutine)
8−assert(type(package.path) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")
9−assert(type(package.cpath) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")
10−assert(type(package.loaded) == "\u{74}\u{61}\u{62}\u{6c}\u{65}")
11−assert(type(package.preload) == "\u{74}\u{61}\u{62}\u{6c}\u{65}")
12−assert(type(package.config) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")
13−print("\u{70}\u{61}\u{63}\u{6b}\u{61}\u{67}\u{65}\u{20}\u{63}\u{6f}\u{6e}\u{66}\u{69}\u{67}\u{3a}\u{20}" .. string.gsub(package.config,"\u{a}","\u{7c}"))
14−do
15−local max = _soft and 100 or 2000
16−local t = {}
17−for i = 1, max
18−do
19−t[i]=string.rep("\u{3f}",i % 10 + 1)
20−end
21−t[# t + 1]="\u{3b}"
22−local path = table.concat(t,"\u{3b}")
23−local s,err = package.searchpath("\u{78}\u{75}\u{78}\u{75}",path)
24−assert(not s and string.find(err,string.rep("\u{78}\u{75}\u{78}\u{75}",10)) and # string.gsub(err,"\u{5b}\u{5e}\u{a}\u{5d}","") >= max)
25−local path = string.rep("\u{3f}",max)
26−local s,err = package.searchpath("\u{78}\u{75}\u{78}\u{75}",path)
27−assert(not s and string.find(err,string.rep("\u{78}\u{75}\u{78}\u{75}",max)))
28−end
29−do
30−local oldpath = package.path
31−package.path={}
32−local s,err = pcall(require,"\u{6e}\u{6f}\u{2d}\u{73}\u{75}\u{63}\u{68}\u{2d}\u{66}\u{69}\u{6c}\u{65}")
33−assert(not s and string.find(err,"\u{70}\u{61}\u{63}\u{6b}\u{61}\u{67}\u{65}\u{2e}\u{70}\u{61}\u{74}\u{68}"))
34−package.path=oldpath
35−end
36−do
37−print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{27}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{27}\u{20}\u{6d}\u{65}\u{73}\u{73}\u{61}\u{67}\u{65}")
38−local oldpath = package.path
39−local oldcpath = package.cpath
40−package.path="\u{3f}\u{2e}\u{6c}\u{75}\u{61}\u{3b}\u{3f}\u{2f}\u{3f}"
41−package.cpath="\u{3f}\u{2e}\u{73}\u{6f}\u{3b}\u{3f}\u{2f}\u{69}\u{6e}\u{69}\u{74}"
42−local st,msg = pcall(require,"\u{58}\u{58}\u{58}")
43−local expected = "\u{6d}\u{6f}\u{64}\u{75}\u{6c}\u{65}\u{20}\u{27}\u{58}\u{58}\u{58}\u{27}\u{20}\u{6e}\u{6f}\u{74}\u{20}\u{66}\u{6f}\u{75}\u{6e}\u{64}\u{3a}\u{a}\u{9}\u{6e}\u{6f}\u{20}\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{70}\u{61}\u{63}\u{6b}\u{61}\u{67}\u{65}\u{2e}\u{70}\u{72}\u{65}\u{6c}\u{6f}\u{61}\u{64}\u{5b}\u{27}\u{58}\u{58}\u{58}\u{27}\u{5d}\u{a}\u{9}\u{6e}\u{6f}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{20}\u{27}\u{58}\u{58}\u{58}\u{2e}\u{6c}\u{75}\u{61}\u{27}\u{a}\u{9}\u{6e}\u{6f}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{20}\u{27}\u{58}\u{58}\u{58}\u{2f}\u{58}\u{58}\u{58}\u{27}\u{a}\u{9}\u{6e}\u{6f}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{20}\u{27}\u{58}\u{58}\u{58}\u{2e}\u{73}\u{6f}\u{27}\u{a}\u{9}\u{6e}\u{6f}\u{20}\u{66}\u{69}\u{6c}\u{65}\u{20}\u{27}\u{58}\u{58}\u{58}\u{2f}\u{69}\u{6e}\u{69}\u{74}\u{27}"
44−assert(msg == expected)
45−package.path=oldpath
46−package.cpath=oldcpath
47−end
48−print("\u{2b}")
49−if not _port then
50−local dirsep = string.match(package.config,"\u{5e}\u{28}\u{5b}\u{5e}\u{a}\u{5d}\u{2b}\u{29}\u{a}")
51−local DIR = "\u{6c}\u{69}\u{62}\u{73}" .. dirsep
52−local function D
53−(x)
54−local x = string.gsub(x,"\u{2f}",dirsep)
55−return DIR .. x
56−end
57−local function DC
58−(x)
59−local ext = (dirsep == "\u{5c}") and "\u{2e}\u{64}\u{6c}\u{6c}" or "\u{2e}\u{73}\u{6f}"
60−return D(x .. ext)
61−end
62−local function createfiles
63−(files,preextras,posextras)
64−for n,c in pairs(files)
65−do
66−io.output(D(n))
67−io.write(string.format(preextras,n))
68−io.write(c)
69−io.write(string.format(posextras,n))
70−io.close(io.output())
71−end
72−end
73−local function removefiles
74−(files)
75−for n in pairs(files)
76−do
77−os.remove(D(n))
78−end
79−end
80−local files = {["\u{6e}\u{61}\u{6d}\u{65}\u{73}\u{2e}\u{6c}\u{75}\u{61}"] = "\u{64}\u{6f}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{7b}\u{2e}\u{2e}\u{2e}\u{7d}\u{20}\u{65}\u{6e}\u{64}\u{a}",["\u{65}\u{72}\u{72}\u{2e}\u{6c}\u{75}\u{61}"] = "\u{42}\u{20}\u{3d}\u{20}\u{31}\u{35}\u{3b}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{61}\u{20}\u{2b}\u{20}\u{31}\u{3b}",["\u{73}\u{79}\u{6e}\u{65}\u{72}\u{72}\u{2e}\u{6c}\u{75}\u{61}"] = "\u{42}\u{20}\u{3d}",["\u{41}\u{2e}\u{6c}\u{75}\u{61}"] = "",["\u{42}\u{2e}\u{6c}\u{75}\u{61}"] = "\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{2e}\u{2e}\u{2e}\u{3d}\u{3d}\u{27}\u{42}\u{27}\u{29}\u{3b}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{20}\u{27}\u{41}\u{27}",["\u{41}\u{2e}\u{6c}\u{63}"] = "",["\u{41}"] = "",["\u{4c}"] = "",["\u{58}\u{58}\u{78}\u{58}"] = "",["\u{43}\u{2e}\u{6c}\u{75}\u{61}"] = "\u{70}\u{61}\u{63}\u{6b}\u{61}\u{67}\u{65}\u{2e}\u{6c}\u{6f}\u{61}\u{64}\u{65}\u{64}\u{5b}\u{2e}\u{2e}\u{2e}\u{5d}\u{20}\u{3d}\u{20}\u{32}\u{35}\u{3b}\u{20}\u{72}\u{65}\u{71}\u{75}\u{69}\u{72}\u{65}\u{27}\u{43}\u{27}"}
81−AA=nil
82−local extras = "\u{4e}\u{41}\u{4d}\u{45}\u{20}\u{3d}\u{20}\u{27}\u{25}\u{73}\u{27}\u{a}\u{52}\u{45}\u{51}\u{55}\u{49}\u{52}\u{45}\u{44}\u{20}\u{3d}\u{20}\u{2e}\u{2e}\u{2e}\u{a}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{41}\u{41}"
83−createfiles(files,"",extras)
84−assert(package.searchpath("\u{43}\u{2e}\u{6c}\u{75}\u{61}",D("\u{3f}"),"","") == D("\u{43}\u{2e}\u{6c}\u{75}\u{61}"))
85−assert(package.searchpath("\u{43}\u{2e}\u{6c}\u{75}\u{61}",D("\u{3f}"),"\u{2e}","\u{2e}") == D("\u{43}\u{2e}\u{6c}\u{75}\u{61}"))
86−assert(package.searchpath("\u{2d}\u{2d}\u{78}\u{2d}",D("\u{3f}"),"\u{2d}","\u{58}") == D("\u{58}\u{58}\u{78}\u{58}"))
87−assert(package.searchpath("\u{2d}\u{2d}\u{2d}\u{78}\u{58}",D("\u{3f}"),"\u{2d}\u{2d}\u{2d}","\u{58}\u{58}") == D("\u{58}\u{58}\u{78}\u{58}"))
88−assert(package.searchpath(D("\u{43}\u{2e}\u{6c}\u{75}\u{61}"),"\u{3f}",dirsep) == D("\u{43}\u{2e}\u{6c}\u{75}\u{61}"))
89−assert(package.searchpath("\u{2e}\u{5c}\u{43}\u{2e}\u{6c}\u{75}\u{61}",D("\u{3f}"),"\u{5c}") == D("\u{2e}\u{2f}\u{43}\u{2e}\u{6c}\u{75}\u{61}"))
90−local oldpath = package.path
91−package.path=string.gsub("\u{44}\u{2f}\u{3f}\u{2e}\u{6c}\u{75}\u{61}\u{3b}\u{44}\u{2f}\u{3f}\u{2e}\u{6c}\u{63}\u{3b}\u{44}\u{2f}\u{3f}\u{3b}\u{44}\u{2f}\u{3f}\u{3f}\u{78}\u{3f}\u{3b}\u{44}\u{2f}\u{4c}","\u{44}\u{2f}",DIR)
92−local try = function (p,n,r,ext)
93−NAME=nil
94−local rr,x = require(p)
95−assert(NAME == n)
96−assert(REQUIRED == p)
97−assert(rr == r)
98−assert(ext == x)
99−end
100−local a = require("\u{6e}\u{61}\u{6d}\u{65}\u{73}")
101−assert(a[1] == "\u{6e}\u{61}\u{6d}\u{65}\u{73}" and a[2] == D("\u{6e}\u{61}\u{6d}\u{65}\u{73}\u{2e}\u{6c}\u{75}\u{61}"))
102−local st,msg = pcall(require,"\u{65}\u{72}\u{72}")
103−assert(not st and string.find(msg,"\u{61}\u{72}\u{69}\u{74}\u{68}\u{6d}\u{65}\u{74}\u{69}\u{63}") and B == 15)
104−st,msg=pcall(require,"\u{73}\u{79}\u{6e}\u{65}\u{72}\u{72}")
105−assert(not st and string.find(msg,"\u{65}\u{72}\u{72}\u{6f}\u{72}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{69}\u{6e}\u{67}\u{20}\u{6d}\u{6f}\u{64}\u{75}\u{6c}\u{65}"))
106−assert(package.searchpath("\u{43}",package.path) == D("\u{43}\u{2e}\u{6c}\u{75}\u{61}"))
107−assert(require("\u{43}") == 25)
108−assert(require("\u{43}") == 25)
109−AA=nil
110−try("\u{42}","\u{42}\u{2e}\u{6c}\u{75}\u{61}",true,"\u{6c}\u{69}\u{62}\u{73}\u{2f}\u{42}\u{2e}\u{6c}\u{75}\u{61}")
111−assert(package.loaded.B)
112−assert(require("\u{42}") == true)
113−assert(package.loaded.A)
114−assert(require("\u{43}") == 25)
115−package.loaded.A=nil
116−try("\u{42}",nil,true,nil)
117−try("\u{41}","\u{41}\u{2e}\u{6c}\u{75}\u{61}",true,"\u{6c}\u{69}\u{62}\u{73}\u{2f}\u{41}\u{2e}\u{6c}\u{75}\u{61}")
118−package.loaded.A=nil
119−os.remove(D("\u{41}\u{2e}\u{6c}\u{75}\u{61}"))
120−AA={}
121−try("\u{41}","\u{41}\u{2e}\u{6c}\u{63}",AA,"\u{6c}\u{69}\u{62}\u{73}\u{2f}\u{41}\u{2e}\u{6c}\u{63}")
122−assert(package.searchpath("\u{41}",package.path) == D("\u{41}\u{2e}\u{6c}\u{63}"))
123−assert(require("\u{41}") == AA)
124−AA=false
125−try("\u{4b}","\u{4c}",false,"\u{6c}\u{69}\u{62}\u{73}\u{2f}\u{4c}")
126−try("\u{4b}","\u{4c}",false,"\u{6c}\u{69}\u{62}\u{73}\u{2f}\u{4c}")
127−assert(rawget(_G,"\u{5f}\u{52}\u{45}\u{51}\u{55}\u{49}\u{52}\u{45}\u{44}\u{4e}\u{41}\u{4d}\u{45}") == nil)
128−AA="\u{78}"
129−try("\u{58}","\u{58}\u{58}\u{78}\u{58}",AA,"\u{6c}\u{69}\u{62}\u{73}\u{2f}\u{58}\u{58}\u{78}\u{58}")
130−removefiles(files)
131−NAME,REQUIRED,AA,B=nil
132−local _G = _G
133−package.path=string.gsub("\u{44}\u{2f}\u{3f}\u{2e}\u{6c}\u{75}\u{61}\u{3b}\u{44}\u{2f}\u{3f}\u{2f}\u{69}\u{6e}\u{69}\u{74}\u{2e}\u{6c}\u{75}\u{61}","\u{44}\u{2f}",DIR)
134−files={["\u{50}\u{31}\u{2f}\u{69}\u{6e}\u{69}\u{74}\u{2e}\u{6c}\u{75}\u{61}"] = "\u{41}\u{41}\u{20}\u{3d}\u{20}\u{31}\u{30}",["\u{50}\u{31}\u{2f}\u{78}\u{75}\u{78}\u{75}\u{2e}\u{6c}\u{75}\u{61}"] = "\u{41}\u{41}\u{20}\u{3d}\u{20}\u{32}\u{30}"}
135−createfiles(files,"\u{5f}\u{45}\u{4e}\u{56}\u{20}\u{3d}\u{20}\u{7b}\u{7d}\u{a}","\u{a}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{5f}\u{45}\u{4e}\u{56}\u{a}")
136−AA=0
137−local m,ext = assert(require("\u{50}\u{31}"))
138−assert(ext == "\u{6c}\u{69}\u{62}\u{73}\u{2f}\u{50}\u{31}\u{2f}\u{69}\u{6e}\u{69}\u{74}\u{2e}\u{6c}\u{75}\u{61}")
139−assert(AA == 0 and m.AA == 10)
140−assert(require("\u{50}\u{31}") == m)
141−assert(require("\u{50}\u{31}") == m)
142−assert(package.searchpath("\u{50}\u{31}\u{2e}\u{78}\u{75}\u{78}\u{75}",package.path) == D("\u{50}\u{31}\u{2f}\u{78}\u{75}\u{78}\u{75}\u{2e}\u{6c}\u{75}\u{61}"))
143−m.xuxu,ext=assert(require("\u{50}\u{31}\u{2e}\u{78}\u{75}\u{78}\u{75}"))
144−assert(AA == 0 and m.xuxu.AA == 20)
145−assert(ext == "\u{6c}\u{69}\u{62}\u{73}\u{2f}\u{50}\u{31}\u{2f}\u{78}\u{75}\u{78}\u{75}\u{2e}\u{6c}\u{75}\u{61}")
146−assert(require("\u{50}\u{31}\u{2e}\u{78}\u{75}\u{78}\u{75}") == m.xuxu)
147−assert(require("\u{50}\u{31}\u{2e}\u{78}\u{75}\u{78}\u{75}") == m.xuxu)
148−assert(require("\u{50}\u{31}") == m and m.AA == 10)
149−removefiles(files)
150−AA=nil
151−package.path=""
152−assert(not pcall(require,"\u{66}\u{69}\u{6c}\u{65}\u{5f}\u{64}\u{6f}\u{65}\u{73}\u{5f}\u{6e}\u{6f}\u{74}\u{5f}\u{65}\u{78}\u{69}\u{73}\u{74}"))
153−package.path="\u{3f}\u{3f}\u{0}\u{3f}"
154−assert(not pcall(require,"\u{66}\u{69}\u{6c}\u{65}\u{5f}\u{64}\u{6f}\u{65}\u{73}\u{5f}\u{6e}\u{6f}\u{74}\u{5f}\u{65}\u{78}\u{69}\u{73}\u{74}\u{31}"))
155−package.path=oldpath
156−local fname = "\u{66}\u{69}\u{6c}\u{65}\u{5f}\u{64}\u{6f}\u{65}\u{73}\u{5f}\u{6e}\u{6f}\u{74}\u{5f}\u{65}\u{78}\u{69}\u{73}\u{74}\u{32}"
157−local m,err = pcall(require,fname)
158−for t in string.gmatch(package.path .. "\u{3b}" .. package.cpath,"\u{5b}\u{5e}\u{3b}\u{5d}\u{2b}")
159−do
160−t=string.gsub(t,"\u{3f}",fname)
161−assert(string.find(err,t,1,true))
162−end
163−do
164−local searchers = package.searchers
165−package.searchers=3
166−local st,msg = pcall(require,"\u{61}")
167−assert(not st and string.find(msg,"\u{6d}\u{75}\u{73}\u{74}\u{20}\u{62}\u{65}\u{20}\u{61}\u{20}\u{74}\u{61}\u{62}\u{6c}\u{65}"))
168−package.searchers=searchers
169−end
170−local function import
171−(...)
172−local f = {...}
173−return function (m)
174−for i = 1, # f
175−do
176−m[f[i]]=_G[f[i]]
177−end
178−end
179−end
180−assert(not pcall(module,"\u{58}\u{55}\u{58}\u{55}"))
181−local p = ""
182−local st,err,when = package.loadlib(DC("\u{6c}\u{69}\u{62}\u{31}"),"\u{2a}")
183−if not st then
184−local f,err,when = package.loadlib("\u{64}\u{6f}\u{6e}\u{6f}\u{74}\u{65}\u{78}\u{69}\u{73}\u{74}",p .. "\u{78}\u{75}\u{78}\u{75}")
185−assert(not f and type(err) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}" and when == "\u{61}\u{62}\u{73}\u{65}\u{6e}\u{74}")
186−;
187−(Message or print)("\u{a}\u{20}\u{3e}\u{3e}\u{3e}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{20}\u{64}\u{79}\u{6e}\u{61}\u{6d}\u{69}\u{63}\u{20}\u{6c}\u{69}\u{62}\u{72}\u{61}\u{72}\u{79}\u{20}\u{3c}\u{3c}\u{3c}\u{a}")
188−print(err,when)
189−else
190−local f = assert(package.loadlib(DC("\u{6c}\u{69}\u{62}\u{31}"),p .. "\u{6f}\u{6e}\u{65}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}"))
191−local a,b = f(15,25)
192−assert(a == 25 and b == 15)
193−f=assert(package.loadlib(DC("\u{6c}\u{69}\u{62}\u{31}"),p .. "\u{61}\u{6e}\u{6f}\u{74}\u{68}\u{65}\u{72}\u{66}\u{75}\u{6e}\u{63}"))
194−assert(f(10,20) == "\u{31}\u{30}\u{25}\u{32}\u{30}\u{a}")
195−local f,err,when = package.loadlib(DC("\u{6c}\u{69}\u{62}\u{31}"),p .. "\u{78}\u{75}\u{78}\u{75}")
196−assert(not f and type(err) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}" and when == "\u{69}\u{6e}\u{69}\u{74}")
197−f,err,when=package.loadlib("\u{64}\u{6f}\u{6e}\u{6f}\u{74}\u{65}\u{78}\u{69}\u{73}\u{74}",p .. "\u{78}\u{75}\u{78}\u{75}")
198−assert(not f and type(err) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}" and when == "\u{6f}\u{70}\u{65}\u{6e}")
199−f=assert(package.loadlib(DC("\u{6c}\u{69}\u{62}\u{31}\u{31}"),p .. "\u{6c}\u{75}\u{61}\u{6f}\u{70}\u{65}\u{6e}\u{5f}\u{6c}\u{69}\u{62}\u{31}\u{31}"))
200−assert(f() == "\u{65}\u{78}\u{70}\u{6f}\u{72}\u{74}\u{65}\u{64}")
201−package.cpath=DC("\u{3f}")
202−local lib2,ext = require("\u{6c}\u{69}\u{62}\u{32}\u{2d}\u{76}\u{32}")
203−assert(string.find(ext,"\u{6c}\u{69}\u{62}\u{73}\u{2f}\u{6c}\u{69}\u{62}\u{32}\u{2d}\u{76}\u{32}",1,true))
204−assert(_ENV.x == "\u{6c}\u{69}\u{62}\u{32}\u{2d}\u{76}\u{32}" and _ENV.y == DC("\u{6c}\u{69}\u{62}\u{32}\u{2d}\u{76}\u{32}"))
205−assert(lib2.id("\u{78}") == true)
206−local fs,ext = require("\u{6c}\u{69}\u{62}\u{31}\u{2e}\u{73}\u{75}\u{62}")
207−assert(_ENV.x == "\u{6c}\u{69}\u{62}\u{31}\u{2e}\u{73}\u{75}\u{62}" and _ENV.y == DC("\u{6c}\u{69}\u{62}\u{31}"))
208−assert(string.find(ext,"\u{6c}\u{69}\u{62}\u{73}\u{2f}\u{6c}\u{69}\u{62}\u{31}",1,true))
209−assert(fs.id(45) == 45)
210−_ENV.x,_ENV.y=nil
211−end
212−_ENV=_G
213−do
214−local p = package
215−package={}
216−p.preload.pl=function (...)
217−local _ENV = {...}
218−function xuxu(x)
219−return x + 20
220−end
221−return _ENV
222−end
223−local pl,ext = require("\u{70}\u{6c}")
224−assert(require("\u{70}\u{6c}") == pl)
225−assert(pl.xuxu(10) == 30)
226−assert(pl[1] == "\u{70}\u{6c}" and pl[2] == "\u{3a}\u{70}\u{72}\u{65}\u{6c}\u{6f}\u{61}\u{64}\u{3a}" and ext == "\u{3a}\u{70}\u{72}\u{65}\u{6c}\u{6f}\u{61}\u{64}\u{3a}")
227−package=p
228−assert(type(package.path) == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}")
229−end
230−print("\u{2b}")
231−end
232−print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{61}\u{73}\u{73}\u{69}\u{67}\u{6e}\u{6d}\u{65}\u{6e}\u{74}\u{73}\u{2c}\u{20}\u{6c}\u{6f}\u{67}\u{69}\u{63}\u{61}\u{6c}\u{20}\u{6f}\u{70}\u{65}\u{72}\u{61}\u{74}\u{6f}\u{72}\u{73}\u{2c}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{72}\u{75}\u{63}\u{74}\u{6f}\u{72}\u{73}")
233−local res,res2 = 27
234−local a,b = 1,2 + 3
235−assert(a == 1 and b == 5)
236−a={}
237−local function f
238−()
239−return 10,11,12
240−end
241−a.x,b,a[1]=1,2,f()
242−assert(a.x == 1 and b == 2 and a[1] == 10)
243−a[f()],b,a[f() + 3]=f(),a,"\u{78}"
244−assert(a[10] == 10 and b == a and a[13] == "\u{78}")
245−do
246−local f = function (n)
247−local x = {}
248−;
249−for i = 1, n
250−do
251−x[i]=i
252−end
253−;
254−return table.unpack(x)
255−end
256−;
257−local a,b,c
258−a,b=0,f(1)
259−assert(a == 0 and b == 1)
260−a,b=0,f(1)
261−assert(a == 0 and b == 1)
262−a,b,c=0,5,f(4)
263−assert(a == 0 and b == 5 and c == 1)
264−a,b,c=0,5,f(0)
265−assert(a == 0 and b == 5 and c == nil)
266−end
267−local a,b,c,d = 1 and nil,1 or nil,(1 and (nil or 1)),6
268−assert(not a and b and c and d == 6)
269−d=20
270−a,b,c,d=f()
271−assert(a == 10 and b == 11 and c == 12 and d == nil)
272−a,b=f(),1,2,3,f()
273−assert(a == 10 and b == 1)
274−assert(a < b == false and a > b == true)
275−assert((10 and 2) == 2)
276−assert((10 or 2) == 10)
277−assert((10 or assert(nil)) == 10)
278−assert(not (nil and assert(nil)))
279−assert((nil or "\u{61}\u{6c}\u{6f}") == "\u{61}\u{6c}\u{6f}")
280−assert((nil and 10) == nil)
281−assert((false and 10) == false)
282−assert((true or 10) == true)
283−assert((false or 10) == 10)
284−assert(false ~= nil)
285−assert(nil ~= false)
286−assert(not nil == true)
287−assert(not not nil == false)
288−assert(not not 1 == true)
289−assert(not not a == true)
290−assert(not not (6 or nil) == true)
291−assert(not not (nil and 56) == false)
292−assert(not not (nil and true) == false)
293−assert(not 10 == false)
294−assert(not {} == false)
295−assert(not 0.5 == false)
296−assert(not "\u{78}" == false)
297−assert({} ~= {})
298−print("\u{2b}")
299−a={}
300−a[true]=20
301−a[false]=10
302−assert(a[1 < 2] == 20 and a[1 > 2] == 10)
303−function f(a)
304−return a
305−end
306−local a = {}
307−for i = 3000, - 3000, - 1
308−do
309−a[i + 0.0]=i
310−;
311−end
312−a[1e31]="\u{61}\u{6c}\u{6f}"
313−;
314−a[true]=10
315−;
316−a[false]=20
317−assert(a[1e31] == "\u{61}\u{6c}\u{6f}" and a[not 1] == 20 and a[10 < 20] == 10)
318−for i = 3000, - 3000, - 1
319−do
320−assert(a[i] == i)
321−;
322−end
323−a[print]=assert
324−a[f]=print
325−a[a]=a
326−assert(a[a][a][a][a][print] == assert)
327−a[print](a[a[f]] == a[print])
328−assert(not pcall(function ()
329−local a = {}
330−;
331−a[nil]=10
332−end))
333−assert(not pcall(function ()
334−local a = {[nil] = 10}
335−end))
336−assert(a[nil] == undef)
337−a=nil
338−local a,b,c
339−a={10,9,8,7,6,5,4,3,2,[- 3] = "\u{61}",[f] = print,["\u{61}"] = "\u{61}",["\u{62}"] = "\u{61}\u{62}"}
340−a,a.x,a.y=a,a[- 3]
341−assert(a[1] == 10 and a[- 3] == a.a and a[f] == print and a.x == "\u{61}" and not a.y)
342−a[1],f(a)[2],b,c={["\u{61}\u{6c}\u{6f}"] = assert},10,a[1],a[f],6,10,23,f(a),2
343−a[1].alo(a[2] == 10 and b == 10 and c == print)
344−a.aVeryLongName012345678901234567890123456789012345678901234567890123456789=10
345−local function foo
346−()
347−return a.aVeryLongName012345678901234567890123456789012345678901234567890123456789
348−end
349−assert(foo() == 10 and a.aVeryLongName012345678901234567890123456789012345678901234567890123456789 == 10)
350−do
351−local function foo
352−()
353−local _ENV <const> = 11
354−X="\u{68}\u{69}"
355−end
356−local st,msg = pcall(foo)
357−assert(not st and string.find(msg,"\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}"))
358−end
359−local maxint = math.maxinteger
360−while maxint ~= (maxint + 0.0) or (maxint - 1) ~= (maxint - 1.0) do
361−maxint=maxint // 2
362−end
363−local maxintF = maxint + 0.0
364−assert(maxintF == maxint and math.type(maxintF) == "\u{66}\u{6c}\u{6f}\u{61}\u{74}" and maxintF >= 2.0 ^ 14)
365−a[maxintF]=10
366−;
367−a[maxintF - 1.0]=11
368−;
369−a[- maxintF]=12
370−;
371−a[- maxintF + 1.0]=13
372−;
373−assert(a[maxint] == 10 and a[maxint - 1] == 11 and a[- maxint] == 12 and a[- maxint + 1] == 13)
374−a[maxint]=20
375−a[- maxint]=22
376−assert(a[maxintF] == 20 and a[maxintF - 1.0] == 11 and a[- maxintF] == 22 and a[- maxintF + 1.0] == 13)
377−a=nil
378−do
379−local a,i,j,b
380−a={"\u{61}","\u{62}"}
381−;
382−i=1
383−;
384−j=2
385−;
386−b=a
387−i,a[i],a,j,a[j],a[i + j]=j,i,i,b,j,i
388−assert(i == 2 and b[1] == 1 and a == 1 and j == b and b[2] == 2 and b[3] == 1)
389−a={}
390−local function foo
391−()
392−b,a.x,a=a,10,20
393−end
394−foo()
395−assert(a == 20 and b.x == 10)
396−end
397−do
398−local a,i,j,b
399−a={"\u{61}","\u{62}"}
400−;
401−i=1
402−;
403−j=2
404−;
405−b=a
406−local function foo
407−()
408−i,a[i],a,j,a[j],a[i + j]=j,i,i,b,j,i
409−end
410−foo()
411−assert(i == 2 and b[1] == 1 and a == 1 and j == b and b[2] == 2 and b[3] == 1)
412−local t = {}
413−(function (a)
414−t[a],a=10,20
415−end)(1)
416−;
417−assert(t[1] == 10)
418−end
419−local function foo
420−()
421−local a
422−return function ()
423−local b
424−a,b=3,14
425−return a,b
426−end
427−end
428−local a,b = foo()()
429−assert(a == 3 and b == 14)
430−print("\u{4f}\u{4b}")
431−return res
zod/luau/res/lua/cycled/bitwise.luadeleted−309
@@ -1,309 +0,0 @@
1−print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{62}\u{69}\u{74}\u{77}\u{69}\u{73}\u{65}\u{20}\u{6f}\u{70}\u{65}\u{72}\u{61}\u{74}\u{69}\u{6f}\u{6e}\u{73}")
2−require("\u{62}\u{77}\u{63}\u{6f}\u{65}\u{72}\u{63}\u{69}\u{6f}\u{6e}")
3−local numbits = string.packsize("\u{6a}") * 8
4−assert(~ 0 == - 1)
5−assert((1 << (numbits - 1)) == math.mininteger)
6−local a,b,c,d
7−a=18446744073709551615
8−assert(a == - 1 and a & - 1 == a and a & 35 == 35)
9−a=17361641481138401520
10−assert(a | - 1 == - 1)
11−assert(a ~ a == 0 and a ~ 0 == a and a ~ ~ a == - 1)
12−assert(a >> 4 == ~ a)
13−a=240
14−;
15−b=204
16−;
17−c=170
18−;
19−d=253
20−assert(a | b ~ c & d == 244)
21−a=240.0
22−;
23−b=204.0
24−;
25−c="\u{30}\u{78}\u{41}\u{41}\u{2e}\u{30}"
26−;
27−d="\u{30}\u{78}\u{46}\u{44}\u{2e}\u{30}"
28−assert(a | b ~ c & d == 244)
29−a=4026531840
30−;
31−b=3422552064
32−;
33−c=2852126720
34−;
35−d=4244635648
36−assert(a | b ~ c & d == 4093640704)
37−assert(~ ~ a == a and ~ a == - 1 ~ a and - d == ~ d + 1)
38−a=a << 32
39−b=b << 32
40−c=c << 32
41−d=d << 32
42−assert(a | b ~ c & d == 4093640704 << 32)
43−assert(~ ~ a == a and ~ a == - 1 ~ a and - d == ~ d + 1)
44−do
45−local code = string.format("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2d}\u{31}\u{20}\u{3e}\u{3e}\u{20}\u{25}\u{64}",math.maxinteger)
46−assert(load(code)() == 0)
47−local code = string.format("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2d}\u{31}\u{20}\u{3e}\u{3e}\u{20}\u{25}\u{64}",math.mininteger)
48−assert(load(code)() == 0)
49−local code = string.format("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2d}\u{31}\u{20}\u{3c}\u{3c}\u{20}\u{25}\u{64}",math.maxinteger)
50−assert(load(code)() == 0)
51−local code = string.format("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{2d}\u{31}\u{20}\u{3c}\u{3c}\u{20}\u{25}\u{64}",math.mininteger)
52−assert(load(code)() == 0)
53−end
54−assert(- 1 >> 1 == (1 << (numbits - 1)) - 1 and 1 << 31 == 2147483648)
55−assert(- 1 >> (numbits - 1) == 1)
56−assert(- 1 >> numbits == 0 and - 1 >> - numbits == 0 and - 1 << numbits == 0 and - 1 << - numbits == 0)
57−assert(1 >> math.mininteger == 0)
58−assert(1 >> math.maxinteger == 0)
59−assert(1 << math.mininteger == 0)
60−assert(1 << math.maxinteger == 0)
61−assert((2 ^ 30 - 1) << 2 ^ 30 == 0)
62−assert((2 ^ 30 - 1) >> 2 ^ 30 == 0)
63−assert(1 >> - 3 == 1 << 3 and 1000 >> 5 == 1000 << - 5)
64−assert("\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}" | 0 == - 1)
65−assert("\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{65}" & "\u{2d}\u{31}" == - 2)
66−assert("\u{20}\u{9}\u{2d}\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{65}\u{a}\u{9}" & "\u{2d}\u{31}" == 2)
67−assert("\u{20}\u{20}\u{20}\u{a}\u{20}\u{20}\u{2d}\u{34}\u{35}\u{20}\u{20}\u{9}\u{20}" >> "\u{20}\u{20}\u{2d}\u{32}\u{20}\u{20}" == - 45 * 4)
68−assert("\u{31}\u{32}\u{33}\u{34}\u{2e}\u{30}" << "\u{35}\u{2e}\u{30}" == 1234 * 32)
69−assert("\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{2e}\u{30}" ~ "\u{30}\u{78}\u{41}\u{41}\u{41}\u{41}" == 21845)
70−assert(~ "\u{30}\u{78}\u{30}\u{2e}\u{30}\u{30}\u{30}\u{70}\u{34}" == - 1)
71−assert(("\u{37}" .. 3) << 1 == 146)
72−assert(4294967295 >> (1 .. "\u{39}") == 8191)
73−assert(10 | (1 .. "\u{39}") == 27)
74−do
75−local st,msg = pcall(function ()
76−return 4 & "\u{61}"
77−end)
78−assert(string.find(msg,"\u{27}\u{62}\u{61}\u{6e}\u{64}\u{27}"))
79−local st,msg = pcall(function ()
80−return ~ "\u{61}"
81−end)
82−assert(string.find(msg,"\u{27}\u{62}\u{6e}\u{6f}\u{74}\u{27}"))
83−end
84−assert(not pcall(function ()
85−return "\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{2e}\u{30}" | 0
86−end))
87−assert(not pcall(function ()
88−return "\u{30}\u{78}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{66}\u{0}" | 0
89−end))
90−print("\u{2b}")
91−package.preload.bit32=function ()
92−local bit = {}
93−function bit.bnot(a)
94−return ~ a & 4294967295
95−end
96−function bit.band(x,y,z, ...)
97−if not z then
98−return ((x or - 1) & (y or - 1)) & 4294967295
99−else
100−local arg = {...}
101−local res = x & y & z
102−for i = 1, # arg
103−do
104−res=res & arg[i]
105−end
106−return res & 4294967295
107−end
108−end
109−function bit.bor(x,y,z, ...)
110−if not z then
111−return ((x or 0) | (y or 0)) & 4294967295
112−else
113−local arg = {...}
114−local res = x | y | z
115−for i = 1, # arg
116−do
117−res=res | arg[i]
118−end
119−return res & 4294967295
120−end
121−end
122−function bit.bxor(x,y,z, ...)
123−if not z then
124−return ((x or 0) ~ (y or 0)) & 4294967295
125−else
126−local arg = {...}
127−local res = x ~ y ~ z
128−for i = 1, # arg
129−do
130−res=res ~ arg[i]
131−end
132−return res & 4294967295
133−end
134−end
135−function bit.btest(...)
136−return bit.band(...) ~= 0
137−end
138−function bit.lshift(a,b)
139−return ((a & 4294967295) << b) & 4294967295
140−end
141−function bit.rshift(a,b)
142−return ((a & 4294967295) >> b) & 4294967295
143−end
144−function bit.arshift(a,b)
145−a=a & 4294967295
146−if b <= 0 or (a & 2147483648) == 0 then
147−return (a >> b) & 4294967295
148−else
149−return ((a >> b) | ~ (4294967295 >> b)) & 4294967295
150−end
151−end
152−function bit.lrotate(a,b)
153−b=b & 31
154−a=a & 4294967295
155−a=(a << b) | (a >> (32 - b))
156−return a & 4294967295
157−end
158−function bit.rrotate(a,b)
159−return bit.lrotate(a,- b)
160−end
161−local function checkfield
162−(f,w)
163−w=w or 1
164−assert(f >= 0,"\u{66}\u{69}\u{65}\u{6c}\u{64}\u{20}\u{63}\u{61}\u{6e}\u{6e}\u{6f}\u{74}\u{20}\u{62}\u{65}\u{20}\u{6e}\u{65}\u{67}\u{61}\u{74}\u{69}\u{76}\u{65}")
165−assert(w > 0,"\u{77}\u{69}\u{64}\u{74}\u{68}\u{20}\u{6d}\u{75}\u{73}\u{74}\u{20}\u{62}\u{65}\u{20}\u{70}\u{6f}\u{73}\u{69}\u{74}\u{69}\u{76}\u{65}")
166−assert(f + w <= 32,"\u{74}\u{72}\u{79}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{6f}\u{20}\u{61}\u{63}\u{63}\u{65}\u{73}\u{73}\u{20}\u{6e}\u{6f}\u{6e}\u{2d}\u{65}\u{78}\u{69}\u{73}\u{74}\u{65}\u{6e}\u{74}\u{20}\u{62}\u{69}\u{74}\u{73}")
167−return f,~ (- 1 << w)
168−end
169−function bit.extract(a,f,w)
170−local f,mask = checkfield(f,w)
171−return (a >> f) & mask
172−end
173−function bit.replace(a,v,f,w)
174−local f,mask = checkfield(f,w)
175−v=v & mask
176−a=(a & ~ (mask << f)) | (v << f)
177−return a & 4294967295
178−end
179−return bit
180−end
181−print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{62}\u{69}\u{74}\u{77}\u{69}\u{73}\u{65}\u{20}\u{6c}\u{69}\u{62}\u{72}\u{61}\u{72}\u{79}")
182−local bit32 = require("\u{62}\u{69}\u{74}\u{33}\u{32}")
183−assert(bit32.band() == bit32.bnot(0))
184−assert(bit32.btest() == true)
185−assert(bit32.bor() == 0)
186−assert(bit32.bxor() == 0)
187−assert(bit32.band() == bit32.band(4294967295))
188−assert(bit32.band(1,2) == 0)
189−assert(bit32.band(- 1) == 4294967295)
190−assert(bit32.band((1 << 33) - 1) == 4294967295)
191−assert(bit32.band(- (1 << 33) - 1) == 4294967295)
192−assert(bit32.band((1 << 33) + 1) == 1)
193−assert(bit32.band(- (1 << 33) + 1) == 1)
194−assert(bit32.band(- (1 << 40)) == 0)
195−assert(bit32.band(1 << 40) == 0)
196−assert(bit32.band(- (1 << 40) - 2) == 4294967294)
197−assert(bit32.band((1 << 40) - 4) == 4294967292)
198−assert(bit32.lrotate(0,- 1) == 0)
199−assert(bit32.lrotate(0,7) == 0)
200−assert(bit32.lrotate(305419896,0) == 305419896)
201−assert(bit32.lrotate(305419896,32) == 305419896)
202−assert(bit32.lrotate(305419896,4) == 591751041)
203−assert(bit32.rrotate(305419896,- 4) == 591751041)
204−assert(bit32.lrotate(305419896,- 8) == 2014458966)
205−assert(bit32.rrotate(305419896,8) == 2014458966)
206−assert(bit32.lrotate(2863311530,2) == 2863311530)
207−assert(bit32.lrotate(2863311530,- 2) == 2863311530)
208−for i = - 50, 50
209−do
210−assert(bit32.lrotate(2309737967,i) == bit32.lrotate(2309737967,i % 32))
211−end
212−assert(bit32.lshift(305419896,4) == 591751040)
213−assert(bit32.lshift(305419896,8) == 878082048)
214−assert(bit32.lshift(305419896,- 4) == 19088743)
215−assert(bit32.lshift(305419896,- 8) == 1193046)
216−assert(bit32.lshift(305419896,32) == 0)
217−assert(bit32.lshift(305419896,- 32) == 0)
218−assert(bit32.rshift(305419896,4) == 19088743)
219−assert(bit32.rshift(305419896,8) == 1193046)
220−assert(bit32.rshift(305419896,32) == 0)
221−assert(bit32.rshift(305419896,- 32) == 0)
222−assert(bit32.arshift(305419896,0) == 305419896)
223−assert(bit32.arshift(305419896,1) == 305419896 // 2)
224−assert(bit32.arshift(305419896,- 1) == 305419896 * 2)
225−assert(bit32.arshift(- 1,1) == 4294967295)
226−assert(bit32.arshift(- 1,24) == 4294967295)
227−assert(bit32.arshift(- 1,32) == 4294967295)
228−assert(bit32.arshift(- 1,- 1) == bit32.band(- 1 * 2,4294967295))
229−assert(305419896 << 4 == 4886718336)
230−assert(305419896 << 8 == 78187493376)
231−assert(305419896 << - 4 == 19088743)
232−assert(305419896 << - 8 == 1193046)
233−assert(305419896 << 32 == 1311768464867721216)
234−assert(305419896 << - 32 == 0)
235−assert(305419896 >> 4 == 19088743)
236−assert(305419896 >> 8 == 1193046)
237−assert(305419896 >> 32 == 0)
238−assert(305419896 >> - 32 == 1311768464867721216)
239−print("\u{2b}")
240−local c = {0,1,2,3,10,2147483648,2863311530,1431655765,4294967295,2147483647}
241−for _,b in pairs(c)
242−do
243−assert(bit32.band(b) == b)
244−assert(bit32.band(b,b) == b)
245−assert(bit32.band(b,b,b,b) == b)
246−assert(bit32.btest(b,b) == (b ~= 0))
247−assert(bit32.band(b,b,b) == b)
248−assert(bit32.band(b,b,b,~ b) == 0)
249−assert(bit32.btest(b,b,b) == (b ~= 0))
250−assert(bit32.band(b,bit32.bnot(b)) == 0)
251−assert(bit32.bor(b,bit32.bnot(b)) == bit32.bnot(0))
252−assert(bit32.bor(b) == b)
253−assert(bit32.bor(b,b) == b)
254−assert(bit32.bor(b,b,b) == b)
255−assert(bit32.bor(b,b,0,~ b) == 4294967295)
256−assert(bit32.bxor(b) == b)
257−assert(bit32.bxor(b,b) == 0)
258−assert(bit32.bxor(b,b,b) == b)
259−assert(bit32.bxor(b,b,b,b) == 0)
260−assert(bit32.bxor(b,0) == b)
261−assert(bit32.bnot(b) ~= b)
262−assert(bit32.bnot(bit32.bnot(b)) == b)
263−assert(bit32.bnot(b) == (1 << 32) - 1 - b)
264−assert(bit32.lrotate(b,32) == b)
265−assert(bit32.rrotate(b,32) == b)
266−assert(bit32.lshift(bit32.lshift(b,- 4),4) == bit32.band(b,bit32.bnot(15)))
267−assert(bit32.rshift(bit32.rshift(b,4),- 4) == bit32.band(b,bit32.bnot(15)))
268−end
269−c={0,1,2,3,10,8388608,11184810,5592405,16777215,8388607}
270−for _,b in pairs(c)
271−do
272−for i = - 40, 40
273−do
274−local x = bit32.lshift(b,i)
275−local y = math.floor(math.fmod(b * 2.0 ^ i,2.0 ^ 32))
276−assert(math.fmod(x - y,2.0 ^ 32) == 0)
277−end
278−end
279−assert(not pcall(bit32.band,{}))
280−assert(not pcall(bit32.bnot,"\u{61}"))
281−assert(not pcall(bit32.lshift,45))
282−assert(not pcall(bit32.lshift,45,print))
283−assert(not pcall(bit32.rshift,45,print))
284−print("\u{2b}")
285−assert(bit32.extract(305419896,0,4) == 8)
286−assert(bit32.extract(305419896,4,4) == 7)
287−assert(bit32.extract(2684358929,28,4) == 10)
288−assert(bit32.extract(2684358929,31,1) == 1)
289−assert(bit32.extract(1342177553,31,1) == 0)
290−assert(bit32.extract(4063516281,0,32) == 4063516281)
291−assert(not pcall(bit32.extract,0,- 1))
292−assert(not pcall(bit32.extract,0,32))
293−assert(not pcall(bit32.extract,0,0,33))
294−assert(not pcall(bit32.extract,0,31,2))
295−assert(bit32.replace(305419896,5,28,4) == 1379161720)
296−assert(bit32.replace(305419896,2271560481,0,32) == 2271560481)
297−assert(bit32.replace(0,1,2) == 2 ^ 2)
298−assert(bit32.replace(0,- 1,4) == 2 ^ 4)
299−assert(bit32.replace(- 1,0,31) == (1 << 31) - 1)
300−assert(bit32.replace(- 1,0,1,2) == (1 << 32) - 7)
301−assert(bit32.bor(3.0) == 3)
302−assert(bit32.bor(- 4.0) == 4294967292)
303−if 2.0 ^ 50 < 2.0 ^ 50 + 1.0 and 2.0 ^ 50 < (- 1 >> 1) then
304−assert(bit32.bor(2.0 ^ 32 - 5.0) == 4294967291)
305−assert(bit32.bor(- 2.0 ^ 32 - 6.0) == 4294967290)
306−assert(bit32.bor(2.0 ^ 48 - 5.0) == 4294967291)
307−assert(bit32.bor(- 2.0 ^ 48 - 6.0) == 4294967290)
308−end
309−print("\u{4f}\u{4b}")
zod/luau/res/lua/cycled/calls.luadeleted−492
@@ -1,492 +0,0 @@
1−print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{73}\u{20}\u{61}\u{6e}\u{64}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{73}")
2−local debug = require("\u{64}\u{65}\u{62}\u{75}\u{67}")
3−assert(type(1 < 2) == "\u{62}\u{6f}\u{6f}\u{6c}\u{65}\u{61}\u{6e}")
4−assert(type(true) == "\u{62}\u{6f}\u{6f}\u{6c}\u{65}\u{61}\u{6e}" and type(false) == "\u{62}\u{6f}\u{6f}\u{6c}\u{65}\u{61}\u{6e}")
5−assert(type(nil) == "\u{6e}\u{69}\u{6c}" and type(- 3) == "\u{6e}\u{75}\u{6d}\u{62}\u{65}\u{72}" and type("\u{78}") == "\u{73}\u{74}\u{72}\u{69}\u{6e}\u{67}" and type({}) == "\u{74}\u{61}\u{62}\u{6c}\u{65}" and type(type) == "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}")
6−assert(type(assert) == type(print))
7−local function f
8−(x)
9−return a:x(x)
10−end
11−assert(type(f) == "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}")
12−assert(not pcall(type))
13−fact=false
14−do
15−local res = 1
16−local function fact
17−(n)
18−if n == 0 then
19−return res
20−else
21−return n * fact(n - 1)
22−end
23−end
24−assert(fact(5) == 120)
25−end
26−assert(fact == false)
27−fact=nil
28−local a = {["\u{69}"] = 10}
29−local self = 20
30−function a:x(x)
31−return x + self.i
32−end
33−function a.y(x)
34−return x + self
35−end
36−assert(a:x(1) + 10 == a.y(1))
37−a.t={["\u{69}"] = - 100}
38−a["\u{74}"].x=function (self,a,b)
39−return self.i + a + b
40−end
41−assert(a.t:x(2,3) == - 95)
42−do
43−local a = {["\u{78}"] = 0}
44−function a:add(x)
45−self.x,a.y=self.x + x,20
46−;
47−return self
48−end
49−assert(a:add(10):add(20):add(30).x == 60 and a.y == 20)
50−end
51−local a = {["\u{62}"] = {["\u{63}"] = {}}}
52−function a.b.c.f1(x)
53−return x + 1
54−end
55−function a.b.c:f2(x,y)
56−self[x]=y
57−end
58−assert(a.b.c.f1(4) == 5)
59−a.b.c:f2("\u{6b}",12)
60−;
61−assert(a.b.c.k == 12)
62−print("\u{2b}")
63−t=nil
64−function f(a,b,c)
65−local d = "\u{61}"
66−;
67−t={a,b,c,d}
68−end
69−f(1,2)
70−assert(t[1] == 1 and t[2] == 2 and t[3] == nil and t[4] == "\u{61}")
71−f(1,2,3,4)
72−assert(t[1] == 1 and t[2] == 2 and t[3] == 3 and t[4] == "\u{61}")
73−t=nil
74−function fat(x)
75−if x <= 1 then
76−return 1
77−else
78−return x * load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{66}\u{61}\u{74}\u{28}" .. x - 1 .. "\u{29}","")()
79−end
80−end
81−assert(load("\u{6c}\u{6f}\u{61}\u{64}\u{20}\u{27}\u{61}\u{73}\u{73}\u{65}\u{72}\u{74}\u{28}\u{66}\u{61}\u{74}\u{28}\u{36}\u{29}\u{3d}\u{3d}\u{37}\u{32}\u{30}\u{29}\u{27}\u{20}\u{28}\u{29}\u{20}"))()
82−a=load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{66}\u{61}\u{74}\u{28}\u{35}\u{29}\u{2c}\u{20}\u{33}")
83−local a,b = a()
84−assert(a == 120 and b == 3)
85−fat=nil
86−print("\u{2b}")
87−local function err_on_n
88−(n)
89−if n == 0 then
90−error()
91−;
92−exit(1)
93−;
94−else
95−err_on_n(n - 1)
96−;
97−exit(1)
98−;
99−end
100−end
101−do
102−local function dummy
103−(n)
104−if n > 0 then
105−assert(not pcall(err_on_n,n))
106−dummy(n - 1)
107−end
108−end
109−dummy(10)
110−end
111−_G.deep=nil
112−function deep(n)
113−if n > 0 then
114−deep(n - 1)
115−end
116−end
117−deep(10)
118−deep(180)
119−print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{74}\u{61}\u{69}\u{6c}\u{20}\u{63}\u{61}\u{6c}\u{6c}\u{73}")
120−function deep(n)
121−if n > 0 then
122−return deep(n - 1)
123−else
124−return 101
125−end
126−end
127−assert(deep(30000) == 101)
128−a={}
129−function a:deep(n)
130−if n > 0 then
131−return self:deep(n - 1)
132−else
133−return 101
134−end
135−end
136−assert(a:deep(30000) == 101)
137−do
138−local function foo
139−(x, ...)
140−local a = {...}
141−;
142−return x,a[1],a[2]
143−end
144−local function foo1
145−(x)
146−return foo(10,x,x + 1)
147−end
148−local a,b,c = foo1(- 2)
149−assert(a == 10 and b == - 2 and c == - 1)
150−local t = setmetatable({},{["\u{5f}\u{5f}\u{63}\u{61}\u{6c}\u{6c}"] = foo})
151−local function foo2
152−(x)
153−return t(10,x)
154−end
155−a,b,c=foo2(100)
156−assert(a == t and b == 10 and c == 100)
157−a,b=(function ()
158−return foo()
159−end)()
160−assert(a == nil and b == nil)
161−local X,Y,A
162−local function foo
163−(x,y, ...)
164−X=x
165−;
166−Y=y
167−;
168−A={...}
169−end
170−local function foo1
171−(...)
172−return foo(...)
173−end
174−local a,b,c = foo1()
175−assert(X == nil and Y == nil and # A == 0)
176−a,b,c=foo1(10)
177−assert(X == 10 and Y == nil and # A == 0)
178−a,b,c=foo1(10,20)
179−assert(X == 10 and Y == 20 and # A == 0)
180−a,b,c=foo1(10,20,30)
181−assert(X == 10 and Y == 20 and # A == 1 and A[1] == 30)
182−end
183−do
184−local function loop
185−()
186−assert(pcall(loop))
187−end
188−local err,msg = xpcall(loop,loop)
189−assert(not err and string.find(msg,"\u{65}\u{72}\u{72}\u{6f}\u{72}"))
190−end
191−do
192−local n = 10000
193−local function foo
194−()
195−if n == 0 then
196−return 1023
197−else
198−n=n - 1
199−;
200−return foo()
201−end
202−end
203−for i = 1, 100
204−do
205−foo=setmetatable({},{["\u{5f}\u{5f}\u{63}\u{61}\u{6c}\u{6c}"] = foo})
206−end
207−assert(coroutine.wrap(function ()
208−return foo()
209−end)() == 1023)
210−end
211−print("\u{2b}")
212−do
213−local N = 20
214−local u = table.pack
215−for i = 1, N
216−do
217−u=setmetatable({i},{["\u{5f}\u{5f}\u{63}\u{61}\u{6c}\u{6c}"] = u})
218−end
219−local Res = u("\u{61}","\u{62}","\u{63}")
220−assert(Res.n == N + 3)
221−for i = 1, N
222−do
223−assert(Res[i][1] == i)
224−end
225−assert(Res[N + 1] == "\u{61}" and Res[N + 2] == "\u{62}" and Res[N + 3] == "\u{63}")
226−end
227−a=nil
228−(function (x)
229−a=x
230−end)(23)
231−assert(a == 23 and (function (x)
232−return x * 2
233−end)(20) == 40)
234−local Z = function (le)
235−local function a
236−(f)
237−return le(function (x)
238−return f(f)(x)
239−end)
240−end
241−return a(a)
242−end
243−local F = function (f)
244−return function (n)
245−if n == 0 then
246−return 1
247−else
248−return n * f(n - 1)
249−end
250−end
251−end
252−local fat = Z(F)
253−assert(fat(0) == 1 and fat(4) == 24 and Z(F)(5) == 5 * Z(F)(4))
254−local function g
255−(z)
256−local function f
257−(a,b,c,d)
258−return function (x,y)
259−return a + b + c + d + a + x + y + z
260−end
261−end
262−return f(z,z + 1,z + 2,z + 3)
263−end
264−local f = g(10)
265−assert(f(9,16) == 10 + 11 + 12 + 13 + 10 + 9 + 16 + 10)
266−print("\u{2b}")
267−local function unlpack
268−(t,i)
269−i=i or 1
270−if (i <= # t) then
271−return t[i],unlpack(t,i + 1)
272−end
273−end
274−local function equaltab
275−(t1,t2)
276−assert(# t1 == # t2)
277−for i = 1, # t1
278−do
279−assert(t1[i] == t2[i])
280−end
281−end
282−local pack = function (...)
283−return (table.pack(...))
284−end
285−local function f
286−()
287−return 1,2,30,4
288−end
289−local function ret2
290−(a,b)
291−return a,b
292−end
293−local a,b,c,d = unlpack({1,2,3})
294−assert(a == 1 and b == 2 and c == 3 and d == nil)
295−a={1,2,3,4,false,10,"\u{61}\u{6c}\u{6f}",false,assert}
296−equaltab(pack(unlpack(a)),a)
297−equaltab(pack(unlpack(a),- 1),{1,- 1})
298−a,b,c,d=ret2(f()),ret2(f())
299−assert(a == 1 and b == 1 and c == 2 and d == nil)
300−a,b,c,d=unlpack(pack(ret2(f()),ret2(f())))
301−assert(a == 1 and b == 1 and c == 2 and d == nil)
302−a,b,c,d=unlpack(pack(ret2(f()),(ret2(f()))))
303−assert(a == 1 and b == 1 and c == nil and d == nil)
304−a=ret2({unlpack({1,2,3}),unlpack({3,2,1}),unlpack({"\u{61}","\u{62}"})})
305−assert(a[1] == 1 and a[2] == 3 and a[3] == "\u{61}" and a[4] == "\u{62}")
306−rawget({},"\u{78}",1)
307−rawset({},"\u{78}",1,2)
308−assert(math.sin(1,2) == math.sin(1))
309−table.sort({10,9,8,4,19,23,0,0},function (a,b)
310−return a < b
311−end,"\u{65}\u{78}\u{74}\u{72}\u{61}\u{20}\u{61}\u{72}\u{67}")
312−local x = "\u{2d}\u{2d}\u{20}\u{61}\u{20}\u{63}\u{6f}\u{6d}\u{6d}\u{65}\u{6e}\u{74}\u{0}\u{0}\u{0}\u{a}\u{20}\u{20}\u{78}\u{20}\u{3d}\u{20}\u{31}\u{30}\u{20}\u{2b}\u{20}\u{a}\u{32}\u{33}\u{3b}\u{20}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{20}\u{3d}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{29}\u{20}\u{78}\u{20}\u{3d}\u{20}\u{27}\u{68}\u{69}\u{27}\u{20}\u{65}\u{6e}\u{64}\u{3b}\u{20}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{27}\u{0}\u{27}"
313−local function read1
314−(x)
315−local i = 0
316−return function ()
317−collectgarbage()
318−i=i + 1
319−return string.sub(x,i,i)
320−end
321−end
322−local function cannotload
323−(msg,a,b)
324−assert(not a and string.find(b,msg))
325−end
326−a=assert(load(read1(x),"\u{6d}\u{6f}\u{64}\u{6e}\u{61}\u{6d}\u{65}","\u{74}",_G))
327−assert(a() == "\u{0}" and _G.x == 33)
328−assert(debug.getinfo(a).source == "\u{6d}\u{6f}\u{64}\u{6e}\u{61}\u{6d}\u{65}")
329−cannotload("\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{20}\u{61}\u{20}\u{74}\u{65}\u{78}\u{74}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}",load(read1(x),"\u{6d}\u{6f}\u{64}\u{6e}\u{61}\u{6d}\u{65}","\u{62}",{}))
330−cannotload("\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{20}\u{61}\u{20}\u{74}\u{65}\u{78}\u{74}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}",load(x,"\u{6d}\u{6f}\u{64}\u{6e}\u{61}\u{6d}\u{65}","\u{62}"))
331−a=assert(load(function ()
332−return nil
333−end))
334−a()
335−assert(not load(function ()
336−return true
337−end))
338−local t = {nil,"\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}","\u{33}"}
339−f,msg=load(function ()
340−return table.remove(t,1)
341−end)
342−assert(f() == nil)
343−f=load(string.dump(function ()
344−return 1
345−end),nil,"\u{62}",{})
346−assert(type(f) == "\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}" and f() == 1)
347−do
348−local f = string.dump(function ()
349−return "\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}"
350−end)
351−f=load(read1(f))
352−assert(f() == "\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}\u{30}\u{31}\u{32}\u{33}\u{34}\u{35}\u{36}\u{37}\u{38}\u{39}")
353−end
354−x=string.dump(load("\u{78}\u{20}\u{3d}\u{20}\u{31}\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{78}"))
355−a=assert(load(read1(x),nil,"\u{62}"))
356−assert(a() == 1 and _G.x == 1)
357−cannotload("\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{20}\u{61}\u{20}\u{62}\u{69}\u{6e}\u{61}\u{72}\u{79}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}",load(read1(x),nil,"\u{74}"))
358−cannotload("\u{61}\u{74}\u{74}\u{65}\u{6d}\u{70}\u{74}\u{20}\u{74}\u{6f}\u{20}\u{6c}\u{6f}\u{61}\u{64}\u{20}\u{61}\u{20}\u{62}\u{69}\u{6e}\u{61}\u{72}\u{79}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}",load(x,nil,"\u{74}"))
359−_G.x=nil
360−assert(not pcall(string.dump,print))
361−cannotload("\u{75}\u{6e}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{73}\u{79}\u{6d}\u{62}\u{6f}\u{6c}",load(read1("\u{2a}\u{61}\u{20}\u{3d}\u{20}\u{31}\u{32}\u{33}")))
362−cannotload("\u{75}\u{6e}\u{65}\u{78}\u{70}\u{65}\u{63}\u{74}\u{65}\u{64}\u{20}\u{73}\u{79}\u{6d}\u{62}\u{6f}\u{6c}",load("\u{2a}\u{61}\u{20}\u{3d}\u{20}\u{31}\u{32}\u{33}"))
363−cannotload("\u{68}\u{68}\u{69}",load(function ()
364−error("\u{68}\u{68}\u{69}")
365−end))
366−assert(load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{5f}\u{45}\u{4e}\u{56}",nil,nil,123)() == 123)
367−local x
368−;
369−XX=123
370−local function h
371−()
372−local y = x
373−return XX
374−end
375−local d = string.dump(h)
376−x=load(d,"","\u{62}")
377−assert(debug.getupvalue(x,2) == "\u{5f}\u{45}\u{4e}\u{56}")
378−debug.setupvalue(x,2,_G)
379−assert(x() == 123)
380−assert(assert(load("\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{58}\u{58}\u{20}\u{2b}\u{20}\u{2e}\u{2e}\u{2e}",nil,nil,{["\u{58}\u{58}"] = 13}))(4) == 17)
381−XX=nil
382−x="\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{78}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{79}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{7a}\u{29}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{78}\u{2b}\u{79}\u{2b}\u{7a}\u{a}\u{20}\u{20}\u{20}\u{20}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{20}\u{65}\u{6e}\u{64}\u{a}\u{20}\u{20}\u{65}\u{6e}\u{64}\u{a}"
383−a=assert(load(read1(x),"\u{72}\u{65}\u{61}\u{64}","\u{74}"))
384−assert(a()(2)(3)(10) == 15)
385−x=string.dump(a)
386−a=assert(load(read1(x),"\u{72}\u{65}\u{61}\u{64}","\u{62}"))
387−assert(a()(2)(3)(10) == 15)
388−local a,b = 20,30
389−x=load(string.dump(function (x)
390−if x == "\u{73}\u{65}\u{74}" then
391−a=10 + b
392−;
393−b=b + 1
394−else
395−return a
396−end
397−end),"","\u{62}",nil)
398−assert(x() == nil)
399−assert(debug.setupvalue(x,1,"\u{68}\u{69}") == "\u{61}")
400−assert(x() == "\u{68}\u{69}")
401−assert(debug.setupvalue(x,2,13) == "\u{62}")
402−assert(not debug.setupvalue(x,3,10))
403−x("\u{73}\u{65}\u{74}")
404−assert(x() == 23)
405−x("\u{73}\u{65}\u{74}")
406−assert(x() == 24)
407−do
408−local nup = 200
409−local prog = {"\u{6c}\u{6f}\u{63}\u{61}\u{6c}\u{20}\u{61}\u{31}"}
410−for i = 2, nup
411−do
412−prog[# prog + 1]="\u{2c}\u{20}\u{61}" .. i
413−end
414−prog[# prog + 1]="\u{20}\u{3d}\u{20}\u{31}"
415−for i = 2, nup
416−do
417−prog[# prog + 1]="\u{2c}\u{20}" .. i
418−end
419−local sum = 1
420−prog[# prog + 1]="\u{3b}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{66}\u{75}\u{6e}\u{63}\u{74}\u{69}\u{6f}\u{6e}\u{20}\u{28}\u{29}\u{20}\u{72}\u{65}\u{74}\u{75}\u{72}\u{6e}\u{20}\u{61}\u{31}"
421−for i = 2, nup
422−do
423−prog[# prog + 1]="\u{20}\u{2b}\u{20}\u{61}" .. i
424−;
425−sum=sum + i
426−end
427−prog[# prog + 1]="\u{20}\u{65}\u{6e}\u{64}"
428−prog=table.concat(prog)
429−local f = assert(load(prog))()
430−assert(f() == sum)
431−f=load(string.dump(f))
432−local a = 10
433−local h = function ()
434−return a
435−end
436−for i = 1, nup
437−do
438−debug.upvaluejoin(f,i,h,1)
439−end
440−assert(f() == 10 * nup)
441−end
442−do
443−local t = {["\u{78}"] = 1}
444−function t:_012345678901234567890123456789012345678901234567890123456789()
445−return self.x
446−end
447−assert(t:_012345678901234567890123456789012345678901234567890123456789() == 1)
448−end
449−assert((function ()
450−return nil
451−end)(4) == nil)
452−assert((function ()
453−local a
454−;
455−return a
456−end)(4) == nil)
457−assert((function (a)
458−return a
459−end)() == nil)
460−print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{62}\u{69}\u{6e}\u{61}\u{72}\u{79}\u{20}\u{63}\u{68}\u{75}\u{6e}\u{6b}\u{73}")
461−do
462−local header = string.pack("\u{63}\u{34}\u{42}\u{42}\u{63}\u{36}\u{42}\u{42}\u{42}","\u{1b}\u{4c}\u{75}\u{61}",84,0,"\u{19}\u{93}\u{d}\u{a}\u{1a}\u{a}",4,string.packsize("\u{6a}"),string.packsize("\u{6e}"))
463−local c = string.dump(function ()
464−local a = 1
465−;
466−local b = 3
467−;
468−local f = function ()
469−return a + b + _ENV.c
470−end
471−local s1 = "\u{61}\u{20}\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{61}\u{6e}\u{74}"
472−local s2 = "\u{61}\u{6e}\u{6f}\u{74}\u{68}\u{65}\u{72}\u{20}\u{63}\u{6f}\u{6e}\u{73}\u{74}\u{61}\u{6e}\u{74}"
473−return a + b * 3
474−end)
475−assert(assert(load(c))() == 10)
476−assert(string.sub(c,1,# header) == header)
477−local ci,cn = string.unpack("\u{6a}\u{6e}",c,# header + 1)
478−assert(ci == 22136 and cn == 370.5)
479−for i = 1, # header
480−do
481−local s = string.sub(c,1,i - 1) .. string.char(string.byte(string.sub(c,i,i)) + 1) .. string.sub(c,i + 1,- 1)
482−assert(# s == # c)
483−assert(not load(s))
484−end
485−for i = 1, # c - 1
486−do
487−local st,msg = load(string.sub(c,1,i))
488−assert(not st and string.find(msg,"\u{74}\u{72}\u{75}\u{6e}\u{63}\u{61}\u{74}\u{65}\u{64}"))
489−end
490−end
491−print("\u{4f}\u{4b}")
492−return deep
zod/luau/res/lua/cycled/closure.luadeleted−327
@@ -1,327 +0,0 @@
1−print("\u{74}\u{65}\u{73}\u{74}\u{69}\u{6e}\u{67}\u{20}\u{63}\u{6c}\u{6f}\u{73}\u{75}\u{72}\u{65}\u{73}")
2−local A,B = 0,{["\u{67}"] = 10}
3−local function f
4−(x)
5−local a = {}
6−for i = 1, 1000
7−do
8−local y = 0
9−do
10−a[i]=function ()
11−B.g=B.g + 1
12−;
13−y=y + x
14−;
15−return y + A
16−end
17−end
18−end
19−local dummy = function ()
20−return a[A]
21−end
22−collectgarbage()
23−A=1
24−;
25−assert(dummy() == a[1])
26−;
27−A=0
28−;
29−assert(a[1]() == x)
30−assert(a[3]() == x)
31−collectgarbage()
32−assert(B.g == 12)
33−return a
34−end
35−local a = f(10)
36−local x = {[1] = {}}
37−setmetatable(x,{["\u{5f}\u{5f}\u{6d}\u{6f}\u{64}\u{65}"] = "\u{6b}\u{76}"})
38−while x[1] do
39−local a = A .. A .. A .. A
40−A=A + 1
41−end
42−assert(a[1]() == 20 + A)
43−assert(a[1]() == 30 + A)
44−assert(a[2]() == 10 + A)
45−collectgarbage()
46−assert(a[2]() == 20 + A)
47−assert(a[2]() == 30 + A)
48−assert(a[3]() == 20 + A)
49−assert(a[8]() == 10 + A)
50−assert(getmetatable(x).__mode == "\u{6b}\u{76}")
51−assert(B.g == 19)
52−a={}
53−for i = 1, 5
54−do
55−a[i]=function (x)
56−return i + a + _ENV
57−end
58−end
59−assert(a[3] ~= a[4] and a[4] ~= a[5])
60−do
61−local a = function (x)
62−return math.sin(_ENV[x])
63−end
64−local function f
65−()
66−return a
67−end
68−assert(f() == f())
69−end
70−a={}
71−for i = 1, 10
72−do
73−a[i]={["\u{73}\u{65}\u{74}"] = function (x)
74−i=x
75−end,["\u{67}\u{65}\u{74}"] = function ()
76−return i
77−end}
78−if i == 3 then
79−break
80−end
81−end
82−assert(a[4] == undef)
83−a[1].set(10)
84−assert(a[2].get() == 2)
85−a[2].set("\u{61}")
86−assert(a[3].get() == 3)
87−assert(a[2].get() == "\u{61}")
88−a={}
89−local t = {"\u{61}","\u{62}"}
90−for i = 1, # t
91−do
92−local k = t[i]
93−a[i]={["\u{73}\u{65}\u{74}"] = function (x,y)
94−i=x
95−;
96−k=y
97−end,["\u{67}\u{65}\u{74}"] = function ()
98−return i,k
99−end}
100−if i == 2 then
101−break
102−end
103−end
104−a[1].set(10,20)
105−local r,s = a[2].get()
106−assert(r == 2 and s == "\u{62}")
107−r,s=a[1].get()
108−assert(r == 10 and s == 20)
109−a[2].set("\u{61}","\u{62}")
110−r,s=a[2].get()
111−assert(r == "\u{61}" and s == "\u{62}")
112−local f
113−for i = 1, 3
114−do
115−f=function ()
116−return i
117−end
118−break
119−end
120−assert(f() == 1)
121−for k = 1, # t
122−do
123−local v = t[k]
124−f=function ()
125−return k,v
126−end
127−break
128−end
129−assert(({f()})[1] == 1)
130−assert(({f()})[2] == "\u{61}")
131−local b
132−function f(x)
133−local first = 1
134−while 1 do
135−if x == 3 and not first then
136−return
137−end
138−local a = "\u{78}\u{75}\u{78}\u{75}"
139−b=function (op,y)
140−if op == "\u{73}\u{65}\u{74}" then
141−a=x + y
142−else
143−return a
144−end
145−end
146−if x == 1 then
147−do
148−break
149−end
150−elseif x == 2 then
151−return
152−else
153−if x ~= 3 then
154−error()
155−end
156−end
157−first=nil
158−end
159−end
160−for i = 1, 3
161−do
162−f(i)
163−assert(b("\u{67}\u{65}\u{74}") == "\u{78}\u{75}\u{78}\u{75}")
164−b("\u{73}\u{65}\u{74}",10)
165−;
166−assert(b("\u{67}\u{65}\u{74}") == 10 + i)
167−b=nil
168−end
169−pcall(f,4)
170−;
171−assert(b("\u{67}\u{65}\u{74}") == "\u{78}\u{75}\u{78}\u{75}")
172−b("\u{73}\u{65}\u{74}",10)
173−;
174−assert(b("\u{67}\u{65}\u{74}") == 14)
175−local y,w
176−function f(x)
177−return function (y)
178−return function (z)
179−return w + x + y + z
180−end
181−end
182−end
183−y=f(10)
184−w=1.345
185−assert(y(20)(30) == 60 + w)
186−do
187−local X,Y
188−local a = math.sin(0)
189−while a do
190−local b = 10
191−X=function ()
192−return b
193−end
194−if a then
195−break
196−end
197−end
198−do
199−local b = 20
200−Y=function ()
201−return b
202−end
203−end
204−assert(X() == 10 and Y() == 20)
205−end
206−local a = {}
207−local i = 1
208−repeat
209−local x = i
210−a[i]=function ()
211−i=x + 1
212−;
213−return x
214−end
215−until i > 10 or a[i]() ~= x
216−assert(i == 11 and a[1]() == 1 and a[3]() == 3 and i == 4)
217−a={}
218−for i = 1, 10
219−do
220−if i % 3 == 0 then
221−local y = 0
222−a[i]=function (x)
223−local t = y
224−;
225−y=x
226−;
227−return t
228−end
229−elseif i % 3 == 1 then
230−goto L1
231−error("\u{6e}\u{6f}\u{74}\u{20}\u{68}\u{65}\u{72}\u{65}")
232−::L1::
233−local y = 1
234−a[i]=function (x)
235−local t = y
236−;
237−y=x
238−;
239−return t
240−end
241−elseif i % 3 == 2 then
242−local t
243−goto l4
244−::l4a::
245−a[i]=t
246−;
247−goto l4b
248−error("\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{6e}\u{65}\u{76}\u{65}\u{72}\u{20}\u{62}\u{65}\u{20}\u{68}\u{65}\u{72}\u{65}\u{21}")
249−::l4::
250−local y = 2
251−t=function (x)
252−local t = y
253−;
254−y=x
255−;
256−return t
257−end
258−goto l4a
259−error("\u{73}\u{68}\u{6f}\u{75}\u{6c}\u{64}\u{20}\u{6e}\u{65}\u{76}\u{65}\u{72}\u{20}\u{62}\u{65}\u{20}\u{68}\u{65}\u{72}\u{65}\u{21}")
260−::l4b::
261−end
262−end
263−for i = 1, 10
264−do
265−assert(a[i](i * 10) == i % 3 and a[i]() == i * 10)
266−end
267−print("\u{2b}")
268−local function t
269−()
270−local function c
271−(a,b)
272−assert(a == "\u{74}\u{65}\u{73}\u{74}" and b == "\u{4f}\u{4b}")
273−end
274−local function v
275−(f, ...)
276−c("\u{74}\u{65}\u{73}\u{74}",f() ~= 1 and "\u{46}\u{41}\u{49}\u{4c}\u{45}\u{44}" or "\u{4f}\u{4b}")
277−end
278−local x = 1
279−return v(function ()
280−return x
281−end)
282−end
283−t()
284−local debug = require("\u{64}\u{65}\u{62}\u{75}\u{67}")
285−local foo1,foo2,foo3
286−do
287−local a,b,c = 3,5,7
288−foo1=function ()
289−return a + b
290−end
291−;
292−foo2=function ()
293−return b + a
294−end
295−;
296−do
297−local a = 10
298−foo3=function ()
299−return a + b
300−end
301−;
302−end
303−end
304−assert(debug.upvalueid(foo1,1))
305−assert(debug.upvalueid(foo1,2))
306−assert(not debug.upvalueid(foo1,3))
307−assert(debug.upvalueid(foo1,1) == debug.upvalueid(foo2,2))
308−assert(debug.upvalueid(foo1,2) == debug.upvalueid(foo2,1))
309−assert(debug.upvalueid(foo3,1))
310−assert(debug.upvalueid(foo1,1) ~= debug.upvalueid(foo3,1))
311−assert(debug.upvalueid(foo1,2) == debug.upvalueid(foo3,2))
312−assert(debug.upvalueid(string.gmatch("\u{78}","\u{78}"),1) ~= nil)
313−assert(foo1() == 3 + 5 and foo2() == 5 + 3)
314−debug.upvaluejoin(foo1,2,foo2,2)
315−assert(foo1() == 3 + 3 and foo2() == 5 + 3)
316−assert(foo3() == 10 + 5)
317−debug.upvaluejoin(foo3,2,foo2,1)
318−assert(foo3() == 10 + 5)
319−debug.upvaluejoin(foo3,2,foo2,2)
320−assert(foo3() == 10 + 3)
321−assert(not pcall(debug.upvaluejoin,foo1,3,foo2,1))
322−assert(not pcall(debug.upvaluejoin,foo1,1,foo2,3))
323−assert(not pcall(debug.upvaluejoin,foo1,0,foo2,1))
324−assert(not pcall(debug.upvaluejoin,print,1,foo2,1))
325−assert(not pcall(debug.upvaluejoin,{},1,foo2,1))
326−assert(not pcall(debug.upvaluejoin,foo1,1,print,1))
327−print("\u{4f}\u{4b}")
zod/luau/res/lua/cycled/events.luadeleted−610

This diff is too big to show here.

zod/luau/res/lua/cycled/foo.luadeleted−82

This diff is too big to show here.

zod/luau/res/lua/cycled/gengc.luadeleted−108

This diff is too big to show here.

zod/luau/res/lua/cycled/math.luadeleted−879

This diff is too big to show here.

zod/luau/res/lua/cycled/nextvar.luadeleted−1055

This diff is too big to show here.

zod/luau/res/lua/cycled/pm.luadeleted−404

This diff is too big to show here.

zod/luau/res/lua/cycled/strings.luadeleted−441

This diff is too big to show here.

zod/luau/res/lua/cycled/tpack.luadeleted−259

This diff is too big to show here.

zod/luau/res/lua/cycled/utf8.luadeleted−203

This diff is too big to show here.

zod/luau/res/lua/cycled/vararg.luadeleted−137

This diff is too big to show here.

zod/luau/tmp.hoondeleted−9

This diff is too big to show here.