From: Panicz Maciej Godek <godek.maciek@gmail.com>
To: Per Bothner <per@bothner.com>
Cc: kawa@sourceware.org
Subject: Re: Building for Android
Date: Fri, 21 Oct 2022 15:59:21 +0200 [thread overview]
Message-ID: <CAMFYt2aHPDMm2DYOj8HWj92SSRRKooY+G-BSYd-AvSuCbdy6MQ@mail.gmail.com> (raw)
In-Reply-To: <CAMFYt2Z8moCDk7GNTu_zHPRaw=BB+7BdS+fF965FkaiZvLx8oA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3017 bytes --]
I found out (by analyzing the somewhat messy gnu/kawa/util/PreProcess.java)
that the reason why I hand to edit gnu/expr/Mangling.java by hand was that
- in addition to --with-android -- I was also using --with-java-source to
./configure.
The jar produced without that flag was able to build the HelloKawa project
(provided that I did the trick with injecting --release 8 to javac).
However, the d8 tool still issues its warnings, and the member field names
containing 'mangled' characters are still invisible from the subclasses.
While this isn't something I can't live with - because I don't have that
many such use cases - I wanted to ask about the chances of resolving that
issue?
If it's a problem that would take a lot of time, I can just rename those
few identifiers that are in my code and carry on with the development.
pt., 21 paź 2022, 07:14 użytkownik Panicz Maciej Godek <
godek.maciek@gmail.com> napisał:
> I can confirm this:
>
> when I replaced the superclass' member identifiers shift-left, shift-top,
> clip-left, clip-top, clip-width, clip-height, selection-drawing-mode?, with
> - respectively - shiftLeft, shiftTop, clipLeft, clipTop, clipWidth,
> clipHeight and selectionDrawingMode, they are again visible in the subclass.
>
>
> czw., 20 paź 2022, 22:48 użytkownik Panicz Maciej Godek <
> godek.maciek@gmail.com> napisał:
>
>> I've noticed several more issues with the kawa.jar that I produced by
>> manually changing gnu/expr/Mangle.java:
>> when I try to run the terminal version of GRASP, I get a bunch of
>> warnings like:
>>
>> "no declaration seen for shift-left"
>> "no declaration seen for shift-top"
>>
>> etc.
>>
>> Those identifiers are names of fields in a superclass. The superclass in
>> this case is CharPainter:
>>
>> https://github.com/panicz/grasp-android/blob/master/stages/retreat/GRASP/src/text-painter.scm#L16
>>
>> I use a "define-object" macro which - rather trivially - expands to
>> "define-class":
>>
>> https://github.com/panicz/grasp-android/blob/master/stages/retreat/GRASP/src/define-object.scm
>>
>> (define-object (ClassName constructor-args ...)::Interface
>> (define name :: type value)
>> (define (method args ...) ...)
>> (SuperClass super-constructor-args ...)
>> init-code ...)
>>
>> expands to something like
>>
>> (define-class ClassName (Interface SuperClass)
>> (name :: type init: value)
>> ((method args ...) ...)
>> ((*init* constructor-args ...)
>> (invoke-special SuperClass (this) '*init super-constructor-args ...)
>> init-code ...))
>>
>> (and it certainly worked with the previous kawa.jar)
>>
>> Anyway, it seems that the code of the subclass is unable to see the slots
>> defined in its parent class.
>> I suspect that this might have something to do with mangling/unmangling.
>>
>> I will try to verify this tomorrow by replacing the identifiers like
>> shift-left with something more like shiftLeft
>> to see if that helps.
>>
>
next prev parent reply other threads:[~2022-10-21 13:59 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-18 14:57 Panicz Maciej Godek
2022-10-18 15:25 ` Per Bothner
2022-10-18 18:25 ` Panicz Maciej Godek
2022-10-19 9:15 ` Panicz Maciej Godek
2022-10-19 16:05 ` Per Bothner
2022-10-19 17:09 ` Panicz Maciej Godek
2022-10-20 5:35 ` Panicz Maciej Godek
2022-10-20 20:48 ` Panicz Maciej Godek
2022-10-21 5:14 ` Panicz Maciej Godek
2022-10-21 13:59 ` Panicz Maciej Godek [this message]
2022-10-21 18:11 ` Per Bothner
2022-10-21 19:19 ` Panicz Maciej Godek
2022-10-21 19:31 ` Per Bothner
2022-10-21 19:45 ` Panicz Maciej Godek
2022-10-21 20:13 ` Panicz Maciej Godek
2022-10-22 6:26 ` Per Bothner
2022-10-22 9:31 ` Panicz Maciej Godek
2022-10-22 12:08 ` Panicz Maciej Godek
2022-10-24 7:22 ` Panicz Maciej Godek
2022-10-24 10:48 ` Per Bothner
2022-10-24 12:01 ` Panicz Maciej Godek
2022-10-21 18:00 ` Per Bothner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMFYt2aHPDMm2DYOj8HWj92SSRRKooY+G-BSYd-AvSuCbdy6MQ@mail.gmail.com \
--to=godek.maciek@gmail.com \
--cc=kawa@sourceware.org \
--cc=per@bothner.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).