From rubyroid2000-yarv at yahoo.com Sat Dec 4 02:33:24 2004 From: rubyroid2000-yarv at yahoo.com (Kent Sibilev) Date: Sat Dec 4 02:32:30 2004 Subject: [Yarv-devel] Running mysql.rb module with YARV Message-ID: <20041204073325.33619.qmail@web60904.mail.yahoo.com> Wow, this is very very cool! I was able finally to run pure ruby mysql.rb module with YARV. The test was very simple: iterate through all tables collecting all records to the array and writing this array to the file at the end of the script. With YARV it is almost two times faster :-). ruby: real 0m5.268s user 0m4.540s sys 0m0.080s yarv: real 0m2.975s user 0m2.470s sys 0m0.070s First I had to remove 'defined?' keyword from the script along with $1, $2, etc globals, because YARV doesn't support them yet. Then I had to implement NODE_DEFS besides my implementation of multiple assignments. Koichi if you want I can send you the patch, but it almost the same as the implementation of NODE_DEFN. Also I had to spend a couple of hours catching a bug when my ruby process just hanged without doing anything. It was caused by the following bug: class Result def initialize(mysql, fields, field_count, data=nil) p(mysql, fields, field_count, data) end end Result.new(1, 2, 3, 4) plain ruby returns 1,2,3,4, but yarv returns 1,2,3,nil. It seems YARV doesn't handle optional parameters correctly. If I only knew how to fix it... I am more than impressed. :-) Cheers, Kent. From surrender_it at yahoo.it Mon Dec 13 16:40:08 2004 From: surrender_it at yahoo.it (gabriele renzi) Date: Mon Dec 13 16:38:53 2004 Subject: [Yarv-devel] test-all fails for revision 91 on mingw and double definition of VMDEBUG Message-ID: <20041213214008.51653.qmail@web50105.mail.yahoo.com> running make test-all... [..snip..] 0027 send_opopt__WC___WC__Qfalse_0__WC__SC_ax_ax:*, 1, 0 0031 opt_plus_SC_ax_ax DBG> : main DBG> : :+ <*YARV eval*>:15: [BUG] undefined method ruby 1.9.0 (2004-12-13) [i386-mingw32] This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. make: *** [test-all] Error 3 with: ruby 1.9.0 (2004-12-13) [i386-mingw32] gcc version 3.4.2 (mingw-special) windows xp pro service pack 2 athlon xp 2000+ BTW koichi, are you ok if I keep complaining about this kind of stuff (test failures or benchmark problems or something else) ? ===== icq #69488917 ___________________________________ Nuovo Yahoo! Messenger: E' molto pi? divertente: Audibles, Avatar, Webcam, Giochi, Rubrica Scaricalo ora! http://it.messenger.yahoo.it From ko1 at atdot.net Tue Dec 14 01:47:45 2004 From: ko1 at atdot.net (SASADA Koichi) Date: Tue Dec 14 01:48:32 2004 Subject: [Yarv-devel] test-all fails for revision 91 on mingw and double definition of VMDEBUG In-Reply-To: (Your message of "Mon, 13 Dec 2004 22:40:08 +0100 (CET) ") <20041213214008.51653.qmail@web50105.mail.yahoo.com> References: <20041213214008.51653.qmail@web50105.mail.yahoo.com> Message-ID: <20041214154745.143da4%ko1@atdot.net> gabriele renzi wrote : [ [Yarv-devel] test-all fails for revision 91 on mingw and double definition of VMDEBUG ] at Mon, 13 Dec 2004 22:40:08 +0100 (CET) Hi, > make: *** [test-all] Error 3 Current YARV is very unstable because of implimenting stack caching. You can pass all test with this option --disable-opt-stack-caching at running extconf.rb > BTW koichi, are you ok if I keep complaining about > this kind of stuff (test failures or benchmark > problems or something else) ? any report is very welcome. Thanks, -- // SASADA Koichi at atdot dot net // From ko1 at atdot.net Tue Dec 14 08:58:14 2004 From: ko1 at atdot.net (SASADA Koichi) Date: Tue Dec 14 08:59:01 2004 Subject: [Yarv-devel] test-all fails for revision 91 on mingw and double definition of VMDEBUG In-Reply-To: <20041213214008.51653.qmail@web50105.mail.yahoo.com> References: <20041213214008.51653.qmail@web50105.mail.yahoo.com> Message-ID: <41BEF176.1040803@atdot.net> Hi, gabriele renzi wrote: > make: *** [test-all] Error 3 fix it. -- // SASADA Koichi at atdot dot net // From maeda-yarv at atusi.org Tue Dec 14 09:08:37 2004 From: maeda-yarv at atusi.org (MAEDA Atusi) Date: Tue Dec 14 09:07:22 2004 Subject: [Yarv-devel] test-all fails for revision 91 on mingw and double definition of VMDEBUG In-Reply-To: <41BEF176.1040803@atdot.net> (SASADA Koichi's message of "Tue, 14 Dec 2004 22:58:14 +0900") References: <20041213214008.51653.qmail@web50105.mail.yahoo.com> <41BEF176.1040803@atdot.net> Message-ID: SASADA Koichi writes: > > make: *** [test-all] Error 3 > > fix it. You mean "fixed it.", dont' you? :-) --maeda From ko1 at atdot.net Tue Dec 14 09:15:15 2004 From: ko1 at atdot.net (SASADA Koichi) Date: Tue Dec 14 09:16:01 2004 Subject: [Yarv-devel] test-all fails for revision 91 on mingw and double definition of VMDEBUG In-Reply-To: (Your message of "14 Dec 2004 23:08:37 +0900") References: <20041213214008.51653.qmail@web50105.mail.yahoo.com> <41BEF176.1040803@atdot.net> Message-ID: <20041214231515.1adf093%ko1@atdot.net> MAEDA Atusi wrote : [ Re: [Yarv-devel] test-all fails for revision 91 on mingw and double definition of VMDEBUG ] at 14 Dec 2004 23:08:37 +0900 > You mean "fixed it.", dont' you? :-) Yes. Thank you. -- // SASADA Koichi at atdot dot net // From surrender_it at yahoo.it Sat Dec 18 10:42:55 2004 From: surrender_it at yahoo.it (gabriele renzi) Date: Sat Dec 18 10:41:28 2004 Subject: [Yarv-devel] useless stuff and warnings Message-ID: <20041218154255.83927.qmail@web50109.mail.yahoo.com> Hi, I was just taking a look at rb\insns2vm.rb, and I noticed this: f.each{|line| while line = f.gets [snipped stuff] end } isn't f.each useless? Also, why are you freezing arrays in the "initialize" method? Another thing related to 'useless', maybe of interest. I had CFLAGS="-W -Wall" when compiling latest yarv, and there were 4000+ warnings. Most of them are caused from: - unused return variables from debug*, GC_CHECK, and NEW_SEQ macros - unused variables in compile.c, disasm.c, vm.c, yarvcore.c A lesser part are: longjmp warnings, comparison withouth casts, and some interesting: "warning: operation on `reg_pc' may be undefined" wich is caused by ADD_PC(x+y). Are warnings considered useless? (ruby itself has lots of them) ===== icq #69488917 ___________________________________ Nuovo Yahoo! Messenger: E' molto pi? divertente: Audibles, Avatar, Webcam, Giochi, Rubrica Scaricalo ora! http://it.messenger.yahoo.it From ko1 at atdot.net Sun Dec 19 10:01:23 2004 From: ko1 at atdot.net (SASADA Koichi) Date: Sun Dec 19 10:01:02 2004 Subject: [Yarv-devel] useless stuff and warnings In-Reply-To: <20041218154255.83927.qmail@web50109.mail.yahoo.com> References: <20041218154255.83927.qmail@web50109.mail.yahoo.com> Message-ID: <41C597C3.4080509@atdot.net> Hi, gabriele renzi wrote: > Hi, > > I was just taking a look at rb\insns2vm.rb, and I > noticed this: > > f.each{|line| > while line = f.gets > [snipped stuff] > end > } > > isn't f.each useless? Yes :) > Also, why are you freezing arrays in the "initialize" > method? for prevent bugs. h = Hash.new{ [].freeze } h[:not_available_key] << :val # should be error > Another thing related to 'useless', maybe of interest. > I had CFLAGS="-W -Wall" when compiling latest yarv, > and there were 4000+ warnings. > Most of them are caused from: > - unused return variables from debug*, GC_CHECK, and > NEW_SEQ macros > - unused variables in compile.c, disasm.c, vm.c, > yarvcore.c > > > A lesser part are: longjmp warnings, comparison > withouth casts, and some interesting: > "warning: operation on `reg_pc' may be undefined" wich > is caused by ADD_PC(x+y). > > Are warnings considered useless? (ruby itself has lots > of them) Thank you. I'll fix these. But I can't understand why "reg_pc may be undefined"? Because reg_pc is allocated at "esi" register explicitly? From surrender_it at yahoo.it Sun Dec 19 11:50:01 2004 From: surrender_it at yahoo.it (gabriele renzi) Date: Sun Dec 19 11:48:33 2004 Subject: [Yarv-devel] useless stuff and warnings In-Reply-To: <41C597C3.4080509@atdot.net> Message-ID: <20041219165001.77669.qmail@web50107.mail.yahoo.com> --- SASADA Koichi ha scritto: > Thank you. I'll fix these. thank you for doing it :) > But I can't understand why "reg_pc may be > undefined"? > Because reg_pc is allocated at "esi" register > explicitly? I'm not sure I understand it correctly, but I think it happens because: (in insnshelper.h) #define ADD_PC(n) (SET_PC(REG_PC += (n))) and #define SET_PC(x) (REG_PC=(USAGE_ANALYSIS_REGISTER(0,1),(x))) so you're assigning twice to reg_pc in the same expression, and this is undefined behaviour in the C standard. If you rewrite it like: #define ADD_PC(n) (REG_PC+=(n), SET_PC(REG_PC)) gcc emits no warning related to this. But I think this should just be: #define ADD_PC(n) (SET_PC(REG_PC+n)) (again, no warnings) ===== icq #69488917 ___________________________________ Nuovo Yahoo! Messenger: E' molto pi? divertente: Audibles, Avatar, Webcam, Giochi, Rubrica Scaricalo ora! http://it.messenger.yahoo.it