Debugger: write line number for catch clause declaration

This commit is contained in:
Natalia Ukhorskaya
2016-04-06 17:04:04 +03:00
parent 8e3ec5b7f0
commit 7a5ab93f9e
9 changed files with 44 additions and 4 deletions
@@ -3667,6 +3667,11 @@ The "returned" value of try expression with no finally is either the last expres
Label clauseStart = new Label();
v.mark(clauseStart);
KtExpression catchBody = clause.getCatchBody();
if (catchBody != null) {
markLineNumber(catchBody, false);
}
VariableDescriptor descriptor = bindingContext.get(VALUE_PARAMETER, clause.getCatchParameter());
assert descriptor != null;
Type descriptorType = asmType(descriptor.getType());
@@ -3674,7 +3679,7 @@ The "returned" value of try expression with no finally is either the last expres
int index = lookupLocalIndex(descriptor);
v.store(index, descriptorType);
gen(clause.getCatchBody(), expectedAsmType);
gen(catchBody, expectedAsmType);
if (!isStatement) {
v.store(savedValue, expectedAsmType);
+1 -1
View File
@@ -12,4 +12,4 @@ fun foo() {
}
}
// 2 3 5 6 8 9 11 8 13
// 2 3 4 5 6 8 9 10 11 8 13
+1 -1
View File
@@ -16,4 +16,4 @@ fun foo() {
}
}
// 2 3 7 5 7 8 10 11 15 13 15 10 17
// 2 3 7 4 5 7 8 10 11 15 12 13 15 10 17