Skip to content

Commit

Permalink
Sinc branch with trunk.
Browse files Browse the repository at this point in the history
Conflicts:
	PBC_COMPAT
	config/gen/makefiles/root.in
	src/pmc_freeze.c
	t/native_pbc/annotations.pbc
	t/native_pbc/integer_1.pbc
	t/native_pbc/number_1.pbc
	t/native_pbc/string_1.pbc
	tools/build/nativecall.pl

git-svn-id: https://svn.parrot.org/parrot/branches/gc_encapsulate@43745 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
bacek committed Feb 7, 2010
1 parent 5aa40a2 commit 4deecef
Show file tree
Hide file tree
Showing 56 changed files with 1,886 additions and 1,462 deletions.
4 changes: 4 additions & 0 deletions Configure.pl
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ =head2 General Options
=over 4
=item C<--hintsfile=filename>
Use filename as the hints file.
=item C<--darwin_no_fink>
On Darwin, do not probe for Fink libraries.
Expand Down
34 changes: 3 additions & 31 deletions DEPRECATED.pod
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ L<https://trac.parrot.org/parrot/ticket/448>

L<https://trac.parrot.org/parrot/ticket/452>

=item Hash changes to AssociativePMCArray [eligible in 1.5]

Also OrderedHash to OrderedAssociativePMCArray.

L<https://trac.parrot.org/parrot/ticket/679>

=item Method stdhandle in ParrotInterpreter [experimental]

L<https://trac.parrot.org/parrot/ticket/264>
Expand All @@ -75,16 +69,6 @@ so this usage will not be allowed.

L<https://trac.parrot.org/parrot/ticket/918>

=item The visit_info structure and associated VTABLEs. [eligible in 2.1]

The current freeze/thaw implementation makes heavy use of the visit_info
structure and the VTABLE interface attached to it. This structure will
be replaced with a PMC of equivalent functionality and with a possibly
similar interface. The freeze, thaw, and visit vtables of all PMCs should be
updated to the provided interim API before this change is made.

L<https://trac.parrot.org/parrot/ticket/1305>

=item Overriding vtable invoke in PIR objects [experimental]

The VTABLE invoke in object.pmc puts SELF at the start of the
Expand Down Expand Up @@ -154,15 +138,15 @@ L<https://trac.parrot.org/parrot/ticket/1406>

=over 4

=item packfile structure [eligible in 1.1]
=item packfile structure [experimental]

L<https://trac.parrot.org/parrot/ticket/451>

=item opcode numbering [eligible in 1.1]
=item opcode numbering [experimental]

L<https://trac.parrot.org/parrot/ticket/451>

=item PMC numbering [eligible in 1.1]
=item PMC numbering [experimental]

L<https://trac.parrot.org/parrot/ticket/451>

Expand Down Expand Up @@ -369,18 +353,6 @@ L<https://trac.parrot.org/parrot/ticket/842>

=back

=head1 build tools

=over 4

=item tools/build/dynpmc.pl [eligible in 1.1]

Replaced with makefiles.

L<https://trac.parrot.org/parrot/ticket/338>

=back

=head1 Parrot library

=over 4
Expand Down
7 changes: 4 additions & 3 deletions MANIFEST
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ex: set ro:
# $Id$
#
# generated by tools/dev/mk_manifest_and_skip.pl Tue Jan 26 00:27:14 2010 UT
# generated by tools/dev/mk_manifest_and_skip.pl Tue Feb 2 19:27:59 2010 UT
#
# See below for documentation on the format of this file.
#
Expand Down Expand Up @@ -1428,6 +1428,7 @@ src/pmc/handle.pmc [devel]src
src/pmc/hash.pmc [devel]src
src/pmc/hashiterator.pmc [devel]src
src/pmc/hashiteratorkey.pmc [devel]src
src/pmc/imageio.pmc [devel]src
src/pmc/integer.pmc [devel]src
src/pmc/iterator.pmc [devel]src
src/pmc/key.pmc [devel]src
Expand Down Expand Up @@ -2128,10 +2129,11 @@ t/tools/pmc2cutils/README []doc
t/tools/testdata [test]
tools/build/addopstags.pl []
tools/build/c2str.pl []
tools/build/dynpmc.pl []
tools/build/cc_flags.pl []
tools/build/fixup_gen_file.pl []
tools/build/h2inc.pl []
tools/build/headerizer.pl []
tools/build/nativecall.pir []
tools/build/nativecall.pl []
tools/build/ops2c.pl [devel]
tools/build/ops2pm.pl []
Expand All @@ -2144,7 +2146,6 @@ tools/dev/.gdbinit []
tools/dev/as2c.pl []
tools/dev/bench_op.pir []
tools/dev/branch_status.pl []
tools/dev/cc_flags.pl []
tools/dev/checkdepend.pl []
tools/dev/create_language.pl [devel]
tools/dev/debian_docs.sh []
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.SKIP
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ex: set ro:
# $Id$
# generated by tools/dev/mk_manifest_and_skip.pl Wed Jan 27 09:57:54 2010 UT
# generated by tools/dev/mk_manifest_and_skip.pl Tue Feb 2 06:21:51 2010 UT
#
# This file should contain a transcript of the svn:ignore properties
# of the directories in the Parrot subversion repository. (Needed for
Expand Down
1 change: 1 addition & 0 deletions PBC_COMPAT
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

