Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Ruby
Branch: dynamic_type

This branch is 161 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
jikken
lib
sample
test
README
benchmark.rb
bm_so_mandelbrot.rb
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.

-- 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

-- 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
Something went wrong with that request. Please try again.