<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -470,7 +470,7 @@ module SendUtil
       obj = Object.nested_const_get(lexklass)
     end
 
-    if obj then
+    if obj and obj != NilClass then
       obj.ancestors.each do |sup|
         kls = sup.name.to_sym
         if tbl = MethodDefinition::InlineMethod[kls] and</diff>
      <filename>lib/llvmutil.rb</filename>
    </modified>
    <modified>
      <diff>@@ -459,10 +459,9 @@ EXTENT_ORDER = {
     else
       obj = nil
       if sym then
-        obj = sym.to_s.split(/::/).inject(Object) {|res, sym|
-          res.const_get(sym.to_sym, true)
-        }
+        obj = Object.nested_const_get(sym)
       end
+
       unless obj
         obj = Object
       end</diff>
      <filename>lib/type.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1224,6 +1224,7 @@ class YarvTranslator&lt;YarvVisitor
       type.extent = :global
     end
     areap = @global_var_tab[glname][:area]
+
     @expstack.push [type,
       lambda {|b, context|
         ftype = Type.function(VALUE, [VALUE])
@@ -1262,7 +1263,7 @@ class YarvTranslator&lt;YarvVisitor
     srcvalue = src[1]
     
     srctype.add_same_value(dsttype)
-    dsttype.add_same_value(srctype)
+    dsttype.add_same_type(srctype)
     srctype.extent = :global
 
     oldrescode = @rescode
@@ -1270,6 +1271,7 @@ class YarvTranslator&lt;YarvVisitor
       context = oldrescode.call(b, context)
       context = srcvalue.call(b, context)
       srcval = context.rc
+      srcval = implicit_type_conversion(b, context, srcval, srctype)
       srcval2 = srctype.type.to_value(srcval, b, context)
 
       dsttype.type = dsttype.type.dup_type
@@ -2046,6 +2048,7 @@ class YarvTranslator&lt;YarvVisitor
       if rett2.type == nil then
         retexp[0].add_same_type rett2
         RubyType.resolve
+#        retexp[0].resolve
         
         if rett2.type == nil then
           rett2.type = PrimitiveType.new(VALUE, nil)
@@ -3007,8 +3010,8 @@ class YarvTranslator&lt;YarvVisitor
       fix = RubyType.fixnum(info[3])
       idx[0].add_same_type(fix)
       fix.add_same_value(idx[0])
+    #  fix.resolve
     end
-
     RubyType.resolve
 
     # AbstrubctContainorType is type which have [] and []= as method.
@@ -3149,6 +3152,10 @@ class YarvTranslator&lt;YarvVisitor
     srctype.add_extent_base dsttype
 
     srctype.add_same_type(areatype)
+    dsttype.resolve
+    srctype.resolve
+#    RubyType.resolve
+
 =begin
     RubyType.resolve
     if dsttype.dst_type and 
@@ -3223,6 +3230,10 @@ class YarvTranslator&lt;YarvVisitor
     srctype.add_extent_base dsttype
 
     srctype.add_same_type(areatype)
+    dsttype.resolve
+    srctype.resolve
+#    RubyType.resolve
+
 =begin
     RubyType.resolve
     if dsttype.dst_type and 
@@ -3366,7 +3377,7 @@ def compcommon(is, opt, preload, bind)
   end
   iseq = VMLib::InstSeqTree.new(nil, is)
   if OPTION[:dump_yarv] then
-    p iseq.to_a
+    pp iseq.to_a
   end
   prelude = 'runtime/prelude.rb'
   pcont = File.read(prelude)</diff>
      <filename>lib/vmtraverse.rb</filename>
    </modified>
    <modified>
      <diff>@@ -227,8 +227,9 @@ class Array
   def collect
     res = []
     i = 0
-    self.each do |e|
-      res[i] = yield e
+    max = self.size
+    while i &lt; max
+      res[i] = yield self[i]
       i = i + 1
     end
 
@@ -256,8 +257,9 @@ class Range
   def collect
     res = []
     i = 0
-    self.each do |e|
-      res[i] = yield e
+    max = self.last
+    while i &lt; max do
+      res[i] = yield i
       i = i + 1
     end
 </diff>
      <filename>runtime/prelude.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,14 +1,16 @@
 m = LLVM::Module.new('hello') 
 LLVM::ExecutionEngine.get(m)
-p_char = LLVM::pointer(Type::Int8Ty)
-ftype = LLVM::function(Type::Int32Ty, [p_char]) 
+p_char = Type.pointer(Type::Int8Ty)
+#ftype = LLVM::function(Type::Int32Ty, [p_char]) 
+ftype = Type.function(Type::Int32Ty, [p_char]) 
 ftype = ftype.to_raw
 printf = m.external_function('printf', ftype) 
-ftype = LLVM::function(Type::Int32Ty, []) 
+#ftype = LLVM::function(Type::Int32Ty, []) 
+ftype = Type.function(Type::Int32Ty, []) 
 ftype = ftype.to_raw
 main = m.get_or_insert_function('main', ftype) 
 b = main.create_block.builder
 strptr = b.create_global_string_ptr(&quot;Hello World! \n&quot;)
 b.call(printf, strptr)
-b.return(strptr)
+b.return(LLVM::Value.get_constant(Type::Int32Ty, 0))
 LLVM::ExecutionEngine.run_function(main) </diff>
      <filename>sample/hello.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 require 'yarv2llvm'
-require 'llvmruby'
+require 'llvm'
 
 module YARV2LLVM
   MethodDefinition::RubyMethod[:get_or_insert_function][:&quot;LLVM::Module&quot;] = {</diff>
      <filename>y2llib/llvmruby.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>14f19db8dcad5b59f380a0cf0514b31d793098a4</id>
    </parent>
  </parents>
  <author>
    <name>miura1729</name>
    <email>hideki@miura.miurakanko</email>
  </author>
  <url>http://github.com/miura1729/yarv2llvm/commit/fbae6974cc5a315bded1412a2a6e5bb67902c43c</url>
  <id>fbae6974cc5a315bded1412a2a6e5bb67902c43c</id>
  <committed-date>2009-09-10T02:43:26-07:00</committed-date>
  <authored-date>2009-09-10T02:43:26-07:00</authored-date>
  <message>Some bugs fixed</message>
  <tree>1322b8b53b9d6529ccce98c32dbf19bb8bdeef17</tree>
  <committer>
    <name>miura1729</name>
    <email>hideki@miura.miurakanko</email>
  </committer>
</commit>
