This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
[Patch] Source location for stub methods
- From: Helmut Eller <eller dot helmut at gmail dot com>
- To: kawa at sources dot redhat dot com
- Date: Tue, 25 Mar 2008 10:18:53 +0100
- Subject: [Patch] Source location for stub methods
Hello,
below is a tiny patch to emit source locations for stub functions.
Without the patch, calling (read-line #!null) prints a stacktrace where
one frame has no line number. This is not important, just a minor
nicety.
Helmut.
Index: LambdaExp.java
===================================================================
--- LambdaExp.java (revision 6061)
+++ LambdaExp.java (working copy)
@@ -1414,6 +1414,11 @@
if (i < numStubs)
{
CodeAttr code = comp.method.startCode();
+
+ int line = getLineNumber();
+ if (line > 0)
+ code.putLineNumber(getFileName(), line);
+
int toCall = i + 1;
while (toCall < numStubs
&& defaultArgs[toCall] instanceof QuoteExp)