Skip to content

Commit 7ce8544

Browse files
committedMay 22, 2018
Matching up interpreted method with mixed mode method that interpreter should
get method location from implementation class. This seemingly solves a prepend issue from AS deprecate implementation in Rails.
1 parent 8c3a669 commit 7ce8544

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed
 

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

+10-10
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,15 @@ public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule claz
8888
if (IRRuntimeHelpers.isDebug()) doDebug();
8989

9090
if (callCount >= 0) promoteToFullBuild(context);
91-
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass(), self, name, args, block);
91+
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, args, block);
9292
}
9393

9494
@Override
9595
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args) {
9696
if (IRRuntimeHelpers.isDebug()) doDebug();
9797

9898
if (callCount >= 0) promoteToFullBuild(context);
99-
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass(), self, name, args, Block.NULL_BLOCK);
99+
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, args, Block.NULL_BLOCK);
100100
}
101101

102102
private IRubyObject INTERPRET_METHOD(ThreadContext context, InterpreterContext ic, RubyModule implClass,
@@ -125,7 +125,7 @@ public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule claz
125125

126126
if (callCount >= 0) promoteToFullBuild(context);
127127

128-
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass(), self, name, block);
128+
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, block);
129129
}
130130

131131
@Override
@@ -134,7 +134,7 @@ public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule claz
134134

135135
if (callCount >= 0) promoteToFullBuild(context);
136136

137-
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass(), self, name, Block.NULL_BLOCK);
137+
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, Block.NULL_BLOCK);
138138
}
139139

140140
private IRubyObject INTERPRET_METHOD(ThreadContext context, InterpreterContext ic, RubyModule implClass,
@@ -162,15 +162,15 @@ public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule claz
162162
if (IRRuntimeHelpers.isDebug()) doDebug();
163163

164164
if (callCount >= 0) promoteToFullBuild(context);
165-
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass(), self, name, arg0, block);
165+
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, arg0, block);
166166
}
167167

168168
@Override
169169
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0) {
170170
if (IRRuntimeHelpers.isDebug()) doDebug();
171171

172172
if (callCount >= 0) promoteToFullBuild(context);
173-
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass(), self, name, arg0, Block.NULL_BLOCK);
173+
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, arg0, Block.NULL_BLOCK);
174174
}
175175

176176
private IRubyObject INTERPRET_METHOD(ThreadContext context, InterpreterContext ic, RubyModule implClass,
@@ -198,15 +198,15 @@ public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule claz
198198
if (IRRuntimeHelpers.isDebug()) doDebug();
199199

200200
if (callCount >= 0) promoteToFullBuild(context);
201-
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass(), self, name, arg0, arg1, block);
201+
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, arg0, arg1, block);
202202
}
203203

204204
@Override
205205
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1) {
206206
if (IRRuntimeHelpers.isDebug()) doDebug();
207207

208208
if (callCount >= 0) promoteToFullBuild(context);
209-
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass(), self, name, arg0, arg1, Block.NULL_BLOCK);
209+
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, arg0, arg1, Block.NULL_BLOCK);
210210
}
211211

212212
private IRubyObject INTERPRET_METHOD(ThreadContext context, InterpreterContext ic, RubyModule implClass,
@@ -234,15 +234,15 @@ public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule claz
234234
if (IRRuntimeHelpers.isDebug()) doDebug();
235235

236236
if (callCount >= 0) promoteToFullBuild(context);
237-
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass(), self, name, arg0, arg1, arg2, block);
237+
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, arg0, arg1, arg2, block);
238238
}
239239

240240
@Override
241241
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) {
242242
if (IRRuntimeHelpers.isDebug()) doDebug();
243243

244244
if (callCount >= 0) promoteToFullBuild(context);
245-
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass(), self, name, arg0, arg1, arg2, Block.NULL_BLOCK);
245+
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, arg0, arg1, arg2, Block.NULL_BLOCK);
246246
}
247247

248248
private IRubyObject INTERPRET_METHOD(ThreadContext context, InterpreterContext ic, RubyModule implClass,

0 commit comments

Comments
 (0)