I tried to eliminate getRubyClass() from ThreadContext tonight. It almost worked. The single point of failure seems to be in block behavior. Consider:
module Foo; end Foo.module_eval { # (Ruby) Defined within Foo def abc; end # (Ruby) Defined within Object XYZ = 10 } p defined? XYZ p defined? abc Ruby can be wild stuff sometimes... In our code when in yield we are calling getRubyClass() for defnNode visitor (which would return Foo since we pushed it there during TC.yield. ConstDecl visitor will use getCRef() and that would end up being Object (which we also set somewhere in the tangle on TC.yield). I can see one obvious issue with removing getRubyClass and it's stack. At least I need to figure out how to get Foo in some cases and Object in others without needing to maintain a second stack. Decent speed gain since we constantly smack these stacks -Tom -- + http://www.tc.umn.edu/~enebo +---- mailto:[EMAIL PROTECTED] ----+ | Thomas E Enebo, Protagonist | "Luck favors the prepared | | | mind." -Louis Pasteur | ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel