From ko1 at atdot.net Thu Jun 2 13:37:31 2005 From: ko1 at atdot.net (SASADA Koichi) Date: Thu Jun 2 13:31:07 2005 Subject: [Yarv-devel] YARV Development Plan Message-ID: <429F43DB.10105@atdot.net> Hi all, This year (2005 Apr - 2006 Feb), I plan to continue YARV development with following 3 topics. 1. Merge YARV to Ruby In current version of YARV, we must patch to ruby source code. In this year, I'll replace all legacy VM with YARV. It's meeans that YARV will be The RubyVM. 2. Native Thread Support Some people love it :) 3. Multi VM Instance Like MVM (technology of Java VM). If you have any ideas or quiestions or other comments, please post it. Regards, -- SASADA Koichi From drbrain at segment7.net Thu Jun 2 13:45:12 2005 From: drbrain at segment7.net (Eric Hodel) Date: Thu Jun 2 13:38:10 2005 Subject: [Yarv-devel] YARV Development Plan In-Reply-To: <429F43DB.10105@atdot.net> References: <429F43DB.10105@atdot.net> Message-ID: <465FF34B-2BAB-4AFE-AB65-2570F409DE11@segment7.net> On 02 Jun 2005, at 10:37, SASADA Koichi wrote: > 3. Multi VM Instance > > Like MVM (technology of Java VM). Just to be clear, multiple Ruby VMs per process? Will each need to live in its own thread? -- Eric Hodel - drbrain@segment7.net - http://segment7.net FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04 From ko1 at atdot.net Thu Jun 2 13:57:59 2005 From: ko1 at atdot.net (SASADA Koichi) Date: Thu Jun 2 13:51:36 2005 Subject: [Yarv-devel] YARV Development Plan In-Reply-To: <465FF34B-2BAB-4AFE-AB65-2570F409DE11@segment7.net> References: <429F43DB.10105@atdot.net> <465FF34B-2BAB-4AFE-AB65-2570F409DE11@segment7.net> Message-ID: <429F48A7.3050407@atdot.net> Hi, Eric Hodel wrote: > Just to be clear, multiple Ruby VMs per process? Yes. It will help Ruby embedded application like mod_ruby. > Will each need to live in its own thread? Each VM has own thread group. Regards, -- SASADA Koichi From danny at amelang.net Thu Jun 2 20:12:41 2005 From: danny at amelang.net (Daniel Amelang) Date: Thu Jun 2 20:05:39 2005 Subject: [Yarv-devel] YARV Development Plan Message-ID: <20050603001241.29806.qmail@hoster912.com> > In current version of YARV, we must patch to ruby source code. So you are anticipating a pass over of all the ruby core code to make it 'YARV' friendly? Or do you mean that you are going to make YARV work without having to patch ruby? > 2. Native Thread Support > > Some people love it :) YES, PLEASE!!!! I can't take the whole ruby interpreter blocking on op. sys calls anymore! And polling (with little sleeps) is just not good enough. Go Koichi! So, in a previous thread on this list, I noticed that YARV didn't give very much speed up for programs that perform float operations. Do you have any ideas/plans on how to speed up the flavors of ruby code that YARV currently does _not_ speed up? Great work by the way! Dan From ko1 at atdot.net Fri Jun 3 00:44:03 2005 From: ko1 at atdot.net (SASADA Koichi) Date: Fri Jun 3 00:37:33 2005 Subject: [Yarv-devel] YARV Development Plan In-Reply-To: <20050603001241.29806.qmail@hoster912.com> References: <20050603001241.29806.qmail@hoster912.com> Message-ID: <429FE013.7040102@atdot.net> Hi, Daniel Amelang wrote: > So you are anticipating a pass over of all the ruby core code to make it 'YARV' friendly? Or do you mean that you are going to make YARV work without having to patch ruby? I'll rewrite ruby core. > So, in a previous thread on this list, I noticed that YARV didn't give very much speed up for programs that perform float operations. Do you have any ideas/plans on how to speed up the flavors of ruby code that YARV currently does _not_ speed up? some. I think some block inlining is effective. Floating computation is still slow... Regards, -- SASADA Koichi From ko1 at atdot.net Sat Jun 4 02:54:27 2005 From: ko1 at atdot.net (SASADA Koichi) Date: Sat Jun 4 02:47:24 2005 Subject: [Yarv-devel] case/when optimization Message-ID: <878y1qsjbw.wl%ko1@atdot.net> Hi, I implemented optimization for case/when statement. * Order of case/when statement is O(n) (n: number of when conditons) * If when condtions are all special literals (Numeric, Symbol, String), when dispatch can be done with hash. example: case x when :a Abody when :b Bbody when :c Cbody else ElseBody end In this situation, we don't need compare with each conditions. Following pseudo code is more fast. pos = hash.fetch(x, elsePos) goto pos posA: Abody goto endPos posB: Bbody goto endPos posC: Cbody goto endPos elsePos: Elsebody endPos: * Note that if '===' method of these classes is redefined, we can't use above method. In current, YARV doesn't check it (must check it). Benchmark: i=0 while i<1000000 i+=1 case :a when :x when :y when :z end end ruby 3.815000 0.010000 3.825000 ( 3.893000) yarv 1.231000 0.000000 1.231000 ( 1.247000) old yarv 0.370000 0.010000 0.380000 ( 0.385000) new Regards, SASADA Koichi From surrender_it at yahoo.it Sat Jun 4 10:29:10 2005 From: surrender_it at yahoo.it (gabriele renzi) Date: Sat Jun 4 10:22:05 2005 Subject: [Yarv-devel] YARV Development Plan In-Reply-To: <429FE013.7040102@atdot.net> Message-ID: <20050604142911.83790.qmail@web26204.mail.ukl.yahoo.com> > > So, in a previous thread on this list, I noticed > that YARV didn't give very much speed up for > programs that perform float operations. Do you have > any ideas/plans on how to speed up the flavors of > ruby code that YARV currently does _not_ speed up? > > some. > I think some block inlining is effective. > Floating computation is still slow... what about peephole optimization? It was in the plans but I don't know if it is already in place, I think there are quite a bit of things that can use peephole simplification icq #69488917 __________________________________ Discover Yahoo! Have fun online with music videos, cool games, IM and more. Check it out! http://discover.yahoo.com/online.html From ko1 at atdot.net Wed Jun 8 22:40:28 2005 From: ko1 at atdot.net (SASADA Koichi) Date: Sat Jun 4 22:33:48 2005 Subject: [Yarv-devel] YARV Development Plan In-Reply-To: <20050604142911.83790.qmail@web26204.mail.ukl.yahoo.com> References: <20050604142911.83790.qmail@web26204.mail.ukl.yahoo.com> Message-ID: <42A7AC1C.1090001@atdot.net> Hi, gabriele renzi wrote: > > >>>So, in a previous thread on this list, I noticed >> >>that YARV didn't give very much speed up for >>programs that perform float operations. Do you have >>any ideas/plans on how to speed up the flavors of >>ruby code that YARV currently does _not_ speed up? >> >>some. >>I think some block inlining is effective. >>Floating computation is still slow... > > > what about peephole optimization? > It was in the plans but I don't know if it is already > in place, I think there are quite a bit of things that > can use peephole simplification it's only plan. -- // SASADA Koichi at atdot dot net // From surrender_it at yahoo.it Mon Jun 13 18:00:50 2005 From: surrender_it at yahoo.it (gabriele renzi) Date: Mon Jun 13 17:56:31 2005 Subject: [Yarv-devel] for is unsupported ? Message-ID: <20050613220051.4741.qmail@web26207.mail.ukl.yahoo.com> Hi people, I just noticed that for.. in does not work: ary = [ 1,2 ] ary.each do |b| p 'hello' end prints "hello" "hello" but ary = [ 1,2 ] for b in ary p 'hello' end prints nothing. Is this something that got broken in latest revisions or it did not ever worked before? PS (yes I know #each is better than for :) icq #69488917 __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From ko1 at atdot.net Mon Jun 13 18:53:06 2005 From: ko1 at atdot.net (SASADA Koichi) Date: Mon Jun 13 18:49:26 2005 Subject: [Yarv-devel] for is unsupported ? In-Reply-To: <20050613220051.4741.qmail@web26207.mail.ukl.yahoo.com> References: <20050613220051.4741.qmail@web26207.mail.ukl.yahoo.com> Message-ID: <42AE0E52.7030009@atdot.net> Hi, gabriele renzi wrote: > I just noticed that for.. in does not work: A Bug. I fixed it. > PS > (yes I know #each is better than for :) I don't know about that :) But I don't use "for". From ko1 at atdot.net Mon Jun 27 07:37:58 2005 From: ko1 at atdot.net (SASADA Koichi) Date: Mon Jun 27 08:02:14 2005 Subject: [Yarv-devel] OOPSLA Poster Abstract Message-ID: <42BFE516.5030904@atdot.net> Hi, I'm planning to submit OOPSLA 2005 poster session. It requires 2 pages extended abstarct. So I write following abstract. Could anyone read it and check my poor English and contents? (Evaluation, Future Work, Conclusion is still being written) Thanks, -- // SASADA Koichi at atdot dot net // \documentclass{acm_proc_article-sp} \begin{document} \title{Innovation of Ruby Interpreter} \subtitle{YARV: Yet Another RubyVM} \author{ \alignauthor Koichi Sasada \\ \affaddr{Graduate School of Technology,} \\ \affaddr{Tokyo University of Agriculture and Technology} \\ \affaddr{2-24-16 Nakacho, Koganei-shi, Tokyo, Japan.} \\ \email{sasada@namikilab.tuat.ac.jp} } \maketitle \begin{abstract} Ruby - an Object-Oriented scripting language - is used world-wide because of its ease to use. However, the current interpreter is slow. To solve this problem, some virtual machines were developed, but they didn't have enough performance or functionality. With this background, I have developed a ruby interpreter called \emph{YARV (Yet Another Ruby VM)}. YARV is based on a stack machine architecture. YARV has some optimizations for high speed execution of ruby programs. In this poster, I describe the instroduction of Ruby Language and characteristics of ruby from the aspect of a ruby interpreter implementor and some methods of implementation and optimization. This poster also shows benchmark results. \end{abstract} \keywords{Interpreter Implementation, Scripting Language, Ruby} % NOT required for Proceedings \section{Introduction} Ruby is the interpreted scripting language developed by Yukihiro Matsumoto for quick and easy object-oriented programming\cite{ruby-lang, pickaxe}. It is simple, straight-forward, extensible, and portable. It has many features to process text files and to do system management tasks (as in Perl\cite{perl}) and any more. Ruby has following characteristics. \begin{itemize} \item Simple grammar \item Normal OO features (class, method call, et al) \item Advanced OO feature (all values are object, Min-in, Singleton method, et al) \item Dynamic-typing, redefinable, dynamic evaluation \item Operator overloading \item Exception handling mechanism \item Closure and method invocation with block \item Suppoting Garbage collection \item Dynamic module loading \item Many useful libraries \item High portability \end{itemize} However, Ruby intepreter works slow. This is because current interpreter (old-ruby) run with traversing abstract syntax tree and evaluate each node. To solve this problem, I have developed new ruby interpreter called YARV (Yet Another RubyVM), which is stack machine and run ruby program as sequential instructions. I'm working to replace old-ruby to YARV. In this poster, I will introduce ruby language, the merit of it and demerit of Ruby for speed-up and YARV intepreter implementation and an evaluation results of it. In this abstract, especially I wrote about YARV implementation and optimization features and some evalutation results. \section{YARV Implementation} \subsection{Overview} YARV is simple stack machine written in C. VM has a stack, a program counter (PC), a stack pointer, some frame pointers (FP). YARV compile a ruby script to a YARV instruction (intermediate) code sequence. The instruction set is designed for Ruby specifically. VM runs with it faster than old-ruby. YARV uses old-ruby's functions like ruby script parser, object management mechanism and garbage collector and so on. In fact, YARV is implemented as old-ruby's extension. \subsection{Intepreter Auto Generation} To create virtual machine, I generate VM's code from VM description language (VMDL) like vmgen\cite{vmgen}. Figure \ref{vmdl} shows definition of a VM instruction (named \verb|instruction1|). In VMDL, declaration of operands, values which popped before work this instruction and values which will pushed to stack after finish it instruction. Programmer doesn't need to write control code of PC, SP, stack and fetching operands. Furthermore, VMDL can generate after mentioned many optimized code automatically. \begin{figure} \begin{quote} \scriptsize \begin{verbatim} DEFINE_INSTRUCTION instruction1 // instruction name (VALUE op1) // operand values (VALUE sp1) // popped values from stack (VALUE r1) // values will be pushed to stack { // instruction logic of instruction1 // using op1, sp1 // and at last assign value to r1 } \end{verbatim} \end{quote} \caption{VM description language} \label{vmdl} \end{figure} \subsection{Optimization} YARV was implemented with many optimization techniques to be high-speed interpreter. In this subsection, I introduce some of them. Instruction dispatch is used dynamic threaded code \cite{direct-threaded-code} using gcc\cite{gcc} extended feature instead of \verb|switch/case| syntax in C. Since all values in Ruby language are object, ruby has no primitive types. So Ruby program \verb|1+2| means \verb|1.+(2)| (a method \verb|+| is sent to reciever \verb|1| with an argument \verb|2|). Because of efficiency, some methods is compiled to speciallised instruction. In this case, \verb|+| method is speciallised to \verb|opt_plus| instruction. \verb|opt_plus| checks a reciever and an argument as Fixnum. If they are Fixnum, check \verb|+| method of Fixnum is re-defined or not. If it's not re-defined, add these values and push it to stack. Otherwise, normal dispatch sequence is occured. Operands unification and instructions unification (also known as super instruction) is used to optimize. If programmer specify instruction with specific operands or instructions sequence to be unified, the VM generation system generates unified instructions and compiler logic. YARV supports 2-level (2 registers, 5 states) stack caching\cite{stack-caching}. The VM generation system generates stack caching instructions and translater for compileation. Ahead-of-Time (AOT) compilation of ruby program is also supported. AOT compiler translates a ruby program to a C program which runs on YARV. C compiler generate more efficient machine native code than YARV instruction codes. \section{Evaluation} ... \section{Future Work} Supporting native thread Multi-VM instances mechanism \cite{java-mvm} Replace Ruby Interpreter to Ruby 2.0 Rite \section{Conclusion} In this extended abstract, I describe Ruby language characteristics and new implementation of ruby interpreter called YARV. YARV has applied many interpreter optimization schemes and it cause speed-up compared to old-ruby. \section*{Acknowledgement} This project is assisted by Exploratory Software Project 2004 (youth) and 2005 from IPA (Information-technology Promotion Agency, Japan) . I want to make an address of thanks to yarv-devel mailing list members and all Rubyists. \bibliographystyle{abbrv} \bibliography{yarve} \end{document} -------------- next part -------------- A non-text attachment was scrubbed... Name: eabstract.pdf Type: application/pdf Size: 60056 bytes Desc: not available Url : http://rubyforge.org/pipermail/yarv-devel/attachments/20050627/d5c79403/eabstract-0001.pdf From mneumann at ntecs.de Mon Jun 27 09:37:05 2005 From: mneumann at ntecs.de (Michael Neumann) Date: Mon Jun 27 09:32:23 2005 Subject: [Yarv-devel] OOPSLA Poster Abstract In-Reply-To: <42BFE516.5030904@atdot.net> References: <42BFE516.5030904@atdot.net> Message-ID: <200506271537.06027.mneumann@ntecs.de> Am Monday 27 June 2005 13:37 schrieb SASADA Koichi: > Hi, > > I'm planning to submit OOPSLA 2005 poster session. > It requires 2 pages extended abstarct. So I write following abstract. > > Could anyone read it and check my poor English and contents? I tried . A patch is appended (which might not be optimal ;-). Look out for places with "???". This are places in the text, I do not really understand, or which needs clarification. Regards, Michael -------------- next part -------------- A non-text attachment was scrubbed... Name: diff Type: text/x-diff Size: 9100 bytes Desc: not available Url : http://rubyforge.org/pipermail/yarv-devel/attachments/20050627/50586521/diff.bin From vincent.isambart at gmail.com Mon Jun 27 09:43:05 2005 From: vincent.isambart at gmail.com (Vincent Isambart) Date: Mon Jun 27 09:38:20 2005 Subject: [Yarv-devel] OOPSLA Poster Abstract In-Reply-To: <200506271537.06027.mneumann@ntecs.de> References: <42BFE516.5030904@atdot.net> <200506271537.06027.mneumann@ntecs.de> Message-ID: <7d9a1f5305062706433417aac@mail.gmail.com> Hi, > > I'm planning to submit OOPSLA 2005 poster session. > > It requires 2 pages extended abstarct. So I write following abstract. > > > > Could anyone read it and check my poor English and contents? > > I tried . A patch is appended (which might not be optimal ;-). Look out for > places with "???". This are places in the text, I do not really understand, > or which needs clarification. A patch for the patch: I did not check everything, and English is not my mother tongue, but I think "an Ruby interpreter" should be "a Ruby interpreter". Cheers, Vincent Isambart From mneumann at ntecs.de Mon Jun 27 10:03:06 2005 From: mneumann at ntecs.de (Michael Neumann) Date: Mon Jun 27 09:58:22 2005 Subject: [Yarv-devel] OOPSLA Poster Abstract In-Reply-To: <7d9a1f5305062706433417aac@mail.gmail.com> References: <42BFE516.5030904@atdot.net> <200506271537.06027.mneumann@ntecs.de> <7d9a1f5305062706433417aac@mail.gmail.com> Message-ID: <200506271603.07074.mneumann@ntecs.de> Am Monday 27 June 2005 15:43 schrieb Vincent Isambart: > Hi, > > > > I'm planning to submit OOPSLA 2005 poster session. > > > It requires 2 pages extended abstarct. So I write following abstract. > > > > > > Could anyone read it and check my poor English and contents? > > > > I tried . A patch is appended (which might not be optimal ;-). Look out > > for places with "???". This are places in the text, I do not really > > understand, or which needs clarification. > > A patch for the patch: I did not check everything, and English is not > my mother tongue, but I think "an Ruby interpreter" should be "a Ruby > interpreter". Of course you're right ;-) Regards, Michael From surrender_it at yahoo.it Tue Jun 28 06:40:04 2005 From: surrender_it at yahoo.it (gabriele renzi) Date: Tue Jun 28 06:35:18 2005 Subject: [Yarv-devel] Probably irrelevant segfault Message-ID: <20050628104004.82193.qmail@web26206.mail.ukl.yahoo.com> Hi list, it seem that I spotted a bug that could happen only in test-time, since it seem to be related to exceptions coming out of evaled code in tests. Actually, not really at exception time, but at traceback accessing time: I.e. something like def test_evaled_exception ae %q{raise} end will cause an output like this: Loaded suite ./test/runner Started ..........E..................................................................... ........................... Finished in 2.323 seconds. c:/ruby/lib/ruby/1.9/test/unit/util/backtracefilter.rb:16: [BUG] unknown node type 95 ruby 1.9.0 (2005-03-04) [i386-mingw32] I only tested this on windows since my linux box is in a messy state, sorry. Anyway, specs are: - win xp pro SP2 - ruby 1.9.0 (2005-03-04) [i386-mingw32] - gcc version 3.4.2 (mingw-special) - athlon xp 2000+ Also: I can segfault yasm with C:\yarv>make yasm c:/ruby/bin/ruby19 -I. ./yasmtest.rb ./rb/yasm.rb:200: [BUG] unsuppoted ruby 1.9.0 (2005-03-04) [i386-mingw32] and there is a little typo: it should be "unsupported", an "r" is missing. Sorry for not providing more help than bug discovering :) icq #69488917 __________________________________ Do you Yahoo!? Make Yahoo! your home page http://www.yahoo.com/r/hs From ko1 at atdot.net Tue Jun 28 10:06:04 2005 From: ko1 at atdot.net (SASADA Koichi) Date: Tue Jun 28 10:02:02 2005 Subject: [Yarv-devel] Probably irrelevant segfault In-Reply-To: <20050628104004.82193.qmail@web26206.mail.ukl.yahoo.com> References: <20050628104004.82193.qmail@web26206.mail.ukl.yahoo.com> Message-ID: <42C1594C.2070004@atdot.net> Hi, gabriele renzi wrote: > it seem that I spotted a bug that could happen only in > test-time, since it seem to be related to exceptions > coming out of evaled code in tests. > > Actually, not really at exception time, but at > traceback accessing time: > > I.e. > something like > > def test_evaled_exception > ae %q{raise} > end > > will cause an output like this: > Loaded suite ./test/runner > Started > ..........E..................................................................... > ........................... > Finished in 2.323 seconds. > > c:/ruby/lib/ruby/1.9/test/unit/util/backtracefilter.rb:16: > [BUG] unknown node type 95 > ruby 1.9.0 (2005-03-04) [i386-mingw32] > > I only tested this on windows since my linux box is in > a messy state, sorry. Anyway, specs are: > - win xp pro SP2 > - ruby 1.9.0 (2005-03-04) [i386-mingw32] > - gcc version 3.4.2 (mingw-special) > - athlon xp 2000+ Throwing exception from YARV environment to Ruby environment. > Also: I can segfault yasm with > > C:\yarv>make yasm > c:/ruby/bin/ruby19 -I. ./yasmtest.rb > ./rb/yasm.rb:200: [BUG] unsuppoted > ruby 1.9.0 (2005-03-04) [i386-mingw32] Sorry, yasm is now unsupported. > > and there is a little typo: it should be > "unsupported", an "r" is missing. ouch! Regards, -- // SASADA Koichi at atdot dot net // From ko1 at atdot.net Tue Jun 28 11:31:39 2005 From: ko1 at atdot.net (SASADA Koichi) Date: Tue Jun 28 11:27:36 2005 Subject: [Yarv-devel] OOPSLA Poster Abstract In-Reply-To: <200506271537.06027.mneumann@ntecs.de> References: <42BFE516.5030904@atdot.net> <200506271537.06027.mneumann@ntecs.de> Message-ID: <42C16D5B.6060701@atdot.net> Hi, Thank you very much for your patch. I applied it. And I added conclusion. BTW, is the title OK? Thanks, -- // SASADA Koichi at atdot dot net // \documentclass{acm_proc_article-sp} \begin{document} \title{Innovation of Ruby Interpreter} \subtitle{YARV: Yet Another RubyVM} \author{ \alignauthor Koichi Sasada \\ \affaddr{Graduate School of Technology,} \\ \affaddr{Tokyo University of Agriculture and Technology} \\ \affaddr{2-24-16 Nakacho, Koganei-shi, Tokyo, Japan.} \\ \email{sasada@namikilab.tuat.ac.jp} } \maketitle \begin{abstract} Ruby - an Object-Oriented scripting language - is used world-wide because of its ease of use. However, the current interpreter is slow. To solve this problem, some virtual machines were developed, but they didn't have enough performance or functionality. With this background, I have developed a ruby interpreter called \emph{YARV (Yet Another Ruby VM)}. YARV is based on a stack machine architecture. YARV has some optimizations for high speed execution of ruby programs. In this poster, I describe the introduction of Ruby Language and characteristics of Ruby from the aspect of a Ruby interpreter implementor and some methods of implementation and optimization. This poster also shows benchmark results. \end{abstract} \keywords{Interpreter Implementation, Scripting Language, Ruby} % NOT required for Proceedings \section{Introduction} Ruby is the interpreted scripting language developed by Yukihiro Matsumoto for quick and easy object-oriented programming\cite{ruby-lang, pickaxe}. It is simple, straight-forward, extensible, and portable. It has many features to process text files and to do system management tasks (as in Perl\cite{perl}) and many more. Ruby has following characteristics. \begin{itemize} \item Simple syntax \item Normal OO features (class, method call, et al) \item Advanced OO feature (all values are objects, Min-in, Singleton method, et al) \item Dynamic-typing, redefinable, dynamic evaluation \item Operator overloading \item Exception handling mechanism \item Closure and method invocation with block \item Supporting Garbage collection \item Dynamic module loading \item Many useful libraries \item High portability \end{itemize} However, the Ruby intepreter is slow. This is because current interpreter (old-ruby) works by traversing abstract syntax tree and evaluates each node. To solve this problem, I have developed new ruby interpreter called YARV (Yet Another RubyVM), which is a stack machine and runs ruby programs as compiled intemediate representation of sequential instructions. I'm working to replacing old-ruby to YARV. In this poster, I will introduce the Ruby language, the advantages of it and demerits of Ruby for speed-up and YARV intepreter implementation and an evaluation results of it. In this abstract, especially I wrote about YARV implementation and optimization features and some evalutation results. \section{YARV Implementation} \subsection{Overview} YARV is a simple stack machine written in C. The VM has a stack, a program counter (PC), a stack pointer, some frame pointers (FP). YARV compiles a Ruby script to a YARV instruction (intermediate) code sequence. The instruction set is designed for Ruby specifically. The VM runs it faster than old-ruby. YARV uses old-ruby's functions like ruby script parser, object management mechanism and garbage collector and so on. In fact, YARV is implemented as an extension module for old-ruby. YARV is working on Linux with GCC and Windows2000/XP with Visual C++ or cygwin. \subsection{Intepreter Auto Generation} To create the virtual machine, I generate the code for the VM from a VM description language (VMDL) like vmgen\cite{vmgen}. Figure \ref{vmdl} shows the definition of an VM instruction (named \verb|instruction1|). In the VMDL, you need to declare operands, values which popped before work this instruction (also known as stack operands) and values which will pushed to stack after finish it instruction. The programmer doesn't need to write control code of PC, SP, stack and fetching operands. Furthermore, VMDL can generate many optimized code automatically. Next subsection, I'll show you the optimization technique. \begin{figure} \begin{quote} \scriptsize \begin{verbatim} DEFINE_INSTRUCTION instruction1 // instruction name (VALUE op1) // operand values (VALUE sp1) // popped values from stack (VALUE r1) // values will be pushed to stack { // instruction logic of instruction1 // using op1, sp1 // and at last assign value to r1 } \end{verbatim} \end{quote} \caption{VM description language} \label{vmdl} \end{figure} \subsection{Optimization} YARV was implemented with many optimization techniques to be a high-speed interpreter. Instruction dispatch makes use of dynamic threaded code\cite{direct-threaded-code} with GCC's extended feature (label as value) instead of \verb|switch/case| statements in C. Since all values in Ruby are objects, Ruby has no primitive types. So, for example the Ruby program \verb|1+2| means \verb|1.+(2)| (a method \verb|+| is sent to reciever \verb|1| with an argument \verb|2|). Because of efficiency, some methods are compiled to specialized instructions. In this case, method \verb|+| is spezialized to the \verb|opt_plus| instruction. \verb|opt_plus| checks the receiver (self) and the argument. If they are both Fixnums, it checks whether method \verb|+| of class Fixnum has been re-defined or not. If it has not been re-defined, it adds these values and pushes the result onto the stack. Otherwise, the normal method dispatch sequence is performed. Operand unification and instruction unification (also known as super instruction) is used to optimize. If the programmer specifies an instruction with specific operands or instruction sequence to be unified, the VM generation system generates unified instructions and compiler logic. YARV supports 2-level (2 registers, 5 states) static stack caching\cite{stack-caching}. The VM generation system generates stack caching instructions and translater for compilation. Ahead-of-Time (AOT) compilation of ruby programs is also supported. The AOT compiler translates a ruby program to a C program which runs on YARV. The C compiler then generates more efficient native machine code than YARV instruction codes. \section{Evaluation} ... \section{Conclusion} In this extended abstract, I described Ruby language characteristics and a new implementation of the ruby interpreter called YARV. YARV has applied many interpreter optimization schemes and it causes speed-up compared to old-ruby. On current ruby interpreter, multi-thread system is supported by user-level. It means that we can not write parallel application on Ruby. So YARV will support native threads (Operating System managed it). It will enable to write scalable programming in Ruby. Also I'm planning to desgin Multi-VM instances mechanism like Java Multi-Talking VM\cite{java-mvm}. It helps performance improvement and an application program embedded with a ruby interpreter. At last, I will replace current ruby interpreter with YARV and YARV becomes The Ruby Virtual Machine. \section*{Acknowledgement} This project is assisted by Exploratory Software Project 2004 (youth) and 2005 from IPA (Information-technology Promotion Agency, Japan) . I want to address of thanks to Michael Neumann and to yarv-devel mailing list members and to all Rubyists. \bibliographystyle{abbrv} \bibliography{yarve} \end{document} From ko1 at atdot.net Tue Jun 28 11:33:10 2005 From: ko1 at atdot.net (SASADA Koichi) Date: Tue Jun 28 11:29:06 2005 Subject: [Yarv-devel] OOPSLA Poster Abstract In-Reply-To: <42C16D5B.6060701@atdot.net> References: <42BFE516.5030904@atdot.net> <200506271537.06027.mneumann@ntecs.de> <42C16D5B.6060701@atdot.net> Message-ID: <42C16DB6.80804@atdot.net> Hi, SASADA Koichi wrote: > Hi, > > Thank you very much for your patch. > I applied it. > > And I added conclusion. > > BTW, is the title OK? Current file in PDF: http://www.atdot.net/yarv/eabstract.pdf Thanks, -- // SASADA Koichi at atdot dot net // From danny at amelang.net Tue Jun 28 13:41:59 2005 From: danny at amelang.net (Daniel Amelang) Date: Tue Jun 28 13:37:10 2005 Subject: [Yarv-devel] OOPSLA Poster Abstract In-Reply-To: <42C16D5B.6060701@atdot.net> References: <42BFE516.5030904@atdot.net> <200506271537.06027.mneumann@ntecs.de> <42C16D5B.6060701@atdot.net> Message-ID: <42C18BE7.6010700@amelang.net> I've noticed a couple things I would like to fix, but today is not a good time for me. When do you plan on submitting this? Dan From mneumann at ntecs.de Tue Jun 28 13:42:56 2005 From: mneumann at ntecs.de (Michael Neumann) Date: Tue Jun 28 13:38:10 2005 Subject: [Yarv-devel] OOPSLA Poster Abstract In-Reply-To: <42C16D5B.6060701@atdot.net> References: <42BFE516.5030904@atdot.net> <200506271537.06027.mneumann@ntecs.de> <42C16D5B.6060701@atdot.net> Message-ID: <42C18C20.2040605@ntecs.de> SASADA Koichi wrote: > Hi, > > Thank you very much for your patch. > I applied it. > > And I added conclusion. > > BTW, is the title OK? I think the title is OK. Alternative: "Next Generation Ruby Interpreter", but I like "Innovation" more. Regards, Michael From danny at amelang.net Tue Jun 28 13:54:44 2005 From: danny at amelang.net (Daniel Amelang) Date: Tue Jun 28 13:49:53 2005 Subject: [Yarv-devel] OOPSLA Poster Abstract In-Reply-To: <42C18C20.2040605@ntecs.de> References: <42BFE516.5030904@atdot.net> <200506271537.06027.mneumann@ntecs.de> <42C16D5B.6060701@atdot.net> <42C18C20.2040605@ntecs.de> Message-ID: <42C18EE4.9090503@amelang.net> Michael Neumann wrote: > > >I think the title is OK. >Alternative: "Next Generation Ruby Interpreter", > > +1 I think your alternative is more natural and clear. >but I like "Innovation" more. > > +1 :) So do I. Maybe we can come up with something that uses 'innovation' but is also clear. The current title is just slightly confusing IMHO. Dan From rich at infoether.com Tue Jun 28 13:57:16 2005 From: rich at infoether.com (Richard Kilmer) Date: Tue Jun 28 13:52:30 2005 Subject: [Yarv-devel] OOPSLA Poster Abstract In-Reply-To: <42C16DB6.80804@atdot.net> References: <42BFE516.5030904@atdot.net> <200506271537.06027.mneumann@ntecs.de> <42C16D5B.6060701@atdot.net> <42C16DB6.80804@atdot.net> Message-ID: <52621378-0973-4C4D-9CF6-FF64124996B1@infoether.com> You may want to make sure you consistently capitalize Ruby. There are places where you do and don't. Best, Rich On Jun 28, 2005, at 11:33 AM, SASADA Koichi wrote: > Hi, > > SASADA Koichi wrote: > >> Hi, >> >> Thank you very much for your patch. >> I applied it. >> >> And I added conclusion. >> >> BTW, is the title OK? >> > > Current file in PDF: > http://www.atdot.net/yarv/eabstract.pdf > > Thanks, > -- > // SASADA Koichi at atdot dot net > // > > From benjovi at gmx.net Tue Jun 28 13:41:48 2005 From: benjovi at gmx.net (Benedikt Huber) Date: Tue Jun 28 14:02:36 2005 Subject: [Yarv-devel] Benchmark and errors on amd64 Message-ID: Hi, I could not find benchmark tests for amd64 in the archives, so I'll append mine at the end. I was running yarv-2005-06-28 on (x86_64,2.6.11-gentoo-r3,GCC 3.3.4). I guess I'm not much of a help concerning the bugs which I encountered, so I will simply post them. I'm aware of course, that support for 64 bit is not your primary concern at the moment. Good luck for your poster regards, benedikt <<< BENCHMARK RESULTS Benchmark results: test ruby19 yarv array 15.630000 7.260000 block 1.230000 0.460000 const 10.480000 2.490000 ensure 0.690000 0.160000 factorial Fail 6.600000 fib 4.560000 1.380000 lists 0.220000 0.180000 method 3.880000 2.010000 poly_method 5.030000 2.530000 proc 1.860000 0.550000 reccount Fail 0.010000 regexp 1.600000 1.220000 rescue 7.280000 2.120000 rescue2 1.060000 0.880000 simpleiter 0.430000 0.170000 simplereturn 0.990000 0.360000 so_ackermann 2.280000 0.350000 so_array 12.610000 7.950000 so_concatenate 0.360000 0.140000 so_count_words 0.810000 0.780000 so_exception 5.200000 3.990000 so_matrix 3.770000 2.010000 so_nested_loop 8.600000 4.180000 so_object 9.420000 8.770000 so_random 4.260000 2.860000 so_sieve 2.880000 1.080000 strconcat 5.080000 4.160000 super 13.330000 6.050000 swap 11.860000 2.330000 tak 15.450000 5.200000 tarai 12.420000 5.300000 times 3.340000 1.530000 unif1 11.190000 3.730000 whileloop 18.460000 5.030000 zsuper 15.020000 6.180000 <<< BUGS > make test-all (1) .........Test FAILED: ... def fact(n) ... <306057512216440636035370461297268629388588804173576999416776741259476533176716867465515291422477573349939147888701726368864263907759003154226842927906974559841225476930271954604008012215776252176854255965356903506788725264321896264299365204576448830388909753943489625436053225980776521270822437639449120128678675368305712293681943649956460498166450227716500185176546469340112226034729724066333258583506870150169794168850353752137554910289126407157154830282284937952636580145235233156936482233436799254594095276820608062232812387383880817049600000000000000000000000000000000000000000000000000000000000000000000000000> expected but was <-340546139094868510088329001926454600148619834527454729833618457989685034894320327726928649734065490277167747034958005665714440588800670690476140860371711843614271537531086134029945126685086877069101941370245844211202781151237929874562154089311983952790596197329604551370416486513615981476990434791612805964361249973536898416798959682647581412517825613431059470579872170258816005917026123609961797405063988093587508681034334672743860514271050115736863599501032736523433079649249947703799323686164300516290842357297144570805109269698775319838720000000000000000000000000000000000000000000000000000000000000000000000>. (2) test_case(TestSYNTAX): <*YARV eval*>:10: [BUG] Segmentation fault (3) Finished in 0.769698 seconds. /usr/lib/ruby/1.9/test/unit/util/backtracefilter.rb:16: [BUG] unknown node type 95 ruby 1.9.0 (2005-02-23) [x86_64-linux] From ko1 at atdot.net Tue Jun 28 14:39:48 2005 From: ko1 at atdot.net (SASADA Koichi) Date: Tue Jun 28 14:35:49 2005 Subject: [Yarv-devel] Benchmark and errors on amd64 In-Reply-To: References: Message-ID: <42C19974.5070201@atdot.net> Hi, Thank you for your report. I'll try on my AMD64 box. P.S. Maybe I fixed case/when bugs by last commit. Benedikt Huber wrote: > Hi, > > I could not find benchmark tests for amd64 in the archives, so I'll > append mine at the end. > I was running yarv-2005-06-28 on (x86_64,2.6.11-gentoo-r3,GCC 3.3.4). > > I guess I'm not much of a help concerning the bugs which I encountered, > so I will simply post them. I'm aware of course, that support for 64 > bit is not your primary concern at the moment. > > Good luck for your poster > > regards, > benedikt -- // SASADA Koichi at atdot dot net // From danny at amelang.net Wed Jun 29 01:44:54 2005 From: danny at amelang.net (Daniel Amelang) Date: Wed Jun 29 01:40:11 2005 Subject: [Yarv-devel] OOPSLA Poster Abstract In-Reply-To: <42C16D5B.6060701@atdot.net> References: <42BFE516.5030904@atdot.net> <200506271537.06027.mneumann@ntecs.de> <42C16D5B.6060701@atdot.net> Message-ID: <42C23556.6030706@amelang.net> Hi, I spent some time making quite a few changes. Feel free to take what you like and junk the rest. Notice the subtle change to the title that makes it just a little more clear : "Innovating the Ruby Interpreter" as opposed to "Innovation of Ruby Interpreter". Maybe it's just a personal preference. Again, take my suggestions as just suggestions. I've attached it as a text file that contains the original tex file you sent with all my changes, maybe a diff would have been better. Good luck! You've done a great job. Your english is very impressive. Dan -------------- next part -------------- \documentclass{acm_proc_article-sp} \begin{document} \title{Innovating the Ruby Interpreter} \subtitle{YARV: Yet Another RubyVM} \author{ \alignauthor Koichi Sasada \\ \affaddr{Graduate School of Technology,} \\ \affaddr{Tokyo University of Agriculture and Technology} \\ \affaddr{2-24-16 Nakacho, Koganei-shi, Tokyo, Japan.} \\ \email{sasada@namikilab.tuat.ac.jp} } \maketitle \begin{abstract} Ruby - an Object-Oriented scripting language - is used world-wide because of its ease of use. However, the current interpreter is slow. To solve this problem, some virtual machines were developed, but none with adequate performance or functionality. To fill this gap, I have developed a Ruby interpreter called \emph{YARV (Yet Another Ruby VM)}. YARV is based on a stack machine architecture and features optimizations for high speed execution of Ruby programs. In this poster, I introduce the Ruby programming language, discuss certain characteristics of Ruby from the aspect of a Ruby interpreter implementor, and explain methods of implementation and optimization. Benchmark results are given at the end. \end{abstract} \keywords{Interpreter Implementation, Scripting Language, Ruby} % NOT required for Proceedings \section{Introduction} Ruby is the interpreted scripting language developed by Yukihiro Matsumoto for quick and easy object-oriented programming\cite{ruby-lang, pickaxe}. It is simple, straight-forward, extensible, and portable. It has many features to process text files and to do system management tasks (as in Perl\cite{perl}) and many more. Ruby has the following characteristics. \begin{itemize} \item Simple syntax \item Basic OO features (class, method call, etc.) \item Advanced OO features (all values are objects, mix-ins, singleton methods, etc.) \item Dynamic-typing, re-definable behavior, dynamic evaluation \item Operator overloading \item Exception handling \item Closure and method invocation with a block \item Garbage collection support \item Dynamic module loading \item Many useful libraries \item Highly portable \end{itemize} However, Ruby is slow. This is because the current interpreter (old-ruby) works by traversing an abstract syntax tree and evaluating each node. To solve this problem, I have developed a new Ruby interpreter called YARV (Yet Another RubyVM), which is a stack machine that runs Ruby programs in compiled intermediate representation as sequential instructions. I'm working to replacing old-ruby with YARV. This poster is dedicated to discussing the advantages and challenges that Ruby presents as an interpreter target, with speed-up being the principal goal. YARV's implementation and optimization features are then presented and the results are evaluated. \section{YARV Implementation} \subsection{Overview} YARV is a simple stack machine written in C. The VM has a stack, a program counter (PC), a stack pointer, some frame pointers (FP). YARV compiles Ruby scripts into YARV instruction (intermediate) code sequences. The instruction set is designed especially for Ruby. YARV reuses many parts of old-ruby, namely the Ruby script parser, the object management mechanism, the garbage collector and more. In fact, YARV is implemented as merely an extension module of old-ruby. YARV currently works on Linux with GCC and Windows2000/XP with Visual C++ or cygwin. \subsection{Intepreter Auto Generation} To create the virtual machine, I generate the code for the VM in a VM description language (VMDL) like vmgen\cite{vmgen}. Figure \ref{vmdl} shows the definition of an example VM instruction (named \verb|instruction1|). In the VMDL, one declares operands, stack operands, and return values for each instruction. The programmer doesn't need to write the code to control the PC, SP, stack or fetching operands. Furthermore, VMDL can generate optimized code automatically. This topic will be treated in the next subsection. \begin{figure} \begin{quote} \scriptsize \begin{verbatim} DEFINE_INSTRUCTION instruction1 // instruction name (VALUE op1) // operand values (VALUE sp1) // popped values from stack (VALUE r1) // values will be pushed to stack { // instruction logic of instruction1 // using op1, sp1 // and at last assign value to r1 } \end{verbatim} \end{quote} \caption{VM description language} \label{vmdl} \end{figure} \subsection{Optimization} YARV was implemented with many optimization techniques in order to create a high-speed interpreter. Instruction dispatch makes use of dynamic threaded code\cite{direct-threaded-code} with GCC's extended feature (label as value) instead of \verb|switch/case| statements in C. Since all values in Ruby are objects, Ruby has no primitive types. For example, the Ruby program \verb|1+2| actually means \verb|1.+(2)| (a method \verb|+| is sent to receiver \verb|1| with an argument \verb|2|). To maximize efficiency, some methods are compiled to specialized instructions. In this case, method \verb|+| is complied to the specialized \verb|opt_plus| instruction. \verb|opt_plus| checks the receiver (self) and the argument. If they are both Fixnums, it checks whether method \verb|+| of class Fixnum has been redefined or not. If it has not been redefined, it adds the values and pushes the result onto the stack. Otherwise, the normal method dispatch sequence is performed. Operand unification and instruction unification (also known as super instructions) are used to optimize. If the programmer specifies that an instruction with specific operands or an instruction sequence should be unified, the VM generation system generates unified instructions and compiler logic for this instruction. YARV supports 2-level (2 registers, 5 states) static stack caching\cite{stack-caching}. The VM generation system generates stack caching instructions and a translator for compilation. Ahead-of-Time (AOT) compilation of Ruby programs is also supported. The AOT compiler translates a Ruby program to a C program which runs on YARV. The C compiler then generates native machine code that is more efficient than YARV instruction code. \section{Evaluation} ... \section{Conclusion} In this extended abstract, I described characteristics of the Ruby language and a new implementation of the Ruby interpreter called YARV. Many interpreter optimization schemes have been applied in the creation of YARV that have caused speed-up compared to old-ruby. In the current Ruby interpreter, Ruby threads are user threads contained within the same operating system thread. This means that we can not write true parallel applications in Ruby. As a solution to this problem, YARV will support native threads (managed by the operating system). This will enable Ruby programs to be more scalable. Also I am planning to design a multi-VM instance mechanism similar to Java Multi-Talking VM\cite{java-mvm}. This will improve performance and assist application programs that embed a Ruby interpreter. Ultimately, I will replace the current Ruby interpreter with YARV and YARV will become The Ruby Virtual Machine. \section*{Acknowledgment} This project is assisted by Exploratory Software Project 2004 (youth) and 2005 from IPA (Information-technology Promotion Agency, Japan) . I want to thank Michael Neumann, all the yarv-devel mailing list members and all Rubyists. \bibliographystyle{abbrv} \bibliography{yarve} \end{document} From jeremy at bitsweat.net Wed Jun 29 01:49:52 2005 From: jeremy at bitsweat.net (Jeremy Kemper) Date: Wed Jun 29 01:46:25 2005 Subject: [Yarv-devel] OOPSLA Poster Abstract In-Reply-To: <42C23556.6030706@amelang.net> References: <42BFE516.5030904@atdot.net> <200506271537.06027.mneumann@ntecs.de> <42C16D5B.6060701@atdot.net> <42C23556.6030706@amelang.net> Message-ID: On Jun 28, 2005, at 10:44 PM, Daniel Amelang wrote: > I spent some time making quite a few changes. Feel free to take > what you > like and junk the rest. Notice the subtle change to the title that > makes > it just a little more clear : "Innovating the Ruby Interpreter" as > opposed to "Innovation of Ruby Interpreter". Maybe it's just a > personal > preference. Again, take my suggestions as just suggestions. That sounds odd. How about "Rite: the Ruby Virtual Machine." Best, jeremy From vincent.isambart at gmail.com Wed Jun 29 03:27:25 2005 From: vincent.isambart at gmail.com (Vincent Isambart) Date: Wed Jun 29 03:22:37 2005 Subject: [Yarv-devel] OOPSLA Poster Abstract In-Reply-To: <52621378-0973-4C4D-9CF6-FF64124996B1@infoether.com> References: <42BFE516.5030904@atdot.net> <200506271537.06027.mneumann@ntecs.de> <42C16D5B.6060701@atdot.net> <42C16DB6.80804@atdot.net> <52621378-0973-4C4D-9CF6-FF64124996B1@infoether.com> Message-ID: <7d9a1f530506290027ebba631@mail.gmail.com> > You may want to make sure you consistently capitalize Ruby. There > are places where you do and don't. I agree that you should be careful about that, but Ruby should not always be capitalized. "Ruby" is the language. "ruby" is the Ruby interpreter. Cheers, Vincent From surrender_it at yahoo.it Wed Jun 29 10:59:05 2005 From: surrender_it at yahoo.it (gabriele renzi) Date: Wed Jun 29 10:54:17 2005 Subject: [Yarv-devel] bug in assignment with mixed ary/values Message-ID: <20050629145905.25943.qmail@web26201.mail.ukl.yahoo.com> Hi list, it seem that multiple assigment with mixed arrays, values fails: def test_mixed_ary_elems ae %q{ a = :a; b = :b; c = :c; d = :d w, (x, y) = a, [b, c] [w,x,y] } ae %q{ a = :a; b = :b; c = :c; d = :d w, (x, y), z = a, [b, c], d [w,x,y,z] } ae %q{ a = :a; b = :b; c = :c; d = :d (x, y),z = [b, c],d [x,y,z] } end all three segfault. Same win32 configuration of last mail. icq #69488917 ____________________________________________________ Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com From danny at amelang.net Wed Jun 29 12:27:48 2005 From: danny at amelang.net (Daniel Amelang) Date: Wed Jun 29 12:23:00 2005 Subject: [Yarv-devel] OOPSLA Poster Abstract Message-ID: <20050629162748.5951.qmail@hoster912.com> > "Ruby" is the language. > "ruby" is the Ruby interpreter. In the YARV poster abstract, the current Ruby interpreter is always referred to as 'old-ruby', while the new interpreter is called 'YARV', and any reference to 'Ruby' is referring to the language. Dan From matju at artengine.ca Wed Jun 29 14:13:43 2005 From: matju at artengine.ca (Mathieu Bouchard) Date: Wed Jun 29 14:08:54 2005 Subject: [Yarv-devel] OOPSLA Poster Abstract Message-ID: On Wed, 29 Jun 2005, Vincent Isambart wrote: > I agree that you should be careful about that, but Ruby should not > always be capitalized. "Ruby" is the language. "ruby" is the Ruby > interpreter. BTW that's the same as in Perl/perl and possibly that the great influence of Perl has made it also a convention with some other languages. ,-o--------o--------o--------o-. ,---. irc.freenode.net #dataflow | | The Diagram is the Program tm| | ,-o-------------o--------------o-. `-o------------o-------------o-' | | Mathieu Bouchard (Montr?al QC) | | t?l?phone:+1.514.383.3801`---' `-o-- http://artengine.ca/matju -' From benjovi at gmx.net Thu Jun 30 02:23:28 2005 From: benjovi at gmx.net (Benedikt Huber) Date: Thu Jun 30 02:19:00 2005 Subject: [Yarv-devel] Re: Benchmark and errors on amd64 In-Reply-To: <42C19974.5070201@atdot.net> References: <42C19974.5070201@atdot.net> Message-ID: SASADA Koichi wrote: > Hi, > > Thank you for your report. > I'll try on my AMD64 box. > P.S. Maybe I fixed case/when bugs by last commit. In revision 183, test_for,test_param2 (unknown node type 95) and test_case(segfault) do not work. On test_fact: The fixnum multiplication overflow check in insns.def does not work on my machine - it seems to work correctly however, if one uses the check from ruby19:'numeric.c'. best regards, benedikt Index: insns.def =================================================================== --- insns.def (revision 183) +++ insns.def (working copy) @@ -1910,7 +1910,7 @@ c = a * b; val = LONG2FIX(c); - if (FIX2LONG(val) != c) { + if (FIX2LONG(val) != c || c/a != b) { val = rb_big_mul(rb_int2big(a), rb_int2big(b)); } } >>> Debugging output as illustration (a factorial test) a is 21,b is 2432902008176640000,c=a*b is -4249290049419214848 LONG2FIX(c) is -8498580098838429695 FIX2LONG(LONG2FIX(c)) is -4249290049419214848 > > Benedikt Huber wrote: > >>Hi, >> >>I could not find benchmark tests for amd64 in the archives, so I'll >>append mine at the end. >>I was running yarv-2005-06-28 on (x86_64,2.6.11-gentoo-r3,GCC 3.3.4). >> >>I guess I'm not much of a help concerning the bugs which I encountered, >>so I will simply post them. I'm aware of course, that support for 64 >>bit is not your primary concern at the moment. >> >>Good luck for your poster >> >>regards, >>benedikt > > From ko1 at atdot.net Thu Jun 30 22:03:27 2005 From: ko1 at atdot.net (SASADA Koichi) Date: Thu Jun 30 21:59:22 2005 Subject: [Yarv-devel] Re: Benchmark and errors on amd64 In-Reply-To: References: <42C19974.5070201@atdot.net> Message-ID: <42C4A46F.8070909@atdot.net> Hi, Benedikt Huber wrote: > In revision 183, test_for,test_param2 (unknown node type 95) and > test_case(segfault) do not work. > > On test_fact: > The fixnum multiplication overflow check in insns.def does not work on > my machine - it seems to work correctly however, if one uses the check > from ruby19:'numeric.c'. I fixed it (I ran and check it on AMD64 Linux box). = reason FIX2INT(0) => FIX2INT(Qfalse) doesn't claim in 32 bit environment. But on 64 bit environment, it's raise error (cast error). and delete some "int" types :P Thanks a lot. -- // SASADA Koichi at atdot dot net // From ko1 at atdot.net Thu Jun 30 23:59:32 2005 From: ko1 at atdot.net (SASADA Koichi) Date: Thu Jun 30 23:55:25 2005 Subject: [Yarv-devel] OOPSLA Poster Abstract In-Reply-To: <42C23556.6030706@amelang.net> References: <42BFE516.5030904@atdot.net> <200506271537.06027.mneumann@ntecs.de> <42C16D5B.6060701@atdot.net> <42C23556.6030706@amelang.net> Message-ID: <42C4BFA4.5050004@atdot.net> Hi, Thanks a lot, everyone. I fixed extended abstarct. It's RC1. http://www.atdot.net/yarv/oopsla2005eabstract-rc1.pdf http://www.atdot.net/yarv/oopsla2005eabstract-rc1.tex I'll post it by the end of today. Daniel Amelang wrote: > Hi, > > I spent some time making quite a few changes. Feel free to take what you > like and junk the rest. Notice the subtle change to the title that makes > it just a little more clear : "Innovating the Ruby Interpreter" as > opposed to "Innovation of Ruby Interpreter". Maybe it's just a personal > preference. Again, take my suggestions as just suggestions. > > I've attached it as a text file that contains the original tex file you > sent with all my changes, maybe a diff would have been better. > > Good luck! You've done a great job. Your english is very impressive. > > Dan > Thanks, -- // SASADA Koichi at atdot dot net //