<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,9 @@
+2009-08-30  Hideki Miura
+
+* Array#at&#8218;&#200;&#8218;&#199;&#8218;&#204;&#402;*&#402;\&#402;b&#402;h&#8218;&#205;&#338;&#196;&#8218;&#209;*o&#8218;&#183;*&#234;*&#352;&#8218;&#178;&#8218;&#198;&#8218;&#201;&#338;^&#8218;&#170;&#710;&#217;&#8218;&#200;&#8218;&#232;&#8218;&#164;&#8218;&#233;.&#8218;&#177;&#8218;&#234;&#8218;&#240;&#8216;S&#8226;&#8221;&#8220;**&#8225;&#8218;&#181;&#8218;&#196;&#710;&#181;&#8218;&#164;&#8218;&#198;
+	&#8220;&#174;&#8220;I&#338;^&#402;`&#402;F&#402;b&#402;N&#8218;&#170;&#8220;&#252;&#8218;&#193;&#8218;&#191;&#8218;&#225;&#8218;&#164;&#8218;&#204;&#8218;&#197;&#338;&#196;&#8218;&#209;*o&#8218;&#181;&#8211;&#710;&#8218;&#201;&#338;^&#402;I&#402;u&#402;W&#402;F&#402;N&#402;g&#8218;&#240;&#8212;p&#710;&#211;&#8218;&#181;&#8218;&#196;&#338;&#194;*X&#8218;&#201;&#338;^*&#8222;&#732;_&#8218;&#183;&#8218;&#233;
+	&#8218;&#177;&#8218;&#204;&#8212;l&#8218;&#200;&#338;^&#8218;&#240;&#381;*&#8218;&#194;&#402;*&#402;\&#402;b&#402;h&#8218;&#204;&#402;t&#402;&#8240;&#402;O&#8218;&#240;*&#236;&#8218;&#233;*B
+
 2009-07-08    &lt;miura&gt;
 
 * type&#402;I&#402;u&#402;W&#402;F&#402;N&#402;g&#8218;&#204;constant&#8218;&#198;content&#8218;&#240;&#381;g&#8218;&#162;&#8226;&#170;&#8218;&#175;&#8218;&#233;&#8218;&#177;&#8218;&#198;*Bfunction, structure&#8218;&#205;</diff>
      <filename>MEMO</filename>
    </modified>
    <modified>
      <diff>@@ -752,6 +752,12 @@ module SendUtil
       pppp &quot;RubyMethod called #{mname.inspect}&quot;
 
       para = gen_arg_eval(args, receiver, ins, local_vars, info, minfo, mname)
+      if func == nil then
+        level = @expstack.size
+        if @array_alloca_size == nil or @array_alloca_size &lt; 1 + level then
+          @array_alloca_size = 1 + level
+        end
+      end
       @expstack.push [rettype,
         lambda {|b, context|
           recklass = receiver ? receiver[0].klass : nil</diff>
      <filename>lib/llvmutil.rb</filename>
    </modified>
    <modified>
      <diff>@@ -267,10 +267,30 @@ module MethodDefinition
     :&amp; =&gt; {
       :inline_proc =&gt; 
         lambda {|para|
-          gen_binary_operator(para, 
-            lambda {|v1, v2, b, context|
-              b.and(v1, v2)
-            })
+          arg1 = para[:receiver]
+          argt = arg1[0]
+          if argt.klass != :TrueClass and argt.klass != :FalseClass then
+            gen_binary_operator(para, 
+              lambda {|v1, v2, b, context|
+                b.and(v1, v2)
+              })
+          else
+            arg2 = para[:args][0]
+            @expstack.push [RubyType.boolean,
+              lambda {|b, context|
+                context = arg1[1].call(b, context)
+                v1 = context.rc
+                v1 = arg1[0].type.to_value(v1, b, context)
+                context = arg2[1].call(b, context)
+                v2 = context.rc
+                v2 = arg2[0].type.to_value(v2, b, context)
+
+                vt = b.and(v1, v2)
+                vt = b.and(vt, (~4).llvm)
+                context.rc = b.icmp_eq(vt, 0.llvm)
+                context
+              }]
+          end
         },
     },
 
@@ -493,19 +513,19 @@ module MethodDefinition
            args = para[:args].reverse
            nargs = args.size
            arraycurlevel = 0
-           if nargs != 0 then
-             arraycurlevel = @expstack.size
-             if  @array_alloca_size == nil or 
-                 @array_alloca_size &lt; nargs +  arraycurlevel then
-                @array_alloca_size = nargs + arraycurlevel
-             end
-           end
 
            # This rb_class_new_instance needs stack area as arguments
            # in spite of with no arguments.
            if @array_alloca_size == nil then
              @array_alloca_size = 1
            end
+           if nargs != 0 then
+             arraycurlevel = @expstack.size
+             if @array_alloca_size &lt; nargs + arraycurlevel then
+               @array_alloca_size = nargs + arraycurlevel
+             end
+           end
+
            rettype = RubyType.from_sym(rec[0].klass, para[:info][3], rec[0].klass)
 #=begin
            recklass = rec[0].klass
@@ -650,8 +670,7 @@ module MethodDefinition
               context}]
       }
     },
