GraphKit::compute_stack_effects is called from various places including uncommon_trap. uncommon_traps are used during parsing but also in intrinsics. The difference between these two is that during parsing uncommon traps related to invokes should behave as happening in the caller while for intrinsics they are in the callee.
For call sites which have an appendix argument or a MemberName argument this impose a problem: the argument count is different in the caller and the callee.
In a debug build we get asserts like:
$ jruby -J-XX:+ShowMessageBoxOnError -J-showversion --server -J-Xcomp -J-XX:+DeoptimizeRandom -J-XX:-TieredCompilation -J-XX:-VerifyDependencies test/test_respond_to.rb
java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-b53)
Java HotSpot(TM) Server VM (build 24.0-b22-internal-fastdebug, compiled mode)
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc: SuppressErrorAt=/graphKit.cpp:1869
==============================================================================
Unexpected Error
------------------------------------------------------------------------------
Internal Error at graphKit.cpp:1869, pid=14392, tid=3429886832
assert(sp() >= inputs) failed: must have enough JVMS stack to execute
Do you want to debug the problem?
To debug, run 'gdb /proc/14392/exe 14392'; then switch to thread -865080464 (0xcc6feb70)
Enter 'yes' to launch gdb automatically (PATH must include gdb)
Otherwise, press RETURN to abort...
==============================================================================