public inbox for [email protected]
help / color / mirror / Atom feedFrom: Kartik Ohri <[email protected]>
To: Chapman Flack <[email protected]>
Cc: [email protected]
Subject: Re: the ScriptingMojo
Date: Wed, 26 Aug 2020 02:36:33 +0530
Message-ID: <CAASLQ4PkP017rtyUswKO_TCiNmnica-nrQHBgggFw-U_9MstUg@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CAASLQ4Mva7dAXiS_c9OLhV4VzNHF=XNKJosuS5gtZTB6b4TW1Q@mail.gmail.com>
<[email protected]>
<CAASLQ4NgH+tXbdUSA8xDh2ct3gAS3xa8V7=E0gcYd+d=m8kujw@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
<CAASLQ4PEgo5Nj0EVsOfGoB96dQFXfFYxrrB0rS1wdad7x_E5fA@mail.gmail.com>
<CAASLQ4OowXOmnbbbT0Wh1ZkB4h=6JQfC61ojmN07EYnO0QCcow@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<CAASLQ4MBWQeFLdAPNcsgcpLyekU5X=ExQUuGgE49AUFdEYJr8g@mail.gmail.com>
<[email protected]>
<CAASLQ4P5oEx0DLoDLEOAkZSwffU2eS2+NKbevgYqpknHGucaTw@mail.gmail.com>
<[email protected]>
<CAASLQ4Nr3MPQuZziVU+89ULZ=BgQjaPPnCLsyPR3mhW-eWoOBw@mail.gmail.com>
<[email protected]>
Hi!
> - I don't think formatDefines and formatIncludes make good PGXSUtils
> methods. The syntax could vary across compilers (might it use /D or /I
> on a Windows compiler, for example?). So I think they make better
> AbstractPGXS methods that can be overridden in the configuration.
> There could be a built-in implementation in AbstractPGXS using -D and -I.
> Defines should be provided as a map (key to value) and the option string
> with = sign should be produced by formatting.
>
> Regarding this, it seems that it is not possible to invoke a method whose
implementation
is provided in the Java class before an object is created. (Same for
default methods in an
interface) So, compile itself cannot call a formatDefines if a default
implementation is given using
AbstractPGXS. However, formatDefines can be called separately and the value
be passed to compile.
So, it would need creating a define method which also decides the defines
for the interface and
formats them. Another way is to pass the formatDefines function as a
parameter to compile. But
this only works for Graal and not nashorn. I am not sure whether nashorn
doesn't support it or there is
some way to do it I do not know of.
Thanks.
Regards,
Kartik
view thread (78+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: the ScriptingMojo
In-Reply-To: <CAASLQ4PkP017rtyUswKO_TCiNmnica-nrQHBgggFw-U_9MstUg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox