MagLev / maglev

GemStone Maglev Ruby Repository
http://maglev.github.io
518 stars 41 forks source link

Issue 373 #391

Closed zenspider closed 9 years ago

zenspider commented 9 years ago

Correct state transitions for cmdargs. Fixes #373.

zenspider commented 9 years ago

I can't do anything with the output from the CI. It says nothing of value. Clue?

966 % cd maglev
967 % ../rebuild.sh

cd ~/maglev
+ cd /home/ryan/maglev

(cd src/kernel/parser && ./parser.sh)
+ cd src/kernel/parser
+ ./parser.sh
  byacc ok
Compiling rubyast.o
Linking libmagparse.so
Copying libmagparse.so to /home/ryan/maglev/gemstone/lib/
./bin/maglev-ruby -e 'puts(foo:1)'
+ ./bin/maglev-ruby -e 'puts(foo:1)'
{:foo=>1}
timfel commented 9 years ago

Well, the changes to the parser produce a syntax error in Class.rb during primitive loading. There isn't much more in the log :(

AllenOtis commented 9 years ago

The last time I debugged parser issues in primitive loading, I started a stone with the extent0.dbf from the smalltalk server. Then using the following .topazini contents ----------- .topazini set user DataCurator pass swordfish set gemstone display oops omit classoops set stackpad 50 set tab 8 omit bytes limit bytes 5000 limit oops 20 level 0

display pauseone

Then at the topaz prompt execute the following commands

output push loadprims.out limit bytes 100 display pauseonerror inp $MAGLEV_HOME/src/smalltalk/ruby/allprims.gs

Topaz will stop at the first error .

On Thu, Apr 30, 2015 at 8:14 AM, Tim Felgentreff notifications@github.com wrote:

Well, the changes to the parser produce a syntax error in Class.rb during primitive loading. There isn't much more in the log :(

— Reply to this email directly or view it on GitHub https://github.com/MagLev/maglev/pull/391#issuecomment-97833887.

zenspider commented 9 years ago

Thanks Allan. That got me back on track, tho I'm mostly debugging by using maglev-ruby and tracing state transitions between mri's parser.y and maglev's grammar.y.

This should have put us back on track. It does not yet fix the two files that were broken in the last merge. I'll look at those next.

timfel commented 9 years ago

@zenspider thanks for doing all that work! The last time @matthias-springer and I worked on the parser (for the initial 1.9 push), it was a wholly frustrating experience...

zenspider commented 9 years ago

BTW, my current approach is simply to fix up the state transitions as needed to match MRI 1.9's. This work is being done against the current parser and only towards addressing the cmdarg bug and any related bugs that crop up.

I also have a branch that is overhauling the entire grammar to match 1.9's (the current is a hybrid, but mostly 1.8). But since it's a much larger endeavor, I wanted to get the mainline running again so other's can keep going.

zenspider commented 9 years ago

@timfel you're very very welcome. I'm just happy I can even contribute. I agree that it is frustrating, but I think I've got a couple tricks that are helping. I've doped all state transitions in MRI's and maglev's parsers and can run the same code side-by-side to see where we differ. It has made hunting these down a much easier affair.

zenspider commented 9 years ago

Hold off merging. I might have a quick fix for the other files. Repro:

:rescue

really. :(

zenspider commented 9 years ago

incoming

zenspider commented 9 years ago

OK. Please review and merge.