Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #39796] [TODO] Implement .loadlib pragma in IMCC

0 views
Skip to first unread message

Autrijus Tang

unread,
Jul 12, 2006, 3:38:17 AM7/12/06
to bugs-bi...@rt.perl.org
# New Ticket Created by Autrijus Tang
# Please include the string: [perl #39796]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=39796 >


Allison and Chip expressed their go-ahead with a .loadlib pragma, to
replace this current use:

.sub foo :immediate
$I0 = loadlib "XXX"
.end

With this:

.loadlib "XXX"

This might be done as part of vsoni's IMCC refactoring, or as a lexer
action that loads the
library as soon as this directive is seen.

In any case, this will let dependency checkers have a much easier
time to figure out what
dynamic libraries a .pir file is loading, without actually have to
invoke Parrot themselves.

Audrey

PGP.sig

Will Coleda via RT

unread,
Jul 13, 2006, 10:02:43 PM7/13/06
to perl6-i...@perl.org
Whoops, re-opening.

This apparently isn't quite ready yet, as converting tcl to use the new syntax results in a nearly-
complete fail of the test suite.

Per Audrey: .loadlib 'dynlexpad' stopped working, because Parrot_register_HLL breaks on non-
HLL-group .so files.


Leopold Toetsch

unread,
Jul 14, 2006, 5:24:06 AM7/14/06
to parrotbug...@parrotcode.org, Will Coleda

Err, t/dynpmc/dynlexpad.t is using .loadlib and is testing fine. Please try to
provide a minimal parrot test showing the problem.

Thanks,
leo

Audrey Tang

unread,
Jul 14, 2006, 6:45:11 AM7/14/06
to parrotbug...@parrotcode.org

在 2006/7/14 上午 5:26 時,Leopold Toetsch via RT 寫到:

> Err, t/dynpmc/dynlexpad.t is using .loadlib and is testing fine.
> Please try to
> provide a minimal parrot test showing the problem.

Trying (though it remained a bit elusive), but if you "make
realclean", and then change
languages/tcl/src/tclsh.pir so that it uses .loadlib instead
of :immediate, and then
"make", cd into languages/tcl and "make test", you'll notice that all
tests fail with:

# got: 'set_string_keyed() not implemented in class 'TclObject'
# current instr.: '__prepare_lib' pc 19483 (runtime/tcllib.pir:122)
# called from Sub '_main' pc 3 (src/tclsh.pir:42)

Changing it back to :immediate makes tests pass again.

Alternately, skipping the Parrot_register_HLL part in IMCC makes
tests pass again.

Thanks,
Audrey

PGP.sig

Audrey Tang

unread,
Jul 14, 2006, 7:17:36 AM7/14/06
to Audrey Tang, parrotbug...@parrotcode.org

在 2006/7/14 上午 6:45 時,Audrey Tang 寫到:

> Changing it back to :immediate makes tests pass again.
>
> Alternately, skipping the Parrot_register_HLL part in IMCC makes
> tests pass again.

After several rounds of trial-and-error, I've committed r13294 that
works around the problem:

* Tcl: Change back to .loadlib.

Simply adding this line to tcllib.pir:
.loadlib 'dynlexpad'
appears to fix the problem.

According to leo, .loadlib acts like a dummy HLL, so there is
an order dependency to be observed by .loadlib calls.

This may not be a problem if Parrot_register_HLL_type takes the
HLL name instead of the current max HLL_idx, but the current state
renders this workaround neccessary.

So this ticket is probably good to be closed again, though it still
leaves me somewhat puzzled. :)

Audrey

PGP.sig

Will Coleda

unread,
Jul 14, 2006, 9:21:03 AM7/14/06
to Audrey Tang, parrotbug...@parrotcode.org
So, does .loadlib wipe the current .HLL pragma that's in effect? (if
it's intereacting with the other dot-pragmas, we need to document.)

Regards.

--
Will "Coke" Coleda
wi...@coleda.com


Andrew Whitworth via RT

unread,
Oct 18, 2008, 11:20:43 AM10/18/08
to perl6-i...@perl.org

This ticket is over two years old. Does the ".loadlib" pragma work
without problems now? Does it still appear to interact negatively with
the .HLL pragma?

If the .loadlib pragma is implemented and doesn't cause any problems, we
should close this ticket.

--
Andrew Whitworth
a.k.a Whiteknight


0 new messages