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]

Re: Shell-style programming in Kawa


On 02/13/2014 07:34 PM, Jamison Hope wrote:
In the working case, the ReferenceExp's binding Declaration's
getValue() looks like QuoteExp[#<procedure %pipe-process>].

In the non-working cases, binding.getValue() == null.

Since the value is null, ReferenceExp.validateApply skips over this
line, which is what triggers the inlining:

             if (dval != null)
               return dval.validateApply(exp, visitor, required, decl);


It turns out that it works if I compile my Scheme file with
--module-static-run, but not otherwise.  In particular, not if I
compile --module-static, not if I just load the source file, not
if I try to run it as "kawa file.scm" or "kawa -f file.scm", and
not if I make it an executable shebang script.

Hm.  If compiling with --module-static, then the class is made Runnable,
and the run method should be called when the module is require'd
or import'ed.  Does it not work - even after you've confirmed
that run is called?  (For example add a visible action at module
level, and confirm it is done.)

My gut feeling is that --module-static should also work *assuming*
run has been executed.
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/


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