[Yarv-devel] [ANN] YARV: Yet Another RubyVM 0.1.1

SASADA Koichi ko1 at atdot.net
Mon Feb 21 00:10:51 EST 2005


  gabriele renzi <surrender_it at yahoo.it> wrote :
    [ Re: [Yarv-devel] [ANN] YARV: Yet Another RubyVM 0.1.1 ]
    at Fri, 18 Feb 2005 21:48:04 +0100 (CET)

Hi,

> just wanted to understand: is there a way we can test
> JIT or AOT? 

JIT:

1. extconf.rb --enable-opt-jit-compile
2. make some method

ex)
  def compiled
    1+1 # yarv can't do jit compile complex scripts
  end

3. compile it

  jitcompile(self, :compiled) # this method jit compile self#compiled

4. call that method

  compiled()


----
  script will #=>
  
	  def compiled
	    1+1 # yarv can't do jit compile complex scripts
	  end

	  jitcompile(self, :compiled) # this method jit compile self#compiled

	  compiled()

5. run this script


AOT:

1. extconf.rb --enable-test-aot-compile

2. modify some file. note that default target is rb/aottest.rb

3. do compile with rb/aotcompile.rb
   you can do aot compile with "make aotc"

   compiled.inc will be created (ruby -> c compiled c source file).

4. call "compiled()" method

5. run this script




> And, btw, I think in jitcompile.c:
>  #if __GNUC__ && __i386__ && OPT_JIT_COMPILE 
>  /* this part may be separeted to another file */
> 
>  #include <sys/mman.h>
> is a little weak since it would allow gcc on win32 to
> try loading mman.h so it would need a 
> && !defined(WIN32)

OK. Thank you.


Regards,
-- 
// SASADA Koichi at atdot dot net
//


More information about the Yarv-devel mailing list