From: Park Heesob Date: 2008-03-22T09:56:28+09:00 Subject: Re: Ruby Compiler Hi, ----- Original Message ----- From: "Luis Lavena" Newsgroups: comp.lang.ruby To: "ruby-talk ML" Sent: Saturday, March 22, 2008 7:15 AM Subject: Re: Ruby Compiler > On 21 mar, 14:49, Heesob Park wrote: >> Hi, >> >> I longed for a ruby byte code compiler. >> But I guess YARV is not stable until now. >> >> So I made a very experimental Ruby Compiler. >> Actually it is not a true compiler just ruby object dumper and loader. >> By modifing gc.c and eval.c , It cannot be distibuted as extension >> library. >> >> The main idea is simple. >> 1. Dump all symbols,ids and node tree to a file. >> 2. Load the symbols,ids and tree from a file and run. >> >> But I should have spent much time to understand how to parsing and >> evalualing >> the ruby code. >> >> With this compiler, you can secure your source code. >> And saving parsing time is the main advantage. >> Even the same object file can runs on Linux and Windows just like Java >> class. >> >> What do you think about this compiler? >> > > Looks interesting , one question: > > Does the loading for the parsed/node tree generated dump avoid > evaluation? I mean, there is no need to reparse it, right? If so, then > you have a speed boost when loading pre-compiled ruby scripts and > sounds good. > Yes, of course. The main purpose is speed up. > How it handles reload of files (using load 'foo.rb' compares the mtime > of the pre-compiled file with the source file?) > More work is needed for this problem. Currently it direcly loads the pre-compiled file. > Regards, > -- > Luis Lavena > > Regards, Park Heesob