Skip to content

Commit 3cb5f89

Browse files
committedMay 22, 2018
Whoo? Seemingly, retrying something tried a few minutes before seems to work
now. Did I miss a single case? What is its bag? use MethodLocation of impl class instead of passed in clazz. Seems to fix our prepend + super leading to out of stack issues.
1 parent 7ce8544 commit 3cb5f89

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed
 

‎core/src/main/java/org/jruby/internal/runtime/methods/CompiledIRMethod.java

+10-10
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule claz
7272
if (hasKwargs) args = IRRuntimeHelpers.frobnicateKwargsArgument(context, args, signature);
7373

7474
try {
75-
return (IRubyObject) this.variable.invokeExact(context, staticScope, self, args, block, implementationClass, name);
75+
return (IRubyObject) this.variable.invokeExact(context, staticScope, self, args, block, implementationClass.getMethodLocation(), name);
7676
}
7777
catch (Throwable t) {
7878
Helpers.throwException(t);
@@ -85,7 +85,7 @@ public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule claz
8585
if (specificArity != 0) return call(context, self, clazz, name, IRubyObject.NULL_ARRAY, block);
8686

8787
try {
88-
return (IRubyObject) this.specific.invokeExact(context, staticScope, self, block, implementationClass, name);
88+
return (IRubyObject) this.specific.invokeExact(context, staticScope, self, block, implementationClass.getMethodLocation(), name);
8989
}
9090
catch (Throwable t) {
9191
Helpers.throwException(t);
@@ -98,7 +98,7 @@ public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule claz
9898
if (specificArity != 1) return call(context, self, clazz, name, new IRubyObject[]{arg0}, block);
9999

100100
try {
101-
return (IRubyObject) this.specific.invokeExact(context, staticScope, self, arg0, block, implementationClass, name);
101+
return (IRubyObject) this.specific.invokeExact(context, staticScope, self, arg0, block, implementationClass.getMethodLocation(), name);
102102
}
103103
catch (Throwable t) {
104104
Helpers.throwException(t);
@@ -111,7 +111,7 @@ public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule claz
111111
if (specificArity != 2) return call(context, self, clazz, name, new IRubyObject[] {arg0, arg1}, block);
112112

113113
try {
114-
return (IRubyObject) this.specific.invokeExact(context, staticScope, self, arg0, arg1, block, implementationClass, name);
114+
return (IRubyObject) this.specific.invokeExact(context, staticScope, self, arg0, arg1, block, implementationClass.getMethodLocation(), name);
115115
}
116116
catch (Throwable t) {
117117
Helpers.throwException(t);
@@ -124,7 +124,7 @@ public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule claz
124124
if (specificArity != 3) return call(context, self, clazz, name, new IRubyObject[] {arg0, arg1, arg2 }, block);
125125

126126
try {
127-
return (IRubyObject) this.specific.invokeExact(context, staticScope, self, arg0, arg1, arg2, block, implementationClass, name);
127+
return (IRubyObject) this.specific.invokeExact(context, staticScope, self, arg0, arg1, arg2, block, implementationClass.getMethodLocation(), name);
128128
}
129129
catch (Throwable t) {
130130
Helpers.throwException(t);
@@ -137,7 +137,7 @@ public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule claz
137137
if (hasKwargs) args = IRRuntimeHelpers.frobnicateKwargsArgument(context, args, signature);
138138

139139
try {
140-
return (IRubyObject) this.variable.invokeExact(context, staticScope, self, args, Block.NULL_BLOCK, implementationClass, name);
140+
return (IRubyObject) this.variable.invokeExact(context, staticScope, self, args, Block.NULL_BLOCK, implementationClass.getMethodLocation(), name);
141141
}
142142
catch (Throwable t) {
143143
Helpers.throwException(t);
@@ -150,7 +150,7 @@ public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule claz
150150
if (specificArity != 0) return call(context, self, clazz, name, IRubyObject.NULL_ARRAY, Block.NULL_BLOCK);
151151

152152
try {
153-
return (IRubyObject) this.specific.invokeExact(context, staticScope, self, Block.NULL_BLOCK, implementationClass, name);
153+
return (IRubyObject) this.specific.invokeExact(context, staticScope, self, Block.NULL_BLOCK, implementationClass.getMethodLocation(), name);
154154
}
155155
catch (Throwable t) {
156156
Helpers.throwException(t);
@@ -163,7 +163,7 @@ public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule claz
163163
if (specificArity != 1) return call(context, self, clazz, name, new IRubyObject[]{arg0}, Block.NULL_BLOCK);
164164

165165
try {
166-
return (IRubyObject) this.specific.invokeExact(context, staticScope, self, arg0, Block.NULL_BLOCK, implementationClass, name);
166+
return (IRubyObject) this.specific.invokeExact(context, staticScope, self, arg0, Block.NULL_BLOCK, implementationClass.getMethodLocation(), name);
167167
}
168168
catch (Throwable t) {
169169
Helpers.throwException(t);
@@ -176,7 +176,7 @@ public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule claz
176176
if (specificArity != 2) return call(context, self, clazz, name, new IRubyObject[] {arg0, arg1}, Block.NULL_BLOCK);
177177

178178
try {
179-
return (IRubyObject) this.specific.invokeExact(context, staticScope, self, arg0, arg1, Block.NULL_BLOCK, implementationClass, name);
179+
return (IRubyObject) this.specific.invokeExact(context, staticScope, self, arg0, arg1, Block.NULL_BLOCK, implementationClass.getMethodLocation(), name);
180180
}
181181
catch (Throwable t) {
182182
Helpers.throwException(t);
@@ -189,7 +189,7 @@ public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule claz
189189
if (specificArity != 3) return call(context, self, clazz, name, new IRubyObject[] {arg0, arg1, arg2 }, Block.NULL_BLOCK);
190190

191191
try {
192-
return (IRubyObject) this.specific.invokeExact(context, staticScope, self, arg0, arg1, arg2, Block.NULL_BLOCK, implementationClass, name);
192+
return (IRubyObject) this.specific.invokeExact(context, staticScope, self, arg0, arg1, arg2, Block.NULL_BLOCK, implementationClass.getMethodLocation(), name);
193193
}
194194
catch (Throwable t) {
195195
Helpers.throwException(t);

‎core/src/main/java/org/jruby/internal/runtime/methods/MixedModeIRMethod.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule claz
8585

8686
DynamicMethod jittedMethod = actualMethod;
8787
if (jittedMethod != null) {
88-
return jittedMethod.call(context, self, clazz, name, args, block);
88+
return jittedMethod.call(context, self, getImplementationClass().getMethodLocation(), name, args, block);
8989
}
9090
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, args, block);
9191
}
@@ -118,7 +118,7 @@ public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule claz
118118

119119
DynamicMethod jittedMethod = actualMethod;
120120
if (jittedMethod != null) {
121-
return jittedMethod.call(context, self, clazz, name, block);
121+
return jittedMethod.call(context, self, getImplementationClass().getMethodLocation(), name, block);
122122
}
123123
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, block);
124124
}
@@ -151,7 +151,7 @@ public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule claz
151151

152152
DynamicMethod jittedMethod = actualMethod;
153153
if (jittedMethod != null) {
154-
return jittedMethod.call(context, self, clazz, name, arg0, block);
154+
return jittedMethod.call(context, self, getImplementationClass().getMethodLocation(), name, arg0, block);
155155
}
156156
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, arg0, block);
157157
}
@@ -184,7 +184,7 @@ public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule claz
184184

185185
DynamicMethod jittedMethod = actualMethod;
186186
if (jittedMethod != null) {
187-
return jittedMethod.call(context, self, clazz, name, arg0, arg1, block);
187+
return jittedMethod.call(context, self, getImplementationClass().getMethodLocation(), name, arg0, arg1, block);
188188
}
189189
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, arg0, arg1, block);
190190
}
@@ -216,7 +216,7 @@ public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule claz
216216

217217
DynamicMethod jittedMethod = actualMethod;
218218
if (jittedMethod != null) {
219-
return jittedMethod.call(context, self, clazz, name, arg0, arg1, arg2, block);
219+
return jittedMethod.call(context, self, getImplementationClass().getMethodLocation(), name, arg0, arg1, arg2, block);
220220
}
221221
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, arg0, arg1, arg2, block);
222222
}

0 commit comments

Comments
 (0)
Please sign in to comment.