Last active
November 28, 2016 16:27
-
-
Save enebo/48fc44e21e9c58396abc09f406985460 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jruby ../snippets/super6.rb | |
ArgumentError: wrong number of arguments (1 for 3) | |
foo at ../snippets/super6.rb:-1 | |
foo at ../snippets/super6.rb:11 | |
<main> at ../snippets/super6.rb:15 | |
IR: | |
:Instructions | |
2016-11-28T10:25:30.604-06:00 [main] INFO BasicCompilerPassListener : Finished AddMissingInitsPass on scope in 0ms. | |
2016-11-28T10:25:30.604-06:00 [main] INFO IRScope : -:9 foo | |
0 [DEAD]%self = recv_self() | |
1 %v_0 = load_implicit_closure() | |
2 %current_scope = copy(scope<0>) | |
3 %current_module = copy(module<0>) | |
4 check_arity(;req: 3, opt: 0, *r: false, kw: false) | |
5 _(0:0) = recv_pre_reqd_arg(;i:0) | |
6 line_num(;n: 10) | |
7 %v_3 = instance_super(%current_module, _(0:0), %v_0 ;n:foo, t:SU, cl:true) | |
8 return(%v_3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
system ~/work/jruby master * 1086% mri23 ../snippets/super6.rb | |
1 | |
2 | |
3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class A | |
def foo(a, b, c) | |
p a, b, c | |
end | |
end | |
class B < A | |
def foo(_, _, _) | |
super | |
end | |
end | |
B.new.foo(1, 2, 3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
system ~/work/jruby master * 1087% jruby ../snippets/super6.rb | |
3 | |
3 | |
3 | |
2016-11-28T10:27:26.182-06:00 [main] INFO BasicCompilerPassListener : | |
Instructions[-#9#foo,IRMethod,LiveVariableAnalysis]: | |
BB [1:LBL_0:-1] | |
BB [2:LBL_1:-1] | |
%v_0 = load_implicit_closure() | |
%current_scope = copy(scope<0>) | |
%current_module = copy(module<0>) | |
check_arity(;req: 3, opt: 0, *r: false, kw: false) | |
_(0:0) = recv_pre_reqd_arg(;i:0) | |
_(0:0) = recv_pre_reqd_arg(;i:1) | |
_(0:0) = recv_pre_reqd_arg(;i:2) | |
line_num(;n: 10) | |
%v_3 = instance_super(module<0>, _(0:0), _(0:0), _(0:0), %v_0 ;n:foo, t:SU, cl:true) | |
return(%v_3) | |
BB [3:LBL_2:-1] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment