cvs commit: ponie/src/pmc perl5xpvhv.pmc

[email protected] (Arthur Bergman) 27 Feb 2004 14:23:40 -0000
Newsgroups perl.ponie.changes
Message-ID <[email protected]>
cvsuser     04/02/27 06:23:40

  Modified:    .        Configure.pl
               perl     embed.fnc embed.h global.sym gv.c hv.c hv.h proto.h
                        sv.c
  Added:       src/pmc  perl5xpvhv.pmc
  Log:
  hashes now go through indirection too
  
  Revision  Changes    Path
  1.11      +2 -0      ponie/Configure.pl
  
  Index: Configure.pl
  ===================================================================
  RCS file: /cvs/public/ponie/Configure.pl,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -w -r1.10 -r1.11
  --- Configure.pl	20 Feb 2004 09:45:56 -0000	1.10
  +++ Configure.pl	27 Feb 2004 14:23:39 -0000	1.11
  @@ -39,6 +39,8 @@
       system('ln','-s','../../src/pmc/perl5lv.pmc') && die "error";
       system('rm -f perl5av.pmc') && die "Error";
       system('ln','-s','../../src/pmc/perl5av.pmc') && die "error";
  +    system('rm -f perl5xpvhv.pmc') && die "Error";
  +    system('ln','-s','../../src/pmc/perl5xpvhv.pmc') && die "error";
       chdir('..') || die;
       system($^X,'Configure.pl',"--ccflags= :add{ -I$dir/perl}") && die "error";
       system('make')  && die "error";
  
  
  
  1.9       +2 -1      ponie/perl/embed.fnc
  
  Index: embed.fnc
  ===================================================================
  RCS file: /cvs/public/ponie/perl/embed.fnc,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -w -r1.8 -r1.9
  --- embed.fnc	26 Feb 2004 14:28:40 -0000	1.8
  +++ embed.fnc	27 Feb 2004 14:23:39 -0000	1.9
  @@ -977,6 +977,7 @@
   Ap	|char**	|macro_HvNAME	|HV *
   Ap	|IV*	|macro_XHvTOTALKEYS	|HV *
   Ap	|NV*	|macro_XHvPLACEHOLDERS	|HV *
  +Ap	|XPVHV**	|macro_HvDATA	|HV *
   
   Ap	|SV***	|macro_AvARRAY	|AV *
   Ap      |U8*|macro_AvFLAGS  |AV *
  @@ -1228,7 +1229,7 @@
   s	|XPVNV*	|new_xpvnv
   s	|XPVCV*	|new_xpvcv
   s	|Parrot_PMC	|new_xpvav
  -s	|XPVHV*	|new_xpvhv
  +s	|Parrot_PMC	|new_xpvhv
   s	|XPVMG*	|new_xpvmg
   s	|Parrot_PMC	|new_xpvlv
   s	|XPVBM*	|new_xpvbm
  
  
  
  1.9       +2 -0      ponie/perl/embed.h
  
  Index: embed.h
  ===================================================================
  RCS file: /cvs/public/ponie/perl/embed.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -w -r1.8 -r1.9
  --- embed.h	26 Feb 2004 14:28:40 -0000	1.8
  +++ embed.h	27 Feb 2004 14:23:39 -0000	1.9
  @@ -1264,6 +1264,7 @@
   #define macro_HvNAME		Perl_macro_HvNAME
   #define macro_XHvTOTALKEYS	Perl_macro_XHvTOTALKEYS
   #define macro_XHvPLACEHOLDERS	Perl_macro_XHvPLACEHOLDERS
  +#define macro_HvDATA		Perl_macro_HvDATA
   #define macro_AvARRAY		Perl_macro_AvARRAY
   #define macro_AvFLAGS		Perl_macro_AvFLAGS
   #define macro_AvALLOC		Perl_macro_AvALLOC
  @@ -3769,6 +3770,7 @@
   #define macro_HvNAME(a)		Perl_macro_HvNAME(aTHX_ a)
   #define macro_XHvTOTALKEYS(a)	Perl_macro_XHvTOTALKEYS(aTHX_ a)
   #define macro_XHvPLACEHOLDERS(a)	Perl_macro_XHvPLACEHOLDERS(aTHX_ a)
  +#define macro_HvDATA(a)		Perl_macro_HvDATA(aTHX_ a)
   #define macro_AvARRAY(a)	Perl_macro_AvARRAY(aTHX_ a)
   #define macro_AvFLAGS(a)	Perl_macro_AvFLAGS(aTHX_ a)
   #define macro_AvALLOC(a)	Perl_macro_AvALLOC(aTHX_ a)
  
  
  
  1.9       +1 -0      ponie/perl/global.sym
  
  Index: global.sym
  ===================================================================
  RCS file: /cvs/public/ponie/perl/global.sym,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -w -r1.8 -r1.9
  --- global.sym	26 Feb 2004 14:28:40 -0000	1.8
  +++ global.sym	27 Feb 2004 14:23:39 -0000	1.9
  @@ -637,6 +637,7 @@
   Perl_macro_HvNAME
   Perl_macro_XHvTOTALKEYS
   Perl_macro_XHvPLACEHOLDERS
  +Perl_macro_HvDATA
   Perl_macro_AvARRAY
   Perl_macro_AvFLAGS
   Perl_macro_AvALLOC
  
  
  
  1.2       +1 -1      ponie/perl/gv.c
  
  Index: gv.c
  ===================================================================
  RCS file: /cvs/public/ponie/perl/gv.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -w -r1.1 -r1.2
  --- gv.c	9 Sep 2003 11:58:49 -0000	1.1
  +++ gv.c	27 Feb 2004 14:23:39 -0000	1.2
  @@ -1142,7 +1142,7 @@
       SvOBJECT_on(io);
       /* Clear the stashcache because a new IO could overrule a 
          package name */
  -    hv_clear(PL_stashcache);
  +    //    hv_clear(PL_stashcache);
       iogv = gv_fetchpv("FileHandle::", FALSE, SVt_PVHV);
       /* unless exists($main::{FileHandle}) and defined(%main::FileHandle::) */
       if (!(iogv && GvHV(iogv) && HvARRAY(GvHV(iogv))))
  
  
  
  1.3       +45 -27    ponie/perl/hv.c
  
  Index: hv.c
  ===================================================================
  RCS file: /cvs/public/ponie/perl/hv.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -w -r1.2 -r1.3
  --- hv.c	26 Feb 2004 14:28:40 -0000	1.2
  +++ hv.c	27 Feb 2004 14:23:39 -0000	1.3
  @@ -19,42 +19,60 @@
   #include "EXTERN.h"
   #define PERL_IN_HV_C
   #include "perl.h"
  +#include "parrot/extend.h"
   
   HE*** Perl_macro_HvARRAY (pTHX_ HV *hv) {
  -  HE** he = (HE**)hv->sv_any->xhv_array;
  +  XPVHV* data = (XPVHV*) Parrot_PMC_get_pointer(PL_Parrot, SvANY(hv));
  +  static HE** he;
  +  he = (HE**)data->xhv_array;
     return &(he);
   }
   
  +
  +XPVHV** Perl_macro_HvDATA (pTHX_ HV *hv) {
  +  static XPVHV* data;
  +  data = (XPVHV*) Parrot_PMC_get_pointer(PL_Parrot, SvANY(hv));
  +  return &(data);
  +}
  +
   STRLEN* Perl_macro_HvFILL (pTHX_ HV *hv) {
  -  return &(hv->sv_any->xhv_fill);
  +  XPVHV* data = (XPVHV*) Parrot_PMC_get_pointer(PL_Parrot, SvANY(hv));
  +  return &(data->xhv_fill);
   }
   
   STRLEN* Perl_macro_HvMAX (pTHX_ HV *hv) {
  -  return &(hv->sv_any->xhv_max);
  +  XPVHV* data = (XPVHV*) Parrot_PMC_get_pointer(PL_Parrot, SvANY(hv));
  +  return &(data->xhv_max);
   }
   
   I32* Perl_macro_HvRITER (pTHX_ HV *hv) {
  -  return &(hv->sv_any->xhv_riter);
  +  XPVHV* data = (XPVHV*) Parrot_PMC_get_pointer(PL_Parrot, SvANY(hv));
  +  return &(data->xhv_riter);
   }
   
   HE** Perl_macro_HvEITER (pTHX_ HV *hv) {
  -  return &(hv->sv_any->xhv_eiter);
  +  XPVHV* data = (XPVHV*) Parrot_PMC_get_pointer(PL_Parrot, SvANY(hv));
  +  return &(data->xhv_eiter);
   }
   
   PMOP** Perl_macro_HvPMROOT (pTHX_ HV *hv) {
  -  return &(hv->sv_any->xhv_pmroot);
  +  XPVHV* data = (XPVHV*) Parrot_PMC_get_pointer(PL_Parrot, SvANY(hv));
  +  return &(data->xhv_pmroot);
   }
   
   char** Perl_macro_HvNAME (pTHX_ HV *hv) {
  -  return &(hv->sv_any->xhv_name);
  +  XPVHV* data = (XPVHV*) Parrot_PMC_get_pointer(PL_Parrot, SvANY(hv));
  +  return &(data->xhv_name);
   }
   
   IV* Perl_macro_XHvTOTALKEYS (pTHX_ HV *hv) {
  -  return &(hv->sv_any->xhv_keys);
  +  XPVHV* data = (XPVHV*) Parrot_PMC_get_pointer(PL_Parrot, SvANY(hv));
  +  return &(data->xhv_keys);
   }
   
   NV* Perl_macro_XHvPLACEHOLDERS (pTHX_ HV *hv) {
  -  return &(hv->sv_any->xhv_placeholders);
  +  XPVHV* data = (XPVHV*) Parrot_PMC_get_pointer(PL_Parrot, SvANY(hv));
  +  return &(data->xhv_placeholders);
   }
   
   
  @@ -296,7 +314,7 @@
   
       /* We use xhv->xhv_foo fields directly instead of HvFOO(hv) to
          avoid unnecessary pointer dereferencing. */
  -    xhv = (XPVHV*)SvANY(hv);
  +    xhv = (XPVHV*)HvDATA(hv);
       if (!xhv->xhv_array /* !HvARRAY(hv) */) {
   	if (lval
   #ifdef DYNAMIC_ENV_FETCH  /* if it's an %ENV lookup, we may get it on the fly */
  @@ -460,7 +478,7 @@
       }
   
       keysave = key = SvPV(keysv, klen);
  -    xhv = (XPVHV*)SvANY(hv);
  +    xhv = (XPVHV*)HvDATA(hv);
       if (!xhv->xhv_array /* !HvARRAY(hv) */) {
   	if (lval
   #ifdef DYNAMIC_ENV_FETCH  /* if it's an %ENV lookup, we may get it on the fly */
  @@ -642,7 +660,7 @@
       if (!hv)
   	return 0;
   
  -    xhv = (XPVHV*)SvANY(hv);
  +    xhv = (XPVHV*)HvDATA(hv);
       if (SvMAGICAL(hv)) {
   	bool needs_copy;
   	bool needs_store;
  @@ -800,7 +818,7 @@
       if (!hv)
   	return 0;
   
  -    xhv = (XPVHV*)SvANY(hv);
  +    xhv = (XPVHV*)HvDATA(hv);
       if (SvMAGICAL(hv)) {
   	bool needs_copy;
   	bool needs_store;
  @@ -974,7 +992,7 @@
   #endif
   	}
       }
  -    xhv = (XPVHV*)SvANY(hv);
  +    xhv = (XPVHV*)HvDATA(hv);
       if (!xhv->xhv_array /* !HvARRAY(hv) */)
   	return Nullsv;
   
  @@ -1131,7 +1149,7 @@
   #endif
   	}
       }
  -    xhv = (XPVHV*)SvANY(hv);
  +    xhv = (XPVHV*)HvDATA(hv);
       if (!xhv->xhv_array /* !HvARRAY(hv) */)
   	return Nullsv;
   
  @@ -1277,7 +1295,7 @@
   #endif
       }
   
  -    xhv = (XPVHV*)SvANY(hv);
  +    xhv = (XPVHV*)HvDATA(hv);
   #ifndef DYNAMIC_ENV_FETCH
       if (!xhv->xhv_array /* !HvARRAY(hv) */)
   	return 0;
  @@ -1383,7 +1401,7 @@
   #endif
       }
   
  -    xhv = (XPVHV*)SvANY(hv);
  +    xhv = (XPVHV*)HvDATA(hv);
   #ifndef DYNAMIC_ENV_FETCH
       if (!xhv->xhv_array /* !HvARRAY(hv) */)
   	return 0;
  @@ -1445,7 +1463,7 @@
   STATIC void
   S_hsplit(pTHX_ HV *hv)
   {
  -    register XPVHV* xhv = (XPVHV*)SvANY(hv);
  +    register XPVHV* xhv = (XPVHV*)HvDATA(hv);
       I32 oldsize = (I32) xhv->xhv_max+1; /* HvMAX(hv)+1 (sick) */
       register I32 newsize = oldsize * 2;
       register I32 i;
  @@ -1507,7 +1525,7 @@
   void
   Perl_hv_ksplit(pTHX_ HV *hv, IV newmax)
   {
  -    register XPVHV* xhv = (XPVHV*)SvANY(hv);
  +    register XPVHV* xhv = (XPVHV*)HvDATA(hv);
       I32 oldsize = (I32) xhv->xhv_max+1; /* HvMAX(hv)+1 (sick) */
       register I32 newsize;
       register I32 i;
  @@ -1599,7 +1617,7 @@
   
       hv = (HV*)NEWSV(502,0);
       sv_upgrade((SV *)hv, SVt_PVHV);
  -    xhv = (XPVHV*)SvANY(hv);
  +    xhv = (XPVHV*)HvDATA(hv);
       SvPOK_off(hv);
       SvNOK_off(hv);
   #ifndef NODEFAULT_SHAREKEYS
  @@ -1746,7 +1764,7 @@
       if (!hv)
   	return;
   
  -    xhv = (XPVHV*)SvANY(hv);
  +    xhv = (XPVHV*)HvDATA(hv);
   
       if (SvREADONLY(hv)) {
   	/* restricted hash: convert all keys to placeholders */
  @@ -1805,7 +1823,7 @@
        * called for freed entries can't recusively mess with us */
       HvARRAY(hv) = Null(HE**); 
       HvFILL(hv) = 0;
  -    ((XPVHV*) SvANY(hv))->xhv_keys = 0;
  +    ((XPVHV*) HvDATA(hv))->xhv_keys = 0;
   
       entry = array[0];
       for (;;) {
  @@ -1838,7 +1856,7 @@
       register XPVHV* xhv;
       if (!hv)
   	return;
  -    xhv = (XPVHV*)SvANY(hv);
  +    xhv = (XPVHV*)HvDATA(hv);
       hfreeentries(hv);
       Safefree(xhv->xhv_array /* HvARRAY(hv) */);
       if (HvNAME(hv)) {
  @@ -1878,7 +1896,7 @@
   
       if (!hv)
   	Perl_croak(aTHX_ "Bad hash");
  -    xhv = (XPVHV*)SvANY(hv);
  +    xhv = (XPVHV*)HvDATA(hv);
       entry = xhv->xhv_eiter; /* HvEITER(hv) */
       if (entry && HvLAZYDEL(hv)) {	/* was deleted earlier? */
   	HvLAZYDEL_off(hv);
  @@ -1936,7 +1954,7 @@
   
       if (!hv)
   	Perl_croak(aTHX_ "Bad hash");
  -    xhv = (XPVHV*)SvANY(hv);
  +    xhv = (XPVHV*)HvDATA(hv);
       oldentry = entry = xhv->xhv_eiter; /* HvEITER(hv) */
   
       if ((mg = SvTIED_mg((SV*)hv, PERL_MAGIC_tied))) {
  @@ -2206,7 +2224,7 @@
   	if (--*Svp == Nullsv)
   	    hv_delete(PL_strtab, str, len, G_DISCARD, hash);
       } */
  -    xhv = (XPVHV*)SvANY(PL_strtab);
  +    xhv = (XPVHV*)HvDATA(PL_strtab);
       /* assert(xhv_array != 0) */
       LOCK_STRTAB_MUTEX;
       /* oentry = &(HvARRAY(hv))[hash & (I32) HvMAX(hv)]; */
  @@ -2301,7 +2319,7 @@
       if (!(Svp = hv_fetch(PL_strtab, str, len, FALSE)))
   	hv_store(PL_strtab, str, len, Nullsv, hash);
       */
  -    xhv = (XPVHV*)SvANY(PL_strtab);
  +    xhv = (XPVHV*)HvDATA(PL_strtab);
       /* assert(xhv_array != 0) */
       LOCK_STRTAB_MUTEX;
       /* oentry = &(HvARRAY(hv))[hash & (I32) HvMAX(hv)]; */
  
  
  
  1.3       +20 -26    ponie/perl/hv.h
  
  Index: hv.h
  ===================================================================
  RCS file: /cvs/public/ponie/perl/hv.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -w -r1.2 -r1.3
  --- hv.h	26 Feb 2004 14:28:40 -0000	1.2
  +++ hv.h	27 Feb 2004 14:23:39 -0000	1.3
  @@ -157,19 +157,7 @@
   
   
   #define Nullhv Null(HV*)
  -#define HvARRAY(hv)	(*(HE***)&((XPVHV*)  SvANY(hv))->xhv_array)
  -#define HvFILL(hv)	((XPVHV*)  SvANY(hv))->xhv_fill
  -#define HvMAX(hv)	((XPVHV*)  SvANY(hv))->xhv_max
  -#define HvRITER(hv)	((XPVHV*)  SvANY(hv))->xhv_riter
  -#define HvEITER(hv)	((XPVHV*)  SvANY(hv))->xhv_eiter
  -#define HvPMROOT(hv)	((XPVHV*)  SvANY(hv))->xhv_pmroot
  -#define HvNAME(hv)	((XPVHV*)  SvANY(hv))->xhv_name
   
  -/* the number of keys (including any placeholers) */
  -#define XHvTOTALKEYS(xhv)	((xhv)->xhv_keys)
  -
  -/* The number of placeholders in the enumerated-keys hash */
  -#define XHvPLACEHOLDERS(xhv)	((xhv)->xhv_placeholders)
   
   
   #define HvARRAY(hv)     (* Perl_macro_HvARRAY  (aTHX_ (HV*)hv) )
  @@ -180,6 +168,12 @@
   #define HvPMROOT(hv)    (* Perl_macro_HvPMROOT (aTHX_ (HV*)hv) )
   #define HvNAME(hv)      (* Perl_macro_HvNAME   (aTHX_ (HV*)hv) )
   
  +#define HvDATA(hv)          (* Perl_macro_HvDATA   (aTHX_ (HV*)hv) )
  +
  +#define XHvTOTALKEYS(xhv)    (xhv->xhv_keys)
  +#define XHvPLACEHOLDERS(xhv) (xhv->xhv_placeholders)
  +
  +
   /* the number of keys that exist() (i.e. excluding placeholders) */
   #define XHvUSEDKEYS(xhv)      (XHvTOTALKEYS(xhv) - (IV)XHvPLACEHOLDERS(xhv))
   
  @@ -188,10 +182,10 @@
    * for backwards compatibility with old XS code. The core uses HvUSEDKEYS
    * (keys, excluding placeholdes) and HvTOTALKEYS (including placeholders)
    */
  -#define HvKEYS(hv)		XHvUSEDKEYS((XPVHV*)  SvANY(hv))
  -#define HvUSEDKEYS(hv)		XHvUSEDKEYS((XPVHV*)  SvANY(hv))
  -#define HvTOTALKEYS(hv)		XHvTOTALKEYS((XPVHV*)  SvANY(hv))
  -#define HvPLACEHOLDERS(hv)	XHvPLACEHOLDERS((XPVHV*)  SvANY(hv))
  +#define HvKEYS(hv)		XHvUSEDKEYS(HvDATA(hv))
  +#define HvUSEDKEYS(hv)		XHvUSEDKEYS(HvDATA(hv))
  +#define HvTOTALKEYS(hv)		XHvTOTALKEYS(HvDATA(hv))
  +#define HvPLACEHOLDERS(hv)	XHvPLACEHOLDERS(HvDATA(hv))
   
   #define HvSHAREKEYS(hv)		(SvFLAGS(hv) & SVphv_SHAREKEYS)
   #define HvSHAREKEYS_on(hv)	(SvFLAGS(hv) |= SVphv_SHAREKEYS)
  
  
  
  1.9       +2 -1      ponie/perl/proto.h
  
  Index: proto.h
  ===================================================================
  RCS file: /cvs/public/ponie/perl/proto.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -w -r1.8 -r1.9
  --- proto.h	26 Feb 2004 14:28:40 -0000	1.8
  +++ proto.h	27 Feb 2004 14:23:39 -0000	1.9
  @@ -935,6 +935,7 @@
   PERL_CALLCONV char**	Perl_macro_HvNAME(pTHX_ HV *);
   PERL_CALLCONV IV*	Perl_macro_XHvTOTALKEYS(pTHX_ HV *);
   PERL_CALLCONV NV*	Perl_macro_XHvPLACEHOLDERS(pTHX_ HV *);
  +PERL_CALLCONV XPVHV**	Perl_macro_HvDATA(pTHX_ HV *);
   
   PERL_CALLCONV SV***	Perl_macro_AvARRAY(pTHX_ AV *);
   PERL_CALLCONV U8*	Perl_macro_AvFLAGS(pTHX_ AV *);
  @@ -1179,7 +1180,7 @@
   STATIC XPVNV*	S_new_xpvnv(pTHX);
   STATIC XPVCV*	S_new_xpvcv(pTHX);
   STATIC Parrot_PMC	S_new_xpvav(pTHX);
  -STATIC XPVHV*	S_new_xpvhv(pTHX);
  +STATIC Parrot_PMC	S_new_xpvhv(pTHX);
   STATIC XPVMG*	S_new_xpvmg(pTHX);
   STATIC Parrot_PMC	S_new_xpvlv(pTHX);
   STATIC XPVBM*	S_new_xpvbm(pTHX);
  
  
  
  1.9       +16 -3     ponie/perl/sv.c
  
  Index: sv.c
  ===================================================================
  RCS file: /cvs/public/ponie/perl/sv.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -w -r1.8 -r1.9
  --- sv.c	26 Feb 2004 11:42:49 -0000	1.8
  +++ sv.c	27 Feb 2004 14:23:39 -0000	1.9
  @@ -969,10 +969,10 @@
   
   /* grab a new struct xpvhv from the free list, allocating more if necessary */
   
  -STATIC XPVHV*
  +STATIC Parrot_PMC
   S_new_xpvhv(pTHX)
   {
  -    XPVHV* xpvhv;
  +  /*    XPVHV* xpvhv;
       LOCK_SV_MUTEX;
       if (!PL_xpvhv_root)
   	more_xpvhv();
  @@ -980,6 +980,17 @@
       PL_xpvhv_root = (XPVHV*)xpvhv->xhv_array;
       UNLOCK_SV_MUTEX;
       return xpvhv;
  +  */
  + 
  +  Parrot_Int  type = Parrot_PMC_typenum(PL_Parrot, "Perl5XPVHV");
  +  Parrot_PMC  hv;
  +  /*
  +    Instead of giving back a real XPVLV we give bakc a PMC
  +  */
  +        
  +  
  +  hv = Parrot_PMC_new(PL_Parrot, type);
  +  return hv;
   }
   
   /* return a struct xpvhv to the free list */
  @@ -987,10 +998,11 @@
   STATIC void
   S_del_xpvhv(pTHX_ XPVHV *p)
   {
  -    LOCK_SV_MUTEX;
  +  /* LOCK_SV_MUTEX;
       p->xhv_array = (char*)PL_xpvhv_root;
       PL_xpvhv_root = p;
       UNLOCK_SV_MUTEX;
  +  */
   }
   
   /* allocate another arena's worth of struct xpvhv */
  @@ -1544,6 +1556,7 @@
   	break;
       case SVt_PVHV:
   	SvANY(sv) = new_XPVHV();
  +	SvPMC_on(sv);
   	if (pv)
   	    Safefree(pv);
   	SvPVX(sv)	= 0;
  
  
  
  1.1                  ponie/src/pmc/perl5xpvhv.pmc
  
  Index: perl5xpvhv.pmc
  ===================================================================
  /* Perl5AV.pmc
   *  Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
   *  CVS Info
   *     $Id: perl5xpvhv.pmc,v 1.1 2004/02/27 14:23:40 sky Exp $
   *  Overview:
   *     These are the vtable functions for the Perl5AV base class
   *  Data Structure and Algorithms:
   *  History:
   *  Notes:
   *  References:
   */
  
  #include "parrot/parrot.h"
  
  #include "EXTERN.h"
  #include "config.h"
  #undef HAS_OFF64_T
  #include "perl.h"
  
  pmclass Perl5XPVHV need_ext {
  
      void init () {	
  	PMC_data(SELF) = malloc(sizeof(struct xpvhv));
      }
  
  
      void init_pmc (PMC* initializer) {
  	abort();
      }
  
  
      void* get_pointer() {
          return PMC_data(SELF);
      }
  
      void init_pmc_props (PMC* initializer, PMC* properties) {
      }
  
      void morph (INTVAL type) {
      }
  
      void mark () {
      }
  
      void destroy () {
      }
  
      PMC* getprop (STRING* key) {
          return (PMC*)0;
      }
  
      void setprop (STRING* key, PMC* value) {
      }
  
      void delprop (STRING* key) {
      }
  
      PMC* getprops () {
          return (PMC*)0;
      }
  
      INTVAL type_keyed (PMC* key) {
          return (INTVAL)0;
      }
  
      INTVAL type_keyed_int (INTVAL key) {
          return (INTVAL)0;
      }
  
      UINTVAL subtype (INTVAL type) {
          return (UINTVAL)0;
      }
  
      UINTVAL subtype_keyed (PMC* key, INTVAL type) {
          return (UINTVAL)0;
      }
  
      UINTVAL subtype_keyed_int (INTVAL key, INTVAL type) {
          return (UINTVAL)0;
      }
  
      STRING* name_keyed (PMC* key) {
          return (STRING*)0;
      }
  
      STRING* name_keyed_int (INTVAL key) {
          return (STRING*)0;
      }
  
  
      PMC* find_method (STRING* method_name) {
          return (PMC*)0;
      }
  
      PMC* find_method_keyed (PMC* key, STRING* method_name) {
          return (PMC*)0;
      }
  
      PMC* find_method_keyed_int (INTVAL key, STRING* method_name) {
          return (PMC*)0;
      }
  
      INTVAL get_integer () {
          return (INTVAL)0;
      }
  
      INTVAL get_integer_keyed (PMC* key) {
          return (INTVAL)0;
      }
  
      INTVAL get_integer_keyed_int (INTVAL key) {
          return (INTVAL)0;
      }
  
      FLOATVAL get_number () {
          return (FLOATVAL)0;
      }
  
      FLOATVAL get_number_keyed (PMC* key) {
          return (FLOATVAL)0;
      }
  
      FLOATVAL get_number_keyed_int (INTVAL key) {
          return (FLOATVAL)0;
      }
  
      BIGNUM* get_bignum () {
          return (BIGNUM*)0;
      }
  
      BIGNUM* get_bignum_keyed (PMC* key) {
          return (BIGNUM*)0;
      }
  
      BIGNUM* get_bignum_keyed_int (INTVAL key) {
          return (BIGNUM*)0;
      }
  
      STRING* get_string () {
  	printf("Get string is called!\n");
          return (STRING*) string_make(interpreter, "true", 4, 0, 0, 0);
      }
  
      STRING* get_string_keyed (PMC* key) {
          return (STRING*)0;
      }
  
      STRING* get_string_keyed_int (INTVAL key) {
          return (STRING*)0;
      }
  
      INTVAL get_bool () {
          return (INTVAL)0;
      }
  
      INTVAL get_bool_keyed (PMC* key) {
          return (INTVAL)0;
      }
  
      INTVAL get_bool_keyed_int (INTVAL key) {
          return (INTVAL)0;
      }
  
      PMC* get_pmc () {
          return (PMC*)0;
      }
  
      PMC* get_pmc_keyed (PMC* key) {
          return (PMC*)0;
      }
  
      PMC* get_pmc_keyed_int (INTVAL key) {
          return (PMC*)0;
      }
  
      void set_integer (PMC* value) {
      }
  
      void set_integer_native (INTVAL value) {
      }
  
      void set_integer_same (PMC* value) {
      }
  
      void set_integer_keyed (PMC* key, INTVAL value) {
      }
  
      void set_integer_keyed_int (INTVAL key, INTVAL value) {
      }
  
      void set_number (PMC* value) {
      }
  
      void set_number_native (FLOATVAL value) {
      }
  
      void set_number_same (PMC* value) {
      }
  
      void set_number_keyed (PMC* key, FLOATVAL value) {
      }
  
      void set_number_keyed_int (INTVAL key, FLOATVAL value) {
      }
  
      void set_bignum (PMC* value) {
      }
  
      void set_bignum_native (BIGNUM* value) {
      }
  
      void set_bignum_same (PMC* value) {
      }
  
      void set_bignum_keyed (PMC* key, BIGNUM* value) {
      }
  
      void set_bignum_keyed_int (INTVAL key, BIGNUM* value) {
      }
  
      void set_string (PMC* value) {
      }
  
      void set_string_native (STRING* value) {
      }
  
      void set_string_same (PMC* value) {
      }
  
      void set_string_keyed (PMC* key, STRING* value) {
      }
  
      void set_string_keyed_int (INTVAL key, STRING* value) {
      }
  
      void set_pmc (PMC* value) {
      }
  
      void set_pmc_keyed (PMC* key, PMC* value) {
      }
  
      void set_pmc_keyed_int (INTVAL key, PMC* value) {
      }
  
      void set_same (PMC* value) {
      }
  
      void set_same_keyed (PMC* key, PMC* value) {
      }
  
      void set_same_keyed_int (INTVAL key, PMC* value) {
      }
  
      INTVAL elements () {
          return (INTVAL)0;
      }
  
      INTVAL elements_keyed (PMC* key) {
          return (INTVAL)0;
      }
  
      INTVAL elements_keyed_int (INTVAL key) {
          return (INTVAL)0;
      }
  
      INTVAL pop_integer () {
          return (INTVAL)0;
      }
  
      FLOATVAL pop_float () {
          return (FLOATVAL)0;
      }
  
      BIGNUM* pop_bignum () {
          return (BIGNUM*)0;
      }
  
      STRING* pop_string () {
          return (STRING*)0;
      }
  
      PMC* pop_pmc () {
          return (PMC*)0;
      }
  
      void push_integer (INTVAL value) {
      }
  
      void push_float (FLOATVAL value) {
      }
  
      void push_bignum (BIGNUM* value) {
      }
  
      void push_string (STRING* value) {
      }
  
      void push_pmc (PMC* value) {
      }
  
      INTVAL shift_integer () {
          return (INTVAL)0;
      }
  
      FLOATVAL shift_float () {
          return (FLOATVAL)0;
      }
  
      BIGNUM* shift_bignum () {
          return (BIGNUM*)0;
      }
  
      STRING* shift_string () {
          return (STRING*)0;
      }
  
      PMC* shift_pmc () {
          return (PMC*)0;
      }
  
      void unshift_integer (INTVAL value) {
      }
  
      void unshift_float (FLOATVAL value) {
      }
  
      void unshift_bignum (BIGNUM* value) {
      }
  
      void unshift_string (STRING* value) {
      }
  
      void unshift_pmc (PMC* value) {
      }
  
      void splice (PMC* value, INTVAL offset, INTVAL count) {
      }
  
      void add (PMC* value, PMC* dest) {
      }
  
      void add_int (INTVAL value, PMC* dest) {
      }
  
      void add_bignum (BIGNUM* value, PMC* dest) {
      }
  
      void add_float (FLOATVAL value, PMC* dest) {
      }
  
      void add_same (PMC* value, PMC* dest) {
      }
  
      void subtract (PMC* value, PMC* dest) {
      }
  
      void subtract_int (INTVAL value, PMC* dest) {
      }
  
      void subtract_bignum (BIGNUM* value, PMC* dest) {
      }
  
      void subtract_float (FLOATVAL value, PMC* dest) {
      }
  
      void subtract_same (PMC* value, PMC* dest) {
      }
  
      void multiply (PMC* value, PMC* dest) {
      }
  
      void multiply_int (INTVAL value, PMC* dest) {
      }
  
      void multiply_bignum (BIGNUM* value, PMC* dest) {
      }
  
      void multiply_float (FLOATVAL value, PMC* dest) {
      }
  
      void multiply_same (PMC* value, PMC* dest) {
      }
  
      void divide (PMC* value, PMC* dest) {
      }
  
      void divide_int (INTVAL value, PMC* dest) {
      }
  
      void divide_bignum (BIGNUM* value, PMC* dest) {
      }
  
      void divide_float (FLOATVAL value, PMC* dest) {
      }
  
      void divide_same (PMC* value, PMC* dest) {
      }
  
      void modulus (PMC* value, PMC* dest) {
      }
  
      void modulus_int (INTVAL value, PMC* dest) {
      }
  
      void modulus_bignum (BIGNUM* value, PMC* dest) {
      }
  
      void modulus_float (FLOATVAL value, PMC* dest) {
      }
  
      void modulus_same (PMC* value, PMC* dest) {
      }
  
      void cmodulus (PMC* value, PMC* dest) {
      }
  
      void cmodulus_int (INTVAL value, PMC* dest) {
      }
  
      void cmodulus_bignum (BIGNUM* value, PMC* dest) {
      }
  
      void cmodulus_float (FLOATVAL value, PMC* dest) {
      }
  
      void cmodulus_same (PMC* value, PMC* dest) {
      }
  
      void neg (PMC* dest) {
      }
  
      void bitwise_or (PMC* value, PMC* dest) {
      }
  
      void bitwise_or_int (INTVAL value, PMC* dest) {
      }
  
      void bitwise_or_same (PMC* value, PMC* dest) {
      }
  
      void bitwise_and (PMC* value, PMC* dest) {
      }
  
      void bitwise_and_int (INTVAL value, PMC* dest) {
      }
  
      void bitwise_and_same (PMC* value, PMC* dest) {
      }
  
      void bitwise_xor (PMC* value, PMC* dest) {
      }
  
      void bitwise_xor_int (INTVAL value, PMC* dest) {
      }
  
      void bitwise_xor_same (PMC* value, PMC* dest) {
      }
  
      void bitwise_ors (PMC* value, PMC* dest) {
      }
  
      void bitwise_ors_str (STRING* value, PMC* dest) {
      }
  
      void bitwise_ors_same (PMC* value, PMC* dest) {
      }
  
      void bitwise_ands (PMC* value, PMC* dest) {
      }
  
      void bitwise_ands_str (STRING* value, PMC* dest) {
      }
  
      void bitwise_ands_same (PMC* value, PMC* dest) {
      }
  
      void bitwise_xors (PMC* value, PMC* dest) {
      }
  
      void bitwise_xors_str (STRING* value, PMC* dest) {
      }
  
      void bitwise_xors_same (PMC* value, PMC* dest) {
      }
  
      void bitwise_not (PMC* dest) {
      }
  
      void bitwise_shl (PMC* value, PMC* dest) {
      }
  
      void bitwise_shl_int (INTVAL value, PMC* dest) {
      }
  
      void bitwise_shl_same (PMC* value, PMC* dest) {
      }
  
      void bitwise_shr (PMC* value, PMC* dest) {
      }
  
      void bitwise_shr_int (INTVAL value, PMC* dest) {
      }
  
      void bitwise_shr_same (PMC* value, PMC* dest) {
      }
  
      void concatenate (PMC* value, PMC* dest) {
      }
  
      void concatenate_native (STRING* value, PMC* dest) {
      }
  
      void concatenate_same (PMC* value, PMC* dest) {
      }
  
      INTVAL is_equal (PMC* value) {
          return (INTVAL)0;
      }
  
      INTVAL is_same (PMC* value) {
          return (INTVAL)0;
      }
  
      INTVAL is_same_keyed (PMC* key, PMC* value) {
          return (INTVAL)0;
      }
  
      INTVAL is_same_keyed_int (INTVAL key, PMC* value) {
          return (INTVAL)0;
      }
  
      INTVAL cmp (PMC* value) {
          return (INTVAL)0;
      }
  
      INTVAL cmp_num (PMC* value) {
          return (INTVAL)0;
      }
  
      INTVAL cmp_string (PMC* value) {
          return (INTVAL)0;
      }
  
      void logical_or (PMC* value, PMC* dest) {
      }
  
      void logical_and (PMC* value, PMC* dest) {
      }
  
      void logical_xor (PMC* value, PMC* dest) {
      }
  
      void logical_not (PMC* dest) {
      }
  
      void repeat (PMC* value, PMC* dest) {
      }
  
      void repeat_int (INTVAL value, PMC* dest) {
      }
  
      void increment () {
      }
  
      void decrement () {
      }
  
      INTVAL exists_keyed (PMC* key) {
          return (INTVAL)0;
      }
  
      INTVAL exists_keyed_int (INTVAL key) {
          return (INTVAL)0;
      }
  
      INTVAL defined () {
          return (INTVAL)0;
      }
  
      INTVAL defined_keyed (PMC* key) {
          return (INTVAL)0;
      }
  
      INTVAL defined_keyed_int (INTVAL key) {
          return (INTVAL)0;
      }
  
      void delete_keyed (PMC* key) {
      }
  
      void delete_keyed_int (INTVAL key) {
      }
  
      PMC* nextkey_keyed (PMC* key, INTVAL what) {
          return (PMC*)0;
      }
  
      PMC* nextkey_keyed_int (INTVAL key, INTVAL what) {
          return (PMC*)0;
      }
  
      void substr (INTVAL offset, INTVAL length, PMC* dest) {
      }
  
      STRING* substr_str (INTVAL offset, INTVAL length) {
          return (STRING*)0;
      }
  
      void* invoke (void* next) {
      }
  
      void* invoke_pmc (PMC* sub, void* next) {
      }
  
      INTVAL can (STRING* method) {
          return (INTVAL)0;
      }
  
      INTVAL can_keyed (PMC* key, STRING* method) {
          return (INTVAL)0;
      }
  
      INTVAL can_keyed_int (INTVAL key, STRING* method) {
          return (INTVAL)0;
      }
  
      INTVAL does (STRING* method) {
          return (INTVAL)0;
      }
  
      INTVAL does_keyed (PMC* key, STRING* method) {
          return (INTVAL)0;
      }
  
      INTVAL does_keyed_int (INTVAL key, STRING* method) {
          return (INTVAL)0;
      }
  
  }