public
Description:
Homepage:
Clone URL: git://github.com/miura1729/yarv2llvm.git
miura1729 (author)
Fri Jul 31 06:15:04 -0700 2009
commit  2fd45548cc86adc5e3cf8eace307f4617c09569e
tree    c2b2bba32bf2ee4face2813837279c29ecf91571
parent  8c8cbbdbebed9e215f333636c4c4c1d600c651ca
name age message
file MEMO Loading commit data...
file README Tue May 05 23:19:13 -0700 2009 2nd Checkpoint of get dynamic C function address [miura1729]
file benchmark.rb Mon Dec 29 06:05:26 -0800 2008 Compile out of method and can command line comp... [miura1729]
file bm_so_mandelbrot.rb Fri Jun 12 02:27:02 -0700 2009 Bug about static method dispatch fixed [miura1729]
file icon.bmp Sat Jun 27 15:26:04 -0700 2009 merge from radical_thread [miura1729]
directory jikken/ Thu Jan 01 14:28:10 -0800 2009 experiment for method dispatch and change insta... [miura1729]
directory lib/
directory runtime/
directory sample/
directory test/
directory y2llib/
file yarv2llvm.rb
README
yarv2llvm -- Yarv to LLVM Translater

-- Description
  yarv2llvm is Yarv to LLVM translater. 
  yarv2llvm will try for type inference.

-- Install
  yarv2llvm has need of llvmruby of ruby gem version
  (http://github.com/tombagby/llvmruby/tree/master)
  
   1. Install llvmruby

   2. Copy yarv2llvm.rb and ./lib/*.* to any directory which is in 
      the ruby library path.

  yarv2llvm need ruby1.9.2 or later.
  If you want to use ruby 1.9.1, you must install methopara
  (http://github.com/genki/methopara/tree/master).

-- Usage

   require 'yarv2llvm'
   YARV2LLVM::compile("Method definition in string")
   method(args)

   For example

    require 'yarv2llvm'
    YARV2LLVM::compile('def fact(n);if n == 0 then 1 else n * fact(n -1);end;end')   
    p fact(5)  # -> 120


   You can also use yarv2llvm as subset Ruby compler.
   For example

    ruby19 yarv2llvm.rb bm_so_nbody.rb
    -0.169074947
    -0.169083520

-- Limit
   yarv2llvm accepts very small subset of ruby.
   I will grow the subset yarv2llvm accepts.
   The subset of current version appears "test/test_compile.rb" .

-- BUGS
  If you apply bad program for yarv2llvm, you must break the code from
  yarv2llvm.

-- Author
   Miura Hideki (miura1729)
   e-mail: m-72 at tf6.so-net.ne.jp
   blog:   http://d.hatena.ne.jp/miura1729 (in Japanese)

-- License

 under the Ruby's License

 "sample/ao-render.rb" is under BSD3
 Original version was written by Syoyo Fujita.