./include/mrbconf.h ( d17506c / not monami-ya.mrb )

43d



./build/mrbgems/mruby-meta-circular-heiretu/mrblib/irep.rb ( both : monami-ya.mrb , d17506c )

44,47c
#    ?i != m ? self[m.afl(      k, ?i)] : self[0].index(self[0].assoc(k))       # q 2 
    ?i != m ? self[m.afl(       k, ?i)] : (s = self[0]).index(s.assoc(k))       # self.index(idx)       # q 2 
#   ?i != m ? self[m.afl(       k, ?i)] : loop {(s = self[0]).index(s.assoc(k) && break)}       # self.index(idx)       # fuguai taisaku        # q 2 
.
35d



mruby-meta-circular-heiretu/sample/jit-1.rb

1469c
        fis[1].resume(0 > fis[0] ? -1 : n)           # cp 
.
1465,1467c
#      ise[i_i_d].reject!.with_index { |fis, n|
#     ise[i_i_d].reject_c!(ts) { |fis, n|
      ise[i_i_d].delif_c(ts) { |fis, n|
#       0 > fis[0] && n = -1                         # cp 
.
1452a
#     ise[i_i_s].reject_c!(ts) { |pfl, n|
.
1433c
      if 0 <= rg.p
.
1422c
        rg.p = rg.p.abs
.
1402c
          rg.p = -rg.p
.
1399d
1393,1394d
1390c
                0 <= rg.p
.
1383,1384c
      if pco.pop || 0 <= rg.p
.
1381a
#      0.step(0) { |n|
#       ise[i_i_f].delete_at(n) && redo if ise[i_i_f][n] && ise[i_i_f][n].resume(n) && 0 == n

#      }

.
1367,1369c
#      ise[i_i_s]<< [0 > rg['ctr', 1] ? -rg['pc'] : rg['pc'], rg.to_ra]        # p     # cp 
      ise[i_i_s]<< [0 > rg.p ? -pcl : pcl, Rg.new(rg.to_ra)]           # p     # cp 
#     ise[i_i_s]<< [0 > rg['ctr', 1] ? -pcl : pcl, rg.ss(po)]          # p     # cp 
.
1351,1352c
#       pcf = pfl[0]
#       if 0 > pcf
        if 0 > pcf = pfl[0]
.
1342d
1330c
      if 0 > rg.p
.
1315d
1276c
#      cop, sym = rg['cop'], rg['sym']
      cop, sym = rg.to_ra('cop', 'sym')
.
1272a
      rg['pc', -1] = rg['pc'] + rou.getarg_sbx(cop)
.
1264,1270c
##      if !@stack[@sp + getarg_a(cop)] then
#       if !stack[rou.getarg_a(cop)]
##        @pc = @pc + getarg_sbx(cop)
##        pc = pc + lpl.getarg_sbx(cop) - 1
#         rg['pc', -1] = rg['pc'] + rou.getarg_sbx(cop)
##        next
#       end
        ! stack[rou.getarg_a(cop)] || next
.
1260c
#       end
        stack[rou.getarg_a(cop)] || next
.
1254,1258c
##      if @stack[@sp + getarg_a(cop)] then
#       if stack[rou.getarg_a(cop)]
##        @pc = @pc + getarg_sbx(cop)
##        pc = pc + lpl.getarg_sbx(cop) - 1
#         rg['pc', -1] = rg['pc'] + rou.getarg_sbx(cop)
.
1248,1251c
##      @pc = @pc + getarg_sbx(cop)
##      pc = pc + lpl.getarg_sbx(cop) - 1
#       rg['pc', -1] = rg['pc'] + rou.getarg_sbx(cop)
##      next
.
1235d
1206,1207c
#       ri ||= (true == fb || true == fb.resume && fb = true)
        ri ||= true == fb || (true == fb.resume && fb = true)
.
1198d
1196c
#    rg = Rg.new(*rg)
.
1093,1118d
1089c
#    cop, sym = rg['cop'], rg['sym']
    cop, sym = rg.to_ra('cop', 'sym')
.
1079,1080c
#       end while [true][thi]   # fuantei ? mruby:70410200 monami-ya.mrb:60510200
        break if 0 != thi }
.
1075,1076c
#       begin                   # fuantei ? mruby:70410200 monami-ya.mrb:60510200
        loop {
.
1068,1073c
#       opa = opg.(thi).push('ctr', [sp])       # c 
#
#       pl.pl_es(pc1, opa)

        pl.pl_es(pc1, opg.(thi).push('ctr', [sp]))      # c 

#       pl.ctr_s(pc1) if 0 == thi
#
#       (0 != thi && ht <= thi) ? thi = 0 : thi += 1

        if 0 == thi
          pl.ctr_s(pc1)
        elsif ht <= thi
          thi = -1
        end
        thi += 1
.
1047,1057c
#         if 'th' == k
#           if 0 == oi
#             fv = [thl[oi], ta.(fv[oi]), thl[oi + 1], []]              # c 
#           else
#             fv = (fv[oi] = ta.(fv[oi]) if oi <= ht = fv.hgt) ?     # c 
#               [thl[oi], fv[oi]] : []
#           end
          case k
          when 'th'
            fv = [
                -> {[thl[oi], ta.(fv[oi]), thl[oi + 1], []]},                # c 
                -> {(fv[oi] = ta.(fv[oi]) if oi <= ht = fv.hgt) ? # c 
                        [thl[oi], fv[oi]] : []}
            ][oi <=> 0].call
#         else 
          else lopa<< k           # p 
.
1020d
1014d
1001d
996a

        1 < m && m = fy.(m, false)   # c 

.
995a
          2 < m && m = fy.(m, false) # c 
#         [2 < m && m = fy.(m, false)]       # c 
.
983,984d
980d
959,962c
        0 == s.size ? @Slp.slp(0) : plr += lm.(         # c 
                s[sz .. sz + (ap = (ap += ap >> 1) >> 1)]) # + (ap <=> 0)])
#               [(s + [nil])[sz .. 1 + sz + ap -= ap >> 2]])
.
947,948c
    lm = ->(r1) {r1.nil? ? r1 : imem.send(pr, *isr0, r1, mt)}        # l 
#   lm = ->(r1) {imem.send(pr, *isr0, r1, mt)}                       # l 
#   lm = ->(r1) {r1.empty? ? r1 : imem.send(pr, *isr0, r1, mt)}      # l 
#   lm = ->(r1) {[1 < r1.size, r1 = r1[0 .. -2]][0] ?
#                               imem.send(pr, *isr0, r1, mt) : r1}      # l 
.
943,944c

#      ap = 1 << sz = 3
#      ap = ((ap += (ap <<= 1) + (ap <<= 2) + (ap << 2)) >> sz) + 1 >> 1
      sz = nil; ap = @@fls_m
.
935d
933a
#     sp, sz, isr0, r0, r1, lm, sy = []         # higokan ? mruby 70410200
.
929,930d
925d
916a
#  @@fls_w = 4; @@fls_m = (1 << @@fls_w) - 1 - 1
#  @@fls_w -= 2
#  @@fls_m = ((@@fls_m << @@fls_w) + @@fls_m >> @@fls_w - 1) + 1 >> 1
#  @@fls_w = nil

  @@fls_m = 1 << @@fls_w = 3; @@fls_m = (
    (@@fls_m += (@@fls_m <<= 1) + (@@fls_m <<= 2) + (@@fls_m << 2)) >> @@fls_w
        ) + 1 >> 1
  @@fls_w = nil
.
912,914c
#    [pl[lpl.afl('sym', ?i)].to_sym,            # q 
#       r, r.map { |v| lpl.ckth(v, 1)}]
    [pl[lpl.afl('sym', ?i)].to_sym, r, r.map { |v| lpl.ckth(v, 1)}]     # q 
.
901,905c
    r = [pl[lpl.afl(thl[0], ?i)]]               # q 
#    r = [pl[lpl.afl(thl[0], ?i)], []]          # q     # t 
#    r1 = pl[lpl.afl(thl[1], ?i)]               # q 
#    r[1] = r1 if knid(pl[lpl.afl('ctr', ?i)][0], :Array) && lpl.ckth(r1, 3)    # p     # q 
    r[1] = knid(pl[lpl.afl('ctr', ?i)][0], :Array) &&           # q 
      lpl.ckth(pl[lpl.afl(thl[1], ?i)], 3) ?                    # q 
        pl[lpl.afl(thl[1], ?i)] : []                            # q     # t 

.
879d
872c
    # 3080410200 : 5x2 ok ( gc ) : monami-ya.mrb 8270410200 813e2af8    # www.monami-ya.jp
.
866d
847a
    @rmt = wkth
.
843,845d
832,837d
812d
785,787c
# def pg
#   @p
# end
.
781,783c
# def ps(i)
#   @p = i
# end
.
746,755d
742,743c
  def to_ra(*a)
    if a.empty?
      @a.map { |v| v.dup}
    else
      a.map { |v| self[v]}
    end
.
719a
  attr_accessor :p

.
621d
594,595c
        sl.slp 0
        Fiber.yield(flg || mx < thi)

#       th[idx] = pl_eg(pc, thl[idx]) if mx >= idx && ckth(th[idx], 2)
        ckth(th[idx], 2) && th[idx] = pl_eg(pc, thl[idx])

#       th[idx] = s_id(th[idx], pc - 1) if mx >= idx
##      if ckth(th[mx], 1) || ji_ngq
##      if ckth(th[mx], 1) || ckth(pl_eg(pc, 'ctr'), 0) # sp [sp]
#       if ckth(th[mx], 1) || kt.call           # c     # sp [sp]
##      unless arf = ckth(th[mx], 2)
##        th.each_index { |n| pl_es(pc, [thl[n], th[n]])}
#         th.each_with_index { |v, n|
##        th[0 .. idx].each_index { |n|
#           pl_es(pc, [thl[n], v])
##          break if (mx >= idx || ! ji_ngq)
#           ji_ngq || break
##          break if mx != idx
#         }
##        flg = true    ##
##        flg ||= ckth(th[mx], 1)
#         flg = mx <= idx && ji_ngq
#       end
#       sl.slp 0
#       Fiber.yield(flg && idx >= mx)        ##
#       idx += 1 unless arf = ckth(th[idx], 2)          # mx != idx ?   # ! kara ary
##      idx += 1 unless arf = mx == idx ? arf : ckth(th[idx], 2)        # mx != idx ?
##      idx += 1 unless arf = ckth(th[idx], 2) if mx != idx             # mx != idx ?
####    idx += 1 unless (0 < idx ? arf = ckth(th[idx], 2) : ckth(th[idx], 0)) # && mx > idx       # mx != idx ?   # ! kara ary
##      th[idx] = pl_eg(pc, thl[idx]) if arf ||= ckth(th[idx], 2)       # kara ary      # (0 < idx) == arf
###     ji_ngq = ckth(pl_eg(pc, 'ctr'), 0) if ! ji_ngq  # sp [sp]
###     ji_ngq ||= ckth(pl_eg(pc, 'ctr')[0], 0)         # sp [sp]
##      ji_ngq = ckth(pl_eg(pc, 'ctr')[0], 0) if ! ji_ngq && arf ||= ckth(th[idx], 2)   # sp [sp]
##      th = th[0 ... idx] if ji_ngq && (arf.! || ckth(th[idx], 2))     # kara ary de nai nara kara ary kakunin
#
#       if arf ||= ckth(th[idx], 2)     # kara ary      # (0 < idx) == arf
#         th[idx] = pl_eg(pc, thl[idx]) # kara ary      # (0 < idx) == arf
##        ji_ngq ||= ckth(pl_eg(pc, 'ctr'), 0)          # sp [sp]
##        ji_ngq ||= ckth(pl_eg(pc, 'ctr')[0], 0)       # sp [sp]
#         ji_ngq ||= kt.call                    # c     # sp [sp]
#         th = th[0 ... idx] if ji_ngq && ckth(th[idx], 2)      # kara ary de nai nara kara ary kakunin
#       end

      }         ##
    }
