From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-x92b.google.com (mail-ua1-x92b.google.com [IPv6:2607:f8b0:4864:20::92b]) by sourceware.org (Postfix) with ESMTPS id 298E73856974 for ; Fri, 21 Oct 2022 13:59:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 298E73856974 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ua1-x92b.google.com with SMTP id n5so2366692uap.2 for ; Fri, 21 Oct 2022 06:59:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=jdSY59wOqJ80ybd/XO8I5q+du+9J6F5+zPBnyZRK9Nk=; b=M0WeasSFJAhp1CrJ6ZTa3wlJseBex1Su+no+R6ccLYg8OmfTmPEIEItZCT53bmWlhP IiS726YptXKoZg7LqpTUh1zEQX0MDHX8LjGWEC0uGibCAmfF7btcr6awc+aMTBZXUyHO my8v7aUYw1xe9GYuGGBmCL3lZeXzLwhS8EC30KE0x8oW3dX86vW38sX7fuHvZ0t9uc1e AXvaqrTAWBGuBveD31tzNJjKMYGdRxRg55kKiEOmYLeNiVAWduTUCuSgicv1FUw4SELH NgAmA9LfmWLcSRd6Ra0rz1vt+1+GdgbhdZeQ8Juv9XAuYGz6u4h8G8LsKz/QQV/YPkDC 8+2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jdSY59wOqJ80ybd/XO8I5q+du+9J6F5+zPBnyZRK9Nk=; b=MYS6j+jUoZOaYCL3puxDZ/JEOEDm0FA9iwVn7uPH961B5m9RwZD4K7E85CnPZHMxS9 hNM04UUQcRgzEGgJA0dJc5HMm4p/G9pX3kJ6GZmvmE/D8I7e/bOKBAzwS83IFIye0P9x 3ogJvZgmmMHjUaDxS0y8LGw/aKD/S6jbN1MoaefsUeRymm7dESuVd70IuXH3lBx47Uwy WZA6bdzE83XaP/QDn9m656eIPM0dBULCvDt0yZA8KBvygyKzHmPReZTRLU0yrQFm2i8L JKyqld7cs/j0ZAXMt3f8OwCp8bO7cEMfdcStxcBuE3xy7mCShaL3c+dcMjnW8BcRSN9h Nkdw== X-Gm-Message-State: ACrzQf34IO5hEkWXdqihdknM4ZZAYEVZbPDIe/6gg9Jj5up/8+aVXQ06 l7HqecVZvTInWRfF4q/IHJEOB0hwT/oCqFyMOqeGm/3K X-Google-Smtp-Source: AMsMyM4YvbCxz+CYutCxm98gxfU/jfw1KDNsKnr1iOaPbUMMLdGfBFNOYZPqwBwfDJ5m3vJuQCy7gFHbkBunWixxcwo= X-Received: by 2002:ab0:6413:0:b0:3e1:b113:2dfa with SMTP id x19-20020ab06413000000b003e1b1132dfamr13902793uao.102.1666360773108; Fri, 21 Oct 2022 06:59:33 -0700 (PDT) MIME-Version: 1.0 References: <0986a08f-c28f-882c-8236-f5f3ecc5cb6a@bothner.com> In-Reply-To: From: Panicz Maciej Godek Date: Fri, 21 Oct 2022 15:59:21 +0200 Message-ID: Subject: Re: Building for Android To: Per Bothner Cc: kawa@sourceware.org Content-Type: multipart/alternative; boundary="000000000000f2e84505eb8bd925" X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --000000000000f2e84505eb8bd925 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=C5=BA 2022, 07:14 u=C5=BCytkownik Panicz Maciej Godek < godek.maciek@gmail.com> napisa=C5=82: > 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?, wi= th > - respectively - shiftLeft, shiftTop, clipLeft, clipTop, clipWidth, > clipHeight and selectionDrawingMode, they are again visible in the subcla= ss. > > > czw., 20 pa=C5=BA 2022, 22:48 u=C5=BCytkownik Panicz Maciej Godek < > godek.maciek@gmail.com> napisa=C5=82: > >> 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. >> > --000000000000f2e84505eb8bd925--