This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Kawa with Android Studio and Gradle
- From: Per Bothner <per at bothner dot com>
- To: Marius Kjeldahl <marius at kjeldahl dot net>
- Cc: kawa at sourceware dot org
- Date: Wed, 10 Jul 2013 23:48:30 -0700
- Subject: Re: Kawa with Android Studio and Gradle
- References: <51DAD2A8 dot 80807 at kjeldahl dot net> <51DB6E01 dot 9060702 at bothner dot com> <51DBAE9A dot 6050400 at kjeldahl dot net> <51DBC62F dot 2080707 at bothner dot com>
On 07/09/2013 01:13 AM, Per Bothner wrote:
Looking more closely, I notice there is an 'astore 8' (i.e. "pop
object reference from stack and store in register 8") at pc 719,
but the LinNumberTable declares that a boolean variable 'x' is
stored in register 8 starting at pc 468 through 468+578=1046.
Likewise, there is an 'astore 9' at pc 717, though register 9
is supposed to be boolean from pc 519 through 519+527=1046.
The problem is the compilation of "inlined" functions. If a function
is only called once (not counting tail-calls) it is inlined at the
(non-tail) call-site. The problem is if there is also a tail-call:
This is implemented by storing the parameters into the parameter
registers and jumping to the start of the function. If the tail-call
is to a "sibling" function such storing may violate the scoping in
the LocalVarsTable.
I thought I had a fix, but so far it isn't working ...
--
--Per Bothner
per@bothner.com http://per.bothner.com/