<Antiarc>
well this is interesting - booting my Rails app doesn't result in those gemspec exceptions.
<Antiarc>
It still generates a couple hundred exceptions, though.
<nirvdrum>
It'd have to be really smart about super calls, I think. But flatten in general works. method_missing is the problem.
<Antiarc>
I'm trying to figure out where that exception is caught and handled
<Antiarc>
If it's fully internal, I wonder if there could be some flag set on the context that tells it to not generate a backtrace, since it's basically just a flow control exception at that point
<nirvdrum>
RubyClass.checkFuncallMissing I think
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Antiarc>
do you know what the default value of jump.backtrace is?
<nirvdrum>
Nay.
<nirvdrum>
I think your cheap way out is defining to_ary on Gem::Specification to return [self].
<nirvdrum>
This looks like a gotcha in Ruby, like trying to compare URLs in Java. I'm not sure how to cleanly handle it other than do away with the method_missing fallback.
<nirvdrum>
Which I do think is sensible. But people do all sorts of crazy stuff with method_missing, so it'll probably break someone.
_djbkd has quit [Remote host closed the connection]
<Antiarc>
heh, yeah
<nirvdrum>
I don't have a problem with the coercion methods, but I don't think it's unreasonable to expect that they've been defined methods or at the very least, come up with respond_to?
marr has quit [Ping timeout: 255 seconds]
<nirvdrum>
It looks like Gem::Specification defines respond_to_missing? though. So it seems they may have been trying to guard against this situation.
<nirvdrum>
Antiarc: If you ever look at how RubyGems hooks in, it's absolutely nutty. I mean, it made sense initially, but MRI should have folded it in more sensibly. Basically, it intercepts LoadErrors on a require statement (which, at that point is an exhaustive O(N) search through $LOAD_PATH) and appends a new $LOAD_PATH entry.
<Antiarc>
Yuuuup.
<Antiarc>
I'm familiar with its insanity, heh
<nirvdrum>
If you end up requiring multiple files from the same gem, each file now takes another O(N) pass.
<Antiarc>
And every time I try to fix it it breaks things horribly
<Antiarc>
Yeah, I use require_relative exclusively when I can, specifically to work around that :)
<nirvdrum>
But it stagnated over the use of FileSystem APIs not available on Java 6.
<Antiarc>
yeah, I remember this one
<Antiarc>
everything old is new again!
<Antiarc>
brixen: standalone seems to be having some require issues, gonna take a while to work through them, heh
<brixen>
Antiarc: ah bummer
tcrawley-away is now known as tcrawley
<Antiarc>
Oy, there are a number of gems which use Gem::Specification to reflect on themselves at runtime, too, it seems
<Antiarc>
So I'm going to have to hack up something in that shim to support it.
mje113 has quit [Quit: Connection closed for inactivity]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] nirvdrum pushed 3 new commits to rbx-2.5.6-upgrade: http://git.io/vLRTR
<JRubyGithub>
jruby/rbx-2.5.6-upgrade 01e92f5 Kevin Menard: [Truffle] Added a NULL pointer specialization for Rubinius::FFI::Platform::POSIX.getgroups.
<JRubyGithub>
jruby/rbx-2.5.6-upgrade 295ee75 Kevin Menard: [Truffle] Handle setting of Range ivars in Rubinius code.
_djbkd has quit [Remote host closed the connection]
mistergibson has joined #jruby
skade has quit [Quit: Computer has gone to sleep.]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] enebo pushed 1 new commit to master: http://git.io/vLg96
<JRubyGithub>
jruby/master 5387c34 Thomas E. Enebo: Make matchinstr extend callinstr vs base since it is a return value call....
JRubyGithub has left #jruby [#jruby]
skade has joined #jruby
skade has quit [Ping timeout: 276 seconds]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] mkristian opened issue #3065: make the IsolatedScriptingContainer work from ruby itself and set GEM_HOME as well http://git.io/vLg7F
<enebo>
nirvdrum: I take it that is still you merging rbx update?
yfeldblum has joined #jruby
rsim has joined #jruby
mje113 has quit [Quit: Connection closed for inactivity]
x1337807x has joined #jruby
x1337807x has quit [Max SendQ exceeded]
x1337807x has joined #jruby
x1337807x has quit [Max SendQ exceeded]
x1337807x has joined #jruby
mrmargolis has joined #jruby
DomKM has quit [Quit: Connection closed for inactivity]
bbrowning is now known as bbrowning_away
mrmargol_ has quit [Ping timeout: 246 seconds]
sdogruyol has joined #jruby
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] enebo pushed 2 new commits to master: http://git.io/vL2sV
<JRubyGithub>
jruby/master 277205a Thomas E. Enebo: Remove name as a field in Temporary Variable....
<JRubyGithub>
jruby/master 9a4dcb2 Thomas E. Enebo: Make a single ReceiveSelfInstr instance....
JRubyGithub has left #jruby [#jruby]
sdogruyol has quit [Ping timeout: 276 seconds]
<nirvdrum>
enebo: Looking. I haven't merged anything yet.
<enebo>
nirvdrum: oh I guess I did not notice that part :) Some truffle error though
<nirvdrum>
eregon moved MRI tests out of "allowed to fail" earlier.
cpuguy83 has quit [Ping timeout: 272 seconds]
cpuguy83_ is now known as cpuguy83
<enebo>
nirvdrum: Does truffle during translation store the file which is being translated somewhere?
mrmargol_ has joined #jruby
<nirvdrum>
We just use the source position.
<enebo>
nirvdrum: only direct evidence I see is in MethodTranslator
<enebo>
nirvdrum: but you do not retain ISourcePosition
<enebo>
nirvdrum: sorry when you make a MethodTranslator
<nirvdrum>
Sorry, I take that back. We use Truffle's SourceSection. I think we build that up from ISourcePosition.
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] bbelleville opened pull request #3066: Create Truffle specific main function. (master...truffle-main) http://git.io/vL28F
JRubyGithub has left #jruby [#jruby]
mrmargol_ has quit [Remote host closed the connection]
<enebo>
nirvdrum: are bodies of scripts and classes/modules done with MethodTranslator?
<nirvdrum>
We need to know the filename & line number at some level for backtraces.
<enebo>
nirvdrum: yeah I am just trying to figure out if I can change things so you can grab it when you process RootNode
<enebo>
nirvdrum: I am thinking about storing it on StaticScope instead of SourcePosition and then storing line on Node
<nirvdrum>
chrisseaton might know more readily. I'd have to review the code a bit.
rsim has quit [Quit: Leaving.]
<enebo>
This will reduce memory usage and get rid of 100k getPosition() calls
mrmargolis has quit [Ping timeout: 252 seconds]
<enebo>
nirvdrum: I will poke. This is just something I am looking at
<enebo>
nirvdrum: I realized we always have staticScopes and we have many less instances than nodes
<nirvdrum>
Is this entirely parse related? Or does it impact IR at a deeper level?
<enebo>
nirvdrum: just memory and maybe startup time
<enebo>
nirvdrum: I am almost done to <80M for interp of empty rails app vs 65M on 1.7
<nirvdrum>
Gotcha. So it could be done in 1.7 if you were motivated enough?
<enebo>
nirvdrum: it could I think but I am not as concerned about improving 1.7 at this point
<enebo>
nirvdrum: I feel like the ship is sailing
<nirvdrum>
Yeah, that's fine. I was more curious if you thought this was the reason 9k is heftier than 1.7. But it sounds like this particular thing has been around a long time.
<enebo>
nirvdrum: so we will fix compat issues but not do any more invasive improvements
<enebo>
we are heftier because IR > AST in memory size
<enebo>
we build to IR lazily for methods so AST size still matters quite a bit
<enebo>
Even unevaluated methods are AST + IR scope to hold the AST so even that means unevaluated methods are larger than 1.7 (not by a large amount)
<nirvdrum>
As far as I can tell, we always use MethodTranslator to compile methods. And we treat blocks and lambdas the same as methods.
<enebo>
nirvdrum: I take that back that only gets line
tcrawley is now known as tcrawley-away
<nirvdrum>
I think the flow is RubyContext -> TranslatorDriver -> BodyTranslator (or another). And the source filename cascades down from RubyContext while the line number comes from ISourcePosition.
<enebo>
nirvdrum: yeah that is what I saw…you see my confusion about MethodTranslator
<enebo>
nirvdrum: but I think probably top-level load is an anonmyous method internally
thsig has quit [Ping timeout: 256 seconds]
<enebo>
nirvdrum: only downside to that theory is that method appears to be dead
thsig has joined #jruby
<enebo>
nirvdrum: ah I got it…the top parse method is dead I think (maybe should be removed?) but next one you guys calc filename so it does not use sourceposition at all
<nirvdrum>
I see one is dead. There are a few parse methods in there though.
<nirvdrum>
We load through nodes in KernelNodes or special handling for -e and -r at startup.
<enebo>
nirvdrum: ok but I think filename is in Source and so I think so long as I can get reference to that in translators I can kill off the few ISourcePosition.getFile uses for warnings
<enebo>
nirvdrum: all other position info is only for line which then I can more easily cope with
<nirvdrum>
Yeah, I think that's accurate.
<nirvdrum>
Having said that, I did just start using this to deal with parser warnings coming from Rubinius files.
<enebo>
nirvdrum: using node.getSourcePosition()?
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] chrisseaton pushed 4 new commits to master: http://git.io/vL2gk
<JRubyGithub>
jruby/master 8d66179 Brian Belleville: Fix formatting issues...
<JRubyGithub>
jruby/master c61096f Brian Belleville: Create Truffle specific main function.
<JRubyGithub>
jruby/master 40a0206 Brian Belleville: Add license header.
JRubyGithub has left #jruby [#jruby]
<nirvdrum>
enebo: lexer.tokline.getFile(), it appears.
<enebo>
nirvdrum: oh well that is a different problem but trivially changed
<enebo>
nirvdrum: lexer knows its file so if you have if we can make a better method
<nirvdrum>
Rubinius doesn't have parse warnings and as such, I don't think they care to change their code around to prevent them. Rather than constantly patch their source, I figured I'd suppress parse warnings just in their files.
<enebo>
nirvdrum: it can probably be src.getFilename();
<enebo>
nirvdrum: or it should be since you are not indirectnig through an ISourcePosition object
<enebo>
nirvdrum: oh lexer.src.getFile();
<enebo>
nirvdrum: Did not notice it was in ParserSupport
<nirvdrum>
Okay. I think I looked at that and there was potentially casting involved. Or maybe it was a difference in the different lexer implementations.
<enebo>
nirvdrum: so add RubyLexer.getFile() method and use that
<enebo>
nirvdrum: I realize src is private but probably do not want src to escape this class
<nirvdrum>
Okay, I can do that. I didn't want to be all that invasive.
<nirvdrum>
And I picked the thing that looked like it had the data I wanted while sitting in a debugger.
<enebo>
nirvdrum: yeah it is currently correct to use it but if I kill it them this is one less thing
<enebo>
nirvdrum: so in any translator I think I can do source.getName() and it will be same as node.getPosition().getFile()
<nirvdrum>
I think so. But I'd say go for it. If anything breaks we didn't have tests for, that's on us.
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] chrisseaton pushed 1 new commit to master: http://git.io/vL2Vo
<JRubyGithub>
jruby/master 784503e Chris Seaton: [Truffle] Slight formatting.
JRubyGithub has left #jruby [#jruby]
<enebo>
nirvdrum: Does that mean I can also kill that dead parse method? :)
<nirvdrum>
I don't see why not. I'm kinda surprised FindBugs didn't flag it.
drbobbeaty has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<enebo>
nirvdrum: what is best truffle test target for sanity?
<nirvdrum>
We mostly use "jt test fast".
<enebo>
oh but then I need to install some stuff
<nirvdrum>
It's just a bash function.
<enebo>
I did mvn -Prtruffle-test or something like that
<nirvdrum>
ruby tool/jt.rb test fast
skade has joined #jruby
<enebo>
nirvdrum: JRuby the project with a million dev entry points
<nirvdrum>
Heh. This was our way of running a subset of tests without having a million maven profiles.
<nirvdrum>
It runs mspec directly.
<enebo>
nirvdrum: not complaining :) I am always just surprised how much disparate tooling we have
<nirvdrum>
mvn -Ptruffle-specs-core or mvn -Ptruffle-specs-language would probably be decent targets.
<nirvdrum>
There were some unit tests for source positions, but I think the detailed one got killed off already.
<enebo>
nirvdrum: nothing failed on test fast
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] enebo pushed 1 new commit to master: http://git.io/vL2o4
<JRubyGithub>
jruby/master cbc1511 Thomas E. Enebo: Hopefully remove ISourcePosition.getFile() usage from Truffle
JRubyGithub has left #jruby [#jruby]
<nirvdrum>
Now here's hoping you don't cause too many merge conflicts for me :-)
<enebo>
nirvdrum: only 4 lines
<enebo>
nirvdrum: unless you are changing warnings it should be fine
<enebo>
nirvdrum: or modifying the dead code I removed
<nirvdrum>
Nah. It should be good. My PR just hits 118 files.
<nirvdrum>
Someone hitting tab somewhere would probably conflict at this point.
skade has quit [Quit: Computer has gone to sleep.]