[svn:parrot] r43643 - in branches/pmc_freeze_with_pmcs: . compilers/data_json compilers/imcc compilers/json compilers/nqp compilers/nqp/bootstrap compilers/nqp/t compilers/pct compilers/pct/src compilers/pge compilers/pirc compilers/pirc/t compilers/tge config/auto config/auto/sizes config/gen config/gen/makefiles config/init/hints docs docs/book/draft docs/book/pct docs/dev docs/pdds docs/pdds/draft examples/config/file examples/embed examples/languages/abc examples/languages/squaak examples/pge ext/nqp-rx include/parrot lib/Parrot lib/Parrot/Configure lib/Parrot/Configure/Options/Test lib/Parrot/Configure/Step lib/Parrot/Docs/Section lib/Parrot/Harness ports/cpan ports/cygwin ports/debian ports/fedora ports/mandriva ports/suse runtime/parrot/languages runtime/parrot/library runtime/parrot/library/Getopt runtime/parrot/library/Math runtime/parrot/library/Math/Random src src/call src/gc src/interp src/pmc src/runcore t t/compilers/imcc/syn t/compilers/tge t/configure /testlib t/library t/native_pbc t/oo t/op t/pharness t/pmc t/src t/steps/gen t/steps/init/hints t/tools t/tools/ops2pm t/tools/pmc2cutils tools/build tools/dev tools/util
darbelo at svn.parrot.org
darbelo at svn.parrot.org
Fri Jan 29 21:05:28 UTC 2010
Author: darbelo
Date: Fri Jan 29 21:05:08 2010
New Revision: 43643
URL: https://trac.parrot.org/parrot/changeset/43643
Log:
Sync branch with trunk.
Added:
branches/pmc_freeze_with_pmcs/compilers/data_json/Defines.mak
- copied unchanged from r43642, trunk/compilers/data_json/Defines.mak
branches/pmc_freeze_with_pmcs/compilers/data_json/Rules.mak
- copied unchanged from r43642, trunk/compilers/data_json/Rules.mak
branches/pmc_freeze_with_pmcs/compilers/imcc/Defines.mak
- copied unchanged from r43642, trunk/compilers/imcc/Defines.mak
branches/pmc_freeze_with_pmcs/compilers/imcc/Rules.mak
- copied unchanged from r43642, trunk/compilers/imcc/Rules.mak
branches/pmc_freeze_with_pmcs/compilers/json/Defines.mak
- copied unchanged from r43642, trunk/compilers/json/Defines.mak
branches/pmc_freeze_with_pmcs/compilers/json/Rules.mak
- copied unchanged from r43642, trunk/compilers/json/Rules.mak
branches/pmc_freeze_with_pmcs/compilers/nqp/Defines.mak
- copied unchanged from r43642, trunk/compilers/nqp/Defines.mak
branches/pmc_freeze_with_pmcs/compilers/nqp/Rules.mak
- copied unchanged from r43642, trunk/compilers/nqp/Rules.mak
branches/pmc_freeze_with_pmcs/compilers/pct/Defines.mak
- copied unchanged from r43642, trunk/compilers/pct/Defines.mak
branches/pmc_freeze_with_pmcs/compilers/pct/Rules.mak
- copied unchanged from r43642, trunk/compilers/pct/Rules.mak
branches/pmc_freeze_with_pmcs/compilers/pge/Defines.mak
- copied unchanged from r43642, trunk/compilers/pge/Defines.mak
branches/pmc_freeze_with_pmcs/compilers/pge/Rules.mak
- copied unchanged from r43642, trunk/compilers/pge/Rules.mak
branches/pmc_freeze_with_pmcs/compilers/pirc/Defines.mak
- copied unchanged from r43642, trunk/compilers/pirc/Defines.mak
branches/pmc_freeze_with_pmcs/compilers/pirc/Rules.mak
- copied unchanged from r43642, trunk/compilers/pirc/Rules.mak
branches/pmc_freeze_with_pmcs/compilers/tge/Defines.mak
- copied unchanged from r43642, trunk/compilers/tge/Defines.mak
branches/pmc_freeze_with_pmcs/compilers/tge/Rules.mak
- copied unchanged from r43642, trunk/compilers/tge/Rules.mak
branches/pmc_freeze_with_pmcs/ext/nqp-rx/Defines.mak
- copied unchanged from r43642, trunk/ext/nqp-rx/Defines.mak
branches/pmc_freeze_with_pmcs/ext/nqp-rx/Rules.mak
- copied unchanged from r43642, trunk/ext/nqp-rx/Rules.mak
branches/pmc_freeze_with_pmcs/lib/Parrot/H2inc.pm
- copied unchanged from r43642, trunk/lib/Parrot/H2inc.pm
branches/pmc_freeze_with_pmcs/runtime/parrot/library/Rules.mak
- copied unchanged from r43642, trunk/runtime/parrot/library/Rules.mak
branches/pmc_freeze_with_pmcs/t/op/trans_old.t
- copied unchanged from r43642, trunk/t/op/trans_old.t
branches/pmc_freeze_with_pmcs/tools/build/dynpmc.pl
- copied unchanged from r43642, trunk/tools/build/dynpmc.pl
branches/pmc_freeze_with_pmcs/tools/build/h2inc.pl
- copied unchanged from r43642, trunk/tools/build/h2inc.pl
Deleted:
branches/pmc_freeze_with_pmcs/config/gen/makefiles/data_json.in
branches/pmc_freeze_with_pmcs/config/gen/makefiles/dynoplibs_pl.in
branches/pmc_freeze_with_pmcs/config/gen/makefiles/dynpmc_pl.in
branches/pmc_freeze_with_pmcs/config/gen/makefiles/json.in
branches/pmc_freeze_with_pmcs/config/gen/makefiles/nqp-rx.in
branches/pmc_freeze_with_pmcs/config/gen/makefiles/nqp.in
branches/pmc_freeze_with_pmcs/config/gen/makefiles/pct.in
branches/pmc_freeze_with_pmcs/config/gen/makefiles/pge.in
branches/pmc_freeze_with_pmcs/config/gen/makefiles/pirc.in
branches/pmc_freeze_with_pmcs/config/gen/makefiles/tge.in
branches/pmc_freeze_with_pmcs/config/gen/parrot_include.pm
branches/pmc_freeze_with_pmcs/t/steps/gen/parrot_include-01.t
branches/pmc_freeze_with_pmcs/t/tools/pmc2cutils/00-qualify.t
Modified:
branches/pmc_freeze_with_pmcs/ (props changed)
branches/pmc_freeze_with_pmcs/Configure.pl
branches/pmc_freeze_with_pmcs/DEPRECATED.pod
branches/pmc_freeze_with_pmcs/MANIFEST
branches/pmc_freeze_with_pmcs/MANIFEST.SKIP
branches/pmc_freeze_with_pmcs/README
branches/pmc_freeze_with_pmcs/compilers/data_json/ (props changed)
branches/pmc_freeze_with_pmcs/compilers/imcc/ (props changed)
branches/pmc_freeze_with_pmcs/compilers/imcc/imcc.l
branches/pmc_freeze_with_pmcs/compilers/imcc/imclexer.c
branches/pmc_freeze_with_pmcs/compilers/json/ (props changed)
branches/pmc_freeze_with_pmcs/compilers/nqp/ (props changed)
branches/pmc_freeze_with_pmcs/compilers/nqp/bootstrap/nqp.pir
branches/pmc_freeze_with_pmcs/compilers/nqp/nqp.pir
branches/pmc_freeze_with_pmcs/compilers/nqp/t/01-literals.t
branches/pmc_freeze_with_pmcs/compilers/nqp/t/02-if-else.t
branches/pmc_freeze_with_pmcs/compilers/nqp/t/02-if.t
branches/pmc_freeze_with_pmcs/compilers/nqp/t/03-unless.t
branches/pmc_freeze_with_pmcs/compilers/nqp/t/04-comments.t
branches/pmc_freeze_with_pmcs/compilers/nqp/t/05-pod.t
branches/pmc_freeze_with_pmcs/compilers/nqp/t/06-args-pos.t
branches/pmc_freeze_with_pmcs/compilers/nqp/t/07-boolean.t
branches/pmc_freeze_with_pmcs/compilers/nqp/t/08-blocks.t
branches/pmc_freeze_with_pmcs/compilers/nqp/t/09-var.t
branches/pmc_freeze_with_pmcs/compilers/nqp/t/10-sub.t
branches/pmc_freeze_with_pmcs/compilers/nqp/t/11-cmp.t
branches/pmc_freeze_with_pmcs/compilers/nqp/t/12-list.t
branches/pmc_freeze_with_pmcs/compilers/nqp/t/13-logical.t
branches/pmc_freeze_with_pmcs/compilers/nqp/t/14-op.t
branches/pmc_freeze_with_pmcs/compilers/nqp/t/15-module.t
branches/pmc_freeze_with_pmcs/compilers/nqp/t/16-while.t
branches/pmc_freeze_with_pmcs/compilers/nqp/t/17-class.t
branches/pmc_freeze_with_pmcs/compilers/nqp/t/18-inline.t
branches/pmc_freeze_with_pmcs/compilers/nqp/t/19-hash_access.t
branches/pmc_freeze_with_pmcs/compilers/nqp/t/20-list_access.t
branches/pmc_freeze_with_pmcs/compilers/nqp/t/22-optional_args.t
branches/pmc_freeze_with_pmcs/compilers/nqp/t/23-named_args.t
branches/pmc_freeze_with_pmcs/compilers/nqp/t/24-scalar_context.t
branches/pmc_freeze_with_pmcs/compilers/nqp/t/25-list_context.t
branches/pmc_freeze_with_pmcs/compilers/nqp/t/26-method_ops.t
branches/pmc_freeze_with_pmcs/compilers/nqp/t/27-ternary.t
branches/pmc_freeze_with_pmcs/compilers/nqp/t/28-return.t
branches/pmc_freeze_with_pmcs/compilers/nqp/t/29-self.t
branches/pmc_freeze_with_pmcs/compilers/nqp/t/30-subclass.t
branches/pmc_freeze_with_pmcs/compilers/nqp/t/harness
branches/pmc_freeze_with_pmcs/compilers/pct/ (props changed)
branches/pmc_freeze_with_pmcs/compilers/pct/src/PAST.pir
branches/pmc_freeze_with_pmcs/compilers/pge/ (props changed)
branches/pmc_freeze_with_pmcs/compilers/pirc/ (props changed)
branches/pmc_freeze_with_pmcs/compilers/pirc/t/basic.t
branches/pmc_freeze_with_pmcs/compilers/pirc/t/harness
branches/pmc_freeze_with_pmcs/compilers/pirc/t/heredoc.t
branches/pmc_freeze_with_pmcs/compilers/pirc/t/macro.t
branches/pmc_freeze_with_pmcs/compilers/pirc/t/stmts.t
branches/pmc_freeze_with_pmcs/compilers/pirc/t/subflags.t
branches/pmc_freeze_with_pmcs/compilers/tge/ (props changed)
branches/pmc_freeze_with_pmcs/compilers/tge/TGE.pir
branches/pmc_freeze_with_pmcs/config/auto/cgoto.pm
branches/pmc_freeze_with_pmcs/config/auto/gc.pm
branches/pmc_freeze_with_pmcs/config/auto/pmc.pm
branches/pmc_freeze_with_pmcs/config/auto/sizes/intval_maxmin_c.in (props changed)
branches/pmc_freeze_with_pmcs/config/gen/makefiles.pm
branches/pmc_freeze_with_pmcs/config/gen/makefiles/docs.in
branches/pmc_freeze_with_pmcs/config/gen/makefiles/dynoplibs.in
branches/pmc_freeze_with_pmcs/config/gen/makefiles/dynpmc.in
branches/pmc_freeze_with_pmcs/config/gen/makefiles/editor.in
branches/pmc_freeze_with_pmcs/config/gen/makefiles/ext.in
branches/pmc_freeze_with_pmcs/config/gen/makefiles/root.in
branches/pmc_freeze_with_pmcs/config/init/hints/openbsd.pm
branches/pmc_freeze_with_pmcs/docs/book/draft/README (props changed)
branches/pmc_freeze_with_pmcs/docs/book/draft/appa_glossary.pod (props changed)
branches/pmc_freeze_with_pmcs/docs/book/draft/appb_patch_submission.pod (props changed)
branches/pmc_freeze_with_pmcs/docs/book/draft/appc_command_line_options.pod (props changed)
branches/pmc_freeze_with_pmcs/docs/book/draft/appd_build_options.pod (props changed)
branches/pmc_freeze_with_pmcs/docs/book/draft/appe_source_code.pod (props changed)
branches/pmc_freeze_with_pmcs/docs/book/draft/ch01_introduction.pod (props changed)
branches/pmc_freeze_with_pmcs/docs/book/draft/ch02_getting_started.pod (props changed)
branches/pmc_freeze_with_pmcs/docs/book/draft/ch07_dynpmcs.pod (props changed)
branches/pmc_freeze_with_pmcs/docs/book/draft/ch08_dynops.pod (props changed)
branches/pmc_freeze_with_pmcs/docs/book/draft/ch10_opcode_reference.pod (props changed)
branches/pmc_freeze_with_pmcs/docs/book/draft/ch11_directive_reference.pod (props changed)
branches/pmc_freeze_with_pmcs/docs/book/draft/ch12_operator_reference.pod (props changed)
branches/pmc_freeze_with_pmcs/docs/book/draft/chXX_hlls.pod (props changed)
branches/pmc_freeze_with_pmcs/docs/book/draft/chXX_library.pod (props changed)
branches/pmc_freeze_with_pmcs/docs/book/draft/chXX_testing_and_debugging.pod (props changed)
branches/pmc_freeze_with_pmcs/docs/book/pct/ch01_introduction.pod (props changed)
branches/pmc_freeze_with_pmcs/docs/book/pct/ch02_getting_started.pod (props changed)
branches/pmc_freeze_with_pmcs/docs/book/pct/ch03_compiler_tools.pod (props changed)
branches/pmc_freeze_with_pmcs/docs/book/pct/ch04_pge.pod (props changed)
branches/pmc_freeze_with_pmcs/docs/book/pct/ch05_nqp.pod (props changed)
branches/pmc_freeze_with_pmcs/docs/dev/c_functions.pod (props changed)
branches/pmc_freeze_with_pmcs/docs/embed.pod
branches/pmc_freeze_with_pmcs/docs/extend.pod
branches/pmc_freeze_with_pmcs/docs/intro.pod
branches/pmc_freeze_with_pmcs/docs/pdds/draft/pdd11_extending.pod
branches/pmc_freeze_with_pmcs/docs/pdds/draft/pdd16_native_call.pod
branches/pmc_freeze_with_pmcs/docs/pdds/pdd30_install.pod (props changed)
branches/pmc_freeze_with_pmcs/docs/submissions.pod
branches/pmc_freeze_with_pmcs/examples/config/file/configcompiler
branches/pmc_freeze_with_pmcs/examples/config/file/configwithfatalstep
branches/pmc_freeze_with_pmcs/examples/embed/cotorra.c (props changed)
branches/pmc_freeze_with_pmcs/examples/languages/abc/ (props changed)
branches/pmc_freeze_with_pmcs/examples/languages/squaak/ (props changed)
branches/pmc_freeze_with_pmcs/examples/pge/demo.pir (props changed)
branches/pmc_freeze_with_pmcs/ext/nqp-rx/ (props changed)
branches/pmc_freeze_with_pmcs/include/parrot/call.h (props changed)
branches/pmc_freeze_with_pmcs/include/parrot/extend.h
branches/pmc_freeze_with_pmcs/include/parrot/gc_api.h (props changed)
branches/pmc_freeze_with_pmcs/include/parrot/hash.h
branches/pmc_freeze_with_pmcs/include/parrot/runcore_api.h (props changed)
branches/pmc_freeze_with_pmcs/include/parrot/runcore_profiling.h (props changed)
branches/pmc_freeze_with_pmcs/include/parrot/runcore_trace.h (props changed)
branches/pmc_freeze_with_pmcs/lib/Parrot/Configure/Compiler.pm
branches/pmc_freeze_with_pmcs/lib/Parrot/Configure/Options/Test/Prepare.pm
branches/pmc_freeze_with_pmcs/lib/Parrot/Configure/Step/List.pm
branches/pmc_freeze_with_pmcs/lib/Parrot/Configure/Step/Test.pm (props changed)
branches/pmc_freeze_with_pmcs/lib/Parrot/Docs/Section/Tools.pm
branches/pmc_freeze_with_pmcs/lib/Parrot/Harness/Options.pm
branches/pmc_freeze_with_pmcs/ports/cpan/pause_guide.pod (props changed)
branches/pmc_freeze_with_pmcs/ports/cygwin/parrot-1.0.0-1.cygport (props changed)
branches/pmc_freeze_with_pmcs/ports/debian/libparrot-dev.install.in (props changed)
branches/pmc_freeze_with_pmcs/ports/debian/libparrot.install.in (props changed)
branches/pmc_freeze_with_pmcs/ports/debian/parrot-doc.install.in (props changed)
branches/pmc_freeze_with_pmcs/ports/debian/parrot.install.in (props changed)
branches/pmc_freeze_with_pmcs/ports/fedora/parrot.spec.fedora (props changed)
branches/pmc_freeze_with_pmcs/ports/mandriva/parrot.spec.mandriva (props changed)
branches/pmc_freeze_with_pmcs/ports/suse/parrot.spec.suse (props changed)
branches/pmc_freeze_with_pmcs/runtime/parrot/languages/ (props changed)
branches/pmc_freeze_with_pmcs/runtime/parrot/library/Getopt/Obj.pir
branches/pmc_freeze_with_pmcs/runtime/parrot/library/Math/Rand.pir (props changed)
branches/pmc_freeze_with_pmcs/runtime/parrot/library/Math/Random/mt19937ar.pir (props changed)
branches/pmc_freeze_with_pmcs/runtime/parrot/library/distutils.pir
branches/pmc_freeze_with_pmcs/src/call/ops.c (props changed)
branches/pmc_freeze_with_pmcs/src/call/pcc.c (props changed)
branches/pmc_freeze_with_pmcs/src/embed.c
branches/pmc_freeze_with_pmcs/src/extend.c
branches/pmc_freeze_with_pmcs/src/gc/alloc_memory.c (props changed)
branches/pmc_freeze_with_pmcs/src/gc/alloc_resources.c (props changed)
branches/pmc_freeze_with_pmcs/src/gc/api.c (props changed)
branches/pmc_freeze_with_pmcs/src/gc/malloc.c (props changed)
branches/pmc_freeze_with_pmcs/src/gc/malloc_trace.c (props changed)
branches/pmc_freeze_with_pmcs/src/gc/mark_sweep.c (props changed)
branches/pmc_freeze_with_pmcs/src/gc/system.c (props changed)
branches/pmc_freeze_with_pmcs/src/interp/inter_cb.c (props changed)
branches/pmc_freeze_with_pmcs/src/interp/inter_create.c (props changed)
branches/pmc_freeze_with_pmcs/src/interp/inter_misc.c (props changed)
branches/pmc_freeze_with_pmcs/src/packfile.c
branches/pmc_freeze_with_pmcs/src/pmc/continuation.pmc
branches/pmc_freeze_with_pmcs/src/pmc/coroutine.pmc
branches/pmc_freeze_with_pmcs/src/pmc/fixedpmcarray.pmc
branches/pmc_freeze_with_pmcs/src/pmc/orderedhash.pmc
branches/pmc_freeze_with_pmcs/src/pmc/orderedhashiterator.pmc
branches/pmc_freeze_with_pmcs/src/pmc/unmanagedstruct.pmc
branches/pmc_freeze_with_pmcs/src/pmc_freeze.c
branches/pmc_freeze_with_pmcs/src/runcore/cores.c (props changed)
branches/pmc_freeze_with_pmcs/src/runcore/main.c (props changed)
branches/pmc_freeze_with_pmcs/src/runcore/profiling.c (props changed)
branches/pmc_freeze_with_pmcs/src/runcore/trace.c (props changed)
branches/pmc_freeze_with_pmcs/t/compilers/imcc/syn/macro.t
branches/pmc_freeze_with_pmcs/t/compilers/tge/NoneGrammar.tg (props changed)
branches/pmc_freeze_with_pmcs/t/configure/testlib/adefectivefoobar
branches/pmc_freeze_with_pmcs/t/configure/testlib/bdefectivefoobar
branches/pmc_freeze_with_pmcs/t/configure/testlib/cdefectivefoobar
branches/pmc_freeze_with_pmcs/t/configure/testlib/ddefectivefoobar
branches/pmc_freeze_with_pmcs/t/configure/testlib/verbosefoobar
branches/pmc_freeze_with_pmcs/t/harness
branches/pmc_freeze_with_pmcs/t/library/mt19937ar.t (props changed)
branches/pmc_freeze_with_pmcs/t/library/mt19937ar.txt (props changed)
branches/pmc_freeze_with_pmcs/t/native_pbc/annotations.pbc
branches/pmc_freeze_with_pmcs/t/native_pbc/integer_1.pbc
branches/pmc_freeze_with_pmcs/t/native_pbc/number_1.pbc
branches/pmc_freeze_with_pmcs/t/native_pbc/string_1.pbc
branches/pmc_freeze_with_pmcs/t/oo/root_new.t (props changed)
branches/pmc_freeze_with_pmcs/t/op/trans.t
branches/pmc_freeze_with_pmcs/t/pharness/03-handle_long_options.t
branches/pmc_freeze_with_pmcs/t/pmc/namespace-old.t (props changed)
branches/pmc_freeze_with_pmcs/t/pmc/nci.t
branches/pmc_freeze_with_pmcs/t/pmc/orderedhash.t
branches/pmc_freeze_with_pmcs/t/src/embed.t (props changed)
branches/pmc_freeze_with_pmcs/t/steps/init/hints/linux-01.t (props changed)
branches/pmc_freeze_with_pmcs/t/tools/ops2pm/00-qualify.t
branches/pmc_freeze_with_pmcs/t/tools/pbc_merge.t
branches/pmc_freeze_with_pmcs/t/tools/pmc2cutils/04-dump_pmc.t
branches/pmc_freeze_with_pmcs/t/tools/pmc2cutils/README
branches/pmc_freeze_with_pmcs/tools/build/ (props changed)
branches/pmc_freeze_with_pmcs/tools/build/nativecall.pl
branches/pmc_freeze_with_pmcs/tools/dev/cc_flags.pl
branches/pmc_freeze_with_pmcs/tools/dev/checkdepend.pl
branches/pmc_freeze_with_pmcs/tools/dev/fetch_languages.pl (contents, props changed)
branches/pmc_freeze_with_pmcs/tools/dev/mk_gitignore.pl (props changed)
branches/pmc_freeze_with_pmcs/tools/util/perlcritic-cage.conf (props changed)
Modified: branches/pmc_freeze_with_pmcs/Configure.pl
==============================================================================
--- branches/pmc_freeze_with_pmcs/Configure.pl Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/Configure.pl Fri Jan 29 21:05:08 2010 (r43643)
@@ -183,11 +183,7 @@
=item C<--test=build>
-Run tests found in F<t/postconfigure/>, F<t/tools/pmc2cutils/>,
-F<t/tools/ops2cutils/> and F<t/tools/ops2pm/> I<after> configuration has
-completed. These tests demonstrate (a) that certain of Parrot's configuration
-tools are working properly post-configuration; and (b) that certain of
-Parrot's build tools will work properly once you call F<make>.
+Run tests found in F<t/steps/>, F<t/postconfigure/> and F<t/pharness>.
=item C<--test>
@@ -645,7 +641,6 @@
gen::config_h
gen::core_pmcs
gen::crypto
- gen::parrot_include
gen::opengl
gen::call_list
gen::makefiles
Modified: branches/pmc_freeze_with_pmcs/DEPRECATED.pod
==============================================================================
--- branches/pmc_freeze_with_pmcs/DEPRECATED.pod Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/DEPRECATED.pod Fri Jan 29 21:05:08 2010 (r43643)
@@ -23,7 +23,7 @@
you should no longer rely on it.
Whenever deprecated items are removed, information
-regarding how to cope with the removal will be added to
+regarding how to cope with the removal should be added to
L<https://trac.parrot.org/parrot/wiki/Deprecation>.
When running parrot, you can receive warnings about deprecated opcodes.
@@ -108,13 +108,6 @@
L<https://trac.parrot.org/parrot/ticket/1303>
-=item OrderedHash PMC [eligible in 2.1]
-
-This PMC is old, haskish and will be reimplemented with some backward incompatible
-changes in semantic of handling removed elements.
-
-L<https://trac.parrot.org/parrot/ticket/1403>
-
=item CPointer PMC [eligible in 2.1]
And all uses in the Parrot calling conventions.
@@ -162,14 +155,6 @@
L<https://trac.parrot.org/parrot/ticket/1406>
-=item dlfunc signatures [eligible in 2.1]
-
-C<xv>-style signatures will no longer work. See PDD16 for details.
-
-F<pdds/draft/pdd16_native_call.pod>
-
-L<https://trac.parrot.org/parrot/ticket/1410>
-
=back
=head1 Bytecode
@@ -190,10 +175,6 @@
=back
-=head1 Class Features
-
-[Nothing at this time.]
-
=head1 Debugger
Assigning to registers [experimental]
@@ -399,7 +380,7 @@
=over 4
-=item tools/build/dynoplibs.pl and tools/build/dynpmc.pl [eligible in 1.1]
+=item tools/build/dynpmc.pl [eligible in 1.1]
Replaced with makefiles.
@@ -432,12 +413,10 @@
=item Library name changes [eligible in 2.1]
The use of C<::> a namespace separator is deprecated. Core libraries will
-change to use multi-level keys instead. For example, C<Getopt::Obj> will
-change to C<Getopt; Obj>. Affected libraries include C<Data::Dumper>,
-C<Getopt::Obj>, C<Parrot::Coroutine>, C<SDL>, C<Test::Builder>,
-C<YAML::Dumper>, and C<PCRE::NCI>.
-
-As well, anything under F<examples/> is subject to this change.
+change to use multi-level keys instead. For example, C<Data::Dumper> will
+change to C<Data; Dumper>. Affected libraries also include:
+C<Parrot::Coroutine>, C<SDL>, C<Test::Builder>, C<YAML::Dumper>, and
+C<PCRE::NCI>.
=back
Modified: branches/pmc_freeze_with_pmcs/MANIFEST
==============================================================================
--- branches/pmc_freeze_with_pmcs/MANIFEST Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/MANIFEST Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,7 +1,7 @@
# ex: set ro:
# $Id$
#
-# generated by tools/dev/mk_manifest_and_skip.pl Wed Jan 20 03:18:02 2010 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Tue Jan 26 00:27:14 2010 UT
#
# See below for documentation on the format of this file.
#
@@ -28,9 +28,13 @@
RESPONSIBLE_PARTIES [main]doc
TODO [devel]doc
VERSION [devel]
+compilers/data_json/Defines.mak [data_json]
+compilers/data_json/Rules.mak [data_json]
compilers/data_json/data_json.pir [data_json]
compilers/data_json/data_json/grammar.pg [data_json]
compilers/data_json/data_json/pge2pir.tg [data_json]
+compilers/imcc/Defines.mak [imcc]
+compilers/imcc/Rules.mak [imcc]
compilers/imcc/cfg.c [imcc]
compilers/imcc/cfg.h [imcc]
compilers/imcc/debug.c [imcc]
@@ -58,9 +62,11 @@
compilers/imcc/symreg.c [imcc]
compilers/imcc/symreg.h [imcc]
compilers/imcc/unit.h [imcc]
+compilers/json/Defines.mak [json]
compilers/json/JSON.pir [json]
compilers/json/JSON/grammar.pg [json]
compilers/json/JSON/pge2pir.tg [json]
+compilers/json/Rules.mak [json]
compilers/ncigen/MAINTAINER [ncigen]
compilers/ncigen/NCIGEN.TODO [ncigen]
compilers/ncigen/NCIGENP6.pm [ncigen]
@@ -80,7 +86,9 @@
compilers/ncigen/t/parse_00.t [test]
compilers/ncigen/t/parse_01.t [test]
compilers/ncigen/t/parse_02.t [test]
+compilers/nqp/Defines.mak [nqp]
compilers/nqp/README.pod []doc
+compilers/nqp/Rules.mak [nqp]
compilers/nqp/TODO.pod [nqp]
compilers/nqp/bootstrap/actions.pm [nqp]
compilers/nqp/bootstrap/nqp.pir [nqp]
@@ -120,8 +128,10 @@
compilers/nqp/t/29-self.t [test]
compilers/nqp/t/30-subclass.t [test]
compilers/nqp/t/harness [test]
+compilers/pct/Defines.mak [pct]
compilers/pct/PCT.pir [pct]
compilers/pct/README.pod []doc
+compilers/pct/Rules.mak [pct]
compilers/pct/src/PAST.pir [pct]
compilers/pct/src/PAST/Compiler.pir [pct]
compilers/pct/src/PAST/Node.pir [pct]
@@ -131,6 +141,7 @@
compilers/pct/src/PCT/Node.pir [pct]
compilers/pct/src/POST/Compiler.pir [pct]
compilers/pct/src/POST/Node.pir [pct]
+compilers/pge/Defines.mak [pge]
compilers/pge/P6Rule.grammar [pge]
compilers/pge/PGE.pir [pge]
compilers/pge/PGE/Exp.pir [pge]
@@ -141,8 +152,11 @@
compilers/pge/PGE/Regex.pir [pge]
compilers/pge/PGE/builtins.pg [pge]
compilers/pge/README.pod []doc
+compilers/pge/Rules.mak [pge]
compilers/pge/STATUS [pge]
+compilers/pirc/Defines.mak [pirc]
compilers/pirc/README.pod []doc
+compilers/pirc/Rules.mak [pirc]
compilers/pirc/TODO [pirc]
compilers/pirc/heredoc/heredocmain.c [pirc]
compilers/pirc/macro/lexer.h [pirc]
@@ -193,7 +207,9 @@
compilers/pirc/t/macro.t [test]
compilers/pirc/t/stmts.t [test]
compilers/pirc/t/subflags.t [test]
+compilers/tge/Defines.mak [tge]
compilers/tge/README []doc
+compilers/tge/Rules.mak [tge]
compilers/tge/TGE.pir [tge]
compilers/tge/TGE/Compiler.pir [tge]
compilers/tge/TGE/Grammar.pir [tge]
@@ -305,26 +321,15 @@
config/gen/crypto/digest_t.in []
config/gen/makefiles.pm []
config/gen/makefiles/CFLAGS.in []
-config/gen/makefiles/data_json.in []
config/gen/makefiles/docs.in []
config/gen/makefiles/dynoplibs.in []
-config/gen/makefiles/dynoplibs_pl.in []
config/gen/makefiles/dynpmc.in []
-config/gen/makefiles/dynpmc_pl.in []
config/gen/makefiles/editor.in []
config/gen/makefiles/ext.in []
-config/gen/makefiles/json.in []
-config/gen/makefiles/nqp-rx.in []
-config/gen/makefiles/nqp.in []
config/gen/makefiles/parrot_embed_pl.in []
config/gen/makefiles/parrot_pc.in []
-config/gen/makefiles/pct.in []
-config/gen/makefiles/pge.in []
-config/gen/makefiles/pirc.in []
config/gen/makefiles/root.in []
-config/gen/makefiles/tge.in []
config/gen/opengl.pm []
-config/gen/parrot_include.pm []
config/gen/platform.pm []
config/gen/platform/aix/asm.s []
config/gen/platform/ansi/dl.c []
@@ -936,8 +941,10 @@
ext/SQLite3/test.pir []
ext/nqp-rx/.gitignore []
ext/nqp-rx/CREDITS []
+ext/nqp-rx/Defines.mak []
ext/nqp-rx/LICENSE []
ext/nqp-rx/README []doc
+ext/nqp-rx/Rules.mak []
ext/nqp-rx/STATUS []
ext/nqp-rx/src/stage0/HLL-s0.pir []
ext/nqp-rx/src/stage0/NQP-s0.pir []
@@ -1112,6 +1119,7 @@
lib/Parrot/Docs/Section/Tests.pm [devel]lib
lib/Parrot/Docs/Section/Tools.pm [devel]lib
lib/Parrot/Docs/Text2HTML.pm [devel]lib
+lib/Parrot/H2inc.pm [devel]lib
lib/Parrot/Harness/DefaultTests.pm [devel]lib
lib/Parrot/Harness/Options.pm [devel]lib
lib/Parrot/Harness/Smoke.pm [devel]lib
@@ -1242,6 +1250,7 @@
runtime/parrot/library/Pg.pir [library]
runtime/parrot/library/Protoobject.pir [library]
runtime/parrot/library/Range.pir [library]
+runtime/parrot/library/Rules.mak [library]
runtime/parrot/library/SDL.pir [library]
runtime/parrot/library/SDL/App.pir [library]
runtime/parrot/library/SDL/Button.pir [library]
@@ -1836,6 +1845,7 @@
t/op/time.t [test]
t/op/time_old.t [test]
t/op/trans.t [test]
+t/op/trans_old.t [test]
t/op/vivify.t [test]
t/perl/Parrot_Distribution.t [test]
t/perl/Parrot_Docs.t [test]
@@ -2019,7 +2029,6 @@
t/steps/gen/crypto-01.t [test]
t/steps/gen/makefiles-01.t [test]
t/steps/gen/opengl-01.t [test]
-t/steps/gen/parrot_include-01.t [test]
t/steps/gen/platform-01.t [test]
t/steps/init/defaults-01.t [test]
t/steps/init/headers-01.t [test]
@@ -2113,7 +2122,6 @@
t/tools/pbc_dump.t [test]
t/tools/pbc_merge.t [test]
t/tools/pgegrep.t [test]
-t/tools/pmc2cutils/00-qualify.t [test]
t/tools/pmc2cutils/01-pmc2cutils.t [test]
t/tools/pmc2cutils/02-find_file.t [test]
t/tools/pmc2cutils/03-dump_vtable.t [test]
@@ -2124,7 +2132,9 @@
t/tools/testdata [test]
tools/build/addopstags.pl []
tools/build/c2str.pl []
+tools/build/dynpmc.pl []
tools/build/fixup_gen_file.pl []
+tools/build/h2inc.pl []
tools/build/headerizer.pl []
tools/build/nativecall.pl []
tools/build/ops2c.pl [devel]
Modified: branches/pmc_freeze_with_pmcs/MANIFEST.SKIP
==============================================================================
--- branches/pmc_freeze_with_pmcs/MANIFEST.SKIP Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/MANIFEST.SKIP Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,6 +1,6 @@
# ex: set ro:
# $Id$
-# generated by tools/dev/mk_manifest_and_skip.pl Wed Dec 16 15:31:13 2009 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Wed Jan 27 09:57:54 2010 UT
#
# This file should contain a transcript of the svn:ignore properties
# of the directories in the Parrot subversion repository. (Needed for
@@ -150,8 +150,6 @@
^vtable\.dump$
^vtable\.dump/
# generated from svn:ignore of 'compilers/data_json/'
-^compilers/data_json/Makefile$
-^compilers/data_json/Makefile/
^compilers/data_json/data_json\.pbc$
^compilers/data_json/data_json\.pbc/
# generated from svn:ignore of 'compilers/data_json/data_json/'
@@ -170,8 +168,6 @@
^compilers/imcc/.*\.tmp/
^compilers/imcc/CFLAGS$
^compilers/imcc/CFLAGS/
-^compilers/imcc/Makefile$
-^compilers/imcc/Makefile/
^compilers/imcc/imcc$
^compilers/imcc/imcc/
^compilers/imcc/imclexer\.c$
@@ -185,8 +181,6 @@
# generated from svn:ignore of 'compilers/json/'
^compilers/json/JSON\.pbc$
^compilers/json/JSON\.pbc/
-^compilers/json/Makefile$
-^compilers/json/Makefile/
# generated from svn:ignore of 'compilers/json/JSON/'
^compilers/json/JSON/.*\.pbc$
^compilers/json/JSON/.*\.pbc/
@@ -205,8 +199,6 @@
^compilers/ncigen/src/gen_grammar\.pir$
^compilers/ncigen/src/gen_grammar\.pir/
# generated from svn:ignore of 'compilers/nqp/'
-^compilers/nqp/Makefile$
-^compilers/nqp/Makefile/
^compilers/nqp/nqp\.pbc$
^compilers/nqp/nqp\.pbc/
# generated from svn:ignore of 'compilers/nqp/bootstrap/'
@@ -217,21 +209,10 @@
# generated from svn:ignore of 'compilers/nqp/src/'
^compilers/nqp/src/Grammar_gen\.pir$
^compilers/nqp/src/Grammar_gen\.pir/
-# generated from svn:ignore of 'compilers/pct/'
-^compilers/pct/.*\.pbc$
-^compilers/pct/.*\.pbc/
-^compilers/pct/Makefile$
-^compilers/pct/Makefile/
# generated from svn:ignore of 'compilers/pct/src/POST/'
^compilers/pct/src/POST/Grammar_gen\.pir$
^compilers/pct/src/POST/Grammar_gen\.pir/
# generated from svn:ignore of 'compilers/pge/'
-^compilers/pge/.*\.dylib$
-^compilers/pge/.*\.dylib/
-^compilers/pge/.*\.so$
-^compilers/pge/.*\.so/
-^compilers/pge/Makefile$
-^compilers/pge/Makefile/
^compilers/pge/PGE\.pbc$
^compilers/pge/PGE\.pbc/
# generated from svn:ignore of 'compilers/pge/PGE/'
@@ -246,8 +227,6 @@
^compilers/pirc/.*\.obj/
^compilers/pirc/.*\.pbd$
^compilers/pirc/.*\.pbd/
-^compilers/pirc/Makefile$
-^compilers/pirc/Makefile/
^compilers/pirc/pirc$
^compilers/pirc/pirc/
^compilers/pirc/pirc\.exe$
@@ -266,8 +245,8 @@
^compilers/pirc/t/subflags_?\.pir$
^compilers/pirc/t/subflags_?\.pir/
# generated from svn:ignore of 'compilers/tge/'
-^compilers/tge/Makefile$
-^compilers/tge/Makefile/
+^compilers/tge/tgc\.pbc$
+^compilers/tge/tgc\.pbc/
# generated from svn:ignore of 'compilers/tge/TGE/'
^compilers/tge/TGE/Parser\.pir$
^compilers/tge/TGE/Parser\.pir/
@@ -461,11 +440,6 @@
# generated from svn:ignore of 'ext/Parrot-Embed/t/'
^ext/Parrot-Embed/t/.*\.pbc$
^ext/Parrot-Embed/t/.*\.pbc/
-# generated from svn:ignore of 'ext/nqp-rx/'
-^ext/nqp-rx/.*\.pbc$
-^ext/nqp-rx/.*\.pbc/
-^ext/nqp-rx/Makefile$
-^ext/nqp-rx/Makefile/
# generated from svn:ignore of 'include/parrot/'
^include/parrot/.*\.tmp$
^include/parrot/.*\.tmp/
@@ -1067,11 +1041,6 @@
^t/tools/pmc2c\..*\.h/
^t/tools/pmc2c\..*\.pmc$
^t/tools/pmc2c\..*\.pmc/
-# generated from svn:ignore of 'tools/build/'
-^tools/build/dynoplibs\.pl$
-^tools/build/dynoplibs\.pl/
-^tools/build/dynpmc\.pl$
-^tools/build/dynpmc\.pl/
# Local variables:
# mode: text
# buffer-read-only: t
Modified: branches/pmc_freeze_with_pmcs/README
==============================================================================
--- branches/pmc_freeze_with_pmcs/README Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/README Fri Jan 29 21:05:08 2010 (r43643)
@@ -23,7 +23,7 @@
for running various configure and build scripts.
For most of the platforms that we are supporting initially, Parrot should build
-out of the box. docs/parrot.pod lists the core platforms. PLATFORMS provides
+out of the box. docs/parrot.pod lists the core platforms. PLATFORMS provides
reports on the platforms on which Parrot has been built and tested.
INSTRUCTIONS
@@ -85,13 +85,6 @@
But please note that dynamic libs will not be found for non-standard
locations unless you set LD_LIBRARY_PATH or similar.
-If you want to build high level languages on top of Parrot, you should
-also run
-
- make install-dev
-
-to install development files which compilers need in their build process.
-
Look at docs/parrot.pod and docs/intro.pod for where to go from here. If you
have any problems, see the section "How To Submit A Bug Report" in
docs/submissions.pod. These documents are in POD format. You can view these
@@ -116,14 +109,16 @@
MAILING LISTS
-------------
-The mailing list for Parrot is parrot-dev at lists.parrot.org. Subscribe by
-filling out the form at http://lists.parrot.org/mailman/listinfo/parrot-dev
-It is archived at http://lists.parrot.org/pipermail/parrot-dev/
+The Parrot user mailing list is parrot-users at lists.parrot.org. Subscribe by
+filling out the form at http://lists.parrot.org/mailman/listinfo/parrot-users .
+The list is archived at http://lists.parrot.org/pipermail/parrot-users/ .
+
+For development discussions see the information in docs/gettingstarted.pod.
FEEDBACK, PATCHES, etc.
-----------------------
-See F<docs/submissions.pod> for more information on reporting bugs and
+See docs/submissions.pod for more information on reporting bugs and
submitting patches.
WEB SITES
Copied: branches/pmc_freeze_with_pmcs/compilers/data_json/Defines.mak (from r43642, trunk/compilers/data_json/Defines.mak)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/pmc_freeze_with_pmcs/compilers/data_json/Defines.mak Fri Jan 29 21:05:08 2010 (r43643, copy of r43642, trunk/compilers/data_json/Defines.mak)
@@ -0,0 +1 @@
+DATA_JSON_LIB_PBCS = compilers/data_json/data_json.pbc
Copied: branches/pmc_freeze_with_pmcs/compilers/data_json/Rules.mak (from r43642, trunk/compilers/data_json/Rules.mak)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/pmc_freeze_with_pmcs/compilers/data_json/Rules.mak Fri Jan 29 21:05:08 2010 (r43643, copy of r43642, trunk/compilers/data_json/Rules.mak)
@@ -0,0 +1,20 @@
+$(LIBRARY_DIR)/data_json.pbc: compilers/data_json/data_json.pbc
+ $(CP) compilers/data_json/data_json.pbc $@
+
+compilers/data_json/data_json.pbc : \
+ runtime/parrot/library/PGE.pbc \
+ runtime/parrot/library/PGE/Util.pbc \
+ runtime/parrot/library/TGE.pbc \
+ compilers/data_json/data_json/grammar.pir \
+ compilers/data_json/data_json/pge2pir.pir
+
+compilers/data_json/data_json/grammar.pir : $(PARROT) \
+ compilers/data_json/data_json/grammar.pg \
+ $(LIBRARY_DIR)/PGE/Perl6Grammar.pbc \
+ $(LIBRARY_DIR)/PCT/HLLCompiler.pbc
+ $(PARROT) $(LIBRARY_DIR)/PGE/Perl6Grammar.pbc --output=$@ compilers/data_json/data_json/grammar.pg
+
+compilers/data_json/data_json/pge2pir.pir : $(PARROT) \
+ compilers/data_json/data_json/pge2pir.tg \
+ compilers/tge/tgc.pbc
+ $(PARROT) compilers/tge/tgc.pbc --output=$@ compilers/data_json/data_json/pge2pir.tg
Copied: branches/pmc_freeze_with_pmcs/compilers/imcc/Defines.mak (from r43642, trunk/compilers/imcc/Defines.mak)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/pmc_freeze_with_pmcs/compilers/imcc/Defines.mak Fri Jan 29 21:05:08 2010 (r43643, copy of r43642, trunk/compilers/imcc/Defines.mak)
@@ -0,0 +1,16 @@
+# these are private to the IMCC subsystem
+IMCC_O_FILES = \
+ compilers/imcc/imcparser$(O) \
+ compilers/imcc/imclexer$(O) \
+ compilers/imcc/imc$(O) \
+ compilers/imcc/main$(O) \
+ compilers/imcc/symreg$(O) \
+ compilers/imcc/instructions$(O) \
+ compilers/imcc/cfg$(O) \
+ compilers/imcc/reg_alloc$(O) \
+ compilers/imcc/sets$(O) \
+ compilers/imcc/debug$(O) \
+ compilers/imcc/optimizer$(O) \
+ compilers/imcc/pbc$(O) \
+ compilers/imcc/parser_util$(O) \
+ compilers/imcc/pcc$(O)
Copied: branches/pmc_freeze_with_pmcs/compilers/imcc/Rules.mak (from r43642, trunk/compilers/imcc/Rules.mak)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/pmc_freeze_with_pmcs/compilers/imcc/Rules.mak Fri Jan 29 21:05:08 2010 (r43643, copy of r43642, trunk/compilers/imcc/Rules.mak)
@@ -0,0 +1,201 @@
+compilers/imcc/pcc$(O) : \
+ compilers/imcc/cfg.h \
+ compilers/imcc/debug.h \
+ compilers/imcc/imc.h \
+ compilers/imcc/imcparser.h \
+ compilers/imcc/instructions.h \
+ compilers/imcc/parser.h \
+ compilers/imcc/sets.h \
+ compilers/imcc/symreg.h \
+ compilers/imcc/unit.h \
+ $(INC_DIR)/oplib/ops.h \
+ $(PARROT_H_HEADERS)
+
+compilers/imcc/instructions$(O) : \
+ compilers/imcc/cfg.h \
+ compilers/imcc/debug.h \
+ compilers/imcc/imc.h \
+ compilers/imcc/instructions.h \
+ compilers/imcc/optimizer.h \
+ compilers/imcc/pbc.h \
+ compilers/imcc/sets.h \
+ compilers/imcc/symreg.h \
+ compilers/imcc/unit.h \
+ $(INC_DIR)/oplib/ops.h \
+ $(PARROT_H_HEADERS)
+
+compilers/imcc/pbc$(O) : \
+ compilers/imcc/cfg.h \
+ compilers/imcc/debug.h \
+ compilers/imcc/imc.h \
+ compilers/imcc/instructions.h \
+ compilers/imcc/pbc.h \
+ compilers/imcc/sets.h \
+ compilers/imcc/symreg.h \
+ compilers/imcc/unit.h \
+ $(INC_DIR)/oplib/ops.h \
+ $(PARROT_H_HEADERS) \
+ include/pmc/pmc_sub.h
+
+compilers/imcc/parser_util$(O) : \
+ compilers/imcc/cfg.h \
+ compilers/imcc/debug.h \
+ compilers/imcc/imc.h \
+ compilers/imcc/imcparser.h \
+ compilers/imcc/instructions.h \
+ compilers/imcc/optimizer.h \
+ compilers/imcc/parser.h \
+ compilers/imcc/pbc.h \
+ compilers/imcc/sets.h \
+ compilers/imcc/symreg.h \
+ compilers/imcc/unit.h \
+ $(INC_DIR)/dynext.h \
+ $(INC_DIR)/embed.h \
+ $(INC_DIR)/oplib/ops.h \
+ $(PARROT_H_HEADERS) \
+ include/pmc/pmc_sub.h
+
+compilers/imcc/imc$(O) : \
+ compilers/imcc/cfg.h \
+ compilers/imcc/debug.h \
+ compilers/imcc/imc.h \
+ compilers/imcc/instructions.h \
+ compilers/imcc/optimizer.h \
+ compilers/imcc/sets.h \
+ compilers/imcc/symreg.h \
+ compilers/imcc/unit.h \
+ $(INC_DIR)/oplib/ops.h \
+ $(PARROT_H_HEADERS)
+
+compilers/imcc/cfg$(O) : \
+ compilers/imcc/cfg.h \
+ compilers/imcc/debug.h \
+ compilers/imcc/imc.h \
+ compilers/imcc/instructions.h \
+ compilers/imcc/optimizer.h \
+ compilers/imcc/sets.h \
+ compilers/imcc/symreg.h \
+ compilers/imcc/unit.h \
+ $(INC_DIR)/oplib/ops.h \
+ $(PARROT_H_HEADERS)
+
+compilers/imcc/debug$(O) : \
+ compilers/imcc/cfg.h \
+ compilers/imcc/debug.h \
+ compilers/imcc/imc.h \
+ compilers/imcc/instructions.h \
+ compilers/imcc/sets.h \
+ compilers/imcc/symreg.h \
+ compilers/imcc/unit.h \
+ $(INC_DIR)/oplib/ops.h \
+ $(PARROT_H_HEADERS)
+
+compilers/imcc/imclexer$(O) : \
+ compilers/imcc/cfg.h \
+ compilers/imcc/debug.h \
+ compilers/imcc/imc.h \
+ compilers/imcc/imcparser.h \
+ compilers/imcc/instructions.h \
+ compilers/imcc/parser.h \
+ compilers/imcc/sets.h \
+ compilers/imcc/symreg.h \
+ compilers/imcc/unit.h \
+ $(INC_DIR)/oplib/ops.h \
+ $(PARROT_H_HEADERS)
+
+compilers/imcc/imcparser$(O) : \
+ compilers/imcc/cfg.h \
+ compilers/imcc/debug.h \
+ compilers/imcc/imc.h \
+ compilers/imcc/imcparser.h \
+ compilers/imcc/instructions.h \
+ compilers/imcc/optimizer.h \
+ compilers/imcc/parser.h \
+ compilers/imcc/pbc.h \
+ compilers/imcc/sets.h \
+ compilers/imcc/symreg.h \
+ compilers/imcc/unit.h \
+ $(INC_DIR)/dynext.h \
+ $(INC_DIR)/oplib/ops.h \
+ $(PARROT_H_HEADERS)
+
+compilers/imcc/main$(O) : \
+ compilers/imcc/cfg.h \
+ compilers/imcc/debug.h \
+ compilers/imcc/imc.h \
+ compilers/imcc/imcparser.h \
+ compilers/imcc/instructions.h \
+ compilers/imcc/parser.h \
+ compilers/imcc/pbc.h \
+ compilers/imcc/sets.h \
+ compilers/imcc/symreg.h \
+ compilers/imcc/unit.h \
+ $(INC_DIR)/embed.h \
+ $(INC_DIR)/imcc.h \
+ $(INC_DIR)/oplib/ops.h \
+ $(INC_DIR)/runcore_api.h \
+ $(PARROT_H_HEADERS)
+
+compilers/imcc/optimizer$(O) : \
+ compilers/imcc/cfg.h \
+ compilers/imcc/debug.h \
+ compilers/imcc/imc.h \
+ compilers/imcc/instructions.h \
+ compilers/imcc/optimizer.h \
+ compilers/imcc/pbc.h \
+ compilers/imcc/sets.h \
+ compilers/imcc/symreg.h \
+ compilers/imcc/unit.h \
+ $(INC_DIR)/oplib/ops.h \
+ $(PARROT_H_HEADERS)
+
+compilers/imcc/reg_alloc$(O) : \
+ compilers/imcc/cfg.h \
+ compilers/imcc/debug.h \
+ compilers/imcc/imc.h \
+ compilers/imcc/instructions.h \
+ compilers/imcc/optimizer.h \
+ compilers/imcc/sets.h \
+ compilers/imcc/symreg.h \
+ compilers/imcc/unit.h \
+ $(INC_DIR)/oplib/ops.h \
+ $(PARROT_H_HEADERS)
+
+compilers/imcc/sets$(O) : \
+ compilers/imcc/cfg.h \
+ compilers/imcc/debug.h \
+ compilers/imcc/imc.h \
+ compilers/imcc/instructions.h \
+ compilers/imcc/sets.h \
+ compilers/imcc/symreg.h \
+ compilers/imcc/unit.h \
+ $(INC_DIR)/oplib/ops.h \
+ $(PARROT_H_HEADERS)
+
+compilers/imcc/symreg$(O) : \
+ compilers/imcc/cfg.h \
+ compilers/imcc/debug.h \
+ compilers/imcc/imc.h \
+ compilers/imcc/instructions.h \
+ compilers/imcc/sets.h \
+ compilers/imcc/symreg.h \
+ compilers/imcc/unit.h \
+ $(INC_DIR)/oplib/ops.h \
+ $(PARROT_H_HEADERS)
+
+# imcc file dependencies
+#
+# The .flag files are needed because we keep some derived files in SVN,
+# which does not keep accurate timestamps on the files, relative to each other.
+# Note that YACC or LEX may be null commands, so we must `touch` all the
+# target files, instead of just the .flag files.
+
+compilers/imcc/imcc.y.flag compilers/imcc/imcparser.c compilers/imcc/imcparser.h : compilers/imcc/imcc.y
+ $(YACC) compilers/imcc/imcc.y -d -o compilers/imcc/imcparser.c
+ $(PERL) $(BUILD_TOOLS_DIR)/fixup_gen_file.pl -noheaderizer compilers/imcc/imcparser.c compilers/imcc/imcc.y
+ $(PERL) $(BUILD_TOOLS_DIR)/fixup_gen_file.pl -noheaderizer compilers/imcc/imcparser.h compilers/imcc/imcc.y
+ $(TOUCH) compilers/imcc/imcc.y.flag compilers/imcc/imcparser.c compilers/imcc/imcparser.h
+
+compilers/imcc/imcc.l.flag compilers/imcc/imclexer.c : compilers/imcc/imcc.l
+ $(LEX) -ocompilers/imcc/imclexer.c compilers/imcc/imcc.l
+ $(TOUCH) compilers/imcc/imcc.l.flag compilers/imcc/imclexer.c
Modified: branches/pmc_freeze_with_pmcs/compilers/imcc/imcc.l
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/imcc/imcc.l Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/imcc/imcc.l Fri Jan 29 21:05:08 2010 (r43643)
@@ -718,21 +718,33 @@
}
<macro>".$"{ID} {
- if (valp) {
- const size_t len = strlen(IMCC_INFO(interp)->cur_macro_name) + yyleng + 12;
- char * const label = (char *)mem_sys_allocate(len);
-
- snprintf(label, len, "local__%s__%s__$",
- IMCC_INFO(interp)->cur_macro_name, yytext+2);
+ if (valp) {
+ if (!IMCC_INFO(interp)->cur_macro_name) {
+ if (valp->s)
+ mem_sys_free(valp->s);
+ IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
+ "Invalid LABEL outside of macro");
+ }
+ else {
+ char * const fmt = "local__%s__%s__$";
+ const size_t fmtlen = strlen(fmt) - (2 * strlen("%s"));
+ const size_t len = strlen(IMCC_INFO(interp)->cur_macro_name)
+ + yyleng + fmtlen;
+ char * const label = (char *)mem_sys_allocate(len);
+
+ /* skip over ".$" prefix with the +2 */
+ snprintf(label, len, fmt,
+ IMCC_INFO(interp)->cur_macro_name, yytext + 2);
if (valp->s)
mem_sys_free(valp->s);
valp->s = label;
}
-
- return IDENTIFIER;
}
+ return IDENTIFIER;
+}
+
<macro>^{WS}+ /* skip leading ws */;
<macro>{WS}+ DUP_AND_RET(valp, ' ');
<macro>[SNIP]{DIGITS} DUP_AND_RET(valp, REG);
@@ -1139,7 +1151,7 @@
m = find_macro(interp, name);
if (m) {
- int i,c,start_cond;
+ int i, c, start_cond;
macro_frame_t * frame = new_frame(interp);
frame->params = &m->params;
Modified: branches/pmc_freeze_with_pmcs/compilers/imcc/imclexer.c
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/imcc/imclexer.c Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/imcc/imclexer.c Fri Jan 29 21:05:08 2010 (r43643)
@@ -3901,66 +3901,77 @@
YY_RULE_SETUP
#line 720 "compilers/imcc/imcc.l"
{
- if (valp) {
- const size_t len = strlen(IMCC_INFO(interp)->cur_macro_name) + yyleng + 12;
- char * const label = (char *)mem_sys_allocate(len);
+ if (valp) {
+ if (!IMCC_INFO(interp)->cur_macro_name) {
+ if (valp->s)
+ mem_sys_free(valp->s);
+ IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
+ "Invalid LABEL outside of macro");
+ }
+ else {
+ char * const fmt = "local__%s__%s__$";
+ const size_t fmtlen = strlen(fmt) - ( 2 * strlen("%s") );
+ const size_t len = strlen(IMCC_INFO(interp)->cur_macro_name)
+ + yyleng + fmtlen;
+ char * const label = (char *)mem_sys_allocate(len);
- snprintf(label, len, "local__%s__%s__$",
- IMCC_INFO(interp)->cur_macro_name, yytext+2);
+ snprintf(label, len, fmt,
+ IMCC_INFO(interp)->cur_macro_name, yytext + 2);
if (valp->s)
mem_sys_free(valp->s);
valp->s = label;
}
-
- return IDENTIFIER;
}
+
+ return IDENTIFIER;
+}
YY_BREAK
case 141:
YY_RULE_SETUP
-#line 736 "compilers/imcc/imcc.l"
+#line 747 "compilers/imcc/imcc.l"
/* skip leading ws */;
YY_BREAK
case 142:
YY_RULE_SETUP
-#line 737 "compilers/imcc/imcc.l"
+#line 748 "compilers/imcc/imcc.l"
DUP_AND_RET(valp, ' ');
YY_BREAK
case 143:
YY_RULE_SETUP
-#line 738 "compilers/imcc/imcc.l"
+#line 749 "compilers/imcc/imcc.l"
DUP_AND_RET(valp, REG);
YY_BREAK
case 144:
YY_RULE_SETUP
-#line 739 "compilers/imcc/imcc.l"
+#line 750 "compilers/imcc/imcc.l"
DUP_AND_RET(valp, REG);
YY_BREAK
case 145:
YY_RULE_SETUP
-#line 740 "compilers/imcc/imcc.l"
+#line 751 "compilers/imcc/imcc.l"
DUP_AND_RET(valp, IDENTIFIER);
YY_BREAK
case 146:
YY_RULE_SETUP
-#line 741 "compilers/imcc/imcc.l"
+#line 752 "compilers/imcc/imcc.l"
DUP_AND_RET(valp, MACRO);
YY_BREAK
case 147:
YY_RULE_SETUP
-#line 742 "compilers/imcc/imcc.l"
+#line 753 "compilers/imcc/imcc.l"
DUP_AND_RET(valp, yytext[0]);
YY_BREAK
case YY_STATE_EOF(macro):
-#line 743 "compilers/imcc/imcc.l"
+#line 754 "compilers/imcc/imcc.l"
yyterminate();
YY_BREAK
case 148:
YY_RULE_SETUP
-#line 745 "compilers/imcc/imcc.l"
+#line 756 "compilers/imcc/imcc.l"
ECHO;
YY_BREAK
-#line 3964 "compilers/imcc/imclexer.c"
+#line 3975 "compilers/imcc/imclexer.c"
case YY_STATE_EOF(pod):
case YY_STATE_EOF(cmt1):
case YY_STATE_EOF(cmt2):
@@ -5162,7 +5173,7 @@
#define YYTABLES_NAME "yytables"
-#line 745 "compilers/imcc/imcc.l"
+#line 756 "compilers/imcc/imcc.l"
@@ -5561,7 +5572,7 @@
m = find_macro(interp, name);
if (m) {
- int i,c,start_cond;
+ int i, c, start_cond;
macro_frame_t * frame = new_frame(interp);
frame->params = &m->params;
Copied: branches/pmc_freeze_with_pmcs/compilers/json/Defines.mak (from r43642, trunk/compilers/json/Defines.mak)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/pmc_freeze_with_pmcs/compilers/json/Defines.mak Fri Jan 29 21:05:08 2010 (r43643, copy of r43642, trunk/compilers/json/Defines.mak)
@@ -0,0 +1,6 @@
+JSON_LIB_PBCS = compilers/json/JSON.pbc
+JSON_CLEANUPS = $(JSON_LIB_PBCS) \
+ compilers/json/JSON/grammar.pir \
+ compilers/json/JSON/pge2pir.pir \
+ compilers/json/JSON/grammar.pbc \
+ compilers/json/JSON/pge2pir.pbc
Copied: branches/pmc_freeze_with_pmcs/compilers/json/Rules.mak (from r43642, trunk/compilers/json/Rules.mak)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/pmc_freeze_with_pmcs/compilers/json/Rules.mak Fri Jan 29 21:05:08 2010 (r43643, copy of r43642, trunk/compilers/json/Rules.mak)
@@ -0,0 +1,16 @@
+compilers/json/JSON.pbc : \
+ $(LIBRARY_DIR)/PGE.pbc \
+ $(LIBRARY_DIR)/PGE/Util.pbc \
+ $(LIBRARY_DIR)/TGE.pbc \
+ compilers/json/JSON/grammar.pbc \
+ compilers/json/JSON/pge2pir.pbc \
+ compilers/json/JSON.pir
+ $(PARROT) -o $@ compilers/json/JSON.pir
+
+compilers/json/JSON/grammar.pir : compilers/json/JSON/grammar.pg \
+ $(LIBRARY_DIR)/PGE/Perl6Grammar.pbc
+ $(PARROT) $(LIBRARY_DIR)/PGE/Perl6Grammar.pbc --output=$@ compilers/json/JSON/grammar.pg
+
+compilers/json/JSON/pge2pir.pir : compilers/json/JSON/pge2pir.tg \
+ $(LIBRARY_DIR)/TGE.pbc
+ $(PARROT) compilers/tge/tgc.pir --output=$@ compilers/json/JSON/pge2pir.tg
Copied: branches/pmc_freeze_with_pmcs/compilers/nqp/Defines.mak (from r43642, trunk/compilers/nqp/Defines.mak)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/Defines.mak Fri Jan 29 21:05:08 2010 (r43643, copy of r43642, trunk/compilers/nqp/Defines.mak)
@@ -0,0 +1,7 @@
+NQP_LIB_PBCS = compilers/nqp/nqp.pbc
+
+NQP_CLEANUPS = \
+ compilers/nqp/nqp.pbc \
+ compilers/nqp/src/Grammar_gen.pir \
+ compilers/nqp/bootstrap/gen_actions.pir \
+ compilers/nqp/bootstrap/nqp.pbc
Copied: branches/pmc_freeze_with_pmcs/compilers/nqp/Rules.mak (from r43642, trunk/compilers/nqp/Rules.mak)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/Rules.mak Fri Jan 29 21:05:08 2010 (r43643, copy of r43642, trunk/compilers/nqp/Rules.mak)
@@ -0,0 +1,21 @@
+compilers/nqp/nqp.pbc : compilers/nqp/src/builtins.pir \
+ compilers/nqp/src/Grammar/Actions.pir \
+ compilers/nqp/src/Grammar_gen.pir \
+ $(LIBRARY_DIR)/PCT.pbc \
+ $(LIBRARY_DIR)/PGE.pbc
+
+compilers/nqp/src/Grammar_gen.pir : $(PARROT) $(LIBRARY_DIR)/PGE/Perl6Grammar.pir compilers/nqp/src/Grammar.pg $(LIBRARY_DIR)/PCT/HLLCompiler.pbc $(LIBRARY_DIR)/PGE.pbc
+ $(PARROT) $(LIBRARY_DIR)/PGE/Perl6Grammar.pir --output=$@ compilers/nqp/src/Grammar.pg
+
+# Developer target to regnerate bootstrap. Unused?
+nqp-boot: \
+ compilers/nqp/bootstrap/nqp.pir \
+ compilers/nqp/bootstrap/gen_actions.pir
+
+compilers/nqp/bootstrap/gen_actions.pir : $(PARROT) \
+ compilers/nqp/nqp.pbc \
+ compilers/nqp/bootstrap/actions.pm
+ $(PARROT) compilers/nqp/nqp.pbc --output=$@ --target=pir \
+ compilers/nqp/bootstrap/actions.pm
+
+compilers/nqp/bootstrap/nqp.pbc : $(LIBRARY)/PCT.pbc
Modified: branches/pmc_freeze_with_pmcs/compilers/nqp/bootstrap/nqp.pir
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/nqp/bootstrap/nqp.pir Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/bootstrap/nqp.pir Fri Jan 29 21:05:08 2010 (r43643)
@@ -52,9 +52,9 @@
$P1 = $P0.'command_line'(args)
.end
-.include 'src/builtins.pir'
-.include 'src/Grammar_gen.pir'
-.include 'bootstrap/gen_actions.pir'
+.include 'compilers/nqp/src/builtins.pir'
+.include 'compilers/nqp/src/Grammar_gen.pir'
+.include 'compilers/nqp/bootstrap/gen_actions.pir'
.namespace []
Modified: branches/pmc_freeze_with_pmcs/compilers/nqp/nqp.pir
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/nqp/nqp.pir Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/nqp.pir Fri Jan 29 21:05:08 2010 (r43643)
@@ -22,11 +22,11 @@
.tailcall $P0.'command_line'(args, 'encoding'=>'utf8', 'transcode'=>'ascii')
.end
-.include 'src/Grammar_gen.pir'
+.include 'compilers/nqp/src/Grammar_gen.pir'
-.include 'src/Grammar/Actions.pir'
+.include 'compilers/nqp/src/Grammar/Actions.pir'
-.include 'src/builtins.pir'
+.include 'compilers/nqp/src/builtins.pir'
# Local Variables:
# mode: pir
Modified: branches/pmc_freeze_with_pmcs/compilers/nqp/t/01-literals.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/nqp/t/01-literals.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/t/01-literals.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
# check literals
say('1..8');
Modified: branches/pmc_freeze_with_pmcs/compilers/nqp/t/02-if-else.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/nqp/t/02-if-else.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/t/02-if-else.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
# check control structure 'if ... else'
say('1..14');
Modified: branches/pmc_freeze_with_pmcs/compilers/nqp/t/02-if.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/nqp/t/02-if.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/t/02-if.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
# check control structure 'if'
say('1..4');
Modified: branches/pmc_freeze_with_pmcs/compilers/nqp/t/03-unless.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/nqp/t/03-unless.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/t/03-unless.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
# check control structure 'unless'
say('1..4');
Modified: branches/pmc_freeze_with_pmcs/compilers/nqp/t/04-comments.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/nqp/t/04-comments.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/t/04-comments.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
# check comments
say('1..2');
Modified: branches/pmc_freeze_with_pmcs/compilers/nqp/t/05-pod.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/nqp/t/05-pod.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/t/05-pod.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
# check pod
say('1..4');
Modified: branches/pmc_freeze_with_pmcs/compilers/nqp/t/06-args-pos.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/nqp/t/06-args-pos.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/t/06-args-pos.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
# positional arguments
say('1..2');
Modified: branches/pmc_freeze_with_pmcs/compilers/nqp/t/07-boolean.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/nqp/t/07-boolean.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/t/07-boolean.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
# Testing boolean context operators, ! and ?
plan(8);
Modified: branches/pmc_freeze_with_pmcs/compilers/nqp/t/08-blocks.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/nqp/t/08-blocks.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/t/08-blocks.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
# check blocks and statement enders
say('1..7');
Modified: branches/pmc_freeze_with_pmcs/compilers/nqp/t/09-var.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/nqp/t/09-var.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/t/09-var.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
# check variables
say('1..14');
Modified: branches/pmc_freeze_with_pmcs/compilers/nqp/t/10-sub.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/nqp/t/10-sub.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/t/10-sub.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
# check subs
say('1..11');
Modified: branches/pmc_freeze_with_pmcs/compilers/nqp/t/11-cmp.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/nqp/t/11-cmp.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/t/11-cmp.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
# check comparisons
say('1..19');
Modified: branches/pmc_freeze_with_pmcs/compilers/nqp/t/12-list.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/nqp/t/12-list.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/t/12-list.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
# lists and for
plan(3);
Modified: branches/pmc_freeze_with_pmcs/compilers/nqp/t/13-logical.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/nqp/t/13-logical.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/t/13-logical.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
# check '||' and '&&'
plan(4);
Modified: branches/pmc_freeze_with_pmcs/compilers/nqp/t/14-op.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/nqp/t/14-op.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/t/14-op.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
# checking basic operands and circumfix:( )
plan(29);
Modified: branches/pmc_freeze_with_pmcs/compilers/nqp/t/15-module.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/nqp/t/15-module.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/t/15-module.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
# check module
XYZ::sayfoo();
Modified: branches/pmc_freeze_with_pmcs/compilers/nqp/t/16-while.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/nqp/t/16-while.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/t/16-while.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
# while, until statements
plan(8);
Modified: branches/pmc_freeze_with_pmcs/compilers/nqp/t/17-class.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/nqp/t/17-class.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/t/17-class.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
# class
plan(1);
Modified: branches/pmc_freeze_with_pmcs/compilers/nqp/t/18-inline.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/nqp/t/18-inline.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/t/18-inline.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
# inline
plan(7);
Modified: branches/pmc_freeze_with_pmcs/compilers/nqp/t/19-hash_access.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/nqp/t/19-hash_access.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/t/19-hash_access.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
# check hash access methods
plan(7);
Modified: branches/pmc_freeze_with_pmcs/compilers/nqp/t/20-list_access.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/nqp/t/20-list_access.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/t/20-list_access.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
# check list access methods
plan(7);
Modified: branches/pmc_freeze_with_pmcs/compilers/nqp/t/22-optional_args.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/nqp/t/22-optional_args.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/t/22-optional_args.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
# test optional arguments and parameters
plan(3);
Modified: branches/pmc_freeze_with_pmcs/compilers/nqp/t/23-named_args.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/nqp/t/23-named_args.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/t/23-named_args.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
# test named parameters and arguments
plan(4);
Modified: branches/pmc_freeze_with_pmcs/compilers/nqp/t/24-scalar_context.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/nqp/t/24-scalar_context.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/t/24-scalar_context.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
# scalar context
plan(1);
Modified: branches/pmc_freeze_with_pmcs/compilers/nqp/t/25-list_context.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/nqp/t/25-list_context.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/t/25-list_context.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
# list context
plan(1);
Modified: branches/pmc_freeze_with_pmcs/compilers/nqp/t/26-method_ops.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/nqp/t/26-method_ops.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/t/26-method_ops.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
# method ops (just method calls for now)
plan(3);
Modified: branches/pmc_freeze_with_pmcs/compilers/nqp/t/27-ternary.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/nqp/t/27-ternary.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/t/27-ternary.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
# the ternary ?? !! operator
plan(8);
Modified: branches/pmc_freeze_with_pmcs/compilers/nqp/t/28-return.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/nqp/t/28-return.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/t/28-return.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
# implicit and explicit returns from subs
plan(3);
Modified: branches/pmc_freeze_with_pmcs/compilers/nqp/t/29-self.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/nqp/t/29-self.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/t/29-self.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
plan(3);
class Foo {
Modified: branches/pmc_freeze_with_pmcs/compilers/nqp/t/30-subclass.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/nqp/t/30-subclass.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/t/30-subclass.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,5 +1,3 @@
-#!./parrot nqp.pbc
-
# class inheritance
plan(6);
Modified: branches/pmc_freeze_with_pmcs/compilers/nqp/t/harness
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/nqp/t/harness Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/nqp/t/harness Fri Jan 29 21:05:08 2010 (r43643)
@@ -4,5 +4,10 @@
use FindBin;
use lib qw( . lib ../lib ../../lib ../../../lib );
-use Parrot::Test::Harness language => 'nqp', compiler => 'nqp.pbc';
+use Parrot::Test::Harness
+ language => 'nqp',
+ exec => [ './parrot', 'compilers/nqp/nqp.pbc' ],
+ files => [ 'compilers/nqp/t/*.t' ];
+ #arguments => [ '--files' ],
+ #verbosity => 1,
Copied: branches/pmc_freeze_with_pmcs/compilers/pct/Defines.mak (from r43642, trunk/compilers/pct/Defines.mak)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/pmc_freeze_with_pmcs/compilers/pct/Defines.mak Fri Jan 29 21:05:08 2010 (r43643, copy of r43642, trunk/compilers/pct/Defines.mak)
@@ -0,0 +1,8 @@
+PCT_LIB_PBCS = \
+ $(LIBRARY_DIR)/PCT.pbc \
+ $(LIBRARY_DIR)/PCT/PAST.pbc \
+ $(LIBRARY_DIR)/PCT/Grammar.pbc \
+ $(LIBRARY_DIR)/PCT/HLLCompiler.pbc \
+ $(LIBRARY_DIR)/PCT/Dumper.pbc
+
+PCT_CLEANUPS = $(PCT_LIB_PBCS)
Copied: branches/pmc_freeze_with_pmcs/compilers/pct/Rules.mak (from r43642, trunk/compilers/pct/Rules.mak)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/pmc_freeze_with_pmcs/compilers/pct/Rules.mak Fri Jan 29 21:05:08 2010 (r43643, copy of r43642, trunk/compilers/pct/Rules.mak)
@@ -0,0 +1,32 @@
+## XXX does not cover .includes of core .pasm files
+
+$(LIBRARY_DIR)/PCT.pbc : $(PARROT) compilers/pct/PCT.pir \
+ $(LIBRARY_DIR)/PCT/Grammar.pbc $(LIBRARY_DIR)/PCT/PAST.pbc
+ $(PARROT) -o $@ compilers/pct/PCT.pir
+
+$(LIBRARY_DIR)/PCT/PAST.pbc : compilers/pct/src/PAST.pir $(PARROT) \
+ $(LIBRARY_DIR)/PCT/HLLCompiler.pbc \
+ compilers/pct/src/PCT/Node.pir \
+ compilers/pct/src/PAST/Node.pir \
+ compilers/pct/src/PAST/Compiler.pir \
+ compilers/pct/src/POST/Node.pir \
+ compilers/pct/src/POST/Compiler.pir
+ $(PARROT) -o $@ compilers/pct/src/PAST.pir
+
+$(LIBRARY_DIR)/PCT/Grammar.pbc : compilers/pct/src/PCT/Grammar.pir $(PARROT) \
+ $(LIBRARY_DIR)/PGE.pbc $(LIBRARY_DIR)/PGE/Util.pbc
+ $(PARROT) -o $@ compilers/pct/src/PCT/Grammar.pir
+
+$(LIBRARY_DIR)/PCT/HLLCompiler.pbc : compilers/pct/src/PCT/HLLCompiler.pir \
+ $(PARROT) \
+ $(LIBRARY_DIR)/PGE/Dumper.pbc \
+ $(LIBRARY_DIR)/P6object.pbc \
+ $(LIBRARY_DIR)/Parrot/Exception.pbc \
+ $(LIBRARY_DIR)/config.pir \
+ $(LIBRARY_DIR)/Getopt/Obj.pbc \
+ $(LIBRARY_DIR)/dumper.pbc \
+ $(LIBRARY_DIR)/PCT/Dumper.pbc
+ $(PARROT) -o $@ compilers/pct/src/PCT/HLLCompiler.pir
+
+$(LIBRARY_DIR)/PCT/Dumper.pbc : compilers/pct/src/PCT/Dumper.pir $(PARROT)
+ $(PARROT) -o $@ compilers/pct/src/PCT/Dumper.pir
Modified: branches/pmc_freeze_with_pmcs/compilers/pct/src/PAST.pir
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/pct/src/PAST.pir Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/pct/src/PAST.pir Fri Jan 29 21:05:08 2010 (r43643)
@@ -11,15 +11,15 @@
=cut
-.include 'src/PCT/Node.pir'
+.include 'compilers/pct/src/PCT/Node.pir'
-.include 'src/PAST/Node.pir'
+.include 'compilers/pct/src/PAST/Node.pir'
-.include 'src/PAST/Compiler.pir'
+.include 'compilers/pct/src/PAST/Compiler.pir'
-.include 'src/POST/Node.pir'
+.include 'compilers/pct/src/POST/Node.pir'
-.include 'src/POST/Compiler.pir'
+.include 'compilers/pct/src/POST/Compiler.pir'
=head1 AUTHOR
Copied: branches/pmc_freeze_with_pmcs/compilers/pge/Defines.mak (from r43642, trunk/compilers/pge/Defines.mak)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/pmc_freeze_with_pmcs/compilers/pge/Defines.mak Fri Jan 29 21:05:08 2010 (r43643, copy of r43642, trunk/compilers/pge/Defines.mak)
@@ -0,0 +1,2 @@
+PGE_LIB_PBCS = $(LIBRARY_DIR)/PGE.pbc
+PGE_CLEANUPS = $(PGE_LIB_PBCS) compilers/pge/PGE/builtins_gen.pir
Copied: branches/pmc_freeze_with_pmcs/compilers/pge/Rules.mak (from r43642, trunk/compilers/pge/Rules.mak)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/pmc_freeze_with_pmcs/compilers/pge/Rules.mak Fri Jan 29 21:05:08 2010 (r43643, copy of r43642, trunk/compilers/pge/Rules.mak)
@@ -0,0 +1,15 @@
+$(LIBRARY_DIR)/PGE.pbc: $(PARROT) \
+ compilers/pge/PGE.pir \
+ compilers/pge/PGE/Exp.pir \
+ compilers/pge/PGE/Match.pir \
+ compilers/pge/PGE/Regex.pir \
+ compilers/pge/PGE/Perl6Regex.pir \
+ compilers/pge/PGE/OPTable.pir \
+ compilers/pge/PGE/P5Regex.pir \
+ compilers/pge/PGE/builtins.pg \
+ $(LIBRARY_DIR)/PCT/HLLCompiler.pbc
+ $(PERL) -e "" > compilers/pge/PGE/builtins_gen.pir
+ $(PARROT) -o $@ compilers/pge/PGE.pir
+ $(PARROT) $(LIBRARY_DIR)/PGE/Perl6Grammar.pir --output=compilers/pge/PGE/builtins_gen.pir compilers/pge/PGE/builtins.pg
+ $(PARROT) -o $@ compilers/pge/PGE.pir
+
Copied: branches/pmc_freeze_with_pmcs/compilers/pirc/Defines.mak (from r43642, trunk/compilers/pirc/Defines.mak)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/pmc_freeze_with_pmcs/compilers/pirc/Defines.mak Fri Jan 29 21:05:08 2010 (r43643, copy of r43642, trunk/compilers/pirc/Defines.mak)
@@ -0,0 +1,18 @@
+PIRC_O_FILES = \
+ compilers/pirc/src/main$(O) \
+ compilers/pirc/src/pirparser$(O) \
+ compilers/pirc/src/pirlexer$(O) \
+ compilers/pirc/src/pircompunit$(O) \
+ compilers/pirc/src/pircompiler$(O) \
+ compilers/pirc/src/pirsymbol$(O) \
+ compilers/pirc/src/piremit$(O) \
+ compilers/pirc/src/hdocprep$(O) \
+ compilers/pirc/src/pirmacro$(O) \
+ compilers/pirc/src/pirregalloc$(O) \
+ compilers/pirc/src/bcgen$(O) \
+ compilers/pirc/src/pirpcc$(O) \
+ compilers/pirc/src/pirerr$(O) \
+ compilers/pirc/src/pircapi$(O) \
+ compilers/pirc/src/pirop$(O)
+
+PIRC_CLEANUPS = $(PIRC_O_FILES) "compilers/pirc/t/*.pir" ./pirc$(EXE)
Copied: branches/pmc_freeze_with_pmcs/compilers/pirc/Rules.mak (from r43642, trunk/compilers/pirc/Rules.mak)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/pmc_freeze_with_pmcs/compilers/pirc/Rules.mak Fri Jan 29 21:05:08 2010 (r43643, copy of r43642, trunk/compilers/pirc/Rules.mak)
@@ -0,0 +1,226 @@
+compilers/pirc/src/piremit$(O) : $(PARROT_H_HEADERS) \
+ compilers/pirc/src/piremit.h \
+ compilers/pirc/src/pircompunit.h \
+ compilers/pirc/src/pircompiler.h \
+ compilers/pirc/src/pirerr.h \
+ compilers/pirc/src/bcgen.h \
+ compilers/pirc/src/pirdefines.h \
+ compilers/pirc/src/pirmacro.h \
+ compilers/pirc/src/pirregalloc.h \
+ compilers/pirc/src/pirsymbol.h \
+ compilers/pirc/src/piryy.h \
+ $(INC_DIR)/embed.h \
+ $(INC_DIR)/oplib/ops.h
+
+compilers/pirc/src/pirparser$(O) : $(PARROT_H_HEADERS) \
+ compilers/pirc/src/pircompiler.h \
+ compilers/pirc/src/pircompunit.h \
+ compilers/pirc/src/pirdefines.h \
+ compilers/pirc/src/pirparser.h \
+ compilers/pirc/src/piryy.h \
+ compilers/pirc/src/pirlexer.h \
+ compilers/pirc/src/pirerr.h \
+ compilers/pirc/src/pirop.h \
+ compilers/pirc/src/pirpcc.h \
+ compilers/pirc/src/pirmacro.h \
+ compilers/pirc/src/pirregalloc.h \
+ compilers/pirc/src/pirsymbol.h \
+ compilers/pirc/src/bcgen.h \
+ $(INC_DIR)/oplib/ops.h \
+ $(INC_DIR)/embed.h
+
+compilers/pirc/src/pirerr$(O) : $(PARROT_H_HEADERS) \
+ compilers/pirc/src/pircompiler.h \
+ compilers/pirc/src/pircompunit.h \
+ compilers/pirc/src/pirdefines.h \
+ compilers/pirc/src/pirparser.h \
+ compilers/pirc/src/piryy.h \
+ compilers/pirc/src/pirlexer.h \
+ compilers/pirc/src/pirerr.h \
+ compilers/pirc/src/pirmacro.h \
+ compilers/pirc/src/pirregalloc.h \
+ compilers/pirc/src/pirsymbol.h \
+ compilers/pirc/src/bcgen.h \
+ $(INC_DIR)/embed.h
+
+compilers/pirc/src/bcgen$(O) : \
+ compilers/pirc/src/pirsymbol.h \
+ compilers/pirc/src/pircompiler.h \
+ compilers/pirc/src/pirregalloc.h \
+ compilers/pirc/src/pircompunit.h \
+ compilers/pirc/src/pirdefines.h \
+ compilers/pirc/src/pirmacro.h \
+ compilers/pirc/src/bcgen.h \
+ $(PARROT_H_HEADERS) \
+ $(INC_DIR)/embed.h \
+ include/pmc/pmc_sub.h \
+ include/pmc/pmc_namespace.h
+
+compilers/pirc/src/pirregalloc$(O) : $(PARROT_H_HEADERS) \
+ compilers/pirc/src/pircompiler.h \
+ compilers/pirc/src/pircompunit.h \
+ compilers/pirc/src/pirdefines.h \
+ compilers/pirc/src/pirmacro.h \
+ compilers/pirc/src/pirregalloc.h \
+ compilers/pirc/src/pirsymbol.h \
+ compilers/pirc/src/bcgen.h \
+ $(INC_DIR)/embed.h
+
+compilers/pirc/heredoc/heredocmain$(O) : $(PARROT_H_HEADERS)
+
+compilers/pirc/macro/macrolexer$(O) : $(PARROT_H_HEADERS) \
+ compilers/pirc/macro/macro.h \
+ compilers/pirc/macro/lexer.h \
+ compilers/pirc/macro/macroparser.h
+
+compilers/pirc/macro/macroparser$(O) : $(PARROT_H_HEADERS) \
+ compilers/pirc/macro/macro.h \
+ compilers/pirc/macro/lexer.h \
+ compilers/pirc/macro/macroparser.h \
+ compilers/pirc/macro/macrolexer.h
+
+compilers/pirc/src/hdocprep$(O) : $(PARROT_H_HEADERS) \
+ $(INC_DIR)/embed.h compilers/pirc/src/pirheredoc.h
+
+compilers/pirc/src/main$(O) : \
+ $(PARROT_H_HEADERS) \
+ $(INC_DIR)/embed.h \
+ compilers/pirc/src/bcgen.h \
+ compilers/pirc/src/pirparser.h \
+ compilers/pirc/src/pircompiler.h \
+ compilers/pirc/src/pircompunit.h \
+ compilers/pirc/src/pirmacro.h \
+ compilers/pirc/src/pirdefines.h \
+ compilers/pirc/src/piremit.h \
+ compilers/pirc/src/piryy.h \
+ compilers/pirc/src/pirlexer.h \
+ compilers/pirc/src/pirheredoc.h \
+ compilers/pirc/src/pirsymbol.h \
+ compilers/pirc/src/pirregalloc.h \
+ compilers/pirc/src/pircapi.h
+
+compilers/pirc/src/pircapi$(O) : \
+ $(PARROT_H_HEADERS) \
+ compilers/pirc/src/bcgen.h \
+ compilers/pirc/src/pircompiler.h \
+ compilers/pirc/src/pirparser.h \
+ compilers/pirc/src/pircompunit.h \
+ compilers/pirc/src/pirsymbol.h \
+ compilers/pirc/src/pirregalloc.h \
+ compilers/pirc/src/pirmacro.h \
+ compilers/pirc/src/pirdefines.h \
+ compilers/pirc/src/piremit.h \
+ compilers/pirc/src/piryy.h \
+ compilers/pirc/src/pirlexer.h \
+ compilers/pirc/src/pircapi.h \
+ $(INC_DIR)/embed.h
+
+compilers/pirc/src/pircompiler$(O) : \
+ compilers/pirc/src/pircompiler.h \
+ $(PARROT_H_HEADERS) \
+ compilers/pirc/src/piryy.h \
+ compilers/pirc/src/pirmacro.h \
+ compilers/pirc/src/pirregalloc.h \
+ compilers/pirc/src/pirerr.h \
+ compilers/pirc/src/bcgen.h \
+ compilers/pirc/src/pircompunit.h \
+ compilers/pirc/src/pirsymbol.h \
+ compilers/pirc/src/pirdefines.h \
+ $(INC_DIR)/embed.h
+
+compilers/pirc/src/pircompunit$(O) : $(PARROT_H_HEADERS) \
+ compilers/pirc/src/pircompunit.h \
+ compilers/pirc/src/pircompiler.h \
+ compilers/pirc/src/pirsymbol.h \
+ compilers/pirc/src/piryy.h \
+ compilers/pirc/src/pirdefines.h \
+ compilers/pirc/src/pirregalloc.h \
+ compilers/pirc/src/pirpcc.h \
+ compilers/pirc/src/pirerr.h \
+ compilers/pirc/src/pirmacro.h \
+ compilers/pirc/src/pirop.h \
+ compilers/pirc/src/bcgen.h \
+ $(INC_DIR)/oplib/ops.h \
+ $(INC_DIR)/dynext.h \
+ $(INC_DIR)/embed.h
+
+compilers/pirc/src/pirlexer$(O) : $(PARROT_H_HEADERS) \
+ compilers/pirc/src/pirparser.h \
+ compilers/pirc/src/pirmacro.h \
+ compilers/pirc/src/pirerr.h \
+ compilers/pirc/src/pircompunit.h \
+ compilers/pirc/src/pircompiler.h \
+ compilers/pirc/src/pirsymbol.h \
+ compilers/pirc/src/piryy.h \
+ compilers/pirc/src/pirdefines.h \
+ compilers/pirc/src/pirregalloc.h \
+ compilers/pirc/src/bcgen.h \
+ $(INC_DIR)/embed.h
+
+compilers/pirc/src/pirmacro$(O) : $(PARROT_H_HEADERS) \
+ compilers/pirc/src/pirmacro.h \
+ compilers/pirc/src/pircompunit.h \
+ compilers/pirc/src/pircompiler.h \
+ compilers/pirc/src/pirsymbol.h \
+ compilers/pirc/src/pirdefines.h \
+ compilers/pirc/src/pirregalloc.h \
+ compilers/pirc/src/bcgen.h \
+ $(INC_DIR)/embed.h
+
+compilers/pirc/src/pirop$(O) : $(PARROT_H_HEADERS) \
+ compilers/pirc/src/pircompiler.h \
+ compilers/pirc/src/pircompunit.h \
+ compilers/pirc/src/pirop.h \
+ compilers/pirc/src/pirerr.h \
+ compilers/pirc/src/pirsymbol.h \
+ compilers/pirc/src/piryy.h \
+ compilers/pirc/src/pirdefines.h \
+ compilers/pirc/src/pirregalloc.h \
+ compilers/pirc/src/pirmacro.h \
+ compilers/pirc/src/bcgen.h \
+ $(INC_DIR)/embed.h
+
+compilers/pirc/src/pirpcc$(O) : $(PARROT_H_HEADERS) \
+ compilers/pirc/src/pirpcc.h \
+ compilers/pirc/src/pircompiler.h \
+ compilers/pirc/src/pirerr.h \
+ compilers/pirc/src/pircompunit.h \
+ compilers/pirc/src/pirsymbol.h \
+ compilers/pirc/src/piryy.h \
+ compilers/pirc/src/pirdefines.h \
+ compilers/pirc/src/pirregalloc.h \
+ compilers/pirc/src/pirmacro.h \
+ compilers/pirc/src/bcgen.h \
+ $(INC_DIR)/oplib/ops.h \
+ $(INC_DIR)/embed.h
+
+compilers/pirc/src/pirsymbol$(O) : $(PARROT_H_HEADERS) \
+ compilers/pirc/src/pircompiler.h \
+ compilers/pirc/src/pirsymbol.h \
+ compilers/pirc/src/piryy.h \
+ compilers/pirc/src/pirerr.h \
+ compilers/pirc/src/pircompunit.h \
+ compilers/pirc/src/pirdefines.h \
+ compilers/pirc/src/pirregalloc.h \
+ compilers/pirc/src/pirmacro.h \
+ compilers/pirc/src/bcgen.h \
+ $(INC_DIR)/embed.h
+
+# the all here is too broad, but the separate pirc.exe is going away soonish.
+pirc$(EXE): $(PIRC_O_FILES) all
+ $(LINK) $(LD_OUT) $@ \
+ $(PIRC_O_FILES) \
+ $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(C_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC)
+#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
+
+compilers/pirc/src/pir.y.flag compilers/pirc/src/pirparser.c compilers/pirc/src/pirparser.h : compilers/pirc/src/pir.y
+ $(YACC) compilers/pirc/src/pir.y -d -o compilers/pirc/src/pirparser.c
+ $(TOUCH) compilers/pirc/src/pir.y.flag compilers/pirc/src/pirparser.c compilers/pirc/src/pirparser.h
+
+compilers/pirc/src/pir.l.flag compilers/pirc/src/pirlexer.c : compilers/pirc/src/pir.l
+ $(LEX) -o compilers/pirc/src/pirlexer.c compilers/pirc/src/pir.l
+ $(TOUCH) compilers/pirc/src/pir.l.flag compilers/pirc/src/pirlexer.c
+
+# XXX This should eventually be combined with the standard parrot test suite.
+pirc-test: all
+ $(PERL) compilers/pirc/t/harness
Modified: branches/pmc_freeze_with_pmcs/compilers/pirc/t/basic.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/pirc/t/basic.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/pirc/t/basic.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -2,7 +2,7 @@
# Copyright (C) 2008-2009, Parrot Foundation.
# $Id$
-use lib "../../lib";
+use lib qw(lib);
use Parrot::Test tests => 6;
pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "a local, a reg and an if-stat");
Modified: branches/pmc_freeze_with_pmcs/compilers/pirc/t/harness
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/pirc/t/harness Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/pirc/t/harness Fri Jan 29 21:05:08 2010 (r43643)
@@ -5,11 +5,11 @@
use strict;
use warnings;
-use lib '../../lib';
+use lib qw(lib);
use Test::Harness;
-my @tests = @ARGV ? @ARGV : <t/*.t>;
+my @tests = @ARGV ? @ARGV : <compilers/pirc/t/*.t>;
eval { require TAP::Harness };
if ($@) {
Modified: branches/pmc_freeze_with_pmcs/compilers/pirc/t/heredoc.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/pirc/t/heredoc.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/pirc/t/heredoc.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -2,7 +2,7 @@
# Copyright (C) 2008-2009, Parrot Foundation.
# $Id$
-use lib "../../lib";
+use lib qw(lib);
use Parrot::Test tests => 1;
pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "a single const declaration");
Modified: branches/pmc_freeze_with_pmcs/compilers/pirc/t/macro.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/pirc/t/macro.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/pirc/t/macro.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -2,7 +2,7 @@
# Copyright (C) 2008-2009, Parrot Foundation.
# $Id$
-use lib "../../lib";
+use lib qw(lib);
use Parrot::Test tests => 1;
pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "a single const declaration");
Modified: branches/pmc_freeze_with_pmcs/compilers/pirc/t/stmts.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/pirc/t/stmts.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/pirc/t/stmts.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -2,7 +2,7 @@
# Copyright (C) 2008-2009, Parrot Foundation.
# $Id$
-use lib "../../lib";
+use lib qw(lib);
use Parrot::Test tests => 5;
pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "a simple sub call - no params");
Modified: branches/pmc_freeze_with_pmcs/compilers/pirc/t/subflags.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/pirc/t/subflags.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/pirc/t/subflags.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -2,7 +2,7 @@
# Copyright (C) 2008-2009, Parrot Foundation.
# $Id$
-use lib "../../lib";
+use lib qw(lib);
use Parrot::Test tests => 1;
pirc_2_pasm_is(<<'CODE', <<'OUTPUT', "a single const declaration");
Copied: branches/pmc_freeze_with_pmcs/compilers/tge/Defines.mak (from r43642, trunk/compilers/tge/Defines.mak)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/pmc_freeze_with_pmcs/compilers/tge/Defines.mak Fri Jan 29 21:05:08 2010 (r43643, copy of r43642, trunk/compilers/tge/Defines.mak)
@@ -0,0 +1,2 @@
+TGE_LIB_PBCS = $(LIBRARY_DIR)/TGE.pbc compilers/tge/tgc.pbc
+TGE_CLEANUPS = $(TGE_LIB_PBCS) compilers/tge/TGE/Parser.pir
Copied: branches/pmc_freeze_with_pmcs/compilers/tge/Rules.mak (from r43642, trunk/compilers/tge/Rules.mak)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/pmc_freeze_with_pmcs/compilers/tge/Rules.mak Fri Jan 29 21:05:08 2010 (r43643, copy of r43642, trunk/compilers/tge/Rules.mak)
@@ -0,0 +1,18 @@
+$(LIBRARY_DIR)/TGE.pbc: \
+ $(LIBRARY_DIR)/PGE.pbc \
+ $(LIBRARY_DIR)/PGE/Util.pbc \
+ $(LIBRARY_DIR)/P6object.pbc \
+ compilers/tge/TGE.pir \
+ compilers/tge/TGE/Rule.pir \
+ compilers/tge/TGE/Parser.pir \
+ compilers/tge/TGE/Grammar.pir \
+ compilers/tge/TGE/Compiler.pir \
+ compilers/tge/TGE/Tree.pir
+ $(PARROT) -o $@ compilers/tge/TGE.pir
+
+compilers/tge/tgc.pbc : $(LIBRARY_DIR)/TGE.pbc $(LIBRARY_DIR)/Getopt/Obj.pbc
+
+compilers/tge/TGE/Parser.pir: $(PARROT) \
+ compilers/tge/TGE/Parser.pg \
+ $(LIBRARY_DIR)/PGE/Perl6Grammar.pbc
+ $(PARROT) $(LIBRARY_DIR)/PGE/Perl6Grammar.pbc --output=$@ compilers/tge/TGE/Parser.pg
Modified: branches/pmc_freeze_with_pmcs/compilers/tge/TGE.pir
==============================================================================
--- branches/pmc_freeze_with_pmcs/compilers/tge/TGE.pir Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/compilers/tge/TGE.pir Fri Jan 29 21:05:08 2010 (r43643)
@@ -16,7 +16,7 @@
# and elsewhere...
.sub _main :main
- load_bytecode 'TGE.pir'
+ load_bytecode 'TGE.pbc'
# Compile a grammar from the source grammar file
.local pmc compiler
Modified: branches/pmc_freeze_with_pmcs/config/auto/cgoto.pm
==============================================================================
--- branches/pmc_freeze_with_pmcs/config/auto/cgoto.pm Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/config/auto/cgoto.pm Fri Jan 29 21:05:08 2010 (r43643)
@@ -62,25 +62,25 @@
TEMP_cg_c => <<'EOF',
# generated by config/auto/cgoto.pm
-$(OPS_DIR)/core_ops_cg$(O): $(GENERAL_H_FILES) $(OPS_DIR)/core_ops_cg.c \
- $(PMC_INC_DIR)/pmc/pmc_parrotlibrary.h
-$(OPS_DIR)/core_ops_cgp$(O): $(GENERAL_H_FILES) $(OPS_DIR)/core_ops_cgp.c \
- $(PMC_INC_DIR)/pmc/pmc_parrotlibrary.h
-$(SRC_DIR)/runcore/cores.c: $(INC_DIR)/oplib/core_ops_cgp.h
+src/ops/core_ops_cg$(O): $(GENERAL_H_FILES) src/ops/core_ops_cg.c \
+ include/pmc/pmc_parrotlibrary.h
+src/ops/core_ops_cgp$(O): $(GENERAL_H_FILES) src/ops/core_ops_cgp.c \
+ include/pmc/pmc_parrotlibrary.h
+src/runcore/cores.c: $(INC_DIR)/oplib/core_ops_cgp.h
-$(INC_DIR)/oplib/core_ops_cg.h: $(OPS_DIR)/core_ops_cg.c
+$(INC_DIR)/oplib/core_ops_cg.h: src/ops/core_ops_cg.c
-$(OPS_DIR)/core_ops_cg.c : $(OPS_FILES) $(BUILD_TOOLS_DIR)/ops2c.pl lib/Parrot/OpsFile.pm lib/Parrot/Op.pm lib/Parrot/OpTrans/CGoto.pm lib/Parrot/OpLib/core.pm
+src/ops/core_ops_cg.c : $(OPS_FILES) $(BUILD_TOOLS_DIR)/ops2c.pl lib/Parrot/OpsFile.pm lib/Parrot/Op.pm lib/Parrot/OpTrans/CGoto.pm lib/Parrot/OpLib/core.pm
$(PERL) $(BUILD_TOOLS_DIR)/ops2c.pl CGoto --core
-$(INC_DIR)/oplib/core_ops_cgp.h: $(OPS_DIR)/core_ops_cgp.c
+$(INC_DIR)/oplib/core_ops_cgp.h: src/ops/core_ops_cgp.c
-$(OPS_DIR)/core_ops_cgp.c : $(OPS_FILES) $(BUILD_TOOLS_DIR)/ops2c.pl lib/Parrot/OpsFile.pm lib/Parrot/Op.pm lib/Parrot/OpTrans/CGP.pm lib/Parrot/OpLib/core.pm lib/Parrot/OpTrans/CPrederef.pm
+src/ops/core_ops_cgp.c : $(OPS_FILES) $(BUILD_TOOLS_DIR)/ops2c.pl lib/Parrot/OpsFile.pm lib/Parrot/Op.pm lib/Parrot/OpTrans/CGP.pm lib/Parrot/OpLib/core.pm lib/Parrot/OpTrans/CPrederef.pm
$(PERL) $(BUILD_TOOLS_DIR)/ops2c.pl CGP --core
EOF
- TEMP_cg_o => '$(OPS_DIR)/core_ops_cg$(O) $(OPS_DIR)/core_ops_cgp$(O)',
- TEMP_cg_r => '$(RM_F) $(INC_DIR)/oplib/core_ops_cg.h $(OPS_DIR)/core_ops_cg.c \
- $(INC_DIR)/oplib/core_ops_cgp.h $(OPS_DIR)/core_ops_cgp.c',
+ TEMP_cg_o => 'src/ops/core_ops_cg$(O) src/ops/core_ops_cgp$(O)',
+ TEMP_cg_r => '$(RM_F) $(INC_DIR)/oplib/core_ops_cg.h src/ops/core_ops_cg.c \
+ $(INC_DIR)/oplib/core_ops_cgp.h src/ops/core_ops_cgp.c',
cg_flag => '-DHAVE_COMPUTED_GOTO'
);
print " (yes) " if $verbose;
Modified: branches/pmc_freeze_with_pmcs/config/auto/gc.pm
==============================================================================
--- branches/pmc_freeze_with_pmcs/config/auto/gc.pm Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/config/auto/gc.pm Fri Jan 29 21:05:08 2010 (r43643)
@@ -45,9 +45,9 @@
$conf->data->set(
TEMP_gc_c => <<"EOF",
-\$(SRC_DIR)/gc/alloc_resources\$(O): \$(GENERAL_H_FILES) \$(SRC_DIR)/gc/alloc_resources.c
+src/gc/alloc_resources\$(O): \$(GENERAL_H_FILES) src/gc/alloc_resources.c
EOF
- TEMP_gc_o => "\$(SRC_DIR)/gc/alloc_resources\$(O)",
+ TEMP_gc_o => "src/gc/alloc_resources\$(O)",
gc_flag => '',
);
print(" ($gc) ") if $conf->options->get('verbose');
Modified: branches/pmc_freeze_with_pmcs/config/auto/pmc.pm
==============================================================================
--- branches/pmc_freeze_with_pmcs/config/auto/pmc.pm Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/config/auto/pmc.pm Fri Jan 29 21:05:08 2010 (r43643)
@@ -98,7 +98,7 @@
src/pmc/$pmc.dump : vtable.dump $parent_dumps src/pmc/$pmc.pmc \$(PMC2C_FILES) $pccmethod_depend
\t\$(PMC2CD) src/pmc/$pmc.pmc
-\$(PMC_INC_DIR)/pmc/pmc_$pmc.h: src/pmc/$pmc.c
+include/pmc/pmc_$pmc.h: src/pmc/$pmc.c
src/pmc/$pmc\$(O): include/pmc/pmc_${pmc}.h src/pmc/$pmc.str \$(NONGEN_HEADERS) \\
$parent_headers $include_headers include/pmc/pmc_continuation.h \\
@@ -173,7 +173,6 @@
TEMP_pmc_classes_o => $TEMP_pmc_classes_o,
TEMP_pmc_classes_str => $TEMP_pmc_classes_str,
TEMP_pmc_classes_pmc => $TEMP_pmc_classes_pmc,
- pmc_inc => 'include',
);
return 1;
Modified: branches/pmc_freeze_with_pmcs/config/gen/makefiles.pm
==============================================================================
--- branches/pmc_freeze_with_pmcs/config/gen/makefiles.pm Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/config/gen/makefiles.pm Fri Jan 29 21:05:08 2010 (r43643)
@@ -36,24 +36,8 @@
conditioned_lines => 1,
},
- 'ext/nqp-rx/Makefile' => { SOURCE => 'config/gen/makefiles/nqp-rx.in' },
-
'compilers/ncigen/Makefile' =>
{ SOURCE => 'compilers/ncigen/config/makefiles/ncigen.in' },
- 'compilers/nqp/Makefile' =>
- { SOURCE => 'config/gen/makefiles/nqp.in' },
- 'compilers/pct/Makefile' =>
- { SOURCE => 'config/gen/makefiles/pct.in' },
- 'compilers/pge/Makefile' =>
- { SOURCE => 'config/gen/makefiles/pge.in' },
- 'compilers/tge/Makefile' =>
- { SOURCE => 'config/gen/makefiles/tge.in' },
- 'compilers/json/Makefile' =>
- { SOURCE => 'config/gen/makefiles/json.in' },
- 'compilers/data_json/Makefile' =>
- { SOURCE => 'config/gen/makefiles/data_json.in' },
- 'compilers/pirc/Makefile' =>
- { SOURCE => 'config/gen/makefiles/pirc.in' },
'src/dynpmc/Makefile' =>
{ SOURCE => 'config/gen/makefiles/dynpmc.in' },
'src/dynoplibs/Makefile' =>
@@ -61,16 +45,6 @@
'editor/Makefile' =>
{ SOURCE => 'config/gen/makefiles/editor.in' },
- 'tools/build/dynpmc.pl' => {
- SOURCE => 'config/gen/makefiles/dynpmc_pl.in',
- replace_slashes => 0,
- conditioned_lines => 1,
- },
- 'tools/build/dynoplibs.pl' => {
- SOURCE => 'config/gen/makefiles/dynoplibs_pl.in',
- replace_slashes => 0,
- conditioned_lines => 1,
- },
'parrot.pc' => { SOURCE => 'config/gen/makefiles/parrot_pc.in' },
'docs/Makefile' => { SOURCE => 'config/gen/makefiles/docs.in' },
};
Deleted: branches/pmc_freeze_with_pmcs/config/gen/makefiles/data_json.in
==============================================================================
--- branches/pmc_freeze_with_pmcs/config/gen/makefiles/data_json.in Fri Jan 29 21:05:08 2010 (r43642)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,60 +0,0 @@
-# Copyright (C) 2006-2009, Parrot Foundation.
-# $Id$
-
-PERL := @perl@
-RM_F := @rm_f@
-PARROT := ../../parrot at exe@
-
-TOOL_DIR := ../..
-PGE_DIR := ../../compilers/pge
-TGE_DIR := ../../compilers/tge
-
-# the default target
-all: data_json.pbc
-
-# This is a listing of all targets, that are meant to be called by users
-help:
- @echo ""
- @echo "Following targets are available for the user:"
- @echo ""
- @echo " all: data_json.pbc"
- @echo " This is the default."
- @echo "Testing:"
- @echo " test: Run the test suite."
- @echo " testclean: Clean up test results and temporary files."
- @echo ""
- @echo "Cleaning:"
- @echo " clean: Basic cleaning up."
- @echo ""
- @echo "Misc:"
- @echo " help: Print this help message."
- @echo ""
-
-test: all
- cd $(TOOL_DIR) && prove -r t/compilers/json
-
-testclean:
- $(RM_F) "../../t/compilers/json/*.pir"
-
-data_json.pbc : data_json/grammar.pbc data_json/pge2pir.pbc data_json.pir
- $(PARROT) --output=data_json.pbc data_json.pir
-
-data_json/grammar.pbc : data_json/grammar.pir
- $(PARROT) --output=data_json/grammar.pbc data_json/grammar.pir
-
-data_json/grammar.pir : data_json/grammar.pg
- $(PARROT) $(TOOL_DIR)/runtime/parrot/library/PGE/Perl6Grammar.pbc --output=data_json/grammar.pir data_json/grammar.pg
-
-data_json/pge2pir.pbc : data_json/pge2pir.pir
- $(PARROT) --output=data_json/pge2pir.pbc data_json/pge2pir.pir
-
-data_json/pge2pir.pir : data_json/pge2pir.tg
- $(PARROT) $(TGE_DIR)/tgc.pir --output=data_json/pge2pir.pir data_json/pge2pir.tg
-
-clean : testclean
- $(RM_F) "data_json/*.pbc" "data_json/*.pir" data_json.pbc
-
-# Local variables:
-# mode: makefile
-# End:
-# vim: ft=make:
Modified: branches/pmc_freeze_with_pmcs/config/gen/makefiles/docs.in
==============================================================================
--- branches/pmc_freeze_with_pmcs/config/gen/makefiles/docs.in Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/config/gen/makefiles/docs.in Fri Jan 29 21:05:08 2010 (r43643)
@@ -2,17 +2,17 @@
# $Id$
# Setup of some commands
-PERL := @perl@
-CHMOD := @chmod@
-MKPATH := @mkpath@
-TOUCH := @touch@
-RM_F := @rm_f@
-RM_RF := @rm_rf@
-PERLDOC := @perldoc@
-VERSION := @VERSION@@DEVEL@
+PERL = @perl@
+CHMOD = @chmod@
+MKPATH = @mkpath@
+TOUCH = @touch@
+RM_F = @rm_f@
+RM_RF = @rm_rf@
+PERLDOC = @perldoc@
+VERSION = @VERSION@@DEVEL@
# long list of .pod files
-POD := @TEMP_pod@
+POD = @TEMP_pod@
#
# Targets
Modified: branches/pmc_freeze_with_pmcs/config/gen/makefiles/dynoplibs.in
==============================================================================
--- branches/pmc_freeze_with_pmcs/config/gen/makefiles/dynoplibs.in Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/config/gen/makefiles/dynoplibs.in Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,28 +1,28 @@
# Copyright (C) 2003-2009, Parrot Foundation.
# $Id$
-PERL := @perl@
-RM_F := @rm_f@
-CP := @cp@
-CHMOD := @chmod@
-LOAD_EXT := @load_ext@
-BUILD_DIR := @build_dir@
-RECONFIGURE := $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
-INSTALL_DIR := $(BUILD_DIR)/runtime/parrot/dynext
-O := @o@
-CC := @cc@
-LD := @ld@
-LDFLAGS := @ldflags@ @ld_debug@ @rpath_blib@ @linkflags@
-LD_LOAD_FLAGS := @ld_load_flags@
-CFLAGS := @ccflags@ @cc_shared@ @cc_debug@ @ccwarn@ @cc_hasjit@ @cg_flag@ @gc_flag@
-LIBPARROT := @libparrot_ldflags@
-
-BUILD_TOOLS_DIR := $(BUILD_DIR)@slash at tools@slash at build
-OPS2C := $(PERL) -I$(BUILD_DIR)@slash at lib $(BUILD_TOOLS_DIR)@slash at ops2c.pl
-INCLUDES := -I$(BUILD_DIR)@slash at include -I at build_dir@@slash at src@slash at pmc
-LINKARGS := $(LDFLAGS) $(LD_LOAD_FLAGS) $(LIBPARROT) @icu_shared@ @libs@
+PERL = @perl@
+RM_F = @rm_f@
+CP = @cp@
+CHMOD = @chmod@
+LOAD_EXT = @load_ext@
+BUILD_DIR = @build_dir@
+RECONFIGURE = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
+INSTALL_DIR = $(BUILD_DIR)/runtime/parrot/dynext
+O = @o@
+CC = @cc@
+LD = @ld@
+LDFLAGS = @ldflags@ @ld_debug@ @rpath_blib@ @linkflags@
+LD_LOAD_FLAGS = @ld_load_flags@
+CFLAGS = @ccflags@ @cc_shared@ @cc_debug@ @ccwarn@ @cc_hasjit@ @cg_flag@ @gc_flag@
+LIBPARROT = @libparrot_ldflags@
+
+BUILD_TOOLS_DIR = $(BUILD_DIR)@slash at tools@slash at build
+OPS2C = $(PERL) -I$(BUILD_DIR)@slash at lib $(BUILD_TOOLS_DIR)@slash at ops2c.pl
+INCLUDES = -I$(BUILD_DIR)@slash at include -I at build_dir@@slash at src@slash at pmc
+LINKARGS = $(LDFLAGS) $(LD_LOAD_FLAGS) $(LIBPARROT) @icu_shared@ @libs@
-OPS_TARGETS := \
+OPS_TARGETS = \
#IF(cg_flag): obscure_ops_cg$(LOAD_EXT) \
#IF(cg_flag): obscure_ops_cgp$(LOAD_EXT) \
obscure_ops$(LOAD_EXT) \
@@ -32,7 +32,7 @@
math_ops$(LOAD_EXT) \
math_ops_switch$(LOAD_EXT)
-CLEANUPS := \
+CLEANUPS = \
"*.c" \
"*.h" \
#IF(o): "*@o@" \
Deleted: branches/pmc_freeze_with_pmcs/config/gen/makefiles/dynoplibs_pl.in
==============================================================================
--- branches/pmc_freeze_with_pmcs/config/gen/makefiles/dynoplibs_pl.in Fri Jan 29 21:05:08 2010 (r43642)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,216 +0,0 @@
-# Copyright (C) 2001-2007, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-tools/build/dynoplibs.pl - Build script for dynamic op libraries
-
-=head1 DESCRIPTION
-
-This file is generated by F<config/gen/makefiles.pm> from
-F<config/gen/makefiles/dynopslibs_pl.in>. This script is used for building
-dynamic op libraries.
-
-=cut
-
-use strict;
-use warnings;
-
-use File::Copy qw(copy);
-
-# qq[] isn't guaranteed to work, but it's safer than "" as some platforms
-# (eg FreeBSD) have ""s embedded in their substution values. q[] is used in
-# some places as Win32 paths have \'s in, which qq[] treats as escape sequences.
-# Config stuff
-our $CC = q[@cc@ -c];
-our $LD = q[@ld@];
-our $LDFLAGS = q[@ldflags@ @ld_debug@ @rpath_blib@ @linkflags@];
-our $LD_LOAD_FLAGS = q[@ld_load_flags@];
-our $PERL = q[@perl@];
-our $LOAD_EXT = q[@load_ext@];
-our $O = q[@o@];
-our $CFLAGS = q[@ccflags@ @cc_shared@ @cc_debug@ @ccwarn@ @cc_hasjit@ @cg_flag@ @gc_flag@];
-
-our $LIBPARROT = q[];
-#IF(parrot_is_shared):$LIBPARROT = q[@libparrot_ldflags@];
-
-# Here comes some stuff for Win32.
-our $PATHQUOTE = $^O eq 'MSWin32' ? q["] : q[];
-
-# OPS2C Config
-our $OPS2C = "$PERL -I $PATHQUOTE" .
- q[@build_dir@@slash at lib] .
- "$PATHQUOTE $PATHQUOTE" .
- q[@build_dir@@slash at tools@slash at build@slash at ops2c.pl] .
- $PATHQUOTE;
-our %cores = (
- C => q[],
-#IF(cg_flag): CGP => '_cgp',
-#IF(cg_flag): CGoto => '_cg',
- CSwitch => '_switch'
-);
-
-# Actual commands
-sub compile_cmd {
- my ($target, $source) = @_;
-
- return
- "$CC " .
- "@cc_o_out@" . $target . " " .
- "-I" . $PATHQUOTE . '@build_dir@@slash at include' . $PATHQUOTE . " " .
- "-I" . $PATHQUOTE . '@build_dir@@slash at src@slash at pmc' . $PATHQUOTE . " " .
- "$CFLAGS " .
- $source;
-};
-
-sub partial_link_cmd {
- my ($target, $libs, $sources) = @_;
-
- my $liblist;
- if ($^O =~ /mswin32/i) {
- # Need to put various libraries in the link line.
- $liblist = join( ' ', map { "$_.lib" } keys %$libs );
- my $extraLibs = '@libs@ @icu_shared@';
- $extraLibs =~ s/blib/..\\blib/g;
- $extraLibs =~ s/\Q$(A)\E/.lib/g;
- $liblist .= ' ' . $extraLibs;
- }
- else {
- $liblist = join( ' ', map { "-l$_" } keys %$libs );
- }
-
- return
- "$LD ".
- "@ld_out@" . $target . " " .
- join(" ", map {"$PATHQUOTE$_$PATHQUOTE"} @$sources) .
- " $liblist $LDFLAGS $LD_LOAD_FLAGS $LIBPARROT";
-}
-
-our $NOW = time();
-
-################### MAIN PROGRAM ################
-
-my ($mode, @oplibs) = @ARGV;
-
-if ($mode eq 'generate') {
- # Convert X.ops -> ops_X.c, ops_X_cgp.c, ops_X_cg.c and ops_X_switch.c
- my $core;
- generate_c($_) foreach (@oplibs);
-}
-elsif ($mode eq 'compile') {
- # Convert X.c -> X.o for all X.c
- my $core_suffix;
- foreach $core_suffix (values %cores) {
- compile($_ . "_ops$core_suffix") foreach (@oplibs);
- }
-}
-elsif ($mode eq 'linklibs') {
- my @objs = grep { /$O$/} @oplibs;
- @oplibs = grep {!/$O$/} @oplibs;
-
- # Convert X.o -> X.so
- my $core_suffix;
- foreach $core_suffix (values %cores) {
- partial_link({}, $_ . "_ops$core_suffix", @objs) foreach (@oplibs);
- }
-}
-elsif ($mode eq 'copy') {
- # Copy *.so -> destination, where destination is the first
- # argument, given as --destination=DIRECTORY
- shift(@oplibs) =~ /--destination=(.*)/
- or die "copy command requires destination";
- my $dest = $1;
-
- my $core_suffix;
- foreach $core_suffix (values %cores) {
- foreach (@oplibs) {
- my $src = $_ . "_ops$core_suffix$LOAD_EXT";
- copy($src, $dest)
- or die "Copy $src failed ($?)\n";
-
- # Execute permissions on libraries is especially important on
- # some platforms
- if ($^O eq 'hpux' or $^O eq 'cygwin') {
- chmod 0755, "$dest at slash@$src";
- }
- }
- }
-}
-else {
- die "invalid command '$mode'\nmust be one of generate, compile, linklibs, or copy\n";
-}
-
-sub run {
- print join(" ", @_), "\n";
-
- return system(@_) == 0;
-}
-
-sub modtime {
- my $ago = (-M shift);
-
- if (defined $ago) {
- return $NOW - $ago;
- }
- else {
- return;
- }
-}
-
-sub needs_build {
- my ($target, @sources) = @_;
-
- my $target_mod = modtime($target)
- or return 1;
- for my $source (@sources) {
- return 1 if modtime($source) > $target_mod;
- }
-
- return 0;
-}
-
-sub generate_c {
- my ($oplib) = @_;
-
- foreach (keys %cores) {
- if (needs_build($oplib . "_ops$cores{$_}.c", "$oplib.ops")) {
- run("$OPS2C $_ --dynamic $oplib.ops")
- or die "ops2c code generation failed ($?)\n";
- }
- }
-
- return;
-}
-
-sub compile {
- my ($src_stem, $dest_stem) = @_;
-
- $dest_stem ||= $src_stem;
- if (needs_build("$dest_stem$O", "$src_stem.c")) {
- return run(compile_cmd("$dest_stem$O", "$src_stem.c"))
- or die "compile $src_stem.c failed ($?)\n";
- }
- else {
- return 1;
- }
-}
-
-sub partial_link {
- my ($libs, $stem, @objs) = @_;
-
- if (needs_build("$stem$LOAD_EXT", "$stem$O", @objs)) {
- return run(partial_link_cmd("$stem$LOAD_EXT", $libs, [ "$stem$O", @objs ]))
- or die "partial link $stem$LOAD_EXT failed ($?)\n";
- }
- else {
- return 1;
- }
-}
-
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Modified: branches/pmc_freeze_with_pmcs/config/gen/makefiles/dynpmc.in
==============================================================================
--- branches/pmc_freeze_with_pmcs/config/gen/makefiles/dynpmc.in Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/config/gen/makefiles/dynpmc.in Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,33 +1,33 @@
# Copyright (C) 2003-2009, Parrot Foundation.
# $Id$
-PERL := @perl@
-RM_F := @rm_f@
-CP := @cp@
-CHMOD := @chmod@
-LOAD_EXT := @load_ext@
-BUILD_DIR := @build_dir@
-RECONFIGURE := $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
-INSTALL_DIR := $(BUILD_DIR)@slash at runtime@slash at parrot@slash at dynext
-O := @o@
-CC := @cc@
-LD := @ld@
-LDFLAGS := @ldflags@ @ld_debug@ @rpath_blib@
-LD_LOAD_FLAGS := @ld_load_flags@
-CFLAGS := @ccflags@ @cc_shared@ @cc_debug@ @ccwarn@ @cc_hasjit@ @cg_flag@ @gc_flag@
-LIBPARROT := @libparrot_ldflags@
-
-BUILD_TOOLS_DIR := $(BUILD_DIR)@slash at tools@slash at build
-BUILD_LIB_DIR := $(BUILD_DIR)@slash at blib@slash at lib
-PMC2C := $(PERL) $(BUILD_TOOLS_DIR)@slash at pmc2c.pl
-INCLUDES := -I$(BUILD_DIR)@slash at include -I at build_dir@@slash at include@slash at pmc
-LINKARGS := $(LDFLAGS) $(LD_LOAD_FLAGS) $(LIBPARROT) @icu_shared@ @libs@
+PERL = @perl@
+RM_F = @rm_f@
+CP = @cp@
+CHMOD = @chmod@
+LOAD_EXT = @load_ext@
+BUILD_DIR = @build_dir@
+RECONFIGURE = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
+INSTALL_DIR = $(BUILD_DIR)@slash at runtime@slash at parrot@slash at dynext
+O = @o@
+CC = @cc@
+LD = @ld@
+LDFLAGS = @ldflags@ @ld_debug@ @rpath_blib@
+LD_LOAD_FLAGS = @ld_load_flags@
+CFLAGS = @ccflags@ @cc_shared@ @cc_debug@ @ccwarn@ @cc_hasjit@ @cg_flag@ @gc_flag@
+LIBPARROT = @libparrot_ldflags@
+
+BUILD_TOOLS_DIR = $(BUILD_DIR)@slash at tools@slash at build
+BUILD_LIB_DIR = $(BUILD_DIR)@slash at blib@slash at lib
+PMC2C = $(PERL) $(BUILD_TOOLS_DIR)@slash at pmc2c.pl
+INCLUDES = -I$(BUILD_DIR)@slash at include -I at build_dir@@slash at include@slash at pmc
+LINKARGS = $(LDFLAGS) $(LD_LOAD_FLAGS) $(LIBPARROT) @icu_shared@ @libs@
-PMC2CD := $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl --dump
-PMC2CC := $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl --c
+PMC2CD = $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl --dump
+PMC2CC = $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl --c
# add your dynamic pmcs here
-PMC_TARGETS := \
+PMC_TARGETS = \
dynlexpad$(LOAD_EXT) \
foo_group$(LOAD_EXT) \
rotest$(LOAD_EXT) \
@@ -36,7 +36,7 @@
#IF(has_crypto): digest_group$(LOAD_EXT) \
subproxy$(LOAD_EXT)
-PMCS_DIGEST := \
+PMCS_DIGEST = \
md2.pmc \
md4.pmc \
md5.pmc \
@@ -46,7 +46,7 @@
sha256.pmc \
sha512.pmc
-OBJS_DIGEST := \
+OBJS_DIGEST = \
md2$(O) \
md4$(O) \
md5$(O) \
@@ -56,23 +56,23 @@
sha256$(O) \
sha512$(O)
-PMCS_FOO := \
+PMCS_FOO = \
foo.pmc \
foo2.pmc
-OBJS_FOO := \
+OBJS_FOO = \
foo$(O) \
foo2$(O)
-#IF(win32 and cc==gcc):LIB_GDBM := -llibgdbm
-#ELSIF(win32):LIB_GDBM := libgdbm.lib
-#ELSE:LIB_GDBM := -lgdbm
-
-#IF(win32 and cc==gcc):LIB_CRYPTO := -lcrypto
-#ELSIF(win32):LIB_CRYPTO := libcrypto.lib
-#ELSE:LIB_CRYPTO := -lcrypto
+#IF(win32 and cc==gcc):LIB_GDBM = -llibgdbm
+#ELSIF(win32):LIB_GDBM = libgdbm.lib
+#ELSE:LIB_GDBM = -lgdbm
+
+#IF(win32 and cc==gcc):LIB_CRYPTO = -lcrypto
+#ELSIF(win32):LIB_CRYPTO = libcrypto.lib
+#ELSE:LIB_CRYPTO = -lcrypto
-CLEANUPS := \
+CLEANUPS = \
"*.c" \
"pmc_*.h" \
"*_group.h" \
Deleted: branches/pmc_freeze_with_pmcs/config/gen/makefiles/dynpmc_pl.in
==============================================================================
--- branches/pmc_freeze_with_pmcs/config/gen/makefiles/dynpmc_pl.in Fri Jan 29 21:05:08 2010 (r43642)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,298 +0,0 @@
-# Copyright (C) 2001-2009, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-tools/build/dynpmc.pl - Build script for dynamic PMCs
-
-=head1 DESCRIPTION
-
-This file is generated by F<config/gen/makefiles.pl> from
-F<config/gen/makefiles/dynpmc_pl.in>. This script is used for building
-dynamic PMCs.
-
-=cut
-
-use strict;
-use warnings;
-use FindBin;
-use lib "$FindBin::Bin/../..";
-use lib "$FindBin::Bin/../../lib";
-
-use File::Copy qw(copy);
-use Storable;
-
-# Config stuff
-# q[] isn't guaranteed to work, but it's safer than "" as some platforms
-# (eg FreeBSD) have ""s embedded in their substitution values. q[] is used
-# as Win32 paths have \'s in, which qq treats as escape sequences.
-our $CC = q[@cc@ -c];
-our $LD = q[@ld@];
-our $LDFLAGS = q[@ldflags@ @ld_debug@ @rpath_blib@];
-our $LD_LOAD_FLAGS = q[@ld_load_flags@];
-our $PERL = q[@perl@];
-our $LOAD_EXT = q[@load_ext@];
-our $O = q[@o@];
-our $CFLAGS = q[@ccflags@ @cc_shared@ @cc_debug@ @ccwarn@ @cc_hasjit@ @cg_flag@ @gc_flag@];
-
-our $LIBPARROT = q[];
-#IF(parrot_is_shared):$LIBPARROT = q[@libparrot_ldflags@];
-
-# Here comes some stuff for Win32.
-our $PATHQUOTE = $^O eq 'MSWin32' ? q["] : q[];
-
-# PMC2C Config
-our $PMC2C = "$PERL $PATHQUOTE" . q[@build_dir@@slash at tools@slash at build@slash at pmc2c.pl] . $PATHQUOTE;
-
-# Actual commands
-sub compile_cmd {
- my ($target, $source) = @_;
-
- my $dynpmc_include = '';
- if (defined $ENV{DYNPMC_INCLUDE} )
- {
- $dynpmc_include = $ENV{DYNPMC_INCLUDE};
- $dynpmc_include =~ s/,/$PATHQUOTE -I$PATHQUOTE/g;
- $dynpmc_include = "-I" . $PATHQUOTE . $dynpmc_include . $PATHQUOTE . " ";
- }
-
- return
- "$CC " .
- '@cc_o_out@' . $target . " " .
- "-I" . $PATHQUOTE . '@build_dir@@slash at include' . $PATHQUOTE . " " .
- "-I" . $PATHQUOTE . '@build_dir@@slash at src@slash at pmc' . $PATHQUOTE . " " .
- $dynpmc_include . " " .
- "$CFLAGS " .
- $source;
-};
-
-sub partial_link_cmd {
- my ($target, $libs, $sources) = @_;
-
- my $liblist;
- if ($^O =~ /mswin32/i) {
- # Need to put various libraries in the link line.
- if ($CC =~ /gcc/i) {
- $liblist = join( ' ', map { "-l$_" } keys %$libs );
- $liblist =~ s/-lgdbm/-llibgdbm/i;
- }
- else {
- $liblist = join( ' ', map { "$_.lib" } keys %$libs );
- }
- my $extraLibs = '@libs@ @icu_shared@';
- $extraLibs =~ s/blib/..\\blib/g;
- $extraLibs =~ s/\Q$(A)\E/.lib/g;
- $liblist .= ' ' . $extraLibs;
-
- # Also note that we may need to look in the Parrot blib directory.
- if ($CC =~ /gcc/i) {
- $liblist .= qq{ -Wl,-L "@build_dir@/blib/lib"};
- }
- else {
- $liblist .= qq{ /LIBPATH:"@build_dir@/blib/lib"};
- }
- }
- else {
- $liblist = join( ' ', map { "-l$_" } keys %$libs );
- my $extraLibs = '@libs@ @icu_shared@';
- $liblist .= ' ' . $extraLibs;
- }
-
- if (defined $ENV{DYNPMC_LINK}) {
- push @{$sources}, split /,/, $ENV{DYNPMC_LINK};
- }
-
- return
- "$LD ".
- '@ld_out@' . $target . " " .
- join(" ", map {"$PATHQUOTE$_$PATHQUOTE"} @$sources) .
- " $liblist $LDFLAGS $LD_LOAD_FLAGS $LIBPARROT";
-}
-
-our $NOW = time();
-
-################### MAIN PROGRAM ################
-
-my ($mode, @pmcs) = @ARGV;
-
-if ($mode eq 'generate') {
- # Convert X.pmc -> X.dump and X.c and also create any lib-GROUP.c files
-
- generate_dump($_) foreach (@pmcs);
- generate_c($_) foreach (@pmcs);
-
- my ($group_files, $group_libs, $pmc_group, $pmc_libs) =
- gather_groups_and_libs(@pmcs);
-
- while (my ($group, $pmcs) = each %$group_files) {
- my @pmcfiles = map { "$_.pmc" } @$pmcs;
- if (needs_build("$group.c", @pmcfiles)) {
- run("$PMC2C --library $group --c " . join(" ", at pmcfiles))
- or die "pmc2c library creation failed ($?)\n";
- }
- }
-}
-elsif ($mode eq 'compile') {
- my ($group_files, $group_libs, $pmc_group, $pmc_libs) =
- gather_groups_and_libs(@pmcs);
-
- # Convert X.c -> X.o for all X.c
- compile($_) foreach (@pmcs);
-
- # lib-GROUP.c
- for my $group (keys %$group_files) {
- compile("$group", "lib-$group")
- or die "compile $group.c failed ($?)\n";
- }
-}
-elsif ($mode eq 'linklibs') {
- my ($group_files, $group_libs, $pmc_group, $pmc_libs) =
- gather_groups_and_libs(@pmcs);
-
- # Convert lib-GROUP.so + A.so + B.so ... -> GROUP.so
- while (my ($group, $pmcs) = each %$group_files) {
- partial_link($group, $group_libs->{$group}, [ "lib-$group", @$pmcs ] )
- or die "partial link of $group failed ($?)\n";
- }
-
- # Link non-grouped PMCs individually
- my @ungrouped_pmcs = grep { ! exists $pmc_group->{$_} } @pmcs;
- partial_link($_, $pmc_libs->{$_}, [ $_ ] ) foreach (@ungrouped_pmcs);
-}
-elsif ($mode eq 'copy') {
- # Copy *.so -> destination, where destination is the first
- # argument, given as --destination=DIRECTORY
- shift(@pmcs) =~ /--destination=(.*)/
- or die "copy command requires destination";
- my $dest = $1;
-
- my ($group_files, $group_libs, $pmc_group, $pmc_libs) =
- gather_groups_and_libs(@pmcs);
- my @ungrouped_pmcs = grep { ! exists $pmc_group->{$_} } @pmcs;
-
- my (@list_to_process) = (@ungrouped_pmcs, keys %$group_files);
-
- die "nothing found to copy" unless @list_to_process;
-
- foreach (@list_to_process) {
- copy("$_$LOAD_EXT", $dest) or die "Copy $_$LOAD_EXT failed ($?)\n";
-
- # Execute permissions on libraries is especially important on
- # some platforms
- if ($^O eq 'hpux' or $^O eq 'cygwin') {
- chmod 0755, "$dest at slash@$_$LOAD_EXT";
- }
-
- }
-}
-else {
- die "invalid command '$mode'\nmust be one of generate, compile, linklibs, or copy\n";
-}
-
-sub run {
- print join(" ", @_), "\n";
-
- return system(@_) == 0;
-}
-
-sub gather_groups_and_libs {
- my @pmcs = @_;
-
- my ( %group_files, %group_libs, %pmc_group, %pmc_libs );
- for my $pmc (@pmcs) {
- our $class = retrieve("$pmc.dump");
-
- # there can be many libs
- my %libs = %{ $class->{flags}{lib} || {} };
- $pmc_libs{$pmc} = \%libs;
-
- # There should be at most a single group
- my $group = $class->{flags}{group}
- or next;
- $pmc_group{$pmc} = $group;
- push @{ $group_files{$group} }, $pmc;
- $group_libs{$group} ||= {};
- foreach my $lib ( keys %libs ) {
- $group_libs{$group}->{$lib} = 1;
- }
- }
-
- return (\%group_files, \%group_libs, \%pmc_group, \%pmc_libs);
-}
-
-sub modtime {
- my $ago = (-M shift);
-
- if (defined $ago) {
- return $NOW - $ago;
- }
- else {
- return;
- }
-}
-
-sub needs_build {
- my ($target, @sources) = @_;
-
- my $target_mod = modtime($target)
- or return 1;
- for my $source (@sources) {
- return 1 if modtime($source) > $target_mod;
- }
-
- return 0;
-}
-
-sub generate_dump {
- my ($pmc) = @_;
-
- if (needs_build("$pmc.dump", "$pmc.pmc")) {
- run("$PMC2C --dump $pmc.pmc")
- or die "pmc2c dump failed ($?)\n";
- }
-
- return;
-}
-
-sub generate_c {
- my ($pmc) = @_;
-
- if (needs_build("$pmc.c", "$pmc.pmc")) {
- run("$PMC2C --c $pmc.pmc")
- or die "pmc2c code generation failed ($?)\n";
- }
-
- return;
-}
-
-sub compile {
- my ($src_stem, $dest_stem) = @_;
-
- $dest_stem ||= $src_stem;
- if (needs_build("$dest_stem$O", "$src_stem.c")) {
- run(compile_cmd("$dest_stem$O", "$src_stem.c"))
- or die "compile $src_stem.c failed ($?)\n";
- }
- return 1;
-}
-
-sub partial_link {
- my ($group, $libs, $stems) = @_;
-
- my @sources = map { "$_$O" } @$stems;
- if (needs_build("$group$LOAD_EXT", @sources)) {
- return run(partial_link_cmd("$group$LOAD_EXT", $libs, \@sources))
- or die "partial link $group$LOAD_EXT failed ($?)\n";
- }
- else {
- return 1;
- }
-}
-
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Modified: branches/pmc_freeze_with_pmcs/config/gen/makefiles/editor.in
==============================================================================
--- branches/pmc_freeze_with_pmcs/config/gen/makefiles/editor.in Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/config/gen/makefiles/editor.in Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,17 +1,16 @@
# Copyright (C) 2005-2009, Parrot Foundation.
# $Id$
-OPS_DIR := ../src/ops
-#IF(win32):VIM_DIR := $(USERPROFILE)/vimfiles
-#ELSE:VIM_DIR := $(HOME)/.vim
-VIM_FT_DIR := $(VIM_DIR)/plugin
-VIM_IN_DIR := $(VIM_DIR)/indent
-VIM_SYN_DIR := $(VIM_DIR)/syntax
-
-PERL := @perl@
-CP := @cp@
-MKPATH := @mkpath@
-RM_F := @rm_f@
+#IF(win32):VIM_DIR = $(USERPROFILE)/vimfiles
+#ELSE:VIM_DIR = $(HOME)/.vim
+VIM_FT_DIR = $(VIM_DIR)/plugin
+VIM_IN_DIR = $(VIM_DIR)/indent
+VIM_SYN_DIR = $(VIM_DIR)/syntax
+
+PERL = @perl@
+CP = @cp@
+MKPATH = @mkpath@
+RM_F = @rm_f@
default: all
@@ -33,9 +32,9 @@
@echo " realclean: clean up local files including Makefile"
@echo ""
-pir.vim: pir_vim.in $(OPS_DIR)//*.ops ops2vim.pl
+pir.vim: pir_vim.in ../src/ops/*.ops ops2vim.pl
$(CP) pir_vim.in pir.vim
- $(PERL) ops2vim.pl $(OPS_DIR)/*.ops >> pir.vim
+ $(PERL) ops2vim.pl ../src/ops/*.ops >> pir.vim
vim-install: pir.vim
$(MKPATH) "$(VIM_DIR)"
Modified: branches/pmc_freeze_with_pmcs/config/gen/makefiles/ext.in
==============================================================================
--- branches/pmc_freeze_with_pmcs/config/gen/makefiles/ext.in Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/config/gen/makefiles/ext.in Fri Jan 29 21:05:08 2010 (r43643)
@@ -3,13 +3,13 @@
# setup of commands
@make_set_make@
-MAKE := @make@
-PERL := @perl@
-RM_F := @rm_f@
+MAKE = @make@
+PERL = @perl@
+RM_F = @rm_f@
# add new languages here
# remove obsolete languages here
-EXT := \
+EXT = \
Parrot-Embed
# the default target
Deleted: branches/pmc_freeze_with_pmcs/config/gen/makefiles/json.in
==============================================================================
--- branches/pmc_freeze_with_pmcs/config/gen/makefiles/json.in Fri Jan 29 21:05:08 2010 (r43642)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,60 +0,0 @@
-# Copyright (C) 2006-2009, Parrot Foundation.
-# $Id$
-
-PERL := @perl@
-RM_F := @rm_f@
-PARROT := ../../parrot at exe@
-
-TOOL_DIR := ../..
-PGE_DIR := ../../compilers/pge
-TGE_DIR := ../../compilers/tge
-
-# the default target
-all: JSON.pbc
-
-# This is a listing of all targets, that are meant to be called by users
-help:
- @echo ""
- @echo "Following targets are available for the user:"
- @echo ""
- @echo " all: JSON.pbc"
- @echo " This is the default."
- @echo "Testing:"
- @echo " test: Run the test suite."
- @echo " testclean: Clean up test results and temporary files."
- @echo ""
- @echo "Cleaning:"
- @echo " clean: Basic cleaning up."
- @echo ""
- @echo "Misc:"
- @echo " help: Print this help message."
- @echo ""
-
-test: all
- cd $(TOOL_DIR) && prove -r t/compilers/json
-
-testclean:
- $(RM_F) "../../t/compilers/json/*.pir"
-
-JSON.pbc : JSON/grammar.pbc JSON/pge2pir.pbc JSON.pir
- $(PARROT) --output=JSON.pbc JSON.pir
-
-JSON/grammar.pbc : JSON/grammar.pir
- $(PARROT) --output=JSON/grammar.pbc JSON/grammar.pir
-
-JSON/grammar.pir : JSON/grammar.pg
- $(PARROT) $(TOOL_DIR)/runtime/parrot/library/PGE/Perl6Grammar.pbc --output=JSON/grammar.pir JSON/grammar.pg
-
-JSON/pge2pir.pbc : JSON/pge2pir.pir
- $(PARROT) --output=JSON/pge2pir.pbc JSON/pge2pir.pir
-
-JSON/pge2pir.pir : JSON/pge2pir.tg
- $(PARROT) $(TGE_DIR)/tgc.pir --output=JSON/pge2pir.pir JSON/pge2pir.tg
-
-clean : testclean
- $(RM_F) "JSON/*.pbc" "JSON/*.pir" JSON.pbc
-
-# Local variables:
-# mode: makefile
-# End:
-# vim: ft=make:
Deleted: branches/pmc_freeze_with_pmcs/config/gen/makefiles/nqp-rx.in
==============================================================================
--- branches/pmc_freeze_with_pmcs/config/gen/makefiles/nqp-rx.in Fri Jan 29 21:05:08 2010 (r43642)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,63 +0,0 @@
-# Copyright (C) 2009, Parrot Foundation.
-# $Id$
-
-# Setup some commands
-PERL := @perl@
-CP := @cp@
-RM_F := @rm_f@
-PARROT := ../../parrot at exe@
-
-PARROT_LIBRARY := @build_dir@/runtime/parrot/library
-
-NQP_LIB_PBCS := Regex.pbc HLL.pbc P6Regex.pbc nqp-rx.pbc
-
-all: $(NQP_LIB_PBCS)
- $(CP) $(NQP_LIB_PBCS) $(PARROT_LIBRARY)
-
-Regex.pbc: src/stage0/Regex-s0.pir
- $(PARROT) $(PARROT_ARGS) -o Regex.pbc src/stage0/Regex-s0.pir
-
-HLL.pbc: src/stage0/HLL-s0.pir
- $(PARROT) $(PARROT_ARGS) -o HLL.pbc src/stage0/HLL-s0.pir
-
-P6Regex.pbc: src/stage0/P6Regex-s0.pir
- $(PARROT) $(PARROT_ARGS) -o P6Regex.pbc src/stage0/P6Regex-s0.pir
-
-nqp-rx.pbc: src/stage0/NQP-s0.pir
- $(PARROT) $(PARROT_ARGS) -o nqp-rx.pbc src/stage0/NQP-s0.pir
-
-# This is a listing of all targets, that are meant to be called by users
-help:
- @echo ""
- @echo "Following targets are available for the user:"
- @echo ""
- @echo " all: nqp.pbc"
- @echo " This is the default."
- @echo ""
- @echo "Cleaning:"
- @echo " clean: Basic cleaning up."
- @echo " realclean: Removes also files generated by 'Configure.pl'"
- @echo " distclean: Removes also anything built, in theory"
- @echo ""
- @echo "Misc:"
- @echo " help: Print this help message."
- @echo ""
-
-# this target has nothing to do
-testclean:
-
-CLEANUPS := \
- $(NQP_LIB_PBCS)
-
-clean:
- $(RM_F) $(CLEANUPS)
-
-realclean: clean
- $(RM_F) Makefile
-
-distclean: realclean
-
-# Local variables:
-# mode: makefile
-# End:
-# vim: ft=make:
Deleted: branches/pmc_freeze_with_pmcs/config/gen/makefiles/nqp.in
==============================================================================
--- branches/pmc_freeze_with_pmcs/config/gen/makefiles/nqp.in Fri Jan 29 21:05:08 2010 (r43642)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,81 +0,0 @@
-# Copyright (C) 2007-2009, Parrot Foundation.
-# $Id$
-
-# Setup some commands
-PERL := @perl@
-RM_F := @rm_f@
-PARROT := ../../parrot at exe@
-
-PARROT_LIBRARY := @build_dir@/runtime/parrot/library
-PGE_LIBRARY := @build_dir@/runtime/parrot/library/PGE
-
-all: nqp.pbc
-
-SOURCES := \
- nqp.pir \
- src/Grammar.pg \
- src/Grammar/Actions.pir \
- src/builtins.pir
-
-BOOTSRC := \
- bootstrap/nqp.pir \
- bootstrap/actions.pm
-
-# the default target
-nqp.pbc: $(PARROT) $(PGE_LIBRARY)/Perl6Grammar.pir $(SOURCES)
- $(PARROT) $(PARROT_ARGS) $(PGE_LIBRARY)/Perl6Grammar.pir \
- --output=src/Grammar_gen.pir src/Grammar.pg
- $(PARROT) -o nqp.pbc nqp.pir
-
-boot: $(BOOTSRC)
- $(PARROT) nqp.pbc \
- --output=bootstrap/gen_actions.pir \
- --target=pir \
- bootstrap/actions.pm
- $(PARROT) --output-pbc -o bootstrap/nqp.pbc bootstrap/nqp.pir
-
-# This is a listing of all targets, that are meant to be called by users
-help:
- @echo ""
- @echo "Following targets are available for the user:"
- @echo ""
- @echo " all: nqp.pbc"
- @echo " This is the default."
- @echo "Testing:"
- @echo " test: Run the test suite."
- @echo " testclean: Clean up test results."
- @echo ""
- @echo "Cleaning:"
- @echo " clean: Basic cleaning up."
- @echo " realclean: Removes also files generated by 'Configure.pl'"
- @echo " distclean: Removes also anything built, in theory"
- @echo ""
- @echo "Misc:"
- @echo " help: Print this help message."
- @echo ""
-
-test: all
- $(PERL) t/harness t
-
-# this target has nothing to do
-testclean:
-
-CLEANUPS := \
- nqp.pbc \
- src/Grammar_gen.pir \
- bootstrap/gen_actions.pir \
- bootstrap/nqp.pbc
-
-
-clean:
- $(RM_F) $(CLEANUPS)
-
-realclean: clean
- $(RM_F) Makefile
-
-distclean: realclean
-
-# Local variables:
-# mode: makefile
-# End:
-# vim: ft=make:
Deleted: branches/pmc_freeze_with_pmcs/config/gen/makefiles/pct.in
==============================================================================
--- branches/pmc_freeze_with_pmcs/config/gen/makefiles/pct.in Fri Jan 29 21:05:08 2010 (r43642)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,83 +0,0 @@
-# Copyright (C) 2006-2009, Parrot Foundation.
-# $Id$
-
-# Setup some commands
-PERL := @perl@
-CP := @cp@
-RM_F := @rm_f@
-PARROT := ../../parrot at exe@
-
-TOOL_DIR := ../..
-PGE_DIR := ../../compilers/pge
-TEST_DIR := ../../t/compilers/pct
-
-# Where to put things
-PARROT_LIBRARY := ../../runtime/parrot/library
-
-PCT_TARGETS := \
- $(PARROT_LIBRARY)/PCT.pbc \
- $(PARROT_LIBRARY)/PCT/PAST.pbc \
- $(PARROT_LIBRARY)/PCT/Grammar.pbc \
- $(PARROT_LIBRARY)/PCT/HLLCompiler.pbc \
- $(PARROT_LIBRARY)/PCT/Dumper.pbc
-
-PCT_SOURCES := \
- PCT.pir \
- src/PCT/Dumper.pir \
- src/PCT/Grammar.pir \
- src/PCT/HLLCompiler.pir \
- src/PCT/Node.pir \
- src/PAST/Compiler.pir \
- src/PAST/Node.pir \
- src/POST/Compiler.pir \
- src/POST/Node.pir
-
-# the default target
-all: $(PARROT_LIBRARY)/PCT.pbc
-
-$(PARROT_LIBRARY)/PCT.pbc: $(PARROT) $(PCT_SOURCES)
- $(PARROT) -o $(PARROT_LIBRARY)/PCT.pbc --output-pbc PCT.pir
- $(PARROT) -o $(PARROT_LIBRARY)/PCT/PAST.pbc --output-pbc src/PAST.pir
- $(PARROT) -o $(PARROT_LIBRARY)/PCT/Grammar.pbc --output-pbc src/PCT/Grammar.pir
- $(PARROT) -o $(PARROT_LIBRARY)/PCT/HLLCompiler.pbc --output-pbc src/PCT/HLLCompiler.pir
- $(PARROT) -o $(PARROT_LIBRARY)/PCT/Dumper.pbc --output-pbc src/PCT/Dumper.pir
-
-# This is a listing of all targets, that are meant to be called by users
-help:
- @echo ""
- @echo "Following targets are available for the user:"
- @echo ""
- @echo " all: all PCT libraries"
- @echo " This is the default."
- @echo "Testing:"
- @echo " test: Run the test suite."
- @echo " testclean: Clean up test results."
- @echo ""
- @echo "Cleaning:"
- @echo " clean: Basic cleaning up."
- @echo " realclean: Removes also files generated by 'Configure.pl'"
- @echo " distclean: Removes also anything built, in theory"
- @echo ""
- @echo "Misc:"
- @echo " help: Print this help message."
- @echo ""
-
-test: all
- cd $(TOOL_DIR) && prove -r t/compilers/pct
-
-testclean:
- $(RM_F) $(TEST_DIR)/*.pir \
- $(TEST_DIR)/*.pbc
-
-clean: testclean
- $(RM_F) $(PCT_TARGETS)
-
-realclean: clean
- $(RM_F) Makefile
-
-distclean: realclean
-
-# Local variables:
-# mode: makefile
-# End:
-# vim: ft=make:
Deleted: branches/pmc_freeze_with_pmcs/config/gen/makefiles/pge.in
==============================================================================
--- branches/pmc_freeze_with_pmcs/config/gen/makefiles/pge.in Fri Jan 29 21:05:08 2010 (r43642)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,84 +0,0 @@
-# Copyright (C) 2004-2009, Parrot Foundation.
-# $Id$
-
-# Setup some commands
-PERL := @perl@
-CP := @cp@
-RM_F := @rm_f@
-PARROT := ../../parrot at exe@
-
-TOOL_DIR := ../..
-
-# Where to put things
-PARROT_LIBRARY := ../../runtime/parrot/library
-
-# the default target
-all: $(PARROT_LIBRARY)/PGE.pbc
-
-SOURCES := \
- PGE.pir \
- PGE/Exp.pir \
- PGE/Match.pir \
- PGE/Regex.pir \
- PGE/Perl6Regex.pir \
- PGE/OPTable.pir \
- PGE/P5Regex.pir \
- PGE/builtins.pg
-
-$(PARROT_LIBRARY)/PGE.pbc: PGE.pbc
- $(CP) PGE.pbc $(PARROT_LIBRARY)
-
-PGE.pbc: $(PARROT) $(SOURCES)
- $(RM_F) PGE.pbc $(PARROT_LIBRARY)/PGE.pbc
- $(PERL) -e "" >PGE/builtins_gen.pir
- $(PARROT) -o PGE.pbc --output-pbc PGE.pir
- $(PARROT) $(PARROT_LIBRARY)/PGE/Perl6Grammar.pir --output=PGE/builtins_gen.pir PGE/builtins.pg
- $(RM_F) PGE.pbc
- $(PARROT) -o PGE.pbc --output-pbc PGE.pir
-
-# This is a listing of all targets, that are meant to be called by users
-help:
- @echo ""
- @echo "Following targets are available for the user:"
- @echo ""
- @echo " all: PGE.pbc"
- @echo " This is the default."
- @echo "Testing:"
- @echo " test: Run the test suite."
- @echo " testclean: Clean up test results."
- @echo ""
- @echo "Cleaning:"
- @echo " clean: Basic cleaning up."
- @echo " realclean: Removes also files generated by 'Configure.pl'"
- @echo " distclean: Removes also anything built, in theory"
- @echo ""
- @echo "Misc:"
- @echo " help: Print this help message."
- @echo ""
-
-test: all
- cd $(TOOL_DIR) && prove -r t/compilers/pge
-
-testclean:
- $(RM_F) "../../t/compilers/pge/*.pir" \
- "../../t/compilers/pge/p5regex/*.pir" \
- "../../t/compilers/pge/perl6regex/*.pir" \
- "../../t/compilers/pge/*.pbc" \
- "../../t/compilers/pge/p5regex/*.pbc" \
- "../../t/compilers/pge/perl6regex/*.pbc"
-
-clean: testclean
- $(RM_F) \
- PGE.pbc \
- $(PARROT_LIBRARY)/PGE.pbc \
- PGE/builtins_gen.pir
-
-realclean: clean
- $(RM_F) Makefile
-
-distclean: realclean
-
-# Local variables:
-# mode: makefile
-# End:
-# vim: ft=make:
Deleted: branches/pmc_freeze_with_pmcs/config/gen/makefiles/pirc.in
==============================================================================
--- branches/pmc_freeze_with_pmcs/config/gen/makefiles/pirc.in Fri Jan 29 21:05:08 2010 (r43642)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,126 +0,0 @@
-# Copyright (C) 2007-2009, Parrot Foundation.
-# $Id$
-
-.SUFFIXES : .c @o@
-
-# Setup some commands
-PERL := @perl@
-RM_F := @rm_f@
-CP := @cp@
-PARROT := ../../parrot at exe@
-BUILD_DIR := @build_dir@
-RECONFIGURE := $(PERL) @build_dir@/tools/dev/reconfigure.pl
-
-CC := @cc@
-O := @o@
-EXE := @exe@
-CC_INC := -I../../include -I../../include/pmc
-C_LIBS := @libs@
-CC_SHARED := @cc_shared@
-CFLAGS := $(CC_INC) @ccflags@ @cc_debug@ @ccwarn@ @cc_hasjit@ @cg_flag@ @gc_flag@ $(CC_SHARED)
-LINK_DYNAMIC := @link_dynamic@
-LINK := @link@
-LINKFLAGS := @linkflags@ @link_debug@ @ld_debug@
-LD := @ld@
-LDFLAGS := @ldflags@ @ld_debug@
-TOUCH := @touch@
-LEX := @lex@
-YACC := @yacc@
-
-SOURCES := \
- src/main.c \
- src/pirparser.c \
- src/pirlexer.c \
- src/pircompunit.c \
- src/pircompiler.c \
- src/pirsymbol.c \
- src/piremit.c \
- src/hdocprep.c \
- src/pirmacro.c \
- src/pirregalloc.c \
- src/bcgen.c \
- src/pirerr.c \
- src/pircapi.c \
- src/pirop.c
-
-OBJS := \
- src/main$(O) \
- src/pirparser$(O) \
- src/pirlexer$(O) \
- src/pircompunit$(O) \
- src/pircompiler$(O) \
- src/pirsymbol$(O) \
- src/piremit$(O) \
- src/hdocprep$(O) \
- src/pirmacro$(O) \
- src/pirregalloc$(O) \
- src/bcgen$(O) \
- src/pirpcc$(O) \
- src/pirerr$(O) \
- src/pircapi$(O) \
- src/pirop$(O)
-
-.c$(O) : # suffix rule (limited support)
- @$(PERL) ../../tools/dev/cc_flags.pl -v ../../CFLAGS $(CC) "" $(CFLAGS) -I$(@D) @cc_o_out@$@ -c $<
-
-
-# the default target
-all: pirc$(EXE)
-
-
-pirc$(EXE): $(OBJS)
- $(LINK) @ld_out@$@ \
- $(OBJS) \
- @rpath_blib@ @libparrot_linkflags@ $(C_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC)
-#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
-
-src/pir.y.flag src/pirparser.c src/pirparser.h : src/pir.y
- cd src && $(YACC) pir.y -d -o pirparser.c
- #$(PERL) $(BUILD_TOOLS_DIR)/fixup_gen_file.pl -noheaderizer src/pirparser.c src/pir.y
- #$(PERL) $(BUILD_TOOLS_DIR)/fixup_gen_file.pl -noheaderizer src/pirparser.h src/pir.y
- $(TOUCH) src/pir.y.flag src/pirparser.c src/pirparser.h
-
-src/pir.l.flag src/pirlexer.c : src/pir.l
- cd src && $(LEX) -opirlexer.c pir.l
- $(TOUCH) src/pir.l.flag src/pirlexer.c
-
-
-src/pirparser$(O): src/pirparser.c src/pirparser.h
-src/pirlexer$(O): src/pirlexer.c src/pirlexer.h
-src/pircompunit$(O): src/pircompunit.c src/pircompunit.h
-src/pircompiler$(O): src/pircompiler.c src/pircompiler.h
-src/pirsymbol$(O): src/pirsymbol.c src/pirsymbol.h
-src/piremit$(O): src/piremit.c src/piremit.h
-src/hdocprep$(O): src/hdocprep.c src/hdocprep.l
-src/pirmacro$(O): src/pirmacro.c src/pirmacro.h
-src/pirregalloc$(O): src/pirregalloc.c src/pirregalloc.h
-src/bcgen$(O): src/bcgen.c src/bcgen.h
-src/pirpcc$(O): src/pirpcc.c src/pirpcc.h
-src/pirerr$(O): src/pirerr.c src/pirerr.h
-src/pircapi$(O): src/pircapi.c src/pircapi.h
-src/pirop$(O): src/pirop.c src/pirop.h
-
-test: all
- perl t/harness
-
-# regenerate the Makefile
-Makefile: $(BUILD_DIR)/config/gen/makefiles/pirc.in
- cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::makefiles --target=compilers/pirc/Makefile
-
-
-clean:
- $(RM_F) *$(O)
- $(RM_F) $(OBJS)
- $(RM_F) pirc$(EXE)
-
-realclean: clean
- $(RM_F) \
- Makefile \
- doc/*.html
-
-distclean: realclean
-
-# Local variables:
-# mode: makefile
-# End:
-# vim: ft=make:
Modified: branches/pmc_freeze_with_pmcs/config/gen/makefiles/root.in
==============================================================================
--- branches/pmc_freeze_with_pmcs/config/gen/makefiles/root.in Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/config/gen/makefiles/root.in Fri Jan 29 21:05:08 2010 (r43643)
@@ -16,23 +16,23 @@
#
###############################################################################
-DEVEL := @DEVEL@
-VERSION := @VERSION@$(DEVEL)
-SOVERSION := @VERSION@
+DEVEL = @DEVEL@
+VERSION = @VERSION@$(DEVEL)
+SOVERSION = @VERSION@
-CONFIG_ARGS := @configure_args@
+CONFIG_ARGS = @configure_args@
# Override at least PREFIX with the install location if you're going
# to be using this outside of your build area.
-BUILDPREFIX :=
-PREFIX := @prefix@
-EXEC_PREFIX := @exec_prefix@
-DESTDIR :=
-BIN_DIR := @bindir@
-LIB_DIR := @libdir@
-INCLUDE_DIR := @includedir@
-DATA_DIR := @datadir@
-DOC_DIR := @docdir@
+BUILDPREFIX =
+PREFIX = @prefix@
+EXEC_PREFIX = @exec_prefix@
+DESTDIR =
+BIN_DIR = @bindir@
+LIB_DIR = @libdir@
+INCLUDE_DIR = @includedir@
+DATA_DIR = @datadir@
+DOC_DIR = @docdir@
VERSION_DIR = @versiondir@
@@ -45,40 +45,16 @@
###############################################################################
# where we're building parrot from (needed for pbc_to_exe)
-BUILD_DIR := @build_dir@
+BUILD_DIR = @build_dir@
# directory for build tools
-BUILD_TOOLS_DIR := tools/build
-
-# current directory
-CUR_DIR := .
-
-# directory for the intermediate code compiler
-IMCC_DIR := compilers/imcc
-
-# directory for the (experimental) PIR code compiler
-PIRC_DIR := compilers/pirc
+BUILD_TOOLS_DIR = tools/build
# directory for header files
-INC_DIR := @inc@
-
-# directory for PMC generated header files
-PMC_INC_DIR := @pmc_inc@
-
-# directory for the IO subsystem
-IO_DIR := src/io
+INC_DIR = @inc@
# directory with Parrot modules
-LIBRARY_DIR := runtime/parrot/library
-
-# directory for *.ops file
-OPS_DIR := src/ops
-
-# directory for packfile files
-PF_DIR := src/packfile
-
-# source directory
-SRC_DIR := src
+LIBRARY_DIR = runtime/parrot/library
###############################################################################
#
@@ -90,32 +66,33 @@
#
###############################################################################
-PERL := @perl@
-CP := @cp@
-CHMOD := @chmod@
-MKPATH := @mkpath@
-RM_F := @rm_f@
-RM_RF := @rm_rf@
-TOUCH := @touch@
-AR_CR := @ar@ @ar_flags@
-RANLIB := @ranlib@
-YACC := @yacc@
-LEX := @lex@
-AS := @as@
-CC := @cc@
-CC_INC := @cc_inc@
-C_LIBS := @libs@
-CC_SHARED := @cc_shared@
-CFLAGS := $(CC_INC) @ccflags@ @cc_build_call_frames@ @cc_debug@ @ccwarn@ @cg_flag@ @gc_flag@ @clock_best@ $(CC_SHARED)
-LINK_DYNAMIC := @link_dynamic@
-LINK := @link@
-LINKFLAGS := @linkflags@ @link_debug@ @ld_debug@
-LD := @ld@
-LDFLAGS := @ldflags@ @ld_debug@
-RECONFIGURE := $(PERL) tools/dev/reconfigure.pl
-INNO_SETUP := iscc
-TEMPDIR := @tempdir@
-#IF(darwin):export MACOSX_DEPLOYMENT_TARGET := @osx_version@
+PERL = @perl@
+CP = @cp@
+CHMOD = @chmod@
+MKPATH = @mkpath@
+RM_F = @rm_f@
+RM_RF = @rm_rf@
+TOUCH = @touch@
+AR_CR = @ar@ @ar_flags@
+RANLIB = @ranlib@
+YACC = @yacc@
+LEX = @lex@
+AS = @as@
+CC = @cc@
+CC_INC = @cc_inc@
+C_LIBS = @libs@
+CC_SHARED = @cc_shared@
+CFLAGS = $(CC_INC) @ccflags@ @cc_build_call_frames@ @cc_debug@ @ccwarn@ @cg_flag@ @gc_flag@ @clock_best@ $(CC_SHARED)
+LINK_DYNAMIC = @link_dynamic@
+LINK = @link@
+LINKFLAGS = @linkflags@ @link_debug@ @ld_debug@
+LD = @ld@
+LD_OUT = @ld_out@
+LDFLAGS = @ldflags@ @ld_debug@
+INNO_SETUP = iscc
+TEMPDIR = @tempdir@
+RPATH_BLIB = @rpath_blib@
+#IF(darwin):export MACOSX_DEPLOYMENT_TARGET = @osx_version@
###############################################################################
#
@@ -123,16 +100,26 @@
#
###############################################################################
-O := @o@
-EXE := @exe@
-SHARE_EXT := @share_ext@
-LOAD_EXT := @load_ext@
-A := @a@
-LD_SHARE_FLAGS := @ld_share_flags@
-LD_LOAD_FLAGS := @ld_load_flags@
+O = @o@
+EXE = @exe@
+SHARE_EXT = @share_ext@
+LOAD_EXT = @load_ext@
+A = @a@
+LD_SHARE_FLAGS = @ld_share_flags@
+LD_LOAD_FLAGS = @ld_load_flags@
# generated by config/init/headers.pm
-NONGEN_HEADERS := @TEMP_nongen_headers@
+NONGEN_HEADERS = @TEMP_nongen_headers@
+
+include compilers/imcc/Defines.mak
+include compilers/pirc/Defines.mak
+include compilers/tge/Defines.mak
+include compilers/nqp/Defines.mak
+include compilers/pge/Defines.mak
+include compilers/pct/Defines.mak
+include ext/nqp-rx/Defines.mak
+include compilers/data_json/Defines.mak
+include compilers/json/Defines.mak
###############################################################################
#
@@ -146,23 +133,16 @@
#
###############################################################################
-GEN_MAKEFILES := \
+GEN_MAKEFILES = \
Makefile \
docs/Makefile \
- compilers/data_json/Makefile \
- compilers/json/Makefile \
compilers/ncigen/Makefile \
- compilers/nqp/Makefile \
- compilers/pct/Makefile \
- compilers/pge/Makefile \
- compilers/tge/Makefile \
editor/Makefile \
ext/Makefile \
- ext/nqp-rx/Makefile \
src/dynoplibs/Makefile \
src/dynpmc/Makefile
-GEN_CONFIGS := \
+GEN_CONFIGS = \
$(INC_DIR)/config.h \
$(INC_DIR)/platform.h \
$(INC_DIR)/platform_interface.h \
@@ -170,25 +150,25 @@
$(INC_DIR)/has_header.h \
$(INC_DIR)/feature.h \
$(INC_DIR)/core_pmcs.h \
- $(SRC_DIR)/exec_dep.c \
- $(SRC_DIR)/exec_dep.h \
+ src/exec_dep.c \
+ src/exec_dep.h \
lib/Parrot/Config/Generated.pm \
lib/Parrot/PMC.pm \
runtime/parrot/include/config.fpmc \
- runtime/parrot/library/config.pir \
- $(SRC_DIR)/platform.c \
-#IF(platform_asm): $(SRC_DIR)/platform_asm.s \
+ $(LIBRARY_DIR)/config.pir \
+ src/platform.c \
+#IF(platform_asm): src/platform_asm.s \
#IF(has_opengl): config/gen/call_list/opengl.in \
-#IF(has_glut): $(SRC_DIR)/glut_callbacks.c \
- $(SRC_DIR)/core_pmcs.c \
-#IF(has_crypto): $(SRC_DIR)/dynpmc/md2.pmc \
-#IF(has_crypto): $(SRC_DIR)/dynpmc/md4.pmc \
-#IF(has_crypto): $(SRC_DIR)/dynpmc/md5.pmc \
-#IF(has_crypto): $(SRC_DIR)/dynpmc/ripemd160.pmc \
-#IF(has_crypto): $(SRC_DIR)/dynpmc/sha.pmc \
-#IF(has_crypto): $(SRC_DIR)/dynpmc/sha1.pmc \
-#IF(has_crypto): $(SRC_DIR)/dynpmc/sha256.pmc \
-#IF(has_crypto): $(SRC_DIR)/dynpmc/sha512.pmc \
+#IF(has_glut): src/glut_callbacks.c \
+ src/core_pmcs.c \
+#IF(has_crypto): src/dynpmc/md2.pmc \
+#IF(has_crypto): src/dynpmc/md4.pmc \
+#IF(has_crypto): src/dynpmc/md5.pmc \
+#IF(has_crypto): src/dynpmc/ripemd160.pmc \
+#IF(has_crypto): src/dynpmc/sha.pmc \
+#IF(has_crypto): src/dynpmc/sha1.pmc \
+#IF(has_crypto): src/dynpmc/sha256.pmc \
+#IF(has_crypto): src/dynpmc/sha512.pmc \
#IF(has_crypto): t/dynpmc/md2.t \
#IF(has_crypto): t/dynpmc/md4.t \
#IF(has_crypto): t/dynpmc/md5.t \
@@ -198,33 +178,59 @@
#IF(has_crypto): t/dynpmc/sha256.t \
#IF(has_crypto): t/dynpmc/sha512.t \
CFLAGS \
- $(IMCC_DIR)/CFLAGS \
+ compilers/imcc/CFLAGS \
config_lib.pasm \
- $(BUILD_TOOLS_DIR)/dynpmc.pl \
- $(BUILD_TOOLS_DIR)/dynoplibs.pl \
parrot.pc \
- $(IMCC_DIR)/imcc.y.flag \
- $(OPS_DIR)/core_ops.c \
- $(OPS_DIR)/core_ops_switch.c
-
-# most of these are generated by config/gen/parrot_include.pm
-
-GEN_PASM_INCLUDES := \
- runtime/parrot/include/signal.pasm \
-#IF(has_opengl): runtime/parrot/include/opengl_defines.pasm \
-#IF(has_opengl): runtime/parrot/library/OpenGL_funcs.pir \
- @TEMP_gen_pasm_includes@
+ compilers/imcc/imcc.y.flag \
+ compilers/imcc/imcc.l.flag \
+ src/ops/core_ops.c \
+ src/ops/core_ops_switch.c
+
+GEN_PASM_INCLUDES = \
+ runtime/parrot/include/cclass.pasm \
+ runtime/parrot/include/datatypes.pasm \
+ runtime/parrot/include/iterator.pasm \
+ runtime/parrot/include/call_bits.pasm \
+ runtime/parrot/include/io_thr_msg.pasm \
+ runtime/parrot/include/timer.pasm \
+ runtime/parrot/include/except_types.pasm \
+ runtime/parrot/include/except_severity.pasm \
+ runtime/parrot/include/hash_key_type.pasm \
+ runtime/parrot/include/interpflags.pasm \
+ runtime/parrot/include/interpdebug.pasm \
+ runtime/parrot/include/interptrace.pasm \
+ runtime/parrot/include/interpcores.pasm \
+ runtime/parrot/include/cloneflags.pasm \
+ runtime/parrot/include/iglobals.pasm \
+ runtime/parrot/include/sysinfo.pasm \
+ runtime/parrot/include/stdio.pasm \
+ runtime/parrot/include/socket.pasm \
+ runtime/parrot/include/libpaths.pasm \
+ runtime/parrot/include/longopt.pasm \
+ runtime/parrot/include/packfile_segments.pasm \
+ runtime/parrot/include/packfile_constants.pasm \
+ runtime/parrot/include/packfile_annotation_key_type.pasm \
+ runtime/parrot/include/stat.pasm \
+ runtime/parrot/include/stringinfo.pasm \
+ runtime/parrot/include/warnings.pasm \
+ runtime/parrot/include/errors.pasm \
+ runtime/parrot/include/interpinfo.pasm \
+ runtime/parrot/include/tm.pasm \
+ runtime/parrot/include/pmctypes.pasm \
+
+GEN_PM_INCLUDES = \
+ lib/Parrot/Pmc2c/PCCMETHOD_BITS.pm
-CONFIGURE_GENERATED_FILES := \
+CONFIGURE_GENERATED_FILES = \
$(GEN_CONFIGS) \
$(GEN_MAKEFILES) \
ext/Parrot-Embed/Makefile.PL \
myconfig \
- $(GEN_PASM_INCLUDES) \
- $(SRC_DIR)/call_list.txt \
+ src/call_list.txt \
MANIFEST.configure.generated \
.configure_trace.sto \
- .parrot_current_rev
+ .parrot_current_rev \
+ runtime/parrot/include/signal.pasm
###############################################################################
@@ -237,9 +243,9 @@
#
###############################################################################
-GEN_OPSFILES :=
+GEN_OPSFILES =
-GEN_HEADERS := \
+GEN_HEADERS = \
$(INC_DIR)/vtable.h \
$(INC_DIR)/oplib/core_ops.h \
$(INC_DIR)/oplib/ops.h \
@@ -247,19 +253,19 @@
$(INC_DIR)/extend_vtable.h \
$(INC_DIR)/pbcversion.h
-GEN_SOURCES := \
- $(SRC_DIR)/core_ops.c \
- $(SRC_DIR)/nci.c \
- $(SRC_DIR)/core_ops_switch.c \
- $(SRC_DIR)/parrot_config.c \
- $(SRC_DIR)/null_config.c \
- $(SRC_DIR)/install_config.c \
- $(SRC_DIR)/extend_vtable.c
+GEN_SOURCES = \
+ src/core_ops.c \
+ src/nci.c \
+ src/core_ops_switch.c \
+ src/parrot_config.c \
+ src/null_config.c \
+ src/install_config.c \
+ src/extend_vtable.c
-GEN_MODULES := \
+GEN_MODULES = \
lib/Parrot/OpLib/core.pm
-GEN_LIBRARY := \
+GEN_LIBRARY = \
$(LIBRARY_DIR)/CGI/QueryHash.pbc \
$(LIBRARY_DIR)/Crow.pbc \
$(LIBRARY_DIR)/config.pbc \
@@ -275,6 +281,7 @@
$(LIBRARY_DIR)/Getopt/Obj.pbc \
$(LIBRARY_DIR)/Iter.pbc \
$(LIBRARY_DIR)/JSON.pbc \
+ $(LIBRARY_DIR)/data_json.pbc \
$(LIBRARY_DIR)/Math/Random/mt19937ar.pbc \
$(LIBRARY_DIR)/Math/Rand.pbc \
$(LIBRARY_DIR)/MIME/Base64.pbc \
@@ -324,13 +331,13 @@
$(LIBRARY_DIR)/libpcre.pbc \
$(LIBRARY_DIR)/postgres.pbc
-FLUID_FILES_1 := \
+FLUID_FILES_1 = \
$(GEN_OPSFILES) \
$(GEN_HEADERS) \
$(GEN_SOURCES) \
$(GEN_MODULES) \
-FLUID_FILES_2 := \
+FLUID_FILES_2 = \
$(GEN_LIBRARY) \
runtime/parrot/include/parrotlib.pbc
@@ -341,32 +348,8 @@
#
###############################################################################
-# these are private to the IMCC subsystem
-IMCC_O_FILES := \
- $(IMCC_DIR)/imcparser$(O) \
- $(IMCC_DIR)/imclexer$(O) \
- $(IMCC_DIR)/imc$(O) \
- $(IMCC_DIR)/main$(O) \
- $(IMCC_DIR)/symreg$(O) \
- $(IMCC_DIR)/instructions$(O) \
- $(IMCC_DIR)/cfg$(O) \
- $(IMCC_DIR)/reg_alloc$(O) \
- $(IMCC_DIR)/sets$(O) \
- $(IMCC_DIR)/debug$(O) \
- $(IMCC_DIR)/optimizer$(O) \
- $(IMCC_DIR)/pbc$(O) \
- $(IMCC_DIR)/parser_util$(O) \
- $(IMCC_DIR)/pcc$(O)
-
-# these are private to the PIRC subsystem
-PIRC_O_FILES := \
- $(PIRC_DIR)/src/bcgen$(O) \
- $(PIRC_DIR)/src/pircapi$(O) \
- $(PIRC_DIR)/src/pirerr$(O) \
- $(PIRC_DIR)/src/pirop$(O)
-
# parrot.h and all the includes it causes to be included
-PARROT_H_HEADERS := \
+PARROT_H_HEADERS = \
$(INC_DIR)/parrot.h \
$(INC_DIR)/config.h \
$(INC_DIR)/settings.h \
@@ -424,114 +407,105 @@
$(INC_DIR)/core_pmcs.h \
$(INC_DIR)/compiler.h \
$(INC_DIR)/cclass.h \
- $(PMC_INC_DIR)/pmc/pmc_callcontext.h
+ include/pmc/pmc_callcontext.h
# generated list of header files
-GENERAL_H_FILES := $(NONGEN_HEADERS) $(GEN_HEADERS) @TEMP_cg_h@
+GENERAL_H_FILES = $(NONGEN_HEADERS) $(GEN_HEADERS) @TEMP_cg_h@
-CHARSET_O_FILES := @TEMP_charset_o@
-CLASS_PMC_FILES := @TEMP_pmc_classes_pmc@
-CLASS_O_FILES := @TEMP_pmc_classes_o@
-CLASS_STR_FILES := @TEMP_pmc_classes_str@
-ENCODING_O_FILES := @TEMP_encoding_o@
-
-
-IO_O_FILES := \
- $(IO_DIR)/core$(O) \
- $(IO_DIR)/api$(O) \
- $(IO_DIR)/utf8$(O) \
- $(IO_DIR)/buffer$(O) \
- $(IO_DIR)/unix$(O) \
- $(IO_DIR)/win32$(O) \
- $(IO_DIR)/portable$(O) \
- $(IO_DIR)/filehandle$(O) \
- $(IO_DIR)/socket_api$(O) \
- $(IO_DIR)/socket_unix$(O) \
- $(IO_DIR)/socket_win32$(O)
+CHARSET_O_FILES = @TEMP_charset_o@
+CLASS_PMC_FILES = @TEMP_pmc_classes_pmc@
+CLASS_O_FILES = @TEMP_pmc_classes_o@
+CLASS_STR_FILES = @TEMP_pmc_classes_str@
+ENCODING_O_FILES = @TEMP_encoding_o@
+
+IO_O_FILES = \
+ src/io/core$(O) \
+ src/io/api$(O) \
+ src/io/utf8$(O) \
+ src/io/buffer$(O) \
+ src/io/unix$(O) \
+ src/io/win32$(O) \
+ src/io/portable$(O) \
+ src/io/filehandle$(O) \
+ src/io/socket_api$(O) \
+ src/io/socket_unix$(O) \
+ src/io/socket_win32$(O)
-INTERP_O_FILES := \
- $(SRC_DIR)/string/api$(O) \
+INTERP_O_FILES = \
+ src/string/api$(O) \
\
- $(OPS_DIR)/core_ops$(O) \
- $(OPS_DIR)/core_ops_switch$(O) \
+ src/ops/core_ops$(O) \
+ src/ops/core_ops_switch$(O) \
\
-#IF(i386_has_gcc_cmpxchg): $(SRC_DIR)/atomic/gcc_x86$(O) \
- $(SRC_DIR)/byteorder$(O) \
- $(SRC_DIR)/string/charset$(O) \
- $(SRC_DIR)/core_pmcs$(O) \
- $(SRC_DIR)/datatypes$(O) \
- $(SRC_DIR)/debug$(O) \
- $(SRC_DIR)/dynext$(O) \
- $(SRC_DIR)/embed$(O) \
- $(SRC_DIR)/string/encoding$(O) \
- $(SRC_DIR)/events$(O) \
- $(SRC_DIR)/exceptions$(O) \
- $(SRC_DIR)/exit$(O) \
- $(SRC_DIR)/extend$(O) \
- $(SRC_DIR)/extend_vtable$(O) \
- $(SRC_DIR)/gc/alloc_memory$(O) \
- $(SRC_DIR)/gc/api$(O) \
- $(SRC_DIR)/gc/gc_ms$(O) \
- $(SRC_DIR)/gc/gc_inf$(O) \
- $(SRC_DIR)/gc/mark_sweep$(O) \
- $(SRC_DIR)/gc/system$(O) \
- $(SRC_DIR)/global$(O) \
- $(SRC_DIR)/global_setup$(O) \
- $(SRC_DIR)/hash$(O) \
- $(SRC_DIR)/hll$(O) \
- $(SRC_DIR)/call/pcc$(O) \
- $(SRC_DIR)/call/args$(O) \
- $(SRC_DIR)/interp/inter_cb$(O) \
- $(SRC_DIR)/interp/inter_create$(O) \
- $(SRC_DIR)/interp/inter_misc$(O) \
- $(SRC_DIR)/call/ops$(O) \
- $(SRC_DIR)/call/context$(O) \
- $(SRC_DIR)/call/context_accessors$(O) \
- $(SRC_DIR)/key$(O) \
- $(SRC_DIR)/library$(O) \
- $(SRC_DIR)/list$(O) \
- $(SRC_DIR)/longopt$(O) \
- $(SRC_DIR)/misc$(O) \
- $(SRC_DIR)/multidispatch$(O) \
- $(SRC_DIR)/frame_builder$(O) \
- $(SRC_DIR)/nci$(O) \
- $(SRC_DIR)/oo$(O) \
- $(SRC_DIR)/packfile$(O) \
- $(SRC_DIR)/packout$(O) \
- $(SRC_DIR)/platform$(O) \
- $(SRC_DIR)/pmc_freeze$(O) \
- $(SRC_DIR)/pmc$(O) \
- $(SRC_DIR)/runcore/main$(O) \
- $(SRC_DIR)/runcore/cores$(O) \
- $(SRC_DIR)/runcore/profiling$(O) \
- $(SRC_DIR)/scheduler$(O) \
- $(SRC_DIR)/spf_render$(O) \
- $(SRC_DIR)/spf_vtable$(O) \
- $(SRC_DIR)/string/primitives$(O) \
- $(SRC_DIR)/sub$(O) \
- $(SRC_DIR)/thread$(O) \
- $(SRC_DIR)/runcore/trace$(O) \
- $(SRC_DIR)/tsq$(O) \
- $(SRC_DIR)/utils$(O) \
- $(SRC_DIR)/vtables$(O) \
- $(SRC_DIR)/warnings$(O) \
+#IF(i386_has_gcc_cmpxchg): src/atomic/gcc_x86$(O) \
+ src/byteorder$(O) \
+ src/string/charset$(O) \
+ src/core_pmcs$(O) \
+ src/datatypes$(O) \
+ src/debug$(O) \
+ src/dynext$(O) \
+ src/embed$(O) \
+ src/string/encoding$(O) \
+ src/events$(O) \
+ src/exceptions$(O) \
+ src/exit$(O) \
+ src/extend$(O) \
+ src/extend_vtable$(O) \
+ src/gc/alloc_memory$(O) \
+ src/gc/api$(O) \
+ src/gc/gc_ms$(O) \
+ src/gc/gc_inf$(O) \
+ src/gc/mark_sweep$(O) \
+ src/gc/system$(O) \
+ src/global$(O) \
+ src/global_setup$(O) \
+ src/hash$(O) \
+ src/hll$(O) \
+ src/call/pcc$(O) \
+ src/call/args$(O) \
+ src/interp/inter_cb$(O) \
+ src/interp/inter_create$(O) \
+ src/interp/inter_misc$(O) \
+ src/call/ops$(O) \
+ src/call/context$(O) \
+ src/call/context_accessors$(O) \
+ src/key$(O) \
+ src/library$(O) \
+ src/list$(O) \
+ src/longopt$(O) \
+ src/misc$(O) \
+ src/multidispatch$(O) \
+ src/frame_builder$(O) \
+ src/nci$(O) \
+ src/oo$(O) \
+ src/packfile$(O) \
+ src/packout$(O) \
+ src/platform$(O) \
+ src/pmc_freeze$(O) \
+ src/pmc$(O) \
+ src/runcore/main$(O) \
+ src/runcore/cores$(O) \
+ src/runcore/profiling$(O) \
+ src/scheduler$(O) \
+ src/spf_render$(O) \
+ src/spf_vtable$(O) \
+ src/string/primitives$(O) \
+ src/sub$(O) \
+ src/thread$(O) \
+ src/runcore/trace$(O) \
+ src/tsq$(O) \
+ src/utils$(O) \
+ src/vtables$(O) \
+ src/warnings$(O) \
\
- $(PF_DIR)/pf_items$(O) \
+ src/packfile/pf_items$(O) \
\
@TEMP_cg_o@ \
@TEMP_atomic_o@ \
@TEMP_gc_o@ \
-#IF(platform_asm): $(SRC_DIR)/platform_asm$(O) \
+#IF(platform_asm): src/platform_asm$(O) \
-O_FILES := \
- $(INTERP_O_FILES) \
- $(CHARSET_O_FILES) \
- $(IO_O_FILES) \
- $(CLASS_O_FILES) \
- $(ENCODING_O_FILES) \
- $(IMCC_O_FILES)
-
-OPS_FILES := @ops@ $(GEN_OPSFILES)
+OPS_FILES = @ops@ $(GEN_OPSFILES)
###############################################################################
#
@@ -540,45 +514,45 @@
###############################################################################
# Executables
-PARROT := $(CUR_DIR)/@test_prog@$(EXE)
-MINIPARROT := $(CUR_DIR)/miniparrot$(EXE)
-DIS := $(CUR_DIR)/pbc_disassemble$(EXE)
-PDUMP := $(CUR_DIR)/pbc_dump$(EXE)
-PBCMERGE := $(CUR_DIR)/pbc_merge$(EXE)
-PDB := $(CUR_DIR)/parrot_debugger$(EXE)
-PBC_TO_EXE := $(CUR_DIR)/pbc_to_exe$(EXE)
-PARROT_CONFIG := $(CUR_DIR)/parrot_config$(EXE)
-PIRC := $(CUR_DIR)/pirc$(EXE)
-NQP := $(CUR_DIR)/parrot-nqp$(EXE)
+PARROT = ./@test_prog@$(EXE)
+MINIPARROT = ./miniparrot$(EXE)
+DIS = ./pbc_disassemble$(EXE)
+PDUMP = ./pbc_dump$(EXE)
+PBC_MERGE = ./pbc_merge$(EXE)
+PDB = ./parrot_debugger$(EXE)
+PBC_TO_EXE = ./pbc_to_exe$(EXE)
+PARROT_CONFIG = ./parrot_config$(EXE)
+PIRC = ./pirc$(EXE)
+NQP_RX = ./parrot-nqp$(EXE)
# Installable executables
-INSTALLABLEPARROT := $(CUR_DIR)/installable_parrot$(EXE)
-INSTALLABLEDIS := $(CUR_DIR)/installable_pbc_disassemble$(EXE)
-INSTALLABLEPDUMP := $(CUR_DIR)/installable_pbc_dump$(EXE)
-INSTALLABLEPBCMERGE := $(CUR_DIR)/installable_pbc_merge$(EXE)
-INSTALLABLEPBCTOEXE := $(CUR_DIR)/installable_pbc_to_exe$(EXE)
-INSTALLABLEPDB := $(CUR_DIR)/installable_parrot_debugger$(EXE)
-INSTALLABLECONFIG := $(CUR_DIR)/installable_parrot_config$(EXE)
-INSTALLABLENQP := $(CUR_DIR)/installable_parrot-nqp$(EXE)
+INSTALLABLEPARROT = ./installable_parrot$(EXE)
+INSTALLABLEDIS = ./installable_pbc_disassemble$(EXE)
+INSTALLABLEPDUMP = ./installable_pbc_dump$(EXE)
+INSTALLABLEPBC_MERGE = ./installable_pbc_merge$(EXE)
+INSTALLABLEPBCTOEXE = ./installable_pbc_to_exe$(EXE)
+INSTALLABLEPDB = ./installable_parrot_debugger$(EXE)
+INSTALLABLECONFIG = ./installable_parrot_config$(EXE)
+INSTALLABLENQP = ./installable_parrot-nqp$(EXE)
# Libraries
-LIBPARROT_STATIC := @blib_dir@/@libparrot_static@
+LIBPARROT_STATIC = @blib_dir@/@libparrot_static@
#IF(darwin):export DYLD_LIBRARY_PATH := @blib_dir@:$(DYLD_LIBRARY_PATH)
-#IF(win32):LIBPARROT_SHARED := @libparrot_shared@
-#ELSE:LIBPARROT_SHARED := @blib_dir@/@libparrot_shared@
+#IF(win32):LIBPARROT_SHARED = @libparrot_shared@
+#ELSE:LIBPARROT_SHARED = @blib_dir@/@libparrot_shared@
# This line controls whether a static or shared library is built
# by Parrot's make. It is not useful otherwise (e.g., in
# lib/Parrot/Config/Generated.pm or config_lib.pasm).
-LIBPARROT := @libparrot_for_makefile_only@
+LIBPARROT = @libparrot_for_makefile_only@
-#IF(has_icu):ICU_SHARED := @icu_shared@
-ALL_PARROT_LIBS := @libparrot_linkflags@ $(ICU_SHARED) $(C_LIBS)
+#IF(has_icu):ICU_SHARED = @icu_shared@
+ALL_PARROT_LIBS = @libparrot_linkflags@ $(ICU_SHARED) $(C_LIBS)
# dynamic extensions
-DYNEXT_DIR := runtime/parrot/dynext
-LIBNCI_TEST_SO := $(DYNEXT_DIR)/libnci_test$(LOAD_EXT)
-LIBGLUTCB_SO := $(DYNEXT_DIR)/libglutcb$(LOAD_EXT)
+DYNEXT_DIR = runtime/parrot/dynext
+LIBNCI_TEST_SO = $(DYNEXT_DIR)/libnci_test$(LOAD_EXT)
+LIBGLUTCB_SO = $(DYNEXT_DIR)/libglutcb$(LOAD_EXT)
###############################################################################
#
@@ -589,7 +563,7 @@
# This is set to MAKE=$make if your $make command doesn't
# do it for you.
@make_set_make@
-MAKE := @make_c@
+MAKE = @make_c@
# These need to be above lines that define suffix rules to be portable
# (certainly FreeBSD make doesn't grok the pir.pbc rule otherwise)
@@ -602,25 +576,18 @@
# 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 $(CUR_DIR)/CFLAGS $(CC) "" $(CFLAGS) -I$(@D) @cc_o_out@$@ -c $<
+ @$(PERL) tools/dev/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 $(CUR_DIR)/CFLAGS $(CC) "" $(CFLAGS) -I$(@D) @cc_o_out@$@ -c $<
+ @$(PERL) tools/dev/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 $(CUR_DIR)/CFLAGS $(CC) "" $(CFLAGS) -I$(@D) @cc_o_out@$@ -c $<
-
-# XXX These obviously require parrot: had trouble adding parrot as a dependency
-# here, though. Ignored on Mac OS X, at least.
+#UNLESS(win32) @$(PERL) tools/dev/cc_flags.pl ./CFLAGS $(CC) "" $(CFLAGS) -I$(@D) @cc_o_out@$@ -c $<
.pir.pbc : # suffix rule (limited support)
$(PARROT) -o $@ $<
-.pbc$(O) : # suffix rule (limited support)
- $(PARROT) -o $@ $<
-
-
###############################################################################
#
# USER TARGETS:
@@ -633,17 +600,22 @@
corevm \
docs \
#IF(has_glut): $(LIBGLUTCB_SO) \
- compilers \
$(DIS) \
$(PARROT_CONFIG) \
$(PBC_TO_EXE) \
- $(PBCMERGE) \
+ $(PBC_MERGE) \
$(PDB) \
$(PDUMP) \
- $(NQP)
+ $(NQP_RX) \
+ $(TGE_LIB_PBCS) \
+ $(PGE_LIB_PBCS) \
+ $(PCT_LIB_PBCS) \
+ $(JSON_LIB_PBCS) \
+ $(NQP_LIB_PBCS)
corevm : \
flags_dummy \
+ $(GEN_PM_INCLUDES) \
PARROT_LIBS \
$(PARROT) \
runtime/parrot/include/parrotlib.pbc \
@@ -651,55 +623,57 @@
$(LIBNCI_TEST_SO) \
$(GEN_LIBRARY) \
dynpmc \
- dynoplibs \
+ dynoplibs
-$(GEN_LIBRARY) : $(PARROT)
+$(GEN_LIBRARY) : $(PARROT) $(GEN_PASM_INCLUDES)
# constant string support
.c.str : # suffix rule (limited support)
$(PERL) $(BUILD_TOOLS_DIR)/c2str.pl $< > $@
-STR_FILES := \
- $(SRC_DIR)/debug.str \
- $(SRC_DIR)/dynext.str \
- $(SRC_DIR)/events.str \
- $(SRC_DIR)/exceptions.str \
- $(SRC_DIR)/global.str \
- $(SRC_DIR)/global_setup.str \
- $(SRC_DIR)/hll.str \
- $(SRC_DIR)/call/pcc.str \
- $(SRC_DIR)/call/args.str \
- $(SRC_DIR)/interp/inter_cb.str \
- $(SRC_DIR)/interp/inter_create.str \
- $(SRC_DIR)/interp/inter_misc.str \
- $(SRC_DIR)/io/api.str \
- $(SRC_DIR)/key.str \
- $(SRC_DIR)/library.str \
- $(SRC_DIR)/multidispatch.str \
- $(SRC_DIR)/frame_builder.str \
- $(SRC_DIR)/nci.str \
- $(SRC_DIR)/packfile.str \
- $(SRC_DIR)/pmc.str \
- $(SRC_DIR)/pmc_freeze.str \
- $(SRC_DIR)/oo.str \
- $(SRC_DIR)/runcore/cores.str \
- $(SRC_DIR)/runcore/main.str \
- $(SRC_DIR)/runcore/profiling.str \
- $(SRC_DIR)/scheduler.str \
- $(SRC_DIR)/spf_render.str \
- $(SRC_DIR)/spf_vtable.str \
- $(SRC_DIR)/string/api.str \
- $(SRC_DIR)/sub.str \
+STR_FILES = \
+ src/debug.str \
+ src/dynext.str \
+ src/events.str \
+ src/exceptions.str \
+ src/global.str \
+ src/global_setup.str \
+ src/hll.str \
+ src/call/pcc.str \
+ src/call/args.str \
+ src/interp/inter_cb.str \
+ src/interp/inter_create.str \
+ src/interp/inter_misc.str \
+ src/io/api.str \
+ src/key.str \
+ src/library.str \
+ src/multidispatch.str \
+ src/frame_builder.str \
+ src/nci.str \
+ src/packfile.str \
+ src/pmc.str \
+ src/pmc_freeze.str \
+ src/oo.str \
+ src/runcore/cores.str \
+ src/runcore/main.str \
+ src/runcore/profiling.str \
+ src/scheduler.str \
+ src/spf_render.str \
+ src/spf_vtable.str \
+ src/string/api.str \
+ src/sub.str \
\
$(CLASS_STR_FILES)
-$(SRC_DIR)/string/private_cstring.h : $(STR_FILES) $(BUILD_TOOLS_DIR)/c2str.pl
+src/string/private_cstring.h : $(STR_FILES) $(BUILD_TOOLS_DIR)/c2str.pl
$(PERL) $(BUILD_TOOLS_DIR)/c2str.pl --all
+H2INC = $(BUILD_TOOLS_DIR)/h2inc.pl
+
# classes PMC build utils and rules
-PMC2CD := $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl --dump @no_lines_flag@
-PMC2CC := $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl --c @no_lines_flag@
-PMC2CV := $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl --vtable @no_lines_flag@
+PMC2CD = $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl --dump @no_lines_flag@
+PMC2CC = $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl --c @no_lines_flag@
+PMC2CV = $(PERL) $(BUILD_TOOLS_DIR)/pmc2c.pl --vtable @no_lines_flag@
.pmc.dump : # suffix rule (limited support)
$(PMC2CD) $<
@@ -707,11 +681,7 @@
.pmc.c : # suffix rule (limited support)
$(PMC2CC) $<
-# not all makes might understand this, so the rules are generated
-#src/pmc/pmc_%.h : src/pmc/%.c
-# $(PMC2CC) $<
-
-vtable.dump : src/vtable.tbl
+vtable.dump : src/vtable.tbl lib/Parrot/Pmc2c/PCCMETHOD_BITS.pm
$(PMC2CV)
# This is a listing of all targets meant to be called by users
@@ -726,14 +696,14 @@
@echo " world: 'all' and 'parrot_utils'."
@echo " installable: same as 'world', but targets for installation"
@echo ""
- @echo " parrot_utils: $(PDUMP), $(DIS), $(PDB), $(PBCMERGE) and $(PBC_TO_EXE) $(PARROT_CONFIG)"
+ @echo " parrot_utils: $(PDUMP), $(DIS), $(PDB), $(PBC_MERGE) and $(PBC_TO_EXE) $(PARROT_CONFIG)"
@echo " $(PDUMP):"
@echo " Parrot Dumper"
@echo " $(DIS):"
@echo " Parrot Disassembler"
@echo " $(PDB):"
@echo " Parrot Debugger"
- @echo " $(PBCMERGE):"
+ @echo " $(PBC_MERGE):"
@echo " Merge bytecode files"
@echo " $(PBC_TO_EXE):"
@echo " Generate C, compile, and link bytecode files"
@@ -799,13 +769,10 @@
@echo " dynoplibs-test: Proxy for target 'test' of src/dynoplibs/Makefile"
@echo " dynoplibs-clean: Proxy for target 'clean' of src/dynoplibs/Makefile"
@echo ""
- @echo "Language implementations:"
- @echo " compilers: Proxy for default target of pge and tge compilers"
- @echo ""
@echo "Fetch from source repository:"
@echo " update: svn update."
@echo " status: svn status."
- @echo " patch: Create a patch for sending to bugs-parrot."
+ @echo " patch: Create a patch to attach to https:////trac.parrot.org/"
@echo ""
@echo "Development:"
@echo " lint: An alias for sunlint."
@@ -831,26 +798,26 @@
world : all parrot_utils
-parrot_utils : $(PDUMP) $(DIS) $(PDB) $(PBCMERGE) $(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) $(INSTALLABLEPBCMERGE) $(INSTALLABLEPBCTOEXE) $(INSTALLABLECONFIG) $(INSTALLABLENQP)
+installable: all $(INSTALLABLEPARROT) $(INSTALLABLEPDUMP) $(INSTALLABLEDIS) $(INSTALLABLEPDB) $(INSTALLABLEPBC_MERGE) $(INSTALLABLEPBCTOEXE) $(INSTALLABLECONFIG) $(INSTALLABLENQP)
flags_dummy :
@echo "Compiling with:"
- @$(PERL) tools/dev/cc_flags.pl $(CUR_DIR)/CFLAGS echo $(CC) $(CFLAGS) -I$(@D) @cc_o_out@ xx$(O) -c xx.c
+ @$(PERL) tools/dev/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)
+runtime/parrot/include/parrotlib.pbc: runtime/parrot/library/parrotlib.pir $(PARROT) $(GEN_PASM_INCLUDES)
$(PARROT) -o $@ runtime/parrot/library/parrotlib.pir
runtime/parrot/include/config.fpmc : myconfig config_lib.pasm $(MINIPARROT)
$(MINIPARROT) config_lib.pasm > $@
-$(PARROT) : $(SRC_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) CFLAGS \
- lib/Parrot/OpLib/core.pm $(SRC_DIR)/parrot_config$(O) \
+$(PARROT) : src/main$(O) $(GEN_HEADERS) $(LIBPARROT) CFLAGS \
+ lib/Parrot/OpLib/core.pm src/parrot_config$(O) \
$(MINIPARROT)
$(LINK) @ld_out@$@ \
- $(SRC_DIR)/main$(O) $(SRC_DIR)/parrot_config$(O) \
+ src/main$(O) src/parrot_config$(O) \
@rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
@@ -862,76 +829,73 @@
$(PARROT) -o parrot_config.pbc tools/util/parrot-config.pir
$(PARROT) pbc_to_exe.pbc parrot_config.pbc
-#IF(win32):pirc : $(PIRC)
-
-$(PIRC) : $(PARROT)
- $(MAKE) compilers/pirc
- $(CP) compilers/pirc/pirc$(EXE) $(PIRC)
- $(CHMOD) 0755 $(PIRC)
-
-$(NQP) : $(PBC_TO_EXE) compilers.dummy
- $(CP) runtime/parrot/library/nqp-rx.pbc parrot-nqp.pbc
- $(PBC_TO_EXE) parrot-nqp.pbc
-
-$(MINIPARROT) : $(SRC_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
- lib/Parrot/OpLib/core.pm $(SRC_DIR)/null_config$(O)
- $(LINK) @ld_out@$@ $(SRC_DIR)/main$(O) $(SRC_DIR)/null_config$(O) \
+$(MINIPARROT) : src/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
+ lib/Parrot/OpLib/core.pm src/null_config$(O)
+ $(LINK) @ld_out@$@ src/main$(O) src/null_config$(O) \
@rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
-$(INSTALLABLEPARROT) : $(SRC_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
- lib/Parrot/OpLib/core.pm $(SRC_DIR)/install_config$(O) \
+$(INSTALLABLEPARROT) : src/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
+ lib/Parrot/OpLib/core.pm src/install_config$(O) \
$(PARROT)
$(LINK) @ld_out@$@ \
- $(SRC_DIR)/main$(O) $(SRC_DIR)/install_config$(O) \
+ src/main$(O) src/install_config$(O) \
@rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
-$(INC_DIR)/context.h : $(PMC_INC_DIR)/pmc/pmc_callcontext.h
+$(INC_DIR)/context.h : include/pmc/pmc_callcontext.h
$(INC_DIR)/pbcversion.h :
$(PERL) $(BUILD_TOOLS_DIR)/pbcversion_h.pl > $(INC_DIR)/pbcversion.h
-$(SRC_DIR)/parrot_config.c : runtime/parrot/include/config.fpmc \
+src/parrot_config.c : runtime/parrot/include/config.fpmc \
$(BUILD_TOOLS_DIR)/parrot_config_c.pl
$(PERL) $(BUILD_TOOLS_DIR)/parrot_config_c.pl > \
- $(SRC_DIR)/parrot_config.c
+ src/parrot_config.c
-$(SRC_DIR)/install_config.c : install_config.fpmc \
+src/install_config.c : install_config.fpmc \
$(BUILD_TOOLS_DIR)/parrot_config_c.pl
$(PERL) $(BUILD_TOOLS_DIR)/parrot_config_c.pl --install > \
- $(SRC_DIR)/install_config.c
+ src/install_config.c
-$(SRC_DIR)/null_config.c : myconfig $(BUILD_TOOLS_DIR)/parrot_config_c.pl
+src/null_config.c : myconfig $(BUILD_TOOLS_DIR)/parrot_config_c.pl
$(PERL) $(BUILD_TOOLS_DIR)/parrot_config_c.pl --mini > \
- $(SRC_DIR)/null_config.c
+ src/null_config.c
install_config.fpmc : myconfig config_lib.pasm $(PARROT)
@echo "Invoking Parrot to generate install_config.fpmc"
$(PARROT) config_lib.pasm --install > $@
-$(SRC_DIR)/parrot_config$(O) : $(PARROT_H_HEADERS)
+src/parrot_config$(O) : $(PARROT_H_HEADERS)
-$(SRC_DIR)/install_config$(O) : $(PARROT_H_HEADERS)
+src/install_config$(O) : $(PARROT_H_HEADERS)
-$(SRC_DIR)/null_config$(O) : $(PARROT_H_HEADERS)
+src/null_config$(O) : $(PARROT_H_HEADERS)
-$(SRC_DIR)/oo$(O) : $(PARROT_H_HEADERS) $(PMC_INC_DIR)/pmc/pmc_class.h $(PMC_INC_DIR)/pmc/pmc_object.h $(SRC_DIR)/oo.str $(INC_DIR)/oo_private.h
+src/oo$(O) : $(PARROT_H_HEADERS) include/pmc/pmc_class.h include/pmc/pmc_object.h src/oo.str $(INC_DIR)/oo_private.h
-$(SRC_DIR)/scheduler$(O) : $(PARROT_H_HEADERS) $(SRC_DIR)/scheduler.str \
- $(PMC_INC_DIR)/pmc/pmc_scheduler.h $(PMC_INC_DIR)/pmc/pmc_task.h \
- $(PMC_INC_DIR)/pmc/pmc_timer.h \
+src/scheduler$(O) : $(PARROT_H_HEADERS) src/scheduler.str \
+ include/pmc/pmc_scheduler.h include/pmc/pmc_task.h \
+ include/pmc/pmc_timer.h \
$(INC_DIR)/scheduler_private.h
-$(IO_DIR)/core$(O) : $(PARROT_H_HEADERS) $(IO_DIR)/io_private.h
+src/io/core$(O) : $(PARROT_H_HEADERS) src/io/io_private.h
-$(IO_DIR)/socket_api$(O) : $(PARROT_H_HEADERS) $(IO_DIR)/io_private.h $(IO_DIR)/api.str $(PMC_INC_DIR)/pmc/pmc_socket.h
+src/io/socket_api$(O) : $(PARROT_H_HEADERS) src/io/io_private.h src/io/api.str include/pmc/pmc_socket.h
-$(IO_DIR)/socket_unix$(O) : $(PARROT_H_HEADERS) $(PMC_INC_DIR)/pmc/pmc_socket.h $(IO_DIR)/io_private.h
+src/io/socket_unix$(O) : $(PARROT_H_HEADERS) include/pmc/pmc_socket.h src/io/io_private.h
-$(IO_DIR)/socket_win32$(O) : $(PARROT_H_HEADERS) \
- $(IO_DIR)/io_private.h \
- $(PMC_INC_DIR)/pmc/pmc_socket.h
+src/io/socket_win32$(O) : $(PARROT_H_HEADERS) \
+ src/io/io_private.h \
+ include/pmc/pmc_socket.h
+
+O_FILES = \
+ $(INTERP_O_FILES) \
+ $(CHARSET_O_FILES) \
+ $(IO_O_FILES) \
+ $(CLASS_O_FILES) \
+ $(ENCODING_O_FILES) \
+ $(IMCC_O_FILES)
lib_deps_object : $(O_FILES)
$(PERL) tools/dev/lib_deps.pl object $(O_FILES)
@@ -966,22 +930,18 @@
#IF(libparrot_shared_alias): ( cd @blib_dir@ ; ln -sf @libparrot_shared@ @libparrot_shared_alias@ )
-$(INSTALLABLECONFIG) : $(SRC_DIR)/install_config$(O) $(PARROT_CONFIG) $(PBC_TO_EXE)
+$(INSTALLABLECONFIG) : src/install_config$(O) $(PARROT_CONFIG) $(PBC_TO_EXE)
$(PARROT) -o parrot_config.pbc tools/util/parrot-config.pir
$(PBC_TO_EXE) parrot_config.pbc --install
-$(INSTALLABLEPBCTOEXE) : $(PBC_TO_EXE) $(SRC_DIR)/install_config$(O)
+$(INSTALLABLEPBCTOEXE) : $(PBC_TO_EXE) src/install_config$(O)
$(PBC_TO_EXE) pbc_to_exe.pbc --install
-$(INSTALLABLENQP) : runtime/parrot/library/nqp-rx.pbc $(SRC_DIR)/install_config$(O) $(PBC_TO_EXE)
- $(CP) runtime/parrot/library/nqp-rx.pbc parrot-nqp.pbc
- $(PBC_TO_EXE) parrot-nqp.pbc --install
-
#
# Parrot Debugger
#
-$(SRC_DIR)/parrot_debugger$(O) : $(INC_DIR)/embed.h \
+src/parrot_debugger$(O) : $(INC_DIR)/embed.h \
$(INC_DIR)/runcore_api.h \
compilers/imcc/imc.h $(PARROT_H_HEADERS) compilers/imcc/parser.h \
compilers/imcc/cfg.h \
@@ -993,17 +953,17 @@
compilers/imcc/unit.h \
$(INC_DIR)/oplib/ops.h
-$(PDB) : $(SRC_DIR)/parrot_debugger$(O) $(SRC_DIR)/parrot_config$(O) $(LIBPARROT)
+$(PDB) : src/parrot_debugger$(O) src/parrot_config$(O) $(LIBPARROT)
$(LINK) @ld_out@$@ \
- $(SRC_DIR)/parrot_debugger$(O) \
- $(SRC_DIR)/parrot_config$(O) \
+ src/parrot_debugger$(O) \
+ src/parrot_config$(O) \
@rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
-$(INSTALLABLEPDB) : $(SRC_DIR)/parrot_debugger$(O) $(LIBPARROT) $(SRC_DIR)/parrot_config$(O)
+$(INSTALLABLEPDB) : src/parrot_debugger$(O) $(LIBPARROT) src/parrot_config$(O)
$(LINK) @ld_out@$@ \
- $(SRC_DIR)/parrot_debugger$(O) \
- $(SRC_DIR)/parrot_config$(O) \
+ src/parrot_debugger$(O) \
+ src/parrot_config$(O) \
@rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
@@ -1011,40 +971,40 @@
# Parrot Disassembler
#
-$(SRC_DIR)/pbc_disassemble$(O) : $(INC_DIR)/embed.h $(PARROT_H_HEADERS)
+src/pbc_disassemble$(O) : $(INC_DIR)/embed.h $(PARROT_H_HEADERS)
-$(DIS) : $(SRC_DIR)/pbc_disassemble$(O) $(LIBPARROT)
+$(DIS) : src/pbc_disassemble$(O) $(LIBPARROT)
$(LINK) @ld_out@$@ \
- $(SRC_DIR)/pbc_disassemble$(O) \
+ src/pbc_disassemble$(O) \
@rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
-$(INSTALLABLEDIS) : $(SRC_DIR)/pbc_disassemble$(O) \
- $(SRC_DIR)/install_config$(O) $(LIBPARROT)
+$(INSTALLABLEDIS) : src/pbc_disassemble$(O) \
+ src/install_config$(O) $(LIBPARROT)
$(LINK) @ld_out@$@ \
- $(SRC_DIR)/pbc_disassemble$(O) \
+ src/pbc_disassemble$(O) \
@rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
#
# Parrot Dump
#
-$(SRC_DIR)/packdump$(O) : $(PARROT_H_HEADERS) $(PMC_INC_DIR)/pmc/pmc_sub.h $(PMC_INC_DIR)/pmc/pmc_key.h
+src/packdump$(O) : $(PARROT_H_HEADERS) include/pmc/pmc_sub.h include/pmc/pmc_key.h
-$(PDUMP) : $(SRC_DIR)/pbc_dump$(O) $(SRC_DIR)/packdump$(O) $(LIBPARROT)
+$(PDUMP) : src/pbc_dump$(O) src/packdump$(O) $(LIBPARROT)
$(LINK) @ld_out@$@ \
- $(SRC_DIR)/pbc_dump$(O) \
- $(SRC_DIR)/packdump$(O) @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
+ src/pbc_dump$(O) \
+ src/packdump$(O) @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
-$(SRC_DIR)/pbc_dump$(O) : $(INC_DIR)/embed.h $(INC_DIR)/oplib/ops.h \
+src/pbc_dump$(O) : $(INC_DIR)/embed.h $(INC_DIR)/oplib/ops.h \
$(PARROT_H_HEADERS)
-$(INSTALLABLEPDUMP) : $(SRC_DIR)/pbc_dump$(O) $(SRC_DIR)/packdump$(O) \
- $(SRC_DIR)/install_config$(O) $(LIBPARROT)
+$(INSTALLABLEPDUMP) : src/pbc_dump$(O) src/packdump$(O) \
+ src/install_config$(O) $(LIBPARROT)
$(LINK) @ld_out@$@ \
- $(SRC_DIR)/pbc_dump$(O) \
- $(SRC_DIR)/packdump$(O) \
+ src/pbc_dump$(O) \
+ src/packdump$(O) \
@rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
@@ -1054,17 +1014,17 @@
# Parrot Bytecode File Merger
#
-$(PBCMERGE) : $(SRC_DIR)/pbc_merge$(O) $(LIBPARROT) $(SRC_DIR)/parrot_config$(O)
+$(PBC_MERGE) : src/pbc_merge$(O) $(LIBPARROT) src/parrot_config$(O)
$(LINK) @ld_out@$@ \
- $(SRC_DIR)/pbc_merge$(O) \
- $(SRC_DIR)/parrot_config$(O) \
+ src/pbc_merge$(O) \
+ src/parrot_config$(O) \
@rpath_blib@ $(ALL_PARROT_LIBS) $(LINK_DYNAMIC) $(LINKFLAGS)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
-$(INSTALLABLEPBCMERGE) : $(SRC_DIR)/pbc_merge$(O) $(LIBPARROT) $(INSTALLABLECONFIG)
+$(INSTALLABLEPBC_MERGE) : src/pbc_merge$(O) $(LIBPARROT) $(INSTALLABLECONFIG)
$(LINK) @ld_out@$@ \
- $(SRC_DIR)/pbc_merge$(O) \
- $(SRC_DIR)/install_config$(O) \
+ src/pbc_merge$(O) \
+ src/install_config$(O) \
@rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
@@ -1075,8 +1035,93 @@
#
###############################################################################
-$(INC_DIR)/oplib/ops.h lib/Parrot/OpLib/core.pm : $(OPS_FILES) $(BUILD_TOOLS_DIR)/ops2pm.pl \
- lib/Parrot/OpsFile.pm lib/Parrot/Op.pm $(OPS_DIR)/ops.num $(OPS_DIR)/ops.skip
+
+runtime/parrot/include/interpflags.pasm : $(INC_DIR)/interpreter.h $(H2INC)
+ $(PERL) $(H2INC) $(INC_DIR)/interpreter.h $@
+runtime/parrot/include/interpdebug.pasm : $(INC_DIR)/interpreter.h $(H2INC)
+ $(PERL) $(H2INC) $(INC_DIR)/interpreter.h $@
+runtime/parrot/include/interptrace.pasm : $(INC_DIR)/interpreter.h $(H2INC)
+ $(PERL) $(H2INC) $(INC_DIR)/interpreter.h $@
+runtime/parrot/include/interpcores.pasm : $(INC_DIR)/interpreter.h $(H2INC)
+ $(PERL) $(H2INC) $(INC_DIR)/interpreter.h $@
+runtime/parrot/include/cloneflags.pasm : $(INC_DIR)/interpreter.h $(H2INC)
+ $(PERL) $(H2INC) $(INC_DIR)/interpreter.h $@
+runtime/parrot/include/iglobals.pasm : $(INC_DIR)/interpreter.h $(H2INC)
+ $(PERL) $(H2INC) $(INC_DIR)/interpreter.h $@
+runtime/parrot/include/sysinfo.pasm : $(INC_DIR)/interpreter.h $(H2INC)
+ $(PERL) $(H2INC) $(INC_DIR)/interpreter.h $@
+
+runtime/parrot/include/interpinfo.pasm : $(INC_DIR)/gc_api.h $(H2INC)
+ $(PERL) $(H2INC) $(INC_DIR)/gc_api.h $@
+
+runtime/parrot/include/timer.pasm : $(INC_DIR)/scheduler.h $(H2INC)
+ $(PERL) $(H2INC) $(INC_DIR)/scheduler.h $@
+
+runtime/parrot/include/pmctypes.pasm : $(INC_DIR)/core_pmcs.h $(H2INC)
+ $(PERL) $(H2INC) $(INC_DIR)/core_pmcs.h $@
+
+runtime/parrot/include/stdio.pasm : $(INC_DIR)/io.h $(H2INC)
+ $(PERL) $(H2INC) $(INC_DIR)/io.h $@
+runtime/parrot/include/socket.pasm : $(INC_DIR)/io.h $(H2INC)
+ $(PERL) $(H2INC) $(INC_DIR)/io.h $@
+
+runtime/parrot/include/io_thr_msg.pasm : $(INC_DIR)/events.h $(H2INC)
+ $(PERL) $(H2INC) $(INC_DIR)/events.h $@
+
+runtime/parrot/include/hash_key_type.pasm : $(INC_DIR)/hash.h $(H2INC)
+ $(PERL) $(H2INC) $(INC_DIR)/hash.h $@
+
+runtime/parrot/include/iterator.pasm : $(INC_DIR)/enums.h $(H2INC)
+ $(PERL) $(H2INC) $(INC_DIR)/enums.h $@
+runtime/parrot/include/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 $@
+
+runtime/parrot/include/libpaths.pasm : $(INC_DIR)/library.h $(H2INC)
+ $(PERL) $(H2INC) $(INC_DIR)/library.h $@
+
+runtime/parrot/include/datatypes.pasm : $(INC_DIR)/datatypes.h $(H2INC)
+ $(PERL) $(H2INC) $(INC_DIR)/datatypes.h $@
+
+runtime/parrot/include/stat.pasm : $(INC_DIR)/stat.h $(H2INC)
+ $(PERL) $(H2INC) $(INC_DIR)/stat.h $@
+
+runtime/parrot/include/stringinfo.pasm : $(INC_DIR)/string.h $(H2INC)
+ $(PERL) $(H2INC) $(INC_DIR)/string.h $@
+
+runtime/parrot/include/longopt.pasm : $(INC_DIR)/longopt.h $(H2INC)
+ $(PERL) $(H2INC) $(INC_DIR)/longopt.h $@
+
+runtime/parrot/include/cclass.pasm : $(INC_DIR)/cclass.h $(H2INC)
+ $(PERL) $(H2INC) $(INC_DIR)/cclass.h $@
+
+runtime/parrot/include/packfile_segments.pasm : $(INC_DIR)/packfile.h $(H2INC)
+ $(PERL) $(H2INC) $(INC_DIR)/packfile.h $@
+runtime/parrot/include/packfile_constants.pasm : $(INC_DIR)/packfile.h $(H2INC)
+ $(PERL) $(H2INC) $(INC_DIR)/packfile.h $@
+runtime/parrot/include/packfile_annotation_key_type.pasm : $(INC_DIR)/packfile.h $(H2INC)
+ $(PERL) $(H2INC) $(INC_DIR)/packfile.h $@
+
+runtime/parrot/include/except_types.pasm : $(INC_DIR)/exceptions.h $(H2INC)
+ $(PERL) $(H2INC) $(INC_DIR)/exceptions.h $@
+runtime/parrot/include/except_severity.pasm : $(INC_DIR)/exceptions.h $(H2INC)
+ $(PERL) $(H2INC) $(INC_DIR)/exceptions.h $@
+
+runtime/parrot/include/warnings.pasm : $(INC_DIR)/warnings.h $(H2INC)
+ $(PERL) $(H2INC) $(INC_DIR)/warnings.h $@
+runtime/parrot/include/errors.pasm : $(INC_DIR)/warnings.h $(H2INC)
+ $(PERL) $(H2INC) $(INC_DIR)/warnings.h $@
+
+runtime/parrot/include/tm.pasm : src/utils.c $(H2INC)
+ $(PERL) $(H2INC) src/utils.c $@
+
+
+# ops.h is built by ops2pm.pl after it builds core.pm
+$(INC_DIR)/oplib/ops.h: lib/Parrot/OpLib/core.pm
+
+lib/Parrot/OpLib/core.pm : $(OPS_FILES) $(BUILD_TOOLS_DIR)/ops2pm.pl \
+ lib/Parrot/OpsFile.pm lib/Parrot/Op.pm src/ops/ops.num src/ops/ops.skip
$(PERL) $(BUILD_TOOLS_DIR)/ops2pm.pl @no_lines_flag@ $(OPS_FILES)
###############################################################################
@@ -1095,7 +1140,7 @@
# hello
hello: test_prep examples/pasm/hello$(EXE)
- $(CUR_DIR)/examples/pasm/hello$(EXE) "from your friendly makefile"
+ ./examples/pasm/hello$(EXE) "from your friendly makefile"
examples/pasm/hello.pbc: examples/pasm/hello.pasm
$(PARROT) -o examples/pasm/hello.pbc examples/pasm/hello.pasm
@@ -1114,131 +1159,131 @@
#
###############################################################################
-$(SRC_DIR)/byteorder$(O) : $(PARROT_H_HEADERS)
+src/byteorder$(O) : $(PARROT_H_HEADERS)
-$(SRC_DIR)/datatypes$(O) : $(PARROT_H_HEADERS)
+src/datatypes$(O) : $(PARROT_H_HEADERS)
-$(SRC_DIR)/extend_vtable$(O) : $(PARROT_H_HEADERS) \
+src/extend_vtable$(O) : $(PARROT_H_HEADERS) \
$(INC_DIR)/extend.h $(INC_DIR)/extend_vtable.h
-$(SRC_DIR)/global_setup$(O) : $(PARROT_H_HEADERS) $(SRC_DIR)/global_setup.str
+src/global_setup$(O) : $(PARROT_H_HEADERS) src/global_setup.str
-$(SRC_DIR)/global$(O) : $(PARROT_H_HEADERS) $(SRC_DIR)/global.str \
- $(PMC_INC_DIR)/pmc/pmc_sub.h
+src/global$(O) : $(PARROT_H_HEADERS) src/global.str \
+ include/pmc/pmc_sub.h
-$(SRC_DIR)/pmc$(O) : $(PMC_INC_DIR)/pmc/pmc_class.h \
- $(SRC_DIR)/pmc.str $(PARROT_H_HEADERS)
+src/pmc$(O) : include/pmc/pmc_class.h \
+ src/pmc.str $(PARROT_H_HEADERS)
-$(SRC_DIR)/pmc_freeze$(O) : $(PARROT_H_HEADERS) $(SRC_DIR)/pmc_freeze.str
+src/pmc_freeze$(O) : $(PARROT_H_HEADERS) src/pmc_freeze.str
-$(SRC_DIR)/hash$(O) : $(PARROT_H_HEADERS) $(PMC_INC_DIR)/pmc/pmc_key.h
+src/hash$(O) : $(PARROT_H_HEADERS) include/pmc/pmc_key.h
-$(SRC_DIR)/list$(O) : $(PARROT_H_HEADERS)
+src/list$(O) : $(PARROT_H_HEADERS)
-$(SRC_DIR)/library$(O) : $(PARROT_H_HEADERS) $(SRC_DIR)/library.str \
+src/library$(O) : $(PARROT_H_HEADERS) src/library.str \
$(INC_DIR)/dynext.h
-$(INC_DIR)/extend_vtable.h $(SRC_DIR)/extend_vtable.c $(SRC_DIR)/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_DIR)/key$(O) : $(PARROT_H_HEADERS) $(SRC_DIR)/key.str \
- $(PMC_INC_DIR)/pmc/pmc_key.h
+src/key$(O) : $(PARROT_H_HEADERS) src/key.str \
+ include/pmc/pmc_key.h
-$(SRC_DIR)/gc/mark_sweep$(O) : $(PARROT_H_HEADERS) $(SRC_DIR)/gc/gc_private.h
+src/gc/mark_sweep$(O) : $(PARROT_H_HEADERS) src/gc/gc_private.h
-$(SRC_DIR)/gc/gc_ms$(O) : $(PARROT_H_HEADERS) $(SRC_DIR)/gc/gc_private.h
+src/gc/gc_ms$(O) : $(PARROT_H_HEADERS) src/gc/gc_private.h
-$(SRC_DIR)/gc/gc_inf$(O) : $(PARROT_H_HEADERS) $(SRC_DIR)/gc/gc_private.h
+src/gc/gc_inf$(O) : $(PARROT_H_HEADERS) src/gc/gc_private.h
-$(SRC_DIR)/gc/api$(O) : $(PARROT_H_HEADERS) $(SRC_DIR)/gc/gc_private.h
+src/gc/api$(O) : $(PARROT_H_HEADERS) src/gc/gc_private.h
-$(SRC_DIR)/gc/alloc_resources$(O) : $(PARROT_H_HEADERS) \
- $(SRC_DIR)/gc/gc_private.h
+src/gc/alloc_resources$(O) : $(PARROT_H_HEADERS) \
+ src/gc/gc_private.h
-$(SRC_DIR)/hll$(O) : $(PARROT_H_HEADERS) $(SRC_DIR)/hll.str $(INC_DIR)/dynext.h
+src/hll$(O) : $(PARROT_H_HEADERS) src/hll.str $(INC_DIR)/dynext.h
-$(SRC_DIR)/platform$(O) : $(PARROT_H_HEADERS)
+src/platform$(O) : $(PARROT_H_HEADERS)
-#IF(platform_asm):$(SRC_DIR)/platform_asm$(O) : $(PARROT_H_HEADERS)
+#IF(platform_asm):src/platform_asm$(O) : $(PARROT_H_HEADERS)
#IF(platform_asm):
-$(SRC_DIR)/core_pmcs$(O) : $(PARROT_H_HEADERS)
+src/core_pmcs$(O) : $(PARROT_H_HEADERS)
-$(SRC_DIR)/runcore/trace$(O) : $(PMC_INC_DIR)/pmc/pmc_sub.h \
+src/runcore/trace$(O) : include/pmc/pmc_sub.h \
$(INC_DIR)/oplib/ops.h $(INC_DIR)/runcore_trace.h \
$(PARROT_H_HEADERS)
-$(SRC_DIR)/debug$(O) : $(INC_DIR)/embed.h $(INC_DIR)/extend.h \
+src/debug$(O) : $(INC_DIR)/embed.h $(INC_DIR)/extend.h \
$(PARROT_H_HEADERS) \
$(INC_DIR)/oplib/ops.h \
$(INC_DIR)/runcore_api.h $(INC_DIR)/runcore_trace.h \
- $(SRC_DIR)/debug.str $(PMC_INC_DIR)/pmc/pmc_key.h \
- $(PMC_INC_DIR)/pmc/pmc_continuation.h \
+ src/debug.str include/pmc/pmc_key.h \
+ include/pmc/pmc_continuation.h \
$(INC_DIR)/extend_vtable.h
-$(SRC_DIR)/sub$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/oplib/ops.h \
- $(SRC_DIR)/sub.str \
- $(PMC_INC_DIR)/pmc/pmc_sub.h $(PMC_INC_DIR)/pmc/pmc_continuation.h
+src/sub$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/oplib/ops.h \
+ src/sub.str \
+ include/pmc/pmc_sub.h include/pmc/pmc_continuation.h
-$(SRC_DIR)/string/api$(O) : $(PARROT_H_HEADERS) $(SRC_DIR)/string/api.str \
- $(SRC_DIR)/string/private_cstring.h
+src/string/api$(O) : $(PARROT_H_HEADERS) src/string/api.str \
+ src/string/private_cstring.h
-$(SRC_DIR)/string/primitives$(O) : $(PARROT_H_HEADERS)
+src/string/primitives$(O) : $(PARROT_H_HEADERS)
-$(SRC_DIR)/longopt$(O) : $(PARROT_H_HEADERS)
+src/longopt$(O) : $(PARROT_H_HEADERS)
-$(SRC_DIR)/dynext$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/dynext.h \
- $(SRC_DIR)/dynext.str $(PMC_INC_DIR)/pmc/pmc_parrotlibrary.h
+src/dynext$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/dynext.h \
+ src/dynext.str include/pmc/pmc_parrotlibrary.h
-$(SRC_DIR)/exceptions$(O) : $(PARROT_H_HEADERS) \
- $(SRC_DIR)/exceptions.str \
- $(PMC_INC_DIR)/pmc/pmc_continuation.h
+src/exceptions$(O) : $(PARROT_H_HEADERS) \
+ src/exceptions.str \
+ include/pmc/pmc_continuation.h
-$(SRC_DIR)/events$(O) : $(PARROT_H_HEADERS) $(SRC_DIR)/events.str
+src/events$(O) : $(PARROT_H_HEADERS) src/events.str
-$(SRC_DIR)/thread$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/atomic.h \
- $(PMC_INC_DIR)/pmc/pmc_sub.h \
- $(PMC_INC_DIR)/pmc/pmc_parrotinterpreter.h
+src/thread$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/atomic.h \
+ include/pmc/pmc_sub.h \
+ include/pmc/pmc_parrotinterpreter.h
-$(SRC_DIR)/extend$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/extend.h \
- $(PMC_INC_DIR)/pmc/pmc_sub.h $(INC_DIR)/extend_vtable.h
+src/extend$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/extend.h \
+ include/pmc/pmc_sub.h $(INC_DIR)/extend_vtable.h
-$(SRC_DIR)/runcore/main$(O) : \
- $(SRC_DIR)/runcore/main.str \
- $(PMC_INC_DIR)/pmc/pmc_parrotlibrary.h \
+src/runcore/main$(O) : \
+ src/runcore/main.str \
+ include/pmc/pmc_parrotlibrary.h \
$(INC_DIR)/dynext.h $(INC_DIR)/oplib/core_ops.h \
$(INC_DIR)/oplib/core_ops_switch.h $(INC_DIR)/oplib/ops.h \
$(PARROT_H_HEADERS) $(INC_DIR)/runcore_api.h \
$(INC_DIR)/runcore_profiling.h
-$(SRC_DIR)/runcore/profiling$(O) : $(SRC_DIR)/runcore/profiling.str \
- $(PMC_INC_DIR)/pmc/pmc_sub.h \
- $(PMC_INC_DIR)/pmc/pmc_namespace.h \
+src/runcore/profiling$(O) : src/runcore/profiling.str \
+ include/pmc/pmc_sub.h \
+ include/pmc/pmc_namespace.h \
$(INC_DIR)/oplib/core_ops.h $(INC_DIR)/runcore_api.h \
$(INC_DIR)/runcore_profiling.h $(INC_DIR)/embed.h \
$(PARROT_H_HEADERS)
-$(SRC_DIR)/call/args$(O) : \
+src/call/args$(O) : \
$(PARROT_H_HEADERS) $(INC_DIR)/oplib/ops.h \
- $(SRC_DIR)/call/args.str \
- $(PMC_INC_DIR)/pmc/pmc_key.h \
- $(PMC_INC_DIR)/pmc/pmc_fixedintegerarray.h
+ src/call/args.str \
+ include/pmc/pmc_key.h \
+ include/pmc/pmc_fixedintegerarray.h
-$(SRC_DIR)/call/context_accessors$(O): $(PARROT_H_HEADERS)
+src/call/context_accessors$(O): $(PARROT_H_HEADERS)
-$(SRC_DIR)/call/pcc$(O) : $(INC_DIR)/oplib/ops.h \
+src/call/pcc$(O) : $(INC_DIR)/oplib/ops.h \
$(PARROT_H_HEADERS) \
$(INC_DIR)/runcore_api.h \
- $(SRC_DIR)/call/pcc.str \
- $(PMC_INC_DIR)/pmc/pmc_key.h $(PMC_INC_DIR)/pmc/pmc_continuation.h
+ src/call/pcc.str \
+ include/pmc/pmc_key.h include/pmc/pmc_continuation.h
-$(SRC_DIR)/call/context$(O) : $(PARROT_H_HEADERS) \
- $(PMC_INC_DIR)/pmc/pmc_sub.h
+src/call/context$(O) : $(PARROT_H_HEADERS) \
+ include/pmc/pmc_sub.h
-$(SRC_DIR)/interp/inter_cb$(O) : $(PARROT_H_HEADERS) \
- $(SRC_DIR)/interp/inter_cb.str
+src/interp/inter_cb$(O) : $(PARROT_H_HEADERS) \
+ src/interp/inter_cb.str
-$(SRC_DIR)/interp/inter_misc$(O) : $(PARROT_H_HEADERS) \
- $(SRC_DIR)/interp/inter_misc.str \
+src/interp/inter_misc$(O) : $(PARROT_H_HEADERS) \
+ src/interp/inter_misc.str \
compilers/imcc/imc.h \
compilers/imcc/cfg.h \
compilers/imcc/debug.h \
@@ -1249,9 +1294,9 @@
$(INC_DIR)/oplib/ops.h \
$(INC_DIR)/runcore_api.h
-$(SRC_DIR)/interp/inter_create$(O) : $(PARROT_H_HEADERS) \
+src/interp/inter_create$(O) : $(PARROT_H_HEADERS) \
$(INC_DIR)/oplib/core_ops.h \
- $(SRC_DIR)/interp/inter_create.str \
+ src/interp/inter_create.str \
compilers/imcc/imc.h \
compilers/imcc/cfg.h \
compilers/imcc/debug.h \
@@ -1262,35 +1307,35 @@
$(INC_DIR)/oplib/ops.h \
$(INC_DIR)/runcore_api.h
-$(SRC_DIR)/call/ops$(O) : $(INC_DIR)/oplib/ops.h \
- $(PARROT_H_HEADERS) $(PMC_INC_DIR)/pmc/pmc_continuation.h
+src/call/ops$(O) : $(INC_DIR)/oplib/ops.h \
+ $(PARROT_H_HEADERS) include/pmc/pmc_continuation.h
-$(IO_DIR)/api$(O) : $(PARROT_H_HEADERS) $(IO_DIR)/io_private.h \
- $(IO_DIR)/api.str $(PMC_INC_DIR)/pmc/pmc_filehandle.h \
- $(PMC_INC_DIR)/pmc/pmc_stringhandle.h
+src/io/api$(O) : $(PARROT_H_HEADERS) src/io/io_private.h \
+ src/io/api.str include/pmc/pmc_filehandle.h \
+ include/pmc/pmc_stringhandle.h
-$(IO_DIR)/buffer$(O) : $(PARROT_H_HEADERS) $(IO_DIR)/io_private.h
+src/io/buffer$(O) : $(PARROT_H_HEADERS) src/io/io_private.h
-$(IO_DIR)/portable$(O) : $(PARROT_H_HEADERS) $(IO_DIR)/io_private.h
+src/io/portable$(O) : $(PARROT_H_HEADERS) src/io/io_private.h
-$(IO_DIR)/unix$(O) : $(PARROT_H_HEADERS) $(IO_DIR)/io_private.h $(PMC_INC_DIR)/pmc/pmc_filehandle.h
+src/io/unix$(O) : $(PARROT_H_HEADERS) src/io/io_private.h include/pmc/pmc_filehandle.h
-$(IO_DIR)/utf8$(O) : $(PARROT_H_HEADERS) $(IO_DIR)/io_private.h $(SRC_DIR)/string/unicode.h
+src/io/utf8$(O) : $(PARROT_H_HEADERS) src/io/io_private.h src/string/unicode.h
-$(IO_DIR)/win32$(O) : $(PARROT_H_HEADERS) $(IO_DIR)/io_private.h $(PMC_INC_DIR)/pmc/pmc_filehandle.h
+src/io/win32$(O) : $(PARROT_H_HEADERS) src/io/io_private.h include/pmc/pmc_filehandle.h
-$(SRC_DIR)/gc/alloc_memory$(O) : $(PARROT_H_HEADERS)
+src/gc/alloc_memory$(O) : $(PARROT_H_HEADERS)
-$(SRC_DIR)/main$(O) : $(INC_DIR)/imcc.h $(PARROT_H_HEADERS) \
+src/main$(O) : $(INC_DIR)/imcc.h $(PARROT_H_HEADERS) \
$(INC_DIR)/embed.h
-$(SRC_DIR)/multidispatch$(O) : \
- $(SRC_DIR)/multidispatch.str \
+src/multidispatch$(O) : \
+ src/multidispatch.str \
$(INC_DIR)/oplib/ops.h $(PARROT_H_HEADERS) \
- $(PMC_INC_DIR)/pmc/pmc_nci.h $(PMC_INC_DIR)/pmc/pmc_sub.h
+ include/pmc/pmc_nci.h include/pmc/pmc_sub.h
-$(SRC_DIR)/packfile$(O) : $(SRC_DIR)/packfile.str \
- $(PMC_INC_DIR)/pmc/pmc_sub.h $(PMC_INC_DIR)/pmc/pmc_key.h \
+src/packfile$(O) : src/packfile.str \
+ include/pmc/pmc_sub.h include/pmc/pmc_key.h \
compilers/imcc/imc.h \
compilers/imcc/cfg.h \
compilers/imcc/debug.h \
@@ -1302,22 +1347,22 @@
$(INC_DIR)/embed.h $(INC_DIR)/extend.h $(INC_DIR)/extend_vtable.h \
$(PARROT_H_HEADERS) $(INC_DIR)/runcore_api.h
-$(PF_DIR)/pf_items$(O) : $(PARROT_H_HEADERS)
+src/packfile/pf_items$(O) : $(PARROT_H_HEADERS)
-$(SRC_DIR)/packout$(O) : $(PARROT_H_HEADERS) $(PMC_INC_DIR)/pmc/pmc_key.h
+src/packout$(O) : $(PARROT_H_HEADERS) include/pmc/pmc_key.h
-$(SRC_DIR)/parrot$(O) : $(GENERAL_H_FILES)
+src/parrot$(O) : $(GENERAL_H_FILES)
-$(SRC_DIR)/runcore/cores$(O) : $(SRC_DIR)/runcore/cores.str \
- $(PMC_INC_DIR)/pmc/pmc_sub.h \
+src/runcore/cores$(O) : src/runcore/cores.str \
+ include/pmc/pmc_sub.h \
$(INC_DIR)/dynext.h $(INC_DIR)/embed.h $(INC_DIR)/oplib/core_ops.h \
$(INC_DIR)/oplib/core_ops_switch.h $(INC_DIR)/oplib/ops.h \
$(INC_DIR)/runcore_api.h $(INC_DIR)/runcore_trace.h \
$(PARROT_H_HEADERS)
-$(SRC_DIR)/tsq$(O) : $(PARROT_H_HEADERS)
+src/tsq$(O) : $(PARROT_H_HEADERS)
-$(SRC_DIR)/embed$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/embed.h \
+src/embed$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/embed.h \
$(INC_DIR)/oplib/ops.h $(INC_DIR)/runcore_api.h \
compilers/imcc/imc.h \
compilers/imcc/cfg.h \
@@ -1326,370 +1371,66 @@
compilers/imcc/sets.h \
compilers/imcc/symreg.h \
compilers/imcc/unit.h \
- $(PMC_INC_DIR)/pmc/pmc_sub.h
+ include/pmc/pmc_sub.h
-$(SRC_DIR)/dataypes$(O) : $(GENERAL_H_FILES) $(SRC_DIR)/dataypes.c
+src/dataypes$(O) : $(GENERAL_H_FILES) src/dataypes.c
-$(SRC_DIR)/exit$(O) : $(PARROT_H_HEADERS)
+src/exit$(O) : $(PARROT_H_HEADERS)
-$(SRC_DIR)/nci$(O) : $(SRC_DIR)/nci.str \
+src/nci$(O) : src/nci.str \
$(INC_DIR)/oplib/ops.h $(PARROT_H_HEADERS) \
- $(SRC_DIR)/frame_builder.h \
- $(PMC_INC_DIR)/pmc/pmc_managedstruct.h \
- $(PMC_INC_DIR)/pmc/pmc_nci.h \
- $(PMC_INC_DIR)/pmc/pmc_pointer.h
-
-$(SRC_DIR)/frame_builder$(O) : $(PARROT_H_HEADERS) $(SRC_DIR)/frame_builder.h \
- $(PMC_INC_DIR)/pmc/pmc_fixedintegerarray.h \
- $(PMC_INC_DIR)/pmc/pmc_unmanagedstruct.h \
- $(PMC_INC_DIR)/pmc/pmc_managedstruct.h \
+ src/frame_builder.h \
+ include/pmc/pmc_managedstruct.h \
+ include/pmc/pmc_nci.h \
+ include/pmc/pmc_pointer.h
+
+src/frame_builder$(O) : $(PARROT_H_HEADERS) src/frame_builder.h \
+ include/pmc/pmc_fixedintegerarray.h \
+ include/pmc/pmc_unmanagedstruct.h \
+ include/pmc/pmc_managedstruct.h \
$(INC_DIR)/oplib/ops.h
-$(SRC_DIR)/vtables$(O) : $(PARROT_H_HEADERS)
+src/vtables$(O) : $(PARROT_H_HEADERS)
-$(SRC_DIR)/gc/system$(O) : $(PARROT_H_HEADERS) $(SRC_DIR)/gc/gc_private.h
-$(SRC_DIR)/gc/gc_private.h : $(INC_DIR)/settings.h
+src/gc/system$(O) : $(PARROT_H_HEADERS) src/gc/gc_private.h
+src/gc/gc_private.h : $(INC_DIR)/settings.h
-$(SRC_DIR)/nci.c : $(SRC_DIR)/call_list.txt $(BUILD_TOOLS_DIR)/nativecall.pl \
- $(PMC_INC_DIR)/pmc/pmc_nci.h
- $(PERL) $(BUILD_TOOLS_DIR)/nativecall.pl $(SRC_DIR)/call_list.txt
-
-$(SRC_DIR)/warnings$(O) : $(PARROT_H_HEADERS)
-
-$(SRC_DIR)/misc$(O) : $(PARROT_H_HEADERS)
-
-$(SRC_DIR)/utils$(O) : $(PARROT_H_HEADERS) $(PMC_INC_DIR)/pmc/pmc_nci.h
-
-$(SRC_DIR)/spf_render$(O) : $(PARROT_H_HEADERS) $(SRC_DIR)/spf_render.str
-
-$(SRC_DIR)/spf_vtable$(O) : $(PARROT_H_HEADERS) $(SRC_DIR)/spf_vtable.str
-
-$(SRC_DIR)/string/encoding$(O) : $(PARROT_H_HEADERS)
-
-$(SRC_DIR)/string/charset$(O) : $(PARROT_H_HEADERS) \
- $(SRC_DIR)/string/encoding/fixed_8.h \
- $(SRC_DIR)/string/encoding/utf8.h \
- $(SRC_DIR)/string/encoding/utf16.h \
- $(SRC_DIR)/string/encoding/ucs2.h \
- $(SRC_DIR)/string/charset/ascii.h \
- $(SRC_DIR)/string/charset/binary.h \
- $(SRC_DIR)/string/charset/iso-8859-1.h \
- $(SRC_DIR)/string/charset/unicode.h
-
-$(SRC_DIR)/pbc_merge$(O) : $(INC_DIR)/embed.h \
- $(PMC_INC_DIR)/pmc/pmc_sub.h $(INC_DIR)/oplib/ops.h $(PARROT_H_HEADERS)
-
-$(IO_DIR)/filehandle$(O) : $(PARROT_H_HEADERS) $(PMC_INC_DIR)/pmc/pmc_filehandle.h $(SRC_DIR)/io/io_private.h
-
-compilers/pirc/src/piremit$(O) : $(PARROT_H_HEADERS) \
- compilers/pirc/src/piremit.h \
- compilers/pirc/src/pircompunit.h \
- compilers/pirc/src/pircompiler.h \
- compilers/pirc/src/pirerr.h \
- compilers/pirc/src/bcgen.h \
- compilers/pirc/src/pirdefines.h \
- compilers/pirc/src/pirmacro.h \
- compilers/pirc/src/pirregalloc.h \
- compilers/pirc/src/pirsymbol.h \
- compilers/pirc/src/piryy.h \
- $(INC_DIR)/embed.h \
- $(INC_DIR)/oplib/ops.h
+src/nci.c : src/call_list.txt $(BUILD_TOOLS_DIR)/nativecall.pl \
+ include/pmc/pmc_nci.h
+ $(PERL) $(BUILD_TOOLS_DIR)/nativecall.pl src/call_list.txt
-compilers/imcc/pcc$(O) : compilers/imcc/imc.h $(PARROT_H_HEADERS) compilers/imcc/parser.h \
- compilers/imcc/cfg.h compilers/imcc/debug.h compilers/imcc/instructions.h \
- compilers/imcc/sets.h compilers/imcc/symreg.h compilers/imcc/unit.h \
- $(INC_DIR)/oplib/ops.h compilers/imcc/imcparser.h
-
-compilers/imcc/instructions$(O) : compilers/imcc/imc.h $(PARROT_H_HEADERS) compilers/imcc/pbc.h \
- compilers/imcc/optimizer.h \
- compilers/imcc/cfg.h compilers/imcc/debug.h compilers/imcc/instructions.h \
- compilers/imcc/sets.h compilers/imcc/symreg.h compilers/imcc/unit.h \
- $(INC_DIR)/oplib/ops.h
+src/warnings$(O) : $(PARROT_H_HEADERS)
-src/dynpmc/subproxy$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/extend.h \
- $(INC_DIR)/dynext.h $(PMC_INC_DIR)/pmc/pmc_subproxy.h \
- $(PMC_INC_DIR)/pmc/pmc_sub.h $(PMC_INC_DIR)/pmc_default.h \
- $(PMC_INC_DIR)/pmc/pmc_continuation.h $(PMC_INC_DIR)/pmc/pmc_callcontext.h \
- $(PMC_INC_DIR)/pmc/pmc_default.h
-
-compilers/pirc/src/pirparser$(O) : $(PARROT_H_HEADERS) \
- compilers/pirc/src/pircompiler.h \
- compilers/pirc/src/pircompunit.h \
- compilers/pirc/src/pirdefines.h \
- compilers/pirc/src/pirparser.h \
- compilers/pirc/src/piryy.h \
- compilers/pirc/src/pirlexer.h \
- compilers/pirc/src/pirerr.h \
- compilers/pirc/src/pirop.h \
- compilers/pirc/src/pirpcc.h \
- compilers/pirc/src/pirmacro.h \
- compilers/pirc/src/pirregalloc.h \
- compilers/pirc/src/pirsymbol.h \
- compilers/pirc/src/bcgen.h \
- $(INC_DIR)/oplib/ops.h \
- $(INC_DIR)/embed.h
+src/misc$(O) : $(PARROT_H_HEADERS)
-compilers/pirc/src/pirerr$(O) : $(PARROT_H_HEADERS) \
- compilers/pirc/src/pircompiler.h \
- compilers/pirc/src/pircompunit.h \
- compilers/pirc/src/pirdefines.h \
- compilers/pirc/src/pirparser.h \
- compilers/pirc/src/piryy.h \
- compilers/pirc/src/pirlexer.h \
- compilers/pirc/src/pirerr.h \
- compilers/pirc/src/pirmacro.h \
- compilers/pirc/src/pirregalloc.h \
- compilers/pirc/src/pirsymbol.h \
- compilers/pirc/src/bcgen.h \
- $(INC_DIR)/embed.h
+src/utils$(O) : $(PARROT_H_HEADERS) include/pmc/pmc_nci.h
-compilers/imcc/parser.h : compilers/imcc/imcparser.h
+src/spf_render$(O) : $(PARROT_H_HEADERS) src/spf_render.str
-compilers/imcc/pbc$(O) : $(PARROT_H_HEADERS) \
- compilers/imcc/imc.h \
- compilers/imcc/pbc.h \
- $(PMC_INC_DIR)/pmc/pmc_sub.h \
- compilers/imcc/cfg.h compilers/imcc/debug.h compilers/imcc/instructions.h \
- compilers/imcc/sets.h compilers/imcc/symreg.h compilers/imcc/unit.h \
- $(INC_DIR)/oplib/ops.h
-
-compilers/imcc/parser_util$(O) : compilers/imcc/imc.h $(PARROT_H_HEADERS) \
- compilers/imcc/pbc.h \
- compilers/imcc/parser.h \
- compilers/imcc/optimizer.h \
- $(INC_DIR)/dynext.h $(INC_DIR)/embed.h \
- $(PMC_INC_DIR)/pmc/pmc_sub.h \
- compilers/imcc/cfg.h compilers/imcc/debug.h compilers/imcc/instructions.h \
- compilers/imcc/sets.h compilers/imcc/symreg.h compilers/imcc/unit.h \
- $(INC_DIR)/oplib/ops.h compilers/imcc/imcparser.h
-
-compilers/pirc/src/bcgen$(O) : \
- compilers/pirc/src/pirsymbol.h \
- compilers/pirc/src/pircompiler.h \
- compilers/pirc/src/pirregalloc.h \
- compilers/pirc/src/pircompunit.h \
- compilers/pirc/src/pirdefines.h \
- compilers/pirc/src/pirmacro.h \
- compilers/pirc/src/bcgen.h \
- $(PARROT_H_HEADERS) \
- $(INC_DIR)/embed.h \
- $(PMC_INC_DIR)/pmc/pmc_sub.h \
- $(PMC_INC_DIR)/pmc/pmc_namespace.h
-
-compilers/imcc/imc$(O) : \
- compilers/imcc/imc.h $(PARROT_H_HEADERS) \
- compilers/imcc/optimizer.h \
- compilers/imcc/cfg.h compilers/imcc/debug.h compilers/imcc/instructions.h \
- compilers/imcc/sets.h compilers/imcc/symreg.h compilers/imcc/unit.h \
- $(INC_DIR)/oplib/ops.h
-
-compilers/pirc/src/pirregalloc$(O) : $(PARROT_H_HEADERS) \
- compilers/pirc/src/pircompiler.h \
- compilers/pirc/src/pircompunit.h \
- compilers/pirc/src/pirdefines.h \
- compilers/pirc/src/pirmacro.h \
- compilers/pirc/src/pirregalloc.h \
- compilers/pirc/src/pirsymbol.h \
- compilers/pirc/src/bcgen.h \
- $(INC_DIR)/embed.h
-
-compilers/imcc/cfg$(O) : \
- compilers/imcc/imc.h $(PARROT_H_HEADERS) compilers/imcc/optimizer.h \
- compilers/imcc/cfg.h compilers/imcc/debug.h compilers/imcc/instructions.h \
- compilers/imcc/sets.h compilers/imcc/symreg.h compilers/imcc/unit.h \
- $(INC_DIR)/oplib/ops.h
-
-compilers/imcc/debug$(O) : \
- compilers/imcc/imc.h $(PARROT_H_HEADERS) \
- compilers/imcc/cfg.h compilers/imcc/debug.h compilers/imcc/instructions.h \
- compilers/imcc/sets.h compilers/imcc/symreg.h compilers/imcc/unit.h \
- $(INC_DIR)/oplib/ops.h
-
-compilers/imcc/imclexer$(O) : \
- compilers/imcc/imc.h $(PARROT_H_HEADERS) compilers/imcc/parser.h \
- compilers/imcc/cfg.h compilers/imcc/debug.h compilers/imcc/instructions.h \
- compilers/imcc/sets.h compilers/imcc/symreg.h compilers/imcc/unit.h \
- $(INC_DIR)/oplib/ops.h compilers/imcc/imcparser.h
-
-compilers/imcc/imcparser$(O) : \
- compilers/imcc/imc.h $(PARROT_H_HEADERS) compilers/imcc/parser.h compilers/imcc/pbc.h \
- compilers/imcc/optimizer.h \
- $(INC_DIR)/dynext.h \
- compilers/imcc/cfg.h compilers/imcc/debug.h compilers/imcc/imcparser.h \
- compilers/imcc/instructions.h \
- compilers/imcc/sets.h compilers/imcc/symreg.h compilers/imcc/unit.h \
- $(INC_DIR)/oplib/ops.h
-
-compilers/imcc/main$(O) : \
- compilers/imcc/imc.h $(PARROT_H_HEADERS) \
- compilers/imcc/parser.h compilers/imcc/pbc.h \
- $(INC_DIR)/embed.h \
- $(INC_DIR)/imcc.h $(INC_DIR)/runcore_api.h \
- compilers/imcc/cfg.h compilers/imcc/debug.h compilers/imcc/instructions.h \
- compilers/imcc/sets.h compilers/imcc/symreg.h compilers/imcc/unit.h \
- $(INC_DIR)/oplib/ops.h compilers/imcc/imcparser.h
-
-compilers/imcc/optimizer$(O) : \
- compilers/imcc/imc.h $(PARROT_H_HEADERS) \
- compilers/imcc/pbc.h compilers/imcc/optimizer.h \
- compilers/imcc/cfg.h compilers/imcc/debug.h compilers/imcc/instructions.h \
- compilers/imcc/sets.h compilers/imcc/symreg.h compilers/imcc/unit.h \
- $(INC_DIR)/oplib/ops.h
-
-compilers/imcc/reg_alloc$(O) : compilers/imcc/imc.h $(PARROT_H_HEADERS) compilers/imcc/optimizer.h \
- compilers/imcc/cfg.h compilers/imcc/debug.h compilers/imcc/instructions.h \
- compilers/imcc/sets.h compilers/imcc/symreg.h compilers/imcc/unit.h \
- $(INC_DIR)/oplib/ops.h
-
-compilers/imcc/sets$(O) : compilers/imcc/imc.h $(PARROT_H_HEADERS) compilers/imcc/sets.h \
- compilers/imcc/cfg.h compilers/imcc/debug.h compilers/imcc/instructions.h \
- compilers/imcc/symreg.h compilers/imcc/unit.h \
- $(INC_DIR)/oplib/ops.h
-
-compilers/imcc/symreg$(O) : compilers/imcc/imc.h $(PARROT_H_HEADERS) \
- compilers/imcc/sets.h \
- compilers/imcc/cfg.h compilers/imcc/debug.h compilers/imcc/instructions.h \
- compilers/imcc/symreg.h compilers/imcc/unit.h \
- $(INC_DIR)/oplib/ops.h
-compilers/pirc/heredoc/heredocmain$(O) : $(PARROT_H_HEADERS)
-
-compilers/pirc/macro/macrolexer$(O) : $(PARROT_H_HEADERS) \
- compilers/pirc/macro/macro.h \
- compilers/pirc/macro/lexer.h \
- compilers/pirc/macro/macroparser.h
-
-compilers/pirc/macro/macroparser$(O) : $(PARROT_H_HEADERS) \
- compilers/pirc/macro/macro.h \
- compilers/pirc/macro/lexer.h \
- compilers/pirc/macro/macroparser.h \
- compilers/pirc/macro/macrolexer.h
+src/spf_vtable$(O) : $(PARROT_H_HEADERS) src/spf_vtable.str
-compilers/pirc/src/hdocprep$(O) : $(PARROT_H_HEADERS) \
- $(INC_DIR)/embed.h compilers/pirc/src/pirheredoc.h
+src/string/encoding$(O) : $(PARROT_H_HEADERS)
-compilers/pirc/src/main$(O) : \
- $(PARROT_H_HEADERS) \
- $(INC_DIR)/embed.h \
- compilers/pirc/src/bcgen.h \
- compilers/pirc/src/pirparser.h \
- compilers/pirc/src/pircompiler.h \
- compilers/pirc/src/pircompunit.h \
- compilers/pirc/src/pirmacro.h \
- compilers/pirc/src/pirdefines.h \
- compilers/pirc/src/piremit.h \
- compilers/pirc/src/piryy.h \
- compilers/pirc/src/pirlexer.h \
- compilers/pirc/src/pirheredoc.h \
- compilers/pirc/src/pirsymbol.h \
- compilers/pirc/src/pirregalloc.h \
- compilers/pirc/src/pircapi.h
+src/string/charset$(O) : $(PARROT_H_HEADERS) \
+ src/string/encoding/fixed_8.h \
+ src/string/encoding/utf8.h \
+ src/string/encoding/utf16.h \
+ src/string/encoding/ucs2.h \
+ src/string/charset/ascii.h \
+ src/string/charset/binary.h \
+ src/string/charset/iso-8859-1.h \
+ src/string/charset/unicode.h
-compilers/pirc/src/pircapi$(O) : \
- $(PARROT_H_HEADERS) \
- compilers/pirc/src/bcgen.h \
- compilers/pirc/src/pircompiler.h \
- compilers/pirc/src/pirparser.h \
- compilers/pirc/src/pircompunit.h \
- compilers/pirc/src/pirsymbol.h \
- compilers/pirc/src/pirregalloc.h \
- compilers/pirc/src/pirmacro.h \
- compilers/pirc/src/pirdefines.h \
- compilers/pirc/src/piremit.h \
- compilers/pirc/src/piryy.h \
- compilers/pirc/src/pirlexer.h \
- compilers/pirc/src/pircapi.h \
- $(INC_DIR)/embed.h
+src/pbc_merge$(O) : $(INC_DIR)/embed.h \
+ include/pmc/pmc_sub.h $(INC_DIR)/oplib/ops.h $(PARROT_H_HEADERS)
-compilers/pirc/src/pircompiler$(O) : \
- compilers/pirc/src/pircompiler.h \
- $(PARROT_H_HEADERS) \
- compilers/pirc/src/piryy.h \
- compilers/pirc/src/pirmacro.h \
- compilers/pirc/src/pirregalloc.h \
- compilers/pirc/src/pirerr.h \
- compilers/pirc/src/bcgen.h \
- compilers/pirc/src/pircompunit.h \
- compilers/pirc/src/pirsymbol.h \
- compilers/pirc/src/pirdefines.h \
- $(INC_DIR)/embed.h
+src/io/filehandle$(O) : $(PARROT_H_HEADERS) include/pmc/pmc_filehandle.h src/io/io_private.h
-compilers/pirc/src/pircompunit$(O) : $(PARROT_H_HEADERS) \
- compilers/pirc/src/pircompunit.h \
- compilers/pirc/src/pircompiler.h \
- compilers/pirc/src/pirsymbol.h \
- compilers/pirc/src/piryy.h \
- compilers/pirc/src/pirdefines.h \
- compilers/pirc/src/pirregalloc.h \
- compilers/pirc/src/pirpcc.h \
- compilers/pirc/src/pirerr.h \
- compilers/pirc/src/pirmacro.h \
- compilers/pirc/src/pirop.h \
- compilers/pirc/src/bcgen.h \
- $(INC_DIR)/oplib/ops.h \
- $(INC_DIR)/dynext.h \
- $(INC_DIR)/embed.h
-
-compilers/pirc/src/pirlexer$(O) : $(PARROT_H_HEADERS) \
- compilers/pirc/src/pirparser.h \
- compilers/pirc/src/pirmacro.h \
- compilers/pirc/src/pirerr.h \
- compilers/pirc/src/pircompunit.h \
- compilers/pirc/src/pircompiler.h \
- compilers/pirc/src/pirsymbol.h \
- compilers/pirc/src/piryy.h \
- compilers/pirc/src/pirdefines.h \
- compilers/pirc/src/pirregalloc.h \
- compilers/pirc/src/bcgen.h \
- $(INC_DIR)/embed.h
-
-compilers/pirc/src/pirmacro$(O) : $(PARROT_H_HEADERS) \
- compilers/pirc/src/pirmacro.h \
- compilers/pirc/src/pircompunit.h \
- compilers/pirc/src/pircompiler.h \
- compilers/pirc/src/pirsymbol.h \
- compilers/pirc/src/pirdefines.h \
- compilers/pirc/src/pirregalloc.h \
- compilers/pirc/src/bcgen.h \
- $(INC_DIR)/embed.h
-
-compilers/pirc/src/pirop$(O) : $(PARROT_H_HEADERS) \
- compilers/pirc/src/pircompiler.h \
- compilers/pirc/src/pircompunit.h \
- compilers/pirc/src/pirop.h \
- compilers/pirc/src/pirerr.h \
- compilers/pirc/src/pirsymbol.h \
- compilers/pirc/src/piryy.h \
- compilers/pirc/src/pirdefines.h \
- compilers/pirc/src/pirregalloc.h \
- compilers/pirc/src/pirmacro.h \
- compilers/pirc/src/bcgen.h \
- $(INC_DIR)/embed.h
-
-compilers/pirc/src/pirpcc$(O) : $(PARROT_H_HEADERS) \
- compilers/pirc/src/pirpcc.h \
- compilers/pirc/src/pircompiler.h \
- compilers/pirc/src/pirerr.h \
- compilers/pirc/src/pircompunit.h \
- compilers/pirc/src/pirsymbol.h \
- compilers/pirc/src/piryy.h \
- compilers/pirc/src/pirdefines.h \
- compilers/pirc/src/pirregalloc.h \
- compilers/pirc/src/pirmacro.h \
- compilers/pirc/src/bcgen.h \
- $(INC_DIR)/oplib/ops.h \
- $(INC_DIR)/embed.h
-
-compilers/pirc/src/pirsymbol$(O) : $(PARROT_H_HEADERS) \
- compilers/pirc/src/pircompiler.h \
- compilers/pirc/src/pirsymbol.h \
- compilers/pirc/src/piryy.h \
- compilers/pirc/src/pirerr.h \
- compilers/pirc/src/pircompunit.h \
- compilers/pirc/src/pirdefines.h \
- compilers/pirc/src/pirregalloc.h \
- compilers/pirc/src/pirmacro.h \
- compilers/pirc/src/bcgen.h \
- $(INC_DIR)/embed.h
+src/dynpmc/subproxy$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/extend.h \
+ $(INC_DIR)/dynext.h include/pmc/pmc_subproxy.h \
+ include/pmc/pmc_sub.h include/pmc_default.h \
+ include/pmc/pmc_continuation.h include/pmc/pmc_callcontext.h \
+ include/pmc/pmc_default.h
src/gc/malloc_trace$(O) : src/gc/malloc.c
@@ -1697,10 +1438,10 @@
src/atomic/gcc_x86$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/atomic/gcc_x86.h
-$(OPS_DIR)/core_ops$(O) : $(OPS_DIR)/core_ops.c \
- $(PMC_INC_DIR)/pmc/pmc_callcontext.h \
- $(PMC_INC_DIR)/pmc/pmc_continuation.h \
- $(PMC_INC_DIR)/pmc/pmc_parrotlibrary.h \
+src/ops/core_ops$(O) : src/ops/core_ops.c \
+ include/pmc/pmc_callcontext.h \
+ include/pmc/pmc_continuation.h \
+ include/pmc/pmc_parrotlibrary.h \
src/io/io_private.h $(INC_DIR)/dynext.h $(INC_DIR)/embed.h \
$(INC_DIR)/oplib/core_ops.h $(INC_DIR)/runcore_api.h
@@ -1708,20 +1449,20 @@
# updates to config.h's version numbers
# .h files are built along with .c
-$(INC_DIR)/oplib/core_ops.h: $(OPS_DIR)/core_ops.c
+$(INC_DIR)/oplib/core_ops.h: src/ops/core_ops.c
-$(OPS_DIR)/core_ops.c : $(OPS_FILES) $(BUILD_TOOLS_DIR)/ops2c.pl \
+src/ops/core_ops.c : $(OPS_FILES) $(BUILD_TOOLS_DIR)/ops2c.pl \
lib/Parrot/OpsFile.pm lib/Parrot/Op.pm $(INC_DIR)/config.h \
lib/Parrot/OpLib/core.pm lib/Parrot/OpTrans/C.pm \
- $(PMC_INC_DIR)/pmc/pmc_continuation.h
+ include/pmc/pmc_continuation.h
$(PERL) $(BUILD_TOOLS_DIR)/ops2c.pl C --core @no_lines_flag@
-$(OPS_DIR)/core_ops_switch$(O) : $(GENERAL_H_FILES) $(OPS_DIR)/core_ops_switch.c \
- $(PMC_INC_DIR)/pmc/pmc_parrotlibrary.h
+src/ops/core_ops_switch$(O) : $(GENERAL_H_FILES) src/ops/core_ops_switch.c \
+ include/pmc/pmc_parrotlibrary.h
-$(INC_DIR)/oplib/core_ops_switch.h : $(OPS_DIR)/core_ops_switch.c
+$(INC_DIR)/oplib/core_ops_switch.h : src/ops/core_ops_switch.c
-$(OPS_DIR)/core_ops_switch.c : $(OPS_FILES) $(BUILD_TOOLS_DIR)/ops2c.pl \
+src/ops/core_ops_switch.c : $(OPS_FILES) $(BUILD_TOOLS_DIR)/ops2c.pl \
lib/Parrot/OpsFile.pm lib/Parrot/Op.pm $(INC_DIR)/config.h \
lib/Parrot/OpLib/core.pm lib/Parrot/OpTrans/CSwitch.pm \
lib/Parrot/OpTrans/CPrederef.pm
@@ -1743,23 +1484,6 @@
$(INC_DIR)/vtable.h : src/vtable.tbl $(BUILD_TOOLS_DIR)/vtable_h.pl lib/Parrot/Vtable.pm
$(PERL) $(BUILD_TOOLS_DIR)/vtable_h.pl
-# imcc file dependencies
-#
-# The .flag files are needed because we keep some derived files in SVN,
-# which does not keep accurate timestamps on the files, relative to each other.
-# Note that YACC or LEX may be null commands, so we must `touch` all the
-# target files, instead of just the .flag files.
-
-$(IMCC_DIR)/imcc.y.flag $(IMCC_DIR)/imcparser.c $(IMCC_DIR)/imcparser.h : $(IMCC_DIR)/imcc.y
- $(YACC) $(IMCC_DIR)/imcc.y -d -o $(IMCC_DIR)/imcparser.c
- $(PERL) $(BUILD_TOOLS_DIR)/fixup_gen_file.pl -noheaderizer $(IMCC_DIR)/imcparser.c $(IMCC_DIR)/imcc.y
- $(PERL) $(BUILD_TOOLS_DIR)/fixup_gen_file.pl -noheaderizer $(IMCC_DIR)/imcparser.h $(IMCC_DIR)/imcc.y
- $(TOUCH) $(IMCC_DIR)/imcc.y.flag $(IMCC_DIR)/imcparser.c $(IMCC_DIR)/imcparser.h
-
-$(IMCC_DIR)/imcc.l.flag $(IMCC_DIR)/imclexer.c : $(IMCC_DIR)/imcc.l
- $(LEX) -o$(IMCC_DIR)/imclexer.c $(IMCC_DIR)/imcc.l
- $(TOUCH) $(IMCC_DIR)/imcc.l.flag $(IMCC_DIR)/imclexer.c
-
###############################################################################
#
# Documentation targets:
@@ -1844,33 +1568,8 @@
#
###############################################################################
-compilers : compilers.dummy
-
-compilers.dummy : $(PARROT) $(GEN_LIBRARY)
- $(MAKE) compilers/pct
- $(MAKE) compilers/pge
- $(MAKE) compilers/tge
- $(MAKE) compilers/nqp
- $(MAKE) compilers/json
- $(MAKE) compilers/data_json
- $(MAKE) ext/nqp-rx
-
-compilers-clean :
- $(MAKE) compilers/pct clean
- $(MAKE) compilers/pge clean
- $(MAKE) compilers/tge clean
- $(MAKE) compilers/nqp clean
- $(MAKE) compilers/json clean
- $(MAKE) compilers/data_json clean
- $(MAKE) compilers/pirc clean
-
ext-clean:
- $(MAKE) ext/nqp-rx clean
- $(RM_RF) runtime/parrot/library/HLL.pbc \
- runtime/parrot/library/P6Regex.pbc \
- runtime/parrot/library/Regex.pbc \
- runtime/parrot/library/nqp-rx.pbc \
- parrot-nqp*
+ $(RM_RF) $(NQPRX_LIB_PBCS) parrot-nqp*
###############################################################################
#
@@ -1889,43 +1588,43 @@
# The --running-make-test argument is currently used by long-running tests
# to disable GC_DEBUG.
-EXTRA_TEST_ARGS := --gc-debug --running-make-test
-DISTRO_TEST_FILES := \
+EXTRA_TEST_ARGS = --gc-debug
+DISTRO_TEST_FILES = \
t/distro/*.t
-BENCHMARK_TEST_FILES := \
+BENCHMARK_TEST_FILES = \
t/benchmark/*.t
-PERL_TEST_FILES := \
+PERL_TEST_FILES = \
t/perl/*.t
-CODINGSTD_TEST_FILES := \
+CODINGSTD_TEST_FILES = \
t/codingstd/*.t
-RUN_TEST_FILES := \
+RUN_TEST_FILES = \
t/run/*.t
-RUNCORE_TEST_FILES := \
+RUNCORE_TEST_FILES = \
--runcore-tests
-SRC_TEST_FILES := \
+SRC_TEST_FILES = \
t/src/*.t
-TOOLS_TEST_FILES := \
+TOOLS_TEST_FILES = \
t/tools/*.t
-LIBRARY_TEST_FILES := @library_tests@
-PMC2CUTILS_DIR := t/tools/pmc2cutils
-OPS2PMUTILS_DIR := t/tools/ops2pm
-OPS2CUTILS_DIR := t/tools/ops2cutils
-REVISIONUTILS_DIR := t/tools/revision
-HARNESS_DIR := t/pharness
-BUILDTOOLS_TEST_FILES := \
+LIBRARY_TEST_FILES = @library_tests@
+PMC2CUTILS_DIR = t/tools/pmc2cutils
+OPS2PMUTILS_DIR = t/tools/ops2pm
+OPS2CUTILS_DIR = t/tools/ops2cutils
+REVISIONUTILS_DIR = t/tools/revision
+HARNESS_DIR = t/pharness
+BUILDTOOLS_TEST_FILES = \
$(PMC2CUTILS_DIR)/*.t \
$(OPS2PMUTILS_DIR)/*.t \
$(OPS2CUTILS_DIR)/*.t \
$(REVISIONUTILS_DIR)/*.t \
$(HARNESS_DIR)/*.t
-MANIFEST_DIR := t/manifest
-INSTALL_TOOLS_DIR := t/tools/install
-MANIFEST_TEST_FILES := \
+MANIFEST_DIR = t/manifest
+INSTALL_TOOLS_DIR = t/tools/install
+MANIFEST_TEST_FILES = \
$(MANIFEST_DIR)/*.t \
$(INSTALL_TOOLS_DIR)/*.t
-EXAMPLES_TEST_FILES := \
+EXAMPLES_TEST_FILES = \
t/examples/*.t
-CONFIGURE_TEST_FILES := \
+CONFIGURE_TEST_FILES = \
t/configure/*.t \
t/steps/*.t
@@ -1946,8 +1645,8 @@
$(PERL) t/harness $(EXTRA_TEST_ARGS)
# Test the NQP compiler
-nqp_test : test_prep
- $(MAKE) compilers/nqp test
+nqp_test : test_prep compilers/nqp/nqp.pbc
+ $(PERL) compilers/nqp/t/harness
# run the test suite, create a TAP archive and send it off to smolder
smolder_test : test_prep
@@ -2002,8 +1701,8 @@
testg : test_prep
$(PERL) t/harness $(EXTRA_TEST_ARGS) -g $(RUNCORE_TEST_FILES)
-# GC Debug core
-testG : test_prep
+# gcdebug core
+testgcd : test_prep
$(PERL) t/harness $(EXTRA_TEST_ARGS) -G $(RUNCORE_TEST_FILES)
# JIT core - target retained, but falls back to standard core
@@ -2053,7 +1752,7 @@
warnings_tests:
$(PERL) t/harness $(EXTRA_TEST_ARGS) -w $(RUNCORE_TEST_FILES)
-buildtools_tests :
+buildtools_tests : corevm
$(PERL) t/harness $(BUILDTOOLS_TEST_FILES)
manifest_tests :
@@ -2097,8 +1796,6 @@
dynpmc-clean \
dynoplibs-clean \
examples-clean \
- imcc-clean \
- compilers-clean \
ext-clean \
#UNLESS(win32): cover-clean \
editor-clean
@@ -2107,6 +1804,9 @@
$(RM_F) $(FLUID_FILES_1)
$(RM_F) $(FLUID_FILES_2)
$(RM_RF) lib/Parrot/OpLib
+ $(RM_F) $(NQP_CLEANUPS) $(PGE_CLEANUPS) $(TGE_CLEANUPS) $(JSON_CLEANUPS)
+ $(RM_F) $(PIRC_CLEANUPS) $(PCT_CLEANUPS)
+ $(RM_F) $(GEN_PASM_INCLUDES) $(GEN_PM_INCLUDES)
prog-clean :
$(RM_F) \
@@ -2117,32 +1817,32 @@
$(INSTALLABLEPARROT) \
$(INSTALLABLEDIS) \
$(INSTALLABLEPDUMP) \
- $(INSTALLABLEPBCMERGE) \
+ $(INSTALLABLEPBC_MERGE) \
$(INSTALLABLEPBCTOEXE) \
$(INSTALLABLEPDB) \
$(INSTALLABLECONFIG) \
$(INSTALLABLENQP) \
pbc_to_exe.pbc pbc_to_exe.c pbc_to_exe$(O) pbc_to_exe$(EXE) \
parrot_config$(EXE) parrot_config.c parrot_config$(O) parrot_config.pbc \
- $(IMCC_DIR)/main$(O) \
- $(PDUMP) $(SRC_DIR)/pbc_dump$(O) $(SRC_DIR)/packdump$(O) \
- $(PDB) $(SRC_DIR)/parrot_debugger$(O) \
- $(PBCMERGE) $(SRC_DIR)/pbc_merge$(O) \
- $(DIS) $(SRC_DIR)/pbc_disassemble$(O)
+ compilers/imcc/main$(O) \
+ $(PDUMP) src/pbc_dump$(O) src/packdump$(O) \
+ $(PDB) src/parrot_debugger$(O) \
+ $(PBC_MERGE) src/pbc_merge$(O) \
+ $(DIS) src/pbc_disassemble$(O)
$(RM_F) \
- $(SRC_DIR)/main$(O) \
- $(SRC_DIR)/null_config$(O) \
- $(SRC_DIR)/parrot_config$(O) \
- $(SRC_DIR)/install_config$(O) \
- $(SRC_DIR)/nci_test$(O) \
+ src/main$(O) \
+ src/null_config$(O) \
+ src/parrot_config$(O) \
+ src/install_config$(O) \
+ src/nci_test$(O) \
$(LIBNCI_TEST_SO) \
- $(SRC_DIR)/glut_callbacks$(O) \
+ src/glut_callbacks$(O) \
$(LIBGLUTCB_SO) \
install_config.fpmc
$(PERL) $(BUILD_TOOLS_DIR)/c2str.pl --init
$(RM_F) \
$(STR_FILES) \
- $(SRC_DIR)/string/private_cstring.h "src/pmc/*.c" "include/pmc/pmc_*.h" \
+ src/string/private_cstring.h "src/pmc/*.c" "include/pmc/pmc_*.h" \
"src/pmc/*.dump" vtable.dump "*.def" "*.lib" "*.exp"
archclean: dynoplibs-clean dynpmc-clean dynext-clean
@@ -2155,25 +1855,25 @@
$(INSTALLABLEPARROT) \
$(INSTALLABLEDIS) \
$(INSTALLABLEPDUMP) \
- $(INSTALLABLEPBCMERGE) \
+ $(INSTALLABLEPBC_MERGE) \
$(INSTALLABLEPDB) \
$(INSTALLABLECONFIG) \
$(INSTALLABLENQP) \
- $(IMCC_DIR)/main$(O) \
- $(PDUMP) $(SRC_DIR)/pbc_dump$(O) $(SRC_DIR)/packdump$(O) \
- $(PDB) $(SRC_DIR)/parrot_debugger$(O) \
- $(PBCMERGE) $(SRC_DIR)/pbc_merge$(O) \
- $(DIS) $(SRC_DIR)/pbc_disassemble$(O) \
+ compilers/imcc/main$(O) \
+ $(PDUMP) src/pbc_dump$(O) src/packdump$(O) \
+ $(PDB) src/parrot_debugger$(O) \
+ $(PBC_MERGE) src/pbc_merge$(O) \
+ $(DIS) src/pbc_disassemble$(O) \
$(PARROT_CONFIG) parrot_config$(O) parrot_config.c \
- $(SRC_DIR)/parrot_config$(O) parrot_config.pbc \
+ src/parrot_config$(O) parrot_config.pbc \
pbc_to_exe$(EXE) pbc_to_exe$(O) pbc_to_exe.pbc \
- $(SRC_DIR)/null_config$(O) \
- $(SRC_DIR)/parrot_config$(O) \
- $(SRC_DIR)/install_config$(O) \
+ src/null_config$(O) \
+ src/parrot_config$(O) \
+ src/install_config$(O) \
install_config.fpmc \
- $(SRC_DIR)/nci_test$(O) \
+ src/nci_test$(O) \
$(LIBNCI_TEST_SO) \
- $(SRC_DIR)/glut_callbacks$(O) \
+ src/glut_callbacks$(O) \
$(LIBGLUTCB_SO) \
$(LIBPARROT_STATIC) \
$(LIBPARROT_SHARED)
@@ -2244,15 +1944,8 @@
"parrot_test_run.tar.gz" \
".pod_examinable*.sto"
-imcc-clean:
- $(RM_F) \
- $(IMCC_DIR)/core \
- "$(IMCC_DIR)/*$(O)" \
- $(IMCC_DIR)/imcparser.output
-
# a failing step of cleaning, usually doesn't concern the following steps
realclean : clean
- -$(MAKE) compilers/pirc realclean
$(RM_RF) \
$(CONFIGURE_GENERATED_FILES) \
blib \
@@ -2275,7 +1968,7 @@
$(PERL) tools/dev/opsrenumber.pl $(OPS_FILES)
pmcrenumber :
- $(PERL) tools/dev/pmcrenumber.pl $(SRC_DIR)/pmc/pmc.num
+ $(PERL) tools/dev/pmcrenumber.pl src/pmc/pmc.num
###############################################################################
#
@@ -2292,16 +1985,16 @@
patch :
svn diff
-LINTABLE_CFILES := `echo $(SRC_DIR)/main$(O) $(O_FILES) $(SRC_DIR)/parrot_config$(O) | $(PERL) -pe @PQ at s/\.o/\.c/g at PQ@`
+LINTABLE_CFILES = `echo src/main$(O) $(O_FILES) src/parrot_config$(O) | $(PERL) -pe @PQ at s/\.o/\.c/g at PQ@`
lint : sunlint
-SUNLINT := lint
+SUNLINT = lint
# This target does sneaky magic to get the $(NOTE) fields to work. It's
# doing replaces in $(NOTE), which is empty, of strings that will never match.
-NOTE :=
-SUNLINT_HUSH_OPTS := \
+NOTE =
+SUNLINT_HUSH_OPTS = \
$(NOTE:% Errors that will never be silenced, and we must always hush =%)\
-erroff=E_ARGUMENT_CONVERT $(NOTE:% implicit integer-to-long conversion =%) \
-erroff=E_BAD_PTR_CAST $(NOTE:% pointer casts may be troublesome =%) \
@@ -2322,10 +2015,10 @@
-erroff=E_CASE_FALLTHRU $(NOTE:% case fallthru =%) \
-erroff=E_STATIC_UNUSED $(NOTE:% Static function not used =%) \
-SUNLINT_OPTS_FOR_THE_FUTURE := -b -m -Xc
+SUNLINT_OPTS_FOR_THE_FUTURE = -b -m -Xc
# Lint options at: http:////docs.sun.com//app//docs//doc//819-5265//6n7c29cli?a=view
-SUNLINTOPTS := \
+SUNLINTOPTS = \
-b \
-p \
-fd \
@@ -2342,7 +2035,7 @@
rm -f *.ln
$(SUNLINT) $(CC_INC) "-Iinclude/pmc" $(SUNLINTOPTS) $(LINTABLE_CFILES)
-BSD_LINT_FLAGS := -a -aa -b -c -e -h -n -p -r -u -x -z -F -H -V
+BSD_LINT_FLAGS = -a -aa -b -c -e -h -n -p -r -u -x -z -F -H -V
# 132: conversion from '...' may lose accuracy
# 135: possible pointer alignment problem
@@ -2355,7 +2048,7 @@
# 265: ANSI C does not support 'long long'
# 277: initialisation of '...' with '...'
# 278: combination of '...' and '...', arg #...
-BSD_LINT_EXCLUSIONS := -X132,135,236,241,247,249,259,265,277,278
+BSD_LINT_EXCLUSIONS = -X132,135,236,241,247,249,259,265,277,278
bsdlint : $(PARROT)
rm -f *.ln
@@ -2363,11 +2056,11 @@
# For checking with splint see also http:////www.perlfoundation.org//parrot//index.cgi?splint
# Splint: http:////splint.org
-SPLINT := splint
+SPLINT = splint
# Temp directory for splint. Add +keep to splintflags if you want work files
# kept in there after completion.
-SPLINT_TMP := $(TEMPDIR)/splint
+SPLINT_TMP = $(TEMPDIR)/splint
# Splint flags: http://splint.org/manual/html/appB.html
# The dashes in the names don't make any difference to Splint, but I've
@@ -2402,7 +2095,7 @@
-include-nest 10
# Memory safety checks
-SPLINTFLAGS := $(SPLINTFLAGS) \
+SPLINTFLAGS = $(SPLINTFLAGS) \
+bufferoverflow \
+bufferoverflowhigh \
+read-only-strings \
@@ -2412,7 +2105,7 @@
+use-released \
# Macro safety checks
-SPLINTFLAGS := $(SPLINTFLAGS) \
+SPLINTFLAGS = $(SPLINTFLAGS) \
+macro-assign \
+macro-empty \
+macro-parens \
@@ -2421,25 +2114,25 @@
+macro-unrecog \
# Watch for unsafe comparisons
-SPLINTFLAGS := $(SPLINTFLAGS) \
+SPLINTFLAGS = $(SPLINTFLAGS) \
+bool-compare \
+ptr-compare \
+real-compare \
+unsigned-compare
# But allow us some slop in boolean comparisons
-SPLINTFLAGS := $(SPLINTFLAGS) \
+SPLINTFLAGS = $(SPLINTFLAGS) \
-pred-bool-int \
-pred-bool-ptr \
-pred-bool-others \
-boolops \
# Report qualifier mismatches only if dangerous
-SPLINTFLAGS := $(SPLINTFLAGS) \
+SPLINTFLAGS = $(SPLINTFLAGS) \
+relax-quals
# Memory checking
-SPLINTFLAGS := $(SPLINTFLAGS) \
+SPLINTFLAGS = $(SPLINTFLAGS) \
-must-free \
-mustfreefresh \
-mustfreeonly \
@@ -2451,33 +2144,33 @@
-zero-ptr \
# Transfer errors are too tough for us right now
-SPLINTFLAGS := $(SPLINTFLAGS) \
+SPLINTFLAGS = $(SPLINTFLAGS) \
-mem-trans
# Symbol definitions
-SPLINTFLAGS := $(SPLINTFLAGS) \
+SPLINTFLAGS = $(SPLINTFLAGS) \
+decl-undef \
+incon-defs \
+incon-defs-lib \
# Check for conflicts with C++ compilers
-SPLINTFLAGS := $(SPLINTFLAGS) \
+SPLINTFLAGS = $(SPLINTFLAGS) \
+cpp-names \
# Format codes
-SPLINTFLAGS := $(SPLINTFLAGS) \
+SPLINTFLAGS = $(SPLINTFLAGS) \
+format-code \
+format-type \
# Problems with evaluation and control structions
-SPLINTFLAGS := $(SPLINTFLAGS) \
+SPLINTFLAGS = $(SPLINTFLAGS) \
+controlnestdepth 15 \
+duplicate-case \
+eval-order \
+eval-order-uncon \
# Types and stuff
-SPLINTFLAGS := $(SPLINTFLAGS) \
+SPLINTFLAGS = $(SPLINTFLAGS) \
+char-index \
+char-int \
+enum-members \
@@ -2496,13 +2189,13 @@
# added to splint target to simplify experimentation,
# ex: make SPLINTFLAGS_TEST='-posixstrictlib +posixlib' splint
-SPLINT_SOURCE := `echo $(O_FILES) | $(PERL) -pe @PQ at s/\.o/\.c/g at PQ@`
+SPLINT_SOURCE = `echo $(O_FILES) | $(PERL) -pe @PQ at s/\.o/\.c/g at PQ@`
splint-all : $(PARROT)
$(MKPATH) $(SPLINT_TMP)
$(SPLINT) $(CC_INC) "-Iinclude/pmc" "-Icompilers/ast" $(SPLINTFLAGS) $(SPLINTFLAGS_TEST) \
$(SPLINT_SOURCE) \
- $(SPLINT) $(CC_INC) $(SPLINTFLAGS) $(SPLINTFLAGS_TEST) $(IMCC_DIR)/main.c
+ $(SPLINT) $(CC_INC) $(SPLINTFLAGS) $(SPLINTFLAGS_TEST) compilers/imcc/main.c
# "splint" is the less-thorough splint target. For cage cleaning work,
# you'll probably want to specify SPLINT_SOURCE rather than work on the
@@ -2516,25 +2209,25 @@
$(SPLINT_SOURCE) \
| grep -v 'Source code error generation point'
-COVER_FLAGS := -fprofile-arcs -ftest-coverage
-COVER_DIRS := \
- $(SRC_DIR) \
- $(SRC_DIR)/call \
- $(SRC_DIR)/dynoplibs \
- $(SRC_DIR)/dynpmc \
- $(SRC_DIR)/gc \
- $(SRC_DIR)/interp \
- $(SRC_DIR)/ops \
- $(SRC_DIR)/packfile \
- $(SRC_DIR)/pmc \
- $(SRC_DIR)/runcore \
- $(SRC_DIR)/string \
- $(SRC_DIR)/string/charset \
- $(SRC_DIR)/string/encoding \
+COVER_FLAGS = -fprofile-arcs -ftest-coverage
+COVER_DIRS = \
+ src \
+ src/call \
+ src/dynoplibs \
+ src/dynpmc \
+ src/gc \
+ src/interp \
+ src/ops \
+ src/packfile \
+ src/pmc \
+ src/runcore \
+ src/string \
+ src/string/charset \
+ src/string/encoding \
$(BUILD_DIR) \
$(BUILD_DIR)/t/perl \
- $(IO_DIR) \
- $(IMCC_DIR)
+ src/io \
+ compilers/imcc
cover: \
cover.dummy \
@@ -2674,7 +2367,7 @@
###############################################################################
release : MANIFEST MANIFEST.generated
- [ -d parrot-$(VERSION) ] || ln -s $(CUR_DIR) parrot-$(VERSION)
+ [ -d parrot-$(VERSION) ] || ln -s . parrot-$(VERSION)
@$(RM_F) MANIFEST.real
mv MANIFEST MANIFEST.real
grep -v DEVELOPING MANIFEST.real > MANIFEST
@@ -2693,24 +2386,24 @@
#
###############################################################################
-exec : $(SRC_DIR)/parrot_config$(O) $(LIBPARROT)
- $(LINK) @ld_out@$(EXEC)$(EXE) $(EXEC)$(O) $(SRC_DIR)/parrot_config$(O) @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
+exec : src/parrot_config$(O) $(LIBPARROT)
+ $(LINK) @ld_out@$(EXEC)$(EXE) $(EXEC)$(O) src/parrot_config$(O) @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
###### OS depend targets ##########
# for use by t/pmc/nci.t
-$(SRC_DIR)/nci_test$(O): $(PARROT_H_HEADERS)
+src/nci_test$(O): $(PARROT_H_HEADERS)
-$(LIBNCI_TEST_SO): $(SRC_DIR)/nci_test$(O) $(LIBPARROT)
+$(LIBNCI_TEST_SO): src/nci_test$(O) $(LIBPARROT)
$(LD) $(LD_LOAD_FLAGS) @ncilib_link_extra@ $(LDFLAGS) \
- @ld_out@$@ $(SRC_DIR)/nci_test$(O) $(C_LIBS)
+ @ld_out@$@ src/nci_test$(O) $(C_LIBS)
# for use by runtime/parrot/library/OpenGL.pir
-$(SRC_DIR)/glut_callbacks$(O): $(GENERAL_H_FILES)
+src/glut_callbacks$(O): $(GENERAL_H_FILES)
-$(LIBGLUTCB_SO): $(LIBPARROT) $(SRC_DIR)/glut_callbacks$(O)
+$(LIBGLUTCB_SO): $(LIBPARROT) src/glut_callbacks$(O)
$(LD) $(LD_LOAD_FLAGS) $(LDFLAGS) \
- @ld_out@$@ $(SRC_DIR)/glut_callbacks$(O) \
+ @ld_out@$@ src/glut_callbacks$(O) \
$(ALL_PARROT_LIBS) @opengl_lib@
# emacs etags
@@ -2723,12 +2416,12 @@
-R --exclude=blib --exclude=.svn \
--languages=c,perl --langmap=c:+.h,c:+.pmc,c:+.ops \
-I NOTNULL,NULLOK,ARGIN,ARGMOD,ARGOUT,ARGINOUT,ARGIN_NULLOK,ARGOUT_NULLOK,ARGMOD_NULLOK \
- $(CUR_DIR)
+ .
# this works with an old etags (XEmacs 21.5*)
tags-xemacs: tags.emacs.dummy
$(RM_F) TAGS
- find $(CUR_DIR) \
+ find . \
-name \*.c -o -name \*.h -o -name \*.pmc -o -name \*.ops | etags -l c - -o TAGS
tags.emacs.dummy:
@@ -2743,12 +2436,12 @@
-R --exclude=blib --exclude=.svn \
--languages=c,perl --langmap=c:+.h,c:+.pmc,c:+.ops \
-I NOTNULL,NULLOK,ARGIN,ARGMOD,ARGOUT,ARGINOUT,ARGIN_NULLOK,ARGOUT_NULLOK,ARGMOD_NULLOK \
- $(CUR_DIR)
+ .
$(PERL) $(BUILD_TOOLS_DIR)/addopstags.pl $(OPS_FILES)
tags.vi.dummy:
-CRITIC_FILES := 'lib/Parrot'
+CRITIC_FILES = 'lib/Parrot'
perlcritic:
perlcritic --profile tools/util/perlcritic.conf $(CRITIC_FILES)
@@ -2762,21 +2455,32 @@
# is not PARROT_EXPORT but should be, then put PARROT_EXPORT in the C file and
# run "make headerizer". The .h file will get updated.
-HEADERIZER_O_FILES := \
+HEADERIZER_O_FILES = \
$(O_FILES) \
src/packdump$(O) \
src/pbc_merge$(O) \
$(PIRC_O_FILES)
-headerizer : $(SRC_DIR)/core_pmcs.c
- $(PERL) $(BUILD_TOOLS_DIR)/headerizer.pl $(HEADERIZER_O_FILES) $(IMCC_DIR)/imcc.y
+headerizer : src/core_pmcs.c
+ $(PERL) $(BUILD_TOOLS_DIR)/headerizer.pl $(HEADERIZER_O_FILES) compilers/imcc/imcc.y
-apilist: $(SRC_DIR)/core_pmcs.c
+apilist: src/core_pmcs.c
$(PERL) $(BUILD_TOOLS_DIR)/headerizer.pl --macro=PARROT_EXPORT $(HEADERIZER_O_FILES)
-malloclist: $(SRC_DIR)/core_pmcs.c
+malloclist: src/core_pmcs.c
$(PERL) $(BUILD_TOOLS_DIR)/headerizer.pl --macro=PARROT_MALLOC $(HEADERIZER_O_FILES)
+include runtime/parrot/library/Rules.mak
+include compilers/imcc/Rules.mak
+include compilers/pirc/Rules.mak
+include compilers/nqp/Rules.mak
+include compilers/pge/Rules.mak
+include compilers/pct/Rules.mak
+include compilers/tge/Rules.mak
+include compilers/data_json/Rules.mak
+include compilers/json/Rules.mak
+include ext/nqp-rx/Rules.mak
+
# Local variables:
# mode: makefile
# End:
Deleted: branches/pmc_freeze_with_pmcs/config/gen/makefiles/tge.in
==============================================================================
--- branches/pmc_freeze_with_pmcs/config/gen/makefiles/tge.in Fri Jan 29 21:05:08 2010 (r43642)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,61 +0,0 @@
-# Copyright (C) 2005-2009, Parrot Foundation.
-# $Id$
-
-# Setup some commands
-PERL := @perl@
-RM_F := @rm_f@
-PARROT := ../../parrot at exe@
-
-# Where to put things
-PARROT_LIBRARY := ../../runtime/parrot/library
-PERL6GRAMMAR := $(PARROT_LIBRARY)/PGE/Perl6Grammar.pbc
-
-# the default target
-all: $(PARROT_LIBRARY)/TGE.pbc
-
-$(PARROT_LIBRARY)/TGE.pbc: TGE.pir TGE/Rule.pir TGE/Parser.pir TGE/Grammar.pir TGE/Compiler.pir TGE/Tree.pir
- $(PARROT) -o $(PARROT_LIBRARY)/TGE.pbc --output-pbc TGE.pir
-
-TGE/Parser.pir: TGE/Parser.pg
- $(PARROT) $(PERL6GRAMMAR) --output=TGE/Parser.pir TGE/Parser.pg
-
-# This is a listing of all targets, that are meant to be called by users
-help:
- @echo ""
- @echo "Following targets are available for the user:"
- @echo ""
- @echo " all: TGE.pbc"
- @echo " This is the default."
- @echo "Testing:"
- @echo " test: Run the test suite."
- @echo " testclean: Clean up test results."
- @echo ""
- @echo "Cleaning:"
- @echo " clean: Basic cleaning up."
- @echo " realclean: Removes also files generated by 'Configure.pl'"
- @echo " distclean: Removes also anything built, in theory"
- @echo ""
- @echo "Misc:"
- @echo " help: Print this help message."
- @echo ""
-
-test: all
- prove -r ../../t/compilers/tge
-
-testclean:
- $(RM_F) "../../t/compilers/tge/*.pir"
-
-clean: testclean
- $(RM_F) \
- $(PARROT_LIBRARY)/TGE.pbc \
- TGE/Parser.pir
-
-realclean: clean
- $(RM_F) Makefile
-
-distclean: realclean
-
-# Local variables:
-# mode: makefile
-# End:
-# vim: ft=make:
Deleted: branches/pmc_freeze_with_pmcs/config/gen/parrot_include.pm
==============================================================================
--- branches/pmc_freeze_with_pmcs/config/gen/parrot_include.pm Fri Jan 29 21:05:08 2010 (r43642)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,241 +0,0 @@
-# Copyright (C) 2001-2007, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-config/gen/parrot_include.pm - Runtime Includes
-
-=head1 DESCRIPTION
-
-Generates the F<runtime/parrot/include> files.
-
-=cut
-
-package gen::parrot_include;
-
-use strict;
-use warnings;
-
-use base qw(Parrot::Configure::Step);
-
-use Parrot::Configure::Utils ':gen';
-
-
-sub _init {
- my $self = shift;
- my %data;
- $data{description} = q{Generate runtime/parrot/include};
- $data{result} = q{};
- $data{source_files} = [ qw(
- include/parrot/cclass.h
- include/parrot/datatypes.h
- include/parrot/enums.h
- include/parrot/events.h
- include/parrot/scheduler.h
- include/parrot/exceptions.h
- include/parrot/hash.h
- include/parrot/interpreter.h
- include/parrot/io.h
- include/parrot/library.h
- include/parrot/longopt.h
- include/parrot/multidispatch.h
- include/parrot/packfile.h
- include/parrot/stat.h
- include/parrot/string.h
- include/parrot/pmc.h
- include/parrot/warnings.h
- include/parrot/gc_api.h
- src/pmc/timer.pmc
- src/utils.c
- ) ];
- $data{generated_files} = [ qw(
- include/parrot/vtable.h
- include/parrot/core_pmcs.h
- ) ];
- $data{destdir} = 'runtime/parrot/include';
- return \%data;
-}
-
-sub runstep {
- my ( $self, $conf ) = @_;
- my $verbose = $conf->options->get('verbose');
-
- # need vtable.h now
- system( $^X, "tools/build/vtable_h.pl" );
-
- my @generated;
- for my $file ( @{ $self->{source_files} }, @{ $self->{generated_files} } ) {
- open my $fh, '<', $file or die "Can't open $file: $!\n";
- my @directives = parse_file($file, $fh);
- close $fh;
- for my $d (@directives) {
- my @defs = perform_directive($d);
- for my $target ( @{ $d->{files} } ) {
- $verbose and print "$target ";
- my $gen;
- if ( $target =~ /\.pm$/ ) {
- $gen = join "\n", &const_to_perl(@defs);
- $gen .= "\n1;";
- }
- else {
- $gen = join "\n", &const_to_parrot(@defs);
- }
- $conf->append_configure_log(qq{$self->{destdir}/$target});
- my $target_tmp = "$target.tmp";
- open my $out, '>', $target_tmp or die "Can't open $target_tmp: $!\n";
-
- print $out <<"EOF";
-# DO NOT EDIT THIS FILE.
-#
-# This file is generated automatically from
-# $file by config/gen/parrot_include.pm
-#
-# Any changes made here will be lost.
-#
-$gen
-EOF
- close $out or die "Can't write $target_tmp: $!\n";
- $target =~ m[/] or $target = "$self->{destdir}/$target";
- move_if_diff( $target_tmp, $target );
- push @generated, $target;
- }
- }
- }
- $conf->data->set( TEMP_gen_pasm_includes => join( " \\\n ", @generated ) );
-
- return 1;
-}
-
-sub const_to_parrot {
- map ".macro_const $_->[0]\t$_->[1]", @_;
-}
-
-sub const_to_perl {
- map "use constant $_->[0] => $_->[1];", @_;
-}
-
-sub transform_name {
- my $action = shift;
-
- return map { [ $action->( $_->[0] ), $_->[1] ] } @_;
-}
-
-sub prepend_prefix {
- my $prefix = shift;
-
- transform_name( sub { $prefix . $_[0] }, @_ );
-}
-
-sub perform_directive {
- my ($d) = @_;
-
- my @defs = prepend_prefix $d->{prefix}, @{ $d->{defs} };
- if ( my $subst = $d->{subst} ) {
- @defs = transform_name( sub { local $_ = shift; eval $subst; $_ }, @defs );
- }
- @defs;
-}
-
-sub parse_file {
- my ( $file, $fh ) = @_;
-
- my ( @d, %values, $last_val, $cur, $or_continues );
- while ( my $line = <$fh> ) {
- if (
- $line =~ m!
- &gen_from_(enum|def) \( ( [^)]* ) \)
- (?: \s+ prefix \( (\w+) \) )?
- (?: \s+ subst \( (s/.*?/.*?/[eig]?) \) )?
- !x
- )
- {
- $cur and die "Missing '&end_gen' in $file\n";
- $cur = {
- type => $1,
- files => [ split ' ', $2 ],
- prefix => defined $3 ? $3 : '',
- defined $4 ? ( subst => $4 ) : (),
- };
- $last_val = -1;
- }
- elsif ( $line =~ /&end_gen\b/ ) {
- $cur or die "Missing &gen_from_(enum|def) in $file\n";
- push @d, $cur;
- $cur = undef;
- }
-
- $cur or next;
-
- if ( $cur->{type} eq 'def' && $line =~ /^\s*#define\s+(\w+)\s+(-?\w+|"[^"]*")/ ) {
- push @{ $cur->{defs} }, [ $1, $2 ];
- }
- elsif ( $cur->{type} eq 'enum' ) {
- # Special case: enum value is or'd combination of other values
- if ( $or_continues ) {
- $or_continues = 0;
- my $last_def = $cur->{defs}->[-1];
- my ($k, $v) = @{$last_def};
- my @or_values = grep {defined $_} $line =~ /^\s*(-?\w+)(?:\s*\|\s*(-?\w+))*/;
- for my $or (@or_values) {
- if ( defined $values{$or} ) {
- $v |= $values{$or};
- }
- elsif ( $or =~ /^0/ ) {
- $v |= oct $or;
- }
- }
- if ($line =~ /\|\s*$/) {
- $or_continues = 1;
- }
- $values{$k} = $last_val = $v;
- $cur->{defs}->[-1]->[1] = $v;
- }
- elsif ( $line =~ /^\s*(\w+)\s*=\s*(-?\w+)\s*\|/ ) {
- my ( $k, $v ) = ( $1, $2 );
- my @or_values = ($v, $line =~ /\|\s*(-?\w+)/g);
- $v = 0;
- for my $or (@or_values) {
- if ( defined $values{$or} ) {
- $v |= $values{$or};
- }
- elsif ( $or =~ /^0/ ) {
- $v |= oct $or;
- }
- }
- if ($line =~ /\|\s*$/) {
- $or_continues = 1;
- }
- $values{$k} = $last_val = $v;
- push @{ $cur->{defs} }, [ $k, $v ];
- }
- elsif ( $line =~ /^\s*(\w+)\s*=\s*(-?\w+)/ ) {
- my ( $k, $v ) = ( $1, $2 );
- if ( defined $values{$v} ) {
- $v = $values{$v};
- }
- elsif ( $v =~ /^0/ ) {
- $v = oct $v;
- }
- $values{$k} = $last_val = $v;
- push @{ $cur->{defs} }, [ $k, $v ];
- }
- elsif ( $line =~ m!^\s*(\w+)\s*(?:,\s*)?(?:/\*|$)! ) {
- my $k = $1;
- my $v = $values{$k} = ++$last_val;
- push @{ $cur->{defs} }, [ $k, $v ];
- }
- }
- }
- $cur and die "Missing '&end_gen' in $file\n";
-
- return @d;
-}
-
-1;
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Modified: branches/pmc_freeze_with_pmcs/config/init/hints/openbsd.pm
==============================================================================
--- branches/pmc_freeze_with_pmcs/config/init/hints/openbsd.pm Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/config/init/hints/openbsd.pm Fri Jan 29 21:05:08 2010 (r43643)
@@ -37,7 +37,7 @@
$conf->data->set( as => 'as -mregnames' );
}
- $conf->data->set( clock_best => '-DCLOCK_BEST=CLOCK_MONOTONIC' );
+ $conf->data->set( clock_best => '-D_POSIX_TIMERS -DCLOCK_BEST=CLOCK_MONOTONIC' );
}
1;
Modified: branches/pmc_freeze_with_pmcs/docs/embed.pod
==============================================================================
--- branches/pmc_freeze_with_pmcs/docs/embed.pod Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/docs/embed.pod Fri Jan 29 21:05:08 2010 (r43643)
@@ -362,10 +362,6 @@
Call a Parrot subroutine that returns an integer using the supplied signature.
-=item [DEPRECATED] C<Parrot_Float Parrot_call_sub_ret_float(PARROT_INTERP, Parrot_PMC sub, const_char *signature)>
-
-Call a Parrot subroutine that returns an float using the supplied signature.
-
=back
=head2 Objects
@@ -605,16 +601,8 @@
=item C<Parrot_ext_call>
-=item [DEPRECATED] C<Parrot_call_method>
-
-=item [DEPRECATED] C<Parrot_call_method_ret_float>
-
-=item [DEPRECATED] C<Parrot_call_method_ret_int>
-
=item [DEPRECATED] C<Parrot_call_sub>
-=item [DEPRECATED] C<Parrot_call_sub_ret_float>
-
=item [DEPRECATED] C<Parrot_call_sub_ret_int>
=item C<Parrot_char_digit_value>
Modified: branches/pmc_freeze_with_pmcs/docs/extend.pod
==============================================================================
--- branches/pmc_freeze_with_pmcs/docs/extend.pod Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/docs/extend.pod Fri Jan 29 21:05:08 2010 (r43643)
@@ -34,16 +34,7 @@
=head2 Functions
-=over 4
-
-=item C<Parrot_call_method(PARROT_INTERP, Parrot_PMC sub
- Parrot_PMC object, Parrot_String method, const char *signature, ...)>
-
-Calls a method on C<object> with the given signature and arguments. C<sub> is
-the method that's being called, and C<method> is the name of the method in the
-call stack. This is useful for calling aliased methods.
-
-=back
+TODO
=head1 SEE ALSO
Modified: branches/pmc_freeze_with_pmcs/docs/intro.pod
==============================================================================
--- branches/pmc_freeze_with_pmcs/docs/intro.pod Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/docs/intro.pod Fri Jan 29 21:05:08 2010 (r43643)
@@ -145,7 +145,7 @@
Substituting make for the name of the make program on your platform. The output
will look something like this:
- C:\Perl\bin\perl.exe t\harness --gc-debug --running-make-test
+ C:\Perl\bin\perl.exe t\harness --gc-debug
t\library\*.t t\op\*.t t\pmc\*.t t\run\*.t t\native_pbc\*.t
imcc\t\*\*.t t\dynpmc\*.t t\p6rules\*.t t\src\*.t t\perl\*.t
t\library\dumper...............ok
Modified: branches/pmc_freeze_with_pmcs/docs/pdds/draft/pdd11_extending.pod
==============================================================================
--- branches/pmc_freeze_with_pmcs/docs/pdds/draft/pdd11_extending.pod Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/docs/pdds/draft/pdd11_extending.pod Fri Jan 29 21:05:08 2010 (r43643)
@@ -281,14 +281,6 @@
up Parrot's registers in line with the Parrot calling conventions; see
L<pdd03_calling_conventions.pod> for more details.
-=item C<Parrot_call_method(PARROT_INTERP, Parrot_PMC sub, Parrot_PMC obj,
- Parrot_String method, ARGIN(const char *signature), ...)>
-
-Call the parrot subroutine C<sub> as a method on PMC object C<obj>. The method
-should have the name C<method> as a Parrot_string, and should have a function
-signature C<signature>. Any arguments to the method can be passed at the end
-as a variadic argument list.
-
=back
=head3 API - Group 2: Internals aware
Modified: branches/pmc_freeze_with_pmcs/docs/pdds/draft/pdd16_native_call.pod
==============================================================================
--- branches/pmc_freeze_with_pmcs/docs/pdds/draft/pdd16_native_call.pod Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/docs/pdds/draft/pdd16_native_call.pod Fri Jan 29 21:05:08 2010 (r43643)
@@ -55,9 +55,7 @@
Void. As a return type it indicates that there I<is> no return type.
-As a parameter it indicates that there are no parameters (this use is now
-deprecated (TT1410) - use an empty parameter string to indicate that there
-are no parameters). Can't be mixed with other parameter types.
+Not valid as a parameter type.
=item c
Modified: branches/pmc_freeze_with_pmcs/docs/submissions.pod
==============================================================================
--- branches/pmc_freeze_with_pmcs/docs/submissions.pod Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/docs/submissions.pod Fri Jan 29 21:05:08 2010 (r43643)
@@ -11,8 +11,8 @@
=head1 How To Submit A Bug Report
-If you encounter an error while working with Parrot, and don't understand what
-is causing it, then create a bug report using the F<parrotbug> utility. The
+If you encounter an error while working with Parrot and don't understand what
+is causing it, create a bug report using the F<parrotbug> utility. The
simplest way to use it is to run
% ./parrotbug
@@ -22,18 +22,12 @@
However, if you do know how to fix the problem you encountered, then think
about submitting a patch, or (see below) getting commit privileges.
-=head1 How To Submit A Patch
+=head1 How To Create A Patch
Try to keep your patches specific to a single change, and ensure that your
change does not break any tests. Do this by running C<make test>. If there is
no test for the fixed bug, please provide one.
-=over
-
-=item 1
-
-Create the patch.
-
In the following examples, F<parrot> contains the Parrot distribution, and
F<workingdir> contains F<parrot>. The name F<workingdir> is just a placeholder
for whatever the distribution's parent directory is called on your machine.
@@ -97,15 +91,25 @@
=back
-=item 2
+=head1 How To Submit A Patch
+
+=over 4
+
+=item 1
Go to Parrot's ticket tracking system at
L<https://trac.parrot.org/parrot/>. Log in, or create an account if you
don't have one yet.
+=item 2
+
+If there is already a ticket for the bug or feature that your patch relates
+to, just attach the patch directly to the ticket.
+
=item 3
-Select "New Ticket" L<https://trac.parrot.org/parrot/newticket>.
+Otherwise select "New Ticket" at the top of the site.
+L<https://trac.parrot.org/parrot/newticket>
=item 4
@@ -129,9 +133,8 @@
=item 7
-Check the box for "I have files to attach to this ticket"
-
-Double-check that you've actually done this, because it's easy to forget.
+Check the box for "I have files to attach to this ticket". Double-check
+that you've actually done this, because it's easy to forget.
B<DO NOT> paste the patch file content into the Description.
@@ -248,26 +251,22 @@
=head1 What Happens Next?
-Trac creates a ticket for the submission, and you will receive an automatic reply
-with details of the ticket identifier. This identifier should be used in all
-further correspondence concerning the submission.
+If you created a new ticket for the submission, you will be taken to the page
+for the new ticket and can check on the progress of your submission there.
+This identifier should be used in all correspondence concerning the submission.
-Everyone on the list sees the submission, and can comment on it. A developer
-with SVN commit authority will commit it to SVN once it is clear that it is the
+Everyone on Trac sees the submission and can comment on it. A developer with
+SVN commit authority can commit it to SVN once it is clear that it is the
right thing to do.
-Even developers with SVN commit authority stick to this scheme for larger or
-more complex changes, to allow time for peer review.
-
-You can check the progress of your submission at the Parrot bugs page
-L<http://bugs6.perl.org/>. If you have trouble logging in try username C<guest>
-with password C<guest>.
+However developers with SVN commit authority may not commit your changes
+immediately if they are large or complex, as we need time for peer review.
-A Parrot Bug Summary page is also available from
-L<https://rt.perl.org/rt3/NoAuth/parrot/Overview.html>
+A list of active tickets can be found here:
+L<http://trac.parrot.org/parrot/report/1>
-A list of all the unresolved patches is at
-L<http://www.parrotcode.org/openpatches.html>
+A list of all the unresolved patches is at:
+L<http://trac.parrot.org/parrot/report/15>
=head1 Patches for the Parrot website
@@ -303,8 +302,8 @@
=item 4
Request commit access via the C<parrot-dev> mailing list, or via IRC
-(#parrot on irc.parrot.org). The existing committers will discuss your request in
-the next couple of weeks.
+(#parrot on irc.parrot.org). The existing committers will discuss your
+request in the next couple of weeks.
If approved, a metacommitter will update the permissions to allow you to commit
to Parrot; see C<RESPONSIBLE_PARTIES> for the current list. Welcome aboard!
Modified: branches/pmc_freeze_with_pmcs/examples/config/file/configcompiler
==============================================================================
--- branches/pmc_freeze_with_pmcs/examples/config/file/configcompiler Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/examples/config/file/configcompiler Fri Jan 29 21:05:08 2010 (r43643)
@@ -74,7 +74,6 @@
gen::config_h
gen::core_pmcs
gen::crypto
-gen::parrot_include
gen::opengl
gen::call_list
gen::languages
Modified: branches/pmc_freeze_with_pmcs/examples/config/file/configwithfatalstep
==============================================================================
--- branches/pmc_freeze_with_pmcs/examples/config/file/configwithfatalstep Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/examples/config/file/configwithfatalstep Fri Jan 29 21:05:08 2010 (r43643)
@@ -66,7 +66,6 @@
gen::config_h
gen::core_pmcs
gen::crypto
-gen::parrot_include
gen::opengl
gen::call_list
gen::languages
Copied: branches/pmc_freeze_with_pmcs/ext/nqp-rx/Defines.mak (from r43642, trunk/ext/nqp-rx/Defines.mak)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/pmc_freeze_with_pmcs/ext/nqp-rx/Defines.mak Fri Jan 29 21:05:08 2010 (r43643, copy of r43642, trunk/ext/nqp-rx/Defines.mak)
@@ -0,0 +1,8 @@
+NQPRX_LIB_PBCS = \
+ $(LIBRARY_DIR)/Regex.pbc \
+ $(LIBRARY_DIR)/HLL.pbc \
+ $(LIBRARY_DIR)/P6Regex.pbc \
+ $(LIBRARY_DIR)/nqp-rx.pbc \
+ $(LIBRARY_DIR)/P6object.pbc \
+ $(LIBRARY_DIR)/PCT/HLLCompiler.pbc \
+ $(LIBRARY_DIR)/PCT/PAST.pbc
Copied: branches/pmc_freeze_with_pmcs/ext/nqp-rx/Rules.mak (from r43642, trunk/ext/nqp-rx/Rules.mak)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/pmc_freeze_with_pmcs/ext/nqp-rx/Rules.mak Fri Jan 29 21:05:08 2010 (r43643, copy of r43642, trunk/ext/nqp-rx/Rules.mak)
@@ -0,0 +1,23 @@
+## XXX does not cover .includes of core .pasm files
+
+$(LIBRARY_DIR)/Regex.pbc: ext/nqp-rx/src/stage0/Regex-s0.pir $(PARROT)
+ $(PARROT) -o $@ ext/nqp-rx/src/stage0/Regex-s0.pir
+
+$(LIBRARY_DIR)/HLL.pbc: ext/nqp-rx/src/stage0/HLL-s0.pir $(PARROT)
+ $(PARROT) -o $@ ext/nqp-rx/src/stage0/HLL-s0.pir
+
+$(LIBRARY_DIR)/P6Regex.pbc: ext/nqp-rx/src/stage0/P6Regex-s0.pir $(PARROT)
+ $(PARROT) -o $@ ext/nqp-rx/src/stage0/P6Regex-s0.pir
+
+$(LIBRARY_DIR)/nqp-rx.pbc: ext/nqp-rx/src/stage0/NQP-s0.pir $(PARROT)
+ $(PARROT) -o $@ ext/nqp-rx/src/stage0/NQP-s0.pir
+
+## TT #1398 - pbc_to_exe cannot generate a specified target file
+parrot-nqp.pbc : $(LIBRARY_DIR)/nqp-rx.pbc
+ $(CP) $(LIBRARY_DIR)/nqp-rx.pbc $@
+
+$(NQP_RX) : $(NQPRX_LIB_PBCS) $(PBC_TO_EXE) parrot-nqp.pbc
+ $(PBC_TO_EXE) parrot-nqp.pbc
+
+$(INSTALLABLENQP) : $(NQPRX_LIB_PBCS) src/install_config$(O) $(PBC_TO_EXE) parrot-nqp.pbc
+ $(PBC_TO_EXE) parrot-nqp.pbc --install
Modified: branches/pmc_freeze_with_pmcs/include/parrot/extend.h
==============================================================================
--- branches/pmc_freeze_with_pmcs/include/parrot/extend.h Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/include/parrot/extend.h Fri Jan 29 21:05:08 2010 (r43643)
@@ -64,38 +64,6 @@
PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
-void * Parrot_call_method(PARROT_INTERP,
- Parrot_PMC sub_pmc,
- Parrot_PMC obj,
- Parrot_String method,
- ARGIN(const char *signature),
- ...)
- __attribute__nonnull__(1)
- __attribute__nonnull__(5);
-
-PARROT_EXPORT
-Parrot_Float Parrot_call_method_ret_float(PARROT_INTERP,
- Parrot_PMC sub_pmc,
- Parrot_PMC obj,
- Parrot_String method,
- ARGIN(const char *signature),
- ...)
- __attribute__nonnull__(1)
- __attribute__nonnull__(5);
-
-PARROT_EXPORT
-Parrot_Int Parrot_call_method_ret_int(PARROT_INTERP,
- Parrot_PMC sub_pmc,
- Parrot_PMC obj,
- Parrot_String method,
- ARGIN(const char *signature),
- ...)
- __attribute__nonnull__(1)
- __attribute__nonnull__(5);
-
-PARROT_EXPORT
-PARROT_WARN_UNUSED_RESULT
-PARROT_CAN_RETURN_NULL
void * Parrot_call_sub(PARROT_INTERP,
Parrot_PMC sub_pmc,
ARGIN(const char *signature),
@@ -104,14 +72,6 @@
__attribute__nonnull__(3);
PARROT_EXPORT
-Parrot_Float Parrot_call_sub_ret_float(PARROT_INTERP,
- Parrot_PMC sub_pmc,
- ARGIN(const char *signature),
- ...)
- __attribute__nonnull__(1)
- __attribute__nonnull__(3);
-
-PARROT_EXPORT
Parrot_Int Parrot_call_sub_ret_int(PARROT_INTERP,
Parrot_PMC sub_pmc,
ARGIN(const char *signature),
@@ -452,21 +412,9 @@
__attribute__nonnull__(2)
__attribute__nonnull__(3);
-#define ASSERT_ARGS_Parrot_call_method __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(signature))
-#define ASSERT_ARGS_Parrot_call_method_ret_float __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(signature))
-#define ASSERT_ARGS_Parrot_call_method_ret_int __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(signature))
#define ASSERT_ARGS_Parrot_call_sub __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(signature))
-#define ASSERT_ARGS_Parrot_call_sub_ret_float __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(signature))
#define ASSERT_ARGS_Parrot_call_sub_ret_int __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(signature))
Modified: branches/pmc_freeze_with_pmcs/include/parrot/hash.h
==============================================================================
--- branches/pmc_freeze_with_pmcs/include/parrot/hash.h Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/include/parrot/hash.h Fri Jan 29 21:05:08 2010 (r43643)
@@ -80,6 +80,16 @@
typedef void (*value_free)(void *);
+/* To avoid creating OrderedHashItem PMC we reuse FixedPMCArray PMC */
+/* So, there is indexes to avoid using of "magick constants" */
+enum ORDERED_HASH_ITEM_PART {
+ ORDERED_HASH_ITEM_KEY = 0,
+ ORDERED_HASH_ITEM_VALUE = 1,
+ ORDERED_HASH_ITEM_PREV = 2,
+ ORDERED_HASH_ITEM_NEXT = 3,
+ ORDERED_HASH_ITEM_MAX = 4,
+};
+
/* HEADERIZER BEGIN: src/hash.c */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
Modified: branches/pmc_freeze_with_pmcs/lib/Parrot/Configure/Compiler.pm
==============================================================================
--- branches/pmc_freeze_with_pmcs/lib/Parrot/Configure/Compiler.pm Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/lib/Parrot/Configure/Compiler.pm Fri Jan 29 21:05:08 2010 (r43643)
@@ -250,20 +250,20 @@
For instance:
- #IF(win32): $(SRC_DIR)/atomic/gcc_x86$(O)
+ #IF(win32): src/atomic/gcc_x86$(O)
will be included if the platform is win32.
- #IF(cpuarch==i386): $(SRC_DIR)/atomic/gcc_x86$(O)
+ #IF(cpuarch==i386): src/atomic/gcc_x86$(O)
will be included if the value of the config key "cpuarch" is "i386".
- #IF(cpuarch==i386): $(SRC_DIR)/atomic/gcc_x86$(O)
- #ELSIF(cpuarch==sparcv9): $(SRC_DIR)/atomic/sparc_v9.s
+ #IF(cpuarch==i386): src/atomic/gcc_x86$(O)
+ #ELSIF(cpuarch==sparcv9): src/atomic/sparc_v9.s
#ELSE:
-will include " $(SRC_DIR)/atomic/gcc_x86$(O)" if the config key "cpuarch" is
-ste to "i386", will include " $(SRC_DIR)/atomic/sparc_v9.s" instead if
+will include " src/atomic/gcc_x86$(O)" if the config key "cpuarch" is
+ste to "i386", will include " src/atomic/sparc_v9.s" instead if
"cpuarch" is set to "sparcv9", and will include an empty line otherwise.
#IF(win32 and glut and not cygwin):
@@ -380,7 +380,6 @@
if ( $options{file_type} eq 'makefile' ) {
$options{replace_slashes} = 1;
$options{conditioned_lines} = 1;
- $options{no_simply_expanded_var} = ! $conf->data->get('gmake_version');
}
}
@@ -564,11 +563,6 @@
$line =~ s{(\\\*)}{\\$1}g;
}
- if ( $options{no_simply_expanded_var} ) {
- # replace := with =
- $line =~ s{:=}{=};
- }
-
print $out $line;
}
Modified: branches/pmc_freeze_with_pmcs/lib/Parrot/Configure/Options/Test/Prepare.pm
==============================================================================
--- branches/pmc_freeze_with_pmcs/lib/Parrot/Configure/Options/Test/Prepare.pm Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/lib/Parrot/Configure/Options/Test/Prepare.pm Fri Jan 29 21:05:08 2010 (r43643)
@@ -36,9 +36,6 @@
my @postconfiguration_tests = (
@steps_tests,
glob("t/postconfigure/*.t"),
- glob("t/tools/pmc2cutils/*.t"),
- glob("t/tools/ops2cutils/*.t"),
- glob("t/tools/ops2pm/*.t"),
glob("t/pharness/*.t"),
);
return @postconfiguration_tests;
Modified: branches/pmc_freeze_with_pmcs/lib/Parrot/Configure/Step/List.pm
==============================================================================
--- branches/pmc_freeze_with_pmcs/lib/Parrot/Configure/Step/List.pm Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/lib/Parrot/Configure/Step/List.pm Fri Jan 29 21:05:08 2010 (r43643)
@@ -66,7 +66,6 @@
gen::config_h
gen::core_pmcs
gen::crypto
- gen::parrot_include
gen::opengl
gen::call_list
gen::makefiles
Modified: branches/pmc_freeze_with_pmcs/lib/Parrot/Docs/Section/Tools.pm
==============================================================================
--- branches/pmc_freeze_with_pmcs/lib/Parrot/Docs/Section/Tools.pm Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/lib/Parrot/Docs/Section/Tools.pm Fri Jan 29 21:05:08 2010 (r43643)
@@ -55,7 +55,6 @@
'',
$self->new_item( '', 'docs/configuration.pod' ),
$self->new_item( '', 'tools/build/c2str.pl' ),
- $self->new_item( '', 'tools/build/dynoplibs.pl' ),
$self->new_item( '', 'tools/build/dynpmc.pl' ),
$self->new_item( '', 'tools/build/ops2c.pl' ),
$self->new_item( '', 'tools/build/ops2pm.pl' ),
Copied: branches/pmc_freeze_with_pmcs/lib/Parrot/H2inc.pm (from r43642, trunk/lib/Parrot/H2inc.pm)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/pmc_freeze_with_pmcs/lib/Parrot/H2inc.pm Fri Jan 29 21:05:08 2010 (r43643, copy of r43642, trunk/lib/Parrot/H2inc.pm)
@@ -0,0 +1,358 @@
+package Parrot::H2inc;
+# Copyright (C) 2010, Parrot Foundation.
+# $Id$
+
+use strict;
+use warnings;
+use Exporter;
+our @ISA = qw( Exporter );
+our @EXPORT_OK = qw(
+ parse_file
+ perform_directive
+ generate_text
+ print_generated_file
+);
+
+=head1 NAME
+
+Parrot::H2inc - Subroutines used in F<tools/build/h2inc.pl>
+
+=head1 DESCRIPTION
+
+This package exports on demand only four subroutines used in
+F<tools/build/h2inc.pl>.
+
+=head1 SUBROUTINES
+
+=head2 C<parse_file()>
+
+=over 4
+
+=item * Arguments
+
+ $directive = parse_file($in_file, $out_file);
+
+List of 2 elements: string holding name of incoming file; string holding name of outgoing file.
+
+=item * Return Value
+
+If successful, returns a hash reference.
+
+=back
+
+=cut
+
+sub parse_file {
+ my ( $in_file, $out_file) = @_;
+ $out_file =~ s/\\/\//g; # transform Windows backslash
+
+ my ( @directives, %values, $last_val, $cur, $or_continues );
+ open my $fh, '<', $in_file or die "Can't open $in_file: $!\n";
+ while ( my $line = <$fh> ) {
+ if (
+ $line =~ m!
+ &gen_from_(enum|def) \( ( [^)]* ) \)
+ (?: \s+ prefix \( (\w+) \) )?
+ (?: \s+ subst \( (s/.*?/.*?/[eig]?) \) )?
+ !x
+ )
+ {
+ $cur and die "Missing '&end_gen' in $in_file\n";
+ my $file;
+ foreach (split ' ', $2) {
+ $file = $_ if $out_file =~ /$_$/;
+ }
+ $cur = {
+ type => $1,
+ file => $file,
+ prefix => defined $3 ? $3 : '',
+ defined $4 ? ( subst => $4 ) : (),
+ };
+ $last_val = -1;
+ }
+ elsif ( $line =~ /&end_gen\b/ ) {
+ $cur or die "Missing &gen_from_(enum|def) in $in_file\n";
+ return $cur if defined $cur->{file};
+ $cur = undef;
+ }
+
+ $cur or next;
+
+ if ( $cur->{type} eq 'def' && $line =~ /^\s*#define\s+(\w+)\s+(-?\w+|"[^"]*")/ ) {
+ push @{ $cur->{defs} }, [ $1, $2 ];
+ }
+ elsif ( $cur->{type} eq 'enum' ) {
+ # Special case: enum value is or'd combination of other values
+ if ( $or_continues ) {
+ $or_continues = 0;
+ my $last_def = $cur->{defs}->[-1];
+ my ($k, $v) = @{$last_def};
+ my @or_values = grep {defined $_} $line =~ /^\s*(-?\w+)(?:\s*\|\s*(-?\w+))*/;
+ for my $or (@or_values) {
+ if ( defined $values{$or} ) {
+ $v |= $values{$or};
+ }
+ elsif ( $or =~ /^0/ ) {
+ $v |= oct $or;
+ }
+ }
+ if ($line =~ /\|\s*$/) {
+ $or_continues = 1;
+ }
+ $values{$k} = $last_val = $v;
+ $cur->{defs}->[-1]->[1] = $v;
+ }
+ elsif ( $line =~ /^\s*(\w+)\s*=\s*(-?\w+)\s*\|/ ) {
+ my ( $k, $v ) = ( $1, $2 );
+ my @or_values = ($v, $line =~ /\|\s*(-?\w+)/g);
+ $v = 0;
+ for my $or (@or_values) {
+ if ( defined $values{$or} ) {
+ $v |= $values{$or};
+ }
+ elsif ( $or =~ /^0/ ) {
+ $v |= oct $or;
+ }
+ }
+ if ($line =~ /\|\s*$/) {
+ $or_continues = 1;
+ }
+ $values{$k} = $last_val = $v;
+ push @{ $cur->{defs} }, [ $k, $v ];
+ }
+ elsif ( $line =~ /^\s*(\w+)\s*=\s*(-?\w+)/ ) {
+ my ( $k, $v ) = ( $1, $2 );
+ if ( defined $values{$v} ) {
+ $v = $values{$v};
+ }
+ elsif ( $v =~ /^0/ ) {
+ $v = oct $v;
+ }
+ $values{$k} = $last_val = $v;
+ push @{ $cur->{defs} }, [ $k, $v ];
+ }
+ elsif ( $line =~ m!^\s*(\w+)\s*(?:,\s*)?(?:/\*|$)! ) {
+ my $k = $1;
+ my $v = $values{$k} = ++$last_val;
+ push @{ $cur->{defs} }, [ $k, $v ];
+ }
+ }
+ }
+ $cur and die "Missing '&end_gen' in $in_file\n";
+ close $fh or die "Could not close handle to $in_file after reading: $!";
+
+ return;
+}
+
+=head2 C<perform_directive()>
+
+=over 4
+
+=item * Arguments
+
+ $defs_ref = perform_directive($directive);
+
+Single hash reference (which is the return value from a successful run of
+C<parse_file()>.
+
+=item * Return Value
+
+Array reference.
+
+=back
+
+=cut
+
+sub perform_directive {
+ my ($d) = @_;
+
+ my @defs = prepend_prefix( $d->{prefix}, @{ $d->{defs} } );
+ if ( my $subst = $d->{subst} ) {
+ @defs = transform_name( sub { local $_ = shift; eval $subst; $_ }, @defs );
+ }
+ return \@defs;
+}
+
+=head2 C<const_to_parrot()>
+
+=over 4
+
+=item * Arguments
+
+ $gen = join "\n", const_to_parrot(@defs);
+
+List.
+
+=item * Return Value
+
+String.
+
+=back
+
+=cut
+
+sub const_to_parrot {
+
+ my $keylen = (sort { $a <=> $b } map { length($_->[0]) } @_ )[-1] ;
+ my $vallen = (sort { $a <=> $b } map { length($_->[1]) } @_ )[-1] ;
+
+ map {sprintf ".macro_const %-${keylen}s %${vallen}s", $_->[0], $_->[1]} @_;
+}
+
+=head2 C<const_to_perl()>
+
+=over 4
+
+=item * Arguments
+
+ $gen = join "\n", const_to_perl(@defs);
+
+List.
+
+=item * Return Value
+
+String.
+
+=back
+
+=cut
+
+sub const_to_perl {
+
+ my $keylen = (sort { $a <=> $b } map { length($_->[0]) } @_ )[-1] ;
+
+ map {sprintf "use constant %-${keylen}s => %s;", $_->[0], $_->[1]} @_;
+}
+
+=head2 C<transform_name()>
+
+=over 4
+
+=item * Arguments
+
+ transform_name( sub { $prefix . $_[0] }, @_ );
+
+List of two or more elements, the first element of which is a subroutine
+reference.
+
+=item * Return Value
+
+List which is a mapping of the transformations executed by the first argument
+upon the remaining arguments.
+
+=back
+
+=cut
+
+sub transform_name {
+ my $action = shift;
+
+ return map { [ $action->( $_->[0] ), $_->[1] ] } @_;
+}
+
+=head2 C<prepend_prefix()>
+
+=over 4
+
+=item * Arguments
+
+ @defs = prepend_prefix $d->{prefix}, @{ $d->{defs} };
+
+List of two or more elements, the first element of which is a string.
+
+=item * Return Value
+
+List.
+
+=back
+
+=cut
+
+sub prepend_prefix {
+ my $prefix = shift;
+
+ transform_name( sub { $prefix . $_[0] }, @_ );
+}
+
+=head2 C<generate_text()>
+
+=over 4
+
+=item * Argument
+
+ $generated_text = generate_text($directive, \@defs);
+
+List of two arguments: Directive hashref; reference to array of definitions.
+
+=item * Return Value
+
+String holding main text to be printed to new file.
+
+=back
+
+=cut
+
+sub generate_text {
+ my ($directive, $defs_ref) = @_;
+
+ my $target = $directive->{file};
+ my $generated_text;
+ if ($target =~ /\.pm$/) {
+ $generated_text = join "\n", const_to_perl(@{ $defs_ref });
+ $generated_text .= "\n1;";
+ }
+ else {
+ $generated_text = join "\n", const_to_parrot(@{ $defs_ref });
+ }
+ return $generated_text;
+}
+
+=head2 C<print_generated_file()>
+
+=over 4
+
+=item * Argument
+
+ print_generated_file( {
+ in => $in_file,
+ out => $out_file,
+ script => $0,
+ gen => $generated_text,
+ } );
+
+Hash reference. Elements pertain to file being read, file being created,
+calling program (typically, F<tools/build/h2inc.pl>) and string of text to be
+printed to file.
+
+=item * Return Value
+
+Implicitly returns true upon success.
+
+=back
+
+=cut
+
+sub print_generated_file {
+ my $args = shift;
+ open my $out_fh, '>', $args->{out} or die "Can't open $args->{out}: $!\n";
+ print $out_fh <<"EOF";
+# DO NOT EDIT THIS FILE.
+#
+# This file is generated automatically from
+# $args->{in} by $args->{script}
+#
+# Any changes made here will be lost.
+#
+$args->{gen}
+EOF
+ close $out_fh;
+}
+
+1;
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
Modified: branches/pmc_freeze_with_pmcs/lib/Parrot/Harness/Options.pm
==============================================================================
--- branches/pmc_freeze_with_pmcs/lib/Parrot/Harness/Options.pm Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/lib/Parrot/Harness/Options.pm Fri Jan 29 21:05:08 2010 (r43643)
@@ -28,9 +28,6 @@
my @argv = @_;
my %longopts;
- $longopts{running_make_test} = grep { $_ eq '--running-make-test' } @argv;
- @argv = grep { $_ ne '--running-make-test' } @argv;
-
$longopts{gc_debug} = grep { $_ eq '--gc-debug' } @argv;
@argv = grep { $_ ne '--gc-debug' } @argv;
@@ -130,7 +127,6 @@
-r ... assemble to PBC run PBC
-O[012] ... optimize
-D[number] ... pass debug flags to parrot interpreter
- --running-make-test
--gc-debug
--core-tests
--runcore-tests
Modified: branches/pmc_freeze_with_pmcs/runtime/parrot/library/Getopt/Obj.pir
==============================================================================
--- branches/pmc_freeze_with_pmcs/runtime/parrot/library/Getopt/Obj.pir Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/runtime/parrot/library/Getopt/Obj.pir Fri Jan 29 21:05:08 2010 (r43643)
@@ -71,22 +71,22 @@
.sub __load :anon :load
.local pmc obj, spec, pns, ns
- obj = newclass "Getopt::Obj"
+ obj = newclass ['Getopt';'Obj']
addattribute obj, "Specs"
addattribute obj, "notOptStop"
- spec = newclass "Getopt::Obj::Spec"
+ spec = newclass ['Getopt';'Obj';'Spec']
addattribute spec, "name"
addattribute spec, "long"
addattribute spec, "short"
addattribute spec, "type"
addattribute spec, "optarg"
- ns = get_hll_namespace ["Getopt::Obj"]
+ ns = get_hll_namespace ['Getopt';'Obj']
$P0 = get_hll_namespace
pns = $P0.'make_namespace'('Getopt')
pns.'add_namespace'('Obj', ns)
- ns = get_hll_namespace ["Getopt::Obj::Spec"]
+ ns = get_hll_namespace ['Getopt';'Obj';'Spec']
pns = get_hll_namespace ['Getopt';'Obj']
pns.'add_namespace'('Spec', ns)
.end
@@ -101,7 +101,7 @@
=cut
-.namespace ["Getopt::Obj"]
+.namespace ['Getopt';'Obj']
=item C<init()>
@@ -462,7 +462,7 @@
.sub "add" :method
.local pmc spec, specs
- spec = new "Getopt::Obj::Spec"
+ spec = new ['Getopt';'Obj';'Spec']
specs = getattribute self, "Specs"
push specs, spec
.return(spec)
@@ -568,14 +568,14 @@
=head2 Class Getopt::Obj::Spec
-Internal use only, at least don't do any new "Getopt::Obj::Spec" yourself...
+Internal use only, at least don't do any C<new ['Getopt';'Obj';'Spec'> yourself...
This makes an easy holder for each possible match.
=over 4
=cut
-.namespace ["Getopt::Obj::Spec"]
+.namespace ['Getopt';'Obj';'Spec']
=item C<init()>
Copied: branches/pmc_freeze_with_pmcs/runtime/parrot/library/Rules.mak (from r43642, trunk/runtime/parrot/library/Rules.mak)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/pmc_freeze_with_pmcs/runtime/parrot/library/Rules.mak Fri Jan 29 21:05:08 2010 (r43643, copy of r43642, trunk/runtime/parrot/library/Rules.mak)
@@ -0,0 +1,23 @@
+# Track static dependencies
+
+# XXX only a partial mapping.
+
+$(LIBRARY_DIR)/PGE/Hs.pbc : \
+ $(LIBRARY_DIR)/PGE.pbc
+
+$(LIBRARY_DIR)/PGE/Glob.pbc : \
+ $(LIBRARY_DIR)/PGE.pbc \
+ $(LIBRARY_DIR)/PGE/Dumper.pbc
+
+$(LIBRARY_DIR)/PGE/Perl6Grammar.pbc : \
+ $(LIBRARY_DIR)/PGE.pbc \
+ $(LIBRARY_DIR)/PGE/Text.pbc \
+ $(LIBRARY_DIR)/PGE/Util.pbc \
+ $(LIBRARY_DIR)/PCT/HLLCompiler.pbc
+
+$(LIBRARY_DIR)/Tcl/Glob.pbc : \
+ $(LIBRARY_DIR)/PGE.pbc \
+ $(LIBRARY_DIR)/PCT/HLLCompiler.pbc
+
+$(LIBRARY_DIR)/P6Object.pbc : \
+ $(LIBRARY_DIR)/dumper.pbc
Modified: branches/pmc_freeze_with_pmcs/runtime/parrot/library/distutils.pir
==============================================================================
--- branches/pmc_freeze_with_pmcs/runtime/parrot/library/distutils.pir Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/runtime/parrot/library/distutils.pir Fri Jan 29 21:05:08 2010 (r43643)
@@ -4321,24 +4321,28 @@
.param string target
.param pmc depends
$I0 = does depends, 'array'
- if $I0 goto L0
+ if $I0 goto L1
$S0 = depends
.tailcall newer(target, $S0)
- L0:
+ L1:
$I0 = stat target, .STAT_EXISTS
- if $I0 goto L1
+ unless $I0 goto L2
+ $I0 = stat target, .STAT_FILESIZE
+ unless $I0 goto L2
+ goto L3
+ L2:
.return (0)
- L1:
+ L3:
$I0 = stat target, .STAT_MODIFYTIME
$P0 = iter depends
- L2:
- unless $P0 goto L3
+ L4:
+ unless $P0 goto L5
$S0 = shift $P0
- if $S0 == '' goto L2
+ if $S0 == '' goto L4
$I1 = stat $S0, .STAT_MODIFYTIME
- if $I1 < $I0 goto L2
+ if $I1 < $I0 goto L4
.return (0)
- L3:
+ L5:
.return (1)
.end
@@ -4346,9 +4350,13 @@
.param string target
.param string depend
$I0 = stat target, .STAT_EXISTS
- if $I0 goto L1
- .return (0)
+ unless $I0 goto L1
+ $I0 = stat target, .STAT_FILESIZE
+ unless $I0 goto L1
+ goto L2
L1:
+ .return (0)
+ L2:
$I1 = stat target, .STAT_MODIFYTIME
$I2 = stat depend, .STAT_MODIFYTIME
$I0 = $I1 > $I2
Modified: branches/pmc_freeze_with_pmcs/src/embed.c
==============================================================================
--- branches/pmc_freeze_with_pmcs/src/embed.c Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/src/embed.c Fri Jan 29 21:05:08 2010 (r43643)
@@ -726,8 +726,7 @@
set_current_sub(PARROT_INTERP)
{
ASSERT_ARGS(set_current_sub)
- Parrot_Sub_attributes *sub_pmc_sub;
- PMC *sub_pmc;
+ PMC *sub_pmc;
PackFile_ByteCode * const cur_cs = interp->code;
PackFile_FixupTable * const ft = cur_cs->fixups;
@@ -761,11 +760,10 @@
}
}
- /* if we didn't find anything, put a dummy PMC into current_sub */
-
+ /* If we didn't find anything, put a dummy PMC into current_sub.
+ The default values set by SUb.init are appropiate for the
+ dummy, don't need additional settings. */
sub_pmc = pmc_new(interp, enum_class_Sub);
- PMC_get_sub(interp, sub_pmc, sub_pmc_sub);
- sub_pmc_sub->start_offs = 0;
Parrot_pcc_set_sub(interp, CURRENT_CONTEXT(interp), sub_pmc);
return sub_pmc;
Modified: branches/pmc_freeze_with_pmcs/src/extend.c
==============================================================================
--- branches/pmc_freeze_with_pmcs/src/extend.c Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/src/extend.c Fri Jan 29 21:05:08 2010 (r43643)
@@ -1172,199 +1172,6 @@
/*
-=item C<Parrot_Float Parrot_call_sub_ret_float(PARROT_INTERP, Parrot_PMC
-sub_pmc, const char *signature, ...)>
-
-Like C<Parrot_call_sub>, with Parrot_Float return result.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-Parrot_Float
-Parrot_call_sub_ret_float(PARROT_INTERP, Parrot_PMC sub_pmc,
- ARGIN(const char *signature), ...)
-{
- ASSERT_ARGS(Parrot_call_sub_ret_float)
- va_list args;
- PMC *sig_object;
- Parrot_Float result;
- char return_sig = signature[0];
- const char *arg_sig = signature;
- Parrot_sub *sub;
-
- arg_sig++;
- va_start(args, signature);
- sig_object = Parrot_pcc_build_sig_object_from_varargs(interp, PMCNULL, arg_sig, args);
- va_end(args);
-
- /* Add the return argument onto the call signature object (a bit
- * hackish, added for backward compatibility in deprecated API function,
- * see TT #1145). */
- Parrot_pcc_append_result(interp, sig_object, Parrot_str_new_constant(interp, "N"), &result);
- PMC_get_sub(interp, sub_pmc, sub);
- Parrot_pcc_set_constants(interp, CURRENT_CONTEXT(interp), sub->seg->const_table->constants);
- Parrot_pcc_invoke_from_sig_object(interp, sub_pmc, sig_object);
-
- return result;
-}
-
-/*
-
-=item C<void * Parrot_call_method(PARROT_INTERP, Parrot_PMC sub_pmc, Parrot_PMC
-obj, Parrot_String method, const char *signature, ...)>
-
-Call the parrot subroutine C<sub> as a method on PMC object C<obj>. The method
-should have the name C<method> as a Parrot_string, and should have a function
-signature C<signature>. Any arguments to the method can be passed at the end
-as a variadic argument list.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-PARROT_WARN_UNUSED_RESULT
-PARROT_CAN_RETURN_NULL
-void *
-Parrot_call_method(PARROT_INTERP, Parrot_PMC sub_pmc, Parrot_PMC obj,
- Parrot_String method, ARGIN(const char *signature), ...)
-{
- ASSERT_ARGS(Parrot_call_method)
- va_list args;
- PMC *sig_object;
- void *result = NULL;
- char return_sig = signature[0];
- char *arg_sig = (char*)malloc(strlen(signature)+2);
- Parrot_sub *sub;
- arg_sig[0] = 'P';
- arg_sig[1] = 'i';
- arg_sig[2] = 0;
- strcat(arg_sig, signature);
-
- va_start(args, signature);
- sig_object = Parrot_pcc_build_sig_object_from_varargs(interp, obj, arg_sig, args);
- va_end(args);
- free(arg_sig);
-
- /* Add the return argument onto the call signature object (a bit
- * hackish, added for backward compatibility in deprecated API function,
- * see TT #1145). */
- switch (return_sig) {
- case 'v':
- {
- Parrot_String full_sig = VTABLE_get_string(interp, sig_object);
- Parrot_str_concat(interp, full_sig,
- Parrot_str_new_constant(interp, "->"), 0);
- break;
- }
- case 'V':
- case 'P':
- {
- Parrot_pcc_append_result(interp, sig_object, Parrot_str_new_constant(interp, "P"),
- &result);
- break;
- }
- default:
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
- "Dispatch: invalid return type %c!", return_sig);
- }
-
- PMC_get_sub(interp, sub_pmc, sub);
- Parrot_pcc_set_constants(interp, CURRENT_CONTEXT(interp), sub->seg->const_table->constants);
- Parrot_pcc_invoke_from_sig_object(interp, sub_pmc, sig_object);
-
- return result;
-}
-
-/*
-
-=item C<Parrot_Int Parrot_call_method_ret_int(PARROT_INTERP, Parrot_PMC sub_pmc,
-Parrot_PMC obj, Parrot_String method, const char *signature, ...)>
-
-Call the parrot subroutine C<sub> as a method on PMC object C<obj>. The method
-should have the name C<method> as a Parrot_string, and should have a function
-signature C<signature>. Any arguments to the method can be passed at the end
-as a variadic argument list.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-Parrot_Int
-Parrot_call_method_ret_int(PARROT_INTERP, Parrot_PMC sub_pmc,
- Parrot_PMC obj, Parrot_String method, ARGIN(const char *signature), ...)
-{
- ASSERT_ARGS(Parrot_call_method_ret_int)
- va_list args;
- PMC *sig_object;
- Parrot_Int result = 0;
- char return_sig = signature[0];
- char *arg_sig = (char*)malloc(strlen(signature)+2);
- Parrot_sub *sub;
- arg_sig[0] = 'P';
- arg_sig[1] = 'i';
- arg_sig[2] = 0;
- strcat(arg_sig, signature);
-
- va_start(args, signature);
- sig_object = Parrot_pcc_build_sig_object_from_varargs(interp, obj, arg_sig, args);
- va_end(args);
- free(arg_sig);
-
- Parrot_pcc_append_result(interp, sig_object, Parrot_str_new_constant(interp, "I"), &result);
- PMC_get_sub(interp, sub_pmc, sub);
- Parrot_pcc_set_constants(interp, CURRENT_CONTEXT(interp), sub->seg->const_table->constants);
- Parrot_pcc_invoke_from_sig_object(interp, sub_pmc, sig_object);
-
- return result;
-}
-
-/*
-
-=item C<Parrot_Float Parrot_call_method_ret_float(PARROT_INTERP, Parrot_PMC
-sub_pmc, Parrot_PMC obj, Parrot_String method, const char *signature, ...)>
-
-Call a parrot method for the given object.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-Parrot_Float
-Parrot_call_method_ret_float(PARROT_INTERP, Parrot_PMC sub_pmc,
- Parrot_PMC obj, Parrot_String method, ARGIN(const char *signature), ...)
-{
- ASSERT_ARGS(Parrot_call_method_ret_float)
- va_list args;
- PMC *sig_object;
- Parrot_Float result = 0.0;
- char return_sig = signature[0];
- char *arg_sig = (char*)malloc(strlen(signature)+2);
- Parrot_sub *sub;
- arg_sig[0] = 'P';
- arg_sig[1] = 'i';
- arg_sig[2] = 0;
- strcat(arg_sig, signature);
-
- va_start(args, signature);
- sig_object = Parrot_pcc_build_sig_object_from_varargs(interp, obj, arg_sig, args);
- va_end(args);
- free(arg_sig);
-
- Parrot_pcc_append_result(interp, sig_object, Parrot_str_new_constant(interp, "N"), &result);
- PMC_get_sub(interp, sub_pmc, sub);
- Parrot_pcc_set_constants(interp, CURRENT_CONTEXT(interp), sub->seg->const_table->constants);
- Parrot_pcc_invoke_from_sig_object(interp, sub_pmc, sig_object);
-
- return result;
-}
-
-/*
-
=item C<Parrot_Int Parrot_get_intreg(PARROT_INTERP, Parrot_Int regnum)>
Return the value of an integer register.
Modified: branches/pmc_freeze_with_pmcs/src/packfile.c
==============================================================================
--- branches/pmc_freeze_with_pmcs/src/packfile.c Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/src/packfile.c Fri Jan 29 21:05:08 2010 (r43643)
@@ -1052,7 +1052,7 @@
/* No UUID; fine, nothing more to do. */
}
else if (header->uuid_type == 1) {
- if (packed_size < PACKFILE_HEADER_BYTES + header->uuid_size) {
+ if (packed_size < (size_t) PACKFILE_HEADER_BYTES + header->uuid_size) {
Parrot_io_eprintf(NULL, "PackFile_unpack: "
"Buffer length %d is shorter than PACKFILE_HEADER_BYTES + uuid_size %d\n",
packed_size, PACKFILE_HEADER_BYTES + header->uuid_size);
Modified: branches/pmc_freeze_with_pmcs/src/pmc/continuation.pmc
==============================================================================
--- branches/pmc_freeze_with_pmcs/src/pmc/continuation.pmc Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/src/pmc/continuation.pmc Fri Jan 29 21:05:08 2010 (r43643)
@@ -64,14 +64,14 @@
*/
VTABLE void init() {
- Parrot_Continuation_attributes * const attrs = PARROT_CONTINUATION(SELF);
+ PMC * const to_ctx = CURRENT_CONTEXT(INTERP);
- attrs->to_ctx = CURRENT_CONTEXT(interp);
- attrs->to_call_object = Parrot_pcc_get_signature(INTERP, attrs->to_ctx);
- attrs->from_ctx = CURRENT_CONTEXT(interp);
- attrs->runloop_id = 0;
- attrs->seg = interp->code;
- attrs->address = NULL;
+ SET_ATTR_to_ctx(INTERP, SELF, to_ctx);
+ SET_ATTR_to_call_object(INTERP, SELF, Parrot_pcc_get_signature(INTERP, to_ctx));
+ SET_ATTR_from_ctx(INTERP, SELF, CURRENT_CONTEXT(INTERP));
+ SET_ATTR_runloop_id(INTERP, SELF, 0);
+ SET_ATTR_seg(INTERP, SELF, INTERP->code);
+ SET_ATTR_address(INTERP, SELF, NULL);
PObj_custom_mark_SET(SELF);
@@ -87,15 +87,22 @@
/*if they pass in a PMC to initialize with*/
VTABLE void init_pmc(PMC *values) {
- Parrot_Continuation_attributes * const attrs = PARROT_CONTINUATION(SELF);
- Parrot_Continuation_attributes * const theirs = PARROT_CONTINUATION(values);
+ PMC *to_ctx;
+ opcode_t *address;
+ PackFile_ByteCode *seg;
+
+ GET_ATTR_to_ctx(INTERP, values, to_ctx);
+ SET_ATTR_to_ctx(INTERP, SELF, to_ctx);
+ SET_ATTR_to_call_object(INTERP, SELF, Parrot_pcc_get_signature(INTERP, to_ctx));
- attrs->to_ctx = theirs->to_ctx;
- attrs->to_call_object = Parrot_pcc_get_signature(INTERP, attrs->to_ctx);
- attrs->from_ctx = CURRENT_CONTEXT(interp);
- attrs->runloop_id = 0;
- attrs->seg = theirs->seg;
- attrs->address = theirs->address;
+ SET_ATTR_from_ctx(INTERP, SELF, CURRENT_CONTEXT(INTERP));
+ SET_ATTR_runloop_id(INTERP, SELF, 0);
+
+ GET_ATTR_seg(INTERP, values, seg);
+ SET_ATTR_seg(INTERP, SELF, seg);
+
+ GET_ATTR_address(INTERP, values, address);
+ SET_ATTR_address(INTERP, SELF, address);
PObj_custom_mark_SET(SELF);
@@ -122,15 +129,20 @@
*/
VTABLE void mark() {
- Parrot_Continuation_attributes * const cc = PARROT_CONTINUATION(SELF);
+ PMC *tmp;
/* If Continuation wasn't fully constructed yet */
- if (!cc)
+ if (!PMC_data(SELF))
return;
- Parrot_gc_mark_PMC_alive(INTERP, cc->to_ctx);
- Parrot_gc_mark_PMC_alive(INTERP, cc->to_call_object);
- Parrot_gc_mark_PMC_alive(INTERP, cc->from_ctx);
+ GET_ATTR_to_ctx(INTERP, SELF, tmp);
+ Parrot_gc_mark_PMC_alive(INTERP, tmp);
+
+ GET_ATTR_to_call_object(INTERP, SELF, tmp);
+ Parrot_gc_mark_PMC_alive(INTERP, tmp);
+
+ GET_ATTR_from_ctx(INTERP, SELF, tmp);
+ Parrot_gc_mark_PMC_alive(INTERP, tmp);
}
/*
@@ -145,9 +157,7 @@
VTABLE PMC *clone() {
/* Start to prepare for subclassable continuations */
- INTVAL type = SELF->vtable->base_type;
- PMC * ret = pmc_new_init(interp, type, SELF);
- return ret;
+ return pmc_new_init(INTERP, SELF->vtable->base_type, SELF);
}
/*
@@ -160,10 +170,8 @@
*/
VTABLE void set_pmc(PMC *src) {
- Parrot_Continuation_attributes * const cc_self = PARROT_CONTINUATION(SELF);
- Parrot_Continuation_attributes * const cc_src = PARROT_CONTINUATION(src);
-
- STRUCT_COPY(cc_self, cc_src);
+ STRUCT_COPY((Parrot_Continuation_attributes *)PMC_data(SELF),
+ (Parrot_Continuation_attributes *)PMC_data(src));
}
/*
@@ -177,11 +185,8 @@
*/
VTABLE void set_pointer(void *value) {
- opcode_t * const pos = (opcode_t *)value;
- Parrot_Continuation_attributes * const cc = PARROT_CONTINUATION(SELF);
-
- cc->address = pos;
- cc->runloop_id = INTERP->current_runloop_id;
+ SET_ATTR_address(INTERP, SELF, (opcode_t *)value);
+ SET_ATTR_runloop_id(INTERP, SELF, INTERP->current_runloop_id);
}
/*
@@ -195,7 +200,11 @@
*/
VTABLE void *get_pointer() {
- return PARROT_CONTINUATION(SELF)->address;
+ opcode_t *address;
+
+ GET_ATTR_address(INTERP, SELF, address);
+
+ return address;
}
/*
@@ -211,11 +220,19 @@
*/
VTABLE INTVAL defined() {
- return PARROT_CONTINUATION(SELF)->address != NULL;
+ opcode_t *address;
+
+ GET_ATTR_address(INTERP, SELF, address);
+
+ return address != NULL;
}
VTABLE INTVAL get_bool() {
- return PARROT_CONTINUATION(SELF)->address != NULL;
+ opcode_t *address;
+
+ GET_ATTR_address(INTERP, SELF, address);
+
+ return address != NULL;
}
/*
@@ -230,19 +247,22 @@
*/
VTABLE opcode_t *invoke(void *next) {
- Parrot_Continuation_attributes * const cc = PARROT_CONTINUATION(SELF);
- PMC *from_ctx = CURRENT_CONTEXT(interp);
- PMC *to_ctx = cc->to_ctx;
- opcode_t *pc = cc->address;
- PMC *call_obj = cc->to_call_object;
- PMC *from_obj = Parrot_pcc_get_signature(interp, from_ctx);
+ PMC * const from_obj = Parrot_pcc_get_signature(INTERP, CURRENT_CONTEXT(INTERP));
+ PMC *to_ctx, *call_obj;
+ opcode_t *pc;
+ PackFile_ByteCode *seg;
UNUSED(next)
- Parrot_continuation_check(interp, SELF);
- Parrot_continuation_rewind_environment(interp, SELF);
+ GET_ATTR_seg(INTERP, SELF, seg);
+ GET_ATTR_address(INTERP, SELF, pc);
+ GET_ATTR_to_ctx(INTERP, SELF, to_ctx);
+ GET_ATTR_to_call_object(INTERP, SELF, call_obj);
+
+ Parrot_continuation_check(INTERP, SELF);
+ Parrot_continuation_rewind_environment(INTERP, SELF);
if (!PMC_IS_NULL(from_obj)) {
- STRING *string_sig = VTABLE_get_string(INTERP, from_obj);
+ STRING * const string_sig = VTABLE_get_string(INTERP, from_obj);
/* If there is no string - there is no args */
if (string_sig) {
PMC *raw_sig, *invalid_sig;
@@ -253,13 +273,13 @@
call_obj = Parrot_pcc_build_sig_object_returns_from_op(INTERP, call_obj,
Parrot_pcc_get_pmc_constant(INTERP, to_ctx, pc[1]), pc);
- Parrot_pcc_fill_returns_from_continuation(interp, call_obj, raw_sig, from_obj);
+ Parrot_pcc_fill_returns_from_continuation(INTERP, call_obj, raw_sig, from_obj);
}
}
/* switch segment */
- if (INTERP->code != cc->seg)
- Parrot_switch_to_cs(INTERP, cc->seg, 1);
+ if (INTERP->code != seg)
+ Parrot_switch_to_cs(INTERP, seg, 1);
return pc;
}
@@ -275,7 +295,11 @@
*/
VTABLE STRING *get_string() {
- return Parrot_Context_infostr(INTERP, PARROT_CONTINUATION(SELF)->to_ctx);
+ PMC *to_ctx;
+
+ GET_ATTR_to_ctx(INTERP, SELF, to_ctx);
+
+ return Parrot_Context_infostr(INTERP, to_ctx);
}
/*
@@ -289,8 +313,11 @@
*/
METHOD caller() {
- Parrot_Continuation_attributes * const cc = PARROT_CONTINUATION(SELF);
- PMC *caller = Parrot_pcc_get_sub(interp, cc->to_ctx);
+ PMC *to_ctx, *caller;
+
+ GET_ATTR_to_ctx(INTERP, SELF, to_ctx);
+
+ caller = Parrot_pcc_get_sub(INTERP, to_ctx);
if (!caller)
caller = PMCNULL;
@@ -315,8 +342,11 @@
*/
METHOD continuation() {
- Parrot_Continuation_attributes * const cc = PARROT_CONTINUATION(SELF);
- PMC * const cont = Parrot_pcc_get_continuation(interp, cc->to_ctx);
+ PMC *to_ctx, *cont;
+
+ GET_ATTR_to_ctx(INTERP, SELF, to_ctx);
+
+ cont = Parrot_pcc_get_continuation(INTERP, to_ctx);
if (cont)
RETURN(PMC *cont);
Modified: branches/pmc_freeze_with_pmcs/src/pmc/coroutine.pmc
==============================================================================
--- branches/pmc_freeze_with_pmcs/src/pmc/coroutine.pmc Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/src/pmc/coroutine.pmc Fri Jan 29 21:05:08 2010 (r43643)
@@ -35,21 +35,23 @@
static void
print_sub_name(PARROT_INTERP, PMC *sub_pmc)
{
- /* It's actually a Parrot_coro, but this avoids casting warnings. */
- Parrot_Sub_attributes *co = PARROT_SUB(sub_pmc);
- Interp * const tracer = (interp->pdb && interp->pdb->debugger) ?
- interp->pdb->debugger :
- interp;
+ /* It's actually a Parrot_coroutine, but this avoids casting warnings. */
+ PMC *ctx;
+ Interp * const tracer = (interp->pdb && interp->pdb->debugger) ?
+ interp->pdb->debugger :
+ interp;
- Parrot_io_eprintf(tracer, "# %s coro '%Ss'",
+ GETATTR_Coroutine_ctx(interp, sub_pmc, ctx);
+
+ Parrot_io_eprintf(tracer, "# %s coroutine '%Ss'",
!(PObj_get_FLAGS(sub_pmc) & SUB_FLAG_CORO_FF) ?
"Calling" : "yielding from",
Parrot_full_sub_name(interp, sub_pmc));
- if (co->ctx && (PObj_get_FLAGS(sub_pmc) & SUB_FLAG_CORO_FF)) {
+ if (ctx && (PObj_get_FLAGS(sub_pmc) & SUB_FLAG_CORO_FF)) {
Parrot_io_eprintf(tracer, " to '%Ss'",
Parrot_full_sub_name(interp,
- Parrot_pcc_get_sub(interp, Parrot_pcc_get_caller_ctx(interp, co->ctx))));
+ Parrot_pcc_get_sub(interp, Parrot_pcc_get_caller_ctx(interp, ctx))));
}
Parrot_io_eprintf(tracer, "\n# ");
@@ -57,9 +59,9 @@
}
pmclass Coroutine extends Sub auto_attrs {
+ ATTR INTVAL yield; /* yield in process */
+ ATTR opcode_t *address; /* next address to run - toggled each time */
ATTR PackFile_ByteCode *caller_seg; /* bytecode segment */
- ATTR opcode_t *address; /* next address to run - toggled each time */
- ATTR INTVAL yield; /* yield in process */
/*
@@ -76,10 +78,8 @@
*/
VTABLE void init() {
- Parrot_Coroutine_attributes *attrs = PARROT_COROUTINE(SELF);
-
- attrs->seg = INTERP->code;
- attrs->ctx = PMCNULL;
+ SET_ATTR_seg(INTERP, SELF, INTERP->code);
+ SET_ATTR_ctx(INTERP, SELF, PMCNULL);
PObj_custom_mark_destroy_SETALL(SELF);
}
@@ -96,15 +96,17 @@
*/
VTABLE PMC *clone() {
+ STRING *name;
PMC * const ret = pmc_new(INTERP, SELF->vtable->base_type);
- Parrot_Coroutine_attributes * const sub = PARROT_COROUTINE(SELF);
- Parrot_Coroutine_attributes * const coro_sub = PARROT_COROUTINE(ret);
PObj_custom_mark_destroy_SETALL(ret);
- memcpy(coro_sub, sub, sizeof (Parrot_Coroutine_attributes));
+ memcpy((Parrot_Coroutine_attributes *)PMC_data(ret),
+ (Parrot_Coroutine_attributes *)PMC_data(SELF),
+ sizeof (Parrot_Coroutine_attributes));
- coro_sub->name = Parrot_str_copy(INTERP, coro_sub->name);
+ GET_ATTR_name(INTERP, ret, name);
+ SET_ATTR_name(INTERP, ret, Parrot_str_copy(INTERP, name));
return ret;
}
@@ -134,92 +136,124 @@
*/
VTABLE opcode_t *invoke(void *next) {
+ PMC *ctx;
+ opcode_t *dest;
PackFile_ByteCode *wanted_seg;
- Parrot_Coroutine_attributes * const co = PARROT_COROUTINE(SELF);
- opcode_t * dest = co->address;
- opcode_t * const next_op = (opcode_t *)next;
+ opcode_t * const next_op = (opcode_t *)next;
if (Interp_trace_TEST(INTERP, PARROT_TRACE_SUB_CALL_FLAG))
print_sub_name(INTERP, SELF);
- if (PMC_IS_NULL(co->ctx)) {
- PMC * const caller_ctx = CURRENT_CONTEXT(interp);
- PMC *ctx;
- PMC *ccont = INTERP->current_cont;
+ GET_ATTR_ctx(INTERP, SELF, ctx);
+
+ if (PMC_IS_NULL(ctx)) {
+ PackFile_ByteCode *seg;
+ size_t start_offs;
+ const UINTVAL *n_regs_used;
+ PMC *lex_info;
+ PMC * const caller_ctx = CURRENT_CONTEXT(INTERP);
+ PMC *ctx = Parrot_pcc_get_signature(INTERP, caller_ctx);
+ PMC *ccont = INTERP->current_cont;
if (ccont == NEED_CONTINUATION)
- ccont = (PMC *)new_ret_continuation_pmc(interp, next_op);
+ ccont = (PMC *)new_ret_continuation_pmc(INTERP, next_op);
if (PObj_get_FLAGS(ccont) & SUB_FLAG_TAILCALL)
Parrot_ex_throw_from_c_args(INTERP, NULL, CONTROL_ERROR,
- "tail call to coro not allowed");
+ "tail call to coroutine not allowed");
/* first time set current sub, cont, object */
- ctx = Parrot_pcc_get_signature(INTERP, caller_ctx);
if (PMC_IS_NULL(ctx))
ctx = pmc_new(INTERP, enum_class_CallContext);
+
CURRENT_CONTEXT(INTERP) = ctx;
- Parrot_pcc_allocate_registers(INTERP, ctx, co->n_regs_used);
+
+ GET_ATTR_n_regs_used(INTERP, SELF, n_regs_used);
+ Parrot_pcc_allocate_registers(INTERP, ctx, n_regs_used);
Parrot_pcc_set_caller_ctx(INTERP, ctx, caller_ctx);
Parrot_pcc_init_context(INTERP, ctx, caller_ctx);
- co->ctx = ctx;
+ SET_ATTR_ctx(INTERP, SELF, ctx);
+
+ SETATTR_Continuation_from_ctx(INTERP, ccont, ctx);
- PARROT_CONTINUATION(ccont)->from_ctx = ctx;
Parrot_pcc_set_sub(INTERP, ctx, SELF);
Parrot_pcc_set_continuation(INTERP, ctx, ccont);
- Parrot_pcc_set_object(interp, ctx, PMCNULL);
+ Parrot_pcc_set_object(INTERP, ctx, PMCNULL);
+
INTERP->current_object = PMCNULL;
INTERP->current_cont = PMCNULL;
+ GET_ATTR_lex_info(INTERP, SELF, lex_info);
+
/* create pad if needed */
- if (!PMC_IS_NULL(co->lex_info)) {
- const INTVAL hlltype = Parrot_get_ctx_HLL_type(interp, enum_class_LexPad);
- PMC * const lexpad = pmc_new_init(INTERP, hlltype, co->lex_info);
+ if (!PMC_IS_NULL(lex_info)) {
+ const INTVAL hlltype = Parrot_get_ctx_HLL_type(INTERP, enum_class_LexPad);
+ PMC * const lexpad = pmc_new_init(INTERP, hlltype, lex_info);
Parrot_pcc_set_lex_pad(INTERP, ctx, lexpad);
VTABLE_set_pointer(INTERP, lexpad, ctx);
}
+ GET_ATTR_seg(INTERP, SELF, seg);
PObj_get_FLAGS(SELF) |= SUB_FLAG_CORO_FF;
- wanted_seg = co->seg;
- co->caller_seg = INTERP->code;
- co->address = co->seg->base.data + co->start_offs;
+ wanted_seg = seg;
+
+ GET_ATTR_start_offs(INTERP, SELF, start_offs);
+ SET_ATTR_caller_seg(INTERP, SELF, INTERP->code);
+ SET_ATTR_address(INTERP, SELF, seg->base.data + start_offs);
}
/* if calling the Coro we need the segment of the Coro */
else if (!(PObj_get_FLAGS(SELF) & SUB_FLAG_CORO_FF)) {
- PMC * const ctx = co->ctx;
- PMC * const ccont = Parrot_pcc_get_continuation(INTERP, ctx);
+ PackFile_ByteCode *seg;
+ PMC *ctx;
+ PMC *ccont;
+
+ GET_ATTR_ctx(INTERP, SELF, ctx);
+ ccont = Parrot_pcc_get_continuation(INTERP, ctx);
PObj_get_FLAGS(SELF) |= SUB_FLAG_CORO_FF;
- wanted_seg = co->seg;
+
+ GET_ATTR_seg(INTERP, SELF, seg);
+ wanted_seg = seg;
/* remember segment of caller */
- co->caller_seg = INTERP->code;
+ SET_ATTR_caller_seg(INTERP, SELF, INTERP->code);
+
+
/* and the recent call context */
- PARROT_CONTINUATION(ccont)->to_ctx = CURRENT_CONTEXT(interp);
- Parrot_pcc_set_caller_ctx(interp, ctx, CURRENT_CONTEXT(interp));
+ SETATTR_Continuation_to_ctx(INTERP, ccont, CURRENT_CONTEXT(INTERP));
+ Parrot_pcc_set_caller_ctx(INTERP, ctx, CURRENT_CONTEXT(INTERP));
- /* set context to coro context */
- CURRENT_CONTEXT(interp) = ctx;
+ /* set context to coroutine context */
+ CURRENT_CONTEXT(INTERP) = ctx;
}
else {
- PMC * const ccont = Parrot_pcc_get_continuation(INTERP, co->ctx);
- PMC * const ctx = PARROT_CONTINUATION(ccont)->to_ctx;
- INTVAL yield;
+ INTVAL yield;
+ PMC *ccont, *ctx, *to_ctx;
+ PackFile_ByteCode *caller_seg;
+
GET_ATTR_yield(INTERP, SELF, yield);
- if (! yield)
+
+ if (!yield)
Parrot_ex_throw_from_c_args(INTERP, NULL, CONTROL_ERROR,
"Cannot resume dead coroutine.");
+
SET_ATTR_yield(INTERP, SELF, 0);
+ GET_ATTR_ctx(INTERP, SELF, ctx);
+ ccont = Parrot_pcc_get_continuation(INTERP, ctx);
+
+ GETATTR_Continuation_to_ctx(INTERP, ccont, to_ctx);
+
PObj_get_FLAGS(SELF) &= ~SUB_FLAG_CORO_FF;
- /* switch back to last remembered code seg and context */
+ GET_ATTR_caller_seg(INTERP, SELF, caller_seg);
- wanted_seg = co->caller_seg;
+ /* switch back to last remembered code seg and context */
+ wanted_seg = caller_seg;
- if (PMC_IS_NULL(ctx)) {
+ if (PMC_IS_NULL(to_ctx)) {
/* This still isn't quite right, but it beats segfaulting. See
the "Call an exited coroutine" case in t/pmc/coroutine.t; the
problem is that the defunct coroutine yields up one more
@@ -230,12 +264,12 @@
"Cannot resume dead coroutine.");
}
- CURRENT_CONTEXT(interp) = ctx;
+ CURRENT_CONTEXT(INTERP) = to_ctx;
}
/* toggle address */
- dest = co->address;
- co->address = (opcode_t *)next;
+ GET_ATTR_address(INTERP, SELF, dest);
+ SET_ATTR_address(INTERP, SELF, (opcode_t *)next);
if (INTERP->code != wanted_seg)
Parrot_switch_to_cs(INTERP, wanted_seg, 1);
Modified: branches/pmc_freeze_with_pmcs/src/pmc/fixedpmcarray.pmc
==============================================================================
--- branches/pmc_freeze_with_pmcs/src/pmc/fixedpmcarray.pmc Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/src/pmc/fixedpmcarray.pmc Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2009, Parrot Foundation.
+Copyright (C) 2001-2010, Parrot Foundation.
$Id$
=head1 NAME
@@ -53,6 +53,7 @@
else
Parrot_quicksort(interp, (void **)PMC_array(SELF), n, cmp_func);
}
+ RETURN(PMC *SELF);
}
/*
Modified: branches/pmc_freeze_with_pmcs/src/pmc/orderedhash.pmc
==============================================================================
--- branches/pmc_freeze_with_pmcs/src/pmc/orderedhash.pmc Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/src/pmc/orderedhash.pmc Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2009, Parrot Foundation.
+Copyright (C) 2001-2010, Parrot Foundation.
$Id$
=head1 NAME
@@ -8,28 +8,66 @@
=head1 DESCRIPTION
-C<OrderedHash> extends C<Hash> to provide the interfaces of C<array> and
-C<hash>. To achieve ordering, hash there are a few restrictions:
-C<delete_keyed> never removes items; they are just nulled.
-
-Please note that if values are set via integer idx, these indices have to be in
-strict order. Using C<push_xx> simplifies this task. This creates a key
-"\1idx" for C<idx> and is therefore not fully transparent.
+C<OrderedHash> provide the interfaces of C<array> and
+C<hash>.
-There are two iterator interfaces:
+Some limitations:
=over 4
-=item * retrieve values (in creation order)
+=item *
-Please note that after a C<delete_keyed> operation, iterating over
-values doesn't work any more. You'll get an error 'No such key'.
+Keys are always STRING*.
-=item * retrieve keys (in creation order)
+=item *
+
+Values are always PMC*.
=back
-See F<t/pmc/orderedhash.t>.
+To archive ordering for each item we store:
+
+=over 4
+
+=item * C<key>
+
+Original key
+
+=item * C<value>
+
+Original value
+
+=item * C<next>
+
+Pointer to next C<item>
+
+=item * C<prev>
+
+Pointer to previous C<item>
+
+=back
+
+OrderedHash stores next things:
+
+=over 4
+
+=item * C<hash>
+
+Lookup hash for values.
+
+=item * C<first>
+
+Pointer to first inserted value.
+
+=item * C<last>
+
+Pointer to last inserter value.
+
+=back
+
+See F<t/pmc/orderedhash.t> for test cases.
+
+Overall design heavily inspired by C<Tie::StoredOrderHash>.
=head2 Methods
@@ -39,39 +77,127 @@
*/
-pmclass OrderedHash extends Hash provides array provides hash {
+/* Create new stored item. FixedPMCArray of (key, value, prev, next). */
+static PMC*
+create_item(PARROT_INTERP, ARGIN(PMC *key), ARGIN(PMC *value)) {
+ PMC *ret = pmc_new(interp, enum_class_FixedPMCArray);
+ VTABLE_set_integer_native(interp, ret, ORDERED_HASH_ITEM_MAX);
+
+ VTABLE_set_pmc_keyed_int(interp, ret, ORDERED_HASH_ITEM_KEY, key);
+ VTABLE_set_pmc_keyed_int(interp, ret, ORDERED_HASH_ITEM_VALUE, value);
+ return ret;
+}
+
+/* Get list_item by index */
+static PMC*
+get_list_item(PARROT_INTERP, ARGIN(PMC *self), INTVAL idx) {
+ Parrot_OrderedHash_attributes *attrs = PARROT_ORDEREDHASH(self);
+ INTVAL n = VTABLE_elements(interp, attrs->hash);
+ INTVAL pos;
+ PMC *list_entry = attrs->first;
+
+ if (idx < -n)
+ idx = -idx - n - 1;
+ else if (idx < 0)
+ idx += n;
+
+ /* Iterate over linked list to get list_item */
+ for (pos = 0; pos < idx; ++pos) {
+ list_entry = VTABLE_get_pmc_keyed_int(interp, list_entry, ORDERED_HASH_ITEM_NEXT);
+ }
+ return list_entry;
+}
+
+/* Find first/last in cloned/thawed OrderedHash */
+/* Parameter C<pmc_hash> is Hash, not OrderedHash */
+static void
+find_bounds(PARROT_INTERP, PMC *pmc_hash, PMC **first, PMC **last) {
+ PMC *iter = VTABLE_get_iter(interp, pmc_hash);
+ while (VTABLE_get_bool(interp, iter)) {
+ PMC *item = VTABLE_shift_pmc(interp, iter);
+ PMC *entry = VTABLE_get_pmc_keyed(interp, pmc_hash, item);
+ /* First entry doesn't have prev */
+ PMC *tmp = VTABLE_get_pmc_keyed_int(interp, entry, ORDERED_HASH_ITEM_PREV);
+ if (PMC_IS_NULL(tmp))
+ *first = entry;
+ /* Last entry doesn't have next */
+ tmp = VTABLE_get_pmc_keyed_int(interp, entry, ORDERED_HASH_ITEM_NEXT);
+ if (PMC_IS_NULL(tmp))
+ *last = entry;
+ }
+}
+
+/* Helpers for boxing values */
+static PMC*
+box_string(PARROT_INTERP, STRING *str) {
+ PMC * const ret = pmc_new(interp, Parrot_get_ctx_HLL_type(interp,
+ enum_class_String));
+ VTABLE_set_string_native(interp, ret, str);
+ return ret;
+}
+
+static PMC*
+box_integer(PARROT_INTERP, INTVAL val) {
+ PMC * const ret = pmc_new(interp, Parrot_get_ctx_HLL_type(interp,
+ enum_class_Integer));
+ VTABLE_set_integer_native(interp, ret, val);
+ return ret;
+}
+
+static PMC*
+box_number(PARROT_INTERP, FLOATVAL val) {
+ PMC * const ret = pmc_new(interp, Parrot_get_ctx_HLL_type(interp,
+ enum_class_Float));
+ VTABLE_set_number_native(interp, ret, val);
+ return ret;
+}
+
+
+pmclass OrderedHash need_ext provides array provides hash {
+ ATTR PMC *hash; /* key to item tuple */
+ ATTR PMC *first; /* Pointer to first inserted value */
+ ATTR PMC *last; /* Pointer to last inserted value */
/*
-=item C<void mark()>
+=item C<void init()>
-Marks the OrderedHash as live.
+Create new instance of OrderedHash.
=cut
*/
- VTABLE void mark() {
- Hash * const h = (Hash *)SELF.get_pointer();
- INTVAL i;
+ VTABLE void init() {
+ Parrot_OrderedHash_attributes * const attrs =
+ mem_allocate_zeroed_typed(Parrot_OrderedHash_attributes);
- if (!h)
- return;
+ PMC_data(SELF) = attrs;
+ attrs->hash = pmc_new(INTERP, enum_class_Hash);
+ attrs->first = PMCNULL;
+ attrs->last = PMCNULL;
- for (i = h->mask; i >= 0; --i) {
- HashBucket *b = h->bi[i];
+ PObj_custom_mark_destroy_SETALL(SELF);
+ }
- while (b) {
+/*
- if (b->key) {
- Parrot_gc_mark_PObj_alive(interp, (PObj *)b->key);
- if (b->value)
- Parrot_gc_mark_PObj_alive(interp, (PObj *)b->value);
- }
+=item C<void mark()>
- b = b->next;
- }
- }
+Marks the OrderedHash as live.
+
+=cut
+
+*/
+
+ VTABLE void mark() {
+ Parrot_OrderedHash_attributes * const attrs =
+ PARROT_ORDEREDHASH(SELF);
+
+ if (attrs->hash)
+ Parrot_gc_mark_PObj_alive(INTERP, (PObj *)attrs->hash);
+
+ /* Don't mark C<first> and C<last>. They are in lookup hash anyway */
}
/*
@@ -90,195 +216,253 @@
/*
-=item C<PMC *get_pmc_keyed(PMC *key)>
+=item C<INTVAL elements()>
-=item C<PMC *get_pmc_keyed_int(INTVAL key)>
+=item C<INTVAL get_integer()>
-=item C<PMC *get_pmc_keyed_str(STRING *key)>
+=item C<FLOATVAL get_number()>
+
+Returns the size of the hash.
=cut
*/
- VTABLE PMC *get_pmc_keyed_int(INTVAL idx) {
- Hash * const h = (Hash *)SELF.get_pointer();
- const INTVAL n = h->entries;
- HashBucket *b;
+ VTABLE INTVAL get_integer() {
+ return STATICSELF.elements();
+ }
- if (idx < 0)
- idx += n;
+ VTABLE FLOATVAL get_number() {
+ return SELF.get_integer();
+ }
- if (idx < 0 || idx >= n)
- Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_KEY_NOT_FOUND,
- "OrderedHash: index out of bounds!");
+ VTABLE INTVAL elements() {
+ return VTABLE_elements(INTERP, PARROT_ORDEREDHASH(SELF)->hash);
+ }
- b = h->bs + idx;
+/*
- if (b->key)
- return (PMC *)b->value;
+=item C<set_pmc_keyed(PMC *key, PMC *value)>
- Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_KEY_NOT_FOUND,
- "OrderedHash: No such key");
- }
+Main set function.
- VTABLE PMC *get_pmc_keyed(PMC *key) {
- if ((PObj_get_FLAGS(key) & KEY_type_FLAGS) == KEY_integer_FLAG) {
- PMC * const item = SELF.get_pmc_keyed_int(VTABLE_get_integer(INTERP, key));
- PMC * const next = VTABLE_shift_pmc(INTERP, key);
+=cut
- if (!next)
- return item;
+*/
+ VTABLE void set_pmc_keyed(PMC *key, PMC *value) {
+ Parrot_OrderedHash_attributes *attrs =
+ PARROT_ORDEREDHASH(SELF);
- return VTABLE_get_pmc_keyed(INTERP, item, next);
+ /* Check for old entry */
+ PMC *list_entry = VTABLE_get_pmc_keyed(INTERP, attrs->hash, key);
+ if (!PMC_IS_NULL(list_entry)) {
+ /* We have old entry. Just update value */
+ PMC *nextkey = key_next(INTERP, key);
+ if (nextkey) {
+ PMC *old_value = VTABLE_get_pmc_keyed_int(INTERP, list_entry,
+ ORDERED_HASH_ITEM_VALUE);
+ VTABLE_set_pmc_keyed(INTERP, value, nextkey, value);
+ }
+ else
+ VTABLE_set_pmc_keyed_int(INTERP, list_entry, ORDERED_HASH_ITEM_VALUE, value);
+ return;
}
- return INTERP->vtables[enum_class_Hash]->get_pmc_keyed(INTERP, SELF, key);
- }
+ /* Create new entry */
+ list_entry = pmc_new(INTERP, enum_class_FixedPMCArray);
+ VTABLE_set_integer_native(INTERP, list_entry, ORDERED_HASH_ITEM_MAX);
+ VTABLE_set_pmc_keyed_int(INTERP, list_entry, ORDERED_HASH_ITEM_VALUE, value);
+ VTABLE_set_pmc_keyed_int(INTERP, list_entry, ORDERED_HASH_ITEM_KEY, key);
+
+ /* .. and link it */
+ if (!PMC_IS_NULL(attrs->last)) {
+ VTABLE_set_pmc_keyed_int(INTERP, list_entry, ORDERED_HASH_ITEM_PREV, attrs->last);
+ VTABLE_set_pmc_keyed_int(INTERP, attrs->last, ORDERED_HASH_ITEM_NEXT, list_entry);
+ }
+ attrs->last = list_entry;
+ if (PMC_IS_NULL(attrs->first))
+ attrs->first = list_entry;
+ /* .. and store it */
+ VTABLE_set_pmc_keyed(INTERP, attrs->hash, key, list_entry);
+ }
/*
-=item C<STRING *get_string_keyed(PMC *key)>
+=item C<void set_integer_keyed(INTVAL key, INTVAL value)>
-=item C<STRING *get_string_keyed_int(INTVAL key)>
+=item C<void set_number_keyed(INTVAL key, FLOATVAL value)>
-=item C<STRING *get_string_keyed_str(STRING *key)>
+=item C<void set_string_keyed(INTVAL key, STRING *value)>
+
+Sets the PMC value of the element at index C<key> to C<val>.
=cut
*/
- VTABLE STRING *get_string_keyed_int(INTVAL idx) {
- Hash * const h = (Hash *)SELF.get_pointer();
- const INTVAL n = h->entries;
+ VTABLE void set_integer_keyed(PMC *key, INTVAL value) {
+ PMC * const v = box_integer(INTERP, value);
+ SELF.set_pmc_keyed(key, v);
+ }
- HashBucket *b;
+ VTABLE void set_number_keyed(PMC *key, FLOATVAL value) {
+ PMC * const v = box_number(INTERP, value);
+ SELF.set_pmc_keyed(key, v);
+ }
- if (idx < 0)
- idx += n;
+ VTABLE void set_string_keyed(PMC *key, STRING *value) {
+ PMC * const v = box_string(INTERP, value);
+ SELF.set_pmc_keyed(key, v);
+ }
- if (idx < 0 || idx >= n)
- Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_KEY_NOT_FOUND,
- "OrderedHash: index out of bounds!");
+/*
- b = h->bs + idx;
+=item C<void set_pmc_keyed_str(STRING *key, PMC *val)>
- if (b->key)
- return VTABLE_get_string(INTERP, (PMC *)b->value);
+=item C<void set_integer_keyed_str(STRING *key, INTVAL value)>
- Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_KEY_NOT_FOUND,
- "OrderedHash: No such key");
- }
+=item C<void set_number_keyed_str(STRING *key, FLOATVAL value)>
- VTABLE STRING *get_string_keyed(PMC *key) {
- if ((PObj_get_FLAGS(key) & KEY_type_FLAGS) == KEY_integer_FLAG) {
- PMC * const item = SELF.get_pmc_keyed_int(VTABLE_get_integer(INTERP, key));
- PMC * const next = VTABLE_shift_pmc(INTERP, key);
+=item C<void set_string_keyed_str(STRING *key, STRING *value)>
- if (!next)
- return VTABLE_get_string(INTERP, item);
+Sets the PMC value of the element at index C<key> to C<val>.
- return VTABLE_get_string_keyed(INTERP, item, next);
- }
+=cut
- return INTERP->vtables[enum_class_Hash]->get_string_keyed(INTERP, SELF, key);
+*/
+
+ VTABLE void set_pmc_keyed_str(STRING *key, PMC *value) {
+ /* Wallpapering problem with HLL Strings as keys */
+ /* Apparently HLL registry in Parrot uses OrderedHash */
+ /* Now we have chicken and egg problem during freeze/thaw */
+ /* When we try to thaw OrderedHash which stores HLL mapping */
+ /* Reported by François Perrad */
+ PMC *pkey = pmc_new(INTERP, enum_class_String);
+ VTABLE_set_string_native(INTERP, pkey, key);
+ VTABLE_set_pmc_keyed(INTERP, SELF, pkey, value);
+ }
+
+ VTABLE void set_string_keyed_str(STRING *key, STRING *value) {
+ PMC * const v = box_string(INTERP, value);
+ STATICSELF.set_pmc_keyed_str(key, v);
+ }
+
+ VTABLE void set_integer_keyed_str(STRING *key, INTVAL value) {
+ PMC * const v = box_integer(INTERP, value);
+ STATICSELF.set_pmc_keyed_str(key, v);
+ }
+
+ VTABLE void set_number_keyed_str(STRING *key, FLOATVAL value) {
+ PMC * const v = box_number(INTERP, value);
+ STATICSELF.set_pmc_keyed_str(key, v);
}
-/*
-=item C<INTVAL get_integer_keyed(PMC *key)>
+/*
-=item C<INTVAL get_integer_keyed_str(STRING *key)>
+=item C<PMC *get_pmc_keyed(PMC *key)>
-=item C<INTVAL get_integer_keyed_int(INTVAL key)>
+=item C<PMC *get_pmc_keyed_int(INTVAL key)>
-Returns the integer value associated with C<key>.
+=item C<PMC *get_pmc_keyed_str(STRING *key)>
=cut
*/
- VTABLE INTVAL get_integer_keyed_int(INTVAL idx) {
- Hash * const h = (Hash *)SELF.get_pointer();
- const INTVAL n = h->entries;
- HashBucket *b;
+ VTABLE PMC *get_pmc_keyed_int(INTVAL idx) {
+ PMC *list_entry = get_list_item(INTERP, SELF, idx);
- if (idx < 0)
- idx += n;
+ if (PMC_IS_NULL(list_entry))
+ return PMCNULL;
- if (idx < 0 || idx >= n)
- Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS,
- "OrderedHash: index out of bounds!");
+ return VTABLE_get_pmc_keyed_int(INTERP, list_entry, ORDERED_HASH_ITEM_VALUE);
+ }
- b = h->bs + idx;
+ VTABLE PMC *get_pmc_keyed(PMC *key) {
+ PMC * item;
+ /* Access by integer index */
+ if ((PObj_get_FLAGS(key) & KEY_type_FLAGS) == KEY_integer_FLAG) {
+ return SELF.get_pmc_keyed_int(VTABLE_get_integer(INTERP, key));
+ }
- if (b->key)
- return VTABLE_get_integer(INTERP, (PMC *)b->value);
+ item = VTABLE_get_pmc_keyed(INTERP, PARROT_ORDEREDHASH(SELF)->hash, key);
+ if (PMC_IS_NULL(item))
+ return PMCNULL;
+ return VTABLE_get_pmc_keyed_int(INTERP, item, ORDERED_HASH_ITEM_VALUE);
+ }
- Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_KEY_NOT_FOUND,
- "OrderedHash: No such key");
+ VTABLE PMC *get_pmc_keyed_str(STRING *key) {
+ PMC *pkey = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_String));
+ VTABLE_set_string_native(INTERP, pkey, key);
+ return STATICSELF.get_pmc_keyed(pkey);
}
+/*
- VTABLE INTVAL get_integer_keyed(PMC *key) {
+=item C<STRING *get_string_keyed(PMC *key)>
- if ((PObj_get_FLAGS(key) & KEY_type_FLAGS) == KEY_integer_FLAG) {
- PMC * const item = SELF.get_pmc_keyed_int(VTABLE_get_integer(INTERP, key));
- PMC * const next = VTABLE_shift_pmc(INTERP, key);
+=item C<STRING *get_string_keyed_int(INTVAL key)>
- if (!next)
- return VTABLE_get_integer(INTERP, item);
+=item C<STRING *get_string_keyed_str(STRING *key)>
- return VTABLE_get_integer_keyed(INTERP, item, next);
- }
+=cut
- return INTERP->vtables[enum_class_Hash]->get_integer_keyed(INTERP, SELF, key);
+*/
+
+ VTABLE STRING *get_string_keyed_int(INTVAL idx) {
+ PMC * const item = VTABLE_get_pmc_keyed_int(INTERP, SELF, idx);
+ return VTABLE_get_string(INTERP, item);
}
+ VTABLE STRING *get_string_keyed(PMC *key) {
+ PMC * const item = VTABLE_get_pmc_keyed(INTERP, SELF, key);
+ return VTABLE_get_string(INTERP, item);
+ }
/*
-=item C<FLOATVAL get_number_keyed(PMC *key)>
+=item C<INTVAL get_integer_keyed(PMC *key)>
-=item C<FLOATVAL get_number_keyed_int(INTVAL key)>
+=item C<INTVAL get_integer_keyed_str(STRING *key)>
-=item C<FLOATVAL get_number_keyed_str(STRING *key)>
+=item C<INTVAL get_integer_keyed_int(INTVAL key)>
-Returns the floating-point value for the element at C<key>.
+Returns the integer value associated with C<key>.
=cut
*/
- VTABLE FLOATVAL get_number_keyed_int(INTVAL idx) {
- Hash * const h = (Hash *)SELF.get_pointer();
- const INTVAL n = h->entries;
- HashBucket *b;
+ VTABLE INTVAL get_integer_keyed_int(INTVAL idx) {
+ PMC * const item = VTABLE_get_pmc_keyed_int(INTERP, SELF, idx);
+ return VTABLE_get_integer(INTERP, item);
+ }
- if (idx < 0)
- idx += n;
+ VTABLE INTVAL get_integer_keyed(PMC *key) {
+ PMC * const item = VTABLE_get_pmc_keyed(INTERP, SELF, key);
+ return VTABLE_get_integer(INTERP, item);
+ }
- if (idx < 0 || idx >= n)
- Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS,
- "OrderedHash: index out of bounds!");
+/*
- b = h->bs + idx;
+=item C<FLOATVAL get_number_keyed(PMC *key)>
- if (b->key)
- return VTABLE_get_number(INTERP, (PMC *)b->value);
+=item C<FLOATVAL get_number_keyed_int(INTVAL key)>
- Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_KEY_NOT_FOUND,
- "OrderedHash: No such key");
- }
+=item C<FLOATVAL get_number_keyed_str(STRING *key)>
- VTABLE FLOATVAL get_number_keyed(PMC *key) {
- if ((PObj_get_FLAGS(key) & KEY_type_FLAGS) == KEY_integer_FLAG) {
- PMC * const item = SELF.get_pmc_keyed_int(VTABLE_get_integer(INTERP, key));
- PMC * const next = VTABLE_shift_pmc(INTERP, key);
+Returns the floating-point value for the element at C<key>.
- if (!next)
- return VTABLE_get_number(INTERP, item);
+=cut
- return VTABLE_get_number_keyed(INTERP, item, next);
- }
+*/
- return SUPER(key);
+ VTABLE FLOATVAL get_number_keyed_int(INTVAL idx) {
+ PMC * const item = VTABLE_get_pmc_keyed_int(INTERP, SELF, idx);
+ return VTABLE_get_number(INTERP, item);
+ }
+
+ VTABLE FLOATVAL get_number_keyed(PMC *key) {
+ PMC * const item = VTABLE_get_pmc_keyed(INTERP, SELF, key);
+ return VTABLE_get_number(INTERP, item);
}
/*
@@ -299,9 +483,10 @@
*/
VTABLE void set_pmc_keyed_int(INTVAL idx, PMC *val) {
- Hash * const h = (Hash *)SELF.get_pointer();
- const INTVAL n = h->entries;
+ const INTVAL n = STATICSELF.elements();
STRING * const fmt = CONST_STRING(INTERP, "\1%d");
+ PMC *list_entry;
+ INTVAL pos;
if (idx < -n)
idx = -idx - n - 1;
@@ -314,12 +499,9 @@
SELF.set_pmc_keyed_str(key, val);
}
else {
- HashBucket * const b = h->bs + idx;
-
- if (!b->key)
- b->key = Parrot_sprintf_s(INTERP, fmt, idx);
-
- b->value = val;
+ list_entry = get_list_item(INTERP, SELF, idx);
+ PARROT_ASSERT(!PMC_IS_NULL(list_entry));
+ VTABLE_set_pmc_keyed_int(INTERP, list_entry, ORDERED_HASH_ITEM_VALUE, val);
}
}
@@ -390,60 +572,26 @@
*/
VTABLE INTVAL exists_keyed_int(INTVAL idx) {
- Hash * const h = (Hash *)SELF.get_pointer();
- const INTVAL n = h->entries;
- HashBucket *b;
-
- if (idx < 0)
- idx += n;
-
- if (idx < 0 || idx >= n)
- return 0;
-
- b = h->bs + idx;
-
- if (b->key)
- return 1;
-
- return 0;
+ return (idx >= 0) && (idx < STATICSELF.elements());
}
VTABLE INTVAL exists_keyed(PMC *key) {
- if (PObj_get_FLAGS(key) & KEY_integer_FLAG) {
- PMC *item, *next;
- HashBucket *b;
- Hash * const h = (Hash *)SELF.get_pointer();
- INTVAL idx = VTABLE_get_integer(INTERP, key);
- const INTVAL n = h->entries;
-
- if (idx < 0)
- idx += n;
-
- if (idx < 0 || idx >= n)
- return 0;
-
- b = h->bs + idx;
-
- if (!b->key)
- return 0;
-
- item = (PMC *)b->value;
- next = VTABLE_shift_pmc(INTERP, key);
+ if ((PObj_get_FLAGS(key) & KEY_type_FLAGS) == KEY_integer_FLAG) {
+ /* Don't fetch item prematurely. It's costy */
+ INTVAL intval = VTABLE_get_integer(INTERP, key);
+ PMC * const next = VTABLE_shift_pmc(INTERP, key);
if (!next)
- return 1;
+ return STATICSELF.exists_keyed_int(intval);
- return VTABLE_exists_keyed(INTERP, item, next);
+ return VTABLE_exists_keyed(INTERP, STATICSELF.get_pmc_keyed_int(intval), next);
}
- return SUPER(key);
+ return VTABLE_exists_keyed_str(INTERP, SELF, VTABLE_get_string(INTERP, key));
}
VTABLE INTVAL exists_keyed_str(STRING *key) {
- const Hash * const h = (Hash *)SELF.get_pointer();
- const HashBucket * const b = parrot_hash_get_bucket(INTERP, h, key);
-
- return (b && b->key);
+ return VTABLE_exists_keyed_str(INTERP, PARROT_ORDEREDHASH(SELF)->hash, key);
}
/*
@@ -459,55 +607,32 @@
*/
VTABLE INTVAL defined_keyed(PMC *key) {
- if (PObj_get_FLAGS(key) & KEY_integer_FLAG) {
- Hash * const h = (Hash *)SELF.get_pointer();
- INTVAL idx = VTABLE_get_integer(INTERP, key);
- const INTVAL n = h->entries;
-
- HashBucket *b;
- PMC *item, *next;
-
- if (idx < 0)
- idx += n;
-
- /* XXX non-existent is undefined - is this correct */
- if (idx < 0 || idx >= n)
- return 0;
-
- b = h->bs + idx;
-
- if (!b->key)
- return 0;
-
- item = (PMC *)b->value;
- next = VTABLE_shift_pmc(INTERP, key);
-
- if (!next)
- return VTABLE_defined(INTERP, item);
-
- return VTABLE_defined_keyed(INTERP, item, next);
- }
+ /* We store list_item (which is defined). So fetch original PMC and check it */
+ PMC * const item = STATICSELF.get_pmc_keyed(key);
+ if (PMC_IS_NULL(item))
+ return 0;
+ return VTABLE_defined(INTERP, item);
+ }
- return SUPER(key);
+ VTABLE INTVAL defined_keyed_str(STRING *key) {
+ PMC * const item = STATICSELF.get_pmc_keyed_str(key);
+ if (PMC_IS_NULL(item))
+ return 0;
+ return VTABLE_defined(INTERP, item);
}
VTABLE INTVAL defined_keyed_int(INTVAL idx) {
- Hash * const h = (Hash *)SELF.get_pointer();
- const INTVAL n = h->entries;
- HashBucket *b;
-
- if (idx < 0)
- idx += n;
-
- if (idx < 0 || idx >= n)
+ PMC * item;
+ /* If item doesn't exists it's undefined */
+ if (!STATICSELF.exists_keyed_int(idx))
return 0;
- b = h->bs + idx;
-
- if (b->key)
- return VTABLE_defined(INTERP, (PMC *)b->value);
+ /* Null is undefined */
+ item = STATICSELF.get_pmc_keyed_int(idx);
+ if (PMC_IS_NULL(item))
+ return 0;
- return 0;
+ return VTABLE_defined(INTERP, item);
}
/*
@@ -525,56 +650,57 @@
*/
VTABLE void delete_keyed(PMC *key) {
- PMC * const next = key_next(INTERP, key);
+ Parrot_OrderedHash_attributes *attrs =
+ PARROT_ORDEREDHASH(SELF);
+ PMC *list_entry, *prev, *next;
+ if ((PObj_get_FLAGS(key) & KEY_type_FLAGS) == KEY_integer_FLAG) {
+ INTVAL intval = VTABLE_get_integer(INTERP, key);
+ PMC * const next = VTABLE_shift_pmc(INTERP, key);
- if (PObj_get_FLAGS(key) & KEY_integer_FLAG) {
- if (next) {
- PMC * const item = SELF.get_pmc_keyed_int(VTABLE_get_integer(INTERP, key));
- VTABLE_delete_keyed(INTERP, item, next);
- return;
- }
+ if (next)
+ VTABLE_delete_keyed(INTERP, STATICSELF.get_pmc_keyed_int(intval), next);
+ else
+ STATICSELF.delete_keyed_int(intval);
- SELF.delete_keyed_int(VTABLE_get_integer(INTERP, key));
- }
- else {
- if (next) {
- PMC * const item = SELF.get_pmc_keyed_str(VTABLE_get_string(INTERP, key));
- VTABLE_delete_keyed(INTERP, item, next);
- return;
- }
- SELF.delete_keyed_str(VTABLE_get_string(INTERP, key));
+ return;
}
- }
-
- VTABLE void delete_keyed_int(INTVAL idx) {
- Hash * const h = (Hash *)SELF.get_pointer();
- const INTVAL n = h->entries;
- HashBucket *b;
-
- if (idx < 0)
- idx += n;
- if (idx < 0 || idx >= n)
+ list_entry = VTABLE_get_pmc_keyed(INTERP, attrs->hash, key);
+ if (PMC_IS_NULL(list_entry))
return;
- b = h->bs + idx;
+ /* Unlink entry */
+ next = VTABLE_get_pmc_keyed_int(INTERP, list_entry, ORDERED_HASH_ITEM_NEXT);
+ prev = VTABLE_get_pmc_keyed_int(INTERP, list_entry, ORDERED_HASH_ITEM_PREV);
+
+ if (attrs->first == list_entry)
+ attrs->first = next;
+
+ if (attrs->last == list_entry)
+ attrs->last = prev;
+
+ /* C<prev> and C<next> are list entries (FPA) */
+ if (!PMC_IS_NULL(prev))
+ VTABLE_set_pmc_keyed_int(INTERP, prev, ORDERED_HASH_ITEM_NEXT, next);
+ if (!PMC_IS_NULL(next))
+ VTABLE_set_pmc_keyed_int(INTERP, next, ORDERED_HASH_ITEM_PREV, prev);
- if (!b)
- return;
-
- b->key = NULL;
- b->value = NULL;
+ /* And finally delete it */
+ VTABLE_delete_keyed(INTERP, PARROT_ORDEREDHASH(SELF)->hash, key);
}
VTABLE void delete_keyed_str(STRING *key) {
- const Hash * const h = (Hash *)SELF.get_pointer();
- HashBucket * const b = parrot_hash_get_bucket(INTERP, h, key);
+ STATICSELF.delete_keyed(box_string(INTERP, key));
+ }
- if (!b)
+ VTABLE void delete_keyed_int(INTVAL idx) {
+ PMC *list_entry;
+ if (!STATICSELF.exists_keyed_int(idx))
return;
- b->key = NULL;
- b->value = NULL;
+ list_entry = get_list_item(INTERP, SELF, idx);
+ STATICSELF.delete_keyed(
+ VTABLE_get_pmc_keyed_int(INTERP, list_entry, ORDERED_HASH_ITEM_KEY));
}
/*
@@ -590,18 +716,11 @@
VTABLE PMC *clone() {
PMC * const dest = pmc_new(INTERP, SELF->vtable->base_type);
- Hash * const hash = (Hash *)SELF.get_pointer();
- Hash * const h_dest = (Hash *)VTABLE_get_pointer(INTERP, dest);
- UINTVAL i;
-
- for (i = 0; i <= N_BUCKETS(hash->mask-1); i++) {
- HashBucket * const b = hash->bs + i;
- void * const key = b->key;
-
- if (key)
- parrot_hash_put(INTERP, h_dest, key,
- (void *)VTABLE_clone(INTERP, (PMC *)b->value));
- }
+ Parrot_OrderedHash_attributes *clone_attrs =
+ PARROT_ORDEREDHASH(dest);
+
+ clone_attrs->hash = VTABLE_clone(INTERP, PARROT_ORDEREDHASH(SELF)->hash);
+ find_bounds(INTERP, clone_attrs->hash, &clone_attrs->first, &clone_attrs->last);
return dest;
}
@@ -619,43 +738,35 @@
Used to unarchive the hash.
-Freeze/thaw are inherited from hash. Only thaw.visit is special, as we have to
-preserve key/value order.
-
=cut
*/
VTABLE void visit(visit_info *info) {
- switch (VTABLE_get_integer(INTERP, info)) {
- case VISIT_THAW_NORMAL:
- SUPER(info);
- break;
-
- case VISIT_FREEZE_NORMAL:
- {
- Hash * const hash = (Hash *)SELF.get_pointer();
- const UINTVAL entries = hash->entries;
- UINTVAL i;
-
- for (i = 0; i < entries; i++) {
- HashBucket * const b = hash->bs + i;
-
- if (b) {
- STRING * const key = (STRING *)b->key;
- if (key) {
- VTABLE_push_string(interp, info, key);
- (info->visit_pmc_now)(interp, (PMC *)b->value, info);
- }
- }
- }
- }
- break;
- default:
- Parrot_ex_throw_from_c_args(interp, NULL,
- EXCEPTION_INVALID_OPERATION,
- "unhandled visit action (%d)", VTABLE_get_integer(INTERP, info));
- }
+ VISIT_PMC_ATTR(INTERP, info, SELF, OrderedHash, hash);
+ SUPER(info);
+ }
+
+ VTABLE void thawfinish(visit_info *info) {
+ Parrot_OrderedHash_attributes *attrs = PARROT_ORDEREDHASH(SELF);
+ find_bounds(INTERP, attrs->hash, &attrs->first, &attrs->last);
+ SUPER(info);
+ }
+
+/*
+
+=item C<get_pmc()>
+
+Get underlying regular Hash. Used in UnManagedStruct.
+
+=cut
+
+*/
+
+ VTABLE PMC* get_pmc() {
+ PMC *hash;
+ GET_ATTR_hash(INTERP, SELF, hash);
+ return hash;
}
}
Modified: branches/pmc_freeze_with_pmcs/src/pmc/orderedhashiterator.pmc
==============================================================================
--- branches/pmc_freeze_with_pmcs/src/pmc/orderedhashiterator.pmc Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/src/pmc/orderedhashiterator.pmc Fri Jan 29 21:05:08 2010 (r43643)
@@ -18,12 +18,12 @@
*/
-#include "pmc/pmc_hash.h"
+#include "pmc/pmc_orderedhash.h"
#include "pmc/pmc_hashiteratorkey.h"
pmclass OrderedHashIterator extends Iterator no_ro auto_attrs {
ATTR PMC *pmc_hash; /* the Hash which this Iterator iterates */
- ATTR Hash *parrot_hash; /* Underlying implementation of hash */
+ ATTR PMC *next_entry; /* Next entry to shift/pop */
ATTR INTVAL pos; /* */
ATTR INTVAL elements; /* How many elements left to iterate over */
ATTR INTVAL reverse; /* Direction of iteration. 1 - for reverse iteration */
@@ -44,11 +44,10 @@
(Parrot_OrderedHashIterator_attributes *) PMC_data(SELF);
attrs->pmc_hash = hash;
- attrs->parrot_hash = (Hash*)VTABLE_get_pointer(INTERP, hash);
attrs->pos = 0;
- /* Will be decreased on initial advance_to_next */
- /* XXX Do we really need to support this use-case ? */
- attrs->elements = attrs->parrot_hash->entries;
+ attrs->elements = VTABLE_elements(INTERP, hash);
+ attrs->next_entry = PARROT_ORDEREDHASH(hash)->first;
+ PMC_data(SELF) = attrs;
PObj_custom_mark_SET(SELF);
}
@@ -91,15 +90,17 @@
PARROT_ORDEREDHASHITERATOR(SELF);
/* Restart iterator */
- attrs->elements = attrs->parrot_hash->entries;
+ attrs->elements = VTABLE_elements(INTERP, attrs->pmc_hash);
if (value == ITERATE_FROM_START || value == ITERATE_FROM_START_KEYS) {
- attrs->pos = 0;
- attrs->reverse = 0;
+ attrs->pos = 0;
+ attrs->reverse = 0;
+ attrs->next_entry = PARROT_ORDEREDHASH(attrs->pmc_hash)->first;
return;
}
else if (value == ITERATE_FROM_END) {
- attrs->pos = attrs->elements;
- attrs->reverse = 1;
+ attrs->pos = attrs->elements;
+ attrs->reverse = 1;
+ attrs->next_entry = PARROT_ORDEREDHASH(attrs->pmc_hash)->last;
return;
}
@@ -168,22 +169,18 @@
PARROT_ORDEREDHASHITERATOR(SELF);
PMC *ret;
- HashBucket *bucket;
if (!attrs->elements)
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS,
"StopIteration");
/* Get bucket and move to next bucket */
- do {
- bucket = attrs->parrot_hash->bs + attrs->pos++;
- attrs->elements--;
- } while (attrs->elements && !bucket->key);
-
- /* Reuse HashIteratorKey */
- ret = pmc_new(INTERP, enum_class_HashIteratorKey);
- VTABLE_set_pointer_keyed_int(INTERP, ret, 0, attrs->parrot_hash);
- VTABLE_set_pointer_keyed_int(INTERP, ret, 1, bucket);
+ ret = VTABLE_get_pmc_keyed_int(INTERP, attrs->next_entry,
+ ORDERED_HASH_ITEM_KEY);
+ attrs->next_entry = VTABLE_get_pmc_keyed_int(INTERP, attrs->next_entry,
+ ORDERED_HASH_ITEM_NEXT);
+ attrs->pos++;
+ attrs->elements--;
return ret;
}
@@ -204,21 +201,18 @@
PARROT_ORDEREDHASHITERATOR(SELF);
PMC *ret;
- HashBucket *bucket;
if (!attrs->elements)
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS,
"StopIteration");
- /* Get bucket and move to next bucket */
- bucket = attrs->parrot_hash->bs + --attrs->pos;
+ ret = VTABLE_get_pmc_keyed_int(INTERP, attrs->next_entry,
+ ORDERED_HASH_ITEM_KEY);
+ attrs->next_entry = VTABLE_get_pmc_keyed_int(INTERP, attrs->next_entry,
+ ORDERED_HASH_ITEM_PREV);
+ attrs->pos--;
attrs->elements--;
- /* Reuse HashIteratorKey */
- ret = pmc_new(INTERP, enum_class_HashIteratorKey);
- VTABLE_set_pointer_keyed_int(INTERP, ret, 0, attrs->parrot_hash);
- VTABLE_set_pointer_keyed_int(INTERP, ret, 1, bucket);
-
return ret;
}
Modified: branches/pmc_freeze_with_pmcs/src/pmc/unmanagedstruct.pmc
==============================================================================
--- branches/pmc_freeze_with_pmcs/src/pmc/unmanagedstruct.pmc Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/src/pmc/unmanagedstruct.pmc Fri Jan 29 21:05:08 2010 (r43643)
@@ -90,9 +90,10 @@
PMC * const types = PARROT_UNMANAGEDSTRUCT(pmc)->init;
if (types->vtable->base_type == enum_class_OrderedHash) {
- Hash * const hash = (Hash *)VTABLE_get_pointer(interp, types);
+ Hash * const hash = (Hash *)VTABLE_get_pointer(interp,
+ VTABLE_get_pmc(interp, types));
HashBucket * const b = parrot_hash_get_bucket(interp, hash,
- VTABLE_get_string(interp, key));
+ hash_key_from_string(interp, hash, VTABLE_get_string(interp, key)));
if (!b)
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_KEY_NOT_FOUND,
Modified: branches/pmc_freeze_with_pmcs/src/pmc_freeze.c
==============================================================================
--- branches/pmc_freeze_with_pmcs/src/pmc_freeze.c Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/src/pmc_freeze.c Fri Jan 29 21:05:08 2010 (r43643)
@@ -731,7 +731,8 @@
const INTVAL n = Parrot_pmc_array_length(interp, finish_list);
int i;
- for (i = 0; i < n ; ++i) {
+ /* Thaw in reverse order. We have to fully thaw younger PMCs before use them in older */
+ for (i = n-1; i >= 0; --i) {
current = *(PMC**)Parrot_pmc_array_get(interp, finish_list, i, enum_type_PMC);
if (!PMC_IS_NULL(current))
VTABLE_thawfinish(interp, current, info);
Modified: branches/pmc_freeze_with_pmcs/t/compilers/imcc/syn/macro.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/t/compilers/imcc/syn/macro.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/t/compilers/imcc/syn/macro.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,5 +1,5 @@
#!perl
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
use strict;
@@ -8,7 +8,7 @@
use Test::More;
use Parrot::Config;
-use Parrot::Test tests => 41;
+use Parrot::Test tests => 42;
# macro tests
@@ -585,6 +585,27 @@
my_func_2 my_func_2
OUTPUT
+pir_error_output_like( <<'CODE', <<'OUTPUT', 'macro label outside of macro declaration (TT #902)' );
+.macro While(conditional, code)
+
+.label $beginwhile:
+ unless .conditional goto .$endwhile
+ .code
+ goto .$beginwhile
+.label $endwhile:
+.endm
+
+.sub main
+.While($I0 < 3, {
+say $I0
+goto .$endwhile
+inc $I0
+})
+.end
+CODE
+/Invalid LABEL outside of macro/
+OUTPUT
+
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
Modified: branches/pmc_freeze_with_pmcs/t/configure/testlib/adefectivefoobar
==============================================================================
--- branches/pmc_freeze_with_pmcs/t/configure/testlib/adefectivefoobar Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/t/configure/testlib/adefectivefoobar Fri Jan 29 21:05:08 2010 (r43643)
@@ -62,7 +62,6 @@
gen::config_h
gen::core_pmcs
gen::crypto
-gen::parrot_include
gen::opengl
gen::call_list
gen::languages
Modified: branches/pmc_freeze_with_pmcs/t/configure/testlib/bdefectivefoobar
==============================================================================
--- branches/pmc_freeze_with_pmcs/t/configure/testlib/bdefectivefoobar Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/t/configure/testlib/bdefectivefoobar Fri Jan 29 21:05:08 2010 (r43643)
@@ -72,7 +72,6 @@
gen::config_h
gen::core_pmcs
gen::crypto
-gen::parrot_include
gen::opengl
gen::call_list
gen::languages
Modified: branches/pmc_freeze_with_pmcs/t/configure/testlib/cdefectivefoobar
==============================================================================
--- branches/pmc_freeze_with_pmcs/t/configure/testlib/cdefectivefoobar Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/t/configure/testlib/cdefectivefoobar Fri Jan 29 21:05:08 2010 (r43643)
@@ -73,7 +73,6 @@
gen::config_h
gen::core_pmcs
gen::crypto
-gen::parrot_include
gen::opengl
gen::call_list
gen::languages
Modified: branches/pmc_freeze_with_pmcs/t/configure/testlib/ddefectivefoobar
==============================================================================
--- branches/pmc_freeze_with_pmcs/t/configure/testlib/ddefectivefoobar Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/t/configure/testlib/ddefectivefoobar Fri Jan 29 21:05:08 2010 (r43643)
@@ -64,7 +64,6 @@
gen::config_h
gen::core_pmcs
gen::crypto
-gen::parrot_include
gen::opengl
gen::call_list
gen::languages
Modified: branches/pmc_freeze_with_pmcs/t/configure/testlib/verbosefoobar
==============================================================================
--- branches/pmc_freeze_with_pmcs/t/configure/testlib/verbosefoobar Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/t/configure/testlib/verbosefoobar Fri Jan 29 21:05:08 2010 (r43643)
@@ -66,7 +66,6 @@
gen::config_h
gen::core_pmcs
gen::crypto
-gen::parrot_include
gen::opengl
gen::call_list
gen::languages
Modified: branches/pmc_freeze_with_pmcs/t/harness
==============================================================================
--- branches/pmc_freeze_with_pmcs/t/harness Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/t/harness Fri Jan 29 21:05:08 2010 (r43643)
@@ -31,8 +31,6 @@
local @ARGV = @ARGV;
(my $longopts, @ARGV) = handle_long_options(@ARGV);
-$ENV{RUNNING_MAKE_TEST} = $longopts->{running_make_test};
-
# Suck the short options into the TEST_PROG_ARGS
# environmental variable.
my %opts;
@@ -189,10 +187,6 @@
=over 4
-=item C<--running-make-test>
-
-Some test scripts run more quickly when this is set.
-
=item C<--gc-debug>
Invoke parrot with '--gc-debug'.
Modified: branches/pmc_freeze_with_pmcs/t/native_pbc/annotations.pbc
==============================================================================
Binary file (source and/or target). No diff available.
Modified: branches/pmc_freeze_with_pmcs/t/native_pbc/integer_1.pbc
==============================================================================
Binary file (source and/or target). No diff available.
Modified: branches/pmc_freeze_with_pmcs/t/native_pbc/number_1.pbc
==============================================================================
Binary file (source and/or target). No diff available.
Modified: branches/pmc_freeze_with_pmcs/t/native_pbc/string_1.pbc
==============================================================================
Binary file (source and/or target). No diff available.
Modified: branches/pmc_freeze_with_pmcs/t/op/trans.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/t/op/trans.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/t/op/trans.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -1,742 +1,127 @@
-#!perl
-# Copyright (C) 2001-2008, Parrot Foundation.
+#!parrot
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
-use strict;
-use warnings;
-use lib qw( . lib ../lib ../../lib );
-use Test::More;
-use Parrot::Test tests => 22;
-use Math::Trig qw( tan sec atan asin acos asec cosh sinh tanh sech );
-
=head1 NAME
-t/op/trans.t - Transcendental Mathematical Ops
+t/op/bitwise.t - Bitwise Ops
=head1 SYNOPSIS
- % prove t/op/trans.t
+ % prove t/op/trans.t
=head1 DESCRIPTION
-Tests the transcendental mathematical operations.
+Tests various bitwise logical operations.
=cut
-# This defines two macros:
-# fp_eq N, N, LABEL
-# fp_ne N, N, LABEL
-# which will conditionally branch
-# to LABEL if abs(n,n) < epsilon
-
-pasm_output_is( <<"CODE", <<OUTPUT, "sin" );
- .include 'fp_equality.pasm'
- set N1, 1.0
- sin N2, N1
- .fp_eq_pasm (N2, 0.841471, EQ1)
- print "not "
-EQ1: print "ok 1\\n"
-
- set I1, 1
- sin N2, I1
- .fp_eq_pasm (N2, 0.841471, EQ2)
- print "not "
-EQ2: print "ok 2\\n"
-
- end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "cos" );
- .include 'fp_equality.pasm'
- set N1, 1.0
- cos N2, N1
- .fp_eq_pasm (N2, 0.540302, EQ1)
- print "not "
-EQ1: print "ok 1\\n"
-
- set I1, 1
- cos N2, I1
- .fp_eq_pasm (N2, 0.540302, EQ2)
- print "not "
-EQ2: print "ok 2\\n"
- end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "tan" );
- .include 'fp_equality.pasm'
- set N1, 1.0
- tan N2, N1
- .fp_eq_pasm (N2, 1.557408, EQ1)
- print "not "
-EQ1: print "ok 1\\n"
-
- set I1, 1
- tan N2, I1
- .fp_eq_pasm (N2, 1.557408, EQ2)
- print "not "
-EQ2: print "ok 2\\n"
- end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "sec" );
- .include 'fp_equality.pasm'
- set N1, 1.0
- sec N2, N1
- .fp_eq_pasm (N2, 1.850816, EQ1)
- print "not "
-EQ1: print "ok 1\\n"
-
- set I1, 1
- sec N2, I1
- .fp_eq_pasm (N2, 1.850816, EQ2)
- print "not "
-EQ2: print "ok 2\\n"
- end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "atan" );
- .include 'fp_equality.pasm'
- set N1, 1.0
- atan N2, N1
- .fp_eq_pasm (N2, 0.785398, EQ1)
- print "not "
-EQ1: print "ok 1\\n"
-
- set I1, 1
- atan N2, I1
- .fp_eq_pasm (N2,0.785398 , EQ2)
- print "not "
-EQ2: print "ok 2\\n"
- end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "asin" );
- .include 'fp_equality.pasm'
- set N1, 1.0
- asin N2, N1
- .fp_eq_pasm (N2, 1.570796, EQ1)
- print "not "
-EQ1: print "ok 1\\n"
-
- set I1, 1
- asin N2, I1
- .fp_eq_pasm (N2, 1.570796 , EQ2)
- print "not "
-EQ2: print "ok 2\\n"
-
- end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "acos" );
- .include 'fp_equality.pasm'
- set N1, 1.0
- acos N2, N1
- .fp_eq_pasm (N2, 0.000000, EQ1)
- print "not "
-EQ1: print "ok 1\\n"
-
- set I1, 1
- acos N2, I1
- .fp_eq_pasm (N2, 0.000000, EQ2)
- print "not "
-EQ2: print "ok 2\\n"
-
- end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "asec" );
- .include 'fp_equality.pasm'
- set N1, 1.0
- asec N2, N1
- .fp_eq_pasm (N2, 0.000000, EQ1)
- print "not "
-EQ1: print "ok 1\\n"
-
- set I1, 1
- asec N2, I1
- .fp_eq_pasm (N2, 0.000000, EQ2)
- print "not "
-EQ2: print "ok 2\\n"
-
- end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "cosh" );
- .include 'fp_equality.pasm'
- set N1, 1.0
- cosh N2, N1
- .fp_eq_pasm (N2, 1.543081, EQ1)
- print "not "
-EQ1: print "ok 1\\n"
-
- set I1, 1
- cosh N2, I1
- .fp_eq_pasm (N2, 1.543081, EQ2)
- print "not "
-EQ2: print "ok 2\\n"
-
- end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-my $runcore = $ENV{TEST_PROG_ARGS} || '';
-my @bsdtodo = (
- $runcore =~ /--runcore=jit/ && $^O =~ m/bsd/i
- ? ( todo => 'broken under JIT TT #501' )
- : ()
-);
-
-pasm_output_is( <<"CODE", <<OUTPUT, "sinh", @bsdtodo );
- .include 'fp_equality.pasm'
- set N1, 1.0
- sinh N2, N1
- .fp_eq_pasm (N2, 1.175201, EQ1)
- print "not "
-EQ1: print "ok 1\\n"
-
- set I1, 1
- sinh N2, I1
- .fp_eq_pasm (N2, 1.175201, EQ2)
- print "not "
-EQ2: print "ok 2\\n"
-
- end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "tanh", @bsdtodo );
- .include 'fp_equality.pasm'
- set N1, 1.0
- tanh N2, N1
- .fp_eq_pasm (N2, 0.761594, EQ1)
- print "not "
-EQ1: print "ok 1\\n"
-
- set I1, 1
- tanh N2, I1
- .fp_eq_pasm (N2, 0.761594, EQ2)
- print "not "
-EQ2: print "ok 2\\n"
-
- end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "sech" );
- .include 'fp_equality.pasm'
- set N1, 1.0
- sech N2, N1
- .fp_eq_pasm (N2, 0.648054, EQ1)
- print "not "
-EQ1: print "ok 1\\n"
-
- set I1, 1
- sech N2, I1
- .fp_eq_pasm (N2, 0.648054, EQ2)
- print "not "
-EQ2: print "ok 2\\n"
-
- end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-my @jittodo = (
- $runcore =~ /--runcore=jit/
- ? ( todo => 'broken under JIT TT #530' )
- : ()
-);
-pasm_output_is( <<"CODE", <<OUTPUT, 'atan2', @jittodo );
- .include 'fp_equality.pasm'
- set N0, 0.0
- set I0, 0
- set N1, 1.0
- set I1, 1
- set N2, 1.0
- set I2, 1
- set I3, -1
- set N3, -1.0
-
- atan N4, N1, N2
- .fp_eq_pasm (N4, 0.785398, EQ1)
- print "not "
-EQ1: print "ok 1\\n"
-
- atan N4, N1, I2
- .fp_eq_pasm (N4, 0.785398, EQ2)
- print "not "
-EQ2: print "ok 2\\n"
-
- atan N4, I1, N2
- .fp_eq_pasm (N4, 0.785398, EQ3)
- print "not "
-EQ3: print "ok 3\\n"
-
- atan N4, I1, I2
- .fp_eq_pasm (N4, 0.785398, EQ4)
- print "not "
-EQ4: print "ok 4\\n"
-
- atan N4, N3, 1.0
- .fp_eq_pasm (N4, -0.785398, EQ5)
- print "not "
-EQ5: print "ok 5\\n"
-
- atan N4, N1, 0
- .fp_eq_pasm (N4, 1.570796, EQ6)
- print "not "
-EQ6: print "ok 6\\n"
-
- atan N4, I3, 0.0
- .fp_eq_pasm (N4, -1.570796, EQ7)
- print "not "
-EQ7: print "ok 7\\n"
-
- atan N4, I3, -1
- .fp_eq_pasm (N4, -2.356194, EQ8)
- print "not "
-EQ8: print "ok 8\\n"
-
- atan N4, 1.0, N3
- .fp_eq_pasm (N4, 2.356194, EQ9)
- print "not "
-EQ9: print "ok 9\\n"
-
- atan N4, 1.0, I0
- .fp_eq_pasm (N4, 1.570796, EQ10)
- print "not "
-EQ10: print "ok 10\\n"
-
- atan N4, 1, N1
- .fp_eq_pasm (N4, 0.785398, EQ11)
- print "not "
-EQ11: print "ok 11\\n"
-
- atan N4, 1, I1
- .fp_eq_pasm (N4, 0.785398, EQ12)
- print "not "
-EQ12: print "ok 12\\n"
-
- atan N4, 0.0, 1.0
- .fp_eq_pasm (N4, 0.000000, EQ13)
- print "not "
-EQ13: print "ok 13\\n"
-
- atan N4, -1.0, 0
- .fp_eq_pasm (N4, -1.570796, EQ14)
- print "not "
-EQ14: print "ok 14\\n"
-
- atan N4, 1, -1.0
- .fp_eq_pasm (N4, 2.356194, EQ15)
- print "not "
-EQ15: print "ok 15\\n"
-
- atan N4, 0, 1
- .fp_eq_pasm (N4, 0.000000, EQ16)
- print "not "
-EQ16: print "ok 16\\n"
- end
-CODE
-ok 1
-ok 2
-ok 3
-ok 4
-ok 5
-ok 6
-ok 7
-ok 8
-ok 9
-ok 10
-ok 11
-ok 12
-ok 13
-ok 14
-ok 15
-ok 16
-OUTPUT
-
-pasm_output_is( <<"CODE", <<'OUTPUT', 'atan, part 2' );
- .include 'fp_equality.pasm'
- atan N4, -0.0, -0.0
- .fp_eq_pasm (N4, -3.1415926, EQ1)
- print "not "
- print N4
-EQ1: print "ok 1\\n"
- end
-CODE
-ok 1
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "log2" );
- .include 'fp_equality.pasm'
- set N1, 10.0
- log2 N2, N1
- .fp_eq_pasm (N2, 3.321928, EQ1)
- print "not "
-EQ1: print "ok 1\\n"
-
- set I1, 10
- log2 N2, I1
- .fp_eq_pasm (N2, 3.321928, EQ2)
- print "not "
-EQ2: print "ok 2\\n"
-
- end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "log10" );
- .include 'fp_equality.pasm'
- set N1, 15.0
- log10 N2, N1
- .fp_eq_pasm (N2, 1.176091, EQ1)
- print "not "
-EQ1: print "ok 1\\n"
-
- set I1, 15
- log10 N2, I1
- .fp_eq_pasm (N2, 1.176091, EQ2)
- print "not "
-EQ2: print "ok 2\\n"
-
- end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "ln" );
- .include 'fp_equality.pasm'
- set N1, 10.0
- ln N2, N1
- .fp_eq_pasm (N2, 2.302585, EQ1)
- print "not "
-EQ1: print "ok 1\\n"
-
- set I1, 10
- ln N2, I1
- .fp_eq_pasm (N2, 2.302585, EQ2)
- print "not "
-EQ2: print "ok 2\\n"
- end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "exp" );
- .include 'fp_equality.pasm'
- set N1, 10.0
- exp N2, N1
- .fp_eq_pasm (N2, 22026.465795, EQ1)
- print "not "
-EQ1: print "ok 1\\n"
-
- set I1, 10
- exp N2, I1
- .fp_eq_pasm (N2, 22026.465795, EQ2)
- print "not "
-EQ2: print "ok 2\\n"
- end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "pow", @bsdtodo );
- .include 'fp_equality.pasm'
- set N1, 3.0
- set I1, 3
- set N2, 5.0
- set I2, 5
- pow N3, N1, N2
- .fp_eq_pasm (N3, 243.0, EQ1)
- print "not "
-EQ1: print "ok 1\\n"
-
- pow N3, N1, I2
- .fp_eq_pasm (N3, 243.0, EQ2)
- print "not "
-EQ2: print "ok 2\\n"
-
- pow N3, I1, N2
- .fp_eq_pasm (N3, 243.0, EQ3)
- print "not "
-EQ3: print "ok 3\\n"
-
- pow N3, I1, I2
- .fp_eq_pasm (N3, 243.0, EQ4)
- print "not "
-EQ4: print "ok 4\\n"
-
- set N0, 0.0
- set I0, 0
- set N1, 1.0
- set I1, 1
- set N2, 4.0
- set I2, 4
- pow N3, N2, 2.5
- .fp_eq_pasm (N3, 32.0, EQ5)
- print "not "
-EQ5: print "ok 5\\n"
-
- pow N3, N2, -2
- .fp_eq_pasm (N3, 0.0625, EQ6)
- print "not "
-EQ6: print "ok 6\\n"
-
- pow N3, I2, 0.5
- .fp_eq_pasm (N3, 2.0, EQ7)
- print "not "
-EQ7: print "ok 7\\n"
-
- pow N3, I2, 0
- .fp_eq_pasm (N3, 1.0, EQ8)
- print "not "
-EQ8: print "ok 8\\n"
-
- pow N3, 0.0, N2
- .fp_eq_pasm (N3, 0.0, EQ9)
- print "not "
-EQ9: print "ok 9\\n"
-
- pow N3, 2.5, 0.0
- .fp_eq_pasm (N3, 1.0, EQ10)
- print "not "
-EQ10: print "ok 10\\n"
-
- pow N3, 2.5, I2
- .fp_eq_pasm (N3, 39.0625, EQ11)
- print "not "
-EQ11: print "ok 11\\n"
-
- pow N3, 2.0, -4
- .fp_eq_pasm (N3, 0.0625, EQ12)
- print "not "
-EQ12: print "ok 12\\n"
-
- pow N3, 0, N2
- .fp_eq_pasm (N3, 0.0, EQ13)
- print "not "
-EQ13: print "ok 13\\n"
-
- pow N3, 4, -0.5
- .fp_eq_pasm (N3, 0.5, EQ14)
- print "not "
-EQ14: print "ok 14\\n"
-
- pow N3, 4, I2
- .fp_eq_pasm (N3, 256.0, EQ15)
- print "not "
-EQ15: print "ok 15\\n"
-
- pow N3, 4, -1
- .fp_eq_pasm (N3, 0.25, EQ16)
- print "not "
-EQ16: print "ok 16\\n"
- end
-CODE
-ok 1
-ok 2
-ok 3
-ok 4
-ok 5
-ok 6
-ok 7
-ok 8
-ok 9
-ok 10
-ok 11
-ok 12
-ok 13
-ok 14
-ok 15
-ok 16
-OUTPUT
-
-pasm_output_is( <<"CODE", <<OUTPUT, "sqrt" );
- .include 'fp_equality.pasm'
- set N1, 9.0
- sqrt N2, N1
- .fp_eq_pasm (N2, 3.0, EQ1)
- print "not "
-EQ1: print "ok 1\\n"
-
- set I1, 9
- sqrt N2, I1
- .fp_eq_pasm (N2, 3.0, EQ2)
- print "not "
-EQ2: print "ok 2\\n"
-
- end
-CODE
-ok 1
-ok 2
-OUTPUT
-
-pasm_output_is( <<'CODE', <<OUTPUT, "pow_n_n_ic" );
- set N0, 2.0
- pow N1, N0, 0
- print N1
- print "\n"
- pow N1, N0, 1
- print N1
- print "\n"
- pow N1, N0, 2
- print N1
- print "\n"
- pow N1, N0, 3
- print N1
- print "\n"
- pow N1, N0, 4
- print N1
- print "\n"
- pow N1, N0, 5
- print N1
- print "\n"
- pow N1, N0, 6
- print N1
- print "\n"
- pow N1, N0, 7
- print N1
- print "\n"
- pow N1, N0, -1
- print N1
- print "\n"
- pow N1, N0, -2
- print N1
- print "\n"
- pow N1, N0, -3
- print N1
- print "\n"
- pow N1, N0, -4
- print N1
- print "\n"
- pow N1, N0, -5
- end
-CODE
-1
-2
-4
-8
-16
-32
-64
-128
-0.5
-0.25
-0.125
-0.0625
-OUTPUT
-
-pasm_output_is( <<'CODE', <<OUTPUT, "pow_n_n_i" );
- set N0, 2.0
- set I0, 0
- pow N1, N0, I0
- print N1
- print "\n"
- inc I0
- pow N1, N0, I0
- print N1
- print "\n"
- inc I0
- pow N1, N0, I0
- print N1
- print "\n"
- inc I0
- pow N1, N0, I0
- print N1
- print "\n"
- inc I0
- pow N1, N0, I0
- print N1
- print "\n"
- inc I0
- pow N1, N0, I0
- print N1
- print "\n"
- inc I0
- pow N1, N0, I0
- print N1
- print "\n"
- set I0, -1
- pow N1, N0, I0
- print N1
- print "\n"
- dec I0
- pow N1, N0, I0
- print N1
- print "\n"
- dec I0
- pow N1, N0, I0
- print N1
- print "\n"
- dec I0
- pow N1, N0, I0
- print N1
- print "\n"
- dec I0
- pow N1, N0, I0
- print N1
- print "\n"
- dec I0
- pow N1, N0, I0
- print N1
- print "\n"
- end
-CODE
-1
-2
-4
-8
-16
-32
-64
-0.5
-0.25
-0.125
-0.0625
-0.03125
-0.015625
-OUTPUT
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
+.sub main :main
+ .include 'test_more.pir'
+
+ plan(16)
+
+ test_sin_n()
+ test_sin_i()
+ test_cos_n()
+ test_cos_i()
+ test_tan_n()
+ test_tan_i()
+.end
+
+.sub _pi
+ .return (3.1415926535897)
+.end
+
+.sub _e
+ .return (2.7182818459045)
+.end
+
+.sub _epsilon
+ .return (0.0001)
+.end
+
+.sub test_sin_n
+ .local num epsilon
+ epsilon = _epsilon()
+
+ $N0 = sin 0.0
+ is($N0, 0.0, "sin(0.0)", epsilon)
+
+ $N0 = sin 1.0
+ is($N0, 0.841471, "sin(1.0)", epsilon)
+
+ $N1 = _pi()
+ $N0 = sin $N1
+ is($N0, 0.0, "sin(pi)", epsilon)
+
+ $N1 = _pi()
+ $N1 = $N1 / 2
+ $N0 = sin $N1
+ is($N0, 1.0, "sin(pi/2)", epsilon)
+.end
+
+.sub test_sin_i
+ .local num epsilon
+ epsilon = _epsilon()
+
+ $N0 = sin 0
+ is($N0, 0.0, "sin(0)", epsilon)
+
+ $N0 = sin 1
+ is($N0, 0.841471, "sin(1)", epsilon)
+.end
+
+.sub test_cos_n
+ .local num epsilon
+ epsilon = _epsilon()
+
+ $N0 = cos 0.0
+ is($N0, 1.0, "cos(0.0)", epsilon)
+
+ $N0 = cos 1.0
+ is($N0, 0.540302, "cos(1.0)", epsilon)
+
+ $N1 = _pi()
+ $N0 = cos $N1
+ is($N0, -1.0, "cos(pi)", epsilon)
+
+ $N1 = _pi()
+ $N1 = $N1 / 2
+ $N0 = cos $N1
+ is($N0, 0.0, "cos(pi/2)", epsilon)
+.end
+
+.sub test_cos_i
+ .local num epsilon
+ epsilon = _epsilon()
+
+ $N0 = cos 0
+ is($N0, 1.0, "cos(0)", epsilon)
+
+ $N0 = cos 1
+ is($N0, 0.540302, "cos(1)", epsilon)
+.end
+
+.sub test_tan_n
+ .local num epsilon
+ epsilon = _epsilon()
+
+ $N0 = tan 0.0
+ is($N0, 0.0, "tan(0.0)", epsilon)
+
+ $N0 = tan 1.0
+ is($N0, 1.557408, "tan(1.0)", epsilon)
+.end
+
+.sub test_tan_i
+ .local num epsilon
+ epsilon = _epsilon()
+
+ $N0 = tan 0
+ is($N0, 0.0, "tan(0)", epsilon)
+
+ $N0 = tan 1
+ is($N0, 1.557408, "tan(1)", epsilon)
+.end
+
Copied: branches/pmc_freeze_with_pmcs/t/op/trans_old.t (from r43642, trunk/t/op/trans_old.t)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/pmc_freeze_with_pmcs/t/op/trans_old.t Fri Jan 29 21:05:08 2010 (r43643, copy of r43642, trunk/t/op/trans_old.t)
@@ -0,0 +1,684 @@
+#!perl
+# Copyright (C) 2001-2008, Parrot Foundation.
+# $Id$
+
+use strict;
+use warnings;
+use lib qw( . lib ../lib ../../lib );
+use Test::More;
+use Parrot::Test tests => 19;
+use Math::Trig qw( tan sec atan asin acos asec cosh sinh tanh sech );
+
+=head1 NAME
+
+t/op/trans.t - Transcendental Mathematical Ops
+
+=head1 SYNOPSIS
+
+ % prove t/op/trans.t
+
+=head1 DESCRIPTION
+
+Tests the transcendental mathematical operations.
+
+=cut
+
+# This defines two macros:
+# fp_eq N, N, LABEL
+# fp_ne N, N, LABEL
+# which will conditionally branch
+# to LABEL if abs(n,n) < epsilon
+
+pasm_output_is( <<"CODE", <<OUTPUT, "sec" );
+ .include 'fp_equality.pasm'
+ set N1, 1.0
+ sec N2, N1
+ .fp_eq_pasm (N2, 1.850816, EQ1)
+ print "not "
+EQ1: print "ok 1\\n"
+
+ set I1, 1
+ sec N2, I1
+ .fp_eq_pasm (N2, 1.850816, EQ2)
+ print "not "
+EQ2: print "ok 2\\n"
+ end
+CODE
+ok 1
+ok 2
+OUTPUT
+
+pasm_output_is( <<"CODE", <<OUTPUT, "atan" );
+ .include 'fp_equality.pasm'
+ set N1, 1.0
+ atan N2, N1
+ .fp_eq_pasm (N2, 0.785398, EQ1)
+ print "not "
+EQ1: print "ok 1\\n"
+
+ set I1, 1
+ atan N2, I1
+ .fp_eq_pasm (N2,0.785398 , EQ2)
+ print "not "
+EQ2: print "ok 2\\n"
+ end
+CODE
+ok 1
+ok 2
+OUTPUT
+
+pasm_output_is( <<"CODE", <<OUTPUT, "asin" );
+ .include 'fp_equality.pasm'
+ set N1, 1.0
+ asin N2, N1
+ .fp_eq_pasm (N2, 1.570796, EQ1)
+ print "not "
+EQ1: print "ok 1\\n"
+
+ set I1, 1
+ asin N2, I1
+ .fp_eq_pasm (N2, 1.570796 , EQ2)
+ print "not "
+EQ2: print "ok 2\\n"
+
+ end
+CODE
+ok 1
+ok 2
+OUTPUT
+
+pasm_output_is( <<"CODE", <<OUTPUT, "acos" );
+ .include 'fp_equality.pasm'
+ set N1, 1.0
+ acos N2, N1
+ .fp_eq_pasm (N2, 0.000000, EQ1)
+ print "not "
+EQ1: print "ok 1\\n"
+
+ set I1, 1
+ acos N2, I1
+ .fp_eq_pasm (N2, 0.000000, EQ2)
+ print "not "
+EQ2: print "ok 2\\n"
+
+ end
+CODE
+ok 1
+ok 2
+OUTPUT
+
+pasm_output_is( <<"CODE", <<OUTPUT, "asec" );
+ .include 'fp_equality.pasm'
+ set N1, 1.0
+ asec N2, N1
+ .fp_eq_pasm (N2, 0.000000, EQ1)
+ print "not "
+EQ1: print "ok 1\\n"
+
+ set I1, 1
+ asec N2, I1
+ .fp_eq_pasm (N2, 0.000000, EQ2)
+ print "not "
+EQ2: print "ok 2\\n"
+
+ end
+CODE
+ok 1
+ok 2
+OUTPUT
+
+pasm_output_is( <<"CODE", <<OUTPUT, "cosh" );
+ .include 'fp_equality.pasm'
+ set N1, 1.0
+ cosh N2, N1
+ .fp_eq_pasm (N2, 1.543081, EQ1)
+ print "not "
+EQ1: print "ok 1\\n"
+
+ set I1, 1
+ cosh N2, I1
+ .fp_eq_pasm (N2, 1.543081, EQ2)
+ print "not "
+EQ2: print "ok 2\\n"
+
+ end
+CODE
+ok 1
+ok 2
+OUTPUT
+
+my $runcore = $ENV{TEST_PROG_ARGS} || '';
+my @bsdtodo = (
+ $runcore =~ /--runcore=jit/ && $^O =~ m/bsd/i
+ ? ( todo => 'broken under JIT TT #501' )
+ : ()
+);
+
+pasm_output_is( <<"CODE", <<OUTPUT, "sinh", @bsdtodo );
+ .include 'fp_equality.pasm'
+ set N1, 1.0
+ sinh N2, N1
+ .fp_eq_pasm (N2, 1.175201, EQ1)
+ print "not "
+EQ1: print "ok 1\\n"
+
+ set I1, 1
+ sinh N2, I1
+ .fp_eq_pasm (N2, 1.175201, EQ2)
+ print "not "
+EQ2: print "ok 2\\n"
+
+ end
+CODE
+ok 1
+ok 2
+OUTPUT
+
+pasm_output_is( <<"CODE", <<OUTPUT, "tanh", @bsdtodo );
+ .include 'fp_equality.pasm'
+ set N1, 1.0
+ tanh N2, N1
+ .fp_eq_pasm (N2, 0.761594, EQ1)
+ print "not "
+EQ1: print "ok 1\\n"
+
+ set I1, 1
+ tanh N2, I1
+ .fp_eq_pasm (N2, 0.761594, EQ2)
+ print "not "
+EQ2: print "ok 2\\n"
+
+ end
+CODE
+ok 1
+ok 2
+OUTPUT
+
+pasm_output_is( <<"CODE", <<OUTPUT, "sech" );
+ .include 'fp_equality.pasm'
+ set N1, 1.0
+ sech N2, N1
+ .fp_eq_pasm (N2, 0.648054, EQ1)
+ print "not "
+EQ1: print "ok 1\\n"
+
+ set I1, 1
+ sech N2, I1
+ .fp_eq_pasm (N2, 0.648054, EQ2)
+ print "not "
+EQ2: print "ok 2\\n"
+
+ end
+CODE
+ok 1
+ok 2
+OUTPUT
+
+my @jittodo = (
+ $runcore =~ /--runcore=jit/
+ ? ( todo => 'broken under JIT TT #530' )
+ : ()
+);
+pasm_output_is( <<"CODE", <<OUTPUT, 'atan2', @jittodo );
+ .include 'fp_equality.pasm'
+ set N0, 0.0
+ set I0, 0
+ set N1, 1.0
+ set I1, 1
+ set N2, 1.0
+ set I2, 1
+ set I3, -1
+ set N3, -1.0
+
+ atan N4, N1, N2
+ .fp_eq_pasm (N4, 0.785398, EQ1)
+ print "not "
+EQ1: print "ok 1\\n"
+
+ atan N4, N1, I2
+ .fp_eq_pasm (N4, 0.785398, EQ2)
+ print "not "
+EQ2: print "ok 2\\n"
+
+ atan N4, I1, N2
+ .fp_eq_pasm (N4, 0.785398, EQ3)
+ print "not "
+EQ3: print "ok 3\\n"
+
+ atan N4, I1, I2
+ .fp_eq_pasm (N4, 0.785398, EQ4)
+ print "not "
+EQ4: print "ok 4\\n"
+
+ atan N4, N3, 1.0
+ .fp_eq_pasm (N4, -0.785398, EQ5)
+ print "not "
+EQ5: print "ok 5\\n"
+
+ atan N4, N1, 0
+ .fp_eq_pasm (N4, 1.570796, EQ6)
+ print "not "
+EQ6: print "ok 6\\n"
+
+ atan N4, I3, 0.0
+ .fp_eq_pasm (N4, -1.570796, EQ7)
+ print "not "
+EQ7: print "ok 7\\n"
+
+ atan N4, I3, -1
+ .fp_eq_pasm (N4, -2.356194, EQ8)
+ print "not "
+EQ8: print "ok 8\\n"
+
+ atan N4, 1.0, N3
+ .fp_eq_pasm (N4, 2.356194, EQ9)
+ print "not "
+EQ9: print "ok 9\\n"
+
+ atan N4, 1.0, I0
+ .fp_eq_pasm (N4, 1.570796, EQ10)
+ print "not "
+EQ10: print "ok 10\\n"
+
+ atan N4, 1, N1
+ .fp_eq_pasm (N4, 0.785398, EQ11)
+ print "not "
+EQ11: print "ok 11\\n"
+
+ atan N4, 1, I1
+ .fp_eq_pasm (N4, 0.785398, EQ12)
+ print "not "
+EQ12: print "ok 12\\n"
+
+ atan N4, 0.0, 1.0
+ .fp_eq_pasm (N4, 0.000000, EQ13)
+ print "not "
+EQ13: print "ok 13\\n"
+
+ atan N4, -1.0, 0
+ .fp_eq_pasm (N4, -1.570796, EQ14)
+ print "not "
+EQ14: print "ok 14\\n"
+
+ atan N4, 1, -1.0
+ .fp_eq_pasm (N4, 2.356194, EQ15)
+ print "not "
+EQ15: print "ok 15\\n"
+
+ atan N4, 0, 1
+ .fp_eq_pasm (N4, 0.000000, EQ16)
+ print "not "
+EQ16: print "ok 16\\n"
+ end
+CODE
+ok 1
+ok 2
+ok 3
+ok 4
+ok 5
+ok 6
+ok 7
+ok 8
+ok 9
+ok 10
+ok 11
+ok 12
+ok 13
+ok 14
+ok 15
+ok 16
+OUTPUT
+
+pasm_output_is( <<"CODE", <<'OUTPUT', 'atan, part 2' );
+ .include 'fp_equality.pasm'
+ atan N4, -0.0, -0.0
+ .fp_eq_pasm (N4, -3.1415926, EQ1)
+ print "not "
+ print N4
+EQ1: print "ok 1\\n"
+ end
+CODE
+ok 1
+OUTPUT
+
+pasm_output_is( <<"CODE", <<OUTPUT, "log2" );
+ .include 'fp_equality.pasm'
+ set N1, 10.0
+ log2 N2, N1
+ .fp_eq_pasm (N2, 3.321928, EQ1)
+ print "not "
+EQ1: print "ok 1\\n"
+
+ set I1, 10
+ log2 N2, I1
+ .fp_eq_pasm (N2, 3.321928, EQ2)
+ print "not "
+EQ2: print "ok 2\\n"
+
+ end
+CODE
+ok 1
+ok 2
+OUTPUT
+
+pasm_output_is( <<"CODE", <<OUTPUT, "log10" );
+ .include 'fp_equality.pasm'
+ set N1, 15.0
+ log10 N2, N1
+ .fp_eq_pasm (N2, 1.176091, EQ1)
+ print "not "
+EQ1: print "ok 1\\n"
+
+ set I1, 15
+ log10 N2, I1
+ .fp_eq_pasm (N2, 1.176091, EQ2)
+ print "not "
+EQ2: print "ok 2\\n"
+
+ end
+CODE
+ok 1
+ok 2
+OUTPUT
+
+pasm_output_is( <<"CODE", <<OUTPUT, "ln" );
+ .include 'fp_equality.pasm'
+ set N1, 10.0
+ ln N2, N1
+ .fp_eq_pasm (N2, 2.302585, EQ1)
+ print "not "
+EQ1: print "ok 1\\n"
+
+ set I1, 10
+ ln N2, I1
+ .fp_eq_pasm (N2, 2.302585, EQ2)
+ print "not "
+EQ2: print "ok 2\\n"
+ end
+CODE
+ok 1
+ok 2
+OUTPUT
+
+pasm_output_is( <<"CODE", <<OUTPUT, "exp" );
+ .include 'fp_equality.pasm'
+ set N1, 10.0
+ exp N2, N1
+ .fp_eq_pasm (N2, 22026.465795, EQ1)
+ print "not "
+EQ1: print "ok 1\\n"
+
+ set I1, 10
+ exp N2, I1
+ .fp_eq_pasm (N2, 22026.465795, EQ2)
+ print "not "
+EQ2: print "ok 2\\n"
+ end
+CODE
+ok 1
+ok 2
+OUTPUT
+
+pasm_output_is( <<"CODE", <<OUTPUT, "pow", @bsdtodo );
+ .include 'fp_equality.pasm'
+ set N1, 3.0
+ set I1, 3
+ set N2, 5.0
+ set I2, 5
+ pow N3, N1, N2
+ .fp_eq_pasm (N3, 243.0, EQ1)
+ print "not "
+EQ1: print "ok 1\\n"
+
+ pow N3, N1, I2
+ .fp_eq_pasm (N3, 243.0, EQ2)
+ print "not "
+EQ2: print "ok 2\\n"
+
+ pow N3, I1, N2
+ .fp_eq_pasm (N3, 243.0, EQ3)
+ print "not "
+EQ3: print "ok 3\\n"
+
+ pow N3, I1, I2
+ .fp_eq_pasm (N3, 243.0, EQ4)
+ print "not "
+EQ4: print "ok 4\\n"
+
+ set N0, 0.0
+ set I0, 0
+ set N1, 1.0
+ set I1, 1
+ set N2, 4.0
+ set I2, 4
+ pow N3, N2, 2.5
+ .fp_eq_pasm (N3, 32.0, EQ5)
+ print "not "
+EQ5: print "ok 5\\n"
+
+ pow N3, N2, -2
+ .fp_eq_pasm (N3, 0.0625, EQ6)
+ print "not "
+EQ6: print "ok 6\\n"
+
+ pow N3, I2, 0.5
+ .fp_eq_pasm (N3, 2.0, EQ7)
+ print "not "
+EQ7: print "ok 7\\n"
+
+ pow N3, I2, 0
+ .fp_eq_pasm (N3, 1.0, EQ8)
+ print "not "
+EQ8: print "ok 8\\n"
+
+ pow N3, 0.0, N2
+ .fp_eq_pasm (N3, 0.0, EQ9)
+ print "not "
+EQ9: print "ok 9\\n"
+
+ pow N3, 2.5, 0.0
+ .fp_eq_pasm (N3, 1.0, EQ10)
+ print "not "
+EQ10: print "ok 10\\n"
+
+ pow N3, 2.5, I2
+ .fp_eq_pasm (N3, 39.0625, EQ11)
+ print "not "
+EQ11: print "ok 11\\n"
+
+ pow N3, 2.0, -4
+ .fp_eq_pasm (N3, 0.0625, EQ12)
+ print "not "
+EQ12: print "ok 12\\n"
+
+ pow N3, 0, N2
+ .fp_eq_pasm (N3, 0.0, EQ13)
+ print "not "
+EQ13: print "ok 13\\n"
+
+ pow N3, 4, -0.5
+ .fp_eq_pasm (N3, 0.5, EQ14)
+ print "not "
+EQ14: print "ok 14\\n"
+
+ pow N3, 4, I2
+ .fp_eq_pasm (N3, 256.0, EQ15)
+ print "not "
+EQ15: print "ok 15\\n"
+
+ pow N3, 4, -1
+ .fp_eq_pasm (N3, 0.25, EQ16)
+ print "not "
+EQ16: print "ok 16\\n"
+ end
+CODE
+ok 1
+ok 2
+ok 3
+ok 4
+ok 5
+ok 6
+ok 7
+ok 8
+ok 9
+ok 10
+ok 11
+ok 12
+ok 13
+ok 14
+ok 15
+ok 16
+OUTPUT
+
+pasm_output_is( <<"CODE", <<OUTPUT, "sqrt" );
+ .include 'fp_equality.pasm'
+ set N1, 9.0
+ sqrt N2, N1
+ .fp_eq_pasm (N2, 3.0, EQ1)
+ print "not "
+EQ1: print "ok 1\\n"
+
+ set I1, 9
+ sqrt N2, I1
+ .fp_eq_pasm (N2, 3.0, EQ2)
+ print "not "
+EQ2: print "ok 2\\n"
+
+ end
+CODE
+ok 1
+ok 2
+OUTPUT
+
+pasm_output_is( <<'CODE', <<OUTPUT, "pow_n_n_ic" );
+ set N0, 2.0
+ pow N1, N0, 0
+ print N1
+ print "\n"
+ pow N1, N0, 1
+ print N1
+ print "\n"
+ pow N1, N0, 2
+ print N1
+ print "\n"
+ pow N1, N0, 3
+ print N1
+ print "\n"
+ pow N1, N0, 4
+ print N1
+ print "\n"
+ pow N1, N0, 5
+ print N1
+ print "\n"
+ pow N1, N0, 6
+ print N1
+ print "\n"
+ pow N1, N0, 7
+ print N1
+ print "\n"
+ pow N1, N0, -1
+ print N1
+ print "\n"
+ pow N1, N0, -2
+ print N1
+ print "\n"
+ pow N1, N0, -3
+ print N1
+ print "\n"
+ pow N1, N0, -4
+ print N1
+ print "\n"
+ pow N1, N0, -5
+ end
+CODE
+1
+2
+4
+8
+16
+32
+64
+128
+0.5
+0.25
+0.125
+0.0625
+OUTPUT
+
+pasm_output_is( <<'CODE', <<OUTPUT, "pow_n_n_i" );
+ set N0, 2.0
+ set I0, 0
+ pow N1, N0, I0
+ print N1
+ print "\n"
+ inc I0
+ pow N1, N0, I0
+ print N1
+ print "\n"
+ inc I0
+ pow N1, N0, I0
+ print N1
+ print "\n"
+ inc I0
+ pow N1, N0, I0
+ print N1
+ print "\n"
+ inc I0
+ pow N1, N0, I0
+ print N1
+ print "\n"
+ inc I0
+ pow N1, N0, I0
+ print N1
+ print "\n"
+ inc I0
+ pow N1, N0, I0
+ print N1
+ print "\n"
+ set I0, -1
+ pow N1, N0, I0
+ print N1
+ print "\n"
+ dec I0
+ pow N1, N0, I0
+ print N1
+ print "\n"
+ dec I0
+ pow N1, N0, I0
+ print N1
+ print "\n"
+ dec I0
+ pow N1, N0, I0
+ print N1
+ print "\n"
+ dec I0
+ pow N1, N0, I0
+ print N1
+ print "\n"
+ dec I0
+ pow N1, N0, I0
+ print N1
+ print "\n"
+ end
+CODE
+1
+2
+4
+8
+16
+32
+64
+0.5
+0.25
+0.125
+0.0625
+0.03125
+0.015625
+OUTPUT
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
Modified: branches/pmc_freeze_with_pmcs/t/pharness/03-handle_long_options.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/t/pharness/03-handle_long_options.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/t/pharness/03-handle_long_options.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -13,7 +13,7 @@
};
plan( skip_all => 't/harness only runs once configuration has completed' )
if $@;
-plan( tests => 12 );
+plan( tests => 11 );
use Carp;
use Parrot::Harness::Options qw( handle_long_options );
@@ -22,13 +22,11 @@
@argv = qw(
-wv
-O2
- --running-make-test
--gc-debug
t/postconfigure/*.t
); # */
($longopts, @argv) = handle_long_options(@argv);
-ok($longopts->{running_make_test}, "Captured long option");
ok($longopts->{gc_debug}, "Captured long option");
%still_argv = map {$_, 1} @argv;
ok($still_argv{'-wv'}, "Combined short options still present in \@ARGV");
Modified: branches/pmc_freeze_with_pmcs/t/pmc/nci.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/t/pmc/nci.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/t/pmc/nci.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -566,12 +566,12 @@
print "loaded\n"
dlfunc P0, P1, "nci_ssc", "ssc"
print "dlfunced\n"
- set I5, 2
+ set I5, -2
set I6, 3
set_args "0,0", I5, I6
get_results "0", I5
invokecc P0
- ne I5, 6, nok_1
+ ne I5, -6, nok_1
print "ok 1\n"
end
nok_1: print "nok 1\n"
@@ -2367,7 +2367,7 @@
print "\n"
.local pmc nci_vv
- nci_vv = dlfunc libnci_test, "nci_vv", "vv"
+ nci_vv = dlfunc libnci_test, "nci_vv", ""
nci_vv()
$I1 = nci_dlvar_int[0]
print $I1
Modified: branches/pmc_freeze_with_pmcs/t/pmc/orderedhash.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/t/pmc/orderedhash.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/t/pmc/orderedhash.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -6,7 +6,7 @@
use warnings;
use lib qw( . lib ../lib ../../lib );
use Test::More;
-use Parrot::Test tests => 28;
+use Parrot::Test tests => 23;
=head1 NAME
@@ -310,16 +310,10 @@
print I0
exists I0, P0["ghi"]
print I0
- exists I0, P0[0]
- print I0
- exists I0, P0[1]
- print I0
- exists I0, P0[2]
- print I0
print "\n"
end
CODE
-101101
+101
OUTPUT
pasm_output_like( <<'CODE', '/[axj]/', "iterate over keys" );
@@ -636,113 +630,6 @@
ok 4
OUTPUT
-pasm_output_is( <<'CODE', <<'OUTPUT', "set/get compound key" );
- new P0, ['OrderedHash']
- set P0["a"], "Foo\n"
- new P1, ['Hash']
- set P1['foo'], "bar\n"
- set P0["b"], P1
- set P2, P0['b'; 'foo']
- print P2
- set P0['b'; 'foo'], "baz\n"
- set P0['b'; 'quux'], "xyzzy\n"
- set P2, P0['b'; 'foo']
- print P2
- set P2, P0['b'; 'quux']
- print P2
- print "--\n"
- set P2, P0[0]
- print P2
- end
-CODE
-bar
-baz
-xyzzy
---
-Foo
-OUTPUT
-
-pasm_output_is( <<'CODE', <<'OUTPUT', "exists compound key" );
- new P0, ['OrderedHash']
- set P0["a"], "Foo"
- new P1, ['Hash']
- set P1['foo'], "bar\n"
- set P0["b"], P1
- set P0['b'; 'quux'], "xyzzy\n"
- exists I0, P0['a']
- print I0
- exists I0, P0['b'; 'foo']
- print I0
- exists I0, P0['b'; 'quux']
- print I0
- exists I0, P0['b'; 'nada']
- print I0
- exists I0, P0['c']
- print I0
- print "\n--\n"
- exists I0, P0[0]
- print I0
- exists I0, P0[1; 'foo']
- print I0
- exists I0, P0[1; 'quux']
- print I0
- exists I0, P0[1; 'nada']
- print I0
- exists I0, P0[2]
- print I0
- print "\n"
- end
-CODE
-11100
---
-11100
-OUTPUT
-
-pasm_output_is( <<'CODE', <<'OUTPUT', "delete compound key" );
- new P0, ['OrderedHash']
- set P0["a"], "Foo"
- new P1, ['Hash']
- set P1['foo'], "bar\n"
- set P0["b"], P1
- set P0['b'; 'quux'], "xyzzy\n"
- delete P0['b'; 'foo']
- exists I0, P0['a']
- print I0
- exists I0, P0['b'; 'foo']
- print I0
- exists I0, P0['b'; 'quux']
- print I0
- exists I0, P0['b'; 'nada']
- print I0
- exists I0, P0['c']
- print I0
- print "\n--\n"
- exists I0, P0[0]
- print I0
- exists I0, P0[1; 'foo']
- print I0
- exists I0, P0[1; 'quux']
- print I0
- exists I0, P0[1; 'nada']
- print I0
- exists I0, P0[2]
- print I0
- print "\n--\n"
- delete P0[1; 'quux']
- exists I0, P0['b'; 'quux']
- print I0
- exists I0, P0[1; 'quux']
- print I0
- print "\n"
- end
-CODE
-10100
---
-10100
---
-00
-OUTPUT
-
pasm_output_is( <<'CODE', <<'OUTPUT', "freeze/thaw 1" );
new P0, ['OrderedHash']
set P0["a"], "Foo\n"
@@ -767,104 +654,6 @@
Bar
OUTPUT
-pasm_output_is( <<'CODE', <<'OUTPUT', "freeze/thaw 2" );
- new P0, ['OrderedHash']
- set P0["a"], "Foo\n"
- new P1, ['Hash']
- set P1['foo'], "bar\n"
- set P0["b"], P1
- set P0['b'; 'quux'], "xyzzy\n"
-
- freeze S0, P0
- thaw P1, S0
- set P2, P1["a"]
- print P2
- set P2, P1[0]
- print P2
- set P2, P1["b";"foo"]
- print P2
- set P2, P1[1; "foo"]
- print P2
- set P2, P1["b";"quux"]
- print P2
- set P2, P1[1; "quux"]
- print P2
-
- end
-CODE
-Foo
-Foo
-bar
-bar
-xyzzy
-xyzzy
-OUTPUT
-
-pir_output_is( <<'CODE', <<'OUTPUT', 'freeze/thaw 3' );
-.sub main :main
- .local string frozen
- frozen = get_frozen_hash()
-
- sweep 1
-
- .local pmc parent
- parent = thaw frozen
- $S0 = parent['a']
- say $S0
-
- $S0 = parent[0]
- say $S0
-
- .local pmc child
- child = parent[1]
- $S0 = child[0]
- say $S0
-
- $S0 = child['foo']
- say $S0
-
- $S0 = parent[1; 'foo']
- say $S0
-
- $S0 = parent['b'; 'foo']
- say $S0
-
- $S0 = parent['b'; 'quux']
- say $S0
-
- $S0 = parent['b'; 2]
- say $S0
- end
-.end
-
-.sub get_frozen_hash
- .local pmc parent
- parent = new ['OrderedHash']
- parent['a'] = 'Foo'
-
- .local pmc child
- child = new ['OrderedHash']
- child['foo'] = 'bar'
- push child, 'baz'
-
- parent['b'] = child
- parent['b'; 'quux'] = 'qaax'
-
- .local string frozen
- frozen = freeze parent
- .return( frozen )
-.end
-CODE
-Foo
-Foo
-bar
-bar
-bar
-bar
-qaax
-qaax
-OUTPUT
-
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
Deleted: branches/pmc_freeze_with_pmcs/t/steps/gen/parrot_include-01.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/t/steps/gen/parrot_include-01.t Fri Jan 29 21:05:08 2010 (r43642)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,74 +0,0 @@
-#! perl
-# Copyright (C) 2007, Parrot Foundation.
-# $Id$
-# gen/parrot_include-01.t
-
-use strict;
-use warnings;
-use Test::More tests => 7;
-use Carp;
-use lib qw( lib );
-use_ok('config::gen::parrot_include');
-use Parrot::Configure::Options qw( process_options );
-use Parrot::Configure::Step::Test;
-use Parrot::Configure::Test qw(
- test_step_constructor_and_description
-);
-
-########## regular ##########
-
-my ($args, $step_list_ref) = process_options(
- {
- argv => [ ],
- mode => q{configure},
- }
-);
-
-my $conf = Parrot::Configure::Step::Test->new;
-$conf->include_config_results( $args );
-
-my $pkg = q{gen::parrot_include};
-$conf->add_steps($pkg);
-$conf->options->set( %{$args} );
-my $step = test_step_constructor_and_description($conf);
-my %missing_files = ();
-foreach my $f ( @{ $step->{source_files} } ) {
- $missing_files{$f}++ unless (-f $f);
-}
-is(keys %missing_files, 0, "No needed source files are missing");
-ok(-d $step->{destdir}, "Directory needed has been located");
-
-pass("Completed all tests in $0");
-
-################### DOCUMENTATION ###################
-
-=head1 NAME
-
-gen/parrot_include-01.t - test gen::parrot_include
-
-=head1 SYNOPSIS
-
- % prove t/steps/gen/parrot_include-01.t
-
-=head1 DESCRIPTION
-
-The files in this directory test functionality used by F<Configure.pl>.
-
-The tests in this file test gen::parrot_include.
-
-=head1 AUTHOR
-
-James E Keenan
-
-=head1 SEE ALSO
-
-config::gen::parrot_include, F<Configure.pl>.
-
-=cut
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Modified: branches/pmc_freeze_with_pmcs/t/tools/ops2pm/00-qualify.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/t/tools/ops2pm/00-qualify.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/t/tools/ops2pm/00-qualify.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -5,7 +5,7 @@
use strict;
use warnings;
-use Test::More tests => 11;
+use Test::More tests => 8;
use FindBin;
use lib ( "$FindBin::Bin/../../../lib", );
use_ok('Parrot::Ops2pm');
@@ -16,37 +16,7 @@
ok( -f "$FindBin::Bin/../../../src/ops/core.ops", "src/ops/core.ops located" );
ok( -f "$FindBin::Bin/../../../src/ops/ops.num", "src/ops/ops.num located" );
ok( -f "$FindBin::Bin/../../../src/ops/ops.skip", "src/ops/ops.skip located" );
-ok(
- !-e "$FindBin::Bin/../../../lib/Parrot/OpLib/core.pm",
- "lib/Parrot/OpLib/core.pm correctly does not yet exist"
-);
-ok(
- !-e "$FindBin::Bin/../../../include/parrot/oplib/ops.h",
- "include/parrot/oplib/ops.h correctly does not yet exist"
-);
-
-my $message = <<END_OF_MESSAGE;
-
-
-The files in this directory test the publicly callable methods and
-subroutines of Parrot::Ops2pm and Parrot::Ops2pm::Auxiliary.
-By doing so, they test the functionality of the ops2pm.pl utility.
-
-Since ops2pm.pl is invoked only once during 'make' -- very near the
-beginning of the build process -- and since its purpose is to create files
-used later in that process, tests of its functionality can give meaningful
-results only if you run them when your file system under the top-level
-Parrot directory is in a 'pre-make' state, i.e., *before* you have run 'perl
-Configure.pl' but *after* you have run 'make'. These tests should pass
-if run at that point in the build process, but if you have already
-executed 'make', some of these tests will necessarily fail. Hence, they
-should *not* be included in the set of tests run by 'make test'.
-In short, these are tests of Parrot::Ops2pm and
-Parrot::Ops2pm::Auxiliary but are *not* tests of Parrot itself.
-
-END_OF_MESSAGE
-pass($message);
pass("Completed all tests in $0");
################### DOCUMENTATION ###################
Modified: branches/pmc_freeze_with_pmcs/t/tools/pbc_merge.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/t/tools/pbc_merge.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/t/tools/pbc_merge.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -25,11 +25,11 @@
use Parrot::Test;
use Parrot::Config;
-my $PARROT = ".$PConfig{slash}$PConfig{test_prog}";
-my $PBCMERGE = ".$PConfig{slash}pbc_merge$PConfig{exe}";
+my $PARROT = ".$PConfig{slash}$PConfig{test_prog}";
+my $PBC_MERGE = ".$PConfig{slash}pbc_merge$PConfig{exe}";
# Only test if we have the PBC merge tool built.
-if ( -e $PBCMERGE ) {
+if ( -e $PBC_MERGE ) {
plan tests => 4;
}
else {
@@ -50,7 +50,7 @@
sub pbc_merge {
my $outname = "t$PConfig{slash}tools$PConfig{slash}" . shift() . ".pbc";
my $inputs = join( ' ', map { "t$PConfig{slash}tools$PConfig{slash}$_.pbc" } @_ );
- system("$PBCMERGE -o $outname $inputs");
+ system("$PBC_MERGE -o $outname $inputs");
}
sub run_pbc {
Deleted: branches/pmc_freeze_with_pmcs/t/tools/pmc2cutils/00-qualify.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/t/tools/pmc2cutils/00-qualify.t Fri Jan 29 21:05:08 2010 (r43642)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,128 +0,0 @@
-#! perl
-# Copyright (C) 2006-2007, Parrot Foundation.
-# $Id$
-# 00-qualify.t
-
-use strict;
-use warnings;
-use Test::More tests => 10;
-use FindBin;
-use lib ( "$FindBin::Bin/../..", "$FindBin::Bin/../../lib", "$FindBin::Bin/../../../lib", );
-use_ok('Parrot::Pmc2c::Pmc2cMain');
-
-ok( -f "$FindBin::Bin/../../../Makefile", "Makefile located" );
-ok( -f "$FindBin::Bin/../../../myconfig", "myconfig located" );
-ok( -f "$FindBin::Bin/../../../lib/Parrot/PMC.pm", "lib/Parrot/PMC.pm located" );
-
-my ( @files, %sfx );
- at files = glob("$FindBin::Bin/../../../src/pmc/*");
-for my $f (@files) {
- if ( $f =~ m/.*\.(.*)$/ ) {
- my $s = $1;
- $sfx{$s}++;
- }
-}
-
-# In src/pmc, we should have only .pmc files (81+ of them), 1 .num file,
-# and >= .h files none of whose names may begin 'pmc_' (lest they be left over
-# from a previous build).
-my $suffixqty = scalar( keys %sfx );
-ok( ( ( 2 <= $suffixqty ) and ( $suffixqty <= 3 ) ), "only 2 or 3 file suffixes in src/pmc" );
-
-ok( $sfx{'num'}, ".num suffix correctly located" );
-ok( $sfx{'pmc'}, ".pmc suffix correctly located" );
-if ( $sfx{'h'} ) {
- my $pmc_leftovers = 0;
- foreach my $f (@files) {
- $pmc_leftovers++ if $f =~ m/^pmc_.*\.h$/;
- }
- is( $pmc_leftovers, 0, "No left-over 'pmc_*.h' files in src/pmc/" );
-}
-else {
- pass("No .h files in src/pmc/");
-}
-
-my $message = <<END_OF_MESSAGE;
-
-
-The files in this directory test the publicly callable methods of
-Parrot::Pmc2c::Pmc2cMain. By doing so, they test the functionality
-of the pmc2c.pl utility.
-
-Since pmc2c.pl is invoked many times during 'make', tests of its
-functionality can give meaningful results only if you run them
-when your file system under the top-level Parrot directory is in
-a 'pre-make' state, i.e., you have run 'perl Configure.pl' but
-have *not* yet run 'make'. These tests should pass if run at
-that point in the build process, but some will necessarily fail
-if 'make' has already been executed. Hence, they should not be
-included in the set of tests run by 'make test'.
-
-In short, these are tests of Parrot::Pmc2c::Pmc2cMain but are *not*
-tests of Parrot itself.
-
-END_OF_MESSAGE
-pass($message);
-pass("Completed all tests in $0");
-
-################### DOCUMENTATION ###################
-
-=head1 NAME
-
-00-qualify.t - Is this the right point to test Parrot build tools?
-
-=head1 SYNOPSIS
-
- % prove t/tools/pmc2cutils/00-qualify.t
-
-=head1 DESCRIPTION
-
-The files in this directory test the publicly callable methods of
-F<lib/Parrot/Pmc2c/Pmc2cMain.pm>. By doing so, they test the functionality
-of the F<pmc2c.pl> utility. That functionality has largely been extracted
-into the methods of F<Pmc2cMain.pm>.
-
-Since F<pmc2c.pl> is invoked during C<make>, tests of its functionality can
-give meaningful results only if they take into consideration the status of the
-file structure at particular points in the build process:
-
-=over 4
-
-=item *
-
-after F<Configure.pl> has run but before F<make> has run;
-
-=item *
-
-at various points while F<make> is running; or
-
-=item *
-
-once F<make> has completed.
-
-=back
-
-The tests in F<00-qualify.t> attempt to confirm that you are at the first of
-these three stages. It tests for the presence or absence of certain files to
-form a judgment as to whether F<Configure.pl> has been run (it should have
-been) and whether F<make> has been run (it should I<not> have been). The
-tests make certain assumptions about what files should be present or not --
-assumptions which may be invalid if the Parrot build process changes in the
-future.
-
-=head1 AUTHOR
-
-James E Keenan
-
-=head1 SEE ALSO
-
-Parrot::Pmc2c, F<pmc2c.pl>.
-
-=cut
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Modified: branches/pmc_freeze_with_pmcs/t/tools/pmc2cutils/04-dump_pmc.t
==============================================================================
--- branches/pmc_freeze_with_pmcs/t/tools/pmc2cutils/04-dump_pmc.t Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/t/tools/pmc2cutils/04-dump_pmc.t Fri Jan 29 21:05:08 2010 (r43643)
@@ -19,7 +19,7 @@
}
unshift @INC, qq{$topdir/lib};
}
-use Test::More tests => 106;
+use Test::More tests => 108;
use File::Basename;
use File::Copy;
use FindBin;
@@ -311,12 +311,12 @@
my $rv = copy( $pmcfile, qq{$temppmcdir/$basename} );
$copycount++ if $rv;
}
- is( $copycount, $pmcfilecount, "all src/pmc/*.pmc files copied to tempdir" );
+ is( $copycount, $pmcfilecount,
+ "all src/pmc/*.pmc files copied to tempdir" );
my @include = ( $tdir, $temppmcdir, @include_orig );
@args = (
qq{$temppmcdir/default.pmc},
-
# qq{$temppmcdir/scalar.pmc},
qq{$temppmcdir/integer.pmc},
);
@@ -332,12 +332,10 @@
$dump_file = $self->dump_vtable("$main::topdir/src/vtable.tbl");
ok( -e $dump_file, "dump_vtable created vtable.dump" );
- eval { $self->dump_pmc(); };
- like(
- $@,
- qr/^cannot find file 'scalar\.dump' in path/,
- "ERROR WAS '$@', path is $temppmcdir"
- );
+ $self->dump_pmc();
+ ok( -f qq{$temppmcdir/default.dump}, "default.dump created as expected" );
+ ok( ! -f qq{$temppmcdir/scalar.dump}, "scalar.dump not created as expected" );
+ ok( -f qq{$temppmcdir/integer.dump}, "integer.dump created as expected" );
ok( chdir $cwd, "changed back to original directory" );
}
@@ -587,10 +585,6 @@
=head1 SEE ALSO
Parrot::Pmc2c, F<pmc2c.pl>.
- "array.dump correctly overwritten");
-
- ok(chdir $cwd, "changed back to original directory");
-}
pass("Completed all tests in $0");
Modified: branches/pmc_freeze_with_pmcs/t/tools/pmc2cutils/README
==============================================================================
--- branches/pmc_freeze_with_pmcs/t/tools/pmc2cutils/README Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/t/tools/pmc2cutils/README Fri Jan 29 21:05:08 2010 (r43643)
@@ -4,18 +4,17 @@
This directory contains test code for Parrot::Pmc2c::Pmc2cMain, a Perl5
module whose publicly callable methods and other subroutines supply
-functionality for Parrot build tool 'pmc2c.pl'.
-
-Since 'pmc2c.pl' is invoked many times during 'make', tests of its
-functionality can give meaningful results only if you run them
-when your file system beneath the top-level Parrot directory is in
-a 'pre-make' state, i.e., you have run 'perl Configure.pl' but
-have *not* yet run 'make'. These tests should pass if run at
-that point in the build process, but some will necessarily fail
-if 'make' has already been executed. Hence, they should not be
-included in the set of tests run by 'make test'.
-
-In short, these are tests of Parrot::Pmc2c::Pmc2cMain but are *not*
-tests of Parrot itself.
+functionality to Parrot build tool 'tools/build/pmc2c.pl'.
+'pmc2c.pl' is invoked many times during 'make', so it is important that
+Parrot developers be able to understand and, if necessary, refactor its
+component parts. The tests in this directory serve to illustrate those
+parts. They should be run by any developer refactoring 'pmc2c.pl' or
+the many modules underlying that program.
+However, since the processes they test precede the creation of the
+'parrot' executable, failures of these tests do not necessarily indicate
+problems with that executable. For that reason, these tests are not
+included in the 'make test' or 'make fulltest' targets. They can,
+however, be run as part of 'make buildtools_tests' and developers are
+encouraged to do so.
Copied: branches/pmc_freeze_with_pmcs/tools/build/dynpmc.pl (from r43642, trunk/tools/build/dynpmc.pl)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/pmc_freeze_with_pmcs/tools/build/dynpmc.pl Fri Jan 29 21:05:08 2010 (r43643, copy of r43642, trunk/tools/build/dynpmc.pl)
@@ -0,0 +1,292 @@
+# Copyright (C) 2001-2009, Parrot Foundation.
+# $Id$
+
+=head1 NAME
+
+tools/build/dynpmc.pl - Build script for dynamic PMCs
+
+=head1 DESCRIPTION
+
+This script is used for building dynamic PMCs. It is deprecated,
+L<http://trac.parrot.org/parrot/ticket/338>.
+
+=cut
+
+use strict;
+use warnings;
+use FindBin;
+use lib "$FindBin::Bin/../..";
+use lib "$FindBin::Bin/../../lib";
+
+use File::Copy qw(copy);
+use Storable;
+
+use Parrot::Config qw/%PConfig/;
+
+# Config stuff
+our $CC = $PConfig{cc} . ' -c';
+our $LD = $PConfig{ld};
+our $LDFLAGS = $PConfig{ldflags} . ' ' . $PConfig{ld_debug} . ' ' . $PConfig{rpath_blib};
+our $LD_LOAD_FLAGS = $PConfig{ld_load_flags};
+our $LOAD_EXT = $PConfig{load_ext};
+our $O = $PConfig{o};
+our $CFLAGS = $PConfig{ccflags} . ' '. $PConfig{cc_shared} . ' ' . $PConfig{cc_debug} . ' ' . $PConfig{ccwarn} . ' ' . $PConfig{cc_hasjit} . ' ' . $PConfig{cg_flag} . ' ' . $PConfig{gc_flag};
+our $BUILD_DIR = $PConfig{build_dir};
+
+our $LIBPARROT = q[];
+if ($PConfig{parrot_is_shared}) {
+ $LIBPARROT = $PConfig{libparrot_ldflags};
+}
+
+# PMC2C Config
+our $SLASH = $PConfig{slash};
+our $PMC2C = "$^X \"" . join($SLASH, qw/tools build pmc2c.pl/) . '"';
+
+# Actual commands
+sub compile_cmd {
+ my ($target, $source) = @_;
+
+ my $dynpmc_include = '';
+ if (defined $ENV{DYNPMC_INCLUDE} )
+ {
+ $dynpmc_include = $ENV{DYNPMC_INCLUDE};
+ $dynpmc_include =~ s/,/" -I"/g;
+ $dynpmc_include = '-I"' . $dynpmc_include . '" ';
+ }
+
+ return
+ $CC . ' ' .
+ $PConfig{cc_o_out} . $target . ' ' .
+ '-I"' . $BUILD_DIR . $SLASH . 'include' .
+ "$dynpmc_include $CFLAGS $source";
+};
+
+sub partial_link_cmd {
+ my ($target, $libs, $sources) = @_;
+
+ my $liblist;
+ if ($^O =~ /mswin32/i) {
+ # Need to put various libraries in the link line.
+ if ($CC =~ /gcc/i) {
+ $liblist = join( ' ', map { "-l$_" } keys %$libs );
+ $liblist =~ s/-lgdbm/-llibgdbm/i;
+ }
+ else {
+ $liblist = join( ' ', map { "$_.lib" } keys %$libs );
+ }
+ my $extraLibs = $PConfig{libs} . ' ' . $PConfig{icu_shared};
+ $extraLibs =~ s/blib/..\\blib/g;
+ $extraLibs =~ s/\Q$(A)\E/.lib/g;
+ $liblist .= ' ' . $extraLibs;
+
+ # Also note that we may need to look in the Parrot blib directory.
+ if ($CC =~ /gcc/i) {
+ $liblist .= qq{ -Wl,-L "$BUILD_DIR/blib/lib"};
+ }
+ else {
+ $liblist .= qq{ /LIBPATH:"$BUILD_DIR/blib/lib"};
+ }
+ }
+ else {
+ $liblist = join( ' ', map { "-l$_" } keys %$libs );
+ $liblist .= ' ' . $PConfig{libs} . ' ' . $PConfig{icu_shared};
+ }
+
+ if (defined $ENV{DYNPMC_LINK}) {
+ push @{$sources}, split /,/, $ENV{DYNPMC_LINK};
+ }
+
+ return
+ $LD . ' ' . $PConfig{ld_out} .
+ $target . ' ' .
+ join(' ', map {"\"$_\""} @$sources) .
+ " $liblist $LDFLAGS $LD_LOAD_FLAGS $LIBPARROT";
+}
+
+our $NOW = time();
+
+################### MAIN PROGRAM ################
+
+my ($mode, @pmcs) = @ARGV;
+
+if ($mode eq 'generate') {
+ # Convert X.pmc -> X.dump and X.c and also create any lib-GROUP.c files
+
+ generate_dump($_) foreach (@pmcs);
+ generate_c($_) foreach (@pmcs);
+
+ my ($group_files, $group_libs, $pmc_group, $pmc_libs) =
+ gather_groups_and_libs(@pmcs);
+
+ while (my ($group, $pmcs) = each %$group_files) {
+ my @pmcfiles = map { "$_.pmc" } @$pmcs;
+ if (needs_build("$group.c", @pmcfiles)) {
+ run("$PMC2C --library $group --c " . join(" ", at pmcfiles))
+ or die "pmc2c library creation failed ($?)\n";
+ }
+ }
+}
+elsif ($mode eq 'compile') {
+ my ($group_files, $group_libs, $pmc_group, $pmc_libs) =
+ gather_groups_and_libs(@pmcs);
+
+ # Convert X.c -> X.o for all X.c
+ compile($_) foreach (@pmcs);
+
+ # lib-GROUP.c
+ for my $group (keys %$group_files) {
+ compile("$group", "lib-$group")
+ or die "compile $group.c failed ($?)\n";
+ }
+}
+elsif ($mode eq 'linklibs') {
+ my ($group_files, $group_libs, $pmc_group, $pmc_libs) =
+ gather_groups_and_libs(@pmcs);
+
+ # Convert lib-GROUP.so + A.so + B.so ... -> GROUP.so
+ while (my ($group, $pmcs) = each %$group_files) {
+ partial_link($group, $group_libs->{$group}, [ "lib-$group", @$pmcs ] )
+ or die "partial link of $group failed ($?)\n";
+ }
+
+ # Link non-grouped PMCs individually
+ my @ungrouped_pmcs = grep { ! exists $pmc_group->{$_} } @pmcs;
+ partial_link($_, $pmc_libs->{$_}, [ $_ ] ) foreach (@ungrouped_pmcs);
+}
+elsif ($mode eq 'copy') {
+ # Copy *.so -> destination, where destination is the first
+ # argument, given as --destination=DIRECTORY
+ shift(@pmcs) =~ /--destination=(.*)/
+ or die "copy command requires destination";
+ my $dest = $1;
+
+ my ($group_files, $group_libs, $pmc_group, $pmc_libs) =
+ gather_groups_and_libs(@pmcs);
+ my @ungrouped_pmcs = grep { ! exists $pmc_group->{$_} } @pmcs;
+
+ my (@list_to_process) = (@ungrouped_pmcs, keys %$group_files);
+
+ die "nothing found to copy" unless @list_to_process;
+
+ foreach (@list_to_process) {
+ copy("$_$LOAD_EXT", $dest) or die "Copy $_$LOAD_EXT failed ($?)\n";
+
+ # Execute permissions on libraries is especially important on
+ # some platforms
+ if ($^O eq 'hpux' or $^O eq 'cygwin') {
+ chmod 0755, "$dest at slash@$_$LOAD_EXT";
+ }
+
+ }
+}
+else {
+ die "invalid command '$mode'\nmust be one of generate, compile, linklibs, or copy\n";
+}
+
+sub run {
+ print join(" ", @_), "\n";
+
+ return system(@_) == 0;
+}
+
+sub gather_groups_and_libs {
+ my @pmcs = @_;
+
+ my ( %group_files, %group_libs, %pmc_group, %pmc_libs );
+ for my $pmc (@pmcs) {
+ our $class = retrieve("$pmc.dump");
+
+ # there can be many libs
+ my %libs = %{ $class->{flags}{lib} || {} };
+ $pmc_libs{$pmc} = \%libs;
+
+ # There should be at most a single group
+ my $group = $class->{flags}{group}
+ or next;
+ $pmc_group{$pmc} = $group;
+ push @{ $group_files{$group} }, $pmc;
+ $group_libs{$group} ||= {};
+ foreach my $lib ( keys %libs ) {
+ $group_libs{$group}->{$lib} = 1;
+ }
+ }
+
+ return (\%group_files, \%group_libs, \%pmc_group, \%pmc_libs);
+}
+
+sub modtime {
+ my $ago = (-M shift);
+
+ if (defined $ago) {
+ return $NOW - $ago;
+ }
+ else {
+ return;
+ }
+}
+
+sub needs_build {
+ my ($target, @sources) = @_;
+
+ my $target_mod = modtime($target)
+ or return 1;
+ for my $source (@sources) {
+ return 1 if modtime($source) > $target_mod;
+ }
+
+ return 0;
+}
+
+sub generate_dump {
+ my ($pmc) = @_;
+
+ if (needs_build("$pmc.dump", "$pmc.pmc")) {
+ run("$PMC2C --dump $pmc.pmc")
+ or die "pmc2c dump failed ($?)\n";
+ }
+
+ return;
+}
+
+sub generate_c {
+ my ($pmc) = @_;
+
+ if (needs_build("$pmc.c", "$pmc.pmc")) {
+ run("$PMC2C --c $pmc.pmc")
+ or die "pmc2c code generation failed ($?)\n";
+ }
+
+ return;
+}
+
+sub compile {
+ my ($src_stem, $dest_stem) = @_;
+
+ $dest_stem ||= $src_stem;
+ if (needs_build("$dest_stem$O", "$src_stem.c")) {
+ run(compile_cmd("$dest_stem$O", "$src_stem.c"))
+ or die "compile $src_stem.c failed ($?)\n";
+ }
+ return 1;
+}
+
+sub partial_link {
+ my ($group, $libs, $stems) = @_;
+
+ my @sources = map { "$_$O" } @$stems;
+ if (needs_build("$group$LOAD_EXT", @sources)) {
+ return run(partial_link_cmd("$group$LOAD_EXT", $libs, \@sources))
+ or die "partial link $group$LOAD_EXT failed ($?)\n";
+ }
+ else {
+ return 1;
+ }
+}
+
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
Copied: branches/pmc_freeze_with_pmcs/tools/build/h2inc.pl (from r43642, trunk/tools/build/h2inc.pl)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/pmc_freeze_with_pmcs/tools/build/h2inc.pl Fri Jan 29 21:05:08 2010 (r43643, copy of r43642, trunk/tools/build/h2inc.pl)
@@ -0,0 +1,55 @@
+# Copyright (C) 2009, Parrot Foundation.
+# $Id$
+
+=head1 NAME
+
+tools/build/h2inc.pl
+
+=head1 DESCRIPTION
+
+Generate C<.pasm> and C<.pm> files with constants based on C<.h> files.
+
+Invoked by F<make>. Imports functions from Parrot::H2inc.
+
+=head1 USAGE
+
+ perl tools/build/h2inc.pl <input_file> <output_file>
+
+=cut
+
+use strict;
+use warnings;
+use lib qw( lib );
+use Parrot::H2inc qw(
+ parse_file
+ perform_directive
+ generate_text
+ print_generated_file
+);
+
+my $usage = "Usage: $0 <input_file> <output_file>\n";
+
+die $usage unless @ARGV == 2;
+my ($in_file, $out_file) = @ARGV;
+
+my $directive = parse_file($in_file, $out_file);
+die "invalid output file: '$out_file' for input '$in_file'" unless $directive;
+
+my $defs_ref = perform_directive($directive);
+
+my $generated_text = generate_text($directive, $defs_ref);
+
+print_generated_file( {
+ in => $in_file,
+ out => $out_file,
+ script => $0,
+ gen => $generated_text,
+} );
+
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
Modified: branches/pmc_freeze_with_pmcs/tools/build/nativecall.pl
==============================================================================
--- branches/pmc_freeze_with_pmcs/tools/build/nativecall.pl Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/tools/build/nativecall.pl Fri Jan 29 21:05:08 2010 (r43643)
@@ -41,7 +41,7 @@
my %sig_table = (
p => {
as_proto => "void *",
- other_decl => "PMC * final_destination = PMCNULL;",
+ final_dest => "PMC * final_destination = PMCNULL;",
sig_char => "P",
ret_assign => "if (return_data != NULL) {\n" .
" final_destination = pmc_new(interp, enum_class_UnManagedStruct);\n" .
@@ -49,14 +49,14 @@
" }\n" .
" Parrot_pcc_fill_returns_from_c_args(interp, call_object, \"P\", final_destination);",
},
- i => { as_proto => "int", sig_char => "I" },
- l => { as_proto => "long", sig_char => "I" },
- c => { as_proto => "char", sig_char => "I" },
- s => { as_proto => "short", sig_char => "I" },
- f => { as_proto => "float", sig_char => "N" },
- d => { as_proto => "double", sig_char => "N" },
+ i => { as_proto => "int", sig_char => "I", return_type => "INTVAL" },
+ l => { as_proto => "long", sig_char => "I", return_type => "INTVAL" },
+ c => { as_proto => "char", sig_char => "I", return_type => "INTVAL" },
+ s => { as_proto => "short", sig_char => "I", return_type => "INTVAL" },
+ f => { as_proto => "float", sig_char => "N", return_type => "FLOATVAL" },
+ d => { as_proto => "double", sig_char => "N", return_type => "FLOATVAL" },
t => { as_proto => "char *",
- other_decl => "STRING *final_destination;",
+ final_dest => "STRING *final_destination;",
ret_assign => "final_destination = Parrot_str_new(interp, return_data, 0);\n Parrot_pcc_fill_returns_from_c_args(interp, call_object, \"S\", final_destination);",
sig_char => "S" },
v => { as_proto => "void",
@@ -152,7 +152,7 @@
$sig, $ret,
$args, [@arg],
$ret_sig->{as_return}, $ret_sig->{return_type_decl},
- $ret_sig->{func_call_assign}, $ret_sig->{other_decl},
+ $ret_sig->{func_call_assign}, $ret_sig->{final_dest},
$ret_sig->{ret_assign}, \@temps,
\@fill_params, \@extra_preamble, \@extra_postamble,
\@put_pointer_nci_too,
@@ -163,7 +163,7 @@
$sig, $ret,
$args, [@arg],
$ret_sig->{as_return}, $ret_sig->{return_type_decl},
- $ret_sig->{func_call_assign}, $ret_sig->{other_decl},
+ $ret_sig->{func_call_assign}, $ret_sig->{final_dest},
$ret_sig->{ret_assign}, \@temps,
\@fill_params, \@extra_preamble, \@extra_postamble,
\@put_pointer,
@@ -258,6 +258,12 @@
local $_ = $argtype;
my $temp_num = ${$temp_cnt_ref}++;
+ /[ilcsfdINSOP\@]/ && do {
+ my $ret_type = $sig_table{$_}{return_type};
+ push @{$temps_ref}, "$ret_type t_$temp_num;";
+ push @{$fill_params_ref}, "&t_$temp_num";
+ return "t_$temp_num";
+ };
/p/ && do {
push @{$temps_ref}, "PMC *t_$temp_num;";
push @{$fill_params_ref}, "&t_$temp_num";
@@ -271,28 +277,6 @@
push @{$extra_postamble_ref}, "VTABLE_set_pointer(interp, t_$temp_num, v_$temp_num);";
return "&v_$temp_num";
};
- /[INS]/ && do {
- my $ret_type = $sig_table{$_}{return_type};
- push @{$temps_ref}, "$ret_type t_$temp_num;";
- push @{$fill_params_ref}, "&t_$temp_num";
- return "t_$temp_num";
- };
- /[ilcs]/ && do {
- my $ret_type = $sig_table{$_}{return_type};
- push @{$temps_ref}, "$ret_type t_$temp_num;";
- push @{$temps_ref}, "INTVAL ti_$temp_num;";
- push @{$fill_params_ref}, "&ti_$temp_num";
- push @{$extra_preamble_ref}, "t_$temp_num = ($ret_type)ti_$temp_num;";
- return "t_$temp_num";
- };
- /[fd]/ && do {
- my $ret_type = $sig_table{$_}{return_type};
- push @{$temps_ref}, "$ret_type t_$temp_num;";
- push @{$temps_ref}, "FLOATVAL tf_$temp_num;";
- push @{$fill_params_ref}, "&tf_$temp_num";
- push @{$extra_preamble_ref}, "t_$temp_num = ($ret_type)tf_$temp_num;";
- return "t_$temp_num";
- };
/[234]/ && do {
my $ret_type = $sig_table{$_}{return_type};
push @{$temps_ref}, "PMC *t_$temp_num;";
@@ -329,27 +313,22 @@
/J/ && do {
return "interp";
};
- /[OP\@]/ && do {
- push @{$temps_ref}, "PMC *t_$temp_num;";
- push @{$fill_params_ref}, "&t_$temp_num";
- return "t_$temp_num";
- };
return;
}
sub create_function {
my (
$sig, $return, $params, $args,
- $ret_type, $ret_type_decl, $return_assign, $other_decl,
+ $ret_type, $ret_type_decl, $return_assign, $final_dest,
$final_assign, $temps_ref, $fill_params_ref, $extra_preamble_ref,
$extra_postamble_ref, $put_pointer_ref,
) = @_;
my $func = '';
- $other_decl ||= "";
+ $final_dest ||= "";
- $other_decl .= join( "\n ", @{$temps_ref} );
+ my $other_decl .= join( "\n ", $final_dest, @{$temps_ref} );
my $call_object_decl = <<"CALLOBJECT";
PMC *ctx = CURRENT_CONTEXT(interp);
PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
@@ -454,25 +433,15 @@
PMC *b;
PMC *iglobals;
PMC *temp_pmc;
- UINTVAL signature_len;
PMC *HashPointer = NULL;
/* And in here is the platform-independent way. Which is to say
"here there be hacks" */
- signature_len = Parrot_str_byte_length(interp, signature);
-
-#ifndef CAN_BUILD_CALL_FRAMES
- if (0 == signature_len)
- return F2DPTR(pcf_v_);
-#endif
- /* remove deprecated void argument 'v' character */
- if (2 == signature_len && 'v' == Parrot_str_indexed(interp, signature, 1)) {
- Parrot_warn(interp, PARROT_WARNINGS_ALL_FLAG, "function signature argument character 'v' ignored");
- Parrot_str_chopn_inplace(interp, signature, 1);
- signature_len = Parrot_str_byte_length(interp, signature);
- }
+ /* fixup empty signatures */
+ if (STRING_IS_EMPTY(signature))
+ signature = CONST_STRING(interp, "v");
iglobals = interp->iglobals;
Modified: branches/pmc_freeze_with_pmcs/tools/dev/cc_flags.pl
==============================================================================
--- branches/pmc_freeze_with_pmcs/tools/dev/cc_flags.pl Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/tools/dev/cc_flags.pl Fri Jan 29 21:05:08 2010 (r43643)
@@ -30,14 +30,8 @@
use strict;
use warnings;
-my $return_only;
my $verbose;
-if ($ARGV[0] eq '--return-only') {
- $return_only = 1;
- shift;
-}
-
if ($ARGV[0] eq '-v') {
$verbose = 1;
shift;
@@ -140,11 +134,6 @@
}
}
-if ($return_only) {
- print join ' ', @ARGV;
- exit;
-}
-
if ($verbose) {
print join ' ', @ARGV;
}
Modified: branches/pmc_freeze_with_pmcs/tools/dev/checkdepend.pl
==============================================================================
--- branches/pmc_freeze_with_pmcs/tools/dev/checkdepend.pl Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/tools/dev/checkdepend.pl Fri Jan 29 21:05:08 2010 (r43643)
@@ -18,8 +18,13 @@
=head1 DESCRIPTION
-A braindead script to check that every F<.c> file has makefile deps
-on its includes.
+A script to check that every file has makefile deps on its includes.
+
+ checkdepend.pl [--dump]
+
+If called with C<--dump>, no tests are run, and the pre-processed makefile
+is dumped (in lieu of having C<cc>'s C<-E> for C<make>. This option is only
+intended to be used by developers examining the build process.
=head1 REQUIREMENTS
@@ -27,16 +32,20 @@
them. Ack is used to find the files. We are not currently requiring ack
for development, so this is an optional test.
+=head1 BUGS
+
+See L<http://trac.parrot.org/parrot/wiki/BuildTaskList>
+
=cut
die 'no Makefile found; This tool requires a full build for analysis.'
unless -e 'Makefile';
-my $files = `ack -fa {src,compilers,include} | grep '\\.[ch]\$'`;
+my @incfiles = split /\n/, `ack -fa src compilers include | ack '\\.(c|h|pir)\$'`;
our %deps;
-foreach my $file (sort split /\n/, $files) {
+foreach my $file (sort grep /\.[hc]$/, @incfiles) {
# For now, skip any files that have generated dependencies
next if $file =~ m{src/(ops|dynoplibs|dynpmc|pmc)/};
next if $file =~ m{src/string/(charset|encoding)/};
@@ -44,11 +53,11 @@
open my $fh, '<', $file;
my $guts;
{
- local undef $/;
+ local $/;
$guts = <$fh>;
}
- # Ingore anything inside a c-style comment.
+ # Ignore anything inside a c-style comment.
$guts =~ s{\Q/*\E.*?\Q*/}{}gm;
my @includes = $guts =~ m/#include "(.*)"/g;
@@ -59,14 +68,14 @@
foreach my $include (@includes) {
# same dir as file?
my $file_dir = (File::Spec->splitpath($file))[1];
- my $make_dep = collapse_path(File::Spec->catfile($file_dir,$include));
+ my $make_dep = collapse_path(File::Spec->catfile($file_dir, $include));
if (defined($make_dep) && -f $make_dep) {
push @{$deps{$file}}, $make_dep;
next;
}
# global 'include' dir?
- $make_dep = collapse_path(File::Spec->catfile('include',$include));
+ $make_dep = collapse_path(File::Spec->catfile('include', $include));
if (defined($make_dep) && -f $make_dep) {
push @{$deps{$file}}, $make_dep;
next;
@@ -76,75 +85,191 @@
}
}
-plan('no_plan');
+foreach my $file (sort grep /\.pir$/, @incfiles) {
+ open my $fh, '<', $file;
+ my $guts;
+ {
+ local $/;
+ $guts = <$fh>;
+ }
+
+ # Ignore anything inside a # - comment.
+ $guts =~ s{^#.*$}{}gm;
+ # Ignore anything inside pod.
+ $guts =~ s{^=.*^=cut$}{}gsm;
+ # Ignore anything inside strings that are assigned to a variable.
+ # (Avoid clobbering the strings used in .include 'foo.pir', etc.)
+ $guts =~ s{=\s*'[^']*'\s*$}{}gm;
+ $guts =~ s{=\s*"(?:[^"\\]|\\.)*"\s*$}{}gm;
+ # TT #1418: also, heredocs (wheeeee!)
+
+ my @includes;
+ while ($guts =~ m/(?:\.include|\bload_bytecode)\s+(["'])(.*)\1/g) {
+ push @includes, $2;
+ }
+
+ # Canonicalize each of these includes.
+
+ $deps{$file} = [ ];
+ foreach my $include (@includes) {
+ # same dir as file?
+ my $file_dir = (File::Spec->splitpath($file))[1];
+ my $make_dep = collapse_path(File::Spec->catfile($file_dir, $include));
+ if (defined($make_dep) && -f $make_dep) {
+ push @{$deps{$file}}, $make_dep;
+ next;
+ }
+
+ # global 'runtime' dir?
+ $make_dep = collapse_path(File::Spec->catfile('runtime/parrot/include', $include));
+ if (defined($make_dep) && -f $make_dep) {
+ push @{$deps{$file}}, $make_dep;
+ next;
+ }
+ $make_dep = collapse_path(File::Spec->catfile('runtime/parrot/library', $include));
+ if (defined($make_dep) && -f $make_dep) {
+ push @{$deps{$file}}, $make_dep;
+ next;
+ }
-open my $mf, '<', "Makefile";
-my $rules;
-{
- local undef $/;
- $rules = <$mf>;
+ # relative to top level?
+ $make_dep = collapse_path(File::Spec->catfile($include));
+ if (defined($make_dep) && -f $make_dep) {
+ push @{$deps{$file}}, $make_dep;
+ next;
+ }
+
+ diag "couldn't find $include, included from $file";
+ }
}
-# convert all \-newline continuations into single lines for ease of processing.
-$rules =~ s/\\\n//g;
+sub get_rules {
+
+ my ($filename, $rules) = @_;
+
+ open my $mf, '<', "$filename";
+ my $global_line_num = @$rules;
+ my $file_line_num = 1;
+ my $escape_start = 1;
+
+ foreach (<$mf>) {
+ my $line = $_;
+ chomp $line;
+ if ($_ =~ /^include\s+(.*)$/m) {
+ get_rules($1, $rules);
+ $global_line_num = @$rules;
+ $file_line_num++;
+ }
+ else {
+ $rules->[$global_line_num] =
+ {
+ filename => $filename,
+ line => $line,
+ line_num => $file_line_num,
+ };
+
+ # Convert all \-newline continuations into single lines for ease of
+ # processing. Leave blank lines to keep line numbers accurate.
+ if (exists $rules->[$escape_start]{line} &&
+ $rules->[$escape_start]{line} !~ /\\$/ &&
+ $rules->[$global_line_num]{line} =~ /\\$/) {
+
+ $escape_start = $global_line_num;
+ }
-# replace all _DIR variables with their expansions.
-while ($rules =~ s/^([A-Z_]+_DIR)\s*:?=\s*(\S*)$//m) {
- my ($var,$val) = ($1, $2);
- $rules =~ s/\$\($var\)/$val/g;
+ if ($rules->[$escape_start]{line} && $rules->[$escape_start]{line} =~ /\\$/ &&
+ $escape_start != $global_line_num) {
+
+ $rules->[$escape_start]{line} =~ s/\\$//;
+ $rules->[$escape_start]{line} .= $rules->[$global_line_num]{line};
+ $rules->[$global_line_num]{line} = '';
+ }
+
+ $file_line_num++;
+ $global_line_num++;
+ }
+ }
+ close $mf;
}
-# expand PARROT_H_HEADERS
-$rules =~ m/^PARROT_H_HEADERS\s*:?=\s*(.*)$/m;
-my $phh = $1;
+our $rules = [];
+get_rules('Makefile', $rules);
-$rules =~ s/\Q$(PARROT_H_HEADERS)/$phh/g;
+#expand all variables
+our %vars;
+foreach (@$rules) {
+ #expand any known variables
+ while ($_->{line} =~ /\$\(([A-Z_]+)\)/) {
+ my $var_name = $1;
+ if (exists $vars{$var_name}) {
+ $_->{line} =~ s/\$\($var_name\)/$vars{$var_name}/g;
+ }
+ else {
+ $_->{line} =~ s/\$\($var_name\)//g;
+ }
+ }
-foreach my $header (sort grep {/\.h$/} (keys %deps)) {
- # static headers shouldn't depend on anything else.
- if ($rules =~ /^$header\s*:\s*(.*)\s*$/m) {
- #is("", $1, "$header should have no dependencies");
+ #store any new definitions
+ if ($_->{line} =~ /^(\w+)\s+=\s+(.*)$/) {
+ $vars{$1} = $2;
}
}
+if (@ARGV && $ARGV[0] eq '--dump') {
+ print "$_->{line}\n" for (@$rules);
+ exit 0;
+}
+
+my $test_count = grep {/\.(c|pir)$/} (keys %deps);
+
+plan( tests => $test_count );
+
+#foreach my $header (sort grep {/\.h$/} (keys %deps)) {
+# # static headers shouldn't depend on anything else.
+# if ($rules =~ /^$header\s*:\s*(.*)\s*$/m) {
+# #is("", $1, "$header should have no dependencies");
+# }
+#}
+
my @files = keys %deps;
@files = @ARGV if @ARGV;
-foreach my $file (sort grep {/\.c$/} @files) {
- my $rule = $file;
- $rule =~ s/\.c$//;
-
- $rules =~ /^$rule\Q$(O)\E\s*:\s*(.*)\s*$/m;
- my $declared = $1;
-
- my $failed = 0;
- if (!defined($declared)) {
- $failed = 1;
- is("", join(' ', (get_deps($file))), "$file has no dependencies");
- next;
- }
- else
- {
- $declared =~ s/\s+/ /g;
- foreach my $inc (sort (get_deps($file))) {
- next if $declared =~ s/\b\Q$inc\E\b//;
+check_files($rules, \@files, '.c', $vars{O});
+check_files($rules, \@files, '.pir', '.pbc');
+
+sub check_files {
- is($declared, $inc, "$file is missing a dependency.");
- $failed = 1;
+ my ($rules, $possible_files, $src_ext, $obj_ext) = @_;
+ foreach my $file (sort grep {/$src_ext$/} @$possible_files) {
+ my ($active_makefile, $active_line_num);
+ my $rule = $file;
+ $rule =~ s/$src_ext$//;
+
+ #find the applicable rule for this file
+ my $rule_deps = '';
+ for (@$rules) {
+ if ($_->{line} =~ /^$rule$obj_ext\s*:\s*(.*)\s*$/) {
+ $rule_deps = $1;
+ $active_makefile = $_->{filename};
+ $active_line_num = $_->{line_num};
+ }
+ last if $rule_deps;
}
- }
- $declared =~ s/^\s+//;
- $declared =~ s/\s+$//;
- $declared =~ s/\s+/ /g;
- if ($declared ne "") {
- is($declared, '', "$file has extra dependencies.");
- }
- elsif (!$failed) {
- pass($file);
+
+ my $extra_info = "(no rule found for this file)";
+ if ($rule_deps) {
+ $extra_info = "($active_makefile: line $active_line_num)";
+ }
+
+ $rule_deps = join ' ', sort split /\s+/, $rule_deps;
+ my $expected_deps = join ' ', sort (get_deps($file));
+
+ is($rule_deps, $expected_deps, "$file has correct dependencies $extra_info.");
}
}
+
sub collapse_path {
my $path = shift;
return $path unless defined $path;
Modified: branches/pmc_freeze_with_pmcs/tools/dev/fetch_languages.pl
==============================================================================
--- branches/pmc_freeze_with_pmcs/tools/dev/fetch_languages.pl Fri Jan 29 16:51:28 2010 (r43642)
+++ branches/pmc_freeze_with_pmcs/tools/dev/fetch_languages.pl Fri Jan 29 21:05:08 2010 (r43643)
@@ -312,7 +312,7 @@
},
{
- name => 'winexd',
+ name => 'winxed',
scm => 'SVN',
repository => 'http://winxed.googlecode.com/svn/trunk/'
},
More information about the parrot-commits
mailing list