## RubyConfBR 2012
# what's new on JRuby 1.7?
### [@qmx](http://twitter.com/qmx) - [blog.qmx.me](http://blog.qmx.me)
## the
# biggest
### release

~ 2.666...
issues closed
daily
OO
taken to the next level
IRubyObject x; // 1
IRubyObject y; // 2
{:methods => {:+ => ...}}
hashmap!
z = x.callMethod(context, "+", y);
calling a method
- get the object
- lookup the method
- call it
- profit
lookup a method?
DynamicMethod
seems legit
requires
ALL THE TYPES
during compilation
it's all about
method invocation
## hash lookups are
# fast
what about a tight loop
of 1M lookups?
now we can teach
the JVM
on how to reach the DynamicMethod instance we want
inconstants
A_CONSTANT = 3
A_CONSTANT = 4
warning: already initialized constant A_CONSTANT
>> A_CONSTANT
=> 4
if you do your job
constants will be fast
## invokedynamic is
# awesome
## current status
# waiting

class Duck
def quack
lol = 3
puts 'quaaack'
end
end
x = Duck.new
x.quack
%self = recv_self
line_num(0)
%v_0 = def_class(Duck, module, nil, duck.rb)
[DEAD-RESULT]%v_1 = process_module_body(%v_0)
line_num(6)
%v_0 = search_const(Duck, scope, no-private-consts=false)
%v_1 = call(NORMAL, 'new', %v_0, []){0O}
%v_0 = call(NORMAL, 'quack', %v_1, []){0O}
return(%v_0)

# Static Single Assignment Form
JRuby will get a new version
