Skip to content

Commit

Permalink
Whoo? Seemingly, retrying something tried a few minutes before seems …
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
enebo committed May 22, 2018
1 parent 7ce8544 commit 3cb5f89
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
Expand Up @@ -72,7 +72,7 @@ public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule claz
if (hasKwargs) args = IRRuntimeHelpers.frobnicateKwargsArgument(context, args, signature);

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

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

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

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

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

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

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

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

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

try {
return (IRubyObject) this.specific.invokeExact(context, staticScope, self, arg0, arg1, arg2, Block.NULL_BLOCK, implementationClass, name);
return (IRubyObject) this.specific.invokeExact(context, staticScope, self, arg0, arg1, arg2, Block.NULL_BLOCK, implementationClass.getMethodLocation(), name);
}
catch (Throwable t) {
Helpers.throwException(t);
Expand Down
Expand Up @@ -85,7 +85,7 @@ public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule claz

DynamicMethod jittedMethod = actualMethod;
if (jittedMethod != null) {
return jittedMethod.call(context, self, clazz, name, args, block);
return jittedMethod.call(context, self, getImplementationClass().getMethodLocation(), name, args, block);
}
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, args, block);
}
Expand Down Expand Up @@ -118,7 +118,7 @@ public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule claz

DynamicMethod jittedMethod = actualMethod;
if (jittedMethod != null) {
return jittedMethod.call(context, self, clazz, name, block);
return jittedMethod.call(context, self, getImplementationClass().getMethodLocation(), name, block);
}
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, block);
}
Expand Down Expand Up @@ -151,7 +151,7 @@ public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule claz

DynamicMethod jittedMethod = actualMethod;
if (jittedMethod != null) {
return jittedMethod.call(context, self, clazz, name, arg0, block);
return jittedMethod.call(context, self, getImplementationClass().getMethodLocation(), name, arg0, block);
}
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, arg0, block);
}
Expand Down Expand Up @@ -184,7 +184,7 @@ public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule claz

DynamicMethod jittedMethod = actualMethod;
if (jittedMethod != null) {
return jittedMethod.call(context, self, clazz, name, arg0, arg1, block);
return jittedMethod.call(context, self, getImplementationClass().getMethodLocation(), name, arg0, arg1, block);
}
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, arg0, arg1, block);
}
Expand Down Expand Up @@ -216,7 +216,7 @@ public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule claz

DynamicMethod jittedMethod = actualMethod;
if (jittedMethod != null) {
return jittedMethod.call(context, self, clazz, name, arg0, arg1, arg2, block);
return jittedMethod.call(context, self, getImplementationClass().getMethodLocation(), name, arg0, arg1, arg2, block);
}
return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, arg0, arg1, arg2, block);
}
Expand Down

0 comments on commit 3cb5f89

Please sign in to comment.