Author: chromatic
Date: Sun Mar 30 18:58:35 2008
New Revision: 26650
Modified:
trunk/languages/pugs/pmc/pugsany.pmc
trunk/languages/pugs/pmc/pugsbit.pmc
trunk/languages/pugs/pmc/pugsbool.pmc
trunk/languages/pugs/pmc/pugscapture.pmc
trunk/languages/pugs/pmc/pugscode.pmc
trunk/languages/pugs/pmc/pugsint.pmc
trunk/languages/pugs/pmc/pugsmapping.pmc
trunk/languages/pugs/pmc/pugsmodule.pmc
trunk/languages/pugs/pmc/pugsnum.pmc
trunk/languages/pugs/pmc/pugsstr.pmc
trunk/languages/pugs/pmc/pugstuple.pmc
trunk/languages/pugs/pmc/pugsundef.pmc
Log:
[Pugs] Made PMCs use parrot/embed.h instead of parrot/parrot.h (RT #39043).
Fixed some compilation errors and warnings.
Modified: trunk/languages/pugs/pmc/pugsany.pmc
==============================================================================
--- trunk/languages/pugs/pmc/pugsany.pmc (original)
+++ trunk/languages/pugs/pmc/pugsany.pmc Sun Mar 30 18:58:35 2008
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2006, The Perl Foundation.
+Copyright (C) 2006-2008, The Perl Foundation.
$Id$
=head1 NAME
@@ -20,7 +20,7 @@
*/
-#include "parrot/parrot.h"
+#include "parrot/embed.h"
#include "../include/pugs_common.h"
pmclass PugsAny
Modified: trunk/languages/pugs/pmc/pugsbit.pmc
==============================================================================
--- trunk/languages/pugs/pmc/pugsbit.pmc (original)
+++ trunk/languages/pugs/pmc/pugsbit.pmc Sun Mar 30 18:58:35 2008
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2003, The Perl Foundation.
+Copyright (C) 2001-2008, The Perl Foundation.
$Id$
=head1 NAME
@@ -18,7 +18,7 @@
*/
-#include "parrot/parrot.h"
+#include "parrot/embed.h"
pmclass PugsBit extends PugsAny
extends Boolean
Modified: trunk/languages/pugs/pmc/pugsbool.pmc
==============================================================================
--- trunk/languages/pugs/pmc/pugsbool.pmc (original)
+++ trunk/languages/pugs/pmc/pugsbool.pmc Sun Mar 30 18:58:35 2008
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2003, The Perl Foundation.
+Copyright (C) 2001-2008, The Perl Foundation.
$Id$
=head1 NAME
@@ -20,7 +20,7 @@
#define PUGS_BOOL
-#include "parrot/parrot.h"
+#include "parrot/embed.h"
#include "pmc_pugsbool.h"
#include "../include/pugs_common.h"
Modified: trunk/languages/pugs/pmc/pugscapture.pmc
==============================================================================
--- trunk/languages/pugs/pmc/pugscapture.pmc (original)
+++ trunk/languages/pugs/pmc/pugscapture.pmc Sun Mar 30 18:58:35 2008
@@ -26,7 +26,7 @@
*/
-#include "parrot/parrot.h"
+#include "parrot/embed.h"
typedef struct siva {
INTVAL uid; /* will be accessible as an element of index ??? */
@@ -165,7 +165,7 @@
}
static size_t
-key_hash_int(Interp *interp, void *hash, size_t seed)
+pugs_key_hash_int(Interp *interp, void *hash, size_t seed)
{
UNUSED(interp);
UNUSED((Hash *)hash);
@@ -174,7 +174,7 @@
static int
-int_compare(Parrot_Interp interp, void *a, void *b)
+pugs_int_compare(Parrot_Interp interp, void *a, void *b)
{
UNUSED(interp);
return a != b;
@@ -205,8 +205,8 @@
if (!siva_ary(a)) siva_set_ary((a), list_new((i), enum_type_PMC)); \
}
#define siva_hash_create_if_void(i, a) { \
- if (!siva_hash(a)) parrot_new_hash_x((i), &siva_hash(a), \
- enum_type_ptr, Hash_key_type_int, int_compare, key_hash_int); \
+ if (!siva_hash(a)) parrot_new_hash_x(&siva_hash(a), \
+ enum_type_ptr, Hash_key_type_int, pugs_int_compare,
pugs_key_hash_int); \
}
#define siva_str_create_if_void(i, a) { \
}
@@ -332,7 +332,7 @@
return intret;
}
else {
- STRING *s = parrot_hash_get_idx(INTERP, hash, key);
+ STRING *s = (STRING *)parrot_hash_get_idx(INTERP, hash,
key);
VTABLE_set_string_native(INTERP, intret, s);
return intret;
}
@@ -349,7 +349,7 @@
}
nextkey = key_next(INTERP, key);
if (!nextkey)
- return b->value;
+ return (PMC *)b->value;
return VTABLE_get_pmc_keyed(INTERP, (PMC*)b->value, nextkey);
}
@@ -385,7 +385,7 @@
PMC *new_undef = pmc_new(INTERP, enum_class_Undef);
return new_undef;
}
- return b->value;
+ return (PMC *)b->value;
}
@@ -440,7 +440,7 @@
INTVAL i = (INTVAL)parrot_hash_get_idx(INTERP, hash, key);
return string_from_int(interp, i);
}
- return parrot_hash_get_idx(INTERP, hash, key);
+ return (STRING *)parrot_hash_get_idx(INTERP, hash, key);
default:
keystr = make_hash_key(INTERP, key);
}
@@ -450,7 +450,7 @@
return VTABLE_get_string(INTERP, undef_pmc);
}
nextkey = key_next(INTERP, key);
- valpmc = b->value;
+ valpmc = (PMC *)b->value;
if (!nextkey)
return VTABLE_get_string(INTERP, valpmc);
return VTABLE_get_string_keyed(INTERP, valpmc, nextkey);
Modified: trunk/languages/pugs/pmc/pugscode.pmc
==============================================================================
--- trunk/languages/pugs/pmc/pugscode.pmc (original)
+++ trunk/languages/pugs/pmc/pugscode.pmc Sun Mar 30 18:58:35 2008
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2003, The Perl Foundation.
+Copyright (C) 2001-2008, The Perl Foundation.
$Id$
=head1 NAME
@@ -18,7 +18,7 @@
*/
-#include "parrot/parrot.h"
+#include "parrot/embed.h"
pmclass PugsCode extends PugsAny
extends Closure
Modified: trunk/languages/pugs/pmc/pugsint.pmc
==============================================================================
--- trunk/languages/pugs/pmc/pugsint.pmc (original)
+++ trunk/languages/pugs/pmc/pugsint.pmc Sun Mar 30 18:58:35 2008
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2006, The Perl Foundation.
+Copyright (C) 2006-2008, The Perl Foundation.
$Id$
=head1 NAME
@@ -18,7 +18,7 @@
*/
-#include "parrot/parrot.h"
+#include "parrot/embed.h"
pmclass PugsInt extends PugsAny
extends Integer
Modified: trunk/languages/pugs/pmc/pugsmapping.pmc
==============================================================================
--- trunk/languages/pugs/pmc/pugsmapping.pmc (original)
+++ trunk/languages/pugs/pmc/pugsmapping.pmc Sun Mar 30 18:58:35 2008
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2003, The Perl Foundation.
+Copyright (C) 2001-2008, The Perl Foundation.
$Id$
=head1 NAME
@@ -18,7 +18,7 @@
*/
-#include "parrot/parrot.h"
+#include "parrot/embed.h"
pmclass PugsMapping extends PugsAny need_ext
extends OrderedHash
Modified: trunk/languages/pugs/pmc/pugsmodule.pmc
==============================================================================
--- trunk/languages/pugs/pmc/pugsmodule.pmc (original)
+++ trunk/languages/pugs/pmc/pugsmodule.pmc Sun Mar 30 18:58:35 2008
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2003, The Perl Foundation.
+Copyright (C) 2001-2008, The Perl Foundation.
$Id$
=head1 NAME
@@ -18,7 +18,7 @@
*/
-#include "parrot/parrot.h"
+#include "parrot/embed.h"
pmclass PugsModule extends PugsAny need_ext
extends NameSpace
Modified: trunk/languages/pugs/pmc/pugsnum.pmc
==============================================================================
--- trunk/languages/pugs/pmc/pugsnum.pmc (original)
+++ trunk/languages/pugs/pmc/pugsnum.pmc Sun Mar 30 18:58:35 2008
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2003, The Perl Foundation.
+Copyright (C) 2001-2008, The Perl Foundation.
$Id$
=head1 NAME
@@ -18,7 +18,7 @@
*/
-#include "parrot/parrot.h"
+#include "parrot/embed.h"
pmclass PugsNum extends PugsAny
extends Float
Modified: trunk/languages/pugs/pmc/pugsstr.pmc
==============================================================================
--- trunk/languages/pugs/pmc/pugsstr.pmc (original)
+++ trunk/languages/pugs/pmc/pugsstr.pmc Sun Mar 30 18:58:35 2008
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2003, The Perl Foundation.
+Copyright (C) 2001-2008, The Perl Foundation.
$Id$
=head1 NAME
@@ -18,7 +18,7 @@
*/
-#include "parrot/parrot.h"
+#include "parrot/embed.h"
pmclass PugsStr extends PugsAny
extends String
Modified: trunk/languages/pugs/pmc/pugstuple.pmc
==============================================================================
--- trunk/languages/pugs/pmc/pugstuple.pmc (original)
+++ trunk/languages/pugs/pmc/pugstuple.pmc Sun Mar 30 18:58:35 2008
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2003, The Perl Foundation.
+Copyright (C) 2001-2008, The Perl Foundation.
$Id$
=head1 NAME
@@ -18,7 +18,7 @@
*/
-#include "parrot/parrot.h"
+#include "parrot/embed.h"
pmclass PugsTuple extends PugsAny need_ext
extends FixedPMCArray
Modified: trunk/languages/pugs/pmc/pugsundef.pmc
==============================================================================
--- trunk/languages/pugs/pmc/pugsundef.pmc (original)
+++ trunk/languages/pugs/pmc/pugsundef.pmc Sun Mar 30 18:58:35 2008
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2003, The Perl Foundation.
+Copyright (C) 2001-2008, The Perl Foundation.
$Id$
=head1 NAME
@@ -8,7 +8,7 @@
=head1 DESCRIPTION
-C<PugsUndef> extends C<Exception> and C<PerlUndef> to provide a Perl 6
C<Undef>.
+C<PugsUndef> extends C<Exception> and C<Undef> to provide a Perl 6 C<Undef>.
=head2 Methods
@@ -18,11 +18,11 @@
*/
-#include "parrot/parrot.h"
+#include "parrot/embed.h"
pmclass PugsUndef extends PugsAny need_ext
extends Exception
- extends PerlUndef
+ extends Undef
does string
does boolean
does integer
@@ -32,12 +32,6 @@
hll Perl6
maps Exception
{
- /* the PMC compiler doesn't know, that Exception inherits
- * this from SArray
- */
- void set_integer_native(INTVAL v) {
- Parrot_SArray_set_integer_native(INTERP, SELF, v);
- }
}
/*