This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]