# please insert tab separated entries at the top of the list

6.2 2010.01.31 cotto serialization-related changes to ParrotInterpreter
6.1 2010.01.30 whiteknight remove Array PMC
6.0 2010.01.19 chromatic released 2.0.0
5.1 2009.08.06 cotto remove branch_cs opcode
Expand Down
12 changes: 1 addition & 11 deletions compilers/ncigen/config/makefiles/ncigen.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ RM_RF = @rm_rf@
CP = @cp@
PARROT = ../../parrot@exe@
CAT = @cat@
BUILD_DYNPMC = $(PERL) $(BUILD_DIR)/tools/build/dynpmc.pl
RECONFIGURE = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl

## places to look for things
Expand All @@ -30,15 +29,12 @@ PMC_DIR = src/pmc

all: ncigen.pbc

C_GROUP = $(PMC_DIR)/c_group$(LOAD_EXT)

SOURCES = ncigen.pir \
src/gen_grammar.pir \
src/gen_actions.pir \
src/gen_builtins.pir \
src/NCIGENAST.pir \
src/NCIPIR.pir \
# $(C_GROUP)
src/NCIPIR.pir

BUILTINS_PIR = \
src/builtins/say.pir \
Expand All @@ -62,12 +58,6 @@ src/gen_actions.pir: $(NQP) $(PCT) src/parser/actions.pm
src/gen_builtins.pir: $(BUILTINS_PIR)
$(CAT) $(BUILTINS_PIR) >src/gen_builtins.pir

$(C_GROUP): $(PARROT) $(PMC_SOURCES)
cd $(PMC_DIR) && $(BUILD_DYNPMC) generate $(PMCS)
cd $(PMC_DIR) && $(BUILD_DYNPMC) compile $(PMCS)
cd $(PMC_DIR) && $(BUILD_DYNPMC) linklibs $(PMCS)
cd $(PMC_DIR) && $(BUILD_DYNPMC) copy --destination=$(PARROT_DYNEXT) $(PMCS)

# This is a listing of all targets, that are meant to be called by users
help:
@echo ""
Expand Down
5 changes: 5 additions & 0 deletions config/auto/icu.pm
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,11 @@ sub _handle_icushared {
$without = 1;
}
}

# on MacOS X there's sometimes an errornous \c at the end of the
# output line. Remove it.
$icushared =~ s/\s\\c$//;

return ($icushared, $without);
}

Expand Down
10 changes: 5 additions & 5 deletions config/gen/makefiles/root.in
Original file line number Diff line number Diff line change
Expand Up @@ -574,14 +574,14 @@ MAKE = @make_c@
# arguments (etc) injected in the middle.
# There is probably a better way to do this, but I can't work it out right now.
.c$(O) : # suffix rule (limited support)
@$(PERL) tools/dev/cc_flags.pl ./CFLAGS $(CC) "" $(CFLAGS) -I$(@D) @cc_o_out@$@ -c $<
@$(PERL) tools/build/cc_flags.pl ./CFLAGS $(CC) "" $(CFLAGS) -I$(@D) @cc_o_out@$@ -c $<

# XXX probably should detect assembler, but right now this is only used on Sparc

