Jeff ---

> Rather wordy, I know, but it also points out how many places depend upon
> the name 'core' in the current code.
>
> I'm also posting a different version shortly that combines core.ops and
> vtable.ops into one core_ops.{c,h,pm}.

Are the vtable ops supposed to be considered 'core' ops? I'm hoping this
is just a temporary hack due to our lack of full platform support for
dynamic loading...

This sounds like a step backwards. If we could get enough folks to make
sure we've got the correct platform support for dynamic loading, we can
write the real code, which will know how to load up an oplib on the fly,
which is much better (IMHO). I started on this stuff, but it didn't
seem like we had our act together enough yet on the platform stuff, so
I put it on hold while that was dealt with.

I wonder if there's enough interest to just go ahead and do this right
(read: separate oplibs with dynamic loading) sooner rather than merge
these oplibs together?


Regards,

-- Gregor
 _____________________________________________________________________ 
/            Inspiration >> Innovation >> Excellence (TM)             \

   Gregor N. Purdy                          [EMAIL PROTECTED]
   Focus Research, Inc.                http://www.focusresearch.com/
   8080 Beckett Center Drive #203                   513-860-3570 vox
   West Chester, OH 45069                           513-860-3579 fax
\_____________________________________________________________________/


> -Jeff
> <[EMAIL PROTECTED]>
> 
> --- cut here ---
> diff -ru parrot_orig/Configure.pl parrot/Configure.pl
> --- parrot_orig/Configure.pl    Thu Nov 22 16:52:23 2001
> +++ parrot/Configure.pl Thu Nov 22 20:02:57 2001
> @@ -62,6 +62,7 @@
>  #defaults for them.
>  #XXX Figure out better defaults
>  my(%c)=(
> +       cat =>                  ($Config{cat}      ||'cat'),
>         iv =>                   ($Config{ivtype}   ||'long'),
>         intvalsize =>       undef,
>  
> diff -ru parrot_orig/Makefile.in parrot/Makefile.in
> --- parrot_orig/Makefile.in     Thu Nov 22 16:52:23 2001
> +++ parrot/Makefile.in  Thu Nov 22 20:13:40 2001
> @@ -1,18 +1,19 @@
>  O = ${o}
>  RM_F = ${rm_f}
> +CAT = ${cat}
>  
>  INC=include/parrot
>  
>  H_FILES = $(INC)/config.h $(INC)/exceptions.h $(INC)/io.h $(INC)/op.h \
>  $(INC)/register.h $(INC)/string.h $(INC)/events.h $(INC)/interpreter.h
> \
>  $(INC)/memory.h $(INC)/parrot.h $(INC)/stacks.h $(INC)/packfile.h \
> -$(INC)/global_setup.h $(INC)/vtable.h $(INC)/oplib/core_ops.h \
> -$(INC)/runops_cores.h $(INC)/trace.h $(INC)/oplib/vtable_ops.h \
> +$(INC)/global_setup.h $(INC)/vtable.h $(INC)/oplib/all_ops.h \
> +$(INC)/runops_cores.h $(INC)/trace.h \
>  $(INC)/pmc.h $(INC)/resources.h $(INC)/platform.h
>  
>  O_FILES = global_setup$(O) interpreter$(O) parrot$(O) register$(O) \
> -core_ops$(O) memory$(O) packfile$(O) stacks$(O) string$(O) encoding$(O)
> \
> -chartype$(O) runops_cores$(O) trace$(O) vtable_ops$(O) pmc$(O) \
> +all_ops$(O) memory$(O) packfile$(O) stacks$(O) string$(O) encoding$(O)
> \
> +chartype$(O) runops_cores$(O) trace$(O) pmc$(O) \
>  encodings/singlebyte$(O) encodings/utf8$(O) encodings/utf16$(O) \
>  encodings/utf32$(O) chartypes/unicode$(O) chartypes/usascii$(O)
> resources$(O) \
>  platform$(O) classes/perlint$(O) classes/perlstring$(O)
> classes/perlnum$(O)
> @@ -42,7 +43,7 @@
>  libparrot.so: $(O_FILES)
>         $(CC) -shared $(C_LIBS) -o $@ $(O_FILES)
>  
> -$(TEST_PROG): test_main$(O) $(O_FILES) Parrot/OpLib/core.pm
> +$(TEST_PROG): test_main$(O) $(O_FILES) Parrot/OpLib/all.pm
>         $(CC) $(CFLAGS) -o $(TEST_PROG) $(O_FILES) test_main$(O)
> $(C_LIBS)
>  
>  $(PDUMP): pdump$(O) $(O_FILES)
> @@ -53,11 +54,17 @@
>  examples/assembly/mops.pbc: examples/assembly/mops.pasm assemble.pl
>         cd examples/assembly; make mops.pbc PERL=$(PERL)
>  
> -Parrot/OpLib/core.pm: core.ops ops2pm.pl
> -       $(PERL) ops2pm.pl core.ops
> +all.ops: core.ops vtable.ops
> +       $(CAT) core.ops vtable.ops > all.ops
>  
> -Parrot/OpLib/vtable.pm: vtable.ops ops2pm.pl
> -       $(PERL) ops2pm.pl vtable.ops
> +Parrot/OpLib/all.pm: all.ops ops2pm.pl
> +       $(PERL) ops2pm.pl all.ops
> +
> +#Parrot/OpLib/core.pm: core.ops ops2pm.pl
> +#      $(PERL) ops2pm.pl core.ops
> +
> +#Parrot/OpLib/vtable.pm: vtable.ops ops2pm.pl
> +#      $(PERL) ops2pm.pl vtable.ops
>  
>  examples/assembly/mops.c: examples/assembly/mops.pbc pbc2c.pl
>         $(PERL) pbc2c.pl examples/assembly/mops.pbc >
> examples/assembly/mops.c
> @@ -109,17 +116,14 @@
>  
>  stacks$(O): $(H_FILES)
>  
> -core_ops$(O): $(H_FILES) core_ops.c
> +all_ops$(O): $(H_FILES) all_ops.c
>  
> -core_ops.c $(INC)/oplib/core_ops.h: core.ops ops2c.pl
> -       $(PERL) ops2c.pl core.ops
> +all_ops.c $(INC)/oplib/all_ops.h: all.ops ops2c.pl
> +       $(PERL) ops2c.pl all.ops
>  
>  vtable.ops: make_vtable_ops.pl
>         $(PERL) make_vtable_ops.pl > vtable.ops
>  
> -vtable_ops.c $(INC)/oplib/vtable_ops.h: vtable.ops ops2c.pl
> -       $(PERL) ops2c.pl vtable.ops
> -
>  $(INC)/config.h: Configure.pl config_h.in
>         $(PERL) Configure.pl
>  
> @@ -135,13 +139,13 @@
>         $(RM_F) *$(O) classes/*$(O) chartypes/*$(O) encodings/*$(O)
>         $(RM_F) *.s core_ops.c $(TEST_PROG) $(PDISASM) $(PDUMP)
>         $(RM_F) $(INC)/vtable.h
> -       $(RM_F) $(INC)/oplib/core_ops.h
> -       $(RM_F) $(INC)/oplib/vtable_ops.h vtable_ops.c vtable.ops
> +       $(RM_F) $(INC)/oplib/all_ops.h
> +       $(RM_F) vtable.ops
>         $(RM_F) $(TEST_PROG) $(PDISASM) $(PDUMP)
>         $(RM_F) t/op/*.pasm t/op/*.pbc t/op/*.out
>         $(RM_F) examples/assembly/mops$(EXE) examples/assembly/mops.c
>         $(RM_F) examples/assembly/mops$(O) examples/assembly/mops.pbc
> -       $(RM_F) Parrot/OpLib/core.pm
> +       $(RM_F) Parrot/OpLib/all.pm
>         cd docs; make clean
>  
>  distclean:
> diff -ru parrot_orig/Parrot/Assembler.pm parrot/Parrot/Assembler.pm
> --- parrot_orig/Parrot/Assembler.pm     Thu Nov 22 16:52:23 2001
> +++ parrot/Parrot/Assembler.pm  Thu Nov 22 20:16:17 2001
> @@ -33,7 +33,7 @@
>  use Getopt::Long;
>  
>  use Parrot::Op;
> -use Parrot::OpLib::core;
> +use Parrot::OpLib::all;
>  
>  #use Parrot::Opcode;
>  
> @@ -290,7 +290,7 @@
>  
>  my %opcodes;
>  
> -foreach my $op (@$Parrot::OpLib::core::ops) {
> +foreach my $op (@$Parrot::OpLib::all::ops) {
>    $opcodes{$op->full_name} = $op;
>  }
>  
> diff -ru parrot_orig/interpreter.c parrot/interpreter.c
> --- parrot_orig/interpreter.c   Thu Nov 22 16:52:23 2001
> +++ parrot/interpreter.c        Thu Nov 22 20:10:42 2001
> @@ -12,7 +12,7 @@
>  
>  #include "parrot/parrot.h"
>  #include "parrot/interp_guts.h"
> -#include "parrot/oplib/core_ops.h"
> +#include "parrot/oplib/all_ops.h"
>  #include "parrot/runops_cores.h"
>  
>  
> @@ -100,10 +100,10 @@
>              int i;
>  
>              if (interpreter->profile == NULL) {
> -                interpreter->profile = (INTVAL
> *)mem_sys_allocate(core_numops *
>  sizeof(INTVAL));
> +                interpreter->profile = (INTVAL
> *)mem_sys_allocate(all_numops * 
> sizeof(INTVAL));
>              }
>  
> -            for (i = 0; i < core_numops; i++) {
> +            for (i = 0; i < all_numops; i++) {
>                  interpreter->profile[i] = 0;
>              }
>          }
> @@ -190,8 +190,8 @@
>      
>      /* Load the core op func and info tables */
>  
> -    interpreter->opcode_funcs = core_opfunc;
> -    interpreter->opcode_info  = core_opinfo;
> +    interpreter->opcode_funcs = all_opfunc;
> +    interpreter->opcode_info  = all_opinfo;
>      
>      /* In case the I/O system needs something */
>      Init_IO(interpreter);
> diff -ru parrot_orig/pbc2c.pl parrot/pbc2c.pl
> --- parrot_orig/pbc2c.pl        Thu Nov 22 16:52:23 2001
> +++ parrot/pbc2c.pl     Thu Nov 22 20:15:30 2001
> @@ -24,7 +24,7 @@
>  $Data::Dumper::Terse  = 1;
>  $Data::Dumper::Indent = 0;
>  
> -my $ops = new Parrot::OpsFile 'core.ops';
> +my $ops = new Parrot::OpsFile 'all.ops';
>  
>  
>  #
> diff -ru parrot_orig/test_main.c parrot/test_main.c
> --- parrot_orig/test_main.c     Thu Nov 22 16:52:23 2001
> +++ parrot/test_main.c  Thu Nov 22 20:09:14 2001
> @@ -12,7 +12,7 @@
>  
>  #include "parrot/parrot.h"
>  
> -#include "parrot/oplib/core_ops.h"
> +#include "parrot/oplib/all_ops.h"
>  
>  int
>  main(int argc, char **argv) {
> @@ -137,12 +137,12 @@
>              printf("  CODE   OP FULL NAME  CALLS\n");
>              printf("  -----  ------------  ------------\n");
>  
> -            for (i = 0; i < core_numops; i++) {
> 
> +            for (i = 0; i < all_numops; i++) {
>                  if(interpreter->profile[i] > 0) {
>                      op_count++;
>                      call_count += interpreter->profile[i];
>  
> -                    printf("  %5d  %-12s  %12d\n", i,
> core_opinfo[i].full_name,
> +                    printf("  %5d  %-12s  %12d\n", i,
> all_opinfo[i].full_name,
>                          interpreter->profile[i]);
>                  }
> ---cut here---
> 
> 


Reply via email to