23c23,25
< KS = (0 .. 9).to_a.join + ?- # * '' higokan mruby 70410200 # ?0.upto # higokan mruby 70410200 # 7221410200 6ccae658 suzukaze # q
---
> # KS = (0 .. 9).to_a.join + ?- # * '' higokan mruby 70410200 # ?0.upto # higokan mruby 70410200 # 7221410200 6ccae658 suzukaze # q
> # Ks = (0 .. 9).to_a.join + ?- # * '' higokan mruby 70410200 # ?0.upto # higokan mruby 70410200 # 7221410200 6ccae658 suzukaze # q
> @@ks = nil
32,35d33
< # if v == vs = v.to_s
< # ?t == k # String # q
< # else
< # ! ! case k
37,39c35,36
< ! ! case k = k.to_s[1]
< # when ?r # , Array # q
< # '[]' == vs[0] + vs[-1]
---
> # ! ! case k = k.to_s[1]
> case k = k.to_s[1]
42c39,43
< s = KS + ?i == k ? '' : ?. # Fixnum # q 2
---
> # s = KS + ?i == k ? '' : ?. # Fixnum # q 2
> # s = Ks + ?i == k ? '' : ?. # Fixnum # q 2
> s = ( # Fixnum
> @@ks |= (0 .. 9).to_a.join + ?- # * '' higokan mruby 70410200 # ?0.upto # higokan mruby 70410200 # 7221410200 6ccae658 suzukaze # q
> ) + ?i == k ? '' : ?. # q 2
45d45
< end
46a47
> end.!.!
99a101,102
> # @@slp = 10 # conf.gem :github => 'kimushu/mruby-sleep' # msleep usleep
> # @@slp = 100 # nsleep # hayai masin
101a105
> # (r - 1).times {usleep 0}; GC.start; r.times {usleep t} # conf.gem :github => 'kimushu/mruby-sleep' # msleep usleep
191d194
< # @fml.call(lb).assoc(sym)
205,206c208,209
< # knid(op[0], 'Numeric') ? op.inject(:+) : self.send(*op)
< knid(op[0], :Numeric) ? op.inject(:+) : self.send(*op)
---
> # knid(op[0], :Numeric) ? op.inject(:+) : self.send(*op)
> case op[0] when Numeric then op.inject(:+) else self.send(*op) end
232,233d234
< # @@idx = Hash.new
<
237d237
< # @@idx = []
260c260
< # 3080410200 : 5x2 ok ( gc ) : monami-ya.mrb 8270410200 813e2af8 #
www.monami-ya.jp
---
> # 3080410200 : 5x2 ok ( gc ) : monami-ya.mrb 8270410200 813e2af8 #
http://www.monami-ya.jp/
272a273
> # f.close # ?
278c279
< # [yield(a), f.close, @m.unlock][0]
---
> # [yield(a), @m.unlock][0]
319c320
< n + (t > n ? 1 : 0)
---
> # n + (t > n ? 1 : 0)
325a327,328
> # n + ((t <=> n) + 1 >> 1)
> n - ((n <=> t) >> 1)
367d369
< # ctr != cto ? cto_s(ctr) : -ctr
386d387
< # pl_es('cto', cto)
402a404
> # bfsz = (a = [case th when Array then true end.!.!, [] == th]).size # t
406,407c408,409
< # (bf = 1).step(bfsz - 1) { bf |= bf << 1}
< bf = 2 ** bfsz - 1 # kakezan
---
> # bf = 2 ** bfsz - 1 # kakezan
> bf = (1 << bfsz) - 1
413d414
< # 0 == lf ? break : md &= bf if 0 == lf >> bfsz
420c421
< # ([] == a || ! knid(a, :Array)) && return(a) # t # higokan mruby70410200 monami-ya.mrb60510200
---
> # ([] == a || ! knid(a, :Array)) && return(a) # t # higokan mruby70410200 monami-ya.mrb60510200
421a423
> # ([] == a || case a when Array then true end.!) && (return a) # t
426c428,429
< knid(v, :Array) ? st_id(v, pc) : v
---
> # knid(v, :Array) ? st_id(v, pc) : v
> case v when Array then st_id(v, pc) else v end
432,434c435,439
< a.inject { |opc, op|
< #print "#{pc.to_xeh} #{opc} #{op.to_xeh}\n" if ! knid(opc, 'Numeric')
< print "#{pc.to_xeh} #{opc} #{op.to_xeh}\n" if ! knid(opc, :Numeric)
---
> # a.inject { |opc, op|
> opc, op = a
> #print "#{pc.to_xeh} #{opc} #{op.to_xeh}\n" if ! knid(opc, :Numeric)
> case opc when Numeric then else
> print "#{pc.to_xeh} #{opc} #{op.to_xeh}\n" end
437c442
< }
---
> # }
451,452c456
< th[idx] = st_id(th[idx], pc - 1) ;
< #### th[idx] = st_id(th[idx], pc - 1) if ckth(th[idx], 0) # fuguai taisaku
---
> th[idx] = st_id(th[idx], pc - 1)
456d459
< #### if f = (th[idx].nil?.! && ckth(th[mx], 3)) # fuguai taisaku
464c467,468
< idx += f && idx < mx ? 1 : 0
---
> idx += f || idx < mx ? 1 : 0 ##
> #### idx += f && idx < mx ? 1 : 0 # fuguai taisaku ##
502,549d505
< #module M__Pary
< # def initialize(*a)
< # @a = a.shift
< # @i = (a[-1] || 0)
< # end
< #
< # def pg
< # @i
< # end
< #
< # def ps(i = @i)
< # @i = i
< # end
< #
< # def []=(i, v)
< # @a[ipt(i)] = v
< # end
< #
< # def [](i)
< # @a[ipt(i)]
< # end
< #
< ## private
< #
< # def ipt(i)
< # @i + ((i + i.abs) >> 1)
< # end
< #end
< #
< #class Pary
< # include M__Pary
< #end
<
< #module M__Sgp
< ## def initialize(i = 0)
< ### self = i
< ## super
< ## end
< #
< # def ipt(i)
< # self + ((i + i.abs) >> 1)
< # end
< #end
< #
< #class Sgp < Fixnum # Numeric
< # include M__Sgp
< #end
<
552c508
< # @@m = Mutex.new
---
> @@m = Mutex.new
558,561c514,517
< # @@m.lock
< # s = @s
< # @@m.unlock
< # s
---
> @@m.lock
> s = @s
> @@m.unlock
> s
572,574c528,530
< # @@m.lock
< # s = @s
< # @@m.unlock
---
> @@m.lock
> s = @s
> @@m.unlock
577,579c533
< # s[@p + a[0].sgp]
< @s[@p + a[0].sgp]
< # [mloc, @s[@p + a[0].sgp], @@m.unlock][1]
---
> s[@p + a[0].sgp]
583c537
< # @@m.lock
---
> @@m.lock
586,590c540,542
< # a = @s[@p + a[0].sgp] = a[1]
< # @@m.unlock
< # a
< @s[@p + a[0].sgp] = a[1]
< # [mloc, @s[@p + a[0].sgp] = a[1], @@m.unlock][1]
---
> a = @s[@p + a[0].sgp] = a[1]
> @@m.unlock
> a
592,595d543
<
< # def mloc
< # begin @@m.lock; rescue Slp.new.slp(0); retry end
< # end
604d551
< # def initialize(k, *a)
631,632d577
< # def []=(k, i, v)
< # def []=(*a)
708d652
< # f = r.map { |v| lpl.ckth(v, 1)}
710d653
< # r[1] = r[-1]; f[1] = f[-1]
713,714c656
< r = r.map { |v| [v[0], v[-1]]}
< # [pl[lpl.affil('sym', ?i)].to_sym, r, f] # q
---
> r.map! { |v| [v[0], v[-1]]}
726c668
< i_th = lpl.affil('th', ?i) # q
---
> # i_th = lpl.affil('th', ?i) # q
730d671
< # s = Stack.new; sp = nil; plr = nil
736d676
< # sp, isr0, r0, r1, lm, pr, sy = nil
741,744c681,684
< # wd = 7
< # ap = 0xf - 1; ap = (ap << wd) + (ap << (wd - 2)) + (1 << (wd - 1)) >> wd
< wd = 2
< ap = 0xf - 1; ap = (ap << wd) + ap + (1 << (wd - 1)) >> wd
---
> # wd = 2
> # ap = 0xf - 1; ap = (ap << wd) + ap + (1 << (wd - 1)) >> wd
> wd = 4; ap = (1 << wd) - 1 - 1
> wd -= 2; ap = (ap << wd) + ap + (1 << (wd - 1)) >> wd
751,752d690
< # r00 = (plr[r1] if 0 <= wd && r1 <= wd) || lm.(isr0, r1) # c
< # s[r1] = sy ? [s[r1], r00].inject(sy) : r00
758d695
< # wd.step(wd + ap = (ap >> 1) + (ap >> 2)) { |n| plr<< lm.(isr0, s[n])} # p c
778c715,716
< ca[flg.inject(0) { |rv, v| rv <<= 1; rv |= v ? 0 : 1}].call
---
> # ca[flg.inject(0) { |rv, v| rv <<= 1; rv |= v ? 0 : 1}].call
> ca[flg.inject(0) { |rv, v| rv = v ? 0 : 1 | rv << 1}].call
789d726
< # def iset(sym, cop, sp, pc) ##
791d727
< # pc, sp, cop, sym = [rg.assoc('pc')[1], rg.assoc('sp')[1], rg.assoc('cop')[1], rg.assoc('sym')[1]]
807c743,744
< ta = ->(l) { [l.shift || 'getarg_a', l.shift || cop][0 .. l[-1] || 1] } # l
---
> ta = ->(ta) { [ta.shift || 'getarg_a', ta.shift || cop][0 .. ta.pop || 1] } # l
>
812,817c749,757
< fvl = ->(oi) {[ # l
< -> {[fv[oi] = th[oi] = (ta.(fv[oi])), []]}, # l c
< -> {th += [[fv[oi] && ta.(fv[oi])], []][ # l c
< # (oi <=> wd = fv.width) + 1 >> 1]}][oi <=> 0].call # .lazy
< ((wd = fv.width) <=> oi) >> 1]}][oi <=> 0].call # .lazy
< }
---
> # fvl = ->(oi) {[ # l
> # -> {[fv[oi] = th[oi] = (ta.(fv[oi])), []]}, # l c
> # -> {th += [[fv[oi] && ta.(fv[oi])], []][ # l c
> # ((wd = fv.width) <=> oi) >> 1]}][oi <=> 0].call # .lazy
> # }
> fvl = [->(oi) {[fv[oi] = th[oi] = (ta.(fv[oi])), []]}, # l c
> ->(oi) {th += [[fv[oi] && ta.(fv[oi])], []][ # l c
> ((wd = fv.width) <=> oi) >> 1]}] # .lazy
>
824,827d763
< # if 'th' == k
< # fv = [-> {[fv[oi] = th[oi] = (ta.(fv[oi])), []]}, # l c
< # -> {th += [[fv[oi] && ta.(fv[oi])], []][ # l c
< # (oi <=> wd = fv.width) + 1 >> 1]}][oi <=> 0].call # .lazy
829c765,766
< when 'th' then fv = fvl.(oi) # c
---
> # when 'th' then fv = fvl.(oi) # c
> when 'th' then fv = fvl[oi <=> 0].(oi) # c
838c775,776
< k_sp_r = pla.assoc('sp')[1]
---
> # k_sp_r = pla.assoc('sp')[1]
> k_sp = pla.assoc('sp')[1]
842c780,781
< opa.push(k_sp_r, [sp]) if 0 == thi
---
> # opa.push(k_sp_r, [sp]) if 0 == thi
> opa.push(k_sp, [sp]) if 0 == thi
849a789
> # pl.pl_es(pc1, ['sym', 'th', k_sp].flat_map { |o| [o]<< ops.shift}) # p
877,878d816
< # rg = [['ctr', 1], ['thi', 0], ['pc', @pc], ['sp', @sp], ['cop'], ['sym']]
<
891,916d828
<
< # rga = ->(*a) { # l
< # msd, indx, k = a
< # v = a[-1] if 3 < (sz = a.size)
< # case msd
< # when 'as'
< # indx = rg.assoc('ctr')[1] if nil == indx
< # break if 3 > sz
< # rg.assoc(k)[indx] = v if 3 < sz
< # rg.assoc(k)[indx]
< # when 'push'
< # rg.assoc(k)<< v # p
< # when 'ctrg'
< # rg.assoc('ctr')[1]
< # when 'ctrs'
< # rg.assoc('ctr')[1] = indx if nil != indx
< # when 'ctra'
< # rg.assoc('ctr')[1] *= -1 # kakezan
< # when 'next'
< # rg.assoc('pc')[-1] += 1
< # rg.assoc('pc').delete_at(1)
< # rg.assoc('pc')[1]
< # end
< # }
< # rgas = ->(*a) {rga.('as', nil, *a)} # l # c
<
921d832
< # if 1 > rgas.('thi') # c
923d833
< # if 0 > rga.('ctrg') # c
926d835
< # rga.('ctra') # c
930d838
< # @stack.sp(rgas.('sp', @sp)) # + 0 # c
941d848
< # print "#{rg.assoc('pc')[rg.assoc('ctr')[1]].to_xeh} #{rg.assoc('sym')[rg.assoc('ctr')[1]]} #{rg.assoc('cop')[rg.assoc('ctr')[1]].to_xeh}\n"
962d868
< # [true][rgas.('thi', ise.resume)] && ise = nil ##
966d871
< # rga.('push', nil, 'pc', rg['pc']) if 0 == rg['thi'] # c ##
973d877
< # rga.('ctra') # c
991d894
< # rga.('as', -1, 'pc', rg['pc']) + imem.getarg_sbx(rg['cop']) - 1) # c
998d900
< # if @stack[imem.getarg_a(rgas.('cop'))] then # c
1002d903
< # rga.('as', -1, 'pc', rg['pc'] + imem.getarg_sbx(rg['cop']) - 1) # c
1011d911
< # if !@stack[imem.getarg_a(rgas.('cop'))] then # c
1015d914
< # rga.('as', -1, 'pc', rg['pc']) + imem.getarg_sbx(rgas.('cop')) - 1) # c
1022d920
< # rga.('as', -1, 'pc', rg['pc']) # c
1048a947
>
1050d948
< # rgas.('sp', rgas.('sp') + a) # c 2
1055d952
< # rga.('as', -1, 'pc', -1) # c
1079d975
< # return @stack[imem.getarg_a(rg.assoc('cop')[1])]
1084d979
< # @stack[0] = @stack[imem.getarg_a(rgas.('cop'))] # c
1094d988
< # rga.('as', -1, 'pc', @callinfo[@cp]) # - 1 # c
1108d1001
< # if [true][rgas.('thi')] # c
1114,1115d1006
< # @pc = rg.assoc('pc')[1] + 1
< # rg.assoc('pc')[-1] += 1
1117d1007
< # rg.assoc('pc').delete_at(1)
1120d1009
< # @pc = rg.assoc('pc')[1]
1123,1124d1011
< # @pc = rga.('next') # c
< # rg.assoc('ctr')[1] *= -1 # kakezan