.s$(O) : # suffix rule (limited support)
@$(PERL) tools/dev/cc_flags.pl ./CFLAGS $(CC) "" $(CFLAGS) -I$(@D) @cc_o_out@$@ -c $<
@$(PERL) tools/build/cc_flags.pl ./CFLAGS $(CC) "" $(CFLAGS) -I$(@D) @cc_o_out@$@ -c $<
#UNLESS(win32).S$(O) : # suffix rule (limited support)
#UNLESS(win32) @$(PERL) tools/dev/cc_flags.pl ./CFLAGS $(CC) "" $(CFLAGS) -I$(@D) @cc_o_out@$@ -c $<
#UNLESS(win32) @$(PERL) tools/build/cc_flags.pl ./CFLAGS $(CC) "" $(CFLAGS) -I$(@D) @cc_o_out@$@ -c $<

.pir.pbc : # suffix rule (limited support)
$(PARROT) -o $@ $<
Expand Down Expand Up @@ -796,14 +796,14 @@ help :

world : all parrot_utils

parrot_utils : $(PDUMP) $(DIS) $(PDB) $(PBC_MERGE) $(PBC_TO_EXE) $(PARROT_CONFIG)
parrot_utils : $(PDUMP) $(DIS) $(PDB) $(PBC_MERGE) $(PBC_TO_EXE) $(PARROT_CONFIG) src/install_config$(O)

installable: all $(INSTALLABLEPARROT) $(INSTALLABLEPDUMP) $(INSTALLABLEDIS) $(INSTALLABLEPDB) $(INSTALLABLEPBC_MERGE) $(INSTALLABLEPBCTOEXE) $(INSTALLABLECONFIG) $(INSTALLABLENQP)


flags_dummy :
@echo "Compiling with:"
@$(PERL) tools/dev/cc_flags.pl ./CFLAGS echo $(CC) $(CFLAGS) -I$(@D) @cc_o_out@ xx$(O) -c xx.c
@$(PERL) tools/build/cc_flags.pl ./CFLAGS echo $(CC) $(CFLAGS) -I$(@D) @cc_o_out@ xx$(O) -c xx.c

