Created
May 4, 2012 17:25
-
-
Save qmx/2596363 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
diff --git a/spec/mspec b/spec/mspec | |
index bc83305..8a0be99 160000 | |
--- a/spec/mspec | |
+++ b/spec/mspec | |
@@ -1 +1 @@ | |
-Subproject commit bc833057f7bf28e490e616a3bcef534b1e6bfb7c | |
+Subproject commit 8a0be99b4844a9f6dfc1eef7092901e6045e5222 | |
diff --git a/src/org/jruby/compiler/impl/InvokeDynamicCacheCompiler.java b/src/org/jruby/compiler/impl/InvokeDynamicCacheCompiler.java | |
index b3d9c35..a4aa821 100644 | |
--- a/src/org/jruby/compiler/impl/InvokeDynamicCacheCompiler.java | |
+++ b/src/org/jruby/compiler/impl/InvokeDynamicCacheCompiler.java | |
@@ -411,7 +411,10 @@ public class InvokeDynamicCacheCompiler extends InheritedCacheCompiler { | |
method.method.invokedynamic( | |
"get:" + name, | |
sig(IRubyObject.class, IRubyObject.class), | |
- InvokeDynamicSupport.getVariableHandle()); | |
+ InvokeDynamicSupport.getVariableHandle(), | |
+ method.getScriptCompiler().getSourcename(), | |
+ method.getLastLine() | |
+ ); | |
} | |
public void cachedSetVariable(BaseBodyCompiler method, String name, CompilerCallback valueCallback) { | |
diff --git a/src/org/jruby/runtime/invokedynamic/InvokeDynamicSupport.java b/src/org/jruby/runtime/invokedynamic/InvokeDynamicSupport.java | |
index 78953c3..1f55f84 100644 | |
--- a/src/org/jruby/runtime/invokedynamic/InvokeDynamicSupport.java | |
+++ b/src/org/jruby/runtime/invokedynamic/InvokeDynamicSupport.java | |
@@ -171,7 +171,7 @@ public class InvokeDynamicSupport { | |
} | |
public static Handle getVariableHandle() { | |
- return getBootstrapHandle("variableBootstrap", BOOTSTRAP_BARE_SIG); | |
+ return getBootstrapHandle("variableBootstrap", BOOTSTRAP_STRING_INT_SIG); | |
} | |
//////////////////////////////////////////////////////////////////////////// | |
@@ -383,11 +383,11 @@ public class InvokeDynamicSupport { | |
return site; | |
} | |
- public static CallSite variableBootstrap(Lookup lookup, String name, MethodType type) throws Throwable { | |
+ public static CallSite variableBootstrap(Lookup lookup, String name, MethodType type, String file, int line) throws Throwable { | |
String[] names = name.split(":"); | |
String operation = names[0]; | |
String varName = names[1]; | |
- VariableSite site = new VariableSite(type, varName); | |
+ VariableSite site = new VariableSite(type, varName, file, line); | |
MethodHandle handle; | |
if (operation.equals("get")) { | |
diff --git a/src/org/jruby/runtime/invokedynamic/VariableSite.java b/src/org/jruby/runtime/invokedynamic/VariableSite.java | |
index b515c9e..816e77e 100644 | |
--- a/src/org/jruby/runtime/invokedynamic/VariableSite.java | |
+++ b/src/org/jruby/runtime/invokedynamic/VariableSite.java | |
@@ -6,7 +6,7 @@ import java.lang.invoke.MutableCallSite; | |
public class VariableSite extends MutableCallSite { | |
public final String name; | |
private int chainCount; | |
- public VariableSite(MethodType type, String name) { | |
+ public VariableSite(MethodType type, String name, String file, int line) { | |
super(type); | |
this.name = name; | |
this.chainCount = 0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment