cvs commit: ponie/perl embed.fnc embed.h perl.h proto.h scope.c sv.c sv.h
[email protected] (Nicholas Clark) 24 Jun 2004 14:31:34 -0000
| Newsgroups | perl.ponie.changes |
|---|---|
| Message-ID | <[email protected]> |
cvsuser 04/06/24 07:31:34
Modified: perl embed.fnc embed.h perl.h proto.h scope.c sv.c sv.h
Log:
set/clear the NV related flags via vtable calls.
Frustratingly I can't change SvNOK_only() because that would require a call
back from the PMC into perl, and the linker doesn't like them.
Maybe it's time to figure out how to make ponie PMCs dynamicly loaded.
Tidy away 2 more unused functions.
Revision Changes Path
1.31 +0 -2 ponie/perl/embed.fnc
Index: embed.fnc
===================================================================
RCS file: /cvs/public/ponie/perl/embed.fnc,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -w -r1.30 -r1.31
--- embed.fnc 24 Jun 2004 11:01:48 -0000 1.30
+++ embed.fnc 24 Jun 2004 14:31:33 -0000 1.31
@@ -1257,8 +1257,6 @@
#if defined(PERL_IN_SV_C) || defined(PERL_DECL_PROT)
s |IV |asIV |SV* sv
s |UV |asUV |SV* sv
-s |void |more_xiv
-s |void |more_xnv
s |void |more_xpv
s |void |more_xpviv
s |void |more_xpvnv
1.21 +0 -12 ponie/perl/embed.h
Index: embed.h
===================================================================
RCS file: /cvs/public/ponie/perl/embed.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -w -r1.20 -r1.21
--- embed.h 24 Jun 2004 11:01:48 -0000 1.20
+++ embed.h 24 Jun 2004 14:31:33 -0000 1.21
@@ -1804,12 +1804,6 @@
#define asUV S_asUV
#endif
#ifdef PERL_CORE
-#define more_xiv S_more_xiv
-#endif
-#ifdef PERL_CORE
-#define more_xnv S_more_xnv
-#endif
-#ifdef PERL_CORE
#define more_xpv S_more_xpv
#endif
#ifdef PERL_CORE
@@ -4365,12 +4359,6 @@
#define asUV(a) S_asUV(aTHX_ a)
#endif
#ifdef PERL_CORE
-#define more_xiv() S_more_xiv(aTHX)
-#endif
-#ifdef PERL_CORE
-#define more_xnv() S_more_xnv(aTHX)
-#endif
-#ifdef PERL_CORE
#define more_xpv() S_more_xpv(aTHX)
#endif
#ifdef PERL_CORE
1.9 +1 -0 ponie/perl/perl.h
Index: perl.h
===================================================================
RCS file: /cvs/public/ponie/perl/perl.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -w -r1.8 -r1.9
--- perl.h 21 Jun 2004 16:34:16 -0000 1.8
+++ perl.h 24 Jun 2004 14:31:33 -0000 1.9
@@ -29,6 +29,7 @@
*/
#include "parrot/embed.h"
+#include "parrot/extend.h"
#if defined(DGUX)
1.31 +0 -2 ponie/perl/proto.h
Index: proto.h
===================================================================
RCS file: /cvs/public/ponie/perl/proto.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -w -r1.30 -r1.31
--- proto.h 24 Jun 2004 11:01:48 -0000 1.30
+++ proto.h 24 Jun 2004 14:31:34 -0000 1.31
@@ -1209,8 +1209,6 @@
#if defined(PERL_IN_SV_C) || defined(PERL_DECL_PROT)
STATIC IV S_asIV(pTHX_ SV* sv);
STATIC UV S_asUV(pTHX_ SV* sv);
-STATIC void S_more_xiv(pTHX);
-STATIC void S_more_xnv(pTHX);
STATIC void S_more_xpv(pTHX);
STATIC void S_more_xpviv(pTHX);
STATIC void S_more_xpvnv(pTHX);
1.5 +0 -2 ponie/perl/scope.c
Index: scope.c
===================================================================
RCS file: /cvs/public/ponie/perl/scope.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -r1.4 -r1.5
--- scope.c 21 Jun 2004 16:34:16 -0000 1.4
+++ scope.c 24 Jun 2004 14:31:34 -0000 1.5
@@ -16,8 +16,6 @@
#include "EXTERN.h"
#define PERL_IN_SCOPE_C
#include "perl.h"
-/* FIXME needed while free_tmps is clearing up SVs */
-#include "parrot/extend.h"
#if defined(PERL_FLEXIBLE_EXCEPTIONS)
void *
1.43 +0 -1 ponie/perl/sv.c
Index: sv.c
===================================================================
RCS file: /cvs/public/ponie/perl/sv.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -w -r1.42 -r1.43
--- sv.c 24 Jun 2004 11:01:48 -0000 1.42
+++ sv.c 24 Jun 2004 14:31:34 -0000 1.43
@@ -19,7 +19,6 @@
#include "EXTERN.h"
#define PERL_IN_SV_C
-#include "parrot/extend.h"
#include "perl.h"
#include "regcomp.h"
#define FCALL *f
1.23 +12 -5 ponie/perl/sv.h
Index: sv.h
===================================================================
RCS file: /cvs/public/ponie/perl/sv.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -w -r1.22 -r1.23
--- sv.h 24 Jun 2004 11:01:48 -0000 1.22
+++ sv.h 24 Jun 2004 14:31:34 -0000 1.23
@@ -421,6 +421,13 @@
Ponie_P_MAX
} Ponie_pointers;
+typedef enum {
+ Ponie_I_SVf_NOK,
+ Ponie_I_SVp_NOK,
+ Ponie_I_SVpf_NOK,
+ Ponie_I_MAX
+} Ponie_integers;
+
/* The following macros define implementation-independent predicates on SVs. */
/*
@@ -582,8 +589,8 @@
#define SvIOKp(sv) (SvFLAGS(sv) & SVp_IOK)
#define SvIOKp_on(sv) (SvRELEASE_IVX(sv), \
SvFLAGS(sv) |= SVp_IOK)
-#define SvNOKp(sv) (SvFLAGS(sv) & SVp_NOK)
-#define SvNOKp_on(sv) (SvFLAGS(sv) |= SVp_NOK)
+#define SvNOKp(sv) ((U32)Parrot_PMC_get_intval_intkey(PL_Parrot,MUMBLE(sv), Ponie_I_SVp_NOK))
+#define SvNOKp_on(sv) Parrot_PMC_set_intval_intkey(PL_Parrot,MUMBLE(sv), 1, Ponie_I_SVp_NOK)
#define SvPOKp(sv) (SvFLAGS(sv) & SVp_POK)
#define SvPOKp_on(sv) (assert_not_ROK(sv) \
SvFLAGS(sv) |= SVp_POK)
@@ -607,9 +614,9 @@
#define SvIsUV_on(sv) (SvFLAGS(sv) |= SVf_IVisUV)
#define SvIsUV_off(sv) (SvFLAGS(sv) &= ~SVf_IVisUV)
-#define SvNOK(sv) (SvFLAGS(sv) & SVf_NOK)
-#define SvNOK_on(sv) (SvFLAGS(sv) |= (SVf_NOK|SVp_NOK))
-#define SvNOK_off(sv) (SvFLAGS(sv) &= ~(SVf_NOK|SVp_NOK))
+#define SvNOK(sv) ((U32)Parrot_PMC_get_intval_intkey(PL_Parrot,MUMBLE(sv), Ponie_I_SVf_NOK))
+#define SvNOK_on(sv) Parrot_PMC_set_intval_intkey(PL_Parrot,MUMBLE(sv), 1, Ponie_I_SVpf_NOK)
+#define SvNOK_off(sv) Parrot_PMC_set_intval_intkey(PL_Parrot,MUMBLE(sv), 0, Ponie_I_SVpf_NOK)
#define SvNOK_only(sv) ((void)SvOK_off(sv), \
SvFLAGS(sv) |= (SVf_NOK|SVp_NOK))