Rollback "Fix for KT-10659: Debugger: Evaluate Expression and Watches fail for inline function parameter passed by reference"

This commit is contained in:
Michael Bogdanov
2016-02-08 10:26:41 +03:00
parent 9e5c387d6c
commit 848549dd5d
5 changed files with 5 additions and 43 deletions
@@ -94,8 +94,8 @@ public class LocalVarRemapper {
public void visitLocalVariable(String name, String desc, String signature, Label start, Label end, int index, MethodVisitor mv) {
RemapInfo info = doRemap(index);
//add entries only for shifted vars or remapped to locals
if (SHIFT == info.status || REMAPPED == info.status && info.value instanceof StackValue.Local) {
//add entries only for shifted vars
if (SHIFT == info.status) {
int newIndex = ((StackValue.Local) info.value).index;
mv.visitLocalVariable(name, desc, signature, start, end, newIndex);
}
@@ -7,5 +7,6 @@ fun main(args: Array<String>) {
watch(local) { it.length }
}
// 2 LOCALVARIABLE p
// 1 LOCALVARIABLE p\$iv
/*fix rollbacked cause of robovm problem*/
// 1 LOCALVARIABLE p
// 0 LOCALVARIABLE p\$iv
@@ -1,11 +0,0 @@
LineBreakpoint created at remappedParameterInInline.kt:7
LineBreakpoint created at remappedParameterInInline.kt:14
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! remappedParameterInInline.RemappedParameterInInlineKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
remappedParameterInInline.kt:7
Compile bytecode for p
remappedParameterInInline.kt:14
Compile bytecode for p
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -1,22 +0,0 @@
package remappedParameterInInline
inline fun watch(p: String, f: (String) -> Int) {
// EXPRESSION: p
// RESULT: "mno": Ljava/lang/String;
//Breakpoint!
f(p)
}
inline fun inlineDefault(p: Int = 1, f: (Int) -> Unit) {
// EXPRESSION: p
// RESULT: 1: I
//Breakpoint!
f(p)
}
fun main(args: Array<String>) {
val local = "mno"
watch(local) { it.length }
inlineDefault { it }
}
@@ -784,12 +784,6 @@ public class KotlinEvaluateExpressionTestGenerated extends AbstractKotlinEvaluat
doMultipleBreakpointsTest(fileName);
}
@TestMetadata("remappedParameterInInline.kt")
public void testRemappedParameterInInline() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/remappedParameterInInline.kt");
doMultipleBreakpointsTest(fileName);
}
@TestMetadata("whenEntry.kt")
public void testWhenEntry() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/multipleBreakpoints/whenEntry.kt");