.
574,591c

#       if (ji_ngq ||= kt.call) || ckth(th[idx], 1) # ) && mx >= idx
        if ckth(th[idx], 1) # && mx >= idx
          if ji_ngq ||= kt.call
#           idx > mx && idx = mx
            thi.step(idx) { |n| pl_es(pc, [thl[n], th[n]])}
            thi = idx + 1
          end
          idx += 1 if mx > idx
.
556,572c
#      while mx = th.hgt        # saizu henkou ari
      loop {

        if 0 < idx && ji_ngq ||= kt.call && ckth(th[idx], 2)
          idx -= 1
          flg = true
        else
#         th[idx] = s_id(th[idx], pc - 1) # if mx >= idx # && ckth(th[idx], 3)
          th[idx], t = s_id(th[idx], pc - 1) # if mx >= idx # && ckth(th[idx], 3)
.
551a
    thi = 0
    mx = th.hgt
.
550c
#   th = (th = pl_g(pc)
##      [th[self.afl(thl[0], ?i)], th[self.afl(thl[1], ?i)]])
#       [th[idx = self.afl(thl[0], ?i)], th[idx + 1]])

.
536c
#    self.send(*a) || a[1]
    [self.send(*a) || a[1], nil]
.
530c
##   return a[0] if 0 >= a.hgt
    return [a[0], nil] if 0 >= a.hgt
.
524c
#    (TB.dup == a || case a when Array then 0 >= a.hgt end) && (return a)
    (TB.dup == a || knid(a, :Array).!) && (return a)
.
464,465c
#     i_k = self.afl(k, ?i)                             # q 
#     i_k = loop {self.afl(k, ?i) && break}             # q     # fuguai taisaku
#     'ctr' == k && knid(v, :Array).! ? pl[i_k]<< v : pl[i_k] = v # p 
#     'ctr' == k && case v when Array then true end.! ? pl[i_k]<< v : pl[i_k] = v # p     # higokan ? mruby 70410200
#     pl[i_k] = 'ctr' == k && ! knid(v, :Array) ? pl[i_k] + [v] : v     # p 
#     pl[i_k] = 'ctr' == k && ! knid(v, :Array) ? pl[i_k]<< v : v # p 
##    pl[i_k].send(('ctr' == k && ! knid(v, :Array) ? '<<' : '='), v)             # p 
##    pl[i_k].send(('ctr' == k && ! knid(v, :Array) ? '<<' : 'replace'), v)       # p 
#     pl[i_k = self.afl(k, ?i)] += [v]                  # q     # ? 
#     pl[i_k] = (pl[i_k]<< v).send('ctr' == k && knid(v, :Array).! ? 'itself' : 'pop')    # p     # .itself higokan monami-ya.mrb:60510200 mruby:70410200
#     pl[i_k] = (pl[i_k]<< v)['ctr' == k && knid(v, :Array).! ? 0 .. -1 : -1]     # p     # ? 
#     pl[i_k = self.afl(k, ?i)] =
#       (pl[i_k]<< v)['ctr' == k && knid(v, :Array).! ? 0 .. -1 : -1]     # p     # ? 
      ['ctr' == k, k = self.afl(k, ?i)][0] &&           # q 
        knid(v, :Array).! ?
#       case v when Array then true end.! ?     # higokan ? mruby 70410200
                 pl[k]<< v : pl[k] = v    # p 
.
437d
384a

.
338,339c
#      a_ = a[0 .. 2]; return a[3].map{ |v| v.nil? ? v : self.send(*a_, v)}     # r 
      a_ = a[0 .. 2]; return a[3].map{ |v| v.nil? ? v : send(*a_, v)}   # r 
#    else self.send(*a)
    else send(*a)
.
336d
330,331c
# def s__r1_eq_sr01(*a) a[0][           a[2]] ==
#                       a[0][           a[1] + 1]       end
  def s__r1_eq_sr01(*a) a[0][           a[1] + 1] ==
                        a[0][           a[2]]           end
.
259,261c
#  def initialize
#  end
.
236,238d
158c
#   (r - 1).times {sleep 0}; r.times {sleep  t}                 # antei ?
.
155c
#   (r - 1).times {sleep 0}; GC.start; r.times {sleep   t}      # g     # fuantei ( keisan gosa ) ?
.
133d
123c
#  def delif_c(i, a = nil)
  def delif_c(i = @@ts, a = nil)
.
98c
#  def +(i = 1)
  def +(i = 0)
.
3,4d



-- 
YAMAGUTIseisei ( str_h__namae = { :sei => "山口" , :mei => "青星" } )
http://hello.to/seisei/ mailto:seisei@.68..net  tel:081-70-5152-1104
祝 Softbank-PHS 展開期間延長



# mruby-process/src/process.c
# 
# 357a
#   mrb_define_method(mrb, mrb->kernel_module, "usleep", mrb_ker_usleep, MRB_ARGS_REQ(1)); // kimushu/mruby-sleep
# // mrb_define_method(mrb, mrb->kernel_module, "msleep", mrb_ker_msleep, MRB_ARGS_REQ(1));        // kimushu/mruby-sleep
# .
# 191a
# 
# static mrb_value
# mrb_ker_usleep(mrb_state *mrb, mrb_value self)        // kimushu/mruby-sleep
# {
#   mrb_int usecs;
#   mrb_get_args(mrb, "i", &usecs);
#   usleep(usecs);
#   return mrb_nil_value();
# }
# 
# /*
# static mrb_value
# mrb_ker_msleep(mrb_state *mrb, mrb_value self)        // kimushu/mruby-sleep  usleep yobi
# {
#   mrb_int msecs;
#   mrb_get_args(mrb, "i", &msecs);
# 
# // for (; msecs > 0; --msecs) {
# //  usleep(1000);
# // }
# // return mrb_nil_value();
#                               // IIJ , Tomoyuki Sahara , YAMAGUTIseisei
#   time_t beg; // , end;
#   struct timeval tv;
# 
#   beg = time(0);
#   tv.tv_sec = 0;              // fuyou ?
#   tv.tv_usec = msecs;
#   if (0 > select(0, 0, 0, 0, &tv)) mrb_sys_fail(mrb,
#       "mrb_ker_msleep failed"
# //    "mrb_f_msleep failed"
#   );
#   return mrb_fixnum_value(time(0) - beg);     // float ?
# }
# */
# 
# .

<-> matsumotory/mruby-sleep # bamchoh/mruby-sleep