-
-
+    
     :at =&gt; {
       :inline_proc =&gt; 
         lambda {|para|</diff>
      <filename>lib/methoddef.rb</filename>
    </modified>
    <modified>
      <diff>@@ -447,7 +447,9 @@ EXTENT_ORDER = {
     when :Range
       fst = RubyType.new(nil)
       lst = RubyType.new(nil)
-      excl = RubyType.new(nil)
+      fst.add_same_type(lst)
+      lst.add_same_type(fst)
+      excl = RubyType.boolean
       RubyType.range(fst, lst, excl, lno, name)
 
     else</diff>
      <filename>lib/type.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2328,6 +2328,7 @@ class YarvTranslator&lt;YarvVisitor
           else
             # Generic + dispatch        else
           p info
+          p s[0][0].conflicted_types.keys
           raise &quot;Unkown Type #{s[0][0].type.llvm}&quot;
         end
 
@@ -2385,6 +2386,7 @@ class YarvTranslator&lt;YarvVisitor
         else
           # Generic + dispatch
           p info
+          p s[0][0].conflicted_types.keys
           raise &quot;Unkown Type #{s[0][0].type.llvm}&quot;
         end
 </diff>
      <filename>lib/vmtraverse.rb</filename>
    </modified>
    <modified>
      <diff>@@ -39,6 +39,83 @@ module YARV2LLVM
     :rettype =&gt; rt,
   }
 
+=begin
+  st = RubyType.array
+  rt = RubyType.new(nil)
+  rt.add_same_type(st.type.element_type)
+  st.type.element_type.add_same_type(rt)
+  MethodDefinition::RubyMethod[:first][:Array] = {
+    :self =&gt; st,
+    :argtype =&gt; [RubyType.new(nil)],
+    :rettype =&gt; rt,
+  }
+
+  st = RubyType.array
+  rt = RubyType.array
+  rt.add_same_type(st)
+  st.add_same_type(rt)
+  MethodDefinition::RubyMethod[:reverse][:Array] = {
+    :self =&gt; st,
+    :argtype =&gt; [],
+    :rettype =&gt; rt,
+  }
+
+
+  st = RubyType.array
+  rt = RubyType.array
+  rt.add_same_type(st)
+  st.add_same_type(rt)
+  MethodDefinition::RubyMethod[:slice!][:Array] = {
+    :self =&gt; st,
+    :argtype =&gt; [RubyType.new(nil), RubyType.new(nil)],
+    :rettype =&gt; rt,
+  }
+=end
+
+  MethodDefinition::RubyMethod[:&quot;!~&quot;][:String] = {
+    :argtype =&gt; [RubyType.new(nil)],
+    :rettype =&gt; RubyType.boolean,
+  }
+
+  MethodDefinition::RubyMethod[:&quot;=~&quot;][:String] = {
+    :argtype =&gt; [RubyType.new(nil)],
+    :rettype =&gt; RubyType.boolean,
+  }
+
+
+  MethodDefinition::RubyMethod[:&quot;!~&quot;][:Regexp] = {
+    :argtype =&gt; [RubyType.string],
+    :rettype =&gt; RubyType.boolean,
+  }
+
+  MethodDefinition::RubyMethod[:&quot;=~&quot;][:Regexp] = {
+    :argtype =&gt; [RubyType.string],
+    :rettype =&gt; RubyType.boolean,
+  }
+
+  fst = RubyType.new(nil)
+  lst = RubyType.new(nil)
+  fst.add_same_type(lst)
+  lst.add_same_type(fst)
+  excl = RubyType.boolean
+  rng = RubyType.range(fst, lst, excl)
+  MethodDefinition::RubyMethod[:first][:Range] = {
+    :self =&gt; rng,
+    :argtype =&gt; [],
+    :rettype =&gt; fst,
+  }
+
+  fst = RubyType.new(nil)
+  lst = RubyType.new(nil)
+  fst.add_same_type(lst)
+  lst.add_same_type(fst)
+  excl = RubyType.boolean
+  rng = RubyType.range(fst, lst, excl)
+  MethodDefinition::RubyMethod[:last][:Range] = {
+    :self =&gt; rng,
+    :argtype =&gt; [],
+    :rettype =&gt; lst,
+  }
 #=end
 end
 
@@ -125,6 +202,22 @@ class Array
 end
 
 class Range
+  def step(st)
+    i = self.first
+    ed = self.last
+    if st &gt; 0 then
+      while i &lt;= ed do
+        yield i
+        i = i + st
+      end
+    else
+      while ed &lt;= i do
+        yield i
+        i = i + st
+      end
+    end
+  end
+
   def collect
     res = []
     i = 0</diff>
      <filename>runtime/prelude.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>34c25f808a54dcbb975e2613a29846d774074bed</id>
    </parent>
  </parents>
  <author>
    <name>miura1729</name>
    <email>hideki@miura.miurakanko</email>
  </author>
  <url>http://github.com/miura1729/yarv2llvm/commit/0873fbd923046a222b6616c84afc590d449addaf</url>
  <id>0873fbd923046a222b6616c84afc590d449addaf</id>
  <committed-date>2009-08-29T20:22:01-07:00</committed-date>
  <authored-date>2009-08-29T20:22:01-07:00</authored-date>
  <message>Add some methodes</message>
  <tree>5311b80151c35516e902a8f9d82840ca2c966691</tree>
  <committer>
    <name>miura1729</name>
    <email>hideki@miura.miurakanko</email>
  </committer>
</commit>
