<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.16.1">
</HEAD>
<BODY>
On Fri, 2008-02-15 at 09:06 +0100, Duncan Sands wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">Does ruby compile ruby code to native instructions and execute them? </FONT> 
</PRE>
</BLOCKQUOTE>
<BR>
No.  Ruby is an interpreted language.  The latest version has a VM that it targets -- YARV -- but it still does not compile to native like, say, a JIT would.<BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">Otherwise it probably means that llvm-gcc miscompiled something. </FONT> 
</PRE>
</BLOCKQUOTE>
<BR>
This is what I'm guessing at this stage.  It is, however, only a guess.  And given that GCC raw -- the "native" compilation platform for Ruby -- also fails (albeit in a different, highly-entertaining way -- I'm also guessing that part of this is because Ruby is doing some weird stuff behind the scenes.<BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">If you</FONT> <FONT COLOR="#000000">can extract a testcase please don't hesitate to post it to LLVM bugzilla</FONT>
<FONT COLOR="#000000">(<A HREF="http://llvm.org/bugs">http://llvm.org/bugs</A>).  Bugs generally get fixed fast, but someone needs</FONT>
<FONT COLOR="#000000">to report them!</FONT>
</PRE>
</BLOCKQUOTE>
<BR>
I have already reported the bug with a "test case" that consists of "here is how to build Ruby with llvm-gcc".  :)  I have also slotted some hacking time to figure out where in the test harness the thing is exploding.  Unfortunately, unlike the explosion that GCC's failure gives, the LLVM-GCC version explodes so thoroughly that it doesn't print out any kind of error message.  All I get is a bunch of pacifier dots on the screen as one test after another is run (there are thousands) and then that message.  It will take me a while to figure out where the error is happening.  (Binary search for the win!)  Once I have it narrowed down to one specific test, I will update the bug report with the steps required to replicate the error.<BR>
<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
-- <BR>
<B>Michael T. Richter</B> <<A HREF="mailto:ttmrichter@gmail.com">ttmrichter@gmail.com</A>> (<B>GoogleTalk:</B> ttmrichter@gmail.com)<BR>
<I>Experts in advanced countries underestimate by a factor of two to four the ability of people in underdeveloped countries to do anything technical. (Charles P Issawi)</I>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>