runtime/parrot/include/parrotlib.pbc: runtime/parrot/library/parrotlib.pir $(PARROT) $(GEN_PASM_INCLUDES)
$(PARROT) -o $@ runtime/parrot/library/parrotlib.pir
Expand Down
8 changes: 6 additions & 2 deletions config/init/hints.pm
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,16 @@ sub runstep {
print "\n[ " if $verbose;

my $hints_used = 0;
my $hints_file;

my $osname = lc( $conf->data->get('OSNAME_provisional') );
$osname = 'linux' if ($osname eq 'gnukfreebsd');
my $hints_file = catfile('config', 'init', 'hints', "$osname.pm");

my $hints_file_name = $conf->options->get('hintsfile') || $osname ;
$hints_file = catfile('config', 'init', 'hints', "$hints_file_name.pm");

if ( -f $hints_file ) {
my $hints_pkg = "init::hints::" . $osname;
my $hints_pkg = "init::hints::" . $hints_file_name;

print "$hints_pkg " if $verbose;

Expand Down
18 changes: 2 additions & 16 deletions docs/compiler_faq.pod
Original file line number Diff line number Diff line change
Expand Up @@ -669,22 +669,8 @@ Parrot supports dynamic PMCs, loadable at runtime, to allow compiler writers
to extend Parrot with additional types. For more information about writing
PMCs, see L<tools/build/pmc2c.pl> and L<docs/pmc.pod>.

To build dynamic PMCs, add something like the following to your Makefile:

PERL = /usr/bin/perl
PMCBUILD = $(PERL) /path/to/parrot/tools/build/dynpmc.pl
DESTDIR = /path/to/parrot/runtime/parrot/dynext
LOAD_EXT = .so

PMCDIR = pmc
PMCS = MyInteger MyFloat MyString MyObject
PMC_FILES = MyInteger.pmc MyFloat.pmc MyString.pmc MyObject.pmc

dynpmcs : $(PMC_FILES)
@cd $(PMCDIR) && $(PMCBUILD) generate $(PMCS)
@cd $(PMCDIR) && $(PMCBUILD) compile $(PMCS)
@cd $(PMCDIR) && $(PMCBUILD) linklibs $(PMCS)
@cd $(PMCDIR) && $(PMCBUILD) copy "--destination=$(DESTDIR)" $(PMCS)
See L<src/dynpmc/Makefile> for an example of how to build your dynamic
PMCS.

=head2 How do I add another op to Parrot?

Expand Down
44 changes: 1 addition & 43 deletions include/parrot/pmc_freeze.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#define PARROT_PMC_FREEZE_H_GUARD

struct _visit_info;
typedef void (*visit_f)(PARROT_INTERP, ARGIN_NULLOK(PMC*), ARGIN(struct _visit_info*));
typedef void (*visit_f)(PARROT_INTERP, ARGIN_NULLOK(PMC*), ARGIN(PMC*));

typedef enum {
VISIT_HOW_PMC_TO_VISITOR = 0x00, /* push to visitor */
Expand All @@ -40,53 +40,11 @@ typedef enum {
#define VISIT_THAW_NORMAL (VISIT_HOW_VISITOR_TO_PMC | VISIT_WHAT_PMC)
#define VISIT_THAW_CONSTANTS VISIT_THAW_NORMAL

struct _visit_info;
typedef INTVAL (*get_integer_f) (PARROT_INTERP, struct _visit_info*);
typedef void (*push_integer_f) (PARROT_INTERP, struct _visit_info*, INTVAL);
typedef void (*push_string_f) (PARROT_INTERP, struct _visit_info*, STRING*);
typedef void (*push_number_f) (PARROT_INTERP, struct _visit_info*, FLOATVAL);
typedef void (*push_pmc_f) (PARROT_INTERP, struct _visit_info*, PMC*);
typedef INTVAL (*shift_integer_f) (PARROT_INTERP, struct _visit_info*);
typedef STRING* (*shift_string_f) (PARROT_INTERP, struct _visit_info*);
typedef FLOATVAL (*shift_number_f) (PARROT_INTERP, struct _visit_info*);
typedef PMC* (*shift_pmc_f) (PARROT_INTERP, struct _visit_info*);

typedef struct _image_funcs {
get_integer_f get_integer;
push_integer_f push_integer;
push_string_f push_string;
push_number_f push_float;
push_pmc_f push_pmc;
shift_integer_f shift_integer;
shift_string_f shift_string;
shift_number_f shift_float;
shift_pmc_f shift_pmc;
} image_funcs;

typedef enum {
EXTRA_IS_NULL,
EXTRA_IS_PROP_HASH,
} extra_flags_enum;

typedef struct _visit_info {
visit_f visit_pmc_now;
size_t pos; /* current read/write position in buffer */
Buffer *buffer;
size_t input_length; /* */
INTVAL what;
PMC **thaw_ptr; /* where to thaw a new PMC */
PMC *seen; /* seen hash */
PMC *todo; /* todo list */
PMC *id_list; /* seen list used by thaw */
UINTVAL id; /* freze ID of PMC */
INTVAL extra_flags; /* concerning to extra */
struct PackFile *pf;
const image_funcs *vtable;
struct _visit_info *image_io; /* dummy backwards-compat pointer. */
} visit_info;

#define IMAGE_IO visit_info

#define VISIT_PMC(interp, visit, pmc) do {\
const INTVAL _visit_pmc_flags = VTABLE_get_integer((interp), (visit)); \
if (_visit_pmc_flags & VISIT_WHAT_PMC) { \
Expand Down
1 change: 1 addition & 0 deletions lib/Parrot/Configure/Options/Conf/Shared.pm
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ our @shared_valid_options = qw{
fatal-step
floatval
help
hintsfile
icu-config
icuheaders
icushared
Expand Down
3 changes: 1 addition & 2 deletions lib/Parrot/Docs/Section/Tools.pm
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ sub new {
'Configuration',
'',
$self->new_item( '', 'tools/dev/as2c.pl' ),
$self->new_item( '', 'tools/dev/cc_flags.pl' ),
$self->new_item( '', 'tools/build/cc_flags.pl' ),
$self->new_item( '', 'tools/build/nativecall.pl' ),
$self->new_item( '', 'tools/build/vtable_h.pl' ),
$self->new_item( '', 'tools/build/vtable_extend.pl' ),
Expand All @@ -55,7 +55,6 @@ sub new {
'',
$self->new_item( '', 'docs/configuration.pod' ),
$self->new_item( '', 'tools/build/c2str.pl' ),
$self->new_item( '', 'tools/build/dynpmc.pl' ),
$self->new_item( '', 'tools/build/ops2c.pl' ),
$self->new_item( '', 'tools/build/ops2pm.pl' ),
$self->new_item( '', 'tools/build/parrot_config_c.pl' ),
Expand Down
Loading

0 comments on commit 4deecef

Please sign in to comment.