Browse files

Revive pbc

The parrot utils could not load pbc compatible, but older pbc fils anymore
because opslib directories and the init function hardcoded the parrot version
(even with patch!) and not the PBC_COMPAT version.

Replaced all parrot version triples in the pbc format with the PBC version duple.
parrot utils can now load older but compatible pbc files (again).

Replaced the hardcoded version numbers with c preprocessor macros in the
bootstrapped opslib sources and headers, to be more independent and simplier
implementation. If the ops did not change, the ops do not need to get regenerated
anymore for each version bump.
The Ops::Emitter version method is not used anymore, since bootstrap-ops has
been simplified.

Sanified the Makefile by adding missing dependencies and do proper identation
for depends and commands. Prev. line-broken depends were not visually
indistuingishible from commands, and line-broken commands neither.

Store PBC_MAJOR and PBC_MINOR in the config hash, stored by auto::revision.

Bump PBC_COMPAT to 13.0, the opslib directories store now only two version
numbers, not three.
  • Loading branch information...
1 parent c63a337 commit b97b7bdc3c2ae4115abffa76ad8a935bc488f24f @rurban rurban committed Sep 1, 2012
View
7 PBC_COMPAT
@@ -18,17 +18,14 @@
# - other core changes that invalidate byte code :)
#
# After changing PBC_COMPAT either disable t/native_pbc tests or
-# better, if you have an i386 box at hand, regenerate the PBCs
+# better, if you have an i386 and ppc box at hand, regenerate the PBCs
# with tools/dev/mk_native_pbc and commit the changes
# TODO TT #361: all .pbc files should make-depend on PBC_COMPAT
-# Also, don't forget to run tools/dev/mk_packfile_pbc to rebuild PBCs
-# used for testing Packfile* PMCs.
-
# please insert tab separated entries at the top of the list
-13.0 2012.12.03 rurban threads and added Proxy PMC
+13.0 2012.12.04 rurban opslib bytecode version, threads, Proxy
12.1 2012.09.03 rurban moved dynpmc os back to pmc
12.0 2011.10.18 dukeleto released 3.9.0
11.0 2011.07.19 jkeenan released 3.6.0
View
12 compilers/opsc/Rules.mak
@@ -4,22 +4,24 @@ $(LIBRARY_DIR)/opsc.pbc: $(NQP_RX) $(OPSC_SOURCES) $(NQPRX_LIB_SETTING)
$(OPSC_DIR)/gen/Ops/Compiler.pir: $(OPSC_DIR)/src/Ops/Compiler.pm $(NQP_RX)
$(NQP_RX) --target=pir --output=$@ $(OPSC_DIR)/src/Ops/Compiler.pm
-$(OPSC_DIR)/gen/Ops/Compiler/Actions.pir: $(OPSC_DIR)/src/Ops/Compiler/Actions.pm $(NQP_RX)
+$(OPSC_DIR)/gen/Ops/Compiler/Actions.pir: $(OPSC_DIR)/src/Ops/Compiler/Actions.pm $(NQP_RX) \
+ $(LIBRARY_DIR)/nqp-setting.pbc
$(NQP_RX) --target=pir --output=$@ $(OPSC_DIR)/src/Ops/Compiler/Actions.pm
-$(OPSC_DIR)/gen/Ops/Compiler/Grammar.pir: $(OPSC_DIR)/src/Ops/Compiler/Grammar.pm $(NQP_RX)
+$(OPSC_DIR)/gen/Ops/Compiler/Grammar.pir: $(OPSC_DIR)/src/Ops/Compiler/Grammar.pm $(NQP_RX) \
+ $(LIBRARY_DIR)/HLL.pbc
$(NQP_RX) --target=pir --output=$@ $(OPSC_DIR)/src/Ops/Compiler/Grammar.pm
$(OPSC_DIR)/gen/Ops/Emitter.pir: $(OPSC_DIR)/src/Ops/Emitter.pm $(NQP_RX)
$(NQP_RX) --target=pir --output=$@ $(OPSC_DIR)/src/Ops/Emitter.pm
-$(OPSC_DIR)/gen/Ops/File.pir: $(OPSC_DIR)/src/Ops/File.pm $(NQP_RX)
+$(OPSC_DIR)/gen/Ops/File.pir: $(OPSC_DIR)/src/Ops/File.pm $(NQP_RX) $(LIBRARY_DIR)/config.pbc
$(NQP_RX) --target=pir --output=$@ $(OPSC_DIR)/src/Ops/File.pm
-$(OPSC_DIR)/gen/Ops/Op.pir: $(OPSC_DIR)/src/Ops/Op.pm $(NQP_RX)
+$(OPSC_DIR)/gen/Ops/Op.pir: $(OPSC_DIR)/src/Ops/Op.pm $(NQP_RX) $(LIBRARY_DIR)/dumper.pbc
$(NQP_RX) --target=pir --output=$@ $(OPSC_DIR)/src/Ops/Op.pm
-$(OPSC_DIR)/gen/Ops/OpLib.pir: $(OPSC_DIR)/src/Ops/OpLib.pm $(NQP_RX)
+$(OPSC_DIR)/gen/Ops/OpLib.pir: $(OPSC_DIR)/src/Ops/OpLib.pm $(NQP_RX) $(LIBRARY_DIR)/dumper.pbc
$(NQP_RX) --target=pir --output=$@ $(OPSC_DIR)/src/Ops/OpLib.pm
$(OPSC_DIR)/gen/Ops/Trans.pir: $(OPSC_DIR)/src/Ops/Trans.pm $(NQP_RX)
View
17 compilers/opsc/src/Ops/Emitter.pm
@@ -1,5 +1,5 @@
#! nqp
-# Copyright (C) 2010, Parrot Foundation.
+# Copyright (C) 2010-2012, Parrot Foundation.
class Ops::Emitter is Hash;
@@ -52,7 +52,7 @@ method new(:$ops_file!, :$trans!, :$script!, :$file, :%flags!) {
!! 'PARROT_DYNEXT_EXPORT';
self<init_func> := join('_',
- 'Parrot', 'DynOp', $base ~ $suffix, |$ops_file.version );
+ 'PARROT', 'DYNOP', uc($base ~ $suffix), 'INIT' );
# Prepare ops
$trans.prepare_ops(self, $ops_file);
@@ -212,6 +212,7 @@ method _emit_source_preamble($fh) {
self._emit_preamble($fh);
$fh.print(qq|
#include "{self<include>}"
+#include "parrot/pbcversion.h"
#include "pmc/pmc_parrotlibrary.h"
#include "pmc/pmc_callcontext.h"
@@ -239,9 +240,8 @@ op_lib_t | ~ self.bs ~ q|op_lib = {| ~ qq|
"{self.suffix}", /* suffix */
$core_type, /* core_type = PARROT_XX_CORE */
0, /* flags */
- {self.ops_file.version_major}, /* major_version */
- {self.ops_file.version_minor}, /* minor_version */
- {self.ops_file.version_patch}, /* patch_version */
+ PARROT_PBC_MAJOR,
+ PARROT_PBC_MINOR,
{+self.ops_file.ops}, /* op_count */
{self.trans.op_info(self)}, /* op_info_table */
{self.trans.op_func(self)}, /* op_func_table */
@@ -256,8 +256,8 @@ method _emit_init_func($fh) {
my $dispatch := self.trans.init_func_disaptch;
# TODO There is a bug in NQP about \{
- $fh.print((self.flags<core> ?? 'PARROT_EXPORT' !! '') ~ q|
-op_lib_t *
+ $fh.print(qq|\n\n| ~ (self.flags<core> ?? "PARROT_EXPORT\n" !! '')
+~ q|op_lib_t *
| ~ self.init_func ~ q|(PARROT_INTERP, long init) {
/* initialize and return op_lib ptr */
if (init == 1) {
@@ -354,8 +354,11 @@ method _emit_includes($fh) {
$fh.print(qq|
#include "parrot/parrot.h"
#include "parrot/oplib.h"
+#include "parrot/pbcversion.h"
#include "parrot/runcore_api.h"
+#define | ~ self.init_func ~ ' Parrot_DynOp_' ~ self.bs ~ q| ## PARROT_PBC_MAJOR ## _ ## PARROT_PBC_MINOR
+
| ~ (self.flags<core> ?? 'PARROT_EXPORT' !! '') ~ qq|
op_lib_t *{self.init_func}(PARROT_INTERP, long init);
View
43 compilers/opsc/src/Ops/File.pm
@@ -1,5 +1,5 @@
#! nqp
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2012, Parrot Foundation.
# XXX Better to put this into docs/ somewhere.
@@ -217,8 +217,6 @@ method new_str($str, :$oplib) {
self._set_version();
- self._set_version();
-
self.compile_ops($str);
self;
@@ -281,9 +279,9 @@ method ops() { self<ops> };
method oplib() { self<oplib> };
method version() { self<version>; }
-method version_major() { self<version_major> }
-method version_minor() { self<version_minor> }
-method version_patch() { self<version_patch> }
+# unused. Replaced by cpp macros from pbcversion.h
+method bytecode_major() { self<bytecode_major> }
+method bytecode_minor() { self<bytecode_minor> }
method _calculate_op_codes() {
@@ -296,36 +294,11 @@ method _calculate_op_codes() {
method _set_version() {
my $config := _config();
- my $version_filename;
- if $config<installed> {
- $version_filename :=
- $config<libdir> ~
- $config<versiondir> ~
- $config<slash> ~
- 'VERSION';
- }
- else {
- $version_filename :=
- $config<prefix> ~
- $config<slash> ~
- 'VERSION';
- }
-
- grammar VERSION {
- rule TOP { <version> }
- rule version { $<major>=(\d+) '.' $<minor>=(\d+) '.' $<patch>=(\d+) }
- }
-
- my $version := slurp($version_filename);
- my $version_match := VERSION.parse($version);
- #say("# $version");
- self<version_major> := +$version_match<version><major>;
- self<version_minor> := +$version_match<version><minor>;
- self<version_patch> := +$version_match<version><patch>;
+ self<bytecode_major> := +$config<PBC_MAJOR>;
+ self<bytecode_minor> := +$config<PBC_MINOR>;
self<version> := [
- +self<version_major>,
- +self<version_minor>,
- +self<version_patch>,
+ +self<bytecode_major>,
+ +self<bytecode_minor>,
];
}
View
5 config/auto/revision.pm
@@ -18,6 +18,7 @@ use warnings;
use base qw(Parrot::Configure::Step);
use Parrot::Revision;
+use Parrot::BuildUtil;
sub _init {
my $self = shift;
@@ -38,6 +39,10 @@ sub runstep {
$conf->data->set( revision => $revision );
+ my ( $bc_major, $bc_minor ) = Parrot::BuildUtil::get_bc_version();
+ $conf->data->set( 'PBC_MAJOR' => $bc_major,
+ 'PBC_MINOR' => $bc_minor );
+
if ( defined $revision ) {
$self->set_result($revision);
}
View
5 config/gen/config_h/config_h.in
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2011, Parrot Foundation.
+/* Copyright (C) 2001-2012, Parrot Foundation.
*/
/* config.h
@@ -138,8 +138,9 @@ typedef struct _vtable VTABLE;
typedef void DPOINTER;
/* Oplib and dynamic ops related. */
+#include "parrot/pbcversion.h"
#define PARROT_CORE_OPLIB_NAME "core_ops"
-#define PARROT_CORE_OPLIB_INIT Parrot_DynOp_core_@MAJOR@_@MINOR@_@PATCH@
+#define PARROT_CORE_OPLIB_INIT Parrot_DynOp_core_ ## PARROT_PBC_MAJOR ## _ ## PARROT_PBC_MINOR
#define PARROT_GET_CORE_OPLIB(i) PARROT_CORE_OPLIB_INIT((i), 1)
View
160 config/gen/makefiles/root.in
@@ -867,10 +867,14 @@ help :
world : parrot_utils
-parrot_utils : all $(PDUMP) $(DIS) $(PDB) $(PBC_MERGE) $(PBC_TO_EXE) $(PARROT_CONFIG) src/install_config$(O) $(PARROT_PROVE) $(OPS2C)
+parrot_utils : all $(PDUMP) $(DIS) $(PDB) $(PBC_MERGE) $(PBC_TO_EXE) $(PARROT_CONFIG) \
+ src/install_config$(O) $(PARROT_PROVE) $(OPS2C)
-installable: all $(INSTALLABLEPARROT) $(INSTALLABLEPDUMP) $(INSTALLABLEDIS) $(INSTALLABLEPDB) $(INSTALLABLEPBC_MERGE) $(INSTALLABLEPBCTOEXE) $(INSTALLABLECONFIG) $(INSTALLABLENQP) $(INSTALLABLENCITHUNKGEN) $(INSTALLABLEPARROT_PROVE) $(INSTALLABLEOPS2C) $(INSTALLABLEWINXED)
+installable: all $(INSTALLABLEPARROT) $(INSTALLABLEPDUMP) $(INSTALLABLEDIS) $(INSTALLABLEPDB) \
+ $(INSTALLABLEPBC_MERGE) $(INSTALLABLEPBCTOEXE) $(INSTALLABLECONFIG) $(INSTALLABLENQP) \
+ $(INSTALLABLENCITHUNKGEN) $(INSTALLABLEPARROT_PROVE) $(INSTALLABLEOPS2C) $(INSTALLABLEWINXED)
+# See compilers/opsc/Rules.mak
bootstrap-ops : $(OPS2C)
$(OPS2C) --core --quiet
$(MAKE_C) .
@@ -879,11 +883,11 @@ $(RUN_INC_DIR)/parrotlib.pbc: $(LIBRARY_DIR)/parrotlib.pir $(PARROT) $(GEN_PASM_
$(PARROT) -o $@ $(LIBRARY_DIR)/parrotlib.pir
$(RUN_INC_DIR)/parrot_version.pir:
- $(PERL) tools/build/gen_version.pl >$(RUN_INC_DIR)/parrot_version.pir
+ $(PERL) tools/build/gen_version.pl > $@
$(RUN_INC_DIR)/config.fpmc : myconfig config_lib.pir \
- $(RUN_INC_DIR)/datatypes.pasm $(MINIPARROT)
-# always rebuid parrot_version.pir when building config.fpmc
+ $(RUN_INC_DIR)/datatypes.pasm $(MINIPARROT)
+# always rebuild parrot_version.pir when building config.fpmc
$(PERL) tools/build/gen_version.pl >$(RUN_INC_DIR)/parrot_version.pir
$(MINIPARROT) -I$(RUN_INC_DIR) config_lib.pir > $@
@@ -907,25 +911,24 @@ $(FRPTWO_DIR)/prt0.pbc$(O) : $(FRPTWO_DIR)/prt0.pbc.c \
$(INC_DIR)/compiler.h \
$(INC_DIR)/has_header.h \
$(INC_DIR)/api.h \
- $(INC_DIR)/config.h
+ $(INC_DIR)/config.h \
+ $(INC_DIR)/pbcversion.h
$(PARROTOLD) : $(FRP_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
- src/parrot_config$(O) src/longopt$(O) \
- $(MINIPARROT)
+ src/parrot_config$(O) src/longopt$(O) $(MINIPARROT)
$(LINK) @ld_out@$@ \
$(FRP_DIR)/main$(O) src/parrot_config$(O) src/longopt$(O) \
$(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
$(PARROT) : $(FRPTWO_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
- src/parrot_config$(O) src/longopt$(O) \
- $(MINIPARROT) $(FRPTWO_DIR)/prt0.pbc$(O) $(GEN_PASM_INCLUDES)
+ src/parrot_config$(O) src/longopt$(O) \
+ $(MINIPARROT) $(FRPTWO_DIR)/prt0.pbc$(O) $(GEN_PASM_INCLUDES)
$(LINK) @ld_out@$@ \
$(FRPTWO_DIR)/main$(O) $(FRPTWO_DIR)/prt0.pbc$(O) src/parrot_config$(O) src/longopt$(O) \
$(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
-
$(DEV_TOOLS_DIR)/pbc_to_exe.pir: $(DEV_TOOLS_DIR)/pbc_to_exe.winxed $(PARROT) $(WINXED_LANG) winxed.pbc
$(PARROT) winxed.pbc -c --noan $(DEV_TOOLS_DIR)/pbc_to_exe.winxed
@@ -934,12 +937,12 @@ $(PBC_TO_EXE) : $(DEV_TOOLS_DIR)/pbc_to_exe.pir $(LIBRARY_DIR)/config.pir $(PARR
$(PARROT) pbc_to_exe.pbc pbc_to_exe.pbc
parrot_nci_thunk_gen.pbc : \
- $(DEV_TOOLS_DIR)/nci_thunk_gen.pir \
- $(DATA_JSON_LIB_PBCS) $(PARROT) \
- $(DYNEXT_DIR)/bit_ops$(LOAD_EXT) \
- $(LIBRARY_DIR)/pcre.pbc \
- $(RUN_INC_DIR)/hash_key_type.pasm \
- $(RUN_INC_DIR)/datatypes.pasm
+ $(DEV_TOOLS_DIR)/nci_thunk_gen.pir \
+ $(DATA_JSON_LIB_PBCS) $(PARROT) \
+ $(DYNEXT_DIR)/bit_ops$(LOAD_EXT) \
+ $(LIBRARY_DIR)/pcre.pbc \
+ $(RUN_INC_DIR)/hash_key_type.pasm \
+ $(RUN_INC_DIR)/datatypes.pasm
$(PARROT) -o parrot_nci_thunk_gen.pbc $(DEV_TOOLS_DIR)/nci_thunk_gen.pir
$(NCI_THUNK_GEN) : parrot_nci_thunk_gen.pbc $(PBC_TO_EXE)
@@ -956,15 +959,15 @@ $(PARROT_CONFIG) : $(DEV_TOOLS_DIR)/parrot-config.pir $(PARROT) $(PBC_TO_EXE)
$(PARROT) pbc_to_exe.pbc parrot_config.pbc
$(MINIPARROT) : $(FRP_DIR)/main$(O) $(INC_DIR)/api.h $(INC_DIR)/longopt.h $(LIBPARROT) \
- src/null_config$(O) src/longopt$(O)
+ src/null_config$(O) src/longopt$(O)
$(LINK) @ld_out@$@ $(FRP_DIR)/main$(O) src/null_config$(O) src/longopt$(O) \
$(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
#IF(cygwin and optimize):$(INSTALLABLEPARROT) : LINK += -s
$(INSTALLABLEPARROT) : $(FRPTWO_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
- src/install_config$(O) src/longopt$(O) \
- $(FRPTWO_DIR)/prt0.pbc$(O) $(PARROT)
+ src/install_config$(O) src/longopt$(O) \
+ $(FRPTWO_DIR)/prt0.pbc$(O) $(PARROT)
$(LINK) @ld_out@$@ \
$(FRPTWO_DIR)/main$(O) src/install_config$(O) src/longopt$(O) \
$(FRPTWO_DIR)/prt0.pbc$(O) @rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
@@ -973,21 +976,18 @@ $(INSTALLABLEPARROT) : $(FRPTWO_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
$(INC_DIR)/context.h : $(INC_PMC_DIR)/pmc_callcontext.h
$(INC_DIR)/pbcversion.h : PBC_COMPAT
- $(PERL) $(BUILD_TOOLS_DIR)/pbcversion_h.pl > $(INC_DIR)/pbcversion.h
+ $(PERL) $(BUILD_TOOLS_DIR)/pbcversion_h.pl > $@
src/parrot_config.c : $(RUN_INC_DIR)/config.fpmc \
- $(BUILD_TOOLS_DIR)/parrot_config_c.pl
- $(PERL) $(BUILD_TOOLS_DIR)/parrot_config_c.pl > \
- src/parrot_config.c
+ $(BUILD_TOOLS_DIR)/parrot_config_c.pl
+ $(PERL) $(BUILD_TOOLS_DIR)/parrot_config_c.pl > $@
src/install_config.c : install_config.fpmc \
- $(BUILD_TOOLS_DIR)/parrot_config_c.pl
- $(PERL) $(BUILD_TOOLS_DIR)/parrot_config_c.pl --install > \
- src/install_config.c
+ $(BUILD_TOOLS_DIR)/parrot_config_c.pl
+ $(PERL) $(BUILD_TOOLS_DIR)/parrot_config_c.pl --install > $@
src/null_config.c : myconfig $(BUILD_TOOLS_DIR)/parrot_config_c.pl
- $(PERL) $(BUILD_TOOLS_DIR)/parrot_config_c.pl --mini > \
- src/null_config.c
+ $(PERL) $(BUILD_TOOLS_DIR)/parrot_config_c.pl --mini > $@
install_config.fpmc : myconfig config_lib.pir $(PARROT)
@echo "Invoking Parrot to generate install_config.fpmc"
@@ -1000,6 +1000,7 @@ src/parrot_config$(O) : \
$(INC_DIR)/core_types.h \
$(INC_DIR)/feature.h \
$(INC_DIR)/has_header.h \
+ $(INC_DIR)/pbcversion.h \
src/parrot_config.c
src/install_config$(O) : \
@@ -1009,6 +1010,7 @@ src/install_config$(O) : \
$(INC_DIR)/core_types.h \
$(INC_DIR)/feature.h \
$(INC_DIR)/has_header.h \
+ $(INC_DIR)/pbcversion.h \
src/install_config.c
src/null_config$(O) : \
@@ -1018,6 +1020,7 @@ src/null_config$(O) : \
$(INC_DIR)/core_types.h \
$(INC_DIR)/feature.h \
$(INC_DIR)/has_header.h \
+ $(INC_DIR)/pbcversion.h \
src/null_config.c
src/list$(O) : \
@@ -1120,7 +1123,7 @@ lib_deps : lib_deps_object lib_deps_source
# and parrot builds fine (except for the unproto warning
# so always delete the lib -leo
-PARROT_LIBS: \
+PARROT_LIBS : \
#IF(has_static_linking): $(LIBPARROT_STATIC) \
#IF(has_dynamic_linking): $(LIBPARROT_SHARED)
@@ -1199,7 +1202,7 @@ $(DIS) : $(FR_DIR)/pbc_disassemble/main$(O) $(LIBPARROT)
#IF(cygwin and optimize):$(INSTALLABLEDIS) : LINK += -s
$(INSTALLABLEDIS) : $(FR_DIR)/pbc_disassemble/main$(O) \
- src/install_config$(O) $(LIBPARROT)
+ src/install_config$(O) $(LIBPARROT)
$(LINK) @ld_out@$@ \
$(FR_DIR)/pbc_disassemble/main$(O) \
src/longopt$(O) \
@@ -1230,16 +1233,14 @@ $(FR_DIR)/pbc_dump/main$(O) : \
#IF(cygwin and optimize):$(INSTALLABLEPDUMP) : LINK += -s
$(INSTALLABLEPDUMP) : $(FR_DIR)/pbc_dump/main$(O) $(FR_DIR)/pbc_dump/packdump$(O) \
- src/install_config$(O) $(LIBPARROT)
+ src/install_config$(O) $(LIBPARROT)
$(LINK) @ld_out@$@ \
- $(FR_DIR)/pbc_dump/main$(O) \
- $(FR_DIR)/pbc_dump/packdump$(O) \
- src/longopt$(O) \
- @rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
+ $(FR_DIR)/pbc_dump/main$(O) \
+ $(FR_DIR)/pbc_dump/packdump$(O) \
+ src/longopt$(O) \
+ $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
-
-
#
# Parrot Bytecode File Merger
#
@@ -1266,34 +1267,30 @@ $(INSTALLABLEPBC_MERGE) : $(FR_DIR)/pbc_merge/main$(O) $(LIBPARROT) $(INSTALLABL
#
$(LIBRARY_DIR)/ProfTest.pbc: $(LIBRARY_DIR)/ProfTest/PIRProfile.pbc \
- $(LIBRARY_DIR)/ProfTest/NQPProfile.pbc $(LIBRARY_DIR)/ProfTest/Matcher.pbc \
- $(LIBRARY_DIR)/ProfTest/Want.pbc
+ $(LIBRARY_DIR)/ProfTest/NQPProfile.pbc $(LIBRARY_DIR)/ProfTest/Matcher.pbc \
+ $(LIBRARY_DIR)/ProfTest/Want.pbc
$(PBC_MERGE) -o $@ $(LIBRARY_DIR)/ProfTest/PIRProfile.pbc \
- $(LIBRARY_DIR)/ProfTest/NQPProfile.pbc $(LIBRARY_DIR)/ProfTest/Matcher.pbc \
- $(LIBRARY_DIR)/ProfTest/Want.pbc
-
+ $(LIBRARY_DIR)/ProfTest/NQPProfile.pbc $(LIBRARY_DIR)/ProfTest/Matcher.pbc \
+ $(LIBRARY_DIR)/ProfTest/Want.pbc
$(LIBRARY_DIR)/ProfTest/PIRProfile.pbc: $(LIBRARY_DIR)/ProfTest/PIRProfile.pir
$(PARROT) -o $@ $(LIBRARY_DIR)/ProfTest/PIRProfile.pir
$(LIBRARY_DIR)/ProfTest/PIRProfile.pir: $(LIBRARY_DIR)/ProfTest/PIRProfile.nqp $(NQP_RX)
$(NQP_RX) --target=pir $(LIBRARY_DIR)/ProfTest/PIRProfile.nqp > $@
-
$(LIBRARY_DIR)/ProfTest/NQPProfile.pbc: $(LIBRARY_DIR)/ProfTest/NQPProfile.pir
$(PARROT) -o $@ $(LIBRARY_DIR)/ProfTest/NQPProfile.pir
$(LIBRARY_DIR)/ProfTest/NQPProfile.pir: $(LIBRARY_DIR)/ProfTest/NQPProfile.nqp $(NQP_RX)
$(NQP_RX) --target=pir $(LIBRARY_DIR)/ProfTest/NQPProfile.nqp > $@
-
$(LIBRARY_DIR)/ProfTest/Want.pbc: $(LIBRARY_DIR)/ProfTest/Want.pir
$(PARROT) -o $@ $(LIBRARY_DIR)/ProfTest/Want.pir
$(LIBRARY_DIR)/ProfTest/Want.pir: $(LIBRARY_DIR)/ProfTest/Want.nqp $(NQP_RX)
$(NQP_RX) --target=pir $(LIBRARY_DIR)/ProfTest/Want.nqp > $@
-
$(LIBRARY_DIR)/ProfTest/Matcher.pbc: $(LIBRARY_DIR)/ProfTest/Matcher.pir
$(PARROT) -o $@ $(LIBRARY_DIR)/ProfTest/Matcher.pir
@@ -1331,71 +1328,53 @@ $(RUN_INC_DIR)/iglobals.pasm : $(INC_DIR)/interpreter.h $(H2INC)
$(PERL) $(H2INC) $(INC_DIR)/interpreter.h $@
$(RUN_INC_DIR)/sysinfo.pasm : $(INC_DIR)/interpreter.h $(H2INC)
$(PERL) $(H2INC) $(INC_DIR)/interpreter.h $@
-
$(RUN_INC_DIR)/interpinfo.pasm : $(INC_DIR)/gc_api.h $(H2INC)
$(PERL) $(H2INC) $(INC_DIR)/gc_api.h $@
-
$(RUN_INC_DIR)/timer.pasm : $(INC_DIR)/scheduler.h $(H2INC)
$(PERL) $(H2INC) $(INC_DIR)/scheduler.h $@
-
$(RUN_INC_DIR)/pmctypes.pasm : $(INC_DIR)/core_pmcs.h $(H2INC)
$(PERL) $(H2INC) $(INC_DIR)/core_pmcs.h $@
-
$(RUN_INC_DIR)/stdio.pasm : $(INC_DIR)/io.h $(H2INC)
$(PERL) $(H2INC) $(INC_DIR)/io.h $@
$(RUN_INC_DIR)/socket.pasm : $(INC_DIR)/io.h $(H2INC)
$(PERL) $(H2INC) $(INC_DIR)/io.h $@
-
$(RUN_INC_DIR)/hash_key_type.pasm : $(INC_DIR)/hash.h $(H2INC)
$(PERL) $(H2INC) $(INC_DIR)/hash.h $@
-
$(RUN_INC_DIR)/iterator.pasm : $(INC_DIR)/enums.h $(H2INC)
$(PERL) $(H2INC) $(INC_DIR)/enums.h $@
$(RUN_INC_DIR)/call_bits.pasm : $(INC_DIR)/enums.h $(H2INC)
$(PERL) $(H2INC) $(INC_DIR)/enums.h $@
lib/Parrot/Pmc2c/PCCMETHOD_BITS.pm : $(INC_DIR)/enums.h $(H2INC)
$(PERL) $(H2INC) $(INC_DIR)/enums.h $@
-
$(RUN_INC_DIR)/libpaths.pasm : $(INC_DIR)/library.h $(H2INC)
$(PERL) $(H2INC) $(INC_DIR)/library.h $@
-
$(RUN_INC_DIR)/dlopenflags.pasm : $(INC_DIR)/platform_interface.h $(H2INC)
$(PERL) $(H2INC) $(INC_DIR)/platform_interface.h $@
-
$(RUN_INC_DIR)/datatypes.pasm : $(INC_DIR)/datatypes.h $(H2INC)
$(PERL) $(H2INC) $(INC_DIR)/datatypes.h $@
-
$(RUN_INC_DIR)/stat.pasm : $(INC_DIR)/platform_interface.h $(H2INC)
$(PERL) $(H2INC) $(INC_DIR)/platform_interface.h $@
-
$(RUN_INC_DIR)/stringinfo.pasm : $(INC_DIR)/string.h $(H2INC)
$(PERL) $(H2INC) $(INC_DIR)/string.h $@
-
$(RUN_INC_DIR)/longopt.pasm : $(INC_DIR)/longopt.h $(H2INC)
$(PERL) $(H2INC) $(INC_DIR)/longopt.h $@
-
$(RUN_INC_DIR)/cclass.pasm : $(INC_DIR)/cclass.h $(H2INC)
$(PERL) $(H2INC) $(INC_DIR)/cclass.h $@
-
$(RUN_INC_DIR)/packfile_segments.pasm : $(INC_DIR)/packfile.h $(H2INC)
$(PERL) $(H2INC) $(INC_DIR)/packfile.h $@
$(RUN_INC_DIR)/packfile_annotation_key_type.pasm : $(INC_DIR)/packfile.h $(H2INC)
$(PERL) $(H2INC) $(INC_DIR)/packfile.h $@
-
$(RUN_INC_DIR)/except_types.pasm : $(INC_DIR)/exceptions.h $(H2INC)
$(PERL) $(H2INC) $(INC_DIR)/exceptions.h $@
$(RUN_INC_DIR)/except_severity.pasm : $(INC_DIR)/exceptions.h $(H2INC)
$(PERL) $(H2INC) $(INC_DIR)/exceptions.h $@
-
$(RUN_INC_DIR)/warnings.pasm : $(INC_DIR)/warnings.h $(H2INC)
$(PERL) $(H2INC) $(INC_DIR)/warnings.h $@
$(RUN_INC_DIR)/errors.pasm : $(INC_DIR)/warnings.h $(H2INC)
$(PERL) $(H2INC) $(INC_DIR)/warnings.h $@
-
$(RUN_INC_DIR)/tm.pasm : src/utils.c $(H2INC)
$(PERL) $(H2INC) src/utils.c $@
-
###############################################################################
#
# Examples (Assembly):
@@ -1404,13 +1383,13 @@ $(RUN_INC_DIR)/tm.pasm : src/utils.c $(H2INC)
examples-clean:
$(RM_F) \
- examples/mops/mops$(O) \
- examples/mops/mops$(EXE) \
- examples/pasm/hello.pbc \
- examples/pasm/hello.c \
- examples/pasm/hello$(O) \
- examples/pasm/hello$(EXE) \
- generated_hello.pbc
+ examples/mops/mops$(O) \
+ examples/mops/mops$(EXE) \
+ examples/pasm/hello.pbc \
+ examples/pasm/hello.c \
+ examples/pasm/hello$(O) \
+ examples/pasm/hello$(EXE) \
+ generated_hello.pbc
# hello
hello: test_prep examples/pasm/hello$(EXE)
@@ -1431,7 +1410,6 @@ examples/pasm/hello$(EXE): examples/pasm/hello.pbc $(PBC_TO_EXE)
$(PBC_TO_EXE) examples/pasm/hello.pbc
-
###############################################################################
#
# Dependencies:
@@ -1469,7 +1447,8 @@ src/hash$(O) : $(PARROT_H_HEADERS) src/hash.c
src/library$(O) : $(PARROT_H_HEADERS) src/library.str src/library.c\
$(INC_DIR)/dynext.h
-$(INC_DIR)/extend_vtable.h src/extend_vtable.c src/vtable.h : src/vtable.tbl $(BUILD_TOOLS_DIR)/vtable_extend.pl lib/Parrot/Vtable.pm
+$(INC_DIR)/extend_vtable.h src/extend_vtable.c src/vtable.h : src/vtable.tbl \
+ $(BUILD_TOOLS_DIR)/vtable_extend.pl lib/Parrot/Vtable.pm
$(PERL) $(BUILD_TOOLS_DIR)/vtable_extend.pl
src/key$(O) : $(PARROT_H_HEADERS) src/key.str src/key.c \
@@ -1615,7 +1594,8 @@ src/extend$(O) : \
$(INC_PMC_DIR)/pmc_sub.h \
$(INC_DIR)/events.h \
src/extend.c
- $(CC) $(CFLAGS) @optimize::src/extend.c@ @ccwarn::src/extend.c@ @cc_shared@ -I$(@D) @cc_o_out@$@ -c src/extend.c
+ $(CC) $(CFLAGS) @optimize::src/extend.c@ @ccwarn::src/extend.c@ @cc_shared@ \
+ -I$(@D) @cc_o_out@$@ -c src/extend.c
src/runcore/main$(O) : \
src/runcore/main.c \
@@ -1645,7 +1625,6 @@ src/runcore/profiling$(O) : src/runcore/profiling.str src/runcore/profiling.c \
$(PARROT_H_HEADERS) \
$(EXTEND_HEADERS)
-
src/call/args$(O) : \
$(PARROT_H_HEADERS) $(INC_DIR)/oplib/ops.h \
src/call/args.c \
@@ -1682,9 +1661,9 @@ src/interp/api$(O) : $(PARROT_H_HEADERS) \
include/imcc/yyscanner.h \
$(INC_DIR)/runcore_api.h \
$(INC_PMC_DIR)/pmc_parrotinterpreter.h \
- $(INC_DIR)/oplib/core_ops.h \
+ $(INC_DIR)/oplib/core_ops.h \
src/gc/gc_private.h \
- src/gc/variable_size_pool.h
+ src/gc/variable_size_pool.h
src/call/ops$(O) : $(INC_DIR)/oplib/ops.h \
$(PARROT_H_HEADERS) $(INC_PMC_DIR)/pmc_continuation.h \
@@ -1700,7 +1679,7 @@ src/io/api$(O) : \
$(INC_PMC_DIR)/pmc_stringhandle.h \
$(INC_PMC_DIR)/pmc_socket.h \
$(INC_PMC_DIR)/pmc_sockaddr.h \
- $(INC_PMC_DIR)/pmc_bytebuffer.h \
+ $(INC_PMC_DIR)/pmc_bytebuffer.h \
$(EXTEND_HEADERS)
src/io/buffer$(O) : $(PARROT_H_HEADERS) src/io/io_private.h src/io/buffer.c \
@@ -1716,6 +1695,7 @@ $(FRPTWO_DIR)/main$(O) : \
$(INC_DIR)/feature.h \
$(INC_DIR)/has_header.h \
$(INC_DIR)/longopt.h \
+ $(INC_DIR)/pbcversion.h \
include/imcc/api.h \
$(FRPTWO_DIR)/main.c
@@ -1727,6 +1707,7 @@ $(FRP_DIR)/main$(O) : \
$(INC_DIR)/feature.h \
$(INC_DIR)/has_header.h \
$(INC_DIR)/longopt.h \
+ $(INC_DIR)/pbcversion.h \
include/imcc/api.h \
$(FRP_DIR)/main.c
@@ -1939,7 +1920,8 @@ src/nci/extra_thunks$(O) : \
$(INC_PMC_DIR)/pmc_nci.h \
src/nci/extra_thunks.str \
src/nci/extra_thunks.c
- $(CC) $(CFLAGS) @optimize::src/nci/extra_thunks.c@ @ccwarn::src/nci/extra_thunks.c@ @cc_shared@ -I$(@D) @cc_o_out@$@ -c src/nci/extra_thunks.c
+ $(CC) $(CFLAGS) @optimize::src/nci/extra_thunks.c@ @ccwarn::src/nci/extra_thunks.c@ \
+ @cc_shared@ -I$(@D) @cc_o_out@$@ -c src/nci/extra_thunks.c
src/nci/libffi$(O) : src/nci/libffi.c \
$(PARROT_H_HEADERS) \
@@ -1956,11 +1938,12 @@ src/vtables$(O) : $(PARROT_H_HEADERS) src/vtables.c
## SUFFIX OVERRIDE
src/gc/system$(O) : \
- $(PARROT_H_HEADERS) \
- src/gc/gc_private.h \
- src/gc/system.c\
- src/gc/variable_size_pool.h
- $(CC) $(CFLAGS) @optimize::src/gc/system.c@ @ccwarn::src/gc/system.c@ @cc_shared@ -I$(@D) @cc_o_out@$@ -c src/gc/system.c
+ $(PARROT_H_HEADERS) \
+ src/gc/gc_private.h \
+ src/gc/system.c\
+ src/gc/variable_size_pool.h
+ $(CC) $(CFLAGS) @optimize::src/gc/system.c@ @ccwarn::src/gc/system.c@ @cc_shared@ \
+ -I$(@D) @cc_o_out@$@ -c src/gc/system.c
src/gc/gc_private.h : $(INC_DIR)/settings.h
@@ -1977,10 +1960,13 @@ src/utils$(O) : \
$(EXTEND_HEADERS)
## SUFFIX OVERRIDE
-src/string/spf_render$(O) : $(PARROT_H_HEADERS) src/string/spf_render.str src/string/spf_render.c src/string/spf_private.h
- $(CC) $(CFLAGS) @optimize::src/string/spf_render.c@ @ccwarn::src/string/spf_render.c@ @cc_shared@ -I$(@D) @cc_o_out@$@ -c src/string/spf_render.c
+src/string/spf_render$(O) : $(PARROT_H_HEADERS) src/string/spf_render.str \
+ src/string/spf_render.c src/string/spf_private.h
+ $(CC) $(CFLAGS) @optimize::src/string/spf_render.c@ @ccwarn::src/string/spf_render.c@ \
+ @cc_shared@ -I$(@D) @cc_o_out@$@ -c src/string/spf_render.c
-src/string/spf_vtable$(O) : $(PARROT_H_HEADERS) src/string/spf_vtable.str src/string/spf_vtable.c src/string/spf_private.h
+src/string/spf_vtable$(O) : $(PARROT_H_HEADERS) src/string/spf_vtable.str \
+ src/string/spf_vtable.c src/string/spf_private.h
src/string/encoding$(O) : \
$(PARROT_H_HEADERS) \
View
7 frontend/pbc_dump/main.c
@@ -147,11 +147,10 @@ disas_dump(PARROT_INTERP, ARGIN(const PackFile_Segment *self))
INTVAL j;
const PackFile_ByteCode_OpMappingEntry * const entry = &map->libs[i];
Parrot_io_printf(interp, " map #%d => [\n", i);
- Parrot_io_printf(interp, " oplib: \"%s\" version %d.%d.%d (%d ops)\n",
+ Parrot_io_printf(interp, " oplib: \"%s\" version %d.%d (%d ops)\n",
entry->lib->name,
- entry->lib->major_version,
- entry->lib->minor_version,
- entry->lib->patch_version,
+ entry->lib->bc_major_version,
+ entry->lib->bc_minor_version,
entry->n_ops);
for (j = 0; j < map->libs[i].n_ops; j++) {
View
5 include/parrot/oplib.h
@@ -24,9 +24,8 @@ typedef struct op_lib_t {
const char *suffix;
int core_type;
int flags;
- int major_version;
- int minor_version;
- int patch_version;
+ int bc_major_version;
+ int bc_minor_version;
opcode_t op_count;
op_info_t *op_info_table;
op_func_t *op_func_table;
View
2 include/parrot/oplib/core_ops.h
@@ -19,7 +19,7 @@
#include "parrot/runcore_api.h"
PARROT_EXPORT
-op_lib_t *Parrot_DynOp_core_4_10_0(PARROT_INTERP, long init);
+op_lib_t *PARROT_CORE_OPLIB_INIT(PARROT_INTERP, long init);
opcode_t * Parrot_end(opcode_t *, PARROT_INTERP);
opcode_t * Parrot_noop(opcode_t *, PARROT_INTERP);
View
14 src/ops/core_ops.c
@@ -11,6 +11,7 @@
*/
#include "parrot/oplib/core_ops.h"
+#include "parrot/pbcversion.h"
#include "pmc/pmc_parrotlibrary.h"
#include "pmc/pmc_callcontext.h"
@@ -24568,9 +24569,8 @@ op_lib_t core_op_lib = {
"", /* suffix */
PARROT_FUNCTION_CORE, /* core_type = PARROT_XX_CORE */
0, /* flags */
- 4, /* major_version */
- 10, /* minor_version */
- 0, /* patch_version */
+ PARROT_PBC_MAJOR,
+ PARROT_PBC_MINOR,
1129, /* op_count */
core_op_info_table, /* op_info_table */
core_op_func_table, /* op_func_table */
@@ -24696,9 +24696,11 @@ static void hop_deinit(PARROT_INTERP)
hop = NULL;
hop_buckets = NULL;
-}PARROT_EXPORT
+}
+
+PARROT_EXPORT
op_lib_t *
-Parrot_DynOp_core_4_10_0(PARROT_INTERP, long init) {
+PARROT_CORE_OPLIB_INIT(PARROT_INTERP, long init) {
/* initialize and return op_lib ptr */
if (init == 1) {
@@ -24727,7 +24729,7 @@ Parrot_lib_core_ops_load(PARROT_INTERP)
{
PMC *const lib = Parrot_pmc_new(interp, enum_class_ParrotLibrary);
- ((Parrot_ParrotLibrary_attributes*)PMC_data(lib))->oplib_init = (void *) Parrot_DynOp_core_4_10_0;
+ ((Parrot_ParrotLibrary_attributes*)PMC_data(lib))->oplib_init = (void *) PARROT_CORE_OPLIB_INIT;
dynop_register(interp, lib);
return lib;
}
View
25 src/packfile/segments.c
@@ -1785,7 +1785,7 @@ byte_code_packed_size(SHIM_INTERP, ARGMOD(PackFile_Segment *self))
/* dynoplib data */
size += PF_size_cstring(entry->lib->name);
- size += 3; /* major + minor + patch */
+ size += 2; /* bc_major + bc_minor */
/* op entries */
size += 1; /* n_ops */
@@ -1832,9 +1832,8 @@ byte_code_pack(SHIM_INTERP, ARGMOD(PackFile_Segment *self), ARGOUT(opcode_t *cur
/* dynoplib data */
cursor = PF_store_cstring(cursor, entry->lib->name);
- *cursor++ = entry->lib->major_version;
- *cursor++ = entry->lib->minor_version;
- *cursor++ = entry->lib->patch_version;
+ *cursor++ = entry->lib->bc_major_version;
+ *cursor++ = entry->lib->bc_minor_version;
/* op entries */
*cursor++ = entry->n_ops;
@@ -1900,9 +1899,8 @@ byte_code_unpack(PARROT_INTERP, ARGMOD(PackFile_Segment *self), ARGIN(const opco
/* dynoplib data */
{
char * const lib_name = PF_fetch_cstring(interp, self->pf, &cursor);
- const opcode_t major = PF_fetch_opcode(self->pf, &cursor);
- const opcode_t minor = PF_fetch_opcode(self->pf, &cursor);
- const opcode_t patch = PF_fetch_opcode(self->pf, &cursor);
+ const opcode_t bc_major = PF_fetch_opcode(self->pf, &cursor);
+ const opcode_t bc_minor = PF_fetch_opcode(self->pf, &cursor);
/* XXX
* broken encapsulation => should make this data easier to access somehow
@@ -1928,15 +1926,14 @@ byte_code_unpack(PARROT_INTERP, ARGMOD(PackFile_Segment *self), ARGIN(const opco
mem_gc_free(interp, lib_name);
- if (entry->lib->major_version != major
- || entry->lib->minor_version != minor
- || entry->lib->patch_version != patch)
+ if (entry->lib->bc_major_version != bc_major
+ || entry->lib->bc_minor_version != bc_minor)
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR,
- "Incompatible versions of `%s' oplib, possibly due to "
+ "Incompatible versions of `%s' bytecode, possibly due to "
"loading bytecode generated by an old version of Parrot. "
- "Found %d.%d.%d but loaded %d.%d.%d",
- entry->lib->name, major, minor, patch, entry->lib->major_version,
- entry->lib->minor_version, entry->lib->patch_version);
+ "Found %d.%d but loaded %d.%d",
+ entry->lib->name, bc_major, bc_minor,
+ entry->lib->bc_major_version, entry->lib->bc_minor_version);
}
/* op entries */
View
14 src/pmc/oplib.pmc
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2010-2011, Parrot Foundation.
+Copyright (C) 2010-2012, Parrot Foundation.
=head1 NAME
@@ -236,8 +236,8 @@ share the given short name.
=item C<PMC *version()>
-Returns an array containing the three version numbers (major, minor, patch) of
-the library.
+Returns an array containing the two bytecode version numbers (bc_major, bc_minor)
+of the library.
=cut
@@ -246,14 +246,12 @@ the library.
METHOD version() {
const op_lib_t *oplib;
PMC * const version_array = Parrot_pmc_new_init_int(INTERP,
- enum_class_FixedIntegerArray, 3);
+ enum_class_FixedIntegerArray, 2);
GET_ATTR_oplib(INTERP, SELF, oplib);
VTABLE_set_integer_keyed_int(INTERP, version_array,
- 0, oplib->major_version);
+ 0, oplib->bc_major_version);
VTABLE_set_integer_keyed_int(INTERP, version_array,
- 1, oplib->minor_version);
- VTABLE_set_integer_keyed_int(INTERP, version_array,
- 2, oplib->patch_version);
+ 1, oplib->bc_minor_version);
RETURN(PMC *version_array);
}
}
View
2 src/pmc/packfile.pmc
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2011, Parrot Foundation.
+Copyright (C) 2001-2012, Parrot Foundation.
=head1 NAME
View
4 t/compilers/opsc/06-opsfile.t
@@ -1,5 +1,5 @@
#!./parrot-nqp
-# Copyright (C) 2010, Parrot Foundation.
+# Copyright (C) 2010-2012, Parrot Foundation.
pir::load_bytecode("opsc.pbc");
pir::load_bytecode("nqp-setting.pbc");
@@ -32,7 +32,7 @@ $op := @ops[(+@ops)-1];
ok($op<code> > 84 + 116, "Last op has non zero code");
my $version := join(' ', |$f.version);
-ok( $version ~~ /^\d+ \s \d+ \s \d+$/, "Version parsed");
+ok( $version ~~ /^\d+ \s \d+$/, "Version parsed");
diag($version);
ok( $f.preamble ~~ /pmc_parrotlibrary.h/, "Preamble preserved");
View
2 t/compilers/opsc/08-emitter.t
@@ -46,7 +46,7 @@ my $header := $fh.readall();
ok($header ~~ /define \s PARROT_OPLIB_CORE_OPS_H_GUARD/, 'Guard generated');
ok($header ~~ /endif/, 'Close guard generated');
ok($header ~~ /DO \s NOT \s EDIT \s THIS \s FILE/, 'Preamble generated');
-ok($header ~~ /Parrot_DynOp_core_ \d+ _ \d+ _ \d+/, '... and contains init_func');
+ok($header ~~ /Parrot_DynOp_core_ /, '... and contains init_func');
ok($header ~~ /Parrot_err_s_ic/, 'We have proper names of ops functions');
# Testing C emitting.
View
8 t/native_pbc/testdata/annotations.pir
@@ -1,3 +1,5 @@
+# Copyright (C) 2012, Parrot Foundation.
+
.sub 'main'
.annotate "file", "annotations.pir"
.annotate "creator", "Parrot Foundation"
@@ -7,3 +9,9 @@
.annotate "line", 2
.return ()
.end
+
+# Local Variables:
+# mode: pir
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir:

0 comments on commit b97b7bd

Please sign in to comment.