[prev in list] [next in list] [prev in thread] [next in thread]
List: perl6-internals
Subject: Re: [perl #50398] [PDD17PMC] [Tcl] METHOD, morph, assign...
From: chromatic <chromatic () wgz ! org>
Date: 2008-01-31 2:27:57
Message-ID: 200801301827.57810.chromatic () wgz ! org
[Download RAW message or body]
On Wednesday 30 January 2008 07:11:32 Will Coleda wrote:
> The recent PCCMETHOD -> METHOD update in the pdd17pmc branch breaks
> tcl, since there is a lone METHOD there.
> But then fails at runtime:
>
> % ../../parrot tcl.pbc
>
> unable to assign self to this type
> current instr.: '__list' pc 25992
> (languages/tcl/runtime/conversions.pir:27) called from Sub '&proc' pc 19294
> (languages/tcl/runtime/builtin/proc.pir:106) called from Sub '_anon' pc 44
> (EVAL_4:18)
> called from Sub '__load_stdlib' pc 56134 (runtime/tcllib.pir:291)
> called from Sub '_main' pc 3 (src/tclsh.pir:36)
>
> Tracing the assign on that line in conversions.pir gives:
>
> 25994 assign P0, P1 P0=Undef=PMC(0x2f1c398)
> P1=TclList=PMC(0x2f1ae7c)
> unable to assign self to this type
>
> So, it looks like the get_list call worked (based on the type of P1
> and earlier PIR in that file), but that the real issue here is that
> assign isn't working.
Does this patch fix things for you?
-- c
["tcl_pmc_fix.patch" (text/x-diff)]
Index: languages/tcl/runtime/builtin/dict.pir
===================================================================
--- languages/tcl/runtime/builtin/dict.pir (revision 25377)
+++ languages/tcl/runtime/builtin/dict.pir (working copy)
@@ -107,7 +107,7 @@
$S1 = shift argv
$S2 = value
$S2 .= $S1
- morph value, .Undef
+ value = new 'TclString'
assign value, $S2
goto loop
loop_done:
Index: languages/tcl/src/pmc/tclarray.pmc
===================================================================
--- languages/tcl/src/pmc/tclarray.pmc (revision 25377)
+++ languages/tcl/src/pmc/tclarray.pmc (working copy)
@@ -30,11 +30,11 @@
pmclass TclArray
need_ext
dynpmc
- extends Hash
- does hash
- group tcl_group
- hll Tcl
- maps Hash
+ extends Hash
+ provides hash
+ group tcl_group
+ hll Tcl
+ maps Hash
{
/*
Index: languages/tcl/src/pmc/tcldict.pmc
===================================================================
--- languages/tcl/src/pmc/tcldict.pmc (revision 25377)
+++ languages/tcl/src/pmc/tcldict.pmc (working copy)
@@ -30,11 +30,11 @@
pmclass TclDict
need_ext
dynpmc
- extends Hash
- does hash
- group tcl_group
- hll Tcl
- maps Hash
+ extends Hash
+ provides hash
+ group tcl_group
+ hll Tcl
+ maps Hash
{
/*
Index: languages/tcl/src/pmc/tclfloat.pmc
===================================================================
--- languages/tcl/src/pmc/tclfloat.pmc (revision 25377)
+++ languages/tcl/src/pmc/tclfloat.pmc (working copy)
@@ -15,11 +15,11 @@
pmclass TclFloat
dynpmc
- extends TclObject
- extends Float
- does float
- group tcl_group
- hll Tcl
+ extends TclObject
+ extends Float
+ provides float
+ group tcl_group
+ hll Tcl
maps Float
{
Index: languages/tcl/src/pmc/tclstring.pmc
===================================================================
--- languages/tcl/src/pmc/tclstring.pmc (revision 25377)
+++ languages/tcl/src/pmc/tclstring.pmc (working copy)
@@ -12,11 +12,11 @@
pmclass TclString
dynpmc
- extends String
- does string
- group tcl_group
- hll Tcl
- maps String
+ extends String
+ provides string
+ group tcl_group
+ hll Tcl
+ maps String
{
METHOD get_list(STRING* str) {
Index: languages/tcl/src/pmc/tclint.pmc
===================================================================
--- languages/tcl/src/pmc/tclint.pmc (revision 25377)
+++ languages/tcl/src/pmc/tclint.pmc (working copy)
@@ -13,12 +13,12 @@
pmclass TclInt
dynpmc
- extends TclObject
- extends Integer
- does integer
- group tcl_group
- hll Tcl
- maps Integer
+ extends TclObject
+ extends Integer
+ provides integer
+ group tcl_group
+ hll Tcl
+ maps Integer
{
void assign_pmc(PMC* value) {
Index: languages/tcl/src/pmc/tcllist.pmc
===================================================================
--- languages/tcl/src/pmc/tcllist.pmc (revision 25377)
+++ languages/tcl/src/pmc/tcllist.pmc (working copy)
@@ -26,7 +26,7 @@
dynpmc
need_ext
extends ResizablePMCArray
- does array
+ provides array
group tcl_group
hll Tcl
maps Array
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic