Discussion:
[perl #55586] [BUG] Parrot no longer uses HLL_map types?
(too old to reply)
Will Coleda
2008-06-10 18:02:43 UTC
Permalink
# New Ticket Created by Will Coleda
# Please include the string: [perl #55586]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=55586 >


This code:
$ cat tclsh.pir
.HLL 'Tcl', 'tcl_group'

.sub main :main
.param pmc argv
foo(argv)
.end

.sub foo
.param pmc args :slurpy
$S0 = typeof args
say $S0
.end

Used to say, some time ago:

TclList.

Now it says

ResizablePMCArray

Looks like "get_HLL_type" (defined in src/hll.c) isn't used anywhere
outside of registering a new HLL type; it should be used.

I had to do some bugfixes on partcl some months back to work around
this, but didn't realize the source of the issue. This was also
recently mentioned in regards to rakudo development.
--
Will "Coke" Coleda
Kjstol
2009-02-06 10:00:55 UTC
Permalink
--001636c5a82fcd465404623d186d
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

.HLL has been changed into a one-operand directive:write .HLL 'Tcl'.
the second operand indicated the (I think) shared lib containing the
language's PMCs, if any. Use '.loadlib' for that. So:

.HLL 'Tcl'
.loadlib 'tcl_group'

is equivalent to the old, deprecated and removed:
.HLL 'Tcl', 'tcl_group'

cheers,
kjs

On Fri, Feb 6, 2009 at 1:43 AM, James Keenan via RT <
I may be doing something wrong, but now it seems that it doesn't compile
[li11-226:parrot] 525 $ cat tclsh.pir
.HLL 'Tcl', 'tcl_group'
.sub main :main
.param pmc argv
foo(argv)
.end
.sub foo
.param pmc args :slurpy
$S0 = typeof args
say $S0
.end
# mode: pir
# fill-column: 100
[li11-226:parrot] 526 $ ./parrot tclsh.pir
error:imcc:syntax error, unexpected COMMA, expecting '\n' (',')
in file 'tclsh.pir' line 1
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev
Kjstol
2009-02-06 13:21:40 UTC
Permalink
--001636c598d6bd86f704623fe6a6
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

On Fri, Feb 6, 2009 at 1:12 PM, James Keenan via RT <
Post by Will Coleda
$ cat tclsh.pir
.HLL 'Tcl'
.loadlib 'tcl_group'
.sub main :main
.param pmc argv
foo(argv)
.end
.sub foo
.param pmc args :slurpy
$S0 = typeof args
say $S0
.end
[li11-226:parrot] 504 $ ./parrot tclsh.pir
ResizablePMCArray
How should we proceed?
Disclaimer: I'm not entirely clear on what exactly is happening in a
.loadlib.
However, I don't see any .HLL_map'ping (either through the .HLL_map, or
through the 'hll_map' method on (I think) the interpreter object).
So, in order to see what's wrong, I think the .loadlib directive needs
inspection.

kjs
Post by Will Coleda
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev
Will Coleda
2009-02-06 13:25:59 UTC
Permalink
Post by Kjstol
On Fri, Feb 6, 2009 at 1:12 PM, James Keenan via RT <
Post by Will Coleda
$ cat tclsh.pir
.HLL 'Tcl'
.loadlib 'tcl_group'
.sub main :main
.param pmc argv
foo(argv)
.end
.sub foo
.param pmc args :slurpy
$S0 = typeof args
say $S0
.end
[li11-226:parrot] 504 $ ./parrot tclsh.pir
ResizablePMCArray
How should we proceed?
Disclaimer: I'm not entirely clear on what exactly is happening in a
.loadlib.
However, I don't see any .HLL_map'ping (either through the .HLL_map, or
through the 'hll_map' method on (I think) the interpreter object).
So, in order to see what's wrong, I think the .loadlib directive needs
inspection.
kjs
IIRC, the .loadlib was loading PMCs which used the C method of
declaring HLL-map; There was an map to RPA fromTclList.

The expected output here was that when invoking a sub, it would use
the TclList type to construct the slurpy args. (which worked in the
past).
--
Will "Coke" Coleda
Loading...