[svn:parrot] r44294 - in branches/boehm_gc_2: . compilers/data_json compilers/imcc compilers/pirc/src config/auto config/gen config/gen/call_list config/gen/crypto config/gen/makefiles config/gen/platform config/gen/platform/generic config/gen/platform/openbsd docs docs/pdds docs/pdds/draft docs/project examples/c examples/embed examples/nci examples/pir examples/sdl ext/nqp-rx/src/stage0 include/parrot include/parrot/atomic lib/Parrot/Configure lib/Parrot/Configure/Step lib/Parrot/Docs/Section lib/Parrot/Ops2c lib/Parrot/Pmc2c runtime/parrot/include runtime/parrot/library runtime/parrot/library/Configure runtime/parrot/library/Math runtime/parrot/library/Math/Random runtime/parrot/library/Test src src/atomic src/call src/dynpmc src/gc src/interp src/io src/nci src/ops src/packfile src/pmc src/runcore src/string src/string/encoding t/codingstd t/library t/native_pbc t/op t/pmc t/run t/src t/steps/gen tools/build tools/dev tools/util
bacek at svn.parrot.org
bacek at svn.parrot.org
Mon Feb 22 12:30:24 UTC 2010
Author: bacek
Date: Mon Feb 22 12:30:02 2010
New Revision: 44294
URL: https://trac.parrot.org/parrot/changeset/44294
Log:
Merge branch 'master' into boehm2
Conflicts:
compilers/imcc/imcparser.c
compilers/imcc/imcparser.h
src/gc/api.c
src/gc/gc_inf.c
src/main.c
t/op/string_mem.t
Added:
branches/boehm_gc_2/src/nci/
branches/boehm_gc_2/src/nci/api.c
branches/boehm_gc_2/src/nci/core_thunks.c
branches/boehm_gc_2/src/nci/core_thunks.nci
branches/boehm_gc_2/src/nci/extra_thunks.c
branches/boehm_gc_2/src/nci/extra_thunks.nci
- copied, changed from r44275, branches/boehm_gc_2/config/gen/call_list/misc.in
branches/boehm_gc_2/src/pmc/imageiosize.pmc
branches/boehm_gc_2/src/pmc/opcode.pmc
branches/boehm_gc_2/src/pmc/oplib.pmc
branches/boehm_gc_2/t/op/errorson.t
branches/boehm_gc_2/t/op/gc-leaky.t
branches/boehm_gc_2/t/pmc/imageio.t
branches/boehm_gc_2/t/pmc/imageiosize.t
branches/boehm_gc_2/t/pmc/opcode.t
branches/boehm_gc_2/t/pmc/oplib.t
branches/boehm_gc_2/tools/dev/mk_nci_thunks.pl
branches/boehm_gc_2/tools/dev/nci_thunk_gen.pir
- copied, changed from r44275, branches/boehm_gc_2/tools/build/nativecall.pir
Deleted:
branches/boehm_gc_2/config/gen/call_list.pm
branches/boehm_gc_2/config/gen/call_list/core.in
branches/boehm_gc_2/config/gen/call_list/misc.in
branches/boehm_gc_2/runtime/parrot/library/Math/Random/mt19937ar.pir
branches/boehm_gc_2/t/library/mt19937ar.t
branches/boehm_gc_2/t/library/mt19937ar.txt
branches/boehm_gc_2/t/op/bitwise.t
branches/boehm_gc_2/t/steps/gen/call_list-01.t
branches/boehm_gc_2/tools/build/nativecall.pir
branches/boehm_gc_2/tools/build/nativecall.pl
Modified:
branches/boehm_gc_2/CREDITS
branches/boehm_gc_2/ChangeLog
branches/boehm_gc_2/Configure.pl
branches/boehm_gc_2/DEPRECATED.pod
branches/boehm_gc_2/MANIFEST
branches/boehm_gc_2/MANIFEST.SKIP
branches/boehm_gc_2/MANIFEST.generated
branches/boehm_gc_2/META.yml
branches/boehm_gc_2/NEWS
branches/boehm_gc_2/PBC_COMPAT
branches/boehm_gc_2/PLATFORMS
branches/boehm_gc_2/README
branches/boehm_gc_2/VERSION
branches/boehm_gc_2/compilers/data_json/Defines.mak
branches/boehm_gc_2/compilers/data_json/Rules.mak
branches/boehm_gc_2/compilers/imcc/cfg.c
branches/boehm_gc_2/compilers/imcc/cfg.h
branches/boehm_gc_2/compilers/imcc/imc.c
branches/boehm_gc_2/compilers/imcc/imcc.l
branches/boehm_gc_2/compilers/imcc/imcc.y
branches/boehm_gc_2/compilers/imcc/imclexer.c
branches/boehm_gc_2/compilers/imcc/imcparser.c
branches/boehm_gc_2/compilers/imcc/imcparser.h
branches/boehm_gc_2/compilers/imcc/instructions.c
branches/boehm_gc_2/compilers/imcc/main.c
branches/boehm_gc_2/compilers/imcc/optimizer.c
branches/boehm_gc_2/compilers/imcc/parser_util.c
branches/boehm_gc_2/compilers/imcc/pbc.c
branches/boehm_gc_2/compilers/imcc/pcc.c
branches/boehm_gc_2/compilers/imcc/reg_alloc.c
branches/boehm_gc_2/compilers/imcc/sets.c
branches/boehm_gc_2/compilers/imcc/sets.h
branches/boehm_gc_2/compilers/imcc/symreg.c
branches/boehm_gc_2/compilers/imcc/symreg.h
branches/boehm_gc_2/compilers/pirc/src/bcgen.c
branches/boehm_gc_2/compilers/pirc/src/main.c
branches/boehm_gc_2/compilers/pirc/src/pir.y
branches/boehm_gc_2/compilers/pirc/src/pircompiler.c
branches/boehm_gc_2/compilers/pirc/src/pircompiler.h
branches/boehm_gc_2/compilers/pirc/src/pircompunit.c
branches/boehm_gc_2/compilers/pirc/src/pircompunit.h
branches/boehm_gc_2/compilers/pirc/src/piremit.c
branches/boehm_gc_2/compilers/pirc/src/piremit.h
branches/boehm_gc_2/compilers/pirc/src/pirmacro.c
branches/boehm_gc_2/compilers/pirc/src/pirmacro.h
branches/boehm_gc_2/compilers/pirc/src/pirparser.c
branches/boehm_gc_2/compilers/pirc/src/pirpcc.c
branches/boehm_gc_2/compilers/pirc/src/pirpcc.h
branches/boehm_gc_2/compilers/pirc/src/pirregalloc.c
branches/boehm_gc_2/compilers/pirc/src/pirregalloc.h
branches/boehm_gc_2/compilers/pirc/src/pirsymbol.c
branches/boehm_gc_2/compilers/pirc/src/pirsymbol.h
branches/boehm_gc_2/config/auto/perldoc.pm
branches/boehm_gc_2/config/gen/crypto/digest_pmc.in
branches/boehm_gc_2/config/gen/makefiles/docs.in
branches/boehm_gc_2/config/gen/makefiles/root.in
branches/boehm_gc_2/config/gen/opengl.pm
branches/boehm_gc_2/config/gen/platform/generic/env.c
branches/boehm_gc_2/config/gen/platform/generic/exec.c
branches/boehm_gc_2/config/gen/platform/generic/memexec.c
branches/boehm_gc_2/config/gen/platform/openbsd/memexec.c
branches/boehm_gc_2/config/gen/platform/platform_interface.h
branches/boehm_gc_2/docs/embed.pod
branches/boehm_gc_2/docs/parrothist.pod
branches/boehm_gc_2/docs/pdds/draft/pdd06_pasm.pod
branches/boehm_gc_2/docs/pdds/draft/pdd11_extending.pod
branches/boehm_gc_2/docs/pdds/pdd17_pmc.pod
branches/boehm_gc_2/docs/pdds/pdd28_strings.pod
branches/boehm_gc_2/docs/project/release_manager_guide.pod
branches/boehm_gc_2/examples/c/nanoparrot.c
branches/boehm_gc_2/examples/c/pbc_info.c
branches/boehm_gc_2/examples/embed/cotorra.c
branches/boehm_gc_2/examples/nci/QtHelloWorld.pasm
branches/boehm_gc_2/examples/nci/QtHelloWorld.pir
branches/boehm_gc_2/examples/pir/make_hello_pbc.pir
branches/boehm_gc_2/examples/sdl/anim_image.pir
branches/boehm_gc_2/examples/sdl/bounce_parrot_logo.pir
branches/boehm_gc_2/examples/sdl/move_parrot_logo.pir
branches/boehm_gc_2/ext/nqp-rx/src/stage0/HLL-s0.pir
branches/boehm_gc_2/ext/nqp-rx/src/stage0/NQP-s0.pir
branches/boehm_gc_2/ext/nqp-rx/src/stage0/P6Regex-s0.pir
branches/boehm_gc_2/include/parrot/atomic/gcc_pcc.h
branches/boehm_gc_2/include/parrot/charset.h
branches/boehm_gc_2/include/parrot/context.h
branches/boehm_gc_2/include/parrot/debugger.h
branches/boehm_gc_2/include/parrot/encoding.h
branches/boehm_gc_2/include/parrot/extend.h
branches/boehm_gc_2/include/parrot/gc_api.h
branches/boehm_gc_2/include/parrot/imcc.h
branches/boehm_gc_2/include/parrot/interpreter.h
branches/boehm_gc_2/include/parrot/memory.h
branches/boehm_gc_2/include/parrot/nci.h
branches/boehm_gc_2/include/parrot/oo.h
branches/boehm_gc_2/include/parrot/oplib.h
branches/boehm_gc_2/include/parrot/packfile.h
branches/boehm_gc_2/include/parrot/pmc.h
branches/boehm_gc_2/include/parrot/pmc_freeze.h
branches/boehm_gc_2/include/parrot/runcore_profiling.h
branches/boehm_gc_2/lib/Parrot/Configure/Messages.pm
branches/boehm_gc_2/lib/Parrot/Configure/Step/List.pm
branches/boehm_gc_2/lib/Parrot/Docs/Section/Tools.pm
branches/boehm_gc_2/lib/Parrot/Ops2c/Utils.pm
branches/boehm_gc_2/lib/Parrot/Pmc2c/Attribute.pm
branches/boehm_gc_2/lib/Parrot/Pmc2c/MethodEmitter.pm
branches/boehm_gc_2/lib/Parrot/Pmc2c/PMCEmitter.pm
branches/boehm_gc_2/lib/Parrot/Pmc2c/UtilFunctions.pm
branches/boehm_gc_2/runtime/parrot/include/test_more.pir
branches/boehm_gc_2/runtime/parrot/library/Configure/genfile.pir
branches/boehm_gc_2/runtime/parrot/library/Math/Rand.pir
branches/boehm_gc_2/runtime/parrot/library/OpenGL.pir
branches/boehm_gc_2/runtime/parrot/library/P6object.pir
branches/boehm_gc_2/runtime/parrot/library/SDL.pir
branches/boehm_gc_2/runtime/parrot/library/Test/More.pir
branches/boehm_gc_2/runtime/parrot/library/distutils.pir
branches/boehm_gc_2/src/atomic/gcc_x86.c
branches/boehm_gc_2/src/call/args.c
branches/boehm_gc_2/src/call/context.c
branches/boehm_gc_2/src/call/context_accessors.c
branches/boehm_gc_2/src/call/ops.c
branches/boehm_gc_2/src/debug.c
branches/boehm_gc_2/src/dynext.c
branches/boehm_gc_2/src/dynpmc/dynlexpad.pmc
branches/boehm_gc_2/src/dynpmc/foo.pmc
branches/boehm_gc_2/src/dynpmc/gdbmhash.pmc
branches/boehm_gc_2/src/dynpmc/rational.pmc
branches/boehm_gc_2/src/embed.c
branches/boehm_gc_2/src/events.c
branches/boehm_gc_2/src/exceptions.c
branches/boehm_gc_2/src/exit.c
branches/boehm_gc_2/src/extend.c
branches/boehm_gc_2/src/frame_builder.c
branches/boehm_gc_2/src/gc/alloc_memory.c
branches/boehm_gc_2/src/gc/alloc_resources.c
branches/boehm_gc_2/src/gc/api.c
branches/boehm_gc_2/src/gc/gc_inf.c
branches/boehm_gc_2/src/gc/gc_ms.c
branches/boehm_gc_2/src/gc/gc_private.h
branches/boehm_gc_2/src/gc/mark_sweep.c
branches/boehm_gc_2/src/global.c
branches/boehm_gc_2/src/global_setup.c
branches/boehm_gc_2/src/hash.c
branches/boehm_gc_2/src/hll.c
branches/boehm_gc_2/src/interp/inter_cb.c
branches/boehm_gc_2/src/interp/inter_create.c
branches/boehm_gc_2/src/interp/inter_misc.c
branches/boehm_gc_2/src/io/api.c
branches/boehm_gc_2/src/io/buffer.c
branches/boehm_gc_2/src/io/core.c
branches/boehm_gc_2/src/io/socket_api.c
branches/boehm_gc_2/src/io/socket_unix.c
branches/boehm_gc_2/src/io/socket_win32.c
branches/boehm_gc_2/src/key.c
branches/boehm_gc_2/src/library.c
branches/boehm_gc_2/src/main.c
branches/boehm_gc_2/src/multidispatch.c
branches/boehm_gc_2/src/nci_test.c
branches/boehm_gc_2/src/oo.c
branches/boehm_gc_2/src/ops/bit.ops
branches/boehm_gc_2/src/ops/cmp.ops
branches/boehm_gc_2/src/ops/core.ops
branches/boehm_gc_2/src/ops/experimental.ops
branches/boehm_gc_2/src/ops/io.ops
branches/boehm_gc_2/src/ops/math.ops
branches/boehm_gc_2/src/ops/object.ops
branches/boehm_gc_2/src/ops/pmc.ops
branches/boehm_gc_2/src/ops/sys.ops
branches/boehm_gc_2/src/packfile.c
branches/boehm_gc_2/src/packfile/pf_items.c
branches/boehm_gc_2/src/pbc_dump.c
branches/boehm_gc_2/src/pbc_merge.c
branches/boehm_gc_2/src/pmc.c
branches/boehm_gc_2/src/pmc/arrayiterator.pmc
branches/boehm_gc_2/src/pmc/bigint.pmc
branches/boehm_gc_2/src/pmc/bignum.pmc
branches/boehm_gc_2/src/pmc/callcontext.pmc
branches/boehm_gc_2/src/pmc/capture.pmc
branches/boehm_gc_2/src/pmc/class.pmc
branches/boehm_gc_2/src/pmc/codestring.pmc
branches/boehm_gc_2/src/pmc/complex.pmc
branches/boehm_gc_2/src/pmc/continuation.pmc
branches/boehm_gc_2/src/pmc/coroutine.pmc
branches/boehm_gc_2/src/pmc/cpointer.pmc
branches/boehm_gc_2/src/pmc/default.pmc
branches/boehm_gc_2/src/pmc/env.pmc
branches/boehm_gc_2/src/pmc/exception.pmc
branches/boehm_gc_2/src/pmc/exporter.pmc
branches/boehm_gc_2/src/pmc/fixedbooleanarray.pmc
branches/boehm_gc_2/src/pmc/fixedfloatarray.pmc
branches/boehm_gc_2/src/pmc/fixedintegerarray.pmc
branches/boehm_gc_2/src/pmc/fixedpmcarray.pmc
branches/boehm_gc_2/src/pmc/fixedstringarray.pmc
branches/boehm_gc_2/src/pmc/float.pmc
branches/boehm_gc_2/src/pmc/hash.pmc
branches/boehm_gc_2/src/pmc/hashiterator.pmc
branches/boehm_gc_2/src/pmc/imageio.pmc
branches/boehm_gc_2/src/pmc/integer.pmc
branches/boehm_gc_2/src/pmc/key.pmc
branches/boehm_gc_2/src/pmc/lexinfo.pmc
branches/boehm_gc_2/src/pmc/managedstruct.pmc
branches/boehm_gc_2/src/pmc/namespace.pmc
branches/boehm_gc_2/src/pmc/nci.pmc
branches/boehm_gc_2/src/pmc/object.pmc
branches/boehm_gc_2/src/pmc/orderedhash.pmc
branches/boehm_gc_2/src/pmc/os.pmc
branches/boehm_gc_2/src/pmc/packfile.pmc
branches/boehm_gc_2/src/pmc/packfileannotations.pmc
branches/boehm_gc_2/src/pmc/packfileconstanttable.pmc
branches/boehm_gc_2/src/pmc/packfiledirectory.pmc
branches/boehm_gc_2/src/pmc/packfilefixupentry.pmc
branches/boehm_gc_2/src/pmc/packfilefixuptable.pmc
branches/boehm_gc_2/src/pmc/packfilerawsegment.pmc
branches/boehm_gc_2/src/pmc/parrotinterpreter.pmc
branches/boehm_gc_2/src/pmc/parrotlibrary.pmc
branches/boehm_gc_2/src/pmc/parrotthread.pmc
branches/boehm_gc_2/src/pmc/pmc.num
branches/boehm_gc_2/src/pmc/pmcproxy.pmc
branches/boehm_gc_2/src/pmc/pointer.pmc
branches/boehm_gc_2/src/pmc/resizablebooleanarray.pmc
branches/boehm_gc_2/src/pmc/resizablefloatarray.pmc
branches/boehm_gc_2/src/pmc/resizableintegerarray.pmc
branches/boehm_gc_2/src/pmc/resizablepmcarray.pmc
branches/boehm_gc_2/src/pmc/resizablestringarray.pmc
branches/boehm_gc_2/src/pmc/role.pmc
branches/boehm_gc_2/src/pmc/scalar.pmc
branches/boehm_gc_2/src/pmc/scheduler.pmc
branches/boehm_gc_2/src/pmc/sockaddr.pmc
branches/boehm_gc_2/src/pmc/string.pmc
branches/boehm_gc_2/src/pmc/stringhandle.pmc
branches/boehm_gc_2/src/pmc/stringiterator.pmc
branches/boehm_gc_2/src/pmc/sub.pmc
branches/boehm_gc_2/src/pmc/task.pmc
branches/boehm_gc_2/src/pmc/undef.pmc
branches/boehm_gc_2/src/pmc/unmanagedstruct.pmc
branches/boehm_gc_2/src/pmc_freeze.c
branches/boehm_gc_2/src/runcore/cores.c
branches/boehm_gc_2/src/runcore/main.c
branches/boehm_gc_2/src/runcore/profiling.c
branches/boehm_gc_2/src/scheduler.c
branches/boehm_gc_2/src/string/api.c
branches/boehm_gc_2/src/string/charset.c
branches/boehm_gc_2/src/string/encoding.c
branches/boehm_gc_2/src/string/encoding/utf16.c
branches/boehm_gc_2/src/string/encoding/utf8.c
branches/boehm_gc_2/src/string/primitives.c
branches/boehm_gc_2/src/sub.c
branches/boehm_gc_2/src/thread.c
branches/boehm_gc_2/src/tsq.c
branches/boehm_gc_2/src/utils.c
branches/boehm_gc_2/src/vtable.tbl
branches/boehm_gc_2/src/vtables.c
branches/boehm_gc_2/t/codingstd/c_function_docs.t
branches/boehm_gc_2/t/codingstd/c_parens.t
branches/boehm_gc_2/t/codingstd/copyright.t
branches/boehm_gc_2/t/codingstd/linelength.t
branches/boehm_gc_2/t/codingstd/trailing_space.t
branches/boehm_gc_2/t/library/test_more.t
branches/boehm_gc_2/t/native_pbc/annotations.pbc
branches/boehm_gc_2/t/native_pbc/integer_1.pbc
branches/boehm_gc_2/t/native_pbc/number_1.pbc
branches/boehm_gc_2/t/native_pbc/string_1.pbc
branches/boehm_gc_2/t/op/arithmetics.t
branches/boehm_gc_2/t/op/arithmetics_pmc.t
branches/boehm_gc_2/t/op/string_mem.t
branches/boehm_gc_2/t/op/trans.t
branches/boehm_gc_2/t/pmc/bigint.t
branches/boehm_gc_2/t/pmc/complex.t
branches/boehm_gc_2/t/pmc/fixedbooleanarray.t
branches/boehm_gc_2/t/pmc/multidispatch.t
branches/boehm_gc_2/t/pmc/namespace.t
branches/boehm_gc_2/t/pmc/pmc.t
branches/boehm_gc_2/t/pmc/string.t
branches/boehm_gc_2/t/run/options.t
branches/boehm_gc_2/t/src/embed.t
branches/boehm_gc_2/t/src/extend.t
branches/boehm_gc_2/tools/dev/mk_language_shell.pl
branches/boehm_gc_2/tools/dev/vtablize.pl
branches/boehm_gc_2/tools/util/release.json
Modified: branches/boehm_gc_2/CREDITS
==============================================================================
--- branches/boehm_gc_2/CREDITS Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/CREDITS Mon Feb 22 12:30:02 2010 (r44294)
@@ -136,10 +136,12 @@
N: Austin Hastings
U: Austin
+U: Austin_Hastings
A: austin_hastings at yahoo.com
A: austin_h... at yahoo.com
E: austin_hastings at yahoo.com
D: Close
+D: Kakapo
N: Benjamin Goldberg
D: Numerous improvements and proposals.
@@ -328,6 +330,14 @@
D: POD for the Undef PMC
E: david.romano+p6i at gmail.com
+N: David E. Wheeler
+E: david at justatheory.com
+W: http://justatheory.com/
+U: theory
+A: theory
+A: David Wheeler
+S: Portland, OR
+
N: Dennis Rieks
D: Win32 config and build
@@ -692,7 +702,10 @@
N: Michael H. Hind
U: mikehh
-D: codingstd patches
+D: testing parrot and some HLL's
+D: fixing codetest failures
+D: adding function documentation
+D: tracwiki additions
E: mike.hind at gmail.com
N: Michael G. Schwern
Modified: branches/boehm_gc_2/ChangeLog
==============================================================================
--- branches/boehm_gc_2/ChangeLog Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/ChangeLog Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,5 +1,9 @@
#1 $Id$
+2010.02.16 darbelo
+ * Released 2.1.0
+ See NEWS for more.
+
2010.01.19 chromatic
* Released 2.0.0
See NEWS for more.
Modified: branches/boehm_gc_2/Configure.pl
==============================================================================
--- branches/boehm_gc_2/Configure.pl Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/Configure.pl Mon Feb 22 12:30:02 2010 (r44294)
@@ -646,7 +646,6 @@
gen::core_pmcs
gen::crypto
gen::opengl
- gen::call_list
gen::makefiles
gen::platform
gen::config_pm
Modified: branches/boehm_gc_2/DEPRECATED.pod
==============================================================================
--- branches/boehm_gc_2/DEPRECATED.pod Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/DEPRECATED.pod Mon Feb 22 12:30:02 2010 (r44294)
@@ -52,23 +52,6 @@
L<https://trac.parrot.org/parrot/ticket/264>
-=item various VTABLE functions [eligible in 1.5]
-
-The get_bigint, set_bigint_*, pow, i_pow and nextkey_keyed VTABLE functions are
-deprecated and will be removed.
-
-L<https://trac.parrot.org/parrot/ticket/866>
-
-=item Use of undocumented variables in class_init [eligible in 2.1]
-
-The current implementation allows the class_init vtable function body to
-use local symbols from the generated part. For example, some PMC used
-to use the pass counter. In the future, the class_init body from the PMC
-file may not be inserted directly in the body of the generated one,
-so this usage will not be allowed.
-
-L<https://trac.parrot.org/parrot/ticket/918>
-
=item Overriding vtable invoke in PIR objects [experimental]
The VTABLE invoke in object.pmc puts SELF at the start of the
@@ -77,20 +60,28 @@
L<https://trac.parrot.org/parrot/ticket/103>
-=item All bitwise VTABLE functions [eligible in 2.1]
-
-All bitwise VTABLE functions (all VTABLE functions containing C<bitwise> in
-their names) will be removed. Equivalent functionality will by supplied by
-bitwise dynops.
-
-L<https://trac.parrot.org/parrot/ticket/1260>
-
=item CPointer PMC [eligible in 2.1]
And all uses in the Parrot calling conventions.
L<https://trac.parrot.org/parrot/ticket/1407>
+=item Digest dynpmcs [eligible in 2.4]
+
+The digest dynpmcs are, since the posting of this notice, available on
+http://gitorious.org/digest-dynpmcs and will no longer be distributed
+with parrot after 2.3.
+
+L<https://trac.parrot.org/parrot/ticket/1467>
+
+=item gdbmhash dynpmc [eligible in 2.4]
+
+The gdbmhash dynpmc is, since the posting of this notice, available on
+http://gitorious.org/dbm-dynpmcs and will no longer be distributed
+with parrot after 2.3.
+
+L<https://trac.parrot.org/parrot/ticket/1469>
+
=back
=head1 Opcodes
@@ -113,6 +104,13 @@
for Sub, Exception, and related PMC types will instead be handled by
get_label and set_label.
+=item sizeof [eligible in 2.4]
+
+This opcode uses the old integer ID for a PMC type; this opcode should be changed
+to use the current methods to lookup a PMC or removed entirely.
+
+L<https://trac.parrot.org/parrot/ticket/633>
+
=item All bitwise ops [eligible in 2.1]
All bitwise ops (all ops containing C<bitwise> in their names) will be provided
@@ -132,6 +130,11 @@
L<https://trac.parrot.org/parrot/ticket/1406>
+=item GC_SYS_NAME option to interpinfo_s_i [experimental]
+
+Ability to get the string name of the current GC core from the interpinfo_s_i.
+See r43900 and r43904 for details.
+
=back
=head1 Bytecode
@@ -164,27 +167,6 @@
L<https://trac.parrot.org/parrot/ticket/906>
-=item named class/pmc lookup in pir syntax such as new, isa, subclass,
- get_class, etc [eligible in 1.1]
-
-Class PMC name resolution will be the following.
-
-if the arg is a STRING
- Relative to the current Namespace
-
-if the arg is a Array (of any sort) or Key
- Relative to the current HLL Namespace
-
-if the arg is a Namespace or Class PMC
- The passed in class or the class attached to the passed in namespace.
-
-L<https://trac.parrot.org/parrot/ticket/159>
-
-=item load or include paths prefixed with 'library/' or 'include/'
-[eligible in 1.5]
-
-L<https://trac.parrot.org/parrot/ticket/511>
-
=item continuation-based ExceptionHandlers [eligible in 2.1]
L<https://trac.parrot.org/parrot/ticket/1091>
@@ -214,44 +196,18 @@
=item C API coding standards cleanup [eligible in 1.1]
All C API functions that aren't currently named according to the
-'Parrot_<system>_*' scheme will be renamed. If you depend on these
-functions in an extending/embedding interface or C-level custom PMCs,
-check in 1.4 or 2.0 for the new names.
+'Parrot_<system>_*' scheme will be renamed. A list of renamed
+functions will be kept in the ticket at:
L<https://trac.parrot.org/parrot/ticket/443>
-=item Sub/method invocation functions [eligible in 2.1]
-
-The old 'Parrot_call_*' functions for invoking a sub/method object from C are
-deprecated, replaced by 'Parrot_ext_call'.
-
-L<https://trac.parrot.org/parrot/ticket/1145>
-
=item PMC Attributes Allocation Functions [experimental]
Parrot_gc_allocate_pmc_attributes
Parrot_gc_free_pmc_attributes
These items and related helper functions are added as experimental support
-for TT #895
-
-=item PDB_compile and PDB_eval [eligible in 2.1]
-
-The function PDB_compile doesn't work since some time, and his implementation
-was a hack. His functionality may be reimplemented in another way. Until the
-end of deprecation cycle it just throws an exception.
-
-The PDB_eval function, that used in the debugger to support the eval
-command, was using PDB_compile. His functionality must be reimplemented
-in another way and with a name that follows current conventions, in the
-meantime and until the end of the deprecation cycle it just shows a
-diagnostic message.
-
-L<https://trac.parrot.org/parrot/ticket/872>
-
-=item Parrot_oo_get_namespace [eligible in 2.1]
-
-L<https://trac.parrot.org/parrot/ticket/1069>
+for L<https://trac.parrot.org/parrot/ticket/895>
=item STRING Out parameters in Parrot_str_* functions [eligible in 2.1]
@@ -262,17 +218,6 @@
=head1 Compiler tools
-=head2 PASM1 compiler
-
-=over 4
-
-=item C<PASM1 compiler> [eligible in 2.1]
-
-See PDB_compile. Note that the current version of the C<PASM1> compiler
-issues a warning and is not functional. (However, it used to segfault.)
-
-=back
-
=head2 Parrot Grammar Engine (PGE)
=over 4
@@ -321,35 +266,20 @@
=back
-=head2 Not Quite Perl (NQP)
+=head1 Compilers
=over 4
-=item C< $(...) > syntax [eligible in 1.5]
-
-The C< $(...) > syntax for obtaining a result object from a Match
-object will no longer work. The new syntax is to invoke the
-C<.ast> method on the Match object.
-
-L<https://trac.parrot.org/parrot/ticket/459>
+=item json [eligible in 2.4]
-=item Quoted items [eligible in 1.5]
+The json compiler was dupicated into data_json some time ago. If you're
+using json, just use data_json instead, it's the same code. See TT #1461.
-Double-quoted strings will interpret unescaped $-names
-as interpolated variables in the string. Bare slashes
-will introduce regular expressions. The C<< <foo bar> >>
-syntax will produce an array of strings instead of a single
-string.
+=item nqp [eligible in 2.4]
-L<https://trac.parrot.org/parrot/ticket/837>
+Replaced by ext/nqp-rx and parrot-nqp.
-=item C<< PIR q:to:<xyz> >> inline PIR [eligible in 1.5]
-
-The C<< PIR q:to:<xyz> >> form of inline PIR in NQP scripts is
-deprecated. Use C< Q:PIR { ... } > or C< Q:PIR {{ ... }} >
-instead.
-
-L<https://trac.parrot.org/parrot/ticket/842>
+L<http://trac.parrot.org/parrot/ticket/1462>
=back
@@ -357,11 +287,12 @@
=over 4
-=item MT19937 [eligible in 2.1]
+=item PARROT_LIBRARY and PARROT_INCLUDE environment variables [experimental]
+
+L<https://trac.parrot.org/parrot/ticket/1429>
-L<https://trac.parrot.org/parrot/ticket/1278> - latest version now hosted
-at L<http://github.com/fperrad/parrot-MT19937>. After 2.0, users will have
-to install via C<plumage>.
+A way to provide an equivalent of -L and -I parrot command line options
+to language that doesn't support it.
=item JSON, JSON, and Config;JSON [eligible in 1.5]
Modified: branches/boehm_gc_2/MANIFEST
==============================================================================
--- branches/boehm_gc_2/MANIFEST Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/MANIFEST Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,7 +1,7 @@
# ex: set ro:
# $Id$
#
-# generated by tools/dev/mk_manifest_and_skip.pl Sun Feb 7 21:29:31 2010 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Sat Feb 20 18:21:54 2010 UT
#
# See below for documentation on the format of this file.
#
@@ -303,9 +303,6 @@
config/auto/va_ptr/test_c.in []
config/auto/warnings.pm []
config/auto/warnings/test_c.in []
-config/gen/call_list.pm []
-config/gen/call_list/core.in []
-config/gen/call_list/misc.in []
config/gen/config_h.pm []
config/gen/config_h/config_h.in []
config/gen/config_h/feature_h.in []
@@ -1232,7 +1229,6 @@
runtime/parrot/library/JSON.pir [library]
runtime/parrot/library/MIME/Base64.pir [library]
runtime/parrot/library/Math/Rand.pir [library]
-runtime/parrot/library/Math/Random/mt19937ar.pir [library]
runtime/parrot/library/NCI/Utils.pir [library]
runtime/parrot/library/OpenGL.pir [library]
runtime/parrot/library/OpenGL/Math.pir [library]
@@ -1371,6 +1367,11 @@
src/main.c []
src/misc.c []
src/multidispatch.c []
+src/nci/api.c []
+src/nci/core_thunks.c []
+src/nci/core_thunks.nci []
+src/nci/extra_thunks.c []
+src/nci/extra_thunks.nci []
src/nci_test.c []
src/oo.c []
src/ops/bit.ops []
@@ -1430,6 +1431,7 @@
src/pmc/hashiterator.pmc [devel]src
src/pmc/hashiteratorkey.pmc [devel]src
src/pmc/imageio.pmc [devel]src
+src/pmc/imageiosize.pmc [devel]src
src/pmc/integer.pmc [devel]src
src/pmc/iterator.pmc [devel]src
src/pmc/key.pmc [devel]src
@@ -1441,6 +1443,8 @@
src/pmc/nci.pmc [devel]src
src/pmc/null.pmc [devel]src
src/pmc/object.pmc [devel]src
+src/pmc/opcode.pmc [devel]src
+src/pmc/oplib.pmc [devel]src
src/pmc/orderedhash.pmc [devel]src
src/pmc/orderedhashiterator.pmc [devel]src
src/pmc/os.pmc [devel]src
@@ -1723,8 +1727,6 @@
t/library/iter.t [test]
t/library/md5.t [test]
t/library/mime_base64.t [test]
-t/library/mt19937ar.t [test]
-t/library/mt19937ar.txt [test]
t/library/p6object.t [test]
t/library/parrotlib.t [test]
t/library/pcre.t [test]
@@ -1801,7 +1803,6 @@
t/op/arithmetics.t [test]
t/op/arithmetics_pmc.t [test]
t/op/basic.t [test]
-t/op/bitwise.t [test]
t/op/box.t [test]
t/op/calling.t [test]
t/op/cc_params.t [test]
@@ -1811,9 +1812,11 @@
t/op/comp.t [test]
t/op/copy.t [test]
t/op/debuginfo.t [test]
+t/op/errorson.t [test]
t/op/exceptions.t [test]
t/op/exit.t [test]
t/op/fetch.t [test]
+t/op/gc-leaky.t [test]
t/op/gc.t [test]
t/op/globals.t [test]
t/op/ifunless.t [test]
@@ -1897,6 +1900,8 @@
t/pmc/hash.t [test]
t/pmc/hashiterator.t [test]
t/pmc/hashiteratorkey.t [test]
+t/pmc/imageio.t [test]
+t/pmc/imageiosize.t [test]
t/pmc/integer.t [test]
t/pmc/io.t [test]
t/pmc/io_iterator.t [test]
@@ -1916,6 +1921,8 @@
t/pmc/object-mro.t [test]
t/pmc/object.t [test]
t/pmc/objects.t [test]
+t/pmc/opcode.t [test]
+t/pmc/oplib.t [test]
t/pmc/orderedhash.t [test]
t/pmc/orderedhashiterator.t [test]
t/pmc/os.t [test]
@@ -2019,7 +2026,6 @@
t/steps/auto/thread-01.t [test]
t/steps/auto/va_ptr-01.t [test]
t/steps/auto/warnings-01.t [test]
-t/steps/gen/call_list-01.t [test]
t/steps/gen/config_h-01.t [test]
t/steps/gen/config_pm-01.t [test]
t/steps/gen/core_pmcs-01.t [test]
@@ -2133,8 +2139,6 @@
tools/build/fixup_gen_file.pl []
tools/build/h2inc.pl []
tools/build/headerizer.pl []
-tools/build/nativecall.pir []
-tools/build/nativecall.pl []
tools/build/ops2c.pl [devel]
tools/build/ops2pm.pl []
tools/build/parrot_config_c.pl []
@@ -2166,8 +2170,10 @@
tools/dev/mk_language_shell.pl [devel]
tools/dev/mk_manifest_and_skip.pl []
tools/dev/mk_native_pbc []
+tools/dev/mk_nci_thunks.pl []
tools/dev/mk_rpm_manifests.pl []
tools/dev/nci_test_gen.pl []
+tools/dev/nci_thunk_gen.pir []
tools/dev/nm.pl []
tools/dev/nopaste.pl []
tools/dev/ops_not_tested.pl []
Modified: branches/boehm_gc_2/MANIFEST.SKIP
==============================================================================
--- branches/boehm_gc_2/MANIFEST.SKIP Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/MANIFEST.SKIP Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,6 +1,6 @@
# ex: set ro:
# $Id$
-# generated by tools/dev/mk_manifest_and_skip.pl Mon Feb 8 05:37:36 2010 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Sun Feb 21 04:27:37 2010 UT
#
# This file should contain a transcript of the svn:ignore properties
# of the directories in the Parrot subversion repository. (Needed for
@@ -105,6 +105,12 @@
^parrot_config\.pbc/
^parrot_debugger$
^parrot_debugger/
+^parrot_nci_thunk_gen$
+^parrot_nci_thunk_gen/
+^parrot_nci_thunk_gen\.c$
+^parrot_nci_thunk_gen\.c/
+^parrot_nci_thunk_gen\.pbc$
+^parrot_nci_thunk_gen\.pbc/
^parrot_test_run\.tar\.gz$
^parrot_test_run\.tar\.gz/
^pbc_disassemble$
@@ -258,9 +264,6 @@
# generated from svn:ignore of 'compilers/tge/TGE/'
^compilers/tge/TGE/Parser\.pir$
^compilers/tge/TGE/Parser\.pir/
-# generated from svn:ignore of 'config/gen/call_list/'
-^config/gen/call_list/opengl\.in$
-^config/gen/call_list/opengl\.in/
# generated from svn:ignore of 'docs/'
^docs/.*\.tmp$
^docs/.*\.tmp/
@@ -581,9 +584,6 @@
# generated from svn:ignore of 'runtime/parrot/library/Math/'
^runtime/parrot/library/Math/.*\.pbc$
^runtime/parrot/library/Math/.*\.pbc/
-# generated from svn:ignore of 'runtime/parrot/library/Math/Random/'
-^runtime/parrot/library/Math/Random/.*\.pbc$
-^runtime/parrot/library/Math/Random/.*\.pbc/
# generated from svn:ignore of 'runtime/parrot/library/NCI/'
^runtime/parrot/library/NCI/.*\.pbc$
^runtime/parrot/library/NCI/.*\.pbc/
@@ -632,8 +632,6 @@
^src/.*\.str/
^src/asmfun\..*$
^src/asmfun\..*/
-^src/call_list\.txt$
-^src/call_list\.txt/
^src/core_pmcs\.c$
^src/core_pmcs\.c/
^src/exec_cpu\.c$
@@ -644,10 +642,16 @@
^src/exec_dep\.h/
^src/extend_vtable\.c$
^src/extend_vtable\.c/
+^src/extra_nci_thunks\.c$
+^src/extra_nci_thunks\.c/
^src/fingerprint\.c$
^src/fingerprint\.c/
^src/glut_callbacks\.c$
^src/glut_callbacks\.c/
+^src/glut_nci_thunks\.c$
+^src/glut_nci_thunks\.c/
+^src/glut_nci_thunks\.nci$
+^src/glut_nci_thunks\.nci/
^src/install_config\.c$
^src/install_config\.c/
^src/jit_cpu\.c$
@@ -656,8 +660,6 @@
^src/jit_defs\.c/
^src/jit_emit\.h$
^src/jit_emit\.h/
-^src/nci\.c$
-^src/nci\.c/
^src/null_config\.c$
^src/null_config\.c/
^src/parrot_config\.c$
@@ -807,6 +809,13 @@
^src/io/.*\.obj/
^src/io/.*\.str$
^src/io/.*\.str/
+# generated from svn:ignore of 'src/nci/'
+^src/nci/.*\.o$
+^src/nci/.*\.o/
+^src/nci/.*\.obj$
+^src/nci/.*\.obj/
+^src/nci/.*\.str$
+^src/nci/.*\.str/
# generated from svn:ignore of 'src/ops/'
^src/ops/.*\.c$
^src/ops/.*\.c/
Modified: branches/boehm_gc_2/MANIFEST.generated
==============================================================================
--- branches/boehm_gc_2/MANIFEST.generated Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/MANIFEST.generated Mon Feb 22 12:30:02 2010 (r44294)
@@ -2,10 +2,10 @@
# See tools/dev/install_files.pl for documentation on the
# format of this file.
# Please re-sort this file after *EVERY* modification
-blib/lib/libparrot.2.0.0.dylib [main]lib
+blib/lib/libparrot.2.1.0.dylib [main]lib
blib/lib/libparrot.a [main]lib
blib/lib/libparrot.dylib [main]lib
-blib/lib/libparrot.so.2.0.0 [main]lib
+blib/lib/libparrot.so.2.1.0 [main]lib
blib/lib/libparrot.so [main]lib
compilers/data_json/data_json.pbc [data_json]
compilers/json/JSON.pbc [json]
@@ -56,6 +56,7 @@
installable_parrot_debugger [main]bin
installable_parrot.exe [main]bin
installable_parrot [main]bin
+installable_parrot_nci_thunk_gen [main]bin
installable_pbc_disassemble.exe [main]bin
installable_pbc_disassemble [main]bin
installable_pbc_dump.exe [main]bin
@@ -162,7 +163,6 @@
runtime/parrot/library/Iter.pbc [main]
runtime/parrot/library/JSON.pbc [main]
runtime/parrot/library/libpcre.pbc [main]
-runtime/parrot/library/Math/Random/mt19937ar.pbc [main]
runtime/parrot/library/Math/Rand.pbc [main]
runtime/parrot/library/MIME/Base64.pbc [main]
runtime/parrot/library/NCI/call_toolkit_init.pbc [main]
Modified: branches/boehm_gc_2/META.yml
==============================================================================
--- branches/boehm_gc_2/META.yml Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/META.yml Mon Feb 22 12:30:02 2010 (r44294)
@@ -4,7 +4,7 @@
# See http://module-build.sourceforge.net/META-spec-current.html for details.
---
name: parrot
-version: 2.0.0
+version: 2.1.0
author: parrot-dev at lists.parrot.org
abstract: a virtual machine designed for dynamic languages
license: artistic2
Modified: branches/boehm_gc_2/NEWS
==============================================================================
--- branches/boehm_gc_2/NEWS Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/NEWS Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,5 +1,21 @@
# $Id$
+New in 2.1.0
+- Core changes
+ + GC performance and encapsulation were greatly improved.
+ + PMC freeze refactored.
+ + More Makefile and build improvements.
+- API Changes
+ + The Array PMC was removed.
+ + Several deprecated vtables were removed.
+ + The OrderedHash PMC was substantialy improved.
+- Platforms
+ + Packaging improvements on some operating systems.
+- Tools
+ + Some cases in pbc_merge are now handled.
+ + Improvements were made to the dependency checker.
+ + New tool nativecall.pir added.
+
New in 2.0.0
- Features
+ Context PMCs now support attribute-based introspection
Modified: branches/boehm_gc_2/PBC_COMPAT
==============================================================================
--- branches/boehm_gc_2/PBC_COMPAT Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/PBC_COMPAT Mon Feb 22 12:30:02 2010 (r44294)
@@ -27,6 +27,7 @@
# please insert tab separated entries at the top of the list
+6.3 2010.02.16 whiteknight Add OpLib and Opcode PMCs
6.2 2010.01.31 cotto serialization-related changes to ParrotInterpreter
6.1 2010.01.30 whiteknight remove Array PMC
6.0 2010.01.19 chromatic released 2.0.0
Modified: branches/boehm_gc_2/PLATFORMS
==============================================================================
--- branches/boehm_gc_2/PLATFORMS Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/PLATFORMS Mon Feb 22 12:30:02 2010 (r44294)
@@ -33,6 +33,7 @@
CGoto EXEC Thr Sig
--------------------------------------------------------------------------------
cygwin1.7.0-x86-gcc4.3.2 4 Y - - - Y Y Y 20090315
+darwin9.8.0-x86-gcc4.0.1 Y ? Y ? Y Y Y 20100215
dragonfly2.2.0-i386-gcc-4.1.2 4 Y - Y Y Y Y ? 20090427
freebsd-x86-gcc-4.2.1 4 Y Y ? ? Y Y Y 20090415
freebsd-amd64-gcc-4.2.1 8 Y - ? ? Y Y Y 20090720
@@ -40,7 +41,7 @@
linux-amd64-clang-r75433 8 Y ? ? ? Y Y*2 ? 20090913
linux-amd64-gcc4.3.2 8 Y - Y Y Y Y/1 Y 20091020
linux-amd64-gcc4.3.3 8 Y ? Y Y Y Y ? 20090712
-linux-amd64-gcc4.4.1 8 Y ? Y Y Y Y Y 20091020
+linux-amd64-gcc4.4.1 8 Y ? Y ? Y Y Y 20100215
linux-amd64-g++4.4.1 8 Y ? Y Y Y Y Y 20091116
linux-ppc-gcc_4.4.2 Y Y Y Y Y Y Y 20100118
linux-ppc64-gcc_4.4.2 Y Y Y Y Y Y Y 20100118
Modified: branches/boehm_gc_2/README
==============================================================================
--- branches/boehm_gc_2/README Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/README Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,4 +1,4 @@
-This is Parrot, version 2.0.0
+This is Parrot, version 2.1.0
------------------------------
Parrot is Copyright (C) 2001-2010, Parrot Foundation.
Modified: branches/boehm_gc_2/VERSION
==============================================================================
--- branches/boehm_gc_2/VERSION Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/VERSION Mon Feb 22 12:30:02 2010 (r44294)
@@ -1 +1 @@
-2.0.0
+2.1.0
Modified: branches/boehm_gc_2/compilers/data_json/Defines.mak
==============================================================================
--- branches/boehm_gc_2/compilers/data_json/Defines.mak Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/data_json/Defines.mak Mon Feb 22 12:30:02 2010 (r44294)
@@ -1 +1,6 @@
-DATA_JSON_LIB_PBCS = compilers/data_json/data_json.pbc
+DATA_JSON_LIB_PBCS = $(LIBRARY_DIR)/data_json.pbc
+
+DATA_JSON_CLEANUPS = $(LIBRARY_DIR)/data_json.pbc \
+ compilers/data_json/data_json.pbc \
+ compilers/data_json/data_json/grammar.pir \
+ compilers/data_json/data_json/pge2pir.pir
Modified: branches/boehm_gc_2/compilers/data_json/Rules.mak
==============================================================================
--- branches/boehm_gc_2/compilers/data_json/Rules.mak Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/data_json/Rules.mak Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,10 +1,10 @@
$(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 \
+ $(LIBRARY_DIR)/PGE.pbc \
+ $(LIBRARY_DIR)/PGE/Util.pbc \
+ $(LIBRARY_DIR)/TGE.pbc \
compilers/data_json/data_json/grammar.pir \
compilers/data_json/data_json/pge2pir.pir
Modified: branches/boehm_gc_2/compilers/imcc/cfg.c
==============================================================================
--- branches/boehm_gc_2/compilers/imcc/cfg.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/imcc/cfg.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -35,27 +35,30 @@
/* HEADERIZER BEGIN: static */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-static void analyse_life_block(
+static void analyse_life_block(PARROT_INTERP,
ARGIN(const Basic_block* bb),
ARGMOD(SymReg *r))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
+ __attribute__nonnull__(3)
FUNC_MODIFIES(*r);
-static void analyse_life_symbol(
+static void analyse_life_symbol(PARROT_INTERP,
ARGIN(const IMC_Unit *unit),
ARGMOD(SymReg* r))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
+ __attribute__nonnull__(3)
FUNC_MODIFIES(* r);
-static void bb_add_edge(
+static void bb_add_edge(PARROT_INTERP,
ARGMOD(IMC_Unit *unit),
ARGIN(Basic_block *from),
ARGMOD(Basic_block *to))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
__attribute__nonnull__(3)
+ __attribute__nonnull__(4)
FUNC_MODIFIES(*unit)
FUNC_MODIFIES(*to);
@@ -110,17 +113,19 @@
__attribute__nonnull__(1)
FUNC_MODIFIES(*unit);
-static void init_basic_blocks(ARGMOD(IMC_Unit *unit))
+static void init_basic_blocks(PARROT_INTERP, ARGMOD(IMC_Unit *unit))
__attribute__nonnull__(1)
+ __attribute__nonnull__(2)
FUNC_MODIFIES(*unit);
PARROT_CANNOT_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
-static Basic_block* make_basic_block(
+static Basic_block* make_basic_block(PARROT_INTERP,
ARGMOD(IMC_Unit *unit),
ARGMOD(Instruction *ins))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
+ __attribute__nonnull__(3)
FUNC_MODIFIES(*unit)
FUNC_MODIFIES(*ins);
@@ -145,13 +150,16 @@
__attribute__nonnull__(2);
#define ASSERT_ARGS_analyse_life_block __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(bb) \
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(bb) \
, PARROT_ASSERT_ARG(r))
#define ASSERT_ARGS_analyse_life_symbol __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(unit) \
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(unit) \
, PARROT_ASSERT_ARG(r))
#define ASSERT_ARGS_bb_add_edge __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(unit) \
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(unit) \
, PARROT_ASSERT_ARG(from) \
, PARROT_ASSERT_ARG(to))
#define ASSERT_ARGS_bb_check_set_addr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
@@ -180,9 +188,11 @@
#define ASSERT_ARGS_free_loops __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(unit))
#define ASSERT_ARGS_init_basic_blocks __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(unit))
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(unit))
#define ASSERT_ARGS_make_basic_block __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(unit) \
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(unit) \
, PARROT_ASSERT_ARG(ins))
#define ASSERT_ARGS_mark_loop __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
@@ -267,7 +277,7 @@
unsigned int i;
IMCC_info(interp, 2, "find_basic_blocks\n");
- init_basic_blocks(unit);
+ init_basic_blocks(interp, unit);
for (i = 0; i < hsh->size; i++) {
SymReg *r;
@@ -288,7 +298,7 @@
ins->index = i = 0;
- bb = make_basic_block(unit, ins);
+ bb = make_basic_block(interp, unit, ins);
if (ins->type & ITBRANCH) {
SymReg * const addr = get_branch_reg(bb->end);
@@ -326,7 +336,7 @@
nu = 0;
else if (ins->type & ITLABEL) {
bb->end = ins->prev;
- bb = make_basic_block(unit, ins);
+ bb = make_basic_block(interp, unit, ins);
}
/* a branch is the end of a basic block
@@ -342,7 +352,7 @@
continue;
if (ins->next)
- bb = make_basic_block(unit, ins->next);
+ bb = make_basic_block(interp, unit, ins->next);
nu = 1;
}
@@ -380,8 +390,8 @@
ins->symregs[1]->name);
/* connect this block with first and last block */
- bb_add_edge(unit, unit->bb_list[0], bb);
- bb_add_edge(unit, unit->bb_list[unit->n_basic_blocks - 1], bb);
+ bb_add_edge(interp, unit, unit->bb_list[0], bb);
+ bb_add_edge(interp, unit, unit->bb_list[unit->n_basic_blocks - 1], bb);
/* and mark the instruction as being kind of a branch */
bb->start->type |= ITADDR;
@@ -419,7 +429,7 @@
/* if the block can fall-through */
if (i > 0 && ! (last->end->type & IF_goto))
- bb_add_edge(unit, last, bb);
+ bb_add_edge(interp, unit, last, bb);
/* check first ins, if label try to find a set_addr op */
if (bb->start->type & ITLABEL)
@@ -433,7 +443,7 @@
else if (STREQ(bb->start->opname, "invoke")
|| STREQ(bb->start->opname, "invokecc")) {
if (check_invoke_type(interp, unit, bb->start) == INVOKE_SUB_LOOP)
- bb_add_edge(unit, bb, unit->bb_list[0]);
+ bb_add_edge(interp, unit, bb, unit->bb_list[0]);
}
last = bb;
@@ -486,14 +496,14 @@
const SymReg * const r = find_sym(interp, label->name);
if (r && (r->type & VTADDRESS) && r->first_ins)
- bb_add_edge(unit, from, unit->bb_list[r->first_ins->bbindex]);
+ bb_add_edge(interp, unit, from, unit->bb_list[r->first_ins->bbindex]);
else {
IMCC_debug(interp, DEBUG_CFG, "register branch %I ", from->end);
for (ins = from->end; ins; ins = ins->prev) {
if ((ins->type & ITBRANCH)
&& STREQ(ins->opname, "set_addr")
&& ins->symregs[1]->first_ins) {
- bb_add_edge(unit, from,
+ bb_add_edge(interp, unit, from,
unit-> bb_list[ins->symregs[1]->first_ins->bbindex]);
IMCC_debug(interp, DEBUG_CFG, "(%s) ", ins->symregs[1]->name);
break;
@@ -538,8 +548,8 @@
/*
-=item C<static void bb_add_edge(IMC_Unit *unit, Basic_block *from, Basic_block
-*to)>
+=item C<static void bb_add_edge(PARROT_INTERP, IMC_Unit *unit, Basic_block
+*from, Basic_block *to)>
Adds an edge between the two given blocks.
@@ -548,8 +558,10 @@
*/
static void
-bb_add_edge(ARGMOD(IMC_Unit *unit), ARGIN(Basic_block *from),
- ARGMOD(Basic_block *to))
+bb_add_edge(PARROT_INTERP,
+ ARGMOD(IMC_Unit *unit),
+ ARGIN(Basic_block *from),
+ ARGMOD(Basic_block *to))
{
ASSERT_ARGS(bb_add_edge)
Edge *e;
@@ -558,7 +570,7 @@
/* we assume that the data is correct, and thus if the edge is not
* on the predecessors of 'from', it won't be on the successors of 'to' */
- e = mem_allocate_typed(Edge);
+ e = mem_gc_allocate_typed(interp, Edge);
e->succ_next = from->succ_list;
e->from = from;
@@ -708,13 +720,14 @@
IMCC_info(interp, 2, "life_analysis\n");
for (i = 0; i < unit->n_symbols; i++)
- analyse_life_symbol(unit, reglist[i]);
+ analyse_life_symbol(interp, unit, reglist[i]);
}
/*
-=item C<static void analyse_life_symbol(const IMC_Unit *unit, SymReg* r)>
+=item C<static void analyse_life_symbol(PARROT_INTERP, const IMC_Unit *unit,
+SymReg* r)>
Analyzes the lifetime for a given symbol.
@@ -723,7 +736,8 @@
*/
static void
-analyse_life_symbol(ARGIN(const IMC_Unit *unit), ARGMOD(SymReg* r))
+analyse_life_symbol(PARROT_INTERP,
+ ARGIN(const IMC_Unit *unit), ARGMOD(SymReg* r))
{
ASSERT_ARGS(analyse_life_symbol)
unsigned int i;
@@ -735,13 +749,13 @@
if (r->life_info)
free_life_info(unit, r);
- r->life_info = mem_allocate_n_zeroed_typed(unit->n_basic_blocks,
+ r->life_info = mem_gc_allocate_n_zeroed_typed(interp, unit->n_basic_blocks,
Life_range *);
/* First we make a pass to each block to gather the information
* that can be obtained locally */
for (i = 0; i < unit->n_basic_blocks; i++) {
- analyse_life_block(unit->bb_list[i], r);
+ analyse_life_block(interp, unit->bb_list[i], r);
}
/* Now we need to consider the relations between blocks */
@@ -807,7 +821,8 @@
/*
-=item C<static void analyse_life_block(const Basic_block* bb, SymReg *r)>
+=item C<static void analyse_life_block(PARROT_INTERP, const Basic_block* bb,
+SymReg *r)>
Studies the state of the var r in the block bb.
@@ -819,10 +834,10 @@
*/
static void
-analyse_life_block(ARGIN(const Basic_block* bb), ARGMOD(SymReg *r))
+analyse_life_block(PARROT_INTERP, ARGIN(const Basic_block* bb), ARGMOD(SymReg *r))
{
ASSERT_ARGS(analyse_life_block)
- Life_range * const l = make_life_range(r, bb->index);
+ Life_range * const l = make_life_range(interp, r, bb->index);
Instruction *special = NULL;
Instruction *ins;
@@ -985,19 +1000,19 @@
const unsigned int n = unit->n_basic_blocks;
IMCC_info(interp, 2, "compute_dominators\n");
- unit->idoms = mem_allocate_n_zeroed_typed(n, int);
- dominators = mem_allocate_n_zeroed_typed(n, Set *);
+ unit->idoms = mem_gc_allocate_n_zeroed_typed(interp, n, int);
+ dominators = mem_gc_allocate_n_zeroed_typed(interp, n, Set *);
unit->dominators = dominators;
- dominators[0] = set_make(n);
+ dominators[0] = set_make(interp, n);
set_add(dominators[0], 0);
for (i = n - 1; i; --i) {
if (unit->bb_list[i]->pred_list) {
- dominators[i] = set_make_full(n);
+ dominators[i] = set_make_full(interp, n);
}
else {
- dominators[i] = set_make(n);
+ dominators[i] = set_make(interp, n);
set_add(dominators[i], i);
}
}
@@ -1034,7 +1049,7 @@
/* TODO: This 'for' should be a breadth-first search for speed */
for (i = 1; i < n; i++) {
- Set * const s = set_copy(dominators[i]);
+ Set * const s = set_copy(interp, dominators[i]);
Edge *edge;
for (edge = unit->bb_list[i]->pred_list;
@@ -1113,12 +1128,12 @@
const int n = unit->n_basic_blocks;
Set ** const dominance_frontiers = unit->dominance_frontiers =
- mem_allocate_n_typed(n, Set *);
+ mem_gc_allocate_n_typed(interp, n, Set *);
IMCC_info(interp, 2, "compute_dominance_frontiers\n");
for (i = 0; i < n; i++) {
- dominance_frontiers[i] = set_make(n);
+ dominance_frontiers[i] = set_make(interp, n);
}
/* for all nodes, b */
@@ -1416,7 +1431,7 @@
"\tcan't determine loop entry block (%d found)\n" , i);
}
- loop = set_make(unit->n_basic_blocks);
+ loop = set_make(interp, unit->n_basic_blocks);
set_add(loop, footer->index);
set_add(loop, header->index);
@@ -1427,7 +1442,7 @@
search_predecessors_not_in(footer, loop);
}
- exits = set_make(unit->n_basic_blocks);
+ exits = set_make(interp, unit->n_basic_blocks);
for (i = 1; i < unit->n_basic_blocks; i++) {
if (set_contains(loop, i)) {
@@ -1443,9 +1458,10 @@
/* now 'loop' contains the set of nodes inside the loop. */
n_loops = unit->n_loops;
- loop_info = mem_realloc_n_typed(unit->loop_info,
- n_loops + 1, Loop_info *);
- loop_info[n_loops] = mem_allocate_typed(Loop_info);
+ loop_info = mem_gc_realloc_n_typed(interp,
+ unit->loop_info,
+ n_loops + 1, Loop_info *);
+ loop_info[n_loops] = mem_gc_allocate_typed(interp, Loop_info);
loop_info[n_loops]->loop = loop;
loop_info[n_loops]->exits = exits;
loop_info[n_loops]->depth = footer->loop_depth;
@@ -1453,6 +1469,8 @@
loop_info[n_loops]->header = header->index;
loop_info[n_loops]->preheader = natural_preheader(unit, loop_info[n_loops]);
+ unit->loop_info = loop_info;
+
unit->n_loops++;
}
@@ -1518,7 +1536,7 @@
/*
-=item C<static void init_basic_blocks(IMC_Unit *unit)>
+=item C<static void init_basic_blocks(PARROT_INTERP, IMC_Unit *unit)>
Initializes the basic blocks memory for this unit.
@@ -1527,7 +1545,7 @@
*/
static void
-init_basic_blocks(ARGMOD(IMC_Unit *unit))
+init_basic_blocks(PARROT_INTERP, ARGMOD(IMC_Unit *unit))
{
ASSERT_ARGS(init_basic_blocks)
@@ -1537,8 +1555,8 @@
unit->n_basic_blocks = 0;
unit->edge_list = NULL;
unit->bb_list_size = 256;
- unit->bb_list = mem_allocate_n_zeroed_typed(unit->bb_list_size,
- Basic_block *);
+ unit->bb_list = mem_gc_allocate_n_zeroed_typed(interp,
+ unit->bb_list_size, Basic_block *);
}
@@ -1576,7 +1594,8 @@
/*
-=item C<static Basic_block* make_basic_block(IMC_Unit *unit, Instruction *ins)>
+=item C<static Basic_block* make_basic_block(PARROT_INTERP, IMC_Unit *unit,
+Instruction *ins)>
Creates, initializes, and returns a new Basic_block.
@@ -1587,10 +1606,10 @@
PARROT_CANNOT_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
static Basic_block*
-make_basic_block(ARGMOD(IMC_Unit *unit), ARGMOD(Instruction *ins))
+make_basic_block(PARROT_INTERP, ARGMOD(IMC_Unit *unit), ARGMOD(Instruction *ins))
{
ASSERT_ARGS(make_basic_block)
- Basic_block * const bb = mem_allocate_typed(Basic_block);
+ Basic_block * const bb = mem_gc_allocate_typed(interp, Basic_block);
int n = unit->n_basic_blocks;
bb->start = ins;
@@ -1605,7 +1624,8 @@
if (n == unit->bb_list_size) {
unit->bb_list_size *= 2;
- mem_realloc_n_typed(unit->bb_list, unit->bb_list_size, Basic_block *);
+ unit->bb_list = mem_gc_realloc_n_typed(interp, unit->bb_list,
+ unit->bb_list_size, Basic_block *);
}
unit->bb_list[n] = bb;
@@ -1617,7 +1637,7 @@
/*
-=item C<Life_range * make_life_range(SymReg *r, int idx)>
+=item C<Life_range * make_life_range(PARROT_INTERP, SymReg *r, int idx)>
Creates and returns a Life_range for the given register at the specified index.
@@ -1628,10 +1648,10 @@
PARROT_MALLOC
PARROT_CANNOT_RETURN_NULL
Life_range *
-make_life_range(ARGMOD(SymReg *r), int idx)
+make_life_range(PARROT_INTERP, ARGMOD(SymReg *r), int idx)
{
ASSERT_ARGS(make_life_range)
- Life_range * const l = mem_allocate_zeroed_typed(Life_range);
+ Life_range * const l = mem_gc_allocate_zeroed_typed(interp, Life_range);
r->life_info[idx] = l;
return l;
Modified: branches/boehm_gc_2/compilers/imcc/cfg.h
==============================================================================
--- branches/boehm_gc_2/compilers/imcc/cfg.h Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/imcc/cfg.h Mon Feb 22 12:30:02 2010 (r44294)
@@ -100,8 +100,9 @@
PARROT_MALLOC
PARROT_CANNOT_RETURN_NULL
-Life_range * make_life_range(ARGMOD(SymReg *r), int idx)
+Life_range * make_life_range(PARROT_INTERP, ARGMOD(SymReg *r), int idx)
__attribute__nonnull__(1)
+ __attribute__nonnull__(2)
FUNC_MODIFIES(*r);
PARROT_WARN_UNUSED_RESULT
@@ -147,7 +148,8 @@
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(unit))
#define ASSERT_ARGS_make_life_range __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(r))
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(r))
#define ASSERT_ARGS_natural_preheader __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(unit) \
, PARROT_ASSERT_ARG(loop_info))
Modified: branches/boehm_gc_2/compilers/imcc/imc.c
==============================================================================
--- branches/boehm_gc_2/compilers/imcc/imc.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/imcc/imc.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -39,12 +39,14 @@
PARROT_CANNOT_RETURN_NULL
PARROT_MALLOC
-static IMC_Unit * imc_new_unit(IMC_Unit_Type t);
+static IMC_Unit * imc_new_unit(PARROT_INTERP, IMC_Unit_Type t)
+ __attribute__nonnull__(1);
#define ASSERT_ARGS_imc_free_unit __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(unit))
-#define ASSERT_ARGS_imc_new_unit __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_imc_new_unit __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: static */
@@ -153,7 +155,7 @@
/*
-=item C<static IMC_Unit * imc_new_unit(IMC_Unit_Type t)>
+=item C<static IMC_Unit * imc_new_unit(PARROT_INTERP, IMC_Unit_Type t)>
Creates a new IMC_Unit of the given IMC_Unit_Type C<t>.
@@ -164,11 +166,11 @@
PARROT_CANNOT_RETURN_NULL
PARROT_MALLOC
static IMC_Unit *
-imc_new_unit(IMC_Unit_Type t)
+imc_new_unit(PARROT_INTERP, IMC_Unit_Type t)
{
ASSERT_ARGS(imc_new_unit)
- IMC_Unit * const unit = mem_allocate_zeroed_typed(IMC_Unit);
- create_symhash(&unit->hash);
+ IMC_Unit * const unit = mem_gc_allocate_zeroed_typed(interp, IMC_Unit);
+ create_symhash(interp, &unit->hash);
unit->type = t;
return unit;
}
@@ -191,14 +193,14 @@
imc_open_unit(PARROT_INTERP, IMC_Unit_Type t)
{
ASSERT_ARGS(imc_open_unit)
- IMC_Unit * const unit = imc_new_unit(t);
+ IMC_Unit * const unit = imc_new_unit(interp, t);
imc_info_t * const imc_info = IMCC_INFO(interp);
if (!imc_info->imc_units)
imc_info->imc_units = unit;
if (!imc_info->ghash.data)
- create_symhash(&imc_info->ghash);
+ create_symhash(interp, &imc_info->ghash);
unit->prev = imc_info->last_unit;
Modified: branches/boehm_gc_2/compilers/imcc/imcc.l
==============================================================================
--- branches/boehm_gc_2/compilers/imcc/imcc.l Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/imcc/imcc.l Mon Feb 22 12:30:02 2010 (r44294)
@@ -787,7 +787,7 @@
static macro_frame_t *
new_frame(PARROT_INTERP) {
static int label = 0;
- macro_frame_t * const tmp = mem_allocate_zeroed_typed(macro_frame_t);
+ macro_frame_t * const tmp = mem_gc_allocate_zeroed_typed(interp, macro_frame_t);
tmp->label = ++label;
tmp->s.line = IMCC_INFO(interp)->line;
@@ -1107,7 +1107,7 @@
m->expansion = NULL;
}
else {
- m = mem_allocate_zeroed_typed(macro_t);
+ m = mem_gc_allocate_zeroed_typed(interp, macro_t);
if (!IMCC_INFO(interp)->macros)
IMCC_INFO(interp)->macros = parrot_new_cstring_hash(interp);
Modified: branches/boehm_gc_2/compilers/imcc/imcc.y
==============================================================================
--- branches/boehm_gc_2/compilers/imcc/imcc.y Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/imcc/imcc.y Mon Feb 22 12:30:02 2010 (r44294)
@@ -43,57 +43,62 @@
/* HEADERIZER BEGIN: static */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-static void add_pcc_named_arg(
+static void add_pcc_named_arg(PARROT_INTERP,
ARGMOD(SymReg *cur_call),
ARGMOD(SymReg *name),
ARGMOD(SymReg *value))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
__attribute__nonnull__(3)
+ __attribute__nonnull__(4)
FUNC_MODIFIES(*cur_call)
FUNC_MODIFIES(*name)
FUNC_MODIFIES(*value);
-static void add_pcc_named_arg_var(
+static void add_pcc_named_arg_var(PARROT_INTERP,
ARGMOD(SymReg *cur_call),
ARGMOD(SymReg *name),
ARGMOD(SymReg *value))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
__attribute__nonnull__(3)
+ __attribute__nonnull__(4)
FUNC_MODIFIES(*cur_call)
FUNC_MODIFIES(*name)
FUNC_MODIFIES(*value);
-static void add_pcc_named_param(
+static void add_pcc_named_param(PARROT_INTERP,
ARGMOD(SymReg *cur_call),
ARGMOD(SymReg *name),
ARGMOD(SymReg *value))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
__attribute__nonnull__(3)
+ __attribute__nonnull__(4)
FUNC_MODIFIES(*cur_call)
FUNC_MODIFIES(*name)
FUNC_MODIFIES(*value);
-static void add_pcc_named_result(
+static void add_pcc_named_result(PARROT_INTERP,
ARGMOD(SymReg *cur_call),
ARGMOD(SymReg *name),
ARGMOD(SymReg *value))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
__attribute__nonnull__(3)
+ __attribute__nonnull__(4)
FUNC_MODIFIES(*cur_call)
FUNC_MODIFIES(*name)
FUNC_MODIFIES(*value);
-static void add_pcc_named_return(
+static void add_pcc_named_return(PARROT_INTERP,
ARGMOD(SymReg *cur_call),
ARGMOD(SymReg *name),
ARGMOD(SymReg *value))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
__attribute__nonnull__(3)
+ __attribute__nonnull__(4)
FUNC_MODIFIES(*cur_call)
FUNC_MODIFIES(*name)
FUNC_MODIFIES(*value);
@@ -251,23 +256,28 @@
FUNC_MODIFIES(*name);
#define ASSERT_ARGS_add_pcc_named_arg __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(cur_call) \
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(cur_call) \
, PARROT_ASSERT_ARG(name) \
, PARROT_ASSERT_ARG(value))
#define ASSERT_ARGS_add_pcc_named_arg_var __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(cur_call) \
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(cur_call) \
, PARROT_ASSERT_ARG(name) \
, PARROT_ASSERT_ARG(value))
#define ASSERT_ARGS_add_pcc_named_param __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(cur_call) \
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(cur_call) \
, PARROT_ASSERT_ARG(name) \
, PARROT_ASSERT_ARG(value))
#define ASSERT_ARGS_add_pcc_named_result __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(cur_call) \
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(cur_call) \
, PARROT_ASSERT_ARG(name) \
, PARROT_ASSERT_ARG(value))
#define ASSERT_ARGS_add_pcc_named_return __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(cur_call) \
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(cur_call) \
, PARROT_ASSERT_ARG(name) \
, PARROT_ASSERT_ARG(value))
#define ASSERT_ARGS_adv_named_set __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
@@ -532,7 +542,7 @@
}
r[1] = rhs;
- rhs->pmc_type = pmc_type(interp,
+ rhs->pmc_type = Parrot_pmc_get_type_str(interp,
Parrot_str_new(interp, unquoted_name, name_length));
mem_sys_free(unquoted_name);
@@ -648,7 +658,7 @@
Instruction * const i = iLABEL(interp, unit, r);
r->type = (r->type & VT_ENCODED) ? VT_PCC_SUB|VT_ENCODED : VT_PCC_SUB;
- r->pcc_sub = mem_allocate_zeroed_typed(pcc_sub_t);
+ r->pcc_sub = mem_gc_allocate_zeroed_typed(interp, pcc_sub_t);
IMCC_INFO(interp)->cur_call = r;
i->line = IMCC_INFO(interp)->line;
@@ -899,105 +909,111 @@
/*
-=item C<static void add_pcc_named_arg(SymReg *cur_call, SymReg *name, SymReg
-*value)>
+=item C<static void add_pcc_named_arg(PARROT_INTERP, SymReg *cur_call, SymReg
+*name, SymReg *value)>
=cut
*/
static void
-add_pcc_named_arg(ARGMOD(SymReg *cur_call),
+add_pcc_named_arg(PARROT_INTERP,
+ ARGMOD(SymReg *cur_call),
ARGMOD(SymReg *name),
ARGMOD(SymReg *value))
{
ASSERT_ARGS(add_pcc_named_arg)
name->type |= VT_NAMED;
- add_pcc_arg(cur_call, name);
- add_pcc_arg(cur_call, value);
+ add_pcc_arg(interp, cur_call, name);
+ add_pcc_arg(interp, cur_call, value);
}
/*
-=item C<static void add_pcc_named_arg_var(SymReg *cur_call, SymReg *name, SymReg
-*value)>
+=item C<static void add_pcc_named_arg_var(PARROT_INTERP, SymReg *cur_call,
+SymReg *name, SymReg *value)>
=cut
*/
static void
-add_pcc_named_arg_var(ARGMOD(SymReg *cur_call),
- ARGMOD(SymReg *name), ARGMOD(SymReg *value))
+add_pcc_named_arg_var(PARROT_INTERP,
+ ARGMOD(SymReg *cur_call),
+ ARGMOD(SymReg *name),
+ ARGMOD(SymReg *value))
{
ASSERT_ARGS(add_pcc_named_arg_var)
name->type |= VT_NAMED;
- add_pcc_arg(cur_call, name);
- add_pcc_arg(cur_call, value);
+ add_pcc_arg(interp, cur_call, name);
+ add_pcc_arg(interp, cur_call, value);
}
/*
-=item C<static void add_pcc_named_result(SymReg *cur_call, SymReg *name, SymReg
-*value)>
+=item C<static void add_pcc_named_result(PARROT_INTERP, SymReg *cur_call, SymReg
+*name, SymReg *value)>
=cut
*/
static void
-add_pcc_named_result(ARGMOD(SymReg *cur_call),
+add_pcc_named_result(PARROT_INTERP,
+ ARGMOD(SymReg *cur_call),
ARGMOD(SymReg *name),
ARGMOD(SymReg *value))
{
ASSERT_ARGS(add_pcc_named_result)
name->type |= VT_NAMED;
- add_pcc_result(cur_call, name);
- add_pcc_result(cur_call, value);
+ add_pcc_result(interp, cur_call, name);
+ add_pcc_result(interp, cur_call, value);
}
/*
-=item C<static void add_pcc_named_param(SymReg *cur_call, SymReg *name, SymReg
-*value)>
+=item C<static void add_pcc_named_param(PARROT_INTERP, SymReg *cur_call, SymReg
+*name, SymReg *value)>
=cut
*/
static void
-add_pcc_named_param(ARGMOD(SymReg *cur_call),
+add_pcc_named_param(PARROT_INTERP,
+ ARGMOD(SymReg *cur_call),
ARGMOD(SymReg *name),
ARGMOD(SymReg *value))
{
ASSERT_ARGS(add_pcc_named_param)
name->type |= VT_NAMED;
- add_pcc_arg(cur_call, name);
- add_pcc_arg(cur_call, value);
+ add_pcc_arg(interp, cur_call, name);
+ add_pcc_arg(interp, cur_call, value);
}
/*
-=item C<static void add_pcc_named_return(SymReg *cur_call, SymReg *name, SymReg
-*value)>
+=item C<static void add_pcc_named_return(PARROT_INTERP, SymReg *cur_call, SymReg
+*name, SymReg *value)>
=cut
*/
static void
-add_pcc_named_return(ARGMOD(SymReg *cur_call),
+add_pcc_named_return(PARROT_INTERP,
+ ARGMOD(SymReg *cur_call),
ARGMOD(SymReg *name),
ARGMOD(SymReg *value))
{
ASSERT_ARGS(add_pcc_named_return)
name->type |= VT_NAMED;
- add_pcc_result(cur_call, name);
- add_pcc_result(cur_call, value);
+ add_pcc_result(interp, cur_call, name);
+ add_pcc_result(interp, cur_call, value);
}
/*
@@ -1387,12 +1403,12 @@
| sub_params sub_param '\n'
{
if (IMCC_INFO(interp)->adv_named_id) {
- add_pcc_named_param(IMCC_INFO(interp)->cur_call,
+ add_pcc_named_param(interp, IMCC_INFO(interp)->cur_call,
IMCC_INFO(interp)->adv_named_id, $2);
IMCC_INFO(interp)->adv_named_id = NULL;
}
else
- add_pcc_arg(IMCC_INFO(interp)->cur_call, $2);
+ add_pcc_arg(interp, IMCC_INFO(interp)->cur_call, $2);
}
;
@@ -1516,17 +1532,17 @@
multi_types:
/* empty */
{
- add_pcc_multi(IMCC_INFO(interp)->cur_call, NULL);
+ add_pcc_multi(interp, IMCC_INFO(interp)->cur_call, NULL);
}
| multi_types COMMA multi_type
{
$$ = 0;
- add_pcc_multi(IMCC_INFO(interp)->cur_call, $3);
+ add_pcc_multi(interp, IMCC_INFO(interp)->cur_call, $3);
}
| multi_type
{
$$ = 0;
- add_pcc_multi(IMCC_INFO(interp)->cur_call, $1);
+ add_pcc_multi(interp, IMCC_INFO(interp)->cur_call, $1);
}
;
@@ -1673,7 +1689,7 @@
pcc_args:
/* empty */ { $$ = 0; }
- | pcc_args pcc_arg '\n' { add_pcc_arg(IMCC_INFO(interp)->cur_call, $2); }
+ | pcc_args pcc_arg '\n' { add_pcc_arg(interp, IMCC_INFO(interp)->cur_call, $2); }
;
pcc_arg:
@@ -1686,7 +1702,7 @@
| pcc_results pcc_result '\n'
{
if ($2)
- add_pcc_result(IMCC_INFO(interp)->cur_call, $2);
+ add_pcc_result(interp, IMCC_INFO(interp)->cur_call, $2);
}
;
@@ -1745,12 +1761,12 @@
| pcc_returns '\n'
{
if ($1)
- add_pcc_result(IMCC_INFO(interp)->sr_return, $1);
+ add_pcc_result(interp, IMCC_INFO(interp)->sr_return, $1);
}
| pcc_returns pcc_return '\n'
{
if ($2)
- add_pcc_result(IMCC_INFO(interp)->sr_return, $2);
+ add_pcc_result(interp, IMCC_INFO(interp)->sr_return, $2);
}
;
@@ -1759,12 +1775,12 @@
| pcc_yields '\n'
{
if ($1)
- add_pcc_result(IMCC_INFO(interp)->sr_return, $1);
+ add_pcc_result(interp, IMCC_INFO(interp)->sr_return, $1);
}
| pcc_yields pcc_set_yield '\n'
{
if ($2)
- add_pcc_result(IMCC_INFO(interp)->sr_return, $2);
+ add_pcc_result(interp, IMCC_INFO(interp)->sr_return, $2);
}
;
@@ -1799,32 +1815,32 @@
| arg
{
if (IMCC_INFO(interp)->adv_named_id) {
- add_pcc_named_return(IMCC_INFO(interp)->sr_return,
+ add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return,
IMCC_INFO(interp)->adv_named_id, $1);
IMCC_INFO(interp)->adv_named_id = NULL;
}
else
- add_pcc_result(IMCC_INFO(interp)->sr_return, $1);
+ add_pcc_result(interp, IMCC_INFO(interp)->sr_return, $1);
}
| STRINGC ADV_ARROW var
{
SymReg * const name = mk_const(interp, $1, 'S');
- add_pcc_named_return(IMCC_INFO(interp)->sr_return, name, $3);
+ add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return, name, $3);
}
| var_returns COMMA arg
{
if (IMCC_INFO(interp)->adv_named_id) {
- add_pcc_named_return(IMCC_INFO(interp)->sr_return,
+ add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return,
IMCC_INFO(interp)->adv_named_id, $3);
IMCC_INFO(interp)->adv_named_id = NULL;
}
else
- add_pcc_result(IMCC_INFO(interp)->sr_return, $3);
+ add_pcc_result(interp, IMCC_INFO(interp)->sr_return, $3);
}
| var_returns COMMA STRINGC ADV_ARROW var
{
SymReg * const name = mk_const(interp, $3, 'S');
- add_pcc_named_return(IMCC_INFO(interp)->sr_return, name, $5);
+ add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return, name, $5);
}
;
@@ -1908,7 +1924,7 @@
id_list_id :
IDENTIFIER opt_unique_reg
{
- IdList* const l = mem_allocate_n_zeroed_typed(1, IdList);
+ IdList* const l = mem_gc_allocate_n_zeroed_typed(interp, 1, IdList);
l->id = $1;
l->unique_reg = $2;
$$ = l;
@@ -2026,7 +2042,7 @@
{
/* there'd normally be a mem_sys_strdup() here, but the lexer already
* copied the string, so it's safe to use directly */
- if ((IMCC_INFO(interp)->cur_pmc_type = pmc_type(interp,
+ if ((IMCC_INFO(interp)->cur_pmc_type = Parrot_pmc_get_type_str(interp,
Parrot_str_new(interp, $1, 0))) <= 0) {
IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
"Unknown PMC type '%s'\n", $1);
@@ -2053,7 +2069,7 @@
/* Subroutine call the short way */
| target '=' sub_call
{
- add_pcc_result($3->symregs[0], $1);
+ add_pcc_result(interp, $3->symregs[0], $1);
IMCC_INFO(interp)->cur_call = NULL;
$$ = 0;
}
@@ -2209,38 +2225,38 @@
{
$$ = 0;
if (IMCC_INFO(interp)->adv_named_id) {
- add_pcc_named_arg(IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, $3);
+ add_pcc_named_arg(interp, IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, $3);
IMCC_INFO(interp)->adv_named_id = NULL;
}
else
- add_pcc_arg(IMCC_INFO(interp)->cur_call, $3);
+ add_pcc_arg(interp, IMCC_INFO(interp)->cur_call, $3);
}
| arg
{
$$ = 0;
if (IMCC_INFO(interp)->adv_named_id) {
- add_pcc_named_arg(IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, $1);
+ add_pcc_named_arg(interp, IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, $1);
IMCC_INFO(interp)->adv_named_id = NULL;
}
else
- add_pcc_arg(IMCC_INFO(interp)->cur_call, $1);
+ add_pcc_arg(interp, IMCC_INFO(interp)->cur_call, $1);
}
| arglist COMMA STRINGC ADV_ARROW var
{
$$ = 0;
- add_pcc_named_arg(IMCC_INFO(interp)->cur_call,
+ add_pcc_named_arg(interp, IMCC_INFO(interp)->cur_call,
mk_const(interp, $3, 'S'), $5);
mem_sys_free($3);
}
| var ADV_ARROW var
{
$$ = 0;
- add_pcc_named_arg_var(IMCC_INFO(interp)->cur_call, $1, $3);
+ add_pcc_named_arg_var(interp, IMCC_INFO(interp)->cur_call, $1, $3);
}
| STRINGC ADV_ARROW var
{
$$ = 0;
- add_pcc_named_arg(IMCC_INFO(interp)->cur_call,
+ add_pcc_named_arg(interp, IMCC_INFO(interp)->cur_call,
mk_const(interp, $1, 'S'), $3);
mem_sys_free($1);
}
@@ -2274,31 +2290,31 @@
{
$$ = 0;
if (IMCC_INFO(interp)->adv_named_id) {
- add_pcc_named_result(IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, $3);
+ add_pcc_named_result(interp, IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, $3);
IMCC_INFO(interp)->adv_named_id = NULL;
}
else
- add_pcc_result(IMCC_INFO(interp)->cur_call, $3);
+ add_pcc_result(interp, IMCC_INFO(interp)->cur_call, $3);
}
| targetlist COMMA STRINGC ADV_ARROW target
{
- add_pcc_named_result(IMCC_INFO(interp)->cur_call,
- mk_const(interp, $3, 'S'), $5);
+ add_pcc_named_result(interp, IMCC_INFO(interp)->cur_call,
+ mk_const(interp, $3, 'S'), $5);
mem_sys_free($3);
}
| result
{
$$ = 0;
if (IMCC_INFO(interp)->adv_named_id) {
- add_pcc_named_result(IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, $1);
+ add_pcc_named_result(interp, IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, $1);
IMCC_INFO(interp)->adv_named_id = NULL;
}
else
- add_pcc_result(IMCC_INFO(interp)->cur_call, $1);
+ add_pcc_result(interp, IMCC_INFO(interp)->cur_call, $1);
}
| STRINGC ADV_ARROW target
{
- add_pcc_named_result(IMCC_INFO(interp)->cur_call, mk_const(interp, $1, 'S'), $3);
+ add_pcc_named_result(interp, IMCC_INFO(interp)->cur_call, mk_const(interp, $1, 'S'), $3);
mem_sys_free($1);
}
| /* empty */ { $$ = 0; }
Modified: branches/boehm_gc_2/compilers/imcc/imclexer.c
==============================================================================
--- branches/boehm_gc_2/compilers/imcc/imclexer.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/imcc/imclexer.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -5209,7 +5209,7 @@
static macro_frame_t *
new_frame(PARROT_INTERP) {
static int label = 0;
- macro_frame_t * const tmp = mem_allocate_zeroed_typed(macro_frame_t);
+ macro_frame_t * const tmp = mem_gc_allocate_zeroed_typed(interp, macro_frame_t);
tmp->label = ++label;
tmp->s.line = IMCC_INFO(interp)->line;
@@ -5529,7 +5529,7 @@
m->expansion = NULL;
}
else {
- m = mem_allocate_zeroed_typed(macro_t);
+ m = mem_gc_allocate_zeroed_typed(interp, macro_t);
if (!IMCC_INFO(interp)->macros)
IMCC_INFO(interp)->macros = parrot_new_cstring_hash(interp);
Modified: branches/boehm_gc_2/compilers/imcc/imcparser.c
==============================================================================
--- branches/boehm_gc_2/compilers/imcc/imcparser.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/imcc/imcparser.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -369,57 +369,62 @@
/* HEADERIZER BEGIN: static */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-static void add_pcc_named_arg(
+static void add_pcc_named_arg(PARROT_INTERP,
ARGMOD(SymReg *cur_call),
ARGMOD(SymReg *name),
ARGMOD(SymReg *value))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
__attribute__nonnull__(3)
+ __attribute__nonnull__(4)
FUNC_MODIFIES(*cur_call)
FUNC_MODIFIES(*name)
FUNC_MODIFIES(*value);
-static void add_pcc_named_arg_var(
+static void add_pcc_named_arg_var(PARROT_INTERP,
ARGMOD(SymReg *cur_call),
ARGMOD(SymReg *name),
ARGMOD(SymReg *value))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
__attribute__nonnull__(3)
+ __attribute__nonnull__(4)
FUNC_MODIFIES(*cur_call)
FUNC_MODIFIES(*name)
FUNC_MODIFIES(*value);
-static void add_pcc_named_param(
+static void add_pcc_named_param(PARROT_INTERP,
ARGMOD(SymReg *cur_call),
ARGMOD(SymReg *name),
ARGMOD(SymReg *value))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
__attribute__nonnull__(3)
+ __attribute__nonnull__(4)
FUNC_MODIFIES(*cur_call)
FUNC_MODIFIES(*name)
FUNC_MODIFIES(*value);
-static void add_pcc_named_result(
+static void add_pcc_named_result(PARROT_INTERP,
ARGMOD(SymReg *cur_call),
ARGMOD(SymReg *name),
ARGMOD(SymReg *value))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
__attribute__nonnull__(3)
+ __attribute__nonnull__(4)
FUNC_MODIFIES(*cur_call)
FUNC_MODIFIES(*name)
FUNC_MODIFIES(*value);
-static void add_pcc_named_return(
+static void add_pcc_named_return(PARROT_INTERP,
ARGMOD(SymReg *cur_call),
ARGMOD(SymReg *name),
ARGMOD(SymReg *value))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
__attribute__nonnull__(3)
+ __attribute__nonnull__(4)
FUNC_MODIFIES(*cur_call)
FUNC_MODIFIES(*name)
FUNC_MODIFIES(*value);
@@ -577,23 +582,28 @@
FUNC_MODIFIES(*name);
#define ASSERT_ARGS_add_pcc_named_arg __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(cur_call) \
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(cur_call) \
, PARROT_ASSERT_ARG(name) \
, PARROT_ASSERT_ARG(value))
#define ASSERT_ARGS_add_pcc_named_arg_var __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(cur_call) \
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(cur_call) \
, PARROT_ASSERT_ARG(name) \
, PARROT_ASSERT_ARG(value))
#define ASSERT_ARGS_add_pcc_named_param __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(cur_call) \
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(cur_call) \
, PARROT_ASSERT_ARG(name) \
, PARROT_ASSERT_ARG(value))
#define ASSERT_ARGS_add_pcc_named_result __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(cur_call) \
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(cur_call) \
, PARROT_ASSERT_ARG(name) \
, PARROT_ASSERT_ARG(value))
#define ASSERT_ARGS_add_pcc_named_return __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(cur_call) \
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(cur_call) \
, PARROT_ASSERT_ARG(name) \
, PARROT_ASSERT_ARG(value))
#define ASSERT_ARGS_adv_named_set __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
@@ -858,7 +868,7 @@
}
r[1] = rhs;
- rhs->pmc_type = pmc_type(interp,
+ rhs->pmc_type = Parrot_pmc_get_type_str(interp,
Parrot_str_new(interp, unquoted_name, name_length));
mem_sys_free(unquoted_name);
@@ -974,7 +984,7 @@
Instruction * const i = iLABEL(interp, unit, r);
r->type = (r->type & VT_ENCODED) ? VT_PCC_SUB|VT_ENCODED : VT_PCC_SUB;
- r->pcc_sub = mem_allocate_zeroed_typed(pcc_sub_t);
+ r->pcc_sub = mem_gc_allocate_zeroed_typed(interp, pcc_sub_t);
IMCC_INFO(interp)->cur_call = r;
i->line = IMCC_INFO(interp)->line;
@@ -1225,105 +1235,111 @@
/*
-=item C<static void add_pcc_named_arg(SymReg *cur_call, SymReg *name, SymReg
-*value)>
+=item C<static void add_pcc_named_arg(PARROT_INTERP, SymReg *cur_call, SymReg
+*name, SymReg *value)>
=cut
*/
static void
-add_pcc_named_arg(ARGMOD(SymReg *cur_call),
+add_pcc_named_arg(PARROT_INTERP,
+ ARGMOD(SymReg *cur_call),
ARGMOD(SymReg *name),
ARGMOD(SymReg *value))
{
ASSERT_ARGS(add_pcc_named_arg)
name->type |= VT_NAMED;
- add_pcc_arg(cur_call, name);
- add_pcc_arg(cur_call, value);
+ add_pcc_arg(interp, cur_call, name);
+ add_pcc_arg(interp, cur_call, value);
}
/*
-=item C<static void add_pcc_named_arg_var(SymReg *cur_call, SymReg *name, SymReg
-*value)>
+=item C<static void add_pcc_named_arg_var(PARROT_INTERP, SymReg *cur_call,
+SymReg *name, SymReg *value)>
=cut
*/
static void
-add_pcc_named_arg_var(ARGMOD(SymReg *cur_call),
- ARGMOD(SymReg *name), ARGMOD(SymReg *value))
+add_pcc_named_arg_var(PARROT_INTERP,
+ ARGMOD(SymReg *cur_call),
+ ARGMOD(SymReg *name),
+ ARGMOD(SymReg *value))
{
ASSERT_ARGS(add_pcc_named_arg_var)
name->type |= VT_NAMED;
- add_pcc_arg(cur_call, name);
- add_pcc_arg(cur_call, value);
+ add_pcc_arg(interp, cur_call, name);
+ add_pcc_arg(interp, cur_call, value);
}
/*
-=item C<static void add_pcc_named_result(SymReg *cur_call, SymReg *name, SymReg
-*value)>
+=item C<static void add_pcc_named_result(PARROT_INTERP, SymReg *cur_call, SymReg
+*name, SymReg *value)>
=cut
*/
static void
-add_pcc_named_result(ARGMOD(SymReg *cur_call),
+add_pcc_named_result(PARROT_INTERP,
+ ARGMOD(SymReg *cur_call),
ARGMOD(SymReg *name),
ARGMOD(SymReg *value))
{
ASSERT_ARGS(add_pcc_named_result)
name->type |= VT_NAMED;
- add_pcc_result(cur_call, name);
- add_pcc_result(cur_call, value);
+ add_pcc_result(interp, cur_call, name);
+ add_pcc_result(interp, cur_call, value);
}
/*
-=item C<static void add_pcc_named_param(SymReg *cur_call, SymReg *name, SymReg
-*value)>
+=item C<static void add_pcc_named_param(PARROT_INTERP, SymReg *cur_call, SymReg
+*name, SymReg *value)>
=cut
*/
static void
-add_pcc_named_param(ARGMOD(SymReg *cur_call),
+add_pcc_named_param(PARROT_INTERP,
+ ARGMOD(SymReg *cur_call),
ARGMOD(SymReg *name),
ARGMOD(SymReg *value))
{
ASSERT_ARGS(add_pcc_named_param)
name->type |= VT_NAMED;
- add_pcc_arg(cur_call, name);
- add_pcc_arg(cur_call, value);
+ add_pcc_arg(interp, cur_call, name);
+ add_pcc_arg(interp, cur_call, value);
}
/*
-=item C<static void add_pcc_named_return(SymReg *cur_call, SymReg *name, SymReg
-*value)>
+=item C<static void add_pcc_named_return(PARROT_INTERP, SymReg *cur_call, SymReg
+*name, SymReg *value)>
=cut
*/
static void
-add_pcc_named_return(ARGMOD(SymReg *cur_call),
+add_pcc_named_return(PARROT_INTERP,
+ ARGMOD(SymReg *cur_call),
ARGMOD(SymReg *name),
ARGMOD(SymReg *value))
{
ASSERT_ARGS(add_pcc_named_return)
name->type |= VT_NAMED;
- add_pcc_result(cur_call, name);
- add_pcc_result(cur_call, value);
+ add_pcc_result(interp, cur_call, name);
+ add_pcc_result(interp, cur_call, value);
}
/*
@@ -1402,7 +1418,7 @@
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 1059 "compilers/imcc/imcc.y"
+#line 1075 "compilers/imcc/imcc.y"
{
IdList * idlist;
int t;
@@ -1411,7 +1427,7 @@
Instruction *i;
}
/* Line 187 of yacc.c. */
-#line 1404 "compilers/imcc/imcparser.c"
+#line 1420 "compilers/imcc/imcparser.c"
YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
@@ -1424,7 +1440,7 @@
/* Line 216 of yacc.c. */
-#line 1417 "compilers/imcc/imcparser.c"
+#line 1433 "compilers/imcc/imcparser.c"
#ifdef short
# undef short
@@ -1845,40 +1861,40 @@
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 1154, 1154, 1158, 1159, 1163, 1164, 1165, 1171, 1177,
- 1178, 1179, 1180, 1184, 1185, 1194, 1200, 1208, 1220, 1233,
- 1233, 1242, 1242, 1249, 1249, 1258, 1259, 1263, 1264, 1268,
- 1269, 1270, 1271, 1272, 1273, 1274, 1277, 1277, 1286, 1285,
- 1298, 1302, 1315, 1319, 1323, 1323, 1335, 1337, 1341, 1356,
- 1360, 1365, 1369, 1373, 1364, 1385, 1386, 1387, 1400, 1400,
- 1404, 1430, 1434, 1440, 1449, 1455, 1464, 1470, 1479, 1485,
- 1494, 1502, 1507, 1518, 1521, 1526, 1534, 1535, 1536, 1537,
- 1538, 1549, 1560, 1563, 1565, 1570, 1569, 1602, 1603, 1607,
- 1608, 1612, 1613, 1617, 1618, 1622, 1623, 1624, 1625, 1626,
- 1627, 1628, 1629, 1630, 1631, 1632, 1633, 1634, 1635, 1639,
- 1644, 1648, 1653, 1657, 1661, 1666, 1675, 1676, 1680, 1685,
- 1686, 1694, 1695, 1695, 1710, 1711, 1715, 1716, 1717, 1718,
- 1719, 1720, 1721, 1722, 1727, 1727, 1730, 1738, 1738, 1744,
- 1745, 1750, 1758, 1759, 1764, 1772, 1776, 1781, 1780, 1793,
- 1794, 1798, 1799, 1809, 1814, 1824, 1833, 1834, 1846, 1850,
- 1852, 1853, 1854, 1855, 1856, 1860, 1861, 1865, 1866, 1870,
- 1881, 1882, 1893, 1900, 1909, 1919, 1920, 1925, 1926, 1927,
- 1927, 1943, 1960, 1973, 1973, 1980, 1981, 1981, 1987, 1993,
- 1997, 2009, 2010, 2011, 2012, 2013, 2014, 2018, 2019, 2020,
- 2021, 2025, 2038, 2040, 2042, 2044, 2046, 2051, 2054, 2061,
- 2060, 2069, 2070, 2071, 2072, 2080, 2081, 2082, 2086, 2087,
- 2088, 2089, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097,
- 2098, 2099, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107,
- 2108, 2114, 2113, 2125, 2130, 2131, 2132, 2133, 2134, 2135,
- 2136, 2137, 2138, 2139, 2140, 2141, 2142, 2147, 2158, 2159,
- 2160, 2161, 2167, 2181, 2187, 2193, 2199, 2198, 2207, 2208,
- 2218, 2228, 2235, 2240, 2250, 2254, 2255, 2259, 2260, 2261,
- 2264, 2265, 2269, 2273, 2283, 2289, 2299, 2304, 2308, 2309,
- 2313, 2317, 2321, 2328, 2332, 2336, 2343, 2344, 2348, 2349,
- 2350, 2351, 2352, 2353, 2357, 2358, 2362, 2363, 2367, 2368,
- 2372, 2373, 2380, 2387, 2388, 2389, 2393, 2394, 2398, 2399,
- 2403, 2404, 2408, 2409, 2413, 2413, 2425, 2425, 2437, 2438,
- 2446, 2453, 2454, 2455, 2456, 2457, 2461, 2462, 2463, 2464
+ 0, 1170, 1170, 1174, 1175, 1179, 1180, 1181, 1187, 1193,
+ 1194, 1195, 1196, 1200, 1201, 1210, 1216, 1224, 1236, 1249,
+ 1249, 1258, 1258, 1265, 1265, 1274, 1275, 1279, 1280, 1284,
+ 1285, 1286, 1287, 1288, 1289, 1290, 1293, 1293, 1302, 1301,
+ 1314, 1318, 1331, 1335, 1339, 1339, 1351, 1353, 1357, 1372,
+ 1376, 1381, 1385, 1389, 1380, 1401, 1402, 1403, 1416, 1416,
+ 1420, 1446, 1450, 1456, 1465, 1471, 1480, 1486, 1495, 1501,
+ 1510, 1518, 1523, 1534, 1537, 1542, 1550, 1551, 1552, 1553,
+ 1554, 1565, 1576, 1579, 1581, 1586, 1585, 1618, 1619, 1623,
+ 1624, 1628, 1629, 1633, 1634, 1638, 1639, 1640, 1641, 1642,
+ 1643, 1644, 1645, 1646, 1647, 1648, 1649, 1650, 1651, 1655,
+ 1660, 1664, 1669, 1673, 1677, 1682, 1691, 1692, 1696, 1701,
+ 1702, 1710, 1711, 1711, 1726, 1727, 1731, 1732, 1733, 1734,
+ 1735, 1736, 1737, 1738, 1743, 1743, 1746, 1754, 1754, 1760,
+ 1761, 1766, 1774, 1775, 1780, 1788, 1792, 1797, 1796, 1809,
+ 1810, 1814, 1815, 1825, 1830, 1840, 1849, 1850, 1862, 1866,
+ 1868, 1869, 1870, 1871, 1872, 1876, 1877, 1881, 1882, 1886,
+ 1897, 1898, 1909, 1916, 1925, 1935, 1936, 1941, 1942, 1943,
+ 1943, 1959, 1976, 1989, 1989, 1996, 1997, 1997, 2003, 2009,
+ 2013, 2025, 2026, 2027, 2028, 2029, 2030, 2034, 2035, 2036,
+ 2037, 2041, 2054, 2056, 2058, 2060, 2062, 2067, 2070, 2077,
+ 2076, 2085, 2086, 2087, 2088, 2096, 2097, 2098, 2102, 2103,
+ 2104, 2105, 2106, 2107, 2108, 2109, 2110, 2111, 2112, 2113,
+ 2114, 2115, 2116, 2117, 2118, 2119, 2120, 2121, 2122, 2123,
+ 2124, 2130, 2129, 2141, 2146, 2147, 2148, 2149, 2150, 2151,
+ 2152, 2153, 2154, 2155, 2156, 2157, 2158, 2163, 2174, 2175,
+ 2176, 2177, 2183, 2197, 2203, 2209, 2215, 2214, 2223, 2224,
+ 2234, 2244, 2251, 2256, 2266, 2270, 2271, 2275, 2276, 2277,
+ 2280, 2281, 2285, 2289, 2299, 2305, 2315, 2320, 2324, 2325,
+ 2329, 2333, 2337, 2344, 2348, 2352, 2359, 2360, 2364, 2365,
+ 2366, 2367, 2368, 2369, 2373, 2374, 2378, 2379, 2383, 2384,
+ 2388, 2389, 2396, 2403, 2404, 2405, 2409, 2410, 2414, 2415,
+ 2419, 2420, 2424, 2425, 2429, 2429, 2441, 2441, 2453, 2454,
+ 2462, 2469, 2470, 2471, 2472, 2473, 2477, 2478, 2479, 2480
};
#endif
@@ -3226,22 +3242,22 @@
switch (yyn)
{
case 2:
-#line 1154 "compilers/imcc/imcc.y"
+#line 1170 "compilers/imcc/imcc.y"
{ if (yynerrs) YYABORT; (yyval.i) = 0; }
break;
case 5:
-#line 1163 "compilers/imcc/imcc.y"
+#line 1179 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
case 6:
-#line 1164 "compilers/imcc/imcc.y"
+#line 1180 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
case 7:
-#line 1166 "compilers/imcc/imcc.y"
+#line 1182 "compilers/imcc/imcc.y"
{
(yyval.i) = (yyvsp[(1) - (1)].i);
imc_close_unit(interp, IMCC_INFO(interp)->cur_unit);
@@ -3250,7 +3266,7 @@
break;
case 8:
-#line 1172 "compilers/imcc/imcc.y"
+#line 1188 "compilers/imcc/imcc.y"
{
(yyval.i) = (yyvsp[(1) - (1)].i);
imc_close_unit(interp, IMCC_INFO(interp)->cur_unit);
@@ -3259,32 +3275,32 @@
break;
case 9:
-#line 1177 "compilers/imcc/imcc.y"
+#line 1193 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 10:
-#line 1178 "compilers/imcc/imcc.y"
+#line 1194 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 11:
-#line 1179 "compilers/imcc/imcc.y"
+#line 1195 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 12:
-#line 1180 "compilers/imcc/imcc.y"
+#line 1196 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 13:
-#line 1184 "compilers/imcc/imcc.y"
+#line 1200 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 14:
-#line 1186 "compilers/imcc/imcc.y"
+#line 1202 "compilers/imcc/imcc.y"
{
(yyval.i) = 0;
do_loadlib(interp, (yyvsp[(2) - (3)].s));
@@ -3293,7 +3309,7 @@
break;
case 15:
-#line 1195 "compilers/imcc/imcc.y"
+#line 1211 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->line = atoi((yyvsp[(2) - (5)].s));
/* set_filename() frees the STRINGC */
@@ -3302,7 +3318,7 @@
break;
case 16:
-#line 1201 "compilers/imcc/imcc.y"
+#line 1217 "compilers/imcc/imcc.y"
{
/* set_filename() frees the STRINGC */
set_filename(interp, (yyvsp[(2) - (3)].s));
@@ -3310,7 +3326,7 @@
break;
case 17:
-#line 1209 "compilers/imcc/imcc.y"
+#line 1225 "compilers/imcc/imcc.y"
{
/* We'll want to store an entry while emitting instructions, so just
* store annotation like it's an instruction. */
@@ -3321,7 +3337,7 @@
break;
case 18:
-#line 1221 "compilers/imcc/imcc.y"
+#line 1237 "compilers/imcc/imcc.y"
{
STRING * const hll_name = Parrot_str_unescape(interp, (yyvsp[(2) - (2)].s) + 1, '"', NULL);
Parrot_pcc_set_HLL(interp, CURRENT_CONTEXT(interp),
@@ -3334,12 +3350,12 @@
break;
case 19:
-#line 1233 "compilers/imcc/imcc.y"
+#line 1249 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 20:
-#line 1234 "compilers/imcc/imcc.y"
+#line 1250 "compilers/imcc/imcc.y"
{
mk_const_ident(interp, (yyvsp[(4) - (6)].s), (yyvsp[(3) - (6)].t), (yyvsp[(6) - (6)].sr), 1);
mem_sys_free((yyvsp[(4) - (6)].s));
@@ -3348,12 +3364,12 @@
break;
case 21:
-#line 1242 "compilers/imcc/imcc.y"
+#line 1258 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 22:
-#line 1243 "compilers/imcc/imcc.y"
+#line 1259 "compilers/imcc/imcc.y"
{
(yyval.i) = mk_pmc_const(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (6)].s), (yyvsp[(4) - (6)].sr), (yyvsp[(6) - (6)].s));
mem_sys_free((yyvsp[(6) - (6)].s));
@@ -3362,12 +3378,12 @@
break;
case 23:
-#line 1249 "compilers/imcc/imcc.y"
+#line 1265 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 24:
-#line 1250 "compilers/imcc/imcc.y"
+#line 1266 "compilers/imcc/imcc.y"
{
(yyval.i) = mk_pmc_const_named(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (6)].s), (yyvsp[(4) - (6)].sr), (yyvsp[(6) - (6)].s));
mem_sys_free((yyvsp[(3) - (6)].s));
@@ -3377,37 +3393,37 @@
break;
case 29:
-#line 1268 "compilers/imcc/imcc.y"
+#line 1284 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 30:
-#line 1269 "compilers/imcc/imcc.y"
+#line 1285 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 31:
-#line 1270 "compilers/imcc/imcc.y"
+#line 1286 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 32:
-#line 1271 "compilers/imcc/imcc.y"
+#line 1287 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 33:
-#line 1272 "compilers/imcc/imcc.y"
+#line 1288 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
case 36:
-#line 1277 "compilers/imcc/imcc.y"
+#line 1293 "compilers/imcc/imcc.y"
{ clear_state(interp); }
break;
case 37:
-#line 1279 "compilers/imcc/imcc.y"
+#line 1295 "compilers/imcc/imcc.y"
{
(yyval.i) = INS(interp, IMCC_INFO(interp)->cur_unit,
(yyvsp[(2) - (3)].s), 0, IMCC_INFO(interp)->regs,
@@ -3417,7 +3433,7 @@
break;
case 38:
-#line 1286 "compilers/imcc/imcc.y"
+#line 1302 "compilers/imcc/imcc.y"
{
imc_close_unit(interp, IMCC_INFO(interp)->cur_unit);
IMCC_INFO(interp)->cur_unit = imc_open_unit(interp, IMC_PASM);
@@ -3425,7 +3441,7 @@
break;
case 39:
-#line 1291 "compilers/imcc/imcc.y"
+#line 1307 "compilers/imcc/imcc.y"
{
(yyval.i) = iSUBROUTINE(interp,
IMCC_INFO(interp)->cur_unit,
@@ -3436,14 +3452,14 @@
break;
case 40:
-#line 1299 "compilers/imcc/imcc.y"
+#line 1315 "compilers/imcc/imcc.y"
{
(yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(2) - (2)].sr));
}
break;
case 41:
-#line 1303 "compilers/imcc/imcc.y"
+#line 1319 "compilers/imcc/imcc.y"
{
char *name = mem_sys_strdup((yyvsp[(2) - (4)].s) + 1);
SymReg *r = mk_pasm_reg(interp, (yyvsp[(4) - (4)].s));
@@ -3459,17 +3475,17 @@
break;
case 42:
-#line 1315 "compilers/imcc/imcc.y"
+#line 1331 "compilers/imcc/imcc.y"
{ (yyval.i) = 0;}
break;
case 44:
-#line 1323 "compilers/imcc/imcc.y"
+#line 1339 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->cur_unit = imc_open_unit(interp, IMC_PASM); }
break;
case 45:
-#line 1326 "compilers/imcc/imcc.y"
+#line 1342 "compilers/imcc/imcc.y"
{
/* if (optimizer_level & OPT_PASM)
imc_compile_unit(interp, IMCC_INFO(interp)->cur_unit);
@@ -3480,7 +3496,7 @@
break;
case 48:
-#line 1342 "compilers/imcc/imcc.y"
+#line 1358 "compilers/imcc/imcc.y"
{
int re_open = 0;
(yyval.i) = 0;
@@ -3495,33 +3511,33 @@
break;
case 49:
-#line 1357 "compilers/imcc/imcc.y"
+#line 1373 "compilers/imcc/imcc.y"
{
(yyval.sr) = (yyvsp[(2) - (3)].sr);
}
break;
case 50:
-#line 1360 "compilers/imcc/imcc.y"
+#line 1376 "compilers/imcc/imcc.y"
{ (yyval.sr) = NULL; }
break;
case 51:
-#line 1365 "compilers/imcc/imcc.y"
+#line 1381 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->cur_unit = imc_open_unit(interp, IMC_PCCSUB);
}
break;
case 52:
-#line 1369 "compilers/imcc/imcc.y"
+#line 1385 "compilers/imcc/imcc.y"
{
iSUBROUTINE(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (3)].sr));
}
break;
case 53:
-#line 1373 "compilers/imcc/imcc.y"
+#line 1389 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->cur_call->pcc_sub->pragma = (yyvsp[(5) - (6)].t);
if (!IMCC_INFO(interp)->cur_unit->instructions->symregs[0]->subid) {
@@ -3532,45 +3548,45 @@
break;
case 54:
-#line 1381 "compilers/imcc/imcc.y"
+#line 1397 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; }
break;
case 55:
-#line 1385 "compilers/imcc/imcc.y"
+#line 1401 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
case 56:
-#line 1386 "compilers/imcc/imcc.y"
+#line 1402 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
case 57:
-#line 1388 "compilers/imcc/imcc.y"
+#line 1404 "compilers/imcc/imcc.y"
{
if (IMCC_INFO(interp)->adv_named_id) {
- add_pcc_named_param(IMCC_INFO(interp)->cur_call,
+ add_pcc_named_param(interp, IMCC_INFO(interp)->cur_call,
IMCC_INFO(interp)->adv_named_id, (yyvsp[(2) - (3)].sr));
IMCC_INFO(interp)->adv_named_id = NULL;
}
else
- add_pcc_arg(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
+ add_pcc_arg(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
}
break;
case 58:
-#line 1400 "compilers/imcc/imcc.y"
+#line 1416 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 59:
-#line 1400 "compilers/imcc/imcc.y"
+#line 1416 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(3) - (3)].sr); IMCC_INFO(interp)->is_def = 0; }
break;
case 60:
-#line 1405 "compilers/imcc/imcc.y"
+#line 1421 "compilers/imcc/imcc.y"
{
if ((yyvsp[(3) - (3)].t) & VT_UNIQUE_REG)
(yyval.sr) = mk_ident_ur(interp, (yyvsp[(2) - (3)].s), (yyvsp[(1) - (3)].t));
@@ -3594,12 +3610,12 @@
break;
case 61:
-#line 1430 "compilers/imcc/imcc.y"
+#line 1446 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
case 62:
-#line 1435 "compilers/imcc/imcc.y"
+#line 1451 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
IMCC_INFO(interp)->cur_unit->outer = mk_sub_address_fromc(interp, (yyvsp[(3) - (4)].s));
@@ -3608,7 +3624,7 @@
break;
case 63:
-#line 1441 "compilers/imcc/imcc.y"
+#line 1457 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
IMCC_INFO(interp)->cur_unit->outer = mk_const(interp, (yyvsp[(3) - (4)].s), 'S');
@@ -3617,7 +3633,7 @@
break;
case 64:
-#line 1450 "compilers/imcc/imcc.y"
+#line 1466 "compilers/imcc/imcc.y"
{
(yyval.t) = P_VTABLE;
IMCC_INFO(interp)->cur_unit->vtable_name = NULL;
@@ -3626,7 +3642,7 @@
break;
case 65:
-#line 1456 "compilers/imcc/imcc.y"
+#line 1472 "compilers/imcc/imcc.y"
{
(yyval.t) = P_VTABLE;
IMCC_INFO(interp)->cur_unit->vtable_name = (yyvsp[(3) - (4)].s);
@@ -3635,7 +3651,7 @@
break;
case 66:
-#line 1465 "compilers/imcc/imcc.y"
+#line 1481 "compilers/imcc/imcc.y"
{
(yyval.t) = P_METHOD;
IMCC_INFO(interp)->cur_unit->method_name = NULL;
@@ -3644,7 +3660,7 @@
break;
case 67:
-#line 1471 "compilers/imcc/imcc.y"
+#line 1487 "compilers/imcc/imcc.y"
{
(yyval.t) = P_METHOD;
IMCC_INFO(interp)->cur_unit->method_name = (yyvsp[(3) - (4)].s);
@@ -3653,7 +3669,7 @@
break;
case 68:
-#line 1480 "compilers/imcc/imcc.y"
+#line 1496 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
IMCC_INFO(interp)->cur_unit->ns_entry_name = NULL;
@@ -3662,7 +3678,7 @@
break;
case 69:
-#line 1486 "compilers/imcc/imcc.y"
+#line 1502 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
IMCC_INFO(interp)->cur_unit->ns_entry_name = (yyvsp[(3) - (4)].s);
@@ -3671,7 +3687,7 @@
break;
case 70:
-#line 1495 "compilers/imcc/imcc.y"
+#line 1511 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
IMCC_INFO(interp)->cur_unit->instance_of = (yyvsp[(3) - (4)].s);
@@ -3679,7 +3695,7 @@
break;
case 71:
-#line 1503 "compilers/imcc/imcc.y"
+#line 1519 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
IMCC_INFO(interp)->cur_unit->subid = NULL;
@@ -3687,7 +3703,7 @@
break;
case 72:
-#line 1508 "compilers/imcc/imcc.y"
+#line 1524 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
IMCC_INFO(interp)->cur_unit->subid = mk_const(interp, (yyvsp[(3) - (4)].s), 'S');
@@ -3697,50 +3713,50 @@
break;
case 73:
-#line 1518 "compilers/imcc/imcc.y"
+#line 1534 "compilers/imcc/imcc.y"
{
- add_pcc_multi(IMCC_INFO(interp)->cur_call, NULL);
+ add_pcc_multi(interp, IMCC_INFO(interp)->cur_call, NULL);
}
break;
case 74:
-#line 1522 "compilers/imcc/imcc.y"
+#line 1538 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
- add_pcc_multi(IMCC_INFO(interp)->cur_call, (yyvsp[(3) - (3)].sr));
+ add_pcc_multi(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(3) - (3)].sr));
}
break;
case 75:
-#line 1527 "compilers/imcc/imcc.y"
+#line 1543 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
- add_pcc_multi(IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (1)].sr));
+ add_pcc_multi(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (1)].sr));
}
break;
case 76:
-#line 1534 "compilers/imcc/imcc.y"
+#line 1550 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, "INTVAL", 'S'); }
break;
case 77:
-#line 1535 "compilers/imcc/imcc.y"
+#line 1551 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, "FLOATVAL", 'S'); }
break;
case 78:
-#line 1536 "compilers/imcc/imcc.y"
+#line 1552 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, "PMC", 'S'); }
break;
case 79:
-#line 1537 "compilers/imcc/imcc.y"
+#line 1553 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, "STRING", 'S'); }
break;
case 80:
-#line 1539 "compilers/imcc/imcc.y"
+#line 1555 "compilers/imcc/imcc.y"
{
SymReg *r;
if (strcmp((yyvsp[(1) - (1)].s), "_") != 0)
@@ -3754,7 +3770,7 @@
break;
case 81:
-#line 1550 "compilers/imcc/imcc.y"
+#line 1566 "compilers/imcc/imcc.y"
{
SymReg *r;
if (strcmp((yyvsp[(1) - (1)].s), "_") != 0)
@@ -3768,12 +3784,12 @@
break;
case 82:
-#line 1560 "compilers/imcc/imcc.y"
+#line 1576 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(2) - (3)].sr); }
break;
case 85:
-#line 1570 "compilers/imcc/imcc.y"
+#line 1586 "compilers/imcc/imcc.y"
{
char name[128];
SymReg *r, *r1;
@@ -3800,82 +3816,82 @@
break;
case 86:
-#line 1598 "compilers/imcc/imcc.y"
+#line 1614 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; }
break;
case 87:
-#line 1602 "compilers/imcc/imcc.y"
+#line 1618 "compilers/imcc/imcc.y"
{ (yyval.i) = NULL; IMCC_INFO(interp)->cur_call->pcc_sub->label = 0; }
break;
case 88:
-#line 1603 "compilers/imcc/imcc.y"
+#line 1619 "compilers/imcc/imcc.y"
{ (yyval.i) = NULL; IMCC_INFO(interp)->cur_call->pcc_sub->label = 1; }
break;
case 89:
-#line 1607 "compilers/imcc/imcc.y"
+#line 1623 "compilers/imcc/imcc.y"
{ (yyval.i) = NULL; }
break;
case 90:
-#line 1608 "compilers/imcc/imcc.y"
+#line 1624 "compilers/imcc/imcc.y"
{ (yyval.i) = NULL; IMCC_INFO(interp)->cur_call->pcc_sub->object = (yyvsp[(2) - (3)].sr); }
break;
case 91:
-#line 1612 "compilers/imcc/imcc.y"
+#line 1628 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
case 93:
-#line 1617 "compilers/imcc/imcc.y"
+#line 1633 "compilers/imcc/imcc.y"
{ (yyval.t) = (yyvsp[(1) - (1)].t); }
break;
case 94:
-#line 1618 "compilers/imcc/imcc.y"
+#line 1634 "compilers/imcc/imcc.y"
{ (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); }
break;
case 95:
-#line 1622 "compilers/imcc/imcc.y"
+#line 1638 "compilers/imcc/imcc.y"
{ (yyval.t) = P_LOAD; }
break;
case 96:
-#line 1623 "compilers/imcc/imcc.y"
+#line 1639 "compilers/imcc/imcc.y"
{ (yyval.t) = P_INIT; }
break;
case 97:
-#line 1624 "compilers/imcc/imcc.y"
+#line 1640 "compilers/imcc/imcc.y"
{ (yyval.t) = P_MAIN; }
break;
case 98:
-#line 1625 "compilers/imcc/imcc.y"
+#line 1641 "compilers/imcc/imcc.y"
{ (yyval.t) = P_IMMEDIATE; }
break;
case 99:
-#line 1626 "compilers/imcc/imcc.y"
+#line 1642 "compilers/imcc/imcc.y"
{ (yyval.t) = P_POSTCOMP; }
break;
case 100:
-#line 1627 "compilers/imcc/imcc.y"
+#line 1643 "compilers/imcc/imcc.y"
{ (yyval.t) = P_ANON; }
break;
case 101:
-#line 1628 "compilers/imcc/imcc.y"
+#line 1644 "compilers/imcc/imcc.y"
{ (yyval.t) = P_NEED_LEX; }
break;
case 109:
-#line 1640 "compilers/imcc/imcc.y"
+#line 1656 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (5)].sr));
add_pcc_cc(IMCC_INFO(interp)->cur_call, (yyvsp[(4) - (5)].sr));
@@ -3883,14 +3899,14 @@
break;
case 110:
-#line 1645 "compilers/imcc/imcc.y"
+#line 1661 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
}
break;
case 111:
-#line 1649 "compilers/imcc/imcc.y"
+#line 1665 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
IMCC_INFO(interp)->cur_call->pcc_sub->flags |= isNCI;
@@ -3898,21 +3914,21 @@
break;
case 112:
-#line 1654 "compilers/imcc/imcc.y"
+#line 1670 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
}
break;
case 113:
-#line 1658 "compilers/imcc/imcc.y"
+#line 1674 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, mk_const(interp, (yyvsp[(2) - (3)].s), 'S'));
}
break;
case 114:
-#line 1662 "compilers/imcc/imcc.y"
+#line 1678 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (5)].sr));
add_pcc_cc(IMCC_INFO(interp)->cur_call, (yyvsp[(4) - (5)].sr));
@@ -3920,7 +3936,7 @@
break;
case 115:
-#line 1667 "compilers/imcc/imcc.y"
+#line 1683 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, mk_const(interp, (yyvsp[(2) - (5)].s), 'S'));
add_pcc_cc(IMCC_INFO(interp)->cur_call, (yyvsp[(4) - (5)].sr));
@@ -3928,45 +3944,45 @@
break;
case 116:
-#line 1675 "compilers/imcc/imcc.y"
+#line 1691 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
case 117:
-#line 1676 "compilers/imcc/imcc.y"
- { add_pcc_arg(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr)); }
+#line 1692 "compilers/imcc/imcc.y"
+ { add_pcc_arg(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr)); }
break;
case 118:
-#line 1680 "compilers/imcc/imcc.y"
+#line 1696 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(2) - (2)].sr); }
break;
case 119:
-#line 1685 "compilers/imcc/imcc.y"
+#line 1701 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
case 120:
-#line 1687 "compilers/imcc/imcc.y"
+#line 1703 "compilers/imcc/imcc.y"
{
if ((yyvsp[(2) - (3)].sr))
- add_pcc_result(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
+ add_pcc_result(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
}
break;
case 121:
-#line 1694 "compilers/imcc/imcc.y"
+#line 1710 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(2) - (3)].sr); (yyval.sr)->type |= (yyvsp[(3) - (3)].t); }
break;
case 122:
-#line 1695 "compilers/imcc/imcc.y"
+#line 1711 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 123:
-#line 1696 "compilers/imcc/imcc.y"
+#line 1712 "compilers/imcc/imcc.y"
{
IdList * const l = (yyvsp[(4) - (4)].idlist);
SymReg *ignored;
@@ -3981,67 +3997,67 @@
break;
case 124:
-#line 1710 "compilers/imcc/imcc.y"
+#line 1726 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
case 125:
-#line 1711 "compilers/imcc/imcc.y"
+#line 1727 "compilers/imcc/imcc.y"
{ (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); }
break;
case 126:
-#line 1715 "compilers/imcc/imcc.y"
+#line 1731 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_FLAT; }
break;
case 127:
-#line 1716 "compilers/imcc/imcc.y"
+#line 1732 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_OPTIONAL; }
break;
case 128:
-#line 1717 "compilers/imcc/imcc.y"
+#line 1733 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_OPT_FLAG; }
break;
case 129:
-#line 1718 "compilers/imcc/imcc.y"
+#line 1734 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_NAMED; }
break;
case 130:
-#line 1719 "compilers/imcc/imcc.y"
+#line 1735 "compilers/imcc/imcc.y"
{ adv_named_set(interp, (yyvsp[(3) - (4)].s)); (yyval.t) = 0; mem_sys_free((yyvsp[(3) - (4)].s)); }
break;
case 131:
-#line 1720 "compilers/imcc/imcc.y"
+#line 1736 "compilers/imcc/imcc.y"
{ adv_named_set_u(interp, (yyvsp[(3) - (4)].s)); (yyval.t) = 0; mem_sys_free((yyvsp[(3) - (4)].s)); }
break;
case 132:
-#line 1721 "compilers/imcc/imcc.y"
+#line 1737 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_UNIQUE_REG; }
break;
case 133:
-#line 1722 "compilers/imcc/imcc.y"
+#line 1738 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_CALL_SIG; }
break;
case 134:
-#line 1727 "compilers/imcc/imcc.y"
+#line 1743 "compilers/imcc/imcc.y"
{ begin_return_or_yield(interp, 0); }
break;
case 135:
-#line 1729 "compilers/imcc/imcc.y"
+#line 1745 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; IMCC_INFO(interp)->asm_state = AsmDefault; }
break;
case 136:
-#line 1731 "compilers/imcc/imcc.y"
+#line 1747 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->asm_state = AsmDefault;
(yyval.i) = 0;
@@ -4049,69 +4065,69 @@
break;
case 137:
-#line 1738 "compilers/imcc/imcc.y"
+#line 1754 "compilers/imcc/imcc.y"
{ begin_return_or_yield(interp, 1); }
break;
case 138:
-#line 1740 "compilers/imcc/imcc.y"
+#line 1756 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; IMCC_INFO(interp)->asm_state = AsmDefault; }
break;
case 139:
-#line 1744 "compilers/imcc/imcc.y"
+#line 1760 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
case 140:
-#line 1746 "compilers/imcc/imcc.y"
+#line 1762 "compilers/imcc/imcc.y"
{
if ((yyvsp[(1) - (2)].sr))
- add_pcc_result(IMCC_INFO(interp)->sr_return, (yyvsp[(1) - (2)].sr));
+ add_pcc_result(interp, IMCC_INFO(interp)->sr_return, (yyvsp[(1) - (2)].sr));
}
break;
case 141:
-#line 1751 "compilers/imcc/imcc.y"
+#line 1767 "compilers/imcc/imcc.y"
{
if ((yyvsp[(2) - (3)].sr))
- add_pcc_result(IMCC_INFO(interp)->sr_return, (yyvsp[(2) - (3)].sr));
+ add_pcc_result(interp, IMCC_INFO(interp)->sr_return, (yyvsp[(2) - (3)].sr));
}
break;
case 142:
-#line 1758 "compilers/imcc/imcc.y"
+#line 1774 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
case 143:
-#line 1760 "compilers/imcc/imcc.y"
+#line 1776 "compilers/imcc/imcc.y"
{
if ((yyvsp[(1) - (2)].sr))
- add_pcc_result(IMCC_INFO(interp)->sr_return, (yyvsp[(1) - (2)].sr));
+ add_pcc_result(interp, IMCC_INFO(interp)->sr_return, (yyvsp[(1) - (2)].sr));
}
break;
case 144:
-#line 1765 "compilers/imcc/imcc.y"
+#line 1781 "compilers/imcc/imcc.y"
{
if ((yyvsp[(2) - (3)].sr))
- add_pcc_result(IMCC_INFO(interp)->sr_return, (yyvsp[(2) - (3)].sr));
+ add_pcc_result(interp, IMCC_INFO(interp)->sr_return, (yyvsp[(2) - (3)].sr));
}
break;
case 145:
-#line 1772 "compilers/imcc/imcc.y"
+#line 1788 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(2) - (3)].sr); (yyval.sr)->type |= (yyvsp[(3) - (3)].t); }
break;
case 146:
-#line 1776 "compilers/imcc/imcc.y"
+#line 1792 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(2) - (3)].sr); (yyval.sr)->type |= (yyvsp[(3) - (3)].t); }
break;
case 147:
-#line 1781 "compilers/imcc/imcc.y"
+#line 1797 "compilers/imcc/imcc.y"
{
if (IMCC_INFO(interp)->asm_state == AsmDefault)
begin_return_or_yield(interp, (yyvsp[(1) - (2)].t));
@@ -4119,7 +4135,7 @@
break;
case 148:
-#line 1786 "compilers/imcc/imcc.y"
+#line 1802 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->asm_state = AsmDefault;
(yyval.t) = 0;
@@ -4127,104 +4143,104 @@
break;
case 149:
-#line 1793 "compilers/imcc/imcc.y"
+#line 1809 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
case 150:
-#line 1794 "compilers/imcc/imcc.y"
+#line 1810 "compilers/imcc/imcc.y"
{ (yyval.t) = 1; }
break;
case 151:
-#line 1798 "compilers/imcc/imcc.y"
+#line 1814 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 152:
-#line 1800 "compilers/imcc/imcc.y"
+#line 1816 "compilers/imcc/imcc.y"
{
if (IMCC_INFO(interp)->adv_named_id) {
- add_pcc_named_return(IMCC_INFO(interp)->sr_return,
+ add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return,
IMCC_INFO(interp)->adv_named_id, (yyvsp[(1) - (1)].sr));
IMCC_INFO(interp)->adv_named_id = NULL;
}
else
- add_pcc_result(IMCC_INFO(interp)->sr_return, (yyvsp[(1) - (1)].sr));
+ add_pcc_result(interp, IMCC_INFO(interp)->sr_return, (yyvsp[(1) - (1)].sr));
}
break;
case 153:
-#line 1810 "compilers/imcc/imcc.y"
+#line 1826 "compilers/imcc/imcc.y"
{
SymReg * const name = mk_const(interp, (yyvsp[(1) - (3)].s), 'S');
- add_pcc_named_return(IMCC_INFO(interp)->sr_return, name, (yyvsp[(3) - (3)].sr));
+ add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return, name, (yyvsp[(3) - (3)].sr));
}
break;
case 154:
-#line 1815 "compilers/imcc/imcc.y"
+#line 1831 "compilers/imcc/imcc.y"
{
if (IMCC_INFO(interp)->adv_named_id) {
- add_pcc_named_return(IMCC_INFO(interp)->sr_return,
+ add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return,
IMCC_INFO(interp)->adv_named_id, (yyvsp[(3) - (3)].sr));
IMCC_INFO(interp)->adv_named_id = NULL;
}
else
- add_pcc_result(IMCC_INFO(interp)->sr_return, (yyvsp[(3) - (3)].sr));
+ add_pcc_result(interp, IMCC_INFO(interp)->sr_return, (yyvsp[(3) - (3)].sr));
}
break;
case 155:
-#line 1825 "compilers/imcc/imcc.y"
+#line 1841 "compilers/imcc/imcc.y"
{
SymReg * const name = mk_const(interp, (yyvsp[(3) - (5)].s), 'S');
- add_pcc_named_return(IMCC_INFO(interp)->sr_return, name, (yyvsp[(5) - (5)].sr));
+ add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return, name, (yyvsp[(5) - (5)].sr));
}
break;
case 158:
-#line 1846 "compilers/imcc/imcc.y"
+#line 1862 "compilers/imcc/imcc.y"
{ clear_state(interp); }
break;
case 159:
-#line 1851 "compilers/imcc/imcc.y"
+#line 1867 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(2) - (2)].i); }
break;
case 160:
-#line 1852 "compilers/imcc/imcc.y"
+#line 1868 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 161:
-#line 1853 "compilers/imcc/imcc.y"
+#line 1869 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 162:
-#line 1854 "compilers/imcc/imcc.y"
+#line 1870 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 163:
-#line 1855 "compilers/imcc/imcc.y"
+#line 1871 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 164:
-#line 1856 "compilers/imcc/imcc.y"
+#line 1872 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
case 165:
-#line 1860 "compilers/imcc/imcc.y"
+#line 1876 "compilers/imcc/imcc.y"
{ (yyval.i) = NULL; }
break;
case 169:
-#line 1871 "compilers/imcc/imcc.y"
+#line 1887 "compilers/imcc/imcc.y"
{
Instruction * const i = iLABEL(interp, IMCC_INFO(interp)->cur_unit, mk_local_label(interp, (yyvsp[(1) - (1)].s)));
mem_sys_free((yyvsp[(1) - (1)].s));
@@ -4233,12 +4249,12 @@
break;
case 170:
-#line 1881 "compilers/imcc/imcc.y"
+#line 1897 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(2) - (3)].i); }
break;
case 171:
-#line 1883 "compilers/imcc/imcc.y"
+#line 1899 "compilers/imcc/imcc.y"
{
if (yynerrs >= PARROT_MAX_RECOVER_ERRORS) {
IMCC_warning(interp, "Too many errors. Correct some first.\n");
@@ -4249,7 +4265,7 @@
break;
case 172:
-#line 1894 "compilers/imcc/imcc.y"
+#line 1910 "compilers/imcc/imcc.y"
{
IdList* const l = (yyvsp[(1) - (1)].idlist);
l->next = NULL;
@@ -4258,7 +4274,7 @@
break;
case 173:
-#line 1901 "compilers/imcc/imcc.y"
+#line 1917 "compilers/imcc/imcc.y"
{
IdList* const l = (yyvsp[(3) - (3)].idlist);
l->next = (yyvsp[(1) - (3)].idlist);
@@ -4267,9 +4283,9 @@
break;
case 174:
-#line 1910 "compilers/imcc/imcc.y"
+#line 1926 "compilers/imcc/imcc.y"
{
- IdList* const l = mem_allocate_n_zeroed_typed(1, IdList);
+ IdList* const l = mem_gc_allocate_n_zeroed_typed(interp, 1, IdList);
l->id = (yyvsp[(1) - (2)].s);
l->unique_reg = (yyvsp[(2) - (2)].t);
(yyval.idlist) = l;
@@ -4277,22 +4293,22 @@
break;
case 175:
-#line 1919 "compilers/imcc/imcc.y"
+#line 1935 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
case 176:
-#line 1920 "compilers/imcc/imcc.y"
+#line 1936 "compilers/imcc/imcc.y"
{ (yyval.t) = 1; }
break;
case 179:
-#line 1927 "compilers/imcc/imcc.y"
+#line 1943 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 180:
-#line 1928 "compilers/imcc/imcc.y"
+#line 1944 "compilers/imcc/imcc.y"
{
IdList *l = (yyvsp[(4) - (4)].idlist);
while (l) {
@@ -4311,7 +4327,7 @@
break;
case 181:
-#line 1944 "compilers/imcc/imcc.y"
+#line 1960 "compilers/imcc/imcc.y"
{
if ((yyvsp[(4) - (4)].sr)->set != 'P') {
mem_sys_free((yyvsp[(2) - (4)].s));
@@ -4331,7 +4347,7 @@
break;
case 182:
-#line 1961 "compilers/imcc/imcc.y"
+#line 1977 "compilers/imcc/imcc.y"
{
if ((yyvsp[(4) - (4)].sr)->set != 'P') {
mem_sys_free((yyvsp[(2) - (4)].s));
@@ -4347,12 +4363,12 @@
break;
case 183:
-#line 1973 "compilers/imcc/imcc.y"
+#line 1989 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 184:
-#line 1974 "compilers/imcc/imcc.y"
+#line 1990 "compilers/imcc/imcc.y"
{
mk_const_ident(interp, (yyvsp[(4) - (6)].s), (yyvsp[(3) - (6)].t), (yyvsp[(6) - (6)].sr), 0);
IMCC_INFO(interp)->is_def = 0;
@@ -4361,12 +4377,12 @@
break;
case 186:
-#line 1981 "compilers/imcc/imcc.y"
+#line 1997 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 187:
-#line 1982 "compilers/imcc/imcc.y"
+#line 1998 "compilers/imcc/imcc.y"
{
mk_const_ident(interp, (yyvsp[(4) - (6)].s), (yyvsp[(3) - (6)].t), (yyvsp[(6) - (6)].sr), 1);
IMCC_INFO(interp)->is_def = 0;
@@ -4375,7 +4391,7 @@
break;
case 188:
-#line 1988 "compilers/imcc/imcc.y"
+#line 2004 "compilers/imcc/imcc.y"
{
(yyval.i) = NULL;
IMCC_INFO(interp)->cur_call->pcc_sub->flags |= isTAIL_CALL;
@@ -4384,14 +4400,14 @@
break;
case 189:
-#line 1994 "compilers/imcc/imcc.y"
+#line 2010 "compilers/imcc/imcc.y"
{
(yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "branch", 1, (yyvsp[(2) - (2)].sr));
}
break;
case 190:
-#line 1998 "compilers/imcc/imcc.y"
+#line 2014 "compilers/imcc/imcc.y"
{
(yyval.i) = INS(interp,
IMCC_INFO(interp)->cur_unit,
@@ -4406,51 +4422,51 @@
break;
case 191:
-#line 2009 "compilers/imcc/imcc.y"
+#line 2025 "compilers/imcc/imcc.y"
{ (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(2) - (2)].sr)); }
break;
case 192:
-#line 2010 "compilers/imcc/imcc.y"
+#line 2026 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; }
break;
case 193:
-#line 2011 "compilers/imcc/imcc.y"
+#line 2027 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 196:
-#line 2014 "compilers/imcc/imcc.y"
+#line 2030 "compilers/imcc/imcc.y"
{ (yyval.i) = 0;}
break;
case 197:
-#line 2018 "compilers/imcc/imcc.y"
+#line 2034 "compilers/imcc/imcc.y"
{ (yyval.t) = 'I'; }
break;
case 198:
-#line 2019 "compilers/imcc/imcc.y"
+#line 2035 "compilers/imcc/imcc.y"
{ (yyval.t) = 'N'; }
break;
case 199:
-#line 2020 "compilers/imcc/imcc.y"
+#line 2036 "compilers/imcc/imcc.y"
{ (yyval.t) = 'S'; }
break;
case 200:
-#line 2021 "compilers/imcc/imcc.y"
+#line 2037 "compilers/imcc/imcc.y"
{ (yyval.t) = 'P'; }
break;
case 201:
-#line 2026 "compilers/imcc/imcc.y"
+#line 2042 "compilers/imcc/imcc.y"
{
/* there'd normally be a mem_sys_strdup() here, but the lexer already
* copied the string, so it's safe to use directly */
- if ((IMCC_INFO(interp)->cur_pmc_type = pmc_type(interp,
+ if ((IMCC_INFO(interp)->cur_pmc_type = Parrot_pmc_get_type_str(interp,
Parrot_str_new(interp, (yyvsp[(1) - (1)].s), 0))) <= 0) {
IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
"Unknown PMC type '%s'\n", (yyvsp[(1) - (1)].s));
@@ -4459,53 +4475,53 @@
break;
case 202:
-#line 2039 "compilers/imcc/imcc.y"
+#line 2055 "compilers/imcc/imcc.y"
{ (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "set", 2, (yyvsp[(1) - (3)].sr), (yyvsp[(3) - (3)].sr)); }
break;
case 203:
-#line 2041 "compilers/imcc/imcc.y"
+#line 2057 "compilers/imcc/imcc.y"
{ (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (4)].s), 2, (yyvsp[(1) - (4)].sr), (yyvsp[(4) - (4)].sr)); }
break;
case 204:
-#line 2043 "compilers/imcc/imcc.y"
+#line 2059 "compilers/imcc/imcc.y"
{ (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(4) - (5)].s), 3, (yyvsp[(1) - (5)].sr), (yyvsp[(3) - (5)].sr), (yyvsp[(5) - (5)].sr)); }
break;
case 205:
-#line 2045 "compilers/imcc/imcc.y"
+#line 2061 "compilers/imcc/imcc.y"
{ (yyval.i) = iINDEXFETCH(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(1) - (6)].sr), (yyvsp[(3) - (6)].sr), (yyvsp[(5) - (6)].sr)); }
break;
case 206:
-#line 2047 "compilers/imcc/imcc.y"
+#line 2063 "compilers/imcc/imcc.y"
{ (yyval.i) = iINDEXSET(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(1) - (6)].sr), (yyvsp[(3) - (6)].sr), (yyvsp[(6) - (6)].sr)); }
break;
case 207:
-#line 2052 "compilers/imcc/imcc.y"
+#line 2068 "compilers/imcc/imcc.y"
{ (yyval.i) = iNEW(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(1) - (7)].sr), (yyvsp[(4) - (7)].s), (yyvsp[(6) - (7)].sr), 1); }
break;
case 208:
-#line 2055 "compilers/imcc/imcc.y"
+#line 2071 "compilers/imcc/imcc.y"
{
- add_pcc_result((yyvsp[(3) - (3)].i)->symregs[0], (yyvsp[(1) - (3)].sr));
+ add_pcc_result(interp, (yyvsp[(3) - (3)].i)->symregs[0], (yyvsp[(1) - (3)].sr));
IMCC_INFO(interp)->cur_call = NULL;
(yyval.i) = 0;
}
break;
case 209:
-#line 2061 "compilers/imcc/imcc.y"
+#line 2077 "compilers/imcc/imcc.y"
{
(yyval.i) = IMCC_create_itcall_label(interp);
}
break;
case 210:
-#line 2065 "compilers/imcc/imcc.y"
+#line 2081 "compilers/imcc/imcc.y"
{
IMCC_itcall_sub(interp, (yyvsp[(6) - (9)].sr));
IMCC_INFO(interp)->cur_call = NULL;
@@ -4513,144 +4529,144 @@
break;
case 214:
-#line 2073 "compilers/imcc/imcc.y"
+#line 2089 "compilers/imcc/imcc.y"
{
(yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(1) - (3)].sr));
}
break;
case 215:
-#line 2080 "compilers/imcc/imcc.y"
+#line 2096 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"not"; }
break;
case 216:
-#line 2081 "compilers/imcc/imcc.y"
+#line 2097 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"bnot"; }
break;
case 217:
-#line 2082 "compilers/imcc/imcc.y"
+#line 2098 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"neg"; }
break;
case 218:
-#line 2086 "compilers/imcc/imcc.y"
+#line 2102 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"sub"; }
break;
case 219:
-#line 2087 "compilers/imcc/imcc.y"
+#line 2103 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"add"; }
break;
case 220:
-#line 2088 "compilers/imcc/imcc.y"
+#line 2104 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"mul"; }
break;
case 221:
-#line 2089 "compilers/imcc/imcc.y"
+#line 2105 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"div"; }
break;
case 222:
-#line 2090 "compilers/imcc/imcc.y"
+#line 2106 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"mod"; }
break;
case 223:
-#line 2091 "compilers/imcc/imcc.y"
+#line 2107 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"fdiv"; }
break;
case 224:
-#line 2092 "compilers/imcc/imcc.y"
+#line 2108 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"pow"; }
break;
case 225:
-#line 2093 "compilers/imcc/imcc.y"
+#line 2109 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"concat"; }
break;
case 226:
-#line 2094 "compilers/imcc/imcc.y"
+#line 2110 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"iseq"; }
break;
case 227:
-#line 2095 "compilers/imcc/imcc.y"
+#line 2111 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"isne"; }
break;
case 228:
-#line 2096 "compilers/imcc/imcc.y"
+#line 2112 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"isgt"; }
break;
case 229:
-#line 2097 "compilers/imcc/imcc.y"
+#line 2113 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"isge"; }
break;
case 230:
-#line 2098 "compilers/imcc/imcc.y"
+#line 2114 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"islt"; }
break;
case 231:
-#line 2099 "compilers/imcc/imcc.y"
+#line 2115 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"isle"; }
break;
case 232:
-#line 2100 "compilers/imcc/imcc.y"
+#line 2116 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"shl"; }
break;
case 233:
-#line 2101 "compilers/imcc/imcc.y"
+#line 2117 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"shr"; }
break;
case 234:
-#line 2102 "compilers/imcc/imcc.y"
+#line 2118 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"lsr"; }
break;
case 235:
-#line 2103 "compilers/imcc/imcc.y"
+#line 2119 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"and"; }
break;
case 236:
-#line 2104 "compilers/imcc/imcc.y"
+#line 2120 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"or"; }
break;
case 237:
-#line 2105 "compilers/imcc/imcc.y"
+#line 2121 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"xor"; }
break;
case 238:
-#line 2106 "compilers/imcc/imcc.y"
+#line 2122 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"band"; }
break;
case 239:
-#line 2107 "compilers/imcc/imcc.y"
+#line 2123 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"bor"; }
break;
case 240:
-#line 2108 "compilers/imcc/imcc.y"
+#line 2124 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"bxor"; }
break;
case 241:
-#line 2114 "compilers/imcc/imcc.y"
+#line 2130 "compilers/imcc/imcc.y"
{
(yyval.i) = IMCC_create_itcall_label(interp);
(yyval.i)->type &= ~ITCALL;
@@ -4659,82 +4675,82 @@
break;
case 242:
-#line 2119 "compilers/imcc/imcc.y"
+#line 2135 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 243:
-#line 2126 "compilers/imcc/imcc.y"
+#line 2142 "compilers/imcc/imcc.y"
{ (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(2) - (3)].s), 2, (yyvsp[(1) - (3)].sr), (yyvsp[(3) - (3)].sr)); }
break;
case 244:
-#line 2130 "compilers/imcc/imcc.y"
+#line 2146 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"add"; }
break;
case 245:
-#line 2131 "compilers/imcc/imcc.y"
+#line 2147 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"sub"; }
break;
case 246:
-#line 2132 "compilers/imcc/imcc.y"
+#line 2148 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"mul"; }
break;
case 247:
-#line 2133 "compilers/imcc/imcc.y"
+#line 2149 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"div"; }
break;
case 248:
-#line 2134 "compilers/imcc/imcc.y"
+#line 2150 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"mod"; }
break;
case 249:
-#line 2135 "compilers/imcc/imcc.y"
+#line 2151 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"fdiv"; }
break;
case 250:
-#line 2136 "compilers/imcc/imcc.y"
+#line 2152 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"concat"; }
break;
case 251:
-#line 2137 "compilers/imcc/imcc.y"
+#line 2153 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"band"; }
break;
case 252:
-#line 2138 "compilers/imcc/imcc.y"
+#line 2154 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"bor"; }
break;
case 253:
-#line 2139 "compilers/imcc/imcc.y"
+#line 2155 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"bxor"; }
break;
case 254:
-#line 2140 "compilers/imcc/imcc.y"
+#line 2156 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"shr"; }
break;
case 255:
-#line 2141 "compilers/imcc/imcc.y"
+#line 2157 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"shl"; }
break;
case 256:
-#line 2142 "compilers/imcc/imcc.y"
+#line 2158 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"lsr"; }
break;
case 257:
-#line 2148 "compilers/imcc/imcc.y"
+#line 2164 "compilers/imcc/imcc.y"
{
(yyval.i) = func_ins(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(1) - (4)].sr), (yyvsp[(3) - (4)].s),
IMCC_INFO(interp) -> regs,
@@ -4745,22 +4761,22 @@
break;
case 258:
-#line 2158 "compilers/imcc/imcc.y"
+#line 2174 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_sub_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
case 259:
-#line 2159 "compilers/imcc/imcc.y"
+#line 2175 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_sub_address_fromc(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
case 260:
-#line 2160 "compilers/imcc/imcc.y"
+#line 2176 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_sub_address_u(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
case 261:
-#line 2162 "compilers/imcc/imcc.y"
+#line 2178 "compilers/imcc/imcc.y"
{
(yyval.sr) = (yyvsp[(1) - (1)].sr);
if ((yyvsp[(1) - (1)].sr)->set != 'P')
@@ -4769,7 +4785,7 @@
break;
case 262:
-#line 2168 "compilers/imcc/imcc.y"
+#line 2184 "compilers/imcc/imcc.y"
{
/* disallow bareword method names; SREG name constants are fine */
const char * const name = (yyvsp[(3) - (3)].sr)->name;
@@ -4786,7 +4802,7 @@
break;
case 263:
-#line 2182 "compilers/imcc/imcc.y"
+#line 2198 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr);
(yyval.sr) = mk_const(interp, (yyvsp[(3) - (3)].s), 'U');
@@ -4795,7 +4811,7 @@
break;
case 264:
-#line 2188 "compilers/imcc/imcc.y"
+#line 2204 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr);
(yyval.sr) = mk_const(interp, (yyvsp[(3) - (3)].s), 'S');
@@ -4804,12 +4820,12 @@
break;
case 265:
-#line 2193 "compilers/imcc/imcc.y"
+#line 2209 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr); (yyval.sr) = (yyvsp[(3) - (3)].sr); }
break;
case 266:
-#line 2199 "compilers/imcc/imcc.y"
+#line 2215 "compilers/imcc/imcc.y"
{
(yyval.i) = IMCC_create_itcall_label(interp);
IMCC_itcall_sub(interp, (yyvsp[(1) - (1)].sr));
@@ -4817,276 +4833,276 @@
break;
case 267:
-#line 2203 "compilers/imcc/imcc.y"
+#line 2219 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(2) - (5)].i); }
break;
case 268:
-#line 2207 "compilers/imcc/imcc.y"
+#line 2223 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
case 269:
-#line 2209 "compilers/imcc/imcc.y"
+#line 2225 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
if (IMCC_INFO(interp)->adv_named_id) {
- add_pcc_named_arg(IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, (yyvsp[(3) - (3)].sr));
+ add_pcc_named_arg(interp, IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, (yyvsp[(3) - (3)].sr));
IMCC_INFO(interp)->adv_named_id = NULL;
}
else
- add_pcc_arg(IMCC_INFO(interp)->cur_call, (yyvsp[(3) - (3)].sr));
+ add_pcc_arg(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(3) - (3)].sr));
}
break;
case 270:
-#line 2219 "compilers/imcc/imcc.y"
+#line 2235 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
if (IMCC_INFO(interp)->adv_named_id) {
- add_pcc_named_arg(IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, (yyvsp[(1) - (1)].sr));
+ add_pcc_named_arg(interp, IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, (yyvsp[(1) - (1)].sr));
IMCC_INFO(interp)->adv_named_id = NULL;
}
else
- add_pcc_arg(IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (1)].sr));
+ add_pcc_arg(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (1)].sr));
}
break;
case 271:
-#line 2229 "compilers/imcc/imcc.y"
+#line 2245 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
- add_pcc_named_arg(IMCC_INFO(interp)->cur_call,
+ add_pcc_named_arg(interp, IMCC_INFO(interp)->cur_call,
mk_const(interp, (yyvsp[(3) - (5)].s), 'S'), (yyvsp[(5) - (5)].sr));
mem_sys_free((yyvsp[(3) - (5)].s));
}
break;
case 272:
-#line 2236 "compilers/imcc/imcc.y"
+#line 2252 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
- add_pcc_named_arg_var(IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (3)].sr), (yyvsp[(3) - (3)].sr));
+ add_pcc_named_arg_var(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (3)].sr), (yyvsp[(3) - (3)].sr));
}
break;
case 273:
-#line 2241 "compilers/imcc/imcc.y"
+#line 2257 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
- add_pcc_named_arg(IMCC_INFO(interp)->cur_call,
+ add_pcc_named_arg(interp, IMCC_INFO(interp)->cur_call,
mk_const(interp, (yyvsp[(1) - (3)].s), 'S'), (yyvsp[(3) - (3)].sr));
mem_sys_free((yyvsp[(1) - (3)].s));
}
break;
case 274:
-#line 2250 "compilers/imcc/imcc.y"
+#line 2266 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(1) - (2)].sr); (yyval.sr)->type |= (yyvsp[(2) - (2)].t); }
break;
case 275:
-#line 2254 "compilers/imcc/imcc.y"
+#line 2270 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
case 276:
-#line 2255 "compilers/imcc/imcc.y"
+#line 2271 "compilers/imcc/imcc.y"
{ (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); }
break;
case 277:
-#line 2259 "compilers/imcc/imcc.y"
+#line 2275 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_FLAT; }
break;
case 278:
-#line 2260 "compilers/imcc/imcc.y"
+#line 2276 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_NAMED; }
break;
case 279:
-#line 2261 "compilers/imcc/imcc.y"
+#line 2277 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_CALL_SIG; }
break;
case 280:
-#line 2264 "compilers/imcc/imcc.y"
+#line 2280 "compilers/imcc/imcc.y"
{ adv_named_set_u(interp, (yyvsp[(3) - (4)].s)); (yyval.t) = 0; }
break;
case 281:
-#line 2265 "compilers/imcc/imcc.y"
+#line 2281 "compilers/imcc/imcc.y"
{ adv_named_set(interp, (yyvsp[(3) - (4)].s)); (yyval.t) = 0; }
break;
case 282:
-#line 2269 "compilers/imcc/imcc.y"
+#line 2285 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(1) - (2)].sr); (yyval.sr)->type |= (yyvsp[(2) - (2)].t); }
break;
case 283:
-#line 2274 "compilers/imcc/imcc.y"
+#line 2290 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
if (IMCC_INFO(interp)->adv_named_id) {
- add_pcc_named_result(IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, (yyvsp[(3) - (3)].sr));
+ add_pcc_named_result(interp, IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, (yyvsp[(3) - (3)].sr));
IMCC_INFO(interp)->adv_named_id = NULL;
}
else
- add_pcc_result(IMCC_INFO(interp)->cur_call, (yyvsp[(3) - (3)].sr));
+ add_pcc_result(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(3) - (3)].sr));
}
break;
case 284:
-#line 2284 "compilers/imcc/imcc.y"
+#line 2300 "compilers/imcc/imcc.y"
{
- add_pcc_named_result(IMCC_INFO(interp)->cur_call,
- mk_const(interp, (yyvsp[(3) - (5)].s), 'S'), (yyvsp[(5) - (5)].sr));
+ add_pcc_named_result(interp, IMCC_INFO(interp)->cur_call,
+ mk_const(interp, (yyvsp[(3) - (5)].s), 'S'), (yyvsp[(5) - (5)].sr));
mem_sys_free((yyvsp[(3) - (5)].s));
}
break;
case 285:
-#line 2290 "compilers/imcc/imcc.y"
+#line 2306 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
if (IMCC_INFO(interp)->adv_named_id) {
- add_pcc_named_result(IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, (yyvsp[(1) - (1)].sr));
+ add_pcc_named_result(interp, IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, (yyvsp[(1) - (1)].sr));
IMCC_INFO(interp)->adv_named_id = NULL;
}
else
- add_pcc_result(IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (1)].sr));
+ add_pcc_result(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (1)].sr));
}
break;
case 286:
-#line 2300 "compilers/imcc/imcc.y"
+#line 2316 "compilers/imcc/imcc.y"
{
- add_pcc_named_result(IMCC_INFO(interp)->cur_call, mk_const(interp, (yyvsp[(1) - (3)].s), 'S'), (yyvsp[(3) - (3)].sr));
+ add_pcc_named_result(interp, IMCC_INFO(interp)->cur_call, mk_const(interp, (yyvsp[(1) - (3)].s), 'S'), (yyvsp[(3) - (3)].sr));
mem_sys_free((yyvsp[(1) - (3)].s));
}
break;
case 287:
-#line 2304 "compilers/imcc/imcc.y"
+#line 2320 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
case 288:
-#line 2308 "compilers/imcc/imcc.y"
+#line 2324 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
case 289:
-#line 2309 "compilers/imcc/imcc.y"
+#line 2325 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
case 290:
-#line 2314 "compilers/imcc/imcc.y"
+#line 2330 "compilers/imcc/imcc.y"
{
(yyval.i) =MK_I(interp, IMCC_INFO(interp)->cur_unit, inv_op((yyvsp[(3) - (6)].s)), 3, (yyvsp[(2) - (6)].sr), (yyvsp[(4) - (6)].sr), (yyvsp[(6) - (6)].sr));
}
break;
case 291:
-#line 2318 "compilers/imcc/imcc.y"
+#line 2334 "compilers/imcc/imcc.y"
{
(yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "unless_null", 2, (yyvsp[(3) - (5)].sr), (yyvsp[(5) - (5)].sr));
}
break;
case 292:
-#line 2322 "compilers/imcc/imcc.y"
+#line 2338 "compilers/imcc/imcc.y"
{
(yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "unless", 2, (yyvsp[(2) - (4)].sr), (yyvsp[(4) - (4)].sr));
}
break;
case 293:
-#line 2329 "compilers/imcc/imcc.y"
+#line 2345 "compilers/imcc/imcc.y"
{
(yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "if", 2, (yyvsp[(2) - (4)].sr), (yyvsp[(4) - (4)].sr));
}
break;
case 294:
-#line 2333 "compilers/imcc/imcc.y"
+#line 2349 "compilers/imcc/imcc.y"
{
(yyval.i) =MK_I(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (6)].s), 3, (yyvsp[(2) - (6)].sr), (yyvsp[(4) - (6)].sr), (yyvsp[(6) - (6)].sr));
}
break;
case 295:
-#line 2337 "compilers/imcc/imcc.y"
+#line 2353 "compilers/imcc/imcc.y"
{
(yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "if_null", 2, (yyvsp[(3) - (5)].sr), (yyvsp[(5) - (5)].sr));
}
break;
case 296:
-#line 2343 "compilers/imcc/imcc.y"
+#line 2359 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
case 297:
-#line 2344 "compilers/imcc/imcc.y"
+#line 2360 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
case 298:
-#line 2348 "compilers/imcc/imcc.y"
+#line 2364 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"eq"; }
break;
case 299:
-#line 2349 "compilers/imcc/imcc.y"
+#line 2365 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"ne"; }
break;
case 300:
-#line 2350 "compilers/imcc/imcc.y"
+#line 2366 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"gt"; }
break;
case 301:
-#line 2351 "compilers/imcc/imcc.y"
+#line 2367 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"ge"; }
break;
case 302:
-#line 2352 "compilers/imcc/imcc.y"
+#line 2368 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"lt"; }
break;
case 303:
-#line 2353 "compilers/imcc/imcc.y"
+#line 2369 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"le"; }
break;
case 306:
-#line 2362 "compilers/imcc/imcc.y"
+#line 2378 "compilers/imcc/imcc.y"
{ (yyval.sr) = NULL; }
break;
case 307:
-#line 2363 "compilers/imcc/imcc.y"
+#line 2379 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(1) - (1)].sr); }
break;
case 308:
-#line 2367 "compilers/imcc/imcc.y"
+#line 2383 "compilers/imcc/imcc.y"
{ (yyval.sr) = IMCC_INFO(interp)->regs[0]; }
break;
case 310:
-#line 2372 "compilers/imcc/imcc.y"
+#line 2388 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(1) - (1)].sr); }
break;
case 311:
-#line 2374 "compilers/imcc/imcc.y"
+#line 2390 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp) -> regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(1) - (4)].sr);
IMCC_INFO(interp) -> keyvec |= KEY_BIT(IMCC_INFO(interp)->nargs);
@@ -5096,7 +5112,7 @@
break;
case 312:
-#line 2381 "compilers/imcc/imcc.y"
+#line 2397 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp) -> regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(2) - (3)].sr);
(yyval.sr) = (yyvsp[(2) - (3)].sr);
@@ -5104,44 +5120,44 @@
break;
case 314:
-#line 2388 "compilers/imcc/imcc.y"
+#line 2404 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_sub_address_fromc(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
case 315:
-#line 2389 "compilers/imcc/imcc.y"
+#line 2405 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_sub_address_u(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
case 316:
-#line 2393 "compilers/imcc/imcc.y"
+#line 2409 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_sub_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
case 317:
-#line 2394 "compilers/imcc/imcc.y"
+#line 2410 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_sub_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
case 318:
-#line 2398 "compilers/imcc/imcc.y"
+#line 2414 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_label_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
case 319:
-#line 2399 "compilers/imcc/imcc.y"
+#line 2415 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_label_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
case 324:
-#line 2413 "compilers/imcc/imcc.y"
+#line 2429 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->nkeys = 0;
}
break;
case 325:
-#line 2417 "compilers/imcc/imcc.y"
+#line 2433 "compilers/imcc/imcc.y"
{
(yyval.sr) = link_keys(interp,
IMCC_INFO(interp)->nkeys,
@@ -5150,14 +5166,14 @@
break;
case 326:
-#line 2425 "compilers/imcc/imcc.y"
+#line 2441 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->nkeys = 0;
}
break;
case 327:
-#line 2429 "compilers/imcc/imcc.y"
+#line 2445 "compilers/imcc/imcc.y"
{
(yyval.sr) = link_keys(interp,
IMCC_INFO(interp)->nkeys,
@@ -5166,12 +5182,12 @@
break;
case 328:
-#line 2437 "compilers/imcc/imcc.y"
+#line 2453 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(1) - (1)].sr); }
break;
case 329:
-#line 2439 "compilers/imcc/imcc.y"
+#line 2455 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(3) - (3)].sr);
(yyval.sr) = IMCC_INFO(interp)->keys[0];
@@ -5179,60 +5195,60 @@
break;
case 330:
-#line 2447 "compilers/imcc/imcc.y"
+#line 2463 "compilers/imcc/imcc.y"
{
(yyval.sr) = (yyvsp[(1) - (1)].sr);
}
break;
case 331:
-#line 2453 "compilers/imcc/imcc.y"
+#line 2469 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'I'); }
break;
case 332:
-#line 2454 "compilers/imcc/imcc.y"
+#line 2470 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'N'); }
break;
case 333:
-#line 2455 "compilers/imcc/imcc.y"
+#line 2471 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'S'); }
break;
case 334:
-#line 2456 "compilers/imcc/imcc.y"
+#line 2472 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'P'); }
break;
case 335:
-#line 2457 "compilers/imcc/imcc.y"
+#line 2473 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_pasm_reg(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
case 336:
-#line 2461 "compilers/imcc/imcc.y"
+#line 2477 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'I'); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
case 337:
-#line 2462 "compilers/imcc/imcc.y"
+#line 2478 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'N'); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
case 338:
-#line 2463 "compilers/imcc/imcc.y"
+#line 2479 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'S'); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
case 339:
-#line 2464 "compilers/imcc/imcc.y"
+#line 2480 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'U'); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
/* Line 1267 of yacc.c. */
-#line 5225 "compilers/imcc/imcparser.c"
+#line 5241 "compilers/imcc/imcparser.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -5446,7 +5462,7 @@
}
-#line 2470 "compilers/imcc/imcc.y"
+#line 2486 "compilers/imcc/imcc.y"
/* I need this prototype somewhere... */
Modified: branches/boehm_gc_2/compilers/imcc/imcparser.h
==============================================================================
--- branches/boehm_gc_2/compilers/imcc/imcparser.h Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/imcc/imcparser.h Mon Feb 22 12:30:02 2010 (r44294)
@@ -297,7 +297,7 @@
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 1059 "compilers/imcc/imcc.y"
+#line 1075 "compilers/imcc/imcc.y"
{
IdList * idlist;
int t;
Modified: branches/boehm_gc_2/compilers/imcc/instructions.c
==============================================================================
--- branches/boehm_gc_2/compilers/imcc/instructions.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/imcc/instructions.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -149,7 +149,7 @@
if (!w_special[0]) {
size_t i;
for (i = 0; i < N_ELEMENTS(writes); i++) {
- const int n = interp->op_lib->op_code(writes[i], 1);
+ const int n = interp->op_lib->op_code(interp, writes[i], 1);
PARROT_ASSERT(n);
w_special[i] = n;
}
Modified: branches/boehm_gc_2/compilers/imcc/main.c
==============================================================================
--- branches/boehm_gc_2/compilers/imcc/main.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/imcc/main.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -164,8 +164,8 @@
/*
-=item C<int imcc_handle_flag(PARROT_INTERP, struct longopt_opt_info *opt, INTVAL
-*core)>
+=item C<int imcc_handle_flag(PARROT_INTERP, struct longopt_opt_info *opt,
+Parrot_Run_core_t *core)>
Handle Parrot's command line for IMCC related option and set appropriate flags.
@@ -178,7 +178,8 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
int
-imcc_handle_flag(PARROT_INTERP, struct longopt_opt_info *opt, INTVAL *core)
+imcc_handle_flag(PARROT_INTERP, struct longopt_opt_info *opt,
+ Parrot_Run_core_t *core)
{
PARROT_ASSERT(opt);
PARROT_ASSERT(core);
Modified: branches/boehm_gc_2/compilers/imcc/optimizer.c
==============================================================================
--- branches/boehm_gc_2/compilers/imcc/optimizer.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/imcc/optimizer.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -802,7 +802,7 @@
int i;
op_info_t *op_info;
- opnum = interp->op_lib->op_code(op, 1);
+ opnum = interp->op_lib->op_code(interp, op, 1);
if (opnum < 0)
IMCC_fatal(interp, 1, "eval_ins: op '%s' not found\n", op);
op_info = interp->op_info_table + opnum;
Modified: branches/boehm_gc_2/compilers/imcc/parser_util.c
==============================================================================
--- branches/boehm_gc_2/compilers/imcc/parser_util.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/imcc/parser_util.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -154,7 +154,7 @@
SymReg *regs[3];
SymReg *pmc;
int nargs;
- const int pmc_num = pmc_type(interp,
+ const int pmc_num = Parrot_pmc_get_type_str(interp,
Parrot_str_new(interp, *type == '.' ? type + 1 : type, 0));
snprintf(fmt, sizeof (fmt), "%d", pmc_num);
@@ -285,7 +285,7 @@
ASSERT_ARGS(check_op)
op_fullname(fullname, name, r, narg, keyvec);
- return interp->op_lib->op_code(fullname, 1);
+ return interp->op_lib->op_code(interp, fullname, 1);
}
/*
@@ -303,8 +303,8 @@
is_op(PARROT_INTERP, ARGIN(const char *name))
{
ASSERT_ARGS(is_op)
- return interp->op_lib->op_code(name, 0) >= 0
- || interp->op_lib->op_code(name, 1) >= 0;
+ return interp->op_lib->op_code(interp, name, 0) >= 0
+ || interp->op_lib->op_code(interp, name, 1) >= 0;
}
/*
@@ -341,7 +341,7 @@
r[0]->pmc_type = enum_class_FixedIntegerArray;
op_fullname(fullname, name, r, 1, 0);
- op = interp->op_lib->op_code(fullname, 1);
+ op = interp->op_lib->op_code(interp, fullname, 1);
PARROT_ASSERT(op >= 0);
@@ -404,11 +404,11 @@
return var_arg_ins(interp, unit, name, r, n, emit);
op_fullname(fullname, name, r, n, keyvec);
- op = interp->op_lib->op_code(fullname, 1);
+ op = interp->op_lib->op_code(interp, fullname, 1);
/* maybe we have a fullname */
if (op < 0)
- op = interp->op_lib->op_code(name, 1);
+ op = interp->op_lib->op_code(interp, name, 1);
/* still wrong, try reverse compare */
if (op < 0) {
@@ -416,7 +416,7 @@
if (n_name) {
name = n_name;
op_fullname(fullname, name, r, n, keyvec);
- op = interp->op_lib->op_code(fullname, 1);
+ op = interp->op_lib->op_code(interp, fullname, 1);
}
}
@@ -638,7 +638,7 @@
if (IMCC_INFO(interp)->last_unit) {
/* a reentrant compile */
- imc_info = mem_allocate_zeroed_typed(imc_info_t);
+ imc_info = mem_gc_allocate_zeroed_typed(interp, imc_info_t);
imc_info->ghash = IMCC_INFO(interp)->ghash;
imc_info->prev = IMCC_INFO(interp);
IMCC_INFO(interp) = imc_info;
@@ -703,7 +703,7 @@
*
* TODO if a sub was denoted :main return that instead
*/
- sub = pmc_new(interp, enum_class_Eval);
+ sub = Parrot_pmc_new(interp, enum_class_Eval);
PMC_get_sub(interp, sub, sub_data);
sub_data->seg = new_cs;
sub_data->start_offs = 0;
@@ -868,16 +868,7 @@
STRING *error_message;
PMC *sub;
- /* We need to clear the current_results from the current context. This is
- * in order to prevent any RetContinuations that get promoted to full
- * Continuations (this happens when something is the target of a :outer)
- * trying to return values using them when invoked. (See TT #500 for the
- * report of the bug this fixes). */
- opcode_t *save_results = Parrot_pcc_get_results(interp, CURRENT_CONTEXT(interp));
- Parrot_pcc_set_results(interp, CURRENT_CONTEXT(interp), NULL);
sub = imcc_compile(interp, s, 0, &error_message);
- Parrot_pcc_set_results(interp, CURRENT_CONTEXT(interp), save_results);
-
if (sub)
return sub;
@@ -916,7 +907,7 @@
if (IMCC_INFO(interp)->last_unit) {
/* a reentrant compile */
- imc_info = mem_allocate_zeroed_typed(imc_info_t);
+ imc_info = mem_gc_allocate_zeroed_typed(interp, imc_info_t);
imc_info->prev = IMCC_INFO(interp);
imc_info->ghash = IMCC_INFO(interp)->ghash;
IMCC_INFO(interp) = imc_info;
@@ -1202,7 +1193,7 @@
if (changed) {
op_fullname(fullname, name, r, n, keyvec);
- return interp->op_lib->op_code(fullname, 1);
+ return interp->op_lib->op_code(interp, fullname, 1);
}
return -1;
Modified: branches/boehm_gc_2/compilers/imcc/pbc.c
==============================================================================
--- branches/boehm_gc_2/compilers/imcc/pbc.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/imcc/pbc.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -357,11 +357,11 @@
/* Update the constant count and reallocate */
if (interp->code->const_table->constants)
interp->code->const_table->constants =
- mem_realloc_n_typed(interp->code->const_table->constants,
+ mem_gc_realloc_n_typed(interp, interp->code->const_table->constants,
newcount, PackFile_Constant *);
else
interp->code->const_table->constants =
- mem_allocate_n_typed(newcount, PackFile_Constant *);
+ mem_gc_allocate_n_typed(interp, newcount, PackFile_Constant *);
interp->code->const_table->constants[oldcount] = new_constant;
interp->code->const_table->const_count = newcount;
@@ -432,10 +432,10 @@
e_pbc_open(PARROT_INTERP, SHIM(void *param))
{
ASSERT_ARGS(e_pbc_open)
- code_segment_t * const cs = mem_allocate_zeroed_typed(code_segment_t);
+ code_segment_t * const cs = mem_gc_allocate_zeroed_typed(interp, code_segment_t);
if (!IMCC_INFO(interp)->globals)
- IMCC_INFO(interp)->globals = mem_allocate_zeroed_typed(imcc_globals);
+ IMCC_INFO(interp)->globals = mem_gc_allocate_zeroed_typed(interp, imcc_globals);
if (IMCC_INFO(interp)->globals->cs)
clear_sym_hash(&IMCC_INFO(interp)->globals->cs->key_consts);
@@ -445,7 +445,7 @@
}
/* free previous cached key constants if any */
- create_symhash(&cs->key_consts);
+ create_symhash(interp, &cs->key_consts);
cs->next = NULL;
cs->prev = IMCC_INFO(interp)->globals->cs;
@@ -496,7 +496,7 @@
make_new_sub(PARROT_INTERP, ARGIN(IMC_Unit *unit))
{
ASSERT_ARGS(make_new_sub)
- subs_t * const s = mem_allocate_zeroed_typed(subs_t);
+ subs_t * const s = mem_gc_allocate_zeroed_typed(interp, subs_t);
s->prev = IMCC_INFO(interp)->globals->cs->subs;
s->unit = unit;
@@ -510,7 +510,7 @@
IMCC_INFO(interp)->globals->cs->subs = s;
- create_symhash(&s->fixup);
+ create_symhash(interp, &s->fixup);
}
@@ -615,7 +615,7 @@
{
ASSERT_ARGS(store_key_const)
SymReg * const c =
- _mk_const(&IMCC_INFO(interp)->globals->cs->key_consts, str, 0);
+ _mk_const(interp, &IMCC_INFO(interp)->globals->cs->key_consts, str, 0);
c->color = idx;
}
@@ -826,7 +826,7 @@
SymReg * const nam = mk_const(interp, fixup->name,
fixup->type & VT_ENCODED ? 'U' : 'S');
- const int op = interp->op_lib->op_code("find_sub_not_null_p_sc", 1);
+ const int op = interp->op_lib->op_code(interp, "find_sub_not_null_p_sc", 1);
PARROT_ASSERT(op);
interp->code->base.data[addr] = op;
@@ -1044,9 +1044,9 @@
/* a :multi sub with no arguments */
if (!pcc_sub->multi[0])
- return pmc_new(interp, enum_class_FixedIntegerArray);
+ return Parrot_pmc_new(interp, enum_class_FixedIntegerArray);
- multi_sig = pmc_new(interp, enum_class_FixedPMCArray);
+ multi_sig = Parrot_pmc_new(interp, enum_class_FixedPMCArray);
VTABLE_set_integer_native(interp, multi_sig, n);
ct = interp->code->const_table;
@@ -1058,14 +1058,14 @@
if (r->set == 'S') {
STRING * const type_name = ct->constants[r->color]->u.string;
- const INTVAL type_num = pmc_type(interp, type_name);
+ const INTVAL type_num = Parrot_pmc_get_type_str(interp, type_name);
if (type_num == enum_type_undef) {
- sig_pmc = pmc_new(interp, enum_class_String);
+ sig_pmc = Parrot_pmc_new(interp, enum_class_String);
VTABLE_set_string_native(interp, sig_pmc, type_name);
}
else {
- sig_pmc = pmc_new(interp, enum_class_Integer);
+ sig_pmc = Parrot_pmc_new(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, sig_pmc, type_num);
}
}
@@ -1116,7 +1116,7 @@
if (r->set == 'P' && r->usage & U_LEXICAL) {
SymReg *n;
if (!lex_info) {
- lex_info = pmc_new_noinit(interp, lex_info_id);
+ lex_info = Parrot_pmc_new_noinit(interp, lex_info_id);
VTABLE_init_pmc(interp, lex_info, sub_pmc);
}
@@ -1149,7 +1149,7 @@
}
if (!lex_info && (unit->outer || need_lex)) {
- lex_info = pmc_new_noinit(interp, lex_info_id);
+ lex_info = Parrot_pmc_new_noinit(interp, lex_info_id);
VTABLE_init_pmc(interp, lex_info, sub_pmc);
}
@@ -1292,12 +1292,12 @@
if (!PMC_IS_NULL(classobj))
sub_pmc = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = pmc_type(interp, classname);
+ const INTVAL type = Parrot_pmc_get_type_str(interp, classname);
if (type <= 0)
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_NO_CLASS,
"Class '%Ss' specified in :instanceof(...) not found",
classname);
- sub_pmc = pmc_new(interp, type);
+ sub_pmc = Parrot_pmc_new(interp, type);
}
}
else {
@@ -1305,7 +1305,7 @@
type = Parrot_get_ctx_HLL_type(interp, type);
/* TODO create constant - see also src/packfile.c */
- sub_pmc = pmc_new(interp, type);
+ sub_pmc = Parrot_pmc_new(interp, type);
}
/* Set flags and get the sub info. */
@@ -1348,7 +1348,7 @@
ns_pmc = ct->constants[ns_const]->u.key;
break;
case PFC_STRING:
- ns_pmc = constant_pmc_new(interp, enum_class_String);
+ ns_pmc = Parrot_pmc_new_constant(interp, enum_class_String);
VTABLE_set_string_native(interp, ns_pmc, ct->constants[ns_const]->u.string);
break;
default:
@@ -1478,7 +1478,7 @@
if (r)
return r->color;
- pfc = mem_allocate_typed(PackFile_Constant);
+ pfc = mem_gc_allocate_typed(interp, PackFile_Constant);
rc = PackFile_Constant_unpack_key(interp,
interp->code->const_table, pfc, key);
@@ -1805,7 +1805,7 @@
else
s = Parrot_str_unescape(interp, r->name, 0, NULL);
- p = constant_pmc_new(interp, r->pmc_type);
+ p = Parrot_pmc_new_constant(interp, r->pmc_type);
switch (r->pmc_type) {
case enum_class_Integer:
@@ -2188,7 +2188,7 @@
/* need a dummy to hold register usage */
SymReg * const r = mk_sub_label(interp, "(null)");
r->type = VT_PCC_SUB;
- r->pcc_sub = mem_allocate_zeroed_typed(pcc_sub_t);
+ r->pcc_sub = mem_gc_allocate_zeroed_typed(interp, pcc_sub_t);
add_const_pmc_sub(interp, r, oldsize, oldsize + code_size);
}
Modified: branches/boehm_gc_2/compilers/imcc/pcc.c
==============================================================================
--- branches/boehm_gc_2/compilers/imcc/pcc.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/imcc/pcc.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -108,9 +108,12 @@
__attribute__nonnull__(3)
__attribute__nonnull__(4);
-static void unshift_self(ARGIN(SymReg *sub), ARGIN(SymReg *obj))
+static void unshift_self(PARROT_INTERP,
+ ARGIN(SymReg *sub),
+ ARGIN(SymReg *obj))
__attribute__nonnull__(1)
- __attribute__nonnull__(2);
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3);
#define ASSERT_ARGS_insert_tail_call __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
@@ -143,7 +146,8 @@
, PARROT_ASSERT_ARG(ins) \
, PARROT_ASSERT_ARG(sub))
#define ASSERT_ARGS_unshift_self __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(sub) \
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(sub) \
, PARROT_ASSERT_ARG(obj))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: static */
@@ -267,15 +271,15 @@
SymReg *regcache[PCC_GET_ARGS_LIMIT + 1];
char bufcache[sizeof (pref) + sizeof (item) * PCC_GET_ARGS_LIMIT + sizeof (subf)];
- SymReg ** const regs = n < PCC_GET_ARGS_LIMIT ?
- regcache :
- mem_allocate_n_zeroed_typed(n + 1, SymReg *);
+ SymReg ** const regs = n < PCC_GET_ARGS_LIMIT
+ ? regcache
+ : mem_gc_allocate_n_zeroed_typed(interp, n + 1, SymReg *);
unsigned int bufpos = 0;
unsigned int bufsize = lenpref + lenitem * n + lensubf;
- char *buf = n < PCC_GET_ARGS_LIMIT ?
- bufcache :
- mem_allocate_n_typed(bufsize, char);
+ char *buf = n < PCC_GET_ARGS_LIMIT
+ ? bufcache
+ : mem_gc_allocate_n_typed(interp, bufsize, char);
memcpy(buf, pref, lenpref);
bufpos += lenpref;
@@ -362,7 +366,7 @@
/*
-=item C<static void unshift_self(SymReg *sub, SymReg *obj)>
+=item C<static void unshift_self(PARROT_INTERP, SymReg *sub, SymReg *obj)>
prepend the object to args or self to params
@@ -371,15 +375,15 @@
*/
static void
-unshift_self(ARGIN(SymReg *sub), ARGIN(SymReg *obj))
+unshift_self(PARROT_INTERP, ARGIN(SymReg *sub), ARGIN(SymReg *obj))
{
ASSERT_ARGS(unshift_self)
struct pcc_sub_t * const pcc_sub = sub->pcc_sub;
const int n = pcc_sub->nargs;
int i;
- mem_realloc_n_typed(pcc_sub->args, n + 1, SymReg *);
- mem_realloc_n_typed(pcc_sub->arg_flags, n + 1, int);
+ pcc_sub->args = mem_gc_realloc_n_typed(interp, pcc_sub->args, n + 1, SymReg *);
+ pcc_sub->arg_flags = mem_gc_realloc_n_typed(interp, pcc_sub->arg_flags, n + 1, int);
for (i = n; i; --i) {
pcc_sub->args[i] = pcc_sub->args[i - 1];
@@ -419,7 +423,7 @@
self->type = VTIDENTIFIER;
}
- unshift_self(sub, self);
+ unshift_self(interp, sub, self);
}
/* Don't generate any parameter checking code if there
@@ -821,7 +825,7 @@
}
if (sub->pcc_sub->object)
- unshift_self(sub, sub->pcc_sub->object);
+ unshift_self(interp, sub, sub->pcc_sub->object);
/* insert arguments */
n = sub->pcc_sub->nargs;
Modified: branches/boehm_gc_2/compilers/imcc/reg_alloc.c
==============================================================================
--- branches/boehm_gc_2/compilers/imcc/reg_alloc.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/imcc/reg_alloc.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -59,7 +59,8 @@
__attribute__nonnull__(2)
FUNC_MODIFIES(*unit);
-static void build_reglist(NULLOK_INTERP, ARGMOD(IMC_Unit *unit))
+static void build_reglist(PARROT_INTERP, ARGMOD(IMC_Unit *unit))
+ __attribute__nonnull__(1)
__attribute__nonnull__(2)
FUNC_MODIFIES(*unit);
@@ -73,11 +74,12 @@
FUNC_MODIFIES(*r);
PARROT_WARN_UNUSED_RESULT
-static unsigned int first_avail(
+static unsigned int first_avail(PARROT_INTERP,
ARGIN(const IMC_Unit *unit),
int reg_set,
ARGOUT_NULLOK(Set **avail))
__attribute__nonnull__(1)
+ __attribute__nonnull__(2)
FUNC_MODIFIES(*avail);
PARROT_WARN_UNUSED_RESULT
@@ -162,7 +164,8 @@
__attribute__nonnull__(1)
__attribute__nonnull__(2);
-static void vanilla_reg_alloc(SHIM_INTERP, ARGMOD(IMC_Unit *unit))
+static void vanilla_reg_alloc(PARROT_INTERP, ARGMOD(IMC_Unit *unit))
+ __attribute__nonnull__(1)
__attribute__nonnull__(2)
FUNC_MODIFIES(*unit);
@@ -179,14 +182,16 @@
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(unit))
#define ASSERT_ARGS_build_reglist __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(unit))
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(unit))
#define ASSERT_ARGS_compute_du_chain __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(unit))
#define ASSERT_ARGS_compute_one_du_chain __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(r) \
, PARROT_ASSERT_ARG(unit))
#define ASSERT_ARGS_first_avail __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(unit))
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(unit))
#define ASSERT_ARGS_ig_allocate __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_ig_find_color __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(unit) \
@@ -223,7 +228,8 @@
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(unit))
#define ASSERT_ARGS_vanilla_reg_alloc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(unit))
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(unit))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: static */
@@ -636,7 +642,7 @@
/*
-=item C<static void build_reglist(NULLOK_INTERP, IMC_Unit *unit)>
+=item C<static void build_reglist(PARROT_INTERP, IMC_Unit *unit)>
make a linear list of IDENTs and VARs, set n_symbols
TODO
@@ -654,7 +660,7 @@
*/
static void
-build_reglist(NULLOK_INTERP, ARGMOD(IMC_Unit *unit))
+build_reglist(PARROT_INTERP, ARGMOD(IMC_Unit *unit))
{
ASSERT_ARGS(build_reglist)
SymHash const *hsh = &unit->hash;
@@ -670,7 +676,7 @@
if (count == 0)
return;
- unit->reglist = mem_allocate_n_typed(count, SymReg *);
+ unit->reglist = mem_gc_allocate_n_typed(interp, count, SymReg *);
for (i = count = 0; i < hsh->size; i++) {
SymReg *r;
@@ -1043,7 +1049,7 @@
if (!n)
return;
- avail = mem_allocate_n_typed(n, char);
+ avail = mem_gc_allocate_n_typed(interp, n, char);
for (i = 0; i < unit->n_symbols; ++i) {
int already_allocated, color;
@@ -1122,8 +1128,8 @@
/*
-=item C<static unsigned int first_avail(const IMC_Unit *unit, int reg_set, Set
-**avail)>
+=item C<static unsigned int first_avail(PARROT_INTERP, const IMC_Unit *unit, int
+reg_set, Set **avail)>
find first available register of the given reg_set
@@ -1133,13 +1139,15 @@
PARROT_WARN_UNUSED_RESULT
static unsigned int
-first_avail(ARGIN(const IMC_Unit *unit), int reg_set, ARGOUT_NULLOK(Set **avail))
+first_avail(PARROT_INTERP,
+ ARGIN(const IMC_Unit *unit), int reg_set,
+ ARGOUT_NULLOK(Set **avail))
{
ASSERT_ARGS(first_avail)
int n = (int)unit->n_symbols > unit->max_color
? (int)unit->n_symbols
: unit->max_color;
- Set *allocated = set_make((unsigned int)n + 1);
+ Set *allocated = set_make(interp, (unsigned int)n + 1);
const SymHash * const hsh = &unit->hash;
@@ -1205,7 +1213,7 @@
Set *avail = sets[j];
unsigned int first_reg = avail
? set_first_zero(avail)
- : first_avail(unit, (int)r->set, &avail);
+ : first_avail(interp, unit, (int)r->set, &avail);
set_add(avail, first_reg);
r->color = first_reg++;
@@ -1244,7 +1252,7 @@
*/
static void
-vanilla_reg_alloc(SHIM_INTERP, ARGMOD(IMC_Unit *unit))
+vanilla_reg_alloc(PARROT_INTERP, ARGMOD(IMC_Unit *unit))
{
ASSERT_ARGS(vanilla_reg_alloc)
const char type[] = "INSP";
@@ -1266,7 +1274,7 @@
/* Assign new colors. */
for (j = 0; j < 4; j++) {
reg_set = type[j];
- first_reg = first_avail(unit, reg_set, &avail);
+ first_reg = first_avail(interp, unit, reg_set, &avail);
/* XXX Use a different loop variable that doesn't shadow outer i */
for (i = 0; i < hsh->size; i++) {
@@ -1276,7 +1284,7 @@
continue;
if (REG_NEEDS_ALLOC(r) && (r->color == -1) && r->use_count) {
if (set_contains(avail, first_reg))
- first_reg = first_avail(unit, reg_set, NULL);
+ first_reg = first_avail(interp, unit, reg_set, NULL);
set_add(avail, first_reg);
r->color = first_reg++;
Modified: branches/boehm_gc_2/compilers/imcc/sets.c
==============================================================================
--- branches/boehm_gc_2/compilers/imcc/sets.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/imcc/sets.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -38,7 +38,7 @@
/*
-=item C<Set* set_make(unsigned int length)>
+=item C<Set* set_make(PARROT_INTERP, unsigned int length)>
Creates a new Set object.
@@ -49,13 +49,13 @@
PARROT_MALLOC
PARROT_CANNOT_RETURN_NULL
Set*
-set_make(unsigned int length)
+set_make(PARROT_INTERP, unsigned int length)
{
ASSERT_ARGS(set_make)
- Set * const s = mem_allocate_zeroed_typed(Set);
+ Set * const s = mem_gc_allocate_zeroed_typed(interp, Set);
s->length = length;
- s->bmp = mem_allocate_n_zeroed_typed(NUM_BYTES(length),
- unsigned char);
+ s->bmp = mem_gc_allocate_n_zeroed_typed(interp,
+ NUM_BYTES(length), unsigned char);
return s;
}
@@ -63,7 +63,7 @@
/*
-=item C<Set* set_make_full(unsigned int length)>
+=item C<Set* set_make_full(PARROT_INTERP, unsigned int length)>
Creates a new Set object of C<length> items, setting them all to full.
@@ -74,10 +74,10 @@
PARROT_MALLOC
PARROT_CANNOT_RETURN_NULL
Set*
-set_make_full(unsigned int length)
+set_make_full(PARROT_INTERP, unsigned int length)
{
ASSERT_ARGS(set_make_full)
- Set * const s = set_make(length);
+ Set * const s = set_make(interp, length);
const size_t bytes = NUM_BYTES(length);
if (bytes)
@@ -128,7 +128,7 @@
/*
-=item C<Set* set_copy(const Set *s)>
+=item C<Set* set_copy(PARROT_INTERP, const Set *s)>
Copies the set C<s>, returning a new set pointer.
@@ -139,10 +139,10 @@
PARROT_MALLOC
PARROT_CANNOT_RETURN_NULL
Set*
-set_copy(ARGIN(const Set *s))
+set_copy(PARROT_INTERP, ARGIN(const Set *s))
{
ASSERT_ARGS(set_copy)
- Set * const d = set_make(s->length);
+ Set * const d = set_make(interp, s->length);
memcpy(d->bmp, s->bmp, NUM_BYTES(d->length));
return d;
@@ -286,7 +286,7 @@
/*
-=item C<Set * set_union(const Set *s1, const Set *s2)>
+=item C<Set * set_union(PARROT_INTERP, const Set *s1, const Set *s2)>
Computes the union of the two Set arguments, returning it as a new Set.
@@ -299,11 +299,11 @@
PARROT_MALLOC
PARROT_CANNOT_RETURN_NULL
Set *
-set_union(ARGIN(const Set *s1), ARGIN(const Set *s2))
+set_union(PARROT_INTERP, ARGIN(const Set *s1), ARGIN(const Set *s2))
{
ASSERT_ARGS(set_union)
unsigned int i;
- Set * const s = set_make(s1->length);
+ Set * const s = set_make(interp, s1->length);
if (s1->length != s2->length)
fatal(1, "set_union", "Sets don't have the same length\n");
@@ -318,7 +318,7 @@
/*
-=item C<Set * set_intersec(const Set *s1, const Set *s2)>
+=item C<Set * set_intersec(PARROT_INTERP, const Set *s1, const Set *s2)>
Creates a new Set object that is the intersection of the Set arguments (defined
through the binary C<and> operator.)
@@ -332,11 +332,11 @@
PARROT_MALLOC
PARROT_CANNOT_RETURN_NULL
Set *
-set_intersec(ARGIN(const Set *s1), ARGIN(const Set *s2))
+set_intersec(PARROT_INTERP, ARGIN(const Set *s1), ARGIN(const Set *s2))
{
ASSERT_ARGS(set_intersec)
unsigned int i;
- Set * const s = set_make(s1->length);
+ Set * const s = set_make(interp, s1->length);
if (s1->length != s2->length)
fatal(1, "set_intersec", "Sets don't have the same length\n");
Modified: branches/boehm_gc_2/compilers/imcc/sets.h
==============================================================================
--- branches/boehm_gc_2/compilers/imcc/sets.h Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/imcc/sets.h Mon Feb 22 12:30:02 2010 (r44294)
@@ -29,8 +29,9 @@
PARROT_MALLOC
PARROT_CANNOT_RETURN_NULL
-Set* set_copy(ARGIN(const Set *s))
- __attribute__nonnull__(1);
+Set* set_copy(PARROT_INTERP, ARGIN(const Set *s))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
int set_equal(ARGIN(const Set *s1), ARGIN(const Set *s2))
__attribute__nonnull__(1)
@@ -47,9 +48,12 @@
PARROT_MALLOC
PARROT_CANNOT_RETURN_NULL
-Set * set_intersec(ARGIN(const Set *s1), ARGIN(const Set *s2))
+Set * set_intersec(PARROT_INTERP,
+ ARGIN(const Set *s1),
+ ARGIN(const Set *s2))
__attribute__nonnull__(1)
- __attribute__nonnull__(2);
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3);
void set_intersec_inplace(ARGMOD(Set *s1), ARGIN(const Set *s2))
__attribute__nonnull__(1)
@@ -58,17 +62,20 @@
PARROT_MALLOC
PARROT_CANNOT_RETURN_NULL
-Set* set_make(unsigned int length);
+Set* set_make(PARROT_INTERP, unsigned int length)
+ __attribute__nonnull__(1);
PARROT_MALLOC
PARROT_CANNOT_RETURN_NULL
-Set* set_make_full(unsigned int length);
+Set* set_make_full(PARROT_INTERP, unsigned int length)
+ __attribute__nonnull__(1);
PARROT_MALLOC
PARROT_CANNOT_RETURN_NULL
-Set * set_union(ARGIN(const Set *s1), ARGIN(const Set *s2))
+Set * set_union(PARROT_INTERP, ARGIN(const Set *s1), ARGIN(const Set *s2))
__attribute__nonnull__(1)
- __attribute__nonnull__(2);
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3);
#define ASSERT_ARGS_set_add __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(s))
@@ -77,7 +84,8 @@
#define ASSERT_ARGS_set_contains __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(s))
#define ASSERT_ARGS_set_copy __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(s))
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(s))
#define ASSERT_ARGS_set_equal __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(s1) \
, PARROT_ASSERT_ARG(s2))
@@ -86,15 +94,19 @@
#define ASSERT_ARGS_set_free __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(s))
#define ASSERT_ARGS_set_intersec __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(s1) \
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(s1) \
, PARROT_ASSERT_ARG(s2))
#define ASSERT_ARGS_set_intersec_inplace __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(s1) \
, PARROT_ASSERT_ARG(s2))
-#define ASSERT_ARGS_set_make __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
-#define ASSERT_ARGS_set_make_full __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_set_make __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_set_make_full __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_set_union __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(s1) \
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(s1) \
, PARROT_ASSERT_ARG(s2))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: compilers/imcc/sets.c */
Modified: branches/boehm_gc_2/compilers/imcc/symreg.c
==============================================================================
--- branches/boehm_gc_2/compilers/imcc/symreg.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/imcc/symreg.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -48,19 +48,21 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
PARROT_MALLOC
-static char * _mk_fullname(
+static char * _mk_fullname(PARROT_INTERP,
ARGIN_NULLOK(const Namespace *ns),
ARGIN(const char *name))
- __attribute__nonnull__(2);
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(3);
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
-static SymReg * _mk_symreg(
+static SymReg * _mk_symreg(PARROT_INTERP,
ARGMOD(SymHash *hsh),
ARGIN(const char *name),
int t)
__attribute__nonnull__(1)
__attribute__nonnull__(2)
+ __attribute__nonnull__(3)
FUNC_MODIFIES(*hsh);
PARROT_WARN_UNUSED_RESULT
@@ -95,17 +97,20 @@
FUNC_MODIFIES(*unit)
FUNC_MODIFIES(*rhs);
-static void resize_symhash(ARGMOD(SymHash *hsh))
+static void resize_symhash(PARROT_INTERP, ARGMOD(SymHash *hsh))
__attribute__nonnull__(1)
+ __attribute__nonnull__(2)
FUNC_MODIFIES(*hsh);
#define ASSERT_ARGS__get_sym_typed __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(hsh) \
, PARROT_ASSERT_ARG(name))
#define ASSERT_ARGS__mk_fullname __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(name))
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(name))
#define ASSERT_ARGS__mk_symreg __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(hsh) \
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(hsh) \
, PARROT_ASSERT_ARG(name))
#define ASSERT_ARGS_add_ns __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
@@ -121,7 +126,8 @@
, PARROT_ASSERT_ARG(left) \
, PARROT_ASSERT_ARG(rhs))
#define ASSERT_ARGS_resize_symhash __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(hsh))
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(hsh))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: static */
@@ -139,7 +145,7 @@
push_namespace(PARROT_INTERP, ARGIN(const char *name))
{
ASSERT_ARGS(push_namespace)
- Namespace * const ns = mem_allocate_zeroed_typed(Namespace);
+ Namespace * const ns = mem_gc_allocate_zeroed_typed(interp, Namespace);
ns->parent = IMCC_INFO(interp)->namespace_stack;
ns->name = mem_sys_strdup(name);
@@ -244,7 +250,8 @@
/*
-=item C<static SymReg * _mk_symreg(SymHash *hsh, const char *name, int t)>
+=item C<static SymReg * _mk_symreg(PARROT_INTERP, SymHash *hsh, const char
+*name, int t)>
Makes a new SymReg in the given SymHash from a varname and type.
@@ -255,20 +262,20 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static SymReg *
-_mk_symreg(ARGMOD(SymHash *hsh), ARGIN(const char *name), int t)
+_mk_symreg(PARROT_INTERP, ARGMOD(SymHash *hsh), ARGIN(const char *name), int t)
{
ASSERT_ARGS(_mk_symreg)
SymReg * r = _get_sym_typed(hsh, name, t);
if (!r) {
- r = mem_allocate_zeroed_typed(SymReg);
+ r = mem_gc_allocate_zeroed_typed(interp, SymReg);
r->set = t;
r->type = VTREG;
r->name = mem_sys_strdup(name);
r->color = -1;
r->want_regno = -1;
- _store_symreg(hsh, r);
+ _store_symreg(interp, hsh, r);
}
return r;
@@ -296,7 +303,7 @@
/* Check for the condition that fires up a segfault in TT #162 */
PARROT_ASSERT(unit != NULL);
- return _mk_symreg(&unit->hash, name, t);
+ return _mk_symreg(interp, &unit->hash, name, t);
}
@@ -386,10 +393,10 @@
{
ASSERT_ARGS(mk_pcc_sub)
IMC_Unit * const unit = IMCC_INFO(interp)->last_unit;
- SymReg * const r = _mk_symreg(&unit->hash, name, proto);
+ SymReg * const r = _mk_symreg(interp, &unit->hash, name, proto);
r->type = VT_PCC_SUB;
- r->pcc_sub = mem_allocate_zeroed_typed(pcc_sub_t);
+ r->pcc_sub = mem_gc_allocate_zeroed_typed(interp, pcc_sub_t);
return r;
}
@@ -420,7 +427,7 @@
if (unit->prev && unit->prev->_namespace == ns)
unit->_namespace = ns;
else {
- SymReg * const g = dup_sym(ns);
+ SymReg * const g = dup_sym(interp, ns);
SymReg * const r = _get_sym(&IMCC_INFO(interp)->ghash, g->name);
unit->_namespace = g;
@@ -430,7 +437,7 @@
/* this unit should free its namespace only if it's the only thing
* holding onto it */
if (!r || r->type != VT_CONSTP) {
- _store_symreg(&IMCC_INFO(interp)->ghash, g);
+ _store_symreg(interp, &IMCC_INFO(interp)->ghash, g);
unit->owns_namespace = 0;
}
else
@@ -441,7 +448,7 @@
/*
-=item C<void add_pcc_arg(SymReg *r, SymReg *arg)>
+=item C<void add_pcc_arg(PARROT_INTERP, SymReg *r, SymReg *arg)>
Adds a register or constant to the function arg list.
@@ -450,14 +457,14 @@
*/
void
-add_pcc_arg(ARGMOD(SymReg *r), ARGMOD(SymReg *arg))
+add_pcc_arg(PARROT_INTERP, ARGMOD(SymReg *r), ARGMOD(SymReg *arg))
{
ASSERT_ARGS(add_pcc_arg)
pcc_sub_t * const sub = r->pcc_sub;
const int n = sub->nargs;
- mem_realloc_n_typed(sub->args, n + 1, SymReg *);
- mem_realloc_n_typed(sub->arg_flags, n + 1, int);
+ sub->args = mem_gc_realloc_n_typed(interp, sub->args, n + 1, SymReg *);
+ sub->arg_flags = mem_gc_realloc_n_typed(interp, sub->arg_flags, n + 1, int);
sub->args[n] = arg;
sub->arg_flags[n] = arg->type;
@@ -470,7 +477,7 @@
/*
-=item C<void add_pcc_result(SymReg *r, SymReg *arg)>
+=item C<void add_pcc_result(PARROT_INTERP, SymReg *r, SymReg *arg)>
Adds a register or constant to the function's return list.
@@ -479,14 +486,14 @@
*/
void
-add_pcc_result(ARGMOD(SymReg *r), ARGMOD(SymReg *arg))
+add_pcc_result(PARROT_INTERP, ARGMOD(SymReg *r), ARGMOD(SymReg *arg))
{
ASSERT_ARGS(add_pcc_result)
pcc_sub_t * const sub = r->pcc_sub;
const int n = sub->nret;
- mem_realloc_n_typed(sub->ret, n + 1, SymReg *);
- mem_realloc_n_typed(sub->ret_flags, n + 1, int);
+ sub->ret = mem_gc_realloc_n_typed(interp, sub->ret, n + 1, SymReg *);
+ sub->ret_flags = mem_gc_realloc_n_typed(interp, sub->ret_flags, n + 1, int);
/* we can't keep the flags in the SymReg as the SymReg
* maybe used with different flags for different calls */
@@ -501,7 +508,7 @@
/*
-=item C<void add_pcc_multi(SymReg *r, SymReg *arg)>
+=item C<void add_pcc_multi(PARROT_INTERP, SymReg *r, SymReg *arg)>
Adds a :multi signature to the sub.
@@ -510,13 +517,13 @@
*/
void
-add_pcc_multi(ARGMOD(SymReg *r), ARGIN_NULLOK(SymReg *arg))
+add_pcc_multi(PARROT_INTERP, ARGMOD(SymReg *r), ARGIN_NULLOK(SymReg *arg))
{
ASSERT_ARGS(add_pcc_multi)
pcc_sub_t * const sub = r->pcc_sub;
const int n = sub->nmulti;
- mem_realloc_n_typed(sub->multi, n + 1, SymReg *);
+ sub->multi = mem_gc_realloc_n_typed(interp, sub->multi, n + 1, SymReg *);
sub->multi[n] = arg;
sub->nmulti++;
}
@@ -592,7 +599,8 @@
/*
-=item C<static char * _mk_fullname(const Namespace *ns, const char *name)>
+=item C<static char * _mk_fullname(PARROT_INTERP, const Namespace *ns, const
+char *name)>
Combines the namespace and name together, separated by a C<::>. If there's no
namespace, the name is returned on its own.
@@ -607,12 +615,12 @@
PARROT_CANNOT_RETURN_NULL
PARROT_MALLOC
static char *
-_mk_fullname(ARGIN_NULLOK(const Namespace *ns), ARGIN(const char *name))
+_mk_fullname(PARROT_INTERP, ARGIN_NULLOK(const Namespace *ns), ARGIN(const char *name))
{
ASSERT_ARGS(_mk_fullname)
if (ns) {
const size_t len = strlen(name) + strlen(ns->name) + 3;
- char *result = (char *) mem_sys_allocate(len);
+ char *result = mem_gc_allocate_n_typed(interp, len, char);
snprintf(result, len, "%s::%s", ns->name, name);
return result;
}
@@ -637,7 +645,7 @@
mk_ident(PARROT_INTERP, ARGIN(const char *name), int t)
{
ASSERT_ARGS(mk_ident)
- char * const fullname = _mk_fullname(IMCC_INFO(interp)->namespace_stack, name);
+ char * const fullname = _mk_fullname(interp, IMCC_INFO(interp)->namespace_stack, name);
SymReg *r = get_sym_by_name(&(IMCC_INFO(interp)->last_unit->hash), name);
if (r && r->set != t)
IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
@@ -648,7 +656,7 @@
if (IMCC_INFO(interp)->namespace_stack) {
- Identifier * const ident = mem_allocate_zeroed_typed(Identifier);
+ Identifier * const ident = mem_gc_allocate_zeroed_typed(interp, Identifier);
ident->name = fullname;
ident->next = IMCC_INFO(interp)->namespace_stack->idents;
@@ -784,7 +792,7 @@
IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
"global PMC constant not allowed");
- r = _mk_symreg(&IMCC_INFO(interp)->ghash, name, t);
+ r = _mk_symreg(interp, &IMCC_INFO(interp)->ghash, name, t);
}
else {
r = mk_ident(interp, name, t);
@@ -802,7 +810,8 @@
/*
-=item C<SymReg * _mk_const(SymHash *hsh, const char *name, int t)>
+=item C<SymReg * _mk_const(PARROT_INTERP, SymHash *hsh, const char *name, int
+t)>
Makes a new constant (internal use only).
@@ -813,10 +822,10 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
SymReg *
-_mk_const(ARGMOD(SymHash *hsh), ARGIN(const char *name), int t)
+_mk_const(PARROT_INTERP, ARGMOD(SymHash *hsh), ARGIN(const char *name), int t)
{
ASSERT_ARGS(_mk_const)
- SymReg * const r = _mk_symreg(hsh, name, t);
+ SymReg * const r = _mk_symreg(interp, hsh, name, t);
r->type = VTCONST;
if (t == 'U') {
@@ -902,9 +911,9 @@
SymHash * const h = &IMCC_INFO(interp)->ghash;
if (!h->data)
- create_symhash(h);
+ create_symhash(interp, h);
- return _mk_const(h, name, t);
+ return _mk_const(interp, h, name, t);
}
@@ -981,10 +990,10 @@
if (r && r->usage & U_LEXICAL)
is_lexical = 1;
- r = mem_allocate_zeroed_typed(SymReg);
+ r = mem_gc_allocate_zeroed_typed(interp, SymReg);
r->type = VTADDRESS;
r->name = mem_sys_strdup(name);
- _store_symreg(hsh, r);
+ _store_symreg(interp, hsh, r);
if (is_lexical)
r->usage |= U_LEXICAL;
@@ -1011,7 +1020,7 @@
}
}
- r = _mk_symreg(hsh, sub_name, 0);
+ r = _mk_symreg(interp, hsh, sub_name, 0);
r->type = VTADDRESS;
if (uniq) {
@@ -1119,7 +1128,7 @@
/*
-=item C<SymReg * dup_sym(const SymReg *r)>
+=item C<SymReg * dup_sym(PARROT_INTERP, const SymReg *r)>
Links keys to a keys structure = SymReg
@@ -1164,15 +1173,15 @@
PARROT_MALLOC
PARROT_CANNOT_RETURN_NULL
SymReg *
-dup_sym(ARGIN(const SymReg *r))
+dup_sym(PARROT_INTERP, ARGIN(const SymReg *r))
{
ASSERT_ARGS(dup_sym)
- SymReg * const new_sym = mem_allocate_zeroed_typed(SymReg);
+ SymReg * const new_sym = mem_gc_allocate_zeroed_typed(interp, SymReg);
STRUCT_COPY(new_sym, r);
new_sym->name = mem_sys_strdup(r->name);
if (r->nextkey)
- new_sym->nextkey = dup_sym(r->nextkey);
+ new_sym->nextkey = dup_sym(interp, r->nextkey);
return new_sym;
}
@@ -1236,7 +1245,7 @@
}
/* no, need a new one */
- keychain = mem_allocate_zeroed_typed(SymReg);
+ keychain = mem_gc_allocate_zeroed_typed(interp, SymReg);
keychain->type = VTCONST;
++keychain->use_count;
@@ -1249,7 +1258,7 @@
if (REG_NEEDS_ALLOC(keys[i]))
keychain->type |= VTREGKEY;
- key->nextkey = dup_sym(keys[i]);
+ key->nextkey = dup_sym(interp, keys[i]);
key = key->nextkey;
/* for registers, point ->reg to the original, needed by
@@ -1262,7 +1271,7 @@
keychain->set = 'K';
keychain->color = -1;
- _store_symreg(h, keychain);
+ _store_symreg(interp, h, keychain);
return keychain;
}
@@ -1316,7 +1325,7 @@
/*
-=item C<void create_symhash(SymHash *hash)>
+=item C<void create_symhash(PARROT_INTERP, SymHash *hash)>
Creates a symbol hash table with space for 16 entries.
@@ -1325,10 +1334,10 @@
*/
void
-create_symhash(ARGOUT(SymHash *hash))
+create_symhash(PARROT_INTERP, ARGOUT(SymHash *hash))
{
ASSERT_ARGS(create_symhash)
- hash->data = mem_allocate_n_zeroed_typed(16, SymReg *);
+ hash->data = mem_gc_allocate_n_zeroed_typed(interp, 16, SymReg *);
hash->size = 16;
hash->entries = 0;
}
@@ -1336,7 +1345,7 @@
/*
-=item C<static void resize_symhash(SymHash *hsh)>
+=item C<static void resize_symhash(PARROT_INTERP, SymHash *hsh)>
Resizes a symbol hash table.
@@ -1345,16 +1354,16 @@
*/
static void
-resize_symhash(ARGMOD(SymHash *hsh))
+resize_symhash(PARROT_INTERP, ARGMOD(SymHash *hsh))
{
ASSERT_ARGS(resize_symhash)
const int new_size = hsh->size << 1; /* new size is twice as large */
int n_next = 16;
- SymReg **next_r = mem_allocate_n_zeroed_typed(n_next, SymReg *);
+ SymReg **next_r = mem_gc_allocate_n_zeroed_typed(interp, n_next, SymReg *);
SymHash nh; /* new symbol table */
unsigned int i;
- nh.data = mem_allocate_n_zeroed_typed(new_size, SymReg *);
+ nh.data = mem_gc_allocate_n_zeroed_typed(interp, new_size, SymReg *);
for (i = 0; i < hsh->size; i++) {
SymReg *r, *next;
@@ -1367,7 +1376,7 @@
/* remember all the chained next pointers and clear r->next */
if (j >= n_next) {
n_next <<= 1;
- mem_realloc_n_typed(next_r, n_next, SymReg *);
+ next_r = mem_gc_realloc_n_typed(interp, next_r, n_next, SymReg *);
}
r->next = NULL;
@@ -1396,7 +1405,7 @@
/*
-=item C<void _store_symreg(SymHash *hsh, SymReg *r)>
+=item C<void _store_symreg(PARROT_INTERP, SymHash *hsh, SymReg *r)>
Stores a symbol in the hash (internal use only).
@@ -1405,7 +1414,7 @@
*/
void
-_store_symreg(ARGMOD(SymHash *hsh), ARGMOD(SymReg *r))
+_store_symreg(PARROT_INTERP, ARGMOD(SymHash *hsh), ARGMOD(SymReg *r))
{
ASSERT_ARGS(_store_symreg)
const int i = hash_str(r->name) % hsh->size;
@@ -1418,7 +1427,7 @@
hsh->entries++;
if (hsh->entries >= hsh->size)
- resize_symhash(hsh);
+ resize_symhash(interp, hsh);
}
@@ -1436,7 +1445,7 @@
store_symreg(PARROT_INTERP, ARGMOD(SymReg *r))
{
ASSERT_ARGS(store_symreg)
- _store_symreg(&IMCC_INFO(interp)->cur_unit->hash, r);
+ _store_symreg(interp, &IMCC_INFO(interp)->cur_unit->hash, r);
}
@@ -1512,7 +1521,7 @@
SymReg *p;
for (ns = nspace; ns; ns = ns->parent) {
- char * const fullname = _mk_fullname(ns, name);
+ char * const fullname = _mk_fullname(interp, ns, name);
p = _get_sym(hsh, fullname);
mem_sys_free(fullname);
Modified: branches/boehm_gc_2/compilers/imcc/symreg.h
==============================================================================
--- branches/boehm_gc_2/compilers/imcc/symreg.h Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/imcc/symreg.h Mon Feb 22 12:30:02 2010 (r44294)
@@ -138,14 +138,19 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
-SymReg * _mk_const(ARGMOD(SymHash *hsh), ARGIN(const char *name), int t)
+SymReg * _mk_const(PARROT_INTERP,
+ ARGMOD(SymHash *hsh),
+ ARGIN(const char *name),
+ int t)
__attribute__nonnull__(1)
__attribute__nonnull__(2)
+ __attribute__nonnull__(3)
FUNC_MODIFIES(*hsh);
-void _store_symreg(ARGMOD(SymHash *hsh), ARGMOD(SymReg *r))
+void _store_symreg(PARROT_INTERP, ARGMOD(SymHash *hsh), ARGMOD(SymReg *r))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
+ __attribute__nonnull__(3)
FUNC_MODIFIES(*hsh)
FUNC_MODIFIES(*r);
@@ -154,9 +159,10 @@
__attribute__nonnull__(2)
FUNC_MODIFIES(*unit);
-void add_pcc_arg(ARGMOD(SymReg *r), ARGMOD(SymReg *arg))
+void add_pcc_arg(PARROT_INTERP, ARGMOD(SymReg *r), ARGMOD(SymReg *arg))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
+ __attribute__nonnull__(3)
FUNC_MODIFIES(*r)
FUNC_MODIFIES(*arg);
@@ -165,13 +171,17 @@
__attribute__nonnull__(2)
FUNC_MODIFIES(*r);
-void add_pcc_multi(ARGMOD(SymReg *r), ARGIN_NULLOK(SymReg *arg))
+void add_pcc_multi(PARROT_INTERP,
+ ARGMOD(SymReg *r),
+ ARGIN_NULLOK(SymReg *arg))
__attribute__nonnull__(1)
+ __attribute__nonnull__(2)
FUNC_MODIFIES(*r);
-void add_pcc_result(ARGMOD(SymReg *r), ARGMOD(SymReg *arg))
+void add_pcc_result(PARROT_INTERP, ARGMOD(SymReg *r), ARGMOD(SymReg *arg))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
+ __attribute__nonnull__(3)
FUNC_MODIFIES(*r)
FUNC_MODIFIES(*arg);
@@ -188,8 +198,9 @@
__attribute__nonnull__(1)
FUNC_MODIFIES(*hsh);
-void create_symhash(ARGOUT(SymHash *hash))
+void create_symhash(PARROT_INTERP, ARGOUT(SymHash *hash))
__attribute__nonnull__(1)
+ __attribute__nonnull__(2)
FUNC_MODIFIES(*hash);
void debug_dump_sym_hash(ARGIN(const SymHash *hsh))
@@ -197,8 +208,9 @@
PARROT_MALLOC
PARROT_CANNOT_RETURN_NULL
-SymReg * dup_sym(ARGIN(const SymReg *r))
- __attribute__nonnull__(1);
+SymReg * dup_sym(PARROT_INTERP, ARGIN(const SymReg *r))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
PARROT_CAN_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
@@ -338,24 +350,29 @@
, PARROT_ASSERT_ARG(hsh) \
, PARROT_ASSERT_ARG(name))
#define ASSERT_ARGS__mk_const __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(hsh) \
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(hsh) \
, PARROT_ASSERT_ARG(name))
#define ASSERT_ARGS__store_symreg __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(hsh) \
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(hsh) \
, PARROT_ASSERT_ARG(r))
#define ASSERT_ARGS_add_namespace __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(unit))
#define ASSERT_ARGS_add_pcc_arg __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(r) \
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(r) \
, PARROT_ASSERT_ARG(arg))
#define ASSERT_ARGS_add_pcc_cc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(r) \
, PARROT_ASSERT_ARG(arg))
#define ASSERT_ARGS_add_pcc_multi __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(r))
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(r))
#define ASSERT_ARGS_add_pcc_result __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(r) \
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(r) \
, PARROT_ASSERT_ARG(arg))
#define ASSERT_ARGS_add_pcc_sub __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(r) \
@@ -366,11 +383,13 @@
#define ASSERT_ARGS_clear_sym_hash __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(hsh))
#define ASSERT_ARGS_create_symhash __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(hash))
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(hash))
#define ASSERT_ARGS_debug_dump_sym_hash __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(hsh))
#define ASSERT_ARGS_dup_sym __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(r))
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(r))
#define ASSERT_ARGS_find_sym __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(name))
Modified: branches/boehm_gc_2/compilers/pirc/src/bcgen.c
==============================================================================
--- branches/boehm_gc_2/compilers/pirc/src/bcgen.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/pirc/src/bcgen.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -798,10 +798,10 @@
/* A type_count of 1 means there was a :multi flag, but no :multi types.
* therefore, create a special signature and return that. */
if (type_count == 1)
- return pmc_new(bc->interp, enum_class_FixedIntegerArray);
+ return Parrot_pmc_new(bc->interp, enum_class_FixedIntegerArray);
/* create a FixedPMCArray to store all multi types */
- multi_signature = pmc_new(bc->interp, enum_class_FixedPMCArray);
+ multi_signature = Parrot_pmc_new(bc->interp, enum_class_FixedPMCArray);
/* set its size as specified in type_count */
VTABLE_set_integer_native(bc->interp, multi_signature, type_count);
@@ -818,7 +818,7 @@
/* add the string to the constant table, retrieve a pointer to the STRING */
STRING * typestring = add_string_const_from_cstring(bc, types[i].entry.ident);
/* create a new String PMC. */
- sig_pmc = pmc_new(bc->interp, enum_class_String);
+ sig_pmc = Parrot_pmc_new(bc->interp, enum_class_String);
/* set the STRING in the String PMC */
VTABLE_set_string_native(bc->interp, sig_pmc, typestring);
break;
@@ -977,7 +977,7 @@
STRING * const method = string_from_literal(bc->interp, "declare_lex_preg");
/* create a lexinfo PMC */
- PMC * lex_info = pmc_new_noinit(bc->interp, lex_info_id);
+ PMC * lex_info = Parrot_pmc_new_noinit(bc->interp, lex_info_id);
VTABLE_init_pmc(bc->interp, lex_info, sub);
/* walk through the list of lexicals and register them */
@@ -1001,7 +1001,7 @@
* :lex flag, then create the lex_info anyway.
*/
if (lex_info == NULL && needlex) {
- lex_info = pmc_new_noinit(bc->interp, lex_info_id);
+ lex_info = Parrot_pmc_new_noinit(bc->interp, lex_info_id);
VTABLE_init_pmc(bc->interp, lex_info, sub);
}
@@ -1108,7 +1108,7 @@
switch (ns->entry_type) {
case MULTI_TYPE_IDENT: {
- PMC *namespace_pmc = constant_pmc_new(bc->interp, enum_class_String);
+ PMC *namespace_pmc = Parrot_pmc_new_constant(bc->interp, enum_class_String);
PARROT_NAMESPACE(namespace_pmc)->name =
add_string_const_from_cstring(bc, ns->entry.ident);
break;
@@ -1161,7 +1161,7 @@
Parrot_ex_throw_from_c_args(bc->interp, NULL, EXCEPTION_NO_CLASS,
"Requested sub class '%Ss' in :instanceof() not found", classname);
- return pmc_new(bc->interp, type);
+ return Parrot_pmc_new(bc->interp, type);
}
}
@@ -1175,7 +1175,7 @@
* TODO create constant - see also src/packfile.c
* XXX is this (still) necessary?
*/
- return pmc_new(bc->interp, type);
+ return Parrot_pmc_new(bc->interp, type);
}
/*
Modified: branches/boehm_gc_2/compilers/pirc/src/main.c
==============================================================================
--- branches/boehm_gc_2/compilers/pirc/src/main.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/pirc/src/main.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -27,7 +27,7 @@
#endif
-
+/* HEADERIZER HFILE: none */
/* XXX use pthreads library to test thread safety.
does not work currently on windows.
@@ -49,6 +49,24 @@
/* HEADERIZER HFILE: none */
+/* HEADERIZER BEGIN: static */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+
+static void print_help(ARGIN(char const * const program_name))
+ __attribute__nonnull__(1);
+
+static void runcode(PARROT_INTERP, int argc, ARGIN(char *argv[]))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(3);
+
+#define ASSERT_ARGS_print_help __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(program_name))
+#define ASSERT_ARGS_runcode __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(argv))
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+/* HEADERIZER END: static */
+
/*
=head1 FUNCTIONS
@@ -64,7 +82,7 @@
*/
static void
-print_help(char const * const program_name)
+print_help(ARGIN(char const * const program_name))
{
fprintf(stderr, "Usage: %s [options] <file>\n", program_name);
fprintf(stderr, "Options:\n\n"
@@ -117,8 +135,10 @@
Unpack the arguments and invoke parse_file().
*/
+PARROT_CAN_RETURN_NULL
void *
-process_file(void *a) {
+process_file(ARGIN(void *a))
+{
/* unpack the arguments from the structure parser_args */
@@ -147,7 +167,8 @@
*/
static void
-runcode(PARROT_INTERP, int argc, char *argv[]) {
+runcode(PARROT_INTERP, int argc, ARGIN(char *argv[]))
+{
/* runs :init functions */
PackFile_fixup_subs(interp, PBC_MAIN, NULL);
@@ -159,8 +180,7 @@
/*
-=item C<int
-main(int argc, char *argv[])>
+=item C<int main(int argc, char *argv[])>
Main compiler driver.
Modified: branches/boehm_gc_2/compilers/pirc/src/pir.y
==============================================================================
--- branches/boehm_gc_2/compilers/pirc/src/pir.y Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/pirc/src/pir.y Mon Feb 22 12:30:02 2010 (r44294)
@@ -88,6 +88,14 @@
#endif
+/* HEADERIZER HFILE: none */
+
+/* HEADERIZER BEGIN: static */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+/* HEADERIZER END: static */
+
char *expand_macro(yyscan_t yyscanner, macro_def * const macro, macro_param * args);
/* Enumeration of mathematical operator types; these are used to index the opnames array. */
Modified: branches/boehm_gc_2/compilers/pirc/src/pircompiler.c
==============================================================================
--- branches/boehm_gc_2/compilers/pirc/src/pircompiler.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/pirc/src/pircompiler.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -15,6 +15,47 @@
#include "pirregalloc.h"
#include "pirerr.h"
+/* HEADERIZER HFILE: compilers/pirc/src/pircompiler.h */
+
+/* HEADERIZER BEGIN: static */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CAN_RETURN_NULL
+static char const * find_string(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const str))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_MALLOC
+PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
+static allocated_mem_ptrs * new_mem_ptrs_block(void);
+
+static void register_ptr(ARGIN(lexer_state *lexer), ARGIN(void *ptr))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+static void store_string(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const str))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+#define ASSERT_ARGS_find_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(str))
+#define ASSERT_ARGS_new_mem_ptrs_block __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_register_ptr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(ptr))
+#define ASSERT_ARGS_store_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(str))
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+/* HEADERIZER END: static */
+
/* XXX count memory, so we can check out mem. savings of string reuse
* Only temporarily used, so no need to "fix" this.
*/
@@ -26,8 +67,7 @@
=over 4
-=item C<static allocated_mem_ptrs *
-new_mem_ptrs_block(void)>
+=item C<static allocated_mem_ptrs * new_mem_ptrs_block(void)>
Create a new C<allocated_mem_ptrs> block; all pointers to allocated memory
within pirc are stored in such blocks. One block has space for a number of
@@ -41,14 +81,15 @@
PARROT_CANNOT_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
static allocated_mem_ptrs *
-new_mem_ptrs_block(void) {
+new_mem_ptrs_block(void)
+{
+ ASSERT_ARGS(new_mem_ptrs_block)
return mem_allocate_zeroed_typed(allocated_mem_ptrs);
}
/*
-=item C<static void
-register_ptr(lexer_state *lexer, void *ptr)>
+=item C<static void register_ptr(lexer_state *lexer, void *ptr)>
Store the pointer C<ptr> in a datastructure; whenever C<release_resources()>
is invoked, C<ptr> will be freed through C<mem_sys_free()>.
@@ -57,7 +98,9 @@
*/
static void
-register_ptr(NOTNULL(lexer_state *lexer), ARGIN(void *ptr)) {
+register_ptr(ARGIN(lexer_state *lexer), ARGIN(void *ptr))
+{
+ ASSERT_ARGS(register_ptr)
allocated_mem_ptrs *ptrs = lexer->mem_allocations;
PARROT_ASSERT(ptrs);
@@ -75,8 +118,8 @@
/*
-=item C<void *
-pir_mem_allocate_zeroed(lexer_state * const lexer, size_t numbytes)>
+=item C<void * pir_mem_allocate_zeroed(lexer_state * const lexer, size_t
+numbytes)>
Memory allocation function for all PIR internal functions. Memory is allocated
through Parrot's allocation functions, but the pointer to the allocated memory
@@ -92,7 +135,8 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
void *
-pir_mem_allocate_zeroed(NOTNULL(lexer_state * const lexer), size_t numbytes) {
+pir_mem_allocate_zeroed(ARGIN(lexer_state * const lexer), size_t numbytes)
+{
void *ptr = mem_sys_allocate_zeroed(numbytes);
totalmem += numbytes;
@@ -103,8 +147,7 @@
/*
-=item C<void *
-pir_mem_allocate(NOTNULL(lexer_state * const lexer), size_t numbytes)>
+=item C<void * pir_mem_allocate(lexer_state * const lexer, size_t numbytes)>
See C<pir_mem_allocate_zeroed()>. Memory is C<not> guaranteed to be zeroed.
(It might, it might not, depending on what your system finds appropriate.
@@ -117,7 +160,8 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
void *
-pir_mem_allocate(NOTNULL(lexer_state * const lexer), size_t numbytes) {
+pir_mem_allocate(ARGIN(lexer_state * const lexer), size_t numbytes)
+{
void *ptr = mem_sys_allocate(numbytes);
totalmem += numbytes;
@@ -129,8 +173,8 @@
/*
-=item C<void
-init_hashtable(lexer_state * const lexer, hashtable * const table, unsigned size)>
+=item C<void init_hashtable(lexer_state * const lexer, hashtable * const table,
+unsigned size)>
Initialize the hashtable C<table> with space for C<size> buckets.
@@ -138,7 +182,7 @@
*/
void
-init_hashtable(NOTNULL(lexer_state * const lexer), NOTNULL(hashtable * const table),
+init_hashtable(ARGIN(lexer_state * const lexer), ARGIN(hashtable * const table),
unsigned size)
{
table->contents = (bucket **)pir_mem_allocate_zeroed(lexer, size * sizeof (bucket *));
@@ -148,8 +192,8 @@
/*
-=item C<lexer_state *
-new_lexer(char * const filename, int flags)>
+=item C<lexer_state * new_lexer(PARROT_INTERP, char * const filename, int
+flags)>
Constructor for a lexer structure. Initializes all fields, creates
a Parrot interpreter structure.
@@ -161,7 +205,8 @@
PARROT_CANNOT_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
lexer_state *
-new_lexer(PARROT_INTERP, NULLOK(char * const filename), int flags) {
+new_lexer(PARROT_INTERP, ARGIN_NULLOK(char * const filename), int flags)
+{
lexer_state *lexer = mem_allocate_zeroed_typed(lexer_state);
lexer->filename = filename;
lexer->interp = interp;
@@ -207,8 +252,7 @@
/*
-=item C<bucket *
-new_bucket(lexer_state * const lexer)>
+=item C<bucket * new_bucket(lexer_state * const lexer)>
Constructor for a bucket object.
@@ -218,14 +262,15 @@
PARROT_CANNOT_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
bucket *
-new_bucket(NOTNULL(lexer_state * const lexer)) {
+new_bucket(ARGIN(lexer_state * const lexer))
+{
return pir_mem_allocate_zeroed_typed(lexer, bucket);
}
/*
-=item C<static void
-store_string(lexer_state * const lexer, char const * const str)>
+=item C<static void store_string(lexer_state * const lexer, char const * const
+str)>
Store the string C<str> in a hashtable; whenever this string is needed, a pointer
to the same physical string is returned, preventing allocating different buffers
@@ -236,7 +281,9 @@
*/
static void
-store_string(NOTNULL(lexer_state * const lexer), NOTNULL(char const * const str)) {
+store_string(ARGIN(lexer_state * const lexer), ARGIN(char const * const str))
+{
+ ASSERT_ARGS(store_string)
hashtable *table = &lexer->strings;
unsigned long hash = get_hashcode(str, table->size);
bucket *b = new_bucket(lexer);
@@ -246,8 +293,8 @@
/*
-=item C<static char const *
-find_string(lexer_state * const lexer, char const * const str)>
+=item C<static char const * find_string(lexer_state * const lexer, char const *
+const str)>
Find the string C<str> in the lexer's string hashtable. If the string was found,
then a pointer to that buffer is returned. So, whenever for instance the string
@@ -260,7 +307,9 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
static char const *
-find_string(NOTNULL(lexer_state * const lexer), NOTNULL(char const * const str)) {
+find_string(ARGIN(lexer_state * const lexer), ARGIN(char const * const str))
+{
+ ASSERT_ARGS(find_string)
hashtable *table = &lexer->strings;
unsigned long hash = get_hashcode(str, table->size);
bucket *b = get_bucket(table, hash);
@@ -278,8 +327,8 @@
/*
-=item C<char *
-dupstrn(lexer_state * const lexer, char const * const source, size_t slen)>
+=item C<char const * dupstrn(lexer_state * const lexer, char * const source,
+size_t slen)>
See dupstr, except that this version takes the number of characters to be
copied. Easy for copying a string except the quotes, for instance.
@@ -293,7 +342,8 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
char const *
-dupstrn(NOTNULL(lexer_state * const lexer), NOTNULL(char * const source), size_t slen) {
+dupstrn(ARGIN(lexer_state * const lexer), ARGIN(char * const source), size_t slen)
+{
char const * result = find_string(lexer, source);
/* make sure the string is terminated in time */
source[slen] = '\0';
@@ -313,8 +363,7 @@
/*
-=item C<char *
-dupstr(lexer_state * const lexer, char const * const source)>
+=item C<char const * dupstr(lexer_state * const lexer, char * const source)>
The C89 standard does not define a strdup() in the C library,
so define our own strdup. Function names beginning with "str"
@@ -327,14 +376,14 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
char const *
-dupstr(NOTNULL(lexer_state * const lexer), NOTNULL(char * const source)) {
+dupstr(ARGIN(lexer_state * const lexer), ARGIN(char * const source))
+{
return dupstrn(lexer, source, strlen(source));
}
/*
-=item C<void
-release_resources(lexer_state *lexer)>
+=item C<void release_resources(lexer_state *lexer)>
Release all resources pointed to by C<lexer>.
Free all memory that was allocated through C<pir_mem_allocate_zeroed()>.
@@ -344,7 +393,8 @@
*/
void
-release_resources(NOTNULL(lexer_state *lexer)) {
+release_resources(ARGIN(lexer_state *lexer))
+{
allocated_mem_ptrs *iter;
if (TEST_FLAG(lexer->flags, LEXER_FLAG_VERBOSE))
@@ -375,8 +425,8 @@
/*
-=item C<void
-pirwarning(lexer_state * const lexer, int lineno, char const * const message, ...)>
+=item C<void pirwarning(lexer_state * const lexer, int lineno, char const *
+const message, ...)>
Emit a warning message to C<stderr>. The line number (passed in C<lineno>) is reported,
together with the message. The message can be formatted, meaning it can contain
@@ -387,7 +437,11 @@
*/
void
-pirwarning(lexer_state * const lexer, int lineno, char const * const message, ...) {
+pirwarning(ARGIN(lexer_state * const lexer),
+ int lineno,
+ ARGIN(char const * const message),
+ ...)
+{
va_list arg_ptr;
fprintf(stderr, "warning (line %d): ", lineno);
va_start(arg_ptr, message);
Modified: branches/boehm_gc_2/compilers/pirc/src/pircompiler.h
==============================================================================
--- branches/boehm_gc_2/compilers/pirc/src/pircompiler.h Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/pirc/src/pircompiler.h Mon Feb 22 12:30:02 2010 (r44294)
@@ -158,20 +158,6 @@
/* accessor for current macro; always first on the list. */
#define CURRENT_MACRO(X) (X)->macros->definitions
-
-/* constructor for a lexer_state object */
-lexer_state *new_lexer(PARROT_INTERP, char * const filename, int flags);
-
-void release_resources(lexer_state *lexer);
-
-char const *dupstr(lexer_state * const lexer, char * const str);
-
-char const *dupstrn(lexer_state * const lexer, char * const str, size_t numchars);
-
-bucket *new_bucket(lexer_state * const lexer);
-
-void init_hashtable(lexer_state * const lexer, hashtable * const table, unsigned size);
-
/* same trick as in parrot's memory system, for "automagic" casting */
#define pir_mem_allocate_zeroed_typed(lxr, type) (type *)pir_mem_allocate_zeroed(lxr, sizeof (type))
@@ -179,11 +165,97 @@
* allocated will be freed after the compilation. If you only need some memory temporarily
* and freeing can be done soon after (manually), then use parrot's mem_sys_allocate().
*/
-void *pir_mem_allocate_zeroed(lexer_state * const lexer, size_t numbytes);
-void *pir_mem_allocate(lexer_state * const lexer, size_t numbytes);
+/* HEADERIZER BEGIN: compilers/pirc/src/pircompiler.c */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+char const * dupstr(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char * const source))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+char const * dupstrn(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char * const source),
+ size_t slen)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void init_hashtable(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(hashtable * const table),
+ unsigned size)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
+bucket * new_bucket(ARGIN(lexer_state * const lexer))
+ __attribute__nonnull__(1);
+
+PARROT_MALLOC
+PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
+lexer_state * new_lexer(PARROT_INTERP,
+ ARGIN_NULLOK(char * const filename),
+ int flags)
+ __attribute__nonnull__(1);
+
+PARROT_MALLOC
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+void * pir_mem_allocate(ARGIN(lexer_state * const lexer), size_t numbytes)
+ __attribute__nonnull__(1);
+
+PARROT_MALLOC
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+void * pir_mem_allocate_zeroed(
+ ARGIN(lexer_state * const lexer),
+ size_t numbytes)
+ __attribute__nonnull__(1);
+
+void pirwarning(
+ ARGIN(lexer_state * const lexer),
+ int lineno,
+ ARGIN(char const * const message),
+ ...)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(3);
+
+void release_resources(ARGIN(lexer_state *lexer))
+ __attribute__nonnull__(1);
+
+#define ASSERT_ARGS_dupstr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(source))
+#define ASSERT_ARGS_dupstrn __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(source))
+#define ASSERT_ARGS_init_hashtable __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(table))
+#define ASSERT_ARGS_new_bucket __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_new_lexer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_pir_mem_allocate __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_pir_mem_allocate_zeroed __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_pirwarning __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(message))
+#define ASSERT_ARGS_release_resources __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+/* HEADERIZER END: compilers/pirc/src/pircompiler.c */
-void pirwarning(lexer_state * const lexer, int lineno, char const * const message, ...);
#endif /* PARROT_PIR_PIRCOMPILER_H_GUARD */
Modified: branches/boehm_gc_2/compilers/pirc/src/pircompunit.c
==============================================================================
--- branches/boehm_gc_2/compilers/pirc/src/pircompunit.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/pirc/src/pircompunit.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -44,6 +44,93 @@
#include "parrot/dynext.h"
#include "pmc/pmc_callcontext.h"
+/* HEADERIZER HFILE: compilers/pirc/src/pircompunit.h */
+
+/* HEADERIZER BEGIN: static */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+
+static void add_self_parameter(ARGIN(lexer_state * const lexer))
+ __attribute__nonnull__(1);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+static constant * create_const(
+ ARGIN(lexer_state * const lexer),
+ value_type type,
+ va_list arg_ptr)
+ __attribute__nonnull__(1);
+
+static void fixup_local_labels(ARGIN(lexer_state * const lexer))
+ __attribute__nonnull__(1);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+static expression * new_expr(
+ ARGIN(lexer_state * const lexer),
+ expr_type type)
+ __attribute__nonnull__(1);
+
+PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
+static instruction * new_instruction(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const opname))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+static invocation * new_invocation(ARGIN(lexer_state * const lexer))
+ __attribute__nonnull__(1);
+
+PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
+static key_entry * new_key_entry(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(expression * const expr))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_MALLOC
+PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
+static label * new_label(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const labelid),
+ int offset)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+static void new_statement(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const opname))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+#define ASSERT_ARGS_add_self_parameter __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_create_const __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_fixup_local_labels __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_new_expr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_new_instruction __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(opname))
+#define ASSERT_ARGS_new_invocation __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_new_key_entry __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(expr))
+#define ASSERT_ARGS_new_label __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(labelid))
+#define ASSERT_ARGS_new_statement __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(opname))
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+/* HEADERIZER END: static */
static unsigned const prime_numbers[] = {113 /* XXX think of more primes */ };
@@ -53,8 +140,7 @@
=over 4
-=item C<void
-reset_register_allocator(lexer_state * const lexer)>
+=item C<void reset_register_allocator(lexer_state * const lexer)>
Reset the register numbers for all types. After this
function has been invoked, the next request for a new
@@ -65,7 +151,8 @@
*/
void
-reset_register_allocator(lexer_state * const lexer) {
+reset_register_allocator(ARGIN(lexer_state * const lexer))
+{
/* set register allocator to 0 for all register types. */
int i;
for (i = 0; i < NUM_PARROT_TYPES; ++i)
@@ -75,8 +162,7 @@
/*
-=item C<void
-set_namespace(lexer_state * const lexer, key * const ns)>
+=item C<void set_namespace(lexer_state * const lexer, key * const ns)>
Set the current namespace in the lexer state, so that it is
available when needed, i.e. when a new subroutine node is
@@ -86,14 +172,15 @@
*/
void
-set_namespace(lexer_state * const lexer, key * const ns) {
+set_namespace(ARGIN(lexer_state * const lexer), ARGIN(key * const ns))
+{
lexer->current_ns = ns;
}
/*
-=item C<void
-set_sub_outer(lexer_state * const lexer, char const * const outersub)>
+=item C<void set_sub_outer(lexer_state * const lexer, char const * const
+outersub)>
Set the lexically enclosing sub for the current sub.
Thus, set the :outer() argument to the current subroutine.
@@ -102,7 +189,9 @@
*/
void
-set_sub_outer(lexer_state * const lexer, char const * const outersub) {
+set_sub_outer(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const outersub))
+{
CURRENT_SUB(lexer)->info.outersub = outersub;
SET_FLAG(lexer->subs->flags, PIRC_SUB_FLAG_HAS_OUTER);
}
@@ -112,7 +201,7 @@
/*
=item C<void
-set_sub_multi_type(lexer_state * const lexer, expression * const multitype)>
+set_sub_multi_type(ARGIN(lexer_state * const lexer), expression * const multitype)>
Add the multi-method signature type in C<multitype> to the current subroutine.
@@ -120,7 +209,9 @@
*/
void
-set_sub_multi_types(lexer_state * const lexer, expression * const multitype) {
+set_sub_multi_types(ARGIN(lexer_state * const lexer),
+ ARGIN(expression * const multitype))
+{
/* info.num_types is 1 higher than the actual number of types;
* n=1 means :multi() without any types; therefore, subtract 1 for actual number.
*/
@@ -159,8 +250,7 @@
/*
-=item C<static void
-add_self_parameter(lexer_state * const lexer)>
+=item C<static void add_self_parameter(lexer_state * const lexer)>
Add a parameter named C<"self"> to the current subroutine, but only
if both :vtable and :method flags have I<not> been set yet. If either
@@ -170,7 +260,8 @@
*/
static void
-add_self_parameter(lexer_state * const lexer) {
+add_self_parameter(ARGIN(lexer_state * const lexer))
+{
/* only add "self" parameter if :vtable and :method flags have not been set yet */
if (!TEST_FLAG(CURRENT_SUB(lexer)->flags, (PIRC_SUB_FLAG_VTABLE | PIRC_SUB_FLAG_METHOD))) {
@@ -180,8 +271,7 @@
/*
-=item C<void
-set_sub_vtable(lexer_state * const lexer, char const * vtablename)>
+=item C<void set_sub_vtable(lexer_state * const lexer, char const * vtablename)>
Set the :vtable() flag argument to the current subroutine. If C<vtablename>
is NULL, the name of the current sub is taken to be the vtable method name.
@@ -192,7 +282,9 @@
*/
void
-set_sub_vtable(lexer_state * const lexer, char const * vtablename) {
+set_sub_vtable(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * vtablename))
+{
int vtable_index;
if (vtablename == NULL) /* the sub's name I<is> the vtablename */
@@ -226,8 +318,7 @@
/*
-=item C<void
-set_sub_subid(lexer_state * const lexer, char const * const subid)>
+=item C<void set_sub_subid(lexer_state * const lexer, char const * const subid)>
Set the name specified in the :subid flag on the sub.
@@ -235,15 +326,17 @@
*/
void
-set_sub_subid(lexer_state * const lexer, char const * const subid) {
+set_sub_subid(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const subid))
+{
CURRENT_SUB(lexer)->info.subid = subid;
SET_FLAG(lexer->subs->flags, PIRC_SUB_FLAG_SUBID);
}
/*
-=item C<void
-set_sub_methodname(lexer_state * const lexer, char const * const methodname)>
+=item C<void set_sub_methodname(lexer_state * const lexer, char const * const
+methodname)>
Set the :method flag on a sub; if C<methodname> is not NULL, then it contains
the name by which the sub is stored as a method.
@@ -252,7 +345,9 @@
*/
void
-set_sub_methodname(lexer_state * const lexer, char const * const methodname) {
+set_sub_methodname(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const methodname))
+{
if (methodname) /* :method("foo") */
CURRENT_SUB(lexer)->methodname = methodname;
else /* :method without a value defaults to the subname. */
@@ -268,8 +363,8 @@
/*
-=item C<void
-set_sub_instanceof(lexer_state * const lexer, char const * const classname)>
+=item C<void set_sub_instanceof(lexer_state * const lexer, char const * const
+classname)>
Set the value of the C<:instanceof> flag on a sub. Note that this flag
is experimental, and not actually used at this point.
@@ -278,14 +373,16 @@
*/
void
-set_sub_instanceof(lexer_state * const lexer, char const * const classname) {
+set_sub_instanceof(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const classname))
+{
CURRENT_SUB(lexer)->info.instanceof = classname;
}
/*
-=item C<void
-set_sub_nsentry(lexer_state * const lexer, char const * const nsentry)>
+=item C<void set_sub_nsentry(lexer_state * const lexer, char const * const
+nsentry)>
Set the value of the C<:nsentry> flag on a sub. The value of C<nsentry> is the name
by which the sub is stored in the namespace.
@@ -294,14 +391,15 @@
*/
void
-set_sub_nsentry(lexer_state * const lexer, char const * const nsentry) {
+set_sub_nsentry(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const nsentry))
+{
CURRENT_SUB(lexer)->info.nsentry = nsentry;
}
/*
-=item C<void
-set_sub_flag(lexer_state * const lexer, sub_flag flag)>
+=item C<void set_sub_flag(lexer_state * const lexer, sub_flag flag)>
Set a subroutine flag on the current sub. The C<flag> parameter may encode
multiple flags.
@@ -310,7 +408,8 @@
*/
void
-set_sub_flag(lexer_state * const lexer, sub_flag flag) {
+set_sub_flag(ARGIN(lexer_state * const lexer), sub_flag flag)
+{
/* set the specified flag in the current subroutine */
SET_FLAG(CURRENT_SUB(lexer)->flags, flag);
@@ -318,8 +417,7 @@
/*
-=item C<void
-new_subr(lexer_state * const lexer, char const * const subname)>
+=item C<void new_subr(lexer_state * const lexer, STRING *subname)>
Create a new subroutine node, and set it as the "current"
subroutine, on which all other sub-related operations do
@@ -329,7 +427,8 @@
*/
void
-new_subr(lexer_state * const lexer, STRING *subname) {
+new_subr(ARGIN(lexer_state * const lexer), ARGIN(STRING *subname))
+{
subroutine *newsub = pir_mem_allocate_zeroed_typed(lexer, subroutine);
int index;
@@ -380,8 +479,8 @@
/*
-=item C<void
-set_sub_name(lexer_state * const lexer, char const * const subname)>
+=item C<void set_sub_name(lexer_state * const lexer, char const * const
+subname)>
Set the current subroutine's name to C<subname>.
@@ -389,23 +488,29 @@
*/
void
-set_sub_name(lexer_state * const lexer, char const * const subname) {
+set_sub_name(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const subname))
+{
CURRENT_SUB(lexer)->info.subname = subname;
}
/*
-=item C<static instruction *
-new_instruction(lexer_state * const lexer, char const * const opname)>
+=item C<static instruction * new_instruction(lexer_state * const lexer, char
+const * const opname)>
Create a new instruction node and set C<opname> as the instruction.
=cut
*/
+PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
static instruction *
-new_instruction(lexer_state * const lexer, char const * const opname) {
+new_instruction(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const opname))
+{
instruction *ins = pir_mem_allocate_zeroed_typed(lexer, instruction);
ins->opname = opname;
ins->opcode = -1; /* make sure this field is properly initialized;
@@ -416,8 +521,8 @@
/*
-=item C<static void
-new_statement(lexer_state * const lexer, char const * const opname)>
+=item C<static void new_statement(lexer_state * const lexer, char const * const
+opname)>
Constructor for a statement. The newly allocated statement will be inserted
into the current subroutine's statements list.
@@ -426,7 +531,9 @@
*/
static void
-new_statement(lexer_state * const lexer, char const * const opname) {
+new_statement(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const opname))
+{
instruction *instr = new_instruction(lexer, opname);
/* Each instruction has a sequence number to be able to
@@ -458,8 +565,7 @@
/*
-=item C<void
-set_curtarget(lexer_state * const lexer, target * const t)>
+=item C<target * set_curtarget(lexer_state * const lexer, target * const t)>
Sets the target C<t> as the current target in C<lexer> to
make it accessible to other parse actions. C<t> is returned.
@@ -470,15 +576,15 @@
PARROT_IGNORABLE_RESULT
PARROT_CANNOT_RETURN_NULL
target *
-set_curtarget(lexer_state * const lexer, target * const t) {
+set_curtarget(ARGIN(lexer_state * const lexer), ARGIN(target * const t))
+{
lexer->curtarget = t;
return t;
}
/*
-=item C<argument *
-set_curarg(lexer_state * const lexer, argument * const arg)>
+=item C<argument * set_curarg(lexer_state * const lexer, argument * const arg)>
Sets the argument C<arg> as the current argument in C<lexer>
to make it accessible to other parse actions. C<arg> is returned.
@@ -489,15 +595,17 @@
PARROT_IGNORABLE_RESULT
PARROT_CANNOT_RETURN_NULL
argument *
-set_curarg(lexer_state * const lexer, argument * const arg) {
+set_curarg(ARGIN(lexer_state * const lexer),
+ ARGIN(argument * const arg))
+{
lexer->curarg = arg;
return arg;
}
/*
-=item C<int
-targets_equal(target const * const left, target const * const right)>
+=item C<int targets_equal(target const * const left, target const * const
+right)>
Returns true if C<left> equals C<right>, false otherwise. C<left> is
considered to be equal to C<right> if any of the following conditions
@@ -519,7 +627,9 @@
PARROT_PURE_FUNCTION
PARROT_WARN_UNUSED_RESULT
int
-targets_equal(target const * const left, target const * const right) {
+targets_equal(ARGIN(target const * const left),
+ ARGIN(target const * const right))
+{
if (TEST_FLAG(left->flags, TARGET_FLAG_IS_REG)) { /* if left is a reg */
@@ -550,8 +660,7 @@
/*
-=item C<target *
-new_target(lexer_state * const lexer)>
+=item C<target * new_target(lexer_state * const lexer)>
Create a new target node. The node's next pointer is initialized to itself.
@@ -561,7 +670,8 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
target *
-new_target(lexer_state * const lexer) {
+new_target(ARGIN(lexer_state * const lexer))
+{
target *t = pir_mem_allocate_zeroed_typed(lexer, target);
t->key = NULL;
t->next = t; /* circly linked list */
@@ -569,8 +679,7 @@
}
/*
-=item C<void
-set_target_key(target * const t, key * const k)>
+=item C<void set_target_key(target * const t, key * const k)>
Set the key C<k> on target C<t>. For instance:
@@ -582,14 +691,15 @@
*/
void
-set_target_key(target * const t, key * const k) {
+set_target_key(ARGIN(target * const t), ARGIN(key * const k))
+{
t->key = k;
}
/*
-=item C<target *
-target_from_symbol(lexer_state * const lexer, symbol * const sym)>
+=item C<target * target_from_symbol(lexer_state * const lexer, symbol * const
+sym)>
Convert symbol C<sym> into a target node. The resulting target has
a pointer to C<sym>.
@@ -600,7 +710,9 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
target *
-target_from_symbol(lexer_state * const lexer, symbol * const sym) {
+target_from_symbol(ARGIN(lexer_state * const lexer),
+ ARGIN(symbol * const sym))
+{
target *t = new_target(lexer);
t->flags = sym->flags; /* copy the flags */
@@ -611,8 +723,8 @@
/*
-=item C<target *
-add_target(lexer_state * const lexer, target *last, target * const t)>
+=item C<target * add_target(lexer_state * const lexer, target *last, target *
+const t)>
Add a new target to the list pointed to by C<list>. C<list> points to
the last element, C<<last->next>> points to the first. The list is
@@ -626,7 +738,9 @@
PARROT_IGNORABLE_RESULT
PARROT_CANNOT_RETURN_NULL
target *
-add_target(lexer_state * const lexer, target *last, target * const t) {
+add_target(ARGIN(lexer_state * const lexer),
+ ARGMOD(target *last), ARGIN(target * const t))
+{
PARROT_ASSERT(last);
PARROT_ASSERT(t);
@@ -640,8 +754,8 @@
/*
-=item C<target *
-add_param(lexer_state * const lexer, pir_type type, char const * const name)>
+=item C<target * add_param(lexer_state * const lexer, pir_type type, char const
+* const name)>
Add a parameter of type C<type> and named C<name> to the current
subroutine. The parameter will be declared as a local symbol in the
@@ -653,7 +767,9 @@
PARROT_IGNORABLE_RESULT
PARROT_CANNOT_RETURN_NULL
target *
-add_param(lexer_state * const lexer, pir_type type, char const * const name) {
+add_param(ARGIN(lexer_state * const lexer), pir_type type,
+ ARGIN(char const * const name))
+{
target *targ = new_target(lexer);
symbol *sym = new_symbol(lexer, name, type);
@@ -688,8 +804,8 @@
/*
-=item C<void
-set_param_alias(lexer_state * const lexer, char const * const alias)>
+=item C<target * set_param_alias(lexer_state * const lexer, char const * const
+alias)>
Set the argument of the :named flag for the current target
(parameter). Returns the current target (parameter). This function assumes
@@ -702,7 +818,9 @@
PARROT_IGNORABLE_RESULT
PARROT_CANNOT_RETURN_NULL
target *
-set_param_alias(lexer_state * const lexer, char const * const alias) {
+set_param_alias(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const alias))
+{
PARROT_ASSERT(lexer->curtarget != NULL);
/* if no alias was specified, default to the target's name, if it's not a register. */
@@ -722,8 +840,8 @@
/*
-=item C<void
-set_param_flag(lexer_state * const lexer, target * const param, target_flag flag)>
+=item C<target * set_param_flag(lexer_state * const lexer, target * const param,
+target_flag flag)>
Set the flag C<flag> on parameter C<param>. The actual value
of C<flag> may encode several flags at a time. Returns C<param>.
@@ -734,7 +852,9 @@
PARROT_IGNORABLE_RESULT
PARROT_CANNOT_RETURN_NULL
target *
-set_param_flag(lexer_state * const lexer, target * const param, target_flag flag) {
+set_param_flag(ARGIN(lexer_state * const lexer),
+ ARGIN(target * const param), target_flag flag)
+{
SET_FLAG(param->flags, flag);
/* note that param is always an identifier; registers are not allowed as parameters.
@@ -757,8 +877,8 @@
/*
-=item C<argument *
-new_argument(lexer_state * const lexer, expression * const expr)>
+=item C<argument * new_argument(lexer_state * const lexer, expression * const
+expr)>
Create a new argument node which wraps C<expr>. The new argument node
is circular linked, meaning its C<next> pointer points to itself.
@@ -769,7 +889,9 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
argument *
-new_argument(lexer_state * const lexer, expression * const expr) {
+new_argument(ARGIN(lexer_state * const lexer),
+ ARGIN(expression * const expr))
+{
argument *arg = pir_mem_allocate_zeroed_typed(lexer, argument);
arg->value = expr;
arg->next = arg;
@@ -780,8 +902,7 @@
/*
-=item C<argument *
-add_arg(argument *last, argument * const newarg)>
+=item C<argument * add_arg(argument *last, argument * const newarg)>
Add argument C<newarg> at the end of the list pointed to by C<last>.
The list is circular linked, and C<last> points to the last item.
@@ -796,7 +917,8 @@
PARROT_IGNORABLE_RESULT
PARROT_CANNOT_RETURN_NULL
argument *
-add_arg(argument *last, argument * const newarg) {
+add_arg(ARGMOD(argument *last), ARGIN(argument * const newarg))
+{
PARROT_ASSERT(last);
PARROT_ASSERT(newarg);
@@ -809,8 +931,7 @@
/*
-=item C<void
-unshift_arg(invocation * const inv, argument * const newarg)>
+=item C<argument * unshift_arg(invocation * const inv, argument * const newarg)>
Unshift argument C<newarg> on an invocation object. The number
of arguments in the list of C<inv> is incremented to reflect
@@ -839,7 +960,8 @@
PARROT_IGNORABLE_RESULT
PARROT_CANNOT_RETURN_NULL
argument *
-unshift_arg(invocation * const inv, argument * const newarg) {
+unshift_arg(ARGIN(invocation * const inv), ARGIN(argument * const newarg))
+{
++inv->num_arguments;
if (inv->arguments) {
@@ -854,8 +976,7 @@
/*
-=item C<void
-set_arg_flag(argument * const arg, arg_flag flag)>
+=item C<argument * set_arg_flag(argument * const arg, arg_flag flag)>
Set the flag C<flag> on argument C<arg>. Note the C<flag> may
encode multiple flags. C<arg> is returned.
@@ -866,15 +987,16 @@
PARROT_IGNORABLE_RESULT
PARROT_CANNOT_RETURN_NULL
argument *
-set_arg_flag(argument * const arg, arg_flag flag) {
+set_arg_flag(ARGIN(argument * const arg), arg_flag flag)
+{
SET_FLAG(arg->flags, flag);
return arg;
}
/*
-=item C<void
-set_arg_alias(lexer_state * const lexer, char const * const alias)>
+=item C<argument * set_arg_alias(lexer_state * const lexer, char const * const
+alias)>
Set the alias specified in C<alias> on the current argument, accessible
through C<lexer>. The alias is the name under which the argument is passed
@@ -887,7 +1009,9 @@
PARROT_IGNORABLE_RESULT
PARROT_CANNOT_RETURN_NULL
argument *
-set_arg_alias(lexer_state * const lexer, char const * const alias) {
+set_arg_alias(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const alias))
+{
PARROT_ASSERT(lexer->curarg != NULL);
lexer->curarg->alias = alias;
SET_FLAG(lexer->curarg->flags, ARG_FLAG_NAMED);
@@ -896,8 +1020,8 @@
/*
-=item C<void
-load_library(lexer_state * const lexer, char const * const library)>
+=item C<void load_library(lexer_state * const lexer, char const * const
+library)>
Load the library indicated by C<library>.
@@ -905,7 +1029,9 @@
*/
void
-load_library(lexer_state * const lexer, char const * const library) {
+load_library(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const library))
+{
/* see imcc.y:600 */
STRING *libname = Parrot_str_new(lexer->interp, library, strlen(library));
PMC *ignored_value = Parrot_load_lib(lexer->interp, libname, NULL);
@@ -916,8 +1042,7 @@
/*
-=item C<void
-set_label(lexer_state * const lexer, char const * const label)>
+=item C<void set_label(lexer_state * const lexer, char const * const labelname)>
Set the label C<label> on the current instruction.
@@ -925,7 +1050,9 @@
*/
void
-set_label(lexer_state * const lexer, char const * const labelname) {
+set_label(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const labelname))
+{
instruction *instr = CURRENT_INSTRUCTION(lexer);
PARROT_ASSERT(instr);
@@ -954,8 +1081,7 @@
/*
-=item C<void
-set_instr(lexer_state * const lexer, char const * const opname)>
+=item C<void set_instr(lexer_state * const lexer, char const * const opname)>
Sets C<opname> to the current instruction, without operands. This is a
wrapper function for C<set_instrf> to prevent calls with an empty format
@@ -965,14 +1091,15 @@
*/
void
-set_instr(lexer_state * const lexer, char const * const opname) {
+set_instr(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const opname))
+{
set_instrf(lexer, opname, "");
}
/*
-=item C<void
-update_instr(lexer_state * const lexer, char * const newop)>
+=item C<void update_instr(lexer_state * const lexer, char const * const newop)>
Update the current instruction; the new opname is given by C<newop>.
@@ -980,7 +1107,9 @@
*/
void
-update_instr(lexer_state * const lexer, char const * const newop) {
+update_instr(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const newop))
+{
PARROT_ASSERT(CURRENT_INSTRUCTION(lexer));
CURRENT_INSTRUCTION(lexer)->opname = newop;
}
@@ -1023,8 +1152,8 @@
/*
-=item C<void
-set_instrf(lexer_state *lexer, char *opname, char const * const format, ...)>
+=item C<void set_instrf(lexer_state * const lexer, char const * const opname,
+char const * const format, ...)>
Set the specified instruction, using the operands from the vararg list. The
number and types of operands is specified by C<format>. The type of the
@@ -1061,7 +1190,11 @@
*/
void
-set_instrf(lexer_state * const lexer, char const * const opname, char const * const format, ...) {
+set_instrf(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const opname),
+ ARGIN(char const * const format),
+ ...)
+{
va_list arg_ptr; /* for the var. args */
unsigned i; /* loop iterator */
size_t format_length; /* length of the format string. */
@@ -1092,8 +1225,8 @@
/*
-=item C<void
-add_operands(lexer_state * const lexer, char const * const format, ...)>
+=item C<void add_operands(lexer_state * const lexer, char const * const format,
+...)>
Add operands to the current instruction. This is a variable argument function;
C<format> contains placeholders, see the macro C<get_instr_var_arg> above
@@ -1104,7 +1237,10 @@
*/
void
-add_operands(lexer_state * const lexer, char const * const format, ...) {
+add_operands(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const format),
+ ...)
+{
va_list arg_ptr; /* for the var. args */
unsigned i; /* loop iterator */
size_t format_length; /* length of the format string. */
@@ -1132,8 +1268,7 @@
/*
-=item C<void
-set_op_labelflag(lexer_state * const lexer, int flag)>
+=item C<void set_op_labelflag(lexer_state * const lexer, int flag)>
Set a flag on the current instruction that it contains labels as operands.
The bit indicates which operand, count starting from bit 1.
@@ -1142,15 +1277,15 @@
*/
void
-set_op_labelflag(lexer_state * const lexer, int flag) {
+set_op_labelflag(ARGIN(lexer_state * const lexer), int flag)
+{
PARROT_ASSERT(CURRENT_INSTRUCTION(lexer));
SET_FLAG(CURRENT_INSTRUCTION(lexer)->oplabelbits, flag);
}
/*
-=item C<char *
-get_inverse(char *instr)>
+=item C<char const * get_inverse(char const * const instr)>
Returns the instruction with inversed semantics; for instance
C<if> becomes C<unless>, C<greater-than> becomes C<less-or-equals>.
@@ -1159,8 +1294,10 @@
*/
PARROT_CONST_FUNCTION
+PARROT_CANNOT_RETURN_NULL
char const *
-get_inverse(char const * const instr) {
+get_inverse(ARGIN(char const * const instr))
+{
if (STREQ(instr, "if")) return "unless";
else if (STREQ(instr, "gt")) return "le";
else if (STREQ(instr, "ge")) return "lt";
@@ -1175,8 +1312,7 @@
/*
-=item C<void
-invert_instr(lexer_state *lexer)>
+=item C<void invert_instr(lexer_state * const lexer)>
Invert the current instruction. This function assumes there is an instruction
already in place.
@@ -1185,7 +1321,8 @@
*/
void
-invert_instr(lexer_state * const lexer) {
+invert_instr(ARGIN(lexer_state * const lexer))
+{
instruction * const ins = CURRENT_INSTRUCTION(lexer);
char const *instr;
PARROT_ASSERT(ins);
@@ -1199,8 +1336,7 @@
/*
-=item C<expression *
-get_operand(lexer_state * const lexer, short n)>
+=item C<expression * get_operand(lexer_state * const lexer, short n)>
Get the C<n>th operand from the current instruction. If there are no
operands, NULL is returned. Because the operands are stored in a
@@ -1216,7 +1352,8 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
expression *
-get_operand(lexer_state * const lexer, short n) {
+get_operand(ARGIN(lexer_state * const lexer), short n)
+{
expression *operand = CURRENT_INSTRUCTION(lexer)->operands;
if (operand == NULL)
@@ -1241,8 +1378,7 @@
/*
-=item C<void
-get_operands(lexer_state * const lexer, int bitmask, ...)>
+=item C<void get_operands(lexer_state * const lexer, int bitmask, ...)>
Get operands from the current instruction. C<bitmask> indicates which operands
are requested; if the C<i>th bit is set, the C<i>th operand is returned in a
@@ -1255,7 +1391,8 @@
*/
void
-get_operands(lexer_state * const lexer, int bitmask, ...) {
+get_operands(ARGIN(lexer_state * const lexer), int bitmask, ...)
+{
instruction *instr = CURRENT_INSTRUCTION(lexer);
expression *iter = instr->operands;
int numargs;
@@ -1292,8 +1429,7 @@
/*
-=item C<int
-get_operand_count(lexer_state * const lexer)>
+=item C<unsigned get_operand_count(lexer_state * const lexer)>
Returns the number of operands of the I<current> instruction.
This function assumes there is an instruction in place
@@ -1304,7 +1440,8 @@
*/
PARROT_WARN_UNUSED_RESULT
unsigned
-get_operand_count(lexer_state * const lexer) {
+get_operand_count(ARGIN(lexer_state * const lexer))
+{
unsigned count = 0;
expression *first, *operand;
@@ -1329,8 +1466,8 @@
/*
-=item C<static constant *
-create_const(lexer_state * const lexer, value_type type, char * const name, va_list arg_ptr)>
+=item C<static constant * create_const(lexer_state * const lexer, value_type
+type, va_list arg_ptr)>
Constant constructor; based on C<type>, retrieve a value of the
appropriate type from C<arg_ptr>.
@@ -1341,7 +1478,8 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static constant *
-create_const(lexer_state * const lexer, value_type type, va_list arg_ptr) {
+create_const(ARGIN(lexer_state * const lexer), value_type type, va_list arg_ptr)
+{
constant *c = pir_mem_allocate_zeroed_typed(lexer, constant);
c->type = type;
c->next = NULL;
@@ -1371,8 +1509,7 @@
/*
-=item C<constant *
-new_const(lexer_state * const lexer, value_type type, ...)>
+=item C<constant * new_const(lexer_state * const lexer, value_type type, ...)>
Creates a new constant node of the given type.
Wrapper function for C<create_const>
@@ -1383,7 +1520,8 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
constant *
-new_const(lexer_state * const lexer, value_type type, ...) {
+new_const(ARGIN(lexer_state * const lexer), value_type type, ...)
+{
constant *c;
va_list arg_ptr;
va_start(arg_ptr, type);
@@ -1394,8 +1532,8 @@
/*
-=item C<constdecl *
-new_named_const(lexer_state * const lexer, value_type type, char * const name, ...)>
+=item C<constdecl * new_named_const(lexer_state * const lexer, value_type type,
+char const * const name, ...)>
Creates a new constdecl node of the given type, by the given name.
@@ -1405,7 +1543,10 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
constdecl *
-new_named_const(lexer_state * const lexer, value_type type, char const * const name, ...) {
+new_named_const(ARGIN(lexer_state * const lexer), value_type type,
+ ARGIN(char const * const name),
+ ...)
+{
constdecl *c = (constdecl *)pir_mem_allocate(lexer, sizeof (constdecl));
va_list arg_ptr;
va_start(arg_ptr, name);
@@ -1440,8 +1581,8 @@
/*
-=item C<constdecl *
-new_pmc_const(char const * const type, char const * const name, constant * const value)>
+=item C<constdecl * new_pmc_const(lexer_state * const lexer, char const * const
+type, char const * const name, constant * const value)>
Create a new PMC constant declaration of type C<type>, name C<name> and having a value C<value>.
The type must be a string indicating a valid type name (e.g. "Sub"). C<name> is the name
@@ -1450,9 +1591,13 @@
=cut
*/
+PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
constdecl *
-new_pmc_const(lexer_state * const lexer, char const * const type,
- char const * const name, constant * const value)
+new_pmc_const(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const type),
+ ARGIN(char const * const name),
+ ARGIN(constant * const value))
{
/* get a STRING representation of the c-string type */
STRING *classname = Parrot_str_new(lexer->interp, type, strlen(type));
@@ -1508,7 +1653,7 @@
symbol *constsym = new_symbol(lexer, name, PMC_TYPE);
target *consttarg = target_from_symbol(lexer, constsym);
- PMC *intconst = pmc_new(lexer->interp,
+ PMC *intconst = Parrot_pmc_new(lexer->interp,
Parrot_get_ctx_HLL_type(lexer->interp, enum_class_Integer));
int index = add_pmc_const(lexer->bc, intconst);
VTABLE_set_integer_native(lexer->interp, intconst, value->val.ival);
@@ -1543,7 +1688,7 @@
symbol *constsym = new_symbol(lexer, name, PMC_TYPE);
target *consttarg = target_from_symbol(lexer, constsym);
- PMC *numconst = pmc_new(lexer->interp,
+ PMC *numconst = Parrot_pmc_new(lexer->interp,
Parrot_get_ctx_HLL_type(lexer->interp, enum_class_Float));
int index = add_pmc_const(lexer->bc, numconst);
VTABLE_set_number_native(lexer->interp, numconst, value->val.nval);
@@ -1573,7 +1718,7 @@
symbol *constsym = new_symbol(lexer, name, PMC_TYPE);
target *consttarg = target_from_symbol(lexer, constsym);
- PMC *strconst = pmc_new(lexer->interp,
+ PMC *strconst = Parrot_pmc_new(lexer->interp,
Parrot_get_ctx_HLL_type(lexer->interp, enum_class_String));
int index = add_pmc_const(lexer->bc, strconst);
@@ -1607,8 +1752,7 @@
/*
-=item C<static invocation *
-new_invocation(lexer_state * const lexer)>
+=item C<static invocation * new_invocation(lexer_state * const lexer)>
Returns a pointer to a new invocation object. In the current implementation,
there can only be one invocation object at any time. For that reason, the
@@ -1624,7 +1768,8 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static invocation *
-new_invocation(lexer_state * const lexer) {
+new_invocation(ARGIN(lexer_state * const lexer))
+{
/* optimization: return the address of the cached object */
invocation *inv = &lexer->obj_cache.inv_cache;
/* clear all fields */
@@ -1637,8 +1782,7 @@
/*
-=item C<static expression *
-new_expr(expr_type type)>
+=item C<static expression * new_expr(lexer_state * const lexer, expr_type type)>
Create a new C<expression> node of the specified C<type>. The new
expression node is returned.
@@ -1649,7 +1793,8 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static expression *
-new_expr(lexer_state * const lexer, expr_type type) {
+new_expr(ARGIN(lexer_state * const lexer), expr_type type)
+{
expression *expr = pir_mem_allocate_zeroed_typed(lexer, expression);
expr->type = type;
expr->next = expr;
@@ -1658,8 +1803,7 @@
/*
-=item C<target *
-new_reg(lexer_state * const lexer, int type, int regno)>
+=item C<target * new_reg(lexer_state * const lexer, pir_type type, int regno)>
Create a C<target> node from a register. A new C<pir_reg> object is
created of type C<type> and PIR register number C<regno>. The target
@@ -1671,7 +1815,8 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
target *
-new_reg(lexer_state * const lexer, pir_type type, int regno) {
+new_reg(ARGIN(lexer_state * const lexer), pir_type type, int regno)
+{
target *t = new_target(lexer);
pir_reg *reg;
@@ -1687,8 +1832,8 @@
/*
-=item C<expression *
-expr_from_target(target *t)>
+=item C<expression * expr_from_target(lexer_state * const lexer, target * const
+t)>
Wrap a target in an expression node; the expression node is
returned.
@@ -1699,7 +1844,9 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
expression *
-expr_from_target(lexer_state * const lexer, target * const t) {
+expr_from_target(ARGIN(lexer_state * const lexer),
+ ARGIN(target * const t))
+{
expression *e = new_expr(lexer, EXPR_TARGET);
e->expr.t = t;
return e;
@@ -1707,8 +1854,8 @@
/*
-=item C<expression *
-expr_from_const(constant * const c)>
+=item C<expression * expr_from_const(lexer_state * const lexer, constant * const
+c)>
Convert the constant C<c> to an expression node and returns the newly
created expression node.
@@ -1719,7 +1866,9 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
expression *
-expr_from_const(lexer_state * const lexer, constant * const c) {
+expr_from_const(ARGIN(lexer_state * const lexer),
+ ARGIN(constant * const c))
+{
expression *e = new_expr(lexer, EXPR_CONSTANT);
e->expr.c = c;
return e;
@@ -1727,8 +1876,7 @@
/*
-=item C<expression *
-expr_from_int(lexer_state * const lexer, int ival)>
+=item C<expression * expr_from_int(lexer_state * const lexer, int ival)>
Create an expression node from an integer constant. This is a wrapper
function, which uses C<expr_from_const()> and C<new_const()>.
@@ -1741,14 +1889,14 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
expression *
-expr_from_int(lexer_state * const lexer, int ival) {
+expr_from_int(ARGIN(lexer_state * const lexer), int ival)
+{
return expr_from_const(lexer, new_const(lexer, INT_VAL, ival));
}
/*
-=item C<expression *
-expr_from_num(lexer_state * const lexer, double nval)>
+=item C<expression * expr_from_num(lexer_state * const lexer, double nval)>
Same as C<expr_from_int()>, except it takes a C<double> parameter,
not an C<int>.
@@ -1759,14 +1907,15 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
expression *
-expr_from_num(lexer_state * const lexer, double nval) {
+expr_from_num(ARGIN(lexer_state * const lexer), double nval)
+{
return expr_from_const(lexer, new_const(lexer, NUM_VAL, nval));
}
/*
-=item C<expression *
-expr_from_string(lexer_state * const lexer, char const * const sval)>
+=item C<expression * expr_from_string(lexer_state * const lexer, char const *
+const sval)>
Same as C<expr_from_int()>, except it takes a C<string> parameter.
@@ -1776,15 +1925,17 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
expression *
-expr_from_string(lexer_state * const lexer, char const * const sval) {
+expr_from_string(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const sval))
+{
return expr_from_const(lexer, new_const(lexer, STRING_VAL, sval));
}
/*
-=item C<expression *
-expr_from_ident(char * const id)>
+=item C<expression * expr_from_ident(lexer_state * const lexer, char const *
+const id)>
Convert a ident to an expression node and returns it.
@@ -1794,7 +1945,9 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
expression *
-expr_from_ident(lexer_state * const lexer, char const * const id) {
+expr_from_ident(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const id))
+{
expression *e = new_expr(lexer, EXPR_IDENT);
e->expr.id = id;
return e;
@@ -1802,8 +1955,8 @@
/*
-=item C<void
-set_invocation_args(lexer_state * const lexer, invocation * const inv, argument * const args)>
+=item C<invocation * set_invocation_args(lexer_state * const lexer, invocation *
+const inv, argument * const args)>
Set the args of an invocation onto the current invocation object.
The number of arguments in the list is counted, and stored in the
@@ -1812,8 +1965,13 @@
=cut
*/
+PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
invocation *
-set_invocation_args(lexer_state * const lexer, invocation * const inv, argument * const args) {
+set_invocation_args(ARGIN(lexer_state * const lexer),
+ ARGIN(invocation * const inv),
+ ARGIN(argument * const args))
+{
argument *arg_iter;
unsigned arg_count = 0;
@@ -1852,8 +2010,8 @@
/*
-=item C<void
-set_invocation_results(lexer_state * const lexer, invocation * const inv, target * const results)>
+=item C<invocation * set_invocation_results(lexer_state * const lexer,
+invocation * const inv, target * const results)>
Set the invocation results on the invocation object C<inv>.
The number of results is stored in the invocation object.
@@ -1862,8 +2020,13 @@
=cut
*/
+PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
invocation *
-set_invocation_results(lexer_state * const lexer, invocation * const inv, target * const results) {
+set_invocation_results(ARGIN(lexer_state * const lexer),
+ ARGIN(invocation * const inv),
+ ARGIN(target * const results))
+{
target *result_iter;
unsigned result_count = 0;
@@ -1897,24 +2060,26 @@
/*
-=item C<void
-set_invocation_type(invocation * const inv, invoke_type type)>
+=item C<invocation * set_invocation_type(invocation * const inv, invoke_type
+type)>
Set the invocation type on the invocation object C<inv>.
=cut
*/
+PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
invocation *
-set_invocation_type(invocation * const inv, invoke_type type) {
+set_invocation_type(ARGIN(invocation * const inv), invoke_type type)
+{
inv->type = type;
return inv;
}
/*
-=item C<invocation *
-invoke(lexer_state * const lexer, invoke_type type, ...)>
+=item C<invocation * invoke(lexer_state * const lexer, invoke_type type, ...)>
Create a new C<invocation> object of type C<type>. This can be one
of the C<invoke_types> enumeration. Based on the type, this function
@@ -1929,7 +2094,8 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
invocation *
-invoke(lexer_state * const lexer, invoke_type type, ...) {
+invoke(ARGIN(lexer_state * const lexer), invoke_type type, ...)
+{
va_list arg_ptr;
invocation *inv = new_invocation(lexer);
@@ -1969,8 +2135,8 @@
/*
-=item C<void
-set_lex_flag(lexer_state * const lexer, target * const t, char const * const name)>
+=item C<void set_lex_flag(lexer_state * const lexer, target * const t, char
+const * const name)>
Store target C<t> as a lexical in the sub_info struct. The lexical node
stores a pointer to the target's syminfo structure, so it can access
@@ -1980,7 +2146,10 @@
*/
void
-set_lex_flag(lexer_state * const lexer, target * const t, char const * const name) {
+set_lex_flag(ARGIN(lexer_state * const lexer),
+ ARGIN(target * const t),
+ ARGIN(char const * const name))
+{
lexical *lex = CURRENT_SUB(lexer)->info.lexicals;
/* check whether there is already a target marked as .lex with the specified name */
@@ -2008,8 +2177,7 @@
/*
-=item C<void
-set_hll(lexer_state * const lexer, char * const hll)>
+=item C<void set_hll(lexer_state * const lexer, char const * const hll)>
Set the current HLL as specified in C<hll>.
@@ -2019,7 +2187,9 @@
*/
void
-set_hll(lexer_state * const lexer, char const * const hll) {
+set_hll(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const hll))
+{
STRING * const hll_name = Parrot_str_new(lexer->interp, hll, strlen(hll));
CONTEXT(lexer->interp)->current_HLL = Parrot_register_HLL(lexer->interp, hll_name);
}
@@ -2028,8 +2198,8 @@
/*
-=item C<void
-unshift_operand(lexer_state *lexer, expression *operand)>
+=item C<void unshift_operand(lexer_state * const lexer, expression * const
+operand)>
Add the specified expression as the first operand of the current
instruction.
@@ -2038,7 +2208,9 @@
*/
void
-unshift_operand(lexer_state * const lexer, expression * const operand) {
+unshift_operand(ARGIN(lexer_state * const lexer),
+ ARGIN(expression * const operand))
+{
expression *last = CURRENT_INSTRUCTION(lexer)->operands;
if (last) {
/* get the head of the list */
@@ -2054,8 +2226,8 @@
/*
-=item C<void
-push_operand(lexer_state * const lexer, expression * const operand)>
+=item C<void push_operand(lexer_state * const lexer, expression * const
+operand)>
Add an operand at the end of the list of operands of the current instruction.
@@ -2063,7 +2235,9 @@
*/
void
-push_operand(lexer_state * const lexer, NOTNULL(expression * const operand)) {
+push_operand(ARGIN(lexer_state * const lexer),
+ ARGIN(expression * const operand))
+{
PARROT_ASSERT(CURRENT_INSTRUCTION(lexer));
if (CURRENT_INSTRUCTION(lexer)->operands) {
@@ -2075,8 +2249,7 @@
/*
-=item C<void
-remove_all_operands(lexer_state * const lexer)>
+=item C<void remove_all_operands(lexer_state * const lexer)>
Remove all operands of the current instruction. This is done
by simply setting the pointer to the operands to NULL; all
@@ -2087,15 +2260,15 @@
*/
void
-remove_all_operands(NOTNULL(lexer_state * const lexer)) {
+remove_all_operands(ARGIN(lexer_state * const lexer))
+{
CURRENT_INSTRUCTION(lexer)->operands = NULL;
}
/*
-=item C<expression *
-expr_from_key(lexer_state * const lexer, key * const k)>
+=item C<expression * expr_from_key(lexer_state * const lexer, key * const k)>
Wraps the key C<k> in an C<expression> node and returns that.
The returned expression node has type EXPR_KEY.
@@ -2103,8 +2276,11 @@
=cut
*/
+PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
expression *
-expr_from_key(NOTNULL(lexer_state * const lexer), NOTNULL(key * const k)) {
+expr_from_key(ARGIN(lexer_state * const lexer), ARGIN(key * const k))
+{
expression *e = new_expr(lexer, EXPR_KEY);
e->expr.k = k;
return e;
@@ -2113,7 +2289,8 @@
/*
-=item C<static key_entry * new_key_entry>
+=item C<static key_entry * new_key_entry(lexer_state * const lexer, expression *
+const expr)>
Constructor for a key_entry node. Memory is allocated for the node,
and the C<expr> field is initialized to the passed in C<expr> value.
@@ -2122,8 +2299,11 @@
=cut
*/
+PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
static key_entry *
-new_key_entry(lexer_state * const lexer, expression * const expr) {
+new_key_entry(ARGIN(lexer_state * const lexer), ARGIN(expression * const expr))
+{
key_entry *entry = pir_mem_allocate_zeroed_typed(lexer, key_entry);
entry->expr = expr;
entry->next = NULL;
@@ -2131,8 +2311,7 @@
}
/*
-=item C<key *
-new_key(lexer_state * const lexer, expression * const expr)>
+=item C<key * new_key(lexer_state * const lexer, expression * const expr)>
Wraps the expression C<expr> in a key node and returns that.
@@ -2142,7 +2321,8 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
key *
-new_key(NOTNULL(lexer_state * const lexer), NOTNULL(expression * const expr)) {
+new_key(ARGIN(lexer_state * const lexer), ARGIN(expression * const expr))
+{
key *k = pir_mem_allocate_zeroed_typed(lexer, key);
k->head = new_key_entry(lexer, expr);
k->keylength = 1;
@@ -2152,8 +2332,8 @@
/*
-=item C<key *
-add_key(lexer_state * const lexer, key * const keylist, expression * const exprkey)>
+=item C<key * add_key(lexer_state * const lexer, key * const keylist, expression
+* const exprkey)>
Adds a new, nested key (in C<exprkey>) to the current key,
pointed to by C<keylist>. C<keylist> is returned.
@@ -2164,8 +2344,8 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
key *
-add_key(NOTNULL(lexer_state * const lexer), NOTNULL(key * const keylist),
- NOTNULL(expression * const exprkey))
+add_key(ARGIN(lexer_state * const lexer), ARGIN(key * const keylist),
+ ARGIN(expression * const exprkey))
{
key_entry *newkey = new_key_entry(lexer, exprkey);
key_entry *iter = keylist->head;
@@ -2186,8 +2366,7 @@
/*
-=item C<symbol *
-add_local(symbol * const list, symbol * const local)>
+=item C<symbol * add_local(symbol * const list, symbol * const local)>
Add local C<local> to the list pointed to by C<list>. The new object
is inserted at the front of the list. C<list> is returned
@@ -2198,7 +2377,8 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
symbol *
-add_local(symbol * const list, symbol * const local) {
+add_local(ARGIN(symbol * const list), ARGIN(symbol * const local))
+{
local->next = list->next;
list->next = local;
return list;
@@ -2207,8 +2387,8 @@
/*
-=item C<symbol *
-new_local(char * const name, int has_unique_reg)>
+=item C<symbol * new_local(lexer_state * const lexer, char const * const name,
+int has_unique_reg)>
Create a new symbol node to represent the local C<name>.
If C<has_unique_reg> is true, the C<:unique_reg> flag is set.
@@ -2220,7 +2400,9 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
symbol *
-new_local(lexer_state * const lexer, char const * const name, int has_unique_reg){
+new_local(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const name), int has_unique_reg)
+{
symbol *s = new_symbol(lexer, name, UNKNOWN_TYPE);
if (has_unique_reg)
@@ -2232,8 +2414,7 @@
/*
-=item C<int
-is_parrot_op(lexer_state * const lexer, char * const name)>
+=item C<int is_parrot_op(lexer_state * const lexer, char const * const name)>
Check whether C<name> is a parrot opcode. C<name> can be either the short
or fullname of the opcode; for instance, C<print> is the short name, which
@@ -2244,7 +2425,9 @@
*/
int
-is_parrot_op(lexer_state * const lexer, char const * const name) {
+is_parrot_op(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const name))
+{
int opcode = lexer->interp->op_lib->op_code(name, 0); /* check short name, e.g. "set" */
/* do *NOT* check for the "long" name variant, such as "set_i_ic";
@@ -2258,9 +2441,8 @@
/*
-=item C<void
-new_sub_instr(lexer_state * const lexer, int opcode, char const * const opname,
- unsigned num_var_args)>
+=item C<void new_sub_instr(lexer_state * const lexer, int opcode, char const *
+const opname, unsigned num_var_args)>
Create a new instruction node, and initialize the opcode and opinfo on that
node. This function can be used to create an instruction of which the signature
@@ -2275,9 +2457,8 @@
*/
void
-new_sub_instr(lexer_state * const lexer, int opcode, char const * const opname,
- unsigned num_var_args)
-
+new_sub_instr(ARGIN(lexer_state * const lexer), int opcode,
+ ARGIN(char const * const opname), unsigned num_var_args)
{
new_statement(lexer, opname);
CURRENT_INSTRUCTION(lexer)->opinfo = &lexer->interp->op_info_table[opcode];
@@ -2298,8 +2479,8 @@
/*
-=item C<void
-update_op(lexer_state * const lexer, instruction * const instr, int newop)>
+=item C<void update_op(lexer_state * const lexer, instruction * const instr, int
+newop)>
Update the instruction C<instr>; it is replaced by the op with opcode C<newop>.
The C<opinfo>, C<opname> and C<opcode> fields of C<instr> are updated.
@@ -2308,7 +2489,9 @@
*/
void
-update_op(NOTNULL(lexer_state * const lexer), NOTNULL(instruction * const instr), int newop) {
+update_op(ARGIN(lexer_state * const lexer), ARGIN(instruction * const instr),
+ int newop)
+{
/* Deduct number of ints needed for the old instruction, if there is one.
* This is necessary during strength reduction and other optimizations, once
* the opinfo is retrieved, we also update the codesize field in the lexer.
@@ -2333,8 +2516,8 @@
/*
-=item C<static label *
-new_label(lexer_state * const lexer, char const * const labelid, int offset)>
+=item C<static label * new_label(lexer_state * const lexer, char const * const
+labelid, int offset)>
Constructor for a label struct node. A new C<label> object is created,
initialized with the label id specified in C<labelid>, and the bytecode
@@ -2344,8 +2527,12 @@
*/
PARROT_MALLOC
+PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
static label *
-new_label(lexer_state * const lexer, char const * const labelid, int offset) {
+new_label(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const labelid), int offset)
+{
label *l = pir_mem_allocate_zeroed_typed(lexer, label);
l->name = labelid;
l->offset = offset;
@@ -2354,8 +2541,7 @@
/*
-=item C<static void
-fixup_local_labels(subroutine * const sub)>
+=item C<static void fixup_local_labels(lexer_state * const lexer)>
Fix up all local labels in the subroutine C<sub>. Labels are stored as
identifiers in an expression node (the C<id> field in the C<expr> union);
@@ -2367,7 +2553,8 @@
*/
static void
-fixup_local_labels(lexer_state * const lexer) {
+fixup_local_labels(ARGIN(lexer_state * const lexer))
+{
instruction *iter = CURRENT_SUB(lexer)->statements;
/* if there's no instruction in the current sub, then do nothing. */
@@ -2425,8 +2612,7 @@
/*
-=item C<void
-fixup_global_labels(lexer_state * const lexer)>
+=item C<void fixup_global_labels(lexer_state * const lexer)>
Fix references to global labels. The lexer keeps a list of instructions that
can be patched. These instructions currently look up the global label during
@@ -2439,7 +2625,8 @@
*/
void
-fixup_global_labels(lexer_state * const lexer) {
+fixup_global_labels(ARGIN(lexer_state * const lexer))
+{
global_fixup *iter = lexer->global_refs;
while (iter) {
@@ -2479,8 +2666,7 @@
/*
-=item C<void
-close_sub(lexer_state * const lexer)>
+=item C<void close_sub(lexer_state * const lexer)>
Finalize the subroutine. Generate the final instructions in the current
subroutine, if needed. Then, all local labels are fixed up; i.e., all
@@ -2492,7 +2678,8 @@
*/
void
-close_sub(lexer_state * const lexer) {
+close_sub(ARGIN(lexer_state * const lexer))
+{
int need_epilogue = 1;
int sub_const_table_index;
global_label *glob;
@@ -2551,8 +2738,8 @@
/*
-=item C<void
-update_sub_register_usage(lexer_state * const lexer, unsigned reg_usage[NUM_PARROT_TYPES])>
+=item C<void update_sub_register_usage(lexer_state * const lexer, unsigned
+reg_usage[NUM_PARROT_TYPES])>
Update register usage for the current subroutine with the register usage
information in C<reg_usage>.
@@ -2561,7 +2748,9 @@
*/
void
-update_sub_register_usage(lexer_state * const lexer, unsigned reg_usage[NUM_PARROT_TYPES]) {
+update_sub_register_usage(ARGIN(lexer_state * const lexer),
+ unsigned reg_usage[NUM_PARROT_TYPES])
+{
int i;
for (i = 0; i < NUM_PARROT_TYPES; ++i)
CURRENT_SUB(lexer)->info.regs_used[i] = reg_usage[i];
@@ -2570,8 +2759,8 @@
/*
-=item C<void
-annotate(lexer_state * const lexer, char const * const key, constant * const value)>
+=item C<void annotate(lexer_state * const lexer, char const * const key,
+constant * const value)>
Add a new annotation with key C<key> and value C<value>.
@@ -2579,7 +2768,10 @@
*/
void
-annotate(lexer_state * const lexer, char const * const key, constant * const value) {
+annotate(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const key),
+ ARGIN(constant * const value))
+{
annotation *ann = (annotation *)pir_mem_allocate(lexer, sizeof (annotation));
ann->key = key;
ann->value = value;
Modified: branches/boehm_gc_2/compilers/pirc/src/pircompunit.h
==============================================================================
--- branches/boehm_gc_2/compilers/pirc/src/pircompunit.h Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/pirc/src/pircompunit.h Mon Feb 22 12:30:02 2010 (r44294)
@@ -394,135 +394,665 @@
/* forward declaration */
struct lexer_state;
-/* set the namespace that was just parsed */
-void set_namespace(struct lexer_state * const lexer, key * const ns);
+/* HEADERIZER BEGIN: compilers/pirc/src/pircompunit.c */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-/* various set functions to set the value of a subroutine flag */
-void set_sub_outer(struct lexer_state * const lexer, char const * const outersub);
-void set_sub_vtable(struct lexer_state * const lexer, char const * vtablename);
-void set_sub_subid(struct lexer_state * const lexer, char const * const subid);
-void set_sub_instanceof(struct lexer_state * const lexer, char const * const classname);
-void set_sub_nsentry(struct lexer_state * const lexer, char const * const nsentry);
-void set_sub_methodname(struct lexer_state * const lexer, char const * const methodname);
-
-void set_sub_multi_types(struct lexer_state * const lexer, expression * const multitype);
-
-/* install a new subroutine node */
-void new_subr(struct lexer_state * const lexer, STRING *subname);
-
-void set_sub_name(struct lexer_state * const lexer, char const * const subname);
-
-/* functions for setting argument flags or argument alias */
-argument *set_arg_flag(argument * const arg, arg_flag flag);
-argument *set_arg_alias(struct lexer_state * const lexer, char const * const alias);
-
-/* constructors for constant nodes */
-constdecl *new_named_const(struct lexer_state * const lexer, value_type type,
- char const * const name, ...);
-
-constant *new_const(struct lexer_state * const lexer, value_type type, ...);
-
-constdecl *new_pmc_const(struct lexer_state * const lexer, char const * const type,
- char const * const name, constant * const value);
-
-/* conversion functions, each wrapping its argument in an expression node */
-expression *expr_from_const(struct lexer_state * const lexer, constant * const c);
-expression *expr_from_target(struct lexer_state * const lexer, target * const t);
-expression *expr_from_ident(struct lexer_state * const lexer, char const * const name);
-expression *expr_from_key(struct lexer_state * const lexer, key * const k);
-expression *expr_from_string(struct lexer_state * const lexer, char const * const sval);
-expression *expr_from_int(struct lexer_state * const lexer, int ival);
-expression *expr_from_num(struct lexer_state * const lexer, double nval);
-
-/* functions for argument node creation and storing */
-argument *new_argument(struct lexer_state * const lexer, expression * const expr);
-argument *add_arg(argument *arg1, argument * const arg2);
-argument *unshift_arg(invocation * const inv, argument * const newarg);
-
-target *add_param(struct lexer_state * const lexer, pir_type type, char const * const name);
-target *set_param_alias(struct lexer_state * const lexer, char const * const alias);
-target *set_param_flag(struct lexer_state * const lexer, target * const t, target_flag flag);
-
-target *set_curtarget(struct lexer_state * const lexer, target * const t);
-argument *set_curarg(struct lexer_state * const lexer, argument * const arg);
-
-/* target constructors */
-target *add_target(struct lexer_state * const lexer, target *t1, target * const t);
-target *new_reg(struct lexer_state * const lexer, pir_type type, int regno);
-target *new_target(struct lexer_state * const lexer);
-
-/* set a key on a target node */
-void set_target_key(target * const t, key * const k);
-
-/* functions for creating an invocation node and setting various fields */
-invocation *invoke(struct lexer_state * const lexer, invoke_type, ...);
-invocation *set_invocation_type(invocation * const inv, invoke_type type);
-invocation *set_invocation_args(struct lexer_state * const lexer, invocation * const inv,
- argument * const args);
-
-invocation *set_invocation_results(struct lexer_state * const lexer, invocation * const inv,
- target * const results);
-
-/* conversion functions that wrap their arguments into a target node */
-target *target_from_symbol(struct lexer_state * const lexer, struct symbol * const sym);
-
-/* management functions for key nodes */
-key *new_key(struct lexer_state * const lexer, expression * const expr);
-key *add_key(struct lexer_state * const lexer, key * const keylist, expression * const newkey);
-
-void load_library(struct lexer_state * const lexer, char const * const library);
-void set_hll(struct lexer_state * const lexer, char const * const hll);
-
-void set_sub_flag(struct lexer_state * const lexer, sub_flag flag);
-
-/* constructor and functions for setting instruction fields */
-void set_label(struct lexer_state * const lexer, char const * const label);
-void set_instr(struct lexer_state * const lexer, char const * const opname);
-void set_instrf(struct lexer_state * const lxr, char const * const op, char const * const fmt, ...);
-void unshift_operand(struct lexer_state * const lexer, expression * const operand);
-void push_operand(struct lexer_state * const lexer, expression * const operand);
-void add_operands(struct lexer_state * const lexer, char const * const format, ...);
-
-void get_operands(struct lexer_state * const lexer, int bitmask, ...);
-expression *get_operand(struct lexer_state * const lexer, short n);
-unsigned get_operand_count(struct lexer_state * const lexer);
-
-void update_instr(struct lexer_state * const lexer, char const * const newop);
-void update_op(struct lexer_state * const lexer, instruction * const instr, int newop);
-
-void remove_operand(struct lexer_state * const lexer, unsigned index);
-void remove_all_operands(struct lexer_state * const lexer);
-
-
-void set_lex_flag(struct lexer_state * const lexer, target * const t, char const * const lexname);
-char const *get_inverse(char const * const instr);
-void invert_instr(struct lexer_state * const lexer);
-
-/* local declaration functions */
-struct symbol *add_local(struct symbol * const list, struct symbol * const local);
-struct symbol *new_local(struct lexer_state * const lexer, char const * const name, int unique);
-
-/* compare two target nodes */
-int targets_equal(target const * const t1, target const * const t2);
-
-/* funtion to reset the register allocator */
-void reset_register_allocator(struct lexer_state * const lexer);
-
-/* to check whether given name is a parrot opcode */
-int is_parrot_op(struct lexer_state * const lexer, char const * const name);
-
-void close_sub(struct lexer_state * const lexer);
-void fixup_global_labels(struct lexer_state * const lexer);
-void set_op_labelflag(struct lexer_state * const lexer, int flag);
-void convert_inv_to_instr(struct lexer_state * const lexer, invocation * const inv);
-
-void update_sub_register_usage(struct lexer_state * const lexer,
- unsigned reg_usage[NUM_PARROT_TYPES]);
-
-void new_sub_instr(struct lexer_state * const lexer, int opcode, char const * const opname,
- unsigned num_var_args);
-
-void annotate(struct lexer_state * const lexer, char const * const key, constant * const value);
+PARROT_IGNORABLE_RESULT
+PARROT_CANNOT_RETURN_NULL
+argument * add_arg(ARGMOD(argument *last), ARGIN(argument * const newarg))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ FUNC_MODIFIES(*last);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+key * add_key(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(key * const keylist),
+ ARGIN(expression * const exprkey))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+symbol * add_local(ARGIN(symbol * const list), ARGIN(symbol * const local))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void add_operands(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const format),
+ ...)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_IGNORABLE_RESULT
+PARROT_CANNOT_RETURN_NULL
+target * add_param(
+ ARGIN(lexer_state * const lexer),
+ pir_type type,
+ ARGIN(char const * const name))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(3);
+
+PARROT_IGNORABLE_RESULT
+PARROT_CANNOT_RETURN_NULL
+target * add_target(
+ ARGIN(lexer_state * const lexer),
+ ARGMOD(target *last),
+ ARGIN(target * const t))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3)
+ FUNC_MODIFIES(*last);
+
+void annotate(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const key),
+ ARGIN(constant * const value))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3);
+
+void close_sub(ARGIN(lexer_state * const lexer))
+ __attribute__nonnull__(1);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+expression * expr_from_const(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(constant * const c))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+expression * expr_from_ident(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const id))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+expression * expr_from_int(ARGIN(lexer_state * const lexer), int ival)
+ __attribute__nonnull__(1);
+
+PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
+expression * expr_from_key(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(key * const k))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+expression * expr_from_num(ARGIN(lexer_state * const lexer), double nval)
+ __attribute__nonnull__(1);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+expression * expr_from_string(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const sval))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+expression * expr_from_target(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(target * const t))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void fixup_global_labels(ARGIN(lexer_state * const lexer))
+ __attribute__nonnull__(1);
+
+PARROT_CONST_FUNCTION
+PARROT_CANNOT_RETURN_NULL
+char const * get_inverse(ARGIN(char const * const instr))
+ __attribute__nonnull__(1);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+expression * get_operand(ARGIN(lexer_state * const lexer), short n)
+ __attribute__nonnull__(1);
+
+PARROT_WARN_UNUSED_RESULT
+unsigned get_operand_count(ARGIN(lexer_state * const lexer))
+ __attribute__nonnull__(1);
+
+void get_operands(ARGIN(lexer_state * const lexer), int bitmask, ...)
+ __attribute__nonnull__(1);
+
+void invert_instr(ARGIN(lexer_state * const lexer))
+ __attribute__nonnull__(1);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+invocation * invoke(ARGIN(lexer_state * const lexer), invoke_type type, ...)
+ __attribute__nonnull__(1);
+
+int is_parrot_op(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const name))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void load_library(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const library))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+argument * new_argument(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(expression * const expr))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+constant * new_const(ARGIN(lexer_state * const lexer), value_type type, ...)
+ __attribute__nonnull__(1);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+key * new_key(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(expression * const expr))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+symbol * new_local(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const name),
+ int has_unique_reg)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+constdecl * new_named_const(
+ ARGIN(lexer_state * const lexer),
+ value_type type,
+ ARGIN(char const * const name),
+ ...)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(3);
+
+PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
+constdecl * new_pmc_const(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const type),
+ ARGIN(char const * const name),
+ ARGIN(constant * const value))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3)
+ __attribute__nonnull__(4);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+target * new_reg(ARGIN(lexer_state * const lexer), pir_type type, int regno)
+ __attribute__nonnull__(1);
+
+void new_sub_instr(
+ ARGIN(lexer_state * const lexer),
+ int opcode,
+ ARGIN(char const * const opname),
+ unsigned num_var_args)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(3);
+
+void new_subr(ARGIN(lexer_state * const lexer), ARGIN(STRING *subname))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+target * new_target(ARGIN(lexer_state * const lexer))
+ __attribute__nonnull__(1);
+
+void push_operand(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(expression * const operand))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void remove_all_operands(ARGIN(lexer_state * const lexer))
+ __attribute__nonnull__(1);
+
+void reset_register_allocator(ARGIN(lexer_state * const lexer))
+ __attribute__nonnull__(1);
+
+PARROT_IGNORABLE_RESULT
+PARROT_CANNOT_RETURN_NULL
+argument * set_arg_alias(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const alias))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_IGNORABLE_RESULT
+PARROT_CANNOT_RETURN_NULL
+argument * set_arg_flag(ARGIN(argument * const arg), arg_flag flag)
+ __attribute__nonnull__(1);
+
+PARROT_IGNORABLE_RESULT
+PARROT_CANNOT_RETURN_NULL
+argument * set_curarg(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(argument * const arg))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_IGNORABLE_RESULT
+PARROT_CANNOT_RETURN_NULL
+target * set_curtarget(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(target * const t))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void set_hll(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const hll))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void set_instr(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const opname))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void set_instrf(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const opname),
+ ARGIN(char const * const format),
+ ...)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3);
+
+PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
+invocation * set_invocation_args(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(invocation * const inv),
+ ARGIN(argument * const args))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3);
+
+PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
+invocation * set_invocation_results(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(invocation * const inv),
+ ARGIN(target * const results))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3);
+
+PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
+invocation * set_invocation_type(
+ ARGIN(invocation * const inv),
+ invoke_type type)
+ __attribute__nonnull__(1);
+
+void set_label(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const labelname))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void set_lex_flag(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(target * const t),
+ ARGIN(char const * const name))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3);
+
+void set_namespace(ARGIN(lexer_state * const lexer), ARGIN(key * const ns))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void set_op_labelflag(ARGIN(lexer_state * const lexer), int flag)
+ __attribute__nonnull__(1);
+
+PARROT_IGNORABLE_RESULT
+PARROT_CANNOT_RETURN_NULL
+target * set_param_alias(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const alias))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_IGNORABLE_RESULT
+PARROT_CANNOT_RETURN_NULL
+target * set_param_flag(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(target * const param),
+ target_flag flag)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void set_sub_flag(ARGIN(lexer_state * const lexer), sub_flag flag)
+ __attribute__nonnull__(1);
+
+void set_sub_instanceof(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const classname))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void set_sub_methodname(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const methodname))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void set_sub_multi_types(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(expression * const multitype))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void set_sub_name(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const subname))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void set_sub_nsentry(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const nsentry))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void set_sub_outer(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const outersub))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void set_sub_subid(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const subid))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void set_sub_vtable(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * vtablename))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void set_target_key(ARGIN(target * const t), ARGIN(key * const k))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+target * target_from_symbol(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(symbol * const sym))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_PURE_FUNCTION
+PARROT_WARN_UNUSED_RESULT
+int targets_equal(
+ ARGIN(target const * const left),
+ ARGIN(target const * const right))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_IGNORABLE_RESULT
+PARROT_CANNOT_RETURN_NULL
+argument * unshift_arg(
+ ARGIN(invocation * const inv),
+ ARGIN(argument * const newarg))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void unshift_operand(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(expression * const operand))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void update_instr(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const newop))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void update_op(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(instruction * const instr),
+ int newop)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void update_sub_register_usage(
+ ARGIN(lexer_state * const lexer),
+ unsigned reg_usage[NUM_PARROT_TYPES])
+ __attribute__nonnull__(1);
+
+#define ASSERT_ARGS_add_arg __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(last) \
+ , PARROT_ASSERT_ARG(newarg))
+#define ASSERT_ARGS_add_key __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(keylist) \
+ , PARROT_ASSERT_ARG(exprkey))
+#define ASSERT_ARGS_add_local __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(list) \
+ , PARROT_ASSERT_ARG(local))
+#define ASSERT_ARGS_add_operands __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(format))
+#define ASSERT_ARGS_add_param __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(name))
+#define ASSERT_ARGS_add_target __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(last) \
+ , PARROT_ASSERT_ARG(t))
+#define ASSERT_ARGS_annotate __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(key) \
+ , PARROT_ASSERT_ARG(value))
+#define ASSERT_ARGS_close_sub __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_expr_from_const __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(c))
+#define ASSERT_ARGS_expr_from_ident __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(id))
+#define ASSERT_ARGS_expr_from_int __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_expr_from_key __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(k))
+#define ASSERT_ARGS_expr_from_num __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_expr_from_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(sval))
+#define ASSERT_ARGS_expr_from_target __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(t))
+#define ASSERT_ARGS_fixup_global_labels __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_get_inverse __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(instr))
+#define ASSERT_ARGS_get_operand __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_get_operand_count __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_get_operands __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_invert_instr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_invoke __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_is_parrot_op __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(name))
+#define ASSERT_ARGS_load_library __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(library))
+#define ASSERT_ARGS_new_argument __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(expr))
+#define ASSERT_ARGS_new_const __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_new_key __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(expr))
+#define ASSERT_ARGS_new_local __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(name))
+#define ASSERT_ARGS_new_named_const __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(name))
+#define ASSERT_ARGS_new_pmc_const __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(type) \
+ , PARROT_ASSERT_ARG(name) \
+ , PARROT_ASSERT_ARG(value))
+#define ASSERT_ARGS_new_reg __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_new_sub_instr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(opname))
+#define ASSERT_ARGS_new_subr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(subname))
+#define ASSERT_ARGS_new_target __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_push_operand __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(operand))
+#define ASSERT_ARGS_remove_all_operands __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_reset_register_allocator __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_set_arg_alias __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(alias))
+#define ASSERT_ARGS_set_arg_flag __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(arg))
+#define ASSERT_ARGS_set_curarg __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(arg))
+#define ASSERT_ARGS_set_curtarget __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(t))
+#define ASSERT_ARGS_set_hll __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(hll))
+#define ASSERT_ARGS_set_instr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(opname))
+#define ASSERT_ARGS_set_instrf __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(opname) \
+ , PARROT_ASSERT_ARG(format))
+#define ASSERT_ARGS_set_invocation_args __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(inv) \
+ , PARROT_ASSERT_ARG(args))
+#define ASSERT_ARGS_set_invocation_results __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(inv) \
+ , PARROT_ASSERT_ARG(results))
+#define ASSERT_ARGS_set_invocation_type __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(inv))
+#define ASSERT_ARGS_set_label __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(labelname))
+#define ASSERT_ARGS_set_lex_flag __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(t) \
+ , PARROT_ASSERT_ARG(name))
+#define ASSERT_ARGS_set_namespace __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(ns))
+#define ASSERT_ARGS_set_op_labelflag __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_set_param_alias __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(alias))
+#define ASSERT_ARGS_set_param_flag __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(param))
+#define ASSERT_ARGS_set_sub_flag __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_set_sub_instanceof __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(classname))
+#define ASSERT_ARGS_set_sub_methodname __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(methodname))
+#define ASSERT_ARGS_set_sub_multi_types __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(multitype))
+#define ASSERT_ARGS_set_sub_name __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(subname))
+#define ASSERT_ARGS_set_sub_nsentry __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(nsentry))
+#define ASSERT_ARGS_set_sub_outer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(outersub))
+#define ASSERT_ARGS_set_sub_subid __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(subid))
+#define ASSERT_ARGS_set_sub_vtable __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(vtablename))
+#define ASSERT_ARGS_set_target_key __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(t) \
+ , PARROT_ASSERT_ARG(k))
+#define ASSERT_ARGS_target_from_symbol __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(sym))
+#define ASSERT_ARGS_targets_equal __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(left) \
+ , PARROT_ASSERT_ARG(right))
+#define ASSERT_ARGS_unshift_arg __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(inv) \
+ , PARROT_ASSERT_ARG(newarg))
+#define ASSERT_ARGS_unshift_operand __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(operand))
+#define ASSERT_ARGS_update_instr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(newop))
+#define ASSERT_ARGS_update_op __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(instr))
+#define ASSERT_ARGS_update_sub_register_usage __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+/* HEADERIZER END: compilers/pirc/src/pircompunit.c */
#endif /* PARROT_PIR_PIRCOMPUNIT_H_GUARD */
Modified: branches/boehm_gc_2/compilers/pirc/src/piremit.c
==============================================================================
--- branches/boehm_gc_2/compilers/pirc/src/piremit.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/pirc/src/piremit.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -14,6 +14,109 @@
#include "parrot/oplib/ops.h"
+/* HEADERIZER HFILE: compilers/pirc/src/piremit.h */
+
+/* HEADERIZER BEGIN: static */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+
+static void emit_pbc_annotations(ARGIN(lexer_state * const lexer))
+ __attribute__nonnull__(1);
+
+static void emit_pbc_const_arg(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(constant * const c))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+static void emit_pbc_expr(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(expression * const operand))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+static void emit_pbc_instr(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(instruction * const instr))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+static void emit_pbc_label_arg(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(label * const l))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+static void emit_pbc_sub(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(subroutine * const sub))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+static void emit_pbc_target_arg(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(target * const t))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+static void emit_pir_instruction(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(instruction * const instr))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+static void emit_pir_statement(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(subroutine * const sub))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+static void optimize_instr(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(instruction * const instr))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+static void print_sub_flags(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(subroutine * const subiter))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+#define ASSERT_ARGS_emit_pbc_annotations __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_emit_pbc_const_arg __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(c))
+#define ASSERT_ARGS_emit_pbc_expr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(operand))
+#define ASSERT_ARGS_emit_pbc_instr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(instr))
+#define ASSERT_ARGS_emit_pbc_label_arg __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(l))
+#define ASSERT_ARGS_emit_pbc_sub __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(sub))
+#define ASSERT_ARGS_emit_pbc_target_arg __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(t))
+#define ASSERT_ARGS_emit_pir_instruction __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(instr))
+#define ASSERT_ARGS_emit_pir_statement __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(sub))
+#define ASSERT_ARGS_optimize_instr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(instr))
+#define ASSERT_ARGS_print_sub_flags __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(subiter))
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+/* HEADERIZER END: static */
+
/*
=head1 DESCRIPTION
@@ -44,25 +147,24 @@
*/
char const pir_register_types[5] = {'I', 'S', 'P', 'N', '?'};
-static void emit_pir_statement(lexer_state * const lexer, subroutine * const sub);
-static void emit_pir_instruction(lexer_state * const lexer, instruction * const instr);
-static void emit_pbc_expr(lexer_state * const lexer, expression * const operand);
+static void emit_pir_statement(ARGIN(lexer_state * const lexer), subroutine * const sub);
+static void emit_pir_instruction(ARGIN(lexer_state * const lexer), instruction * const instr);
+static void emit_pbc_expr(ARGIN(lexer_state * const lexer), expression * const operand);
-static void print_sub_flags(lexer_state * const lexer, subroutine * const subiter);
+static void print_sub_flags(ARGIN(lexer_state * const lexer), subroutine * const subiter);
/* prototype declaration */
-void print_expr(lexer_state * const lexer, expression * const expr);
-void print_key(lexer_state * const lexer, key * const k);
-void print_target(lexer_state * const lexer, target * const t);
-void print_constant(lexer_state * const lexer, constant * const c);
-void print_expressions(lexer_state * const lexer, expression * const expr);
-void print_instruction(lexer_state * const lexer, instruction * const ins);
-void print_statement(lexer_state * const lexer, subroutine * const sub);
+void print_expr(ARGIN(lexer_state * const lexer), expression * const expr);
+void print_key(ARGIN(lexer_state * const lexer), key * const k);
+void print_target(ARGIN(lexer_state * const lexer), target * const t);
+void print_constant(ARGIN(lexer_state * const lexer), constant * const c);
+void print_expressions(ARGIN(lexer_state * const lexer), expression * const expr);
+void print_instruction(ARGIN(lexer_state * const lexer), instruction * const ins);
+void print_statement(ARGIN(lexer_state * const lexer), subroutine * const sub);
/*
-=item C<void
-print_key(lexer_state * const lexer, key * const k)>
+=item C<void print_key(lexer_state * const lexer, key * const k)>
Print the key C<k>. The total key is enclosed in square brackets,
and different key elements are separated by semicolons. Example:
@@ -75,7 +177,9 @@
*/
void
-print_key(lexer_state * const lexer, key * const k) {
+print_key(ARGIN(lexer_state * const lexer), ARGIN(key * const k))
+{
+ ASSERT_ARGS(print_key)
key_entry *iter;
fprintf(out, "[");
@@ -95,8 +199,7 @@
/*
-=item C<void
-print_target(lexer_state * const lexer, target * const t)>
+=item C<void print_target(lexer_state * const lexer, target * const t)>
Print the target C<t>; if C<t> has a key, that key is
printed as well. Examples:
@@ -107,7 +210,9 @@
*/
void
-print_target(lexer_state * const lexer, target * const t) {
+print_target(ARGIN(lexer_state * const lexer), ARGIN(target * const t))
+{
+ ASSERT_ARGS(print_target)
PARROT_ASSERT(t->info);
fprintf(out, "%c%d", pir_register_types[t->info->type], t->info->color);
@@ -118,8 +223,7 @@
/*
-=item C<void
-print_constant(lexer_state * const lexer, constant * const c)>
+=item C<void print_constant(lexer_state * const lexer, constant * const c)>
Print the value of constant C<c>. Based on C<c>'s type, the appropriate
value is printed.
@@ -128,7 +232,10 @@
*/
void
-print_constant(lexer_state * const lexer, constant * const c) {
+print_constant(ARGIN(lexer_state * const lexer),
+ ARGIN(constant * const c))
+{
+ ASSERT_ARGS(print_constant)
switch (c->type) {
case INT_VAL:
fprintf(out, "%d", c->val.ival);
@@ -153,8 +260,7 @@
/*
-=item C<void
-print_expr(lexer_state * const lexer, expression * const expr)>
+=item C<void print_expr(lexer_state * const lexer, expression * const expr)>
Print the expression C<expr>. This is a dispatch function, calling
a specialized function based on C<expr>'s type.
@@ -163,7 +269,10 @@
*/
void
-print_expr(lexer_state * const lexer, expression * const expr) {
+print_expr(ARGIN(lexer_state * const lexer),
+ ARGIN(expression * const expr))
+{
+ ASSERT_ARGS(print_expr)
switch (expr->type) {
case EXPR_TARGET:
print_target(lexer, expr->expr.t);
@@ -187,8 +296,8 @@
/*
-=item C<void
-print_expressions(expression * const expr)>
+=item C<void print_expressions(lexer_state * const lexer, expression * const
+expr)>
Print the list of expressions pointed to by C<expr>,
if C<expr> is not NULL. If C<expr> is NULL, the
@@ -199,7 +308,10 @@
*/
void
-print_expressions(lexer_state * const lexer, expression * const expr) {
+print_expressions(ARGIN(lexer_state * const lexer),
+ ARGIN(expression * const expr))
+{
+ ASSERT_ARGS(print_expressions)
expression *iter;
if (expr == NULL)
@@ -218,8 +330,8 @@
/*
-=item C<void
-print_instruction(lexer_state * const lexer, instruction * const ins)>
+=item C<void print_instruction(lexer_state * const lexer, instruction * const
+ins)>
Print the instruction C<ins>.
@@ -227,8 +339,10 @@
*/
void
-print_instruction(lexer_state * const lexer, instruction * const ins) {
- PARROT_ASSERT(ins != NULL);
+print_instruction(ARGIN(lexer_state * const lexer),
+ ARGIN(instruction * const ins))
+{
+ ASSERT_ARGS(print_instruction)
if (ins->label) {
if (TEST_FLAG(lexer->flags, LEXER_FLAG_EMIT_PASM))
@@ -254,8 +368,7 @@
/*
-=item C<void
-print_statement(lexer_state * const lexer, subroutine * const sub)>
+=item C<void print_statement(lexer_state * const lexer, subroutine * const sub)>
XXX
@@ -263,7 +376,10 @@
*/
void
-print_statement(lexer_state * const lexer, subroutine * const sub) {
+print_statement(ARGIN(lexer_state * const lexer),
+ ARGIN(subroutine * const sub))
+{
+ ASSERT_ARGS(print_statement)
instruction *statiter;
if (sub->statements == NULL)
@@ -280,8 +396,8 @@
/*
-=item C<static void
-print_sub_flags(lexer_state * const lexer, subroutine * const subiter)>
+=item C<static void print_sub_flags(lexer_state * const lexer, subroutine *
+const subiter)>
Print the appropriate subflags.
@@ -289,7 +405,11 @@
*/
static void
-print_sub_flags(lexer_state * const lexer, subroutine * const subiter) {
+print_sub_flags(ARGIN(lexer_state * const lexer),
+ ARGIN(subroutine * const subiter))
+{
+ ASSERT_ARGS(print_sub_flags)
+
if (TEST_FLAG(subiter->flags, PIRC_SUB_FLAG_INIT))
fprintf(out, ":init ");
if (TEST_FLAG(subiter->flags, PIRC_SUB_FLAG_LOAD))
@@ -320,8 +440,7 @@
/*
-=item C<void
-print_subs(struct lexer_state * const lexer)>
+=item C<void print_subs(struct lexer_state * const lexer)>
Top-level function to print all generated code. This function
iterates over all subs and prints their instructions.
@@ -330,7 +449,9 @@
*/
void
-print_subs(struct lexer_state * const lexer) {
+print_subs(struct ARGIN(lexer_state * const lexer))
+{
+ ASSERT_ARGS(print_subs)
subroutine *subiter;
if (lexer->subs == NULL)
@@ -371,8 +492,8 @@
/*
-=item C<static void
-emit_pir_instruction(lexer_state * const lexer, instruction * const instr)>
+=item C<static void emit_pir_instruction(lexer_state * const lexer, instruction
+* const instr)>
Print the PIR representation of C<instr>. If C<instr> has a label, that
is printed first.
@@ -381,7 +502,10 @@
*/
static void
-emit_pir_instruction(lexer_state * const lexer, instruction * const instr) {
+emit_pir_instruction(ARGIN(lexer_state * const lexer),
+ ARGIN(instruction * const instr))
+{
+ ASSERT_ARGS(emit_pir_instruction)
if (instr->label)
fprintf(out, " %s:\n", instr->label);
@@ -395,8 +519,8 @@
/*
-=item C<static void
-emit_pir_statement(lexer_state * const lexer, subroutine * const sub)>
+=item C<static void emit_pir_statement(lexer_state * const lexer, subroutine *
+const sub)>
Emit all statements of the subroutine C<sub>. The statements
are emitted in PIR format. If there are no statements in C<sub>,
@@ -406,7 +530,11 @@
*/
static void
-emit_pir_statement(lexer_state * const lexer, subroutine * const sub) {
+emit_pir_statement(ARGIN(lexer_state * const lexer),
+ ARGIN(subroutine * const sub))
+{
+ ASSERT_ARGS(emit_pir_statement)
+
instruction *statiter;
if (sub->statements == NULL)
@@ -424,8 +552,8 @@
/*
-=item C<void
-emit_pir_subs(lexer_state * const lexer)>
+=item C<void emit_pir_subs(lexer_state * const lexer, char const * const
+outfile)>
Print the PIR representation of all subroutines stored
in the C<lexer>. If there are no subroutines, thre function
@@ -435,7 +563,10 @@
*/
void
-emit_pir_subs(lexer_state * const lexer, char const * const outfile) {
+emit_pir_subs(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const outfile))
+{
+ ASSERT_ARGS(emit_pir_subs)
subroutine *subiter;
if (lexer->subs == NULL)
@@ -474,8 +605,8 @@
/*
-=item C<static void
-emit_pbc_const_arg(lexer_state * const lexer, constant * const c)>
+=item C<static void emit_pbc_const_arg(lexer_state * const lexer, constant *
+const c)>
Emit a constant argument into the bytecode. An integer is emitted
inline in the bytecode; other types are stored in the constant table,
@@ -485,7 +616,10 @@
*/
static void
-emit_pbc_const_arg(lexer_state * const lexer, constant * const c) {
+emit_pbc_const_arg(ARGIN(lexer_state * const lexer),
+ ARGIN(constant * const c))
+{
+ ASSERT_ARGS(emit_pbc_const_arg)
switch (c->type) {
case INT_VAL:
@@ -538,8 +672,8 @@
/*
-=item C<static void
-emit_pbc_label_arg(lexer_state * const lexer, label * const l)>
+=item C<static void emit_pbc_label_arg(lexer_state * const lexer, label * const
+l)>
Emit the value of the label offset of label C<l>.
@@ -547,7 +681,11 @@
*/
static void
-emit_pbc_label_arg(lexer_state * const lexer, label * const l) {
+emit_pbc_label_arg(ARGIN(lexer_state * const lexer),
+ ARGIN(label * const l))
+{
+ ASSERT_ARGS(emit_pbc_label_arg)
+
emit_int_arg(lexer->bc, l->offset);
}
@@ -558,8 +696,8 @@
/*
-=item C<static void
-emit_pbc_target_arg(lexer_state * const lexer, target * const t)>
+=item C<static void emit_pbc_target_arg(lexer_state * const lexer, target *
+const t)>
Emit the assigned register of target C<t>. The assigned register is
stored in the C<color> field, of either the C<pir_reg> or C<symbol>
@@ -570,7 +708,11 @@
*/
static void
-emit_pbc_target_arg(lexer_state * const lexer, target * const t) {
+emit_pbc_target_arg(ARGIN(lexer_state * const lexer),
+ ARGIN(target * const t))
+{
+ ASSERT_ARGS(emit_pbc_target_arg)
+
emit_int_arg(lexer->bc, t->info->color);
/* if t has a key, emit that as well */
@@ -581,8 +723,8 @@
/*
-=item C<static void
-emit_pbc_expr(lexer_state * const lexer, expression * const operand)>
+=item C<static void emit_pbc_expr(lexer_state * const lexer, expression * const
+operand)>
Emit bytecode for the expression C<operand>. This is a dispatch
function, invoking the appropriate function depending on C<operand>'s
@@ -592,7 +734,11 @@
*/
static void
-emit_pbc_expr(lexer_state * const lexer, expression * const operand) {
+emit_pbc_expr(ARGIN(lexer_state * const lexer),
+ ARGIN(expression * const operand))
+{
+ ASSERT_ARGS(emit_pbc_expr)
+
switch (operand->type) {
case EXPR_CONSTANT:
emit_pbc_const_arg(lexer, operand->expr.c);
@@ -620,8 +766,8 @@
/*
-=item C<static void
-optimize_instr(lexer_state * const lexer, instruction * const instr)>
+=item C<static void optimize_instr(lexer_state * const lexer, instruction *
+const instr)>
Optimize the instruction C<instr>. Currently, these instructions are optimized:
@@ -633,7 +779,10 @@
*/
static void
-optimize_instr(lexer_state * const lexer, instruction * const instr) {
+optimize_instr(ARGIN(lexer_state * const lexer),
+ ARGIN(instruction * const instr))
+{
+ ASSERT_ARGS(optimize_instr)
switch (instr->opcode) {
case PARROT_OP_box_p_ic: {
@@ -641,7 +790,7 @@
/* the last operand, which is the second in this case */
expression *second_operand = instr->operands;
- PMC *intconst = pmc_new(lexer->interp,
+ PMC *intconst = Parrot_pmc_new(lexer->interp,
Parrot_get_ctx_HLL_type(lexer->interp, enum_class_Integer));
int index = add_pmc_const(lexer->bc, intconst);
VTABLE_set_integer_native(lexer->interp, intconst, second_operand->expr.c->val.ival);
@@ -658,7 +807,7 @@
/* the last operand, which is the second in this case */
expression *second_operand = instr->operands;
- PMC *numconst = pmc_new(lexer->interp,
+ PMC *numconst = Parrot_pmc_new(lexer->interp,
Parrot_get_ctx_HLL_type(lexer->interp, enum_class_Float));
int index = add_pmc_const(lexer->bc, numconst);
VTABLE_set_number_native(lexer->interp, numconst, second_operand->expr.c->val.nval);
@@ -676,7 +825,7 @@
/* the last operand, which is the second in this case */
expression *second_operand = instr->operands;
- PMC *strconst = pmc_new(lexer->interp,
+ PMC *strconst = Parrot_pmc_new(lexer->interp,
Parrot_get_ctx_HLL_type(lexer->interp, enum_class_String));
int index = add_pmc_const(lexer->bc, strconst);
@@ -700,8 +849,8 @@
/*
-=item C<static void
-emit_pbc_instr(lexer_state * const lexer, instruction * const instr)>
+=item C<static void emit_pbc_instr(lexer_state * const lexer, instruction *
+const instr)>
Emit PBC for one instruction. If the C<opinfo> attribute of C<instr>
is NULL, the function does nothing and returns.
@@ -710,7 +859,11 @@
*/
static void
-emit_pbc_instr(lexer_state * const lexer, instruction * const instr) {
+emit_pbc_instr(ARGIN(lexer_state * const lexer),
+ ARGIN(instruction * const instr))
+{
+ ASSERT_ARGS(emit_pbc_instr)
+
int i;
expression *operand;
opcode_t offset;
@@ -766,8 +919,8 @@
/*
-=item C<static void
-emit_pbc_sub(lexer_state * const lexer, subroutine * const sub)>
+=item C<static void emit_pbc_sub(lexer_state * const lexer, subroutine * const
+sub)>
Emit bytecode for the subroutine C<sub>.
@@ -775,7 +928,11 @@
*/
static void
-emit_pbc_sub(lexer_state * const lexer, subroutine * const sub) {
+emit_pbc_sub(ARGIN(lexer_state * const lexer),
+ ARGIN(subroutine * const sub))
+{
+ ASSERT_ARGS(emit_pbc_sub)
+
instruction *iter;
if (sub->statements == NULL)
@@ -803,8 +960,7 @@
/*
-=item C<static void
-emit_pbc_annotations(lexer_state * const lexer)>
+=item C<static void emit_pbc_annotations(lexer_state * const lexer)>
Emit all annotations into the PackFile. First a new annotations
segment is created. Then, for each annotation, its value is stored
@@ -814,7 +970,10 @@
*/
static void
-emit_pbc_annotations(lexer_state * const lexer) {
+emit_pbc_annotations(ARGIN(lexer_state * const lexer))
+{
+ ASSERT_ARGS(emit_pbc_annotations)
+
annotation *iter;
if (lexer->annotations == NULL)
@@ -866,8 +1025,7 @@
/*
-=item C<void
-emit_pbc(lexer_state * const lexer, const char *outfile)>
+=item C<void emit_pbc(lexer_state * const lexer, const char *outfile)>
Generate Parrot Byte Code from the abstract syntax tree.
This is the top-level function. After all instructions
@@ -878,7 +1036,10 @@
*/
void
-emit_pbc(lexer_state * const lexer, const char *outfile) {
+emit_pbc(ARGIN(lexer_state * const lexer),
+ ARGIN(const char *outfile))
+{
+ ASSERT_ARGS(emit_pbc)
subroutine *subiter;
if (!outfile)
Modified: branches/boehm_gc_2/compilers/pirc/src/piremit.h
==============================================================================
--- branches/boehm_gc_2/compilers/pirc/src/piremit.h Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/pirc/src/piremit.h Mon Feb 22 12:30:02 2010 (r44294)
@@ -10,12 +10,91 @@
struct lexer_state;
struct constant;
-void print_subs(struct lexer_state * const lexer);
-void emit_pir_subs(struct lexer_state * const lexer, char const * const outfile);
-void emit_pbc(struct lexer_state * const lexer, const char *outfile);
+/* HEADERIZER BEGIN: compilers/pirc/src/piremit.c */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+void emit_pbc(ARGIN(lexer_state * const lexer), ARGIN(const char *outfile))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
-int emit_pbc_const(struct lexer_state * const lexer, struct constant * const pirconst);
+void emit_pir_subs(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const outfile))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void print_constant(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(constant * const c))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void print_expr(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(expression * const expr))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void print_expressions(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(expression * const expr))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void print_instruction(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(instruction * const ins))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void print_key(ARGIN(lexer_state * const lexer), ARGIN(key * const k))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void print_statement(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(subroutine * const sub))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void print_subs(struct ARGIN(lexer_state * const lexer))
+ __attribute__nonnull__(1);
+
+void print_target(ARGIN(lexer_state * const lexer), ARGIN(target * const t))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+#define ASSERT_ARGS_emit_pbc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(outfile))
+#define ASSERT_ARGS_emit_pir_subs __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(outfile))
+#define ASSERT_ARGS_print_constant __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(c))
+#define ASSERT_ARGS_print_expr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(expr))
+#define ASSERT_ARGS_print_expressions __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(expr))
+#define ASSERT_ARGS_print_instruction __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(ins))
+#define ASSERT_ARGS_print_key __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(k))
+#define ASSERT_ARGS_print_statement __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(sub))
+#define ASSERT_ARGS_print_subs __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_print_target __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(t))
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+/* HEADERIZER END: compilers/pirc/src/piremit.c */
#endif /* PARROT_PIR_PIREMIT_H_GUARD */
Modified: branches/boehm_gc_2/compilers/pirc/src/pirmacro.c
==============================================================================
--- branches/boehm_gc_2/compilers/pirc/src/pirmacro.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/pirc/src/pirmacro.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -9,7 +9,18 @@
#include "pircompiler.h"
#include "parrot/parrot.h"
+/* HEADERIZER HFILE: compilers/pirc/src/pirmacro.h */
+/* HEADERIZER BEGIN: static */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+
+static void check_size(ARGIN(macro_def * const macro), unsigned length)
+ __attribute__nonnull__(1);
+
+#define ASSERT_ARGS_check_size __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(macro))
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+/* HEADERIZER END: static */
/*
@@ -24,15 +35,11 @@
*/
-static void check_size(macro_def * const macro, unsigned length);
-
-
-
/*
-=item C<macro_def *
-new_macro(macro_table * const table, char * const name, int lineno)>
+=item C<macro_def * new_macro(macro_table * const table, char const * const
+name, int lineno, int takes_args, unsigned initsize)>
Create a new macro definition node and store it in the macro_table C<table>
@@ -41,10 +48,13 @@
*/
PARROT_MALLOC
PARROT_IGNORABLE_RESULT
+PARROT_CAN_RETURN_NULL
macro_def *
-new_macro(macro_table * const table, char const * const name, int lineno, int takes_args,
- unsigned initsize)
+new_macro(ARGIN(macro_table * const table),
+ ARGIN(char const * const name), int lineno, int takes_args,
+ unsigned initsize)
{
+ ASSERT_ARGS(new_macro)
macro_def *macro = (macro_def *)mem_sys_allocate(sizeof (macro_def));
macro->name = name;
@@ -65,8 +75,7 @@
/*
-=item C<macro_param *
-new_macro_param(char const * const value)>
+=item C<macro_param * new_macro_param(char const * const value)>
Constructor for a C<macro_param> struct object. Initializes
the C<name> attribute of the C<macro_param> object to C<value>.
@@ -79,7 +88,9 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
macro_param *
-new_macro_param(char const * const value) {
+new_macro_param(ARGIN(char const * const value))
+{
+ ASSERT_ARGS(new_macro_param)
macro_param *param = (macro_param *)mem_sys_allocate(sizeof (macro_param));
param->name = value;
param->next = NULL;
@@ -88,8 +99,8 @@
/*
-=item C<void
-add_macro_param(macro_def * const macro, char * const name)>
+=item C<void add_macro_param(ARGIN*macro_def * const macro), char const * const
+name)>
Add a macro parameter by name of C<name> to the macro definition C<macro>.
@@ -97,7 +108,10 @@
*/
void
-add_macro_param(macro_def * const macro, char const * const name) {
+add_macro_param(ARGIN*macro_def * const macro),
+ ARGIN(char const * const name))
+{
+ ASSERT_ARGS(add_macro_param)
macro_param *param = new_macro_param(name);
param->next = macro->parameters;
macro->parameters = param;
@@ -106,8 +120,8 @@
/*
-=item C<void
-new_macro_const(macro_table * const table, char const * const name, char const * const value)>
+=item C<void new_macro_const(macro_table * const table, char const * const name,
+char const * const value, int lineno)>
Define a new C<.macro_const>, by name of C<name> as an alias for C<value> The new macro
const is entered in the macro_table C<table>
@@ -116,9 +130,11 @@
*/
void
-new_macro_const(macro_table * const table, char const * const name, char const * const value,
- int lineno)
+new_macro_const(ARGIN(macro_table * const table),
+ ARGIN(char const * const name),
+ ARGIN(char const * const value), int lineno)
{
+ ASSERT_ARGS(new_macro_const)
/* macro constants are just macros, but they have no body; the value is already
* parsed and allocated in memory.
*/
@@ -130,8 +146,7 @@
/*
-=item C<void
-check_size(macro_def * const macro, unsigned length)>
+=item C<static void check_size(macro_def * const macro, unsigned length)>
Check C<macro>'s buffer size whether C<length> bytes can be added;
if not, then the buffer is doubled in size.
@@ -140,7 +155,9 @@
*/
static void
-check_size(macro_def * const macro, unsigned length) {
+check_size(ARGIN(macro_def * const macro), unsigned length)
+{
+ ASSERT_ARGS(check_size)
unsigned used = macro->cursor - macro->body;
if (used + length >= macro->buffersize) {
unsigned newsize = macro->buffersize << 1;
@@ -159,8 +176,7 @@
/*
-=item C<void
-store_macro_char(macro_def * const macro, char c)>
+=item C<void store_macro_char(macro_def * const macro, char c)>
Store the character C<c> in C<macro>'s body buffer.
@@ -168,7 +184,9 @@
*/
void
-store_macro_char(macro_def * const macro, char c) {
+store_macro_char(ARGIN(macro_def * const macro), char c)
+{
+ ASSERT_ARGS(store_macro_char)
/* if buffer is full, resize it. */
check_size(macro, 1);
*(macro->cursor)++ = c;
@@ -179,8 +197,8 @@
/*
-=item C<void
-store_macro_string(macro_def * const macro, char * const str, ...)>
+=item C<void store_macro_string(macro_def * const macro, char const * const str,
+...)>
Store the string C<str> in C<macro>'s body buffer. The total number
of characters to be written should not exceed MAX_NUM_CHARS. It's not known
@@ -190,7 +208,11 @@
*/
void
-store_macro_string(macro_def * const macro, char const * const str, ...) {
+store_macro_string(ARGIN(macro_def * const macro),
+ ARGIN(char const * const str),
+ ...)
+{
+ ASSERT_ARGS(store_macro_string)
va_list arg_ptr;
#define MAX_NUM_CHARS_IN_STRING 256
@@ -206,8 +228,8 @@
/*
-=item C<macro_def *
-find_macro(constant_table * const table, char * const name)>
+=item C<macro_def * find_macro(macro_table * const table, char const * const
+name)>
Find the specified macro. If the specified macro does not exist,
NULL is returned.
@@ -218,7 +240,10 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
macro_def *
-find_macro(macro_table * const table, char const * const name) {
+find_macro(ARGIN(macro_table * const table),
+ ARGIN(char const * const name))
+{
+ ASSERT_ARGS(find_macro)
macro_def *iter = table->definitions;
PARROT_ASSERT(name != NULL);
@@ -243,8 +268,7 @@
/*
-=item C<macro_table *
-new_macro_table(macro_table * const current)>
+=item C<macro_table * new_macro_table(macro_table * const current)>
Create a new macro_table structure; set C<current> as its previous.
The newly created table is returned.
@@ -256,7 +280,9 @@
PARROT_CANNOT_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
macro_table *
-new_macro_table(macro_table * const current) {
+new_macro_table(ARGIN(macro_table * const current))
+{
+ ASSERT_ARGS(new_macro_table)
macro_table *table = (macro_table *)mem_sys_allocate_zeroed(sizeof (macro_table));
table->definitions = NULL;
table->prev = NULL;
@@ -270,8 +296,7 @@
/*
-=item C<void
-delete_macro_table(macro_table * table)>
+=item C<void delete_macro_table(macro_table * table)>
Free resources allocated for the macro_table C<table>.
@@ -279,14 +304,16 @@
*/
void
-delete_macro_table(macro_table * table) {
+delete_macro_table(ARGMOD(macro_table * table))
+{
+ ASSERT_ARGS(delete_macro_table)
mem_sys_free(table);
}
/*
-=item C<void
-declare_macro_local(macro_def * const macro, char * const name)>
+=item C<void declare_macro_local(macro_def * const macro, char const * const
+name)>
Declare C<name> as a C<.macro_local> for the macro definition C<macro>.
@@ -294,7 +321,10 @@
*/
void
-declare_macro_local(macro_def * const macro, char const * const name) {
+declare_macro_local(ARGIN(macro_def * const macro),
+ ARGIN(char const * const name))
+{
+ ASSERT_ARGS(declare_macro_local)
macro_param * param = new_macro_param(name);
param->next = macro->macrolocals;
macro->macrolocals = param;
@@ -303,8 +333,7 @@
/*
-=item C<int
-is_macro_local(macro_def * const macro, char * const name)>
+=item C<int is_macro_local(macro_def * const macro, char const * const name)>
Check whether C<name> was declared as a C<.macro_local> in the macro
definition C<macro>.
@@ -314,7 +343,10 @@
*/
PARROT_WARN_UNUSED_RESULT
int
-is_macro_local(macro_def * const macro, char const * const name) {
+is_macro_local(ARGIN(macro_def * const macro),
+ ARGIN(char const * const name))
+{
+ ASSERT_ARGS(is_macro_local)
macro_param *iter = macro->macrolocals;
while (iter) {
Modified: branches/boehm_gc_2/compilers/pirc/src/pirmacro.h
==============================================================================
--- branches/boehm_gc_2/compilers/pirc/src/pirmacro.h Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/pirc/src/pirmacro.h Mon Feb 22 12:30:02 2010 (r44294)
@@ -80,33 +80,113 @@
} macro_table;
+/* HEADERIZER BEGIN: compilers/pirc/src/pirmacro.c */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-
-
-macro_def *new_macro(macro_table * const table, char const * const name, int lineno,
- int takes_args, unsigned initsize);
-
-void add_macro_param(macro_def * const macro, char const * const name);
-
-void new_macro_const(macro_table * const table, char const * const name,
- char const * const value, int lineno);
-
-
-macro_def *find_macro(macro_table * const table, char const * const name);
-
-macro_table * new_macro_table(macro_table * const current);
-
-void store_macro_char(macro_def * const macro, char c) ;
-
-void store_macro_string(macro_def * const macro, char const * const str, ...);
-
-macro_param * new_macro_param(char const * const value);
-
-void declare_macro_local(macro_def * const macro, char const * const name);
-
-int is_macro_local(macro_def * const macro, char const * const name);
-
-void delete_macro_table(macro_table * table);
+void add_macro_param(
+ ARGIN*macro_def * const macro),
+ ARGIN(char const * const name))
+ __attribute__nonnull__(2);
+
+void declare_macro_local(
+ ARGIN(macro_def * const macro),
+ ARGIN(char const * const name))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void delete_macro_table(ARGMOD(macro_table * table))
+ __attribute__nonnull__(1)
+ FUNC_MODIFIES(* table);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CAN_RETURN_NULL
+macro_def * find_macro(
+ ARGIN(macro_table * const table),
+ ARGIN(char const * const name))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+int is_macro_local(
+ ARGIN(macro_def * const macro),
+ ARGIN(char const * const name))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_MALLOC
+PARROT_IGNORABLE_RESULT
+PARROT_CAN_RETURN_NULL
+macro_def * new_macro(
+ ARGIN(macro_table * const table),
+ ARGIN(char const * const name),
+ int lineno,
+ int takes_args,
+ unsigned initsize)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void new_macro_const(
+ ARGIN(macro_table * const table),
+ ARGIN(char const * const name),
+ ARGIN(char const * const value),
+ int lineno)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3);
+
+PARROT_MALLOC
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+macro_param * new_macro_param(ARGIN(char const * const value))
+ __attribute__nonnull__(1);
+
+PARROT_MALLOC
+PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
+macro_table * new_macro_table(ARGIN(macro_table * const current))
+ __attribute__nonnull__(1);
+
+void store_macro_char(ARGIN(macro_def * const macro), char c)
+ __attribute__nonnull__(1);
+
+void store_macro_string(
+ ARGIN(macro_def * const macro),
+ ARGIN(char const * const str),
+ ...)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+#define ASSERT_ARGS_add_macro_param __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(name))
+#define ASSERT_ARGS_declare_macro_local __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(macro) \
+ , PARROT_ASSERT_ARG(name))
+#define ASSERT_ARGS_delete_macro_table __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(table))
+#define ASSERT_ARGS_find_macro __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(table) \
+ , PARROT_ASSERT_ARG(name))
+#define ASSERT_ARGS_is_macro_local __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(macro) \
+ , PARROT_ASSERT_ARG(name))
+#define ASSERT_ARGS_new_macro __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(table) \
+ , PARROT_ASSERT_ARG(name))
+#define ASSERT_ARGS_new_macro_const __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(table) \
+ , PARROT_ASSERT_ARG(name) \
+ , PARROT_ASSERT_ARG(value))
+#define ASSERT_ARGS_new_macro_param __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(value))
+#define ASSERT_ARGS_new_macro_table __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(current))
+#define ASSERT_ARGS_store_macro_char __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(macro))
+#define ASSERT_ARGS_store_macro_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(macro) \
+ , PARROT_ASSERT_ARG(str))
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+/* HEADERIZER END: compilers/pirc/src/pirmacro.c */
#endif /* PARROT_PIR_PIRMACRO_H_GUARD */
Modified: branches/boehm_gc_2/compilers/pirc/src/pirparser.c
==============================================================================
--- branches/boehm_gc_2/compilers/pirc/src/pirparser.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/pirc/src/pirparser.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -405,6 +405,111 @@
#endif
+/* HEADERIZER HFILE: none */
+
+/* HEADERIZER BEGIN: static */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+
+static void check_first_arg_direction(
+ lexer_state * const lexer,
+ NOTNULL(char const * const opname))
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+static char * concat_strings(
+ NOTNULL(lexer_state * const lexer),
+ NOTNULL(char const * a),
+ NOTNULL(char const * b))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3);
+
+static void create_if_instr(
+ NOTNULL(lexer_state * const lexer),
+ int invert,
+ int hasnull,
+ NOTNULL(char const * const name),
+ NOTNULL(char const * const label))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(4)
+ __attribute__nonnull__(5);
+
+static void do_strength_reduction(lexer_state * const lexer);
+PARROT_WARN_UNUSED_RESULT
+static int evaluate_i_i(int a, pir_rel_operator op, int b);
+
+PARROT_WARN_UNUSED_RESULT
+static int evaluate_i_n(int a, pir_rel_operator op, double b);
+
+PARROT_WARN_UNUSED_RESULT
+static int evaluate_n_i(double a, pir_rel_operator op, int b);
+
+static void undeclared_symbol(
+ lexer_state * const lexer,
+ char const * const symbol);
+
+static void yy_reduce_print (
+ YYSTYPE *yyvsp,
+ int yyrule,
+ yyscan_t yyscanner,
+ struct lexer_state * const lexer);
+
+static void yy_stack_print (yytype_int16 *bottom, yytype_int16 *top);
+static void yy_symbol_print (
+ FILE *yyoutput,
+ int yytype,
+ YYSTYPE const * const yyvaluep,
+ yyscan_t yyscanner,
+ struct lexer_state * const lexer);
+
+static void yy_symbol_value_print (
+ FILE *yyoutput,
+ int yytype,
+ YYSTYPE const * const yyvaluep,
+ yyscan_t yyscanner,
+ struct lexer_state * const lexer);
+
+static void yydestruct (
+ const char *yymsg,
+ int yytype,
+ YYSTYPE *yyvaluep,
+ yyscan_t yyscanner,
+ struct lexer_state * const lexer);
+
+static int YYID (int i);
+static char * yystpcpy (char *yydest, const char *yysrc);
+static YYSIZE_T yystrlen (const char *yystr);
+static YYSIZE_T yysyntax_error (char *yyresult, int yystate, int yychar);
+static YYSIZE_T yytnamerr (char *yyres, const char *yystr);
+#define ASSERT_ARGS_check_first_arg_direction __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(opname))
+#define ASSERT_ARGS_concat_strings __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(a) \
+ , PARROT_ASSERT_ARG(b))
+#define ASSERT_ARGS_create_if_instr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(name) \
+ , PARROT_ASSERT_ARG(label))
+#define ASSERT_ARGS_do_strength_reduction __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_evaluate_i_i __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_evaluate_i_n __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_evaluate_n_i __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_undeclared_symbol __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_yy_reduce_print __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_yy_stack_print __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_yy_symbol_print __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_yy_symbol_value_print __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_yydestruct __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_YYID __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_yystpcpy __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_yystrlen __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_yysyntax_error __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_yytnamerr __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+/* HEADERIZER END: static */
+
char *expand_macro(yyscan_t yyscanner, macro_def * const macro, macro_param * args);
/* Enumeration of mathematical operator types; these are used to index the opnames array. */
@@ -5450,8 +5555,7 @@
/*
-=item C<static int
-evaluate_i_i(int a, pir_rel_operator op, double b)>
+=item C<static int evaluate_i_i(int a, pir_rel_operator op, int b)>
Compare C<a> with C<b> according to the relational operator C<op>.
Wrapper for C<evaluate_n_n>, which takes arguments of type double.
@@ -5467,8 +5571,7 @@
/*
-=item C<static int
-evaluate_n_i(int a, pir_rel_operator op, double b)>
+=item C<static int evaluate_n_i(double a, pir_rel_operator op, int b)>
Compare C<a> with C<b> according to the relational operator C<op>.
Wrapper for C<evaluate_n_n>, which takes arguments of type double.
@@ -5484,8 +5587,7 @@
/*
-=item C<static int
-evaluate_i_n(int a, pir_rel_operator op, double b)>
+=item C<static int evaluate_i_n(int a, pir_rel_operator op, double b)>
Compare C<a> with C<b> according to the relational operator C<op>.
Wrapper for C<evaluate_n_n>, which takes arguments of type double.
@@ -5633,8 +5735,8 @@
/*
-=item C<static char *
-concat_strings(lexer_state * const lexer, char const *a, char const *b)>
+=item C<static char * concat_strings(lexer_state * const lexer, char const * a,
+char const * b)>
Concatenates two strings into a new buffer. The new string is returned.
@@ -5659,9 +5761,8 @@
/*
-=item C<static void
-create_if_instr(lexer_state *lexer, int invert, int hasnull,
- char * const name, char * const label)>
+=item C<static void create_if_instr(lexer_state * const lexer, int invert, int
+hasnull, char const * const name, char const * const label)>
Create an C<if> or C<unless> instruction; if C<invert> is non-zero (true), the
C<if> instruction is inverted, effectively becoming C<unless>.
@@ -5908,8 +6009,7 @@
/*
-=item C<static void
-do_strength_reduction(lexer_state * const lexer)>
+=item C<static void do_strength_reduction(lexer_state * const lexer)>
Implement strength reduction for the math operators C<add>, C<sub>, C<mul>, C<div> and C<fdiv>.
If the current instruction is any of these, then the first two operands are checked; if both
@@ -6043,8 +6143,8 @@
/*
-=item C<static void
-check_first_arg_direction(lexer_state * const lexer, char * const opname)>
+=item C<static void check_first_arg_direction(lexer_state * const lexer, char
+const * const opname)>
This function checks the first argument's direction of the op C<opname>.
If the direction is not C<OUT>, a syntax error is emitted. This function assumes
@@ -6217,8 +6317,8 @@
/*
-=item C<static void
-undeclared_symbol(lexer_state * const lexer, char * const symbol)>
+=item C<static void undeclared_symbol(lexer_state * const lexer, char const *
+const symbol)>
Report an error message saying that C<symbol> was not declared. Then test
whether the symbol is perhaps a PASM register identifier. The user may have
Modified: branches/boehm_gc_2/compilers/pirc/src/pirpcc.c
==============================================================================
--- branches/boehm_gc_2/compilers/pirc/src/pirpcc.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/pirc/src/pirpcc.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -25,14 +25,163 @@
#include "parrot/oplib/ops.h"
+/* HEADERIZER HFILE: compilers/pirc/src/pirpcc.h */
+
+/* HEADERIZER BEGIN: static */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+
+static void add_alias_operand(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(PMC *array),
+ int index,
+ ARGIN(char const * const alias))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(4);
+
+static void arguments_to_operands(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(argument * const args),
+ unsigned num_arguments)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+static int calculate_pcc_argument_flags(ARGIN(argument * const arg))
+ __attribute__nonnull__(1);
+
+static int calculate_pcc_target_flags(ARGIN(target * const result))
+ __attribute__nonnull__(1);
+
+static void convert_nci_call(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(invocation * const inv))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+static void convert_pcc_call(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(invocation * const inv))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+static void convert_pcc_methodcall(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(invocation * const inv))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+static void convert_pcc_methodtailcall(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(invocation * const inv))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+static void convert_pcc_return(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(invocation * const inv))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+static void convert_pcc_tailcall(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(invocation * const inv))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+static void convert_pcc_yield(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(invocation * const inv))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+static int generate_signature_pmc(
+ ARGIN(lexer_state * const lexer),
+ unsigned size)
+ __attribute__nonnull__(1);
+
+PARROT_CANNOT_RETURN_NULL
+static target * generate_unique_pir_reg(
+ ARGIN(lexer_state * const lexer),
+ pir_type type)
+ __attribute__nonnull__(1);
+
+PARROT_CANNOT_RETURN_NULL
+static target * get_invoked_sub(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(target * const sub))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+static void save_global_reference(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(instruction * const instr),
+ ARGIN(char const * const label))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3);
+
+static void targets_to_operands(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(target * const targets),
+ unsigned num_targets)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+#define ASSERT_ARGS_add_alias_operand __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(array) \
+ , PARROT_ASSERT_ARG(alias))
+#define ASSERT_ARGS_arguments_to_operands __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(args))
+#define ASSERT_ARGS_calculate_pcc_argument_flags __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(arg))
+#define ASSERT_ARGS_calculate_pcc_target_flags __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(result))
+#define ASSERT_ARGS_convert_nci_call __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(inv))
+#define ASSERT_ARGS_convert_pcc_call __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(inv))
+#define ASSERT_ARGS_convert_pcc_methodcall __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(inv))
+#define ASSERT_ARGS_convert_pcc_methodtailcall __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(inv))
+#define ASSERT_ARGS_convert_pcc_return __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(inv))
+#define ASSERT_ARGS_convert_pcc_tailcall __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(inv))
+#define ASSERT_ARGS_convert_pcc_yield __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(inv))
+#define ASSERT_ARGS_generate_signature_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_generate_unique_pir_reg __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_get_invoked_sub __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(sub))
+#define ASSERT_ARGS_save_global_reference __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(instr) \
+ , PARROT_ASSERT_ARG(label))
+#define ASSERT_ARGS_targets_to_operands __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(targets))
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+/* HEADERIZER END: static */
/*
=over 4
-=item C<static int
-calculate_pcc_target_flags(target * const result)>
+=item C<static int calculate_pcc_target_flags(target * const result)>
Calculate Parrot Calling Conventions flags for the target node
C<result>.
@@ -41,7 +190,9 @@
*/
static int
-calculate_pcc_target_flags(target * const result) {
+calculate_pcc_target_flags(ARGIN(target * const result))
+{
+ ASSERT_ARGS(calculate_pcc_target_flags)
int flag = 0;
@@ -66,8 +217,7 @@
/*
-=item C<static int
-calculate_pcc_argument_flags(argument * const arg)>
+=item C<static int calculate_pcc_argument_flags(argument * const arg)>
Calculate the Parrot Calling Conventions flags for the
argument C<arg>. An int encoding the flags is returned.
@@ -76,7 +226,9 @@
*/
static int
-calculate_pcc_argument_flags(argument * const arg) {
+calculate_pcc_argument_flags(ARGIN(argument * const arg))
+{
+ ASSERT_ARGS(calculate_pcc_argument_flags)
int flag = 0;
switch (arg->value->type) {
@@ -110,8 +262,8 @@
/*
-=item C<static target *
-generate_unique_pir_reg(lexer_state * const lexer, pir_type type)>
+=item C<static target * generate_unique_pir_reg(lexer_state * const lexer,
+pir_type type)>
Generate a unique, temporary PIR register of type C<type>. It uses the C<reg>
constructor to create a target node, and using C<pir_reg_generator>
@@ -123,16 +275,20 @@
=cut
*/
+PARROT_CANNOT_RETURN_NULL
static target *
-generate_unique_pir_reg(lexer_state * const lexer, pir_type type) {
+generate_unique_pir_reg(ARGIN(lexer_state * const lexer), pir_type type)
+{
+ ASSERT_ARGS(generate_unique_pir_reg)
+
return new_reg(lexer, type, --lexer->pir_reg_generator);
}
/*
-=item C<static int
-generate_signature_pmc(lexer_state * const lexer, unsigned size)>
+=item C<static int generate_signature_pmc(lexer_state * const lexer, unsigned
+size)>
Create a FixedIntegerArray PMC object that encodes the types and flags
of parameters and add it to the PBC constant table. The index in that
@@ -142,12 +298,15 @@
*/
static int
-generate_signature_pmc(lexer_state * const lexer, unsigned size) {
+generate_signature_pmc(ARGIN(lexer_state * const lexer), unsigned size)
+{
+ ASSERT_ARGS(generate_signature_pmc)
+
PMC *fixed_int_array;
int array_index;
/* flags and types are encoded in a FixedIntegerArray PMC */
- fixed_int_array = pmc_new(lexer->interp, enum_class_FixedIntegerArray);
+ fixed_int_array = Parrot_pmc_new(lexer->interp, enum_class_FixedIntegerArray);
if (size > 0) /* can't resize a fixed integer array to 0 elements, default size is 0. */
VTABLE_set_integer_native(lexer->interp, fixed_int_array, size);
@@ -161,8 +320,7 @@
/*
-=item C<void
-emit_sub_epilogue(lexer_state * const lexer)>
+=item C<void emit_sub_epilogue(lexer_state * const lexer)>
Emit final instructions for the current subroutine. In case
this is a C<:main> sub, the "end" instruction is emitted,
@@ -172,7 +330,9 @@
*/
void
-emit_sub_epilogue(lexer_state * const lexer) {
+emit_sub_epilogue(ARGIN(lexer_state * const lexer))
+{
+ ASSERT_ARGS(emit_sub_epilogue)
if (TEST_FLAG(lexer->subs->flags, PIRC_SUB_FLAG_MAIN))
new_sub_instr(lexer, PARROT_OP_end, "end", 0);
@@ -188,8 +348,8 @@
/*
-=item C<static void
-add_alias_operand(lexer_state * const lexer, PMC *array, int index, char const * const alias)>
+=item C<static void add_alias_operand(lexer_state * const lexer, PMC *array, int
+index, char const * const alias)>
Add an alias operand to current instruction; C<array> is the signature
array, which must hold the right flags for this new operand (at position C<index>).
@@ -199,8 +359,11 @@
*/
static void
-add_alias_operand(lexer_state * const lexer, PMC *array, int index, char const * const alias) {
- PARROT_ASSERT(alias);
+add_alias_operand(ARGIN(lexer_state * const lexer),
+ ARGIN(PMC *array), int index,
+ ARGIN(char const * const alias))
+{
+ ASSERT_ARGS(add_alias_operand)
/* set flags for being a string constant, and being a :named operand. */
VTABLE_set_integer_keyed_int(lexer->interp, array, index, PARROT_ARG_NAME | PARROT_ARG_SC);
push_operand(lexer, expr_from_string(lexer, alias));
@@ -209,8 +372,8 @@
/*
-=item C<static void
-targets_to_operands(lexer_state * const lexer, target * const targets)>
+=item C<static void targets_to_operands(lexer_state * const lexer, target *
+const targets, unsigned num_targets)>
Convert a list of C<target> nodes into operands. Before the operands
are added to the I<current> instruction, a FixedIntegerArray is created,
@@ -231,7 +394,11 @@
*/
static void
-targets_to_operands(lexer_state * const lexer, target * const targets, unsigned num_targets) {
+targets_to_operands(ARGIN(lexer_state * const lexer),
+ ARGIN(target * const targets), unsigned num_targets)
+{
+ ASSERT_ARGS(targets_to_operands)
+
target *iter;
int array_index;
PMC *signature_array;
@@ -291,8 +458,8 @@
/*
-=item C<static void
-arguments_to_operands(lexer_state * const lexer, argument * const args)>
+=item C<static void arguments_to_operands(lexer_state * const lexer, argument *
+const args, unsigned num_arguments)>
Convert a list of C<argument> nodes into operands. Before the operands are
added to the I<current> instruction, a FixedIntegerArray PMC is created
@@ -303,7 +470,11 @@
*/
static void
-arguments_to_operands(lexer_state * const lexer, argument * const args, unsigned num_arguments) {
+arguments_to_operands(ARGIN(lexer_state * const lexer),
+ ARGIN(argument * const args), unsigned num_arguments)
+{
+ ASSERT_ARGS(arguments_to_operands)
+
argument *argiter;
int array_index;
unsigned i;
@@ -347,8 +518,8 @@
/*
-=item C<void
-generate_parameters_instr(lexer_state * const lexer, unsigned num_parameters)>
+=item C<void generate_parameters_instr(lexer_state * const lexer, unsigned
+num_parameters)>
Generate the "get_params" instruction, taking <num_parameters> variable arguments;
this is the number of parameters of this function.
@@ -357,7 +528,9 @@
*/
void
-generate_parameters_instr(lexer_state * const lexer, unsigned num_parameters) {
+generate_parameters_instr(ARGIN(lexer_state * const lexer), unsigned num_parameters)
+{
+ ASSERT_ARGS(generate_parameters_instr)
if (TEST_FLAG(CURRENT_SUB(lexer)->flags , (PIRC_SUB_FLAG_METHOD | PIRC_SUB_FLAG_VTABLE))) {
++num_parameters; /* didn't count implicit "self" parameter yet. */
}
@@ -372,8 +545,8 @@
/*
-=item C<void
-generate_getresults_instr(lexer_state * const lexer, target * const targetlist)>
+=item C<void generate_getresults_instr(lexer_state * const lexer, target * const
+targetlist)>
Generate instruction for the C<.get_results> statement.
@@ -381,7 +554,10 @@
*/
void
-generate_getresults_instr(lexer_state * const lexer, target * const targetlist) {
+generate_getresults_instr(ARGIN(lexer_state * const lexer),
+ ARGIN(target * const targetlist))
+{
+ ASSERT_ARGS(generate_getresults_instr)
/* add this point we know that there's only 1 target, as that's the convention for
* exception handlers:
*
@@ -397,9 +573,8 @@
/*
-=item C<static void
-save_global_reference(lexer_state * const lexer, instruction * const instr,
- char const * const label)>
+=item C<static void save_global_reference(lexer_state * const lexer, instruction
+* const instr, char const * const label)>
Store the instruction C<instr>, which references the global label C<label> in a list.
After the parse phase, this instruction can be patched, if C<label> can be resolved
@@ -409,10 +584,12 @@
*/
static void
-save_global_reference(lexer_state * const lexer, instruction * const instr,
- char const * const label)
-
+save_global_reference(ARGIN(lexer_state * const lexer),
+ ARGIN(instruction * const instr),
+ ARGIN(char const * const label))
{
+ ASSERT_ARGS(save_global_reference)
+
global_fixup *ref = pir_mem_allocate_zeroed_typed(lexer, global_fixup);
ref->instr = instr;
@@ -425,8 +602,8 @@
/*
-=item C<static target *
-get_invoked_sub(lexer_state * const lexer, target * const sub)>
+=item C<static target * get_invoked_sub(lexer_state * const lexer, target *
+const sub)>
Return a C<target> node that represents the sub to invoke.
If C<sub> is a register, that is returned. If it's a declared C<.local>,
@@ -439,8 +616,12 @@
=cut
*/
+PARROT_CANNOT_RETURN_NULL
static target *
-get_invoked_sub(lexer_state * const lexer, target * const sub) {
+get_invoked_sub(ARGIN(lexer_state * const lexer),
+ ARGIN(target * const sub))
+{
+ ASSERT_ARGS(get_invoked_sub)
target *subreg = NULL;
symbol *sym = NULL;
global_label *glob = NULL;
@@ -494,8 +675,8 @@
/*
-=item C<static void
-convert_pcc_call(lexer_state * const lexer, invocation * const inv)>
+=item C<static void convert_pcc_call(lexer_state * const lexer, invocation *
+const inv)>
Generate instructions for a normal invocation using the Parrot Calling
Conventions (PCC). This is the sequence of the following instructions:
@@ -517,7 +698,11 @@
*/
static void
-convert_pcc_call(lexer_state * const lexer, invocation * const inv) {
+convert_pcc_call(ARGIN(lexer_state * const lexer),
+ ARGIN(invocation * const inv))
+{
+ ASSERT_ARGS(convert_pcc_call)
+
target *sub;
new_sub_instr(lexer, PARROT_OP_set_args_pc, "set_args_pc", inv->num_arguments);
@@ -541,8 +726,8 @@
/*
-=item C<static void
-convert_pcc_tailcall(lexer_state * const lexer, invocation * const inv)>
+=item C<static void convert_pcc_tailcall(lexer_state * const lexer, invocation *
+const inv)>
Generate instructions for a tailcall using the Parrot Calling Conventions (PCC).
The sequence of instructions is:
@@ -554,7 +739,11 @@
*/
static void
-convert_pcc_tailcall(lexer_state * const lexer, invocation * const inv) {
+convert_pcc_tailcall(ARGIN(lexer_state * const lexer),
+ ARGIN(invocation * const inv))
+{
+ ASSERT_ARGS(convert_pcc_tailcall)
+
target *sub;
new_sub_instr(lexer, PARROT_OP_set_args_pc, "set_args_pc", inv->num_arguments);
@@ -568,8 +757,8 @@
/*
-=item C<static void
-convert_pcc_return(lexer_state * const lexer, invocation * const inv)>
+=item C<static void convert_pcc_return(lexer_state * const lexer, invocation *
+const inv)>
Generate instructions for a normal return statement using the Parrot Calling
Conventions (PCC). The sequence of instructions is:
@@ -581,7 +770,11 @@
*/
static void
-convert_pcc_return(lexer_state * const lexer, invocation * const inv) {
+convert_pcc_return(ARGIN(lexer_state * const lexer),
+ ARGIN(invocation * const inv))
+{
+ ASSERT_ARGS(convert_pcc_return)
+
new_sub_instr(lexer, PARROT_OP_set_returns_pc, "set_returns_pc", inv->num_arguments);
arguments_to_operands(lexer, inv->arguments, inv->num_arguments);
new_sub_instr(lexer, PARROT_OP_returncc, "returncc", 0);
@@ -589,8 +782,8 @@
/*
-=item C<static void
-convert_nci_call(lexer_state * const lexer, invocation * const inv)>
+=item C<static void convert_nci_call(lexer_state * const lexer, invocation *
+const inv)>
Generate instructions for a function invocation using the Native Call
Interface (NCI). The sequence of instructions is:
@@ -603,7 +796,11 @@
*/
static void
-convert_nci_call(lexer_state * const lexer, invocation * const inv) {
+convert_nci_call(ARGIN(lexer_state * const lexer),
+ ARGIN(invocation * const inv))
+{
+ ASSERT_ARGS(convert_nci_call)
+
target *sub;
new_sub_instr(lexer, PARROT_OP_set_args_pc, "set_args_pc", inv->num_arguments);
@@ -620,8 +817,8 @@
/*
-=item C<static void
-convert_pcc_yield(lexer_state * const lexer, invocation * const inv)>
+=item C<static void convert_pcc_yield(lexer_state * const lexer, invocation *
+const inv)>
Generate instructions for a yield statement using the Parrot Calling Conventions.
The sequence of instructions is:
@@ -633,7 +830,11 @@
*/
static void
-convert_pcc_yield(lexer_state * const lexer, invocation * const inv) {
+convert_pcc_yield(ARGIN(lexer_state * const lexer),
+ ARGIN(invocation * const inv))
+{
+ ASSERT_ARGS(convert_pcc_yield)
+
new_sub_instr(lexer, PARROT_OP_set_returns_pc, "set_returns_pc", inv->num_arguments);
arguments_to_operands(lexer, inv->arguments, inv->num_arguments);
new_sub_instr(lexer, PARROT_OP_yield, "yield", 0);
@@ -642,8 +843,8 @@
/*
-=item C<static void
-convert_pcc_methodcall(lexer_state * const lexer, invocation * const inv)>
+=item C<static void convert_pcc_methodcall(lexer_state * const lexer, invocation
+* const inv)>
Generate instructions for a method call using the Parrot Calling Conventions (PCC).
The sequence of instructions is:
@@ -656,7 +857,11 @@
*/
static void
-convert_pcc_methodcall(lexer_state * const lexer, invocation * const inv) {
+convert_pcc_methodcall(ARGIN(lexer_state * const lexer),
+ ARGIN(invocation * const inv))
+{
+ ASSERT_ARGS(convert_pcc_methodcall)
+
/* in a methodcall, the invocant object is passed as the first argument */
unshift_arg(inv, new_argument(lexer, expr_from_target(lexer, inv->sub)));
new_sub_instr(lexer, PARROT_OP_set_args_pc, "set_args_pc", inv->num_arguments);
@@ -673,8 +878,8 @@
/*
-=item C<static void
-convert_pcc_methodtailcall(lexer_state * const lexer, invocation * const inv)>
+=item C<static void convert_pcc_methodtailcall(lexer_state * const lexer,
+invocation * const inv)>
Generate instructions for a method tailcall, using the Parrot Calling Conventions (PCC).
The sequence of instructions is:
@@ -686,7 +891,11 @@
*/
static void
-convert_pcc_methodtailcall(lexer_state * const lexer, invocation * const inv) {
+convert_pcc_methodtailcall(ARGIN(lexer_state * const lexer),
+ ARGIN(invocation * const inv))
+{
+ ASSERT_ARGS(convert_pcc_methodtailcall)
+
unshift_arg(inv, new_argument(lexer, expr_from_target(lexer, inv->sub)));
new_sub_instr(lexer, PARROT_OP_set_args_pc, "set_args_pc", inv->num_arguments);
@@ -712,8 +921,8 @@
/*
-=item C<void
-convert_inv_to_instr(lexer_state * const lexer, invocation * const inv)>
+=item C<void convert_inv_to_instr(lexer_state * const lexer, invocation * const
+inv)>
Convert an C<invocation> structure into a series of instructions. This is the
dispatch function, which calls the appropriate conversion function, based
@@ -723,7 +932,10 @@
*/
void
-convert_inv_to_instr(lexer_state * const lexer, invocation * const inv) {
+convert_inv_to_instr(ARGIN(lexer_state * const lexer),
+ ARGIN(invocation * const inv))
+{
+ ASSERT_ARGS(convert_inv_to_instr)
switch (inv->type) {
case CALL_PCC:
convert_pcc_call(lexer, inv);
Modified: branches/boehm_gc_2/compilers/pirc/src/pirpcc.h
==============================================================================
--- branches/boehm_gc_2/compilers/pirc/src/pirpcc.h Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/pirc/src/pirpcc.h Mon Feb 22 12:30:02 2010 (r44294)
@@ -9,10 +9,41 @@
#include "pircompunit.h"
#include "pircompiler.h"
-void convert_inv_to_instr(struct lexer_state * const lexer, invocation * const inv);
-void generate_parameters_instr(struct lexer_state * const lexer, unsigned num_parameters);
-void generate_getresults_instr(struct lexer_state * const lexer, target * const targetlist);
-void emit_sub_epilogue(struct lexer_state * const lexer);
+/* HEADERIZER BEGIN: compilers/pirc/src/pirpcc.c */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+
+void convert_inv_to_instr(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(invocation * const inv))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void emit_sub_epilogue(ARGIN(lexer_state * const lexer))
+ __attribute__nonnull__(1);
+
+void generate_getresults_instr(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(target * const targetlist))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void generate_parameters_instr(
+ ARGIN(lexer_state * const lexer),
+ unsigned num_parameters)
+ __attribute__nonnull__(1);
+
+#define ASSERT_ARGS_convert_inv_to_instr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(inv))
+#define ASSERT_ARGS_emit_sub_epilogue __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_generate_getresults_instr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(targetlist))
+#define ASSERT_ARGS_generate_parameters_instr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+/* HEADERIZER END: compilers/pirc/src/pirpcc.c */
#endif /* PARROT_PIR_PIRPCC_H_GUARD */
Modified: branches/boehm_gc_2/compilers/pirc/src/pirregalloc.c
==============================================================================
--- branches/boehm_gc_2/compilers/pirc/src/pirregalloc.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/pirc/src/pirregalloc.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -47,8 +47,7 @@
/*
-=item C<static void
-reset_register_count(lsr_allocator * const lsr)>
+=item C<static void reset_register_count(lsr_allocator * const lsr)>
Reset the register counters; there's one counter for each register
type (string, num, int, pmc).
@@ -57,7 +56,9 @@
*/
static void
-reset_register_count(lsr_allocator * const lsr) {
+reset_register_count(ARGIN(lsr_allocator * const lsr))
+{
+ ASSERT_ARGS(reset_register_count)
int i;
/* the "r" field keeps track of the number of registers that must be allocated by
* parrot. In the original implementation, "r" is constant, and indicates the number
@@ -70,10 +71,85 @@
lsr->r[i] = 1;
}
+/* HEADERIZER HFILE: compilers/pirc/src/pirregalloc.h */
+
+/* HEADERIZER BEGIN: static */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+
+static void add_free_reg(
+ ARGIN(lsr_allocator * const lsr),
+ unsigned regno,
+ pir_type type)
+ __attribute__nonnull__(1);
+
+static void add_interval_to_active(
+ ARGIN(lsr_allocator *lsr),
+ ARGIN(live_interval * const i),
+ pir_type type)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+static void add_live_interval(
+ ARGIN(lsr_allocator * const lsr),
+ ARGIN(live_interval * const i),
+ pir_type type)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+static void cache_interval_object(
+ ARGIN(lsr_allocator * const lsr),
+ ARGIN(live_interval * interval))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+static void expire_old_intervals(
+ ARGIN(lsr_allocator * const lsr),
+ ARGIN(live_interval * const i),
+ pir_type type)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+static unsigned get_free_reg(
+ ARGIN(lsr_allocator * const lsr),
+ pir_type type)
+ __attribute__nonnull__(1);
+
+static unsigned lengthi(ARGIN_NULLOK(live_interval *list));
+static void remove_from_active(ARGMOD(live_interval *i))
+ __attribute__nonnull__(1)
+ FUNC_MODIFIES(*i);
+
+static void reset_register_count(ARGIN(lsr_allocator * const lsr))
+ __attribute__nonnull__(1);
+
+#define ASSERT_ARGS_add_free_reg __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lsr))
+#define ASSERT_ARGS_add_interval_to_active __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lsr) \
+ , PARROT_ASSERT_ARG(i))
+#define ASSERT_ARGS_add_live_interval __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lsr) \
+ , PARROT_ASSERT_ARG(i))
+#define ASSERT_ARGS_cache_interval_object __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lsr) \
+ , PARROT_ASSERT_ARG(interval))
+#define ASSERT_ARGS_expire_old_intervals __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lsr) \
+ , PARROT_ASSERT_ARG(i))
+#define ASSERT_ARGS_get_free_reg __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lsr))
+#define ASSERT_ARGS_lengthi __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_remove_from_active __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(i))
+#define ASSERT_ARGS_reset_register_count __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lsr))
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+/* HEADERIZER END: static */
+
/*
-=item C<lsr_allocator *
-new_linear_scan_register_allocator(struct lexer_state * lexer)>
+=item C<lsr_allocator * new_linear_scan_register_allocator(struct lexer_state
+*lexer)>
Constructor for a linear scan register allocator.
Initializes the allocator, and returns it.
@@ -81,8 +157,11 @@
=cut
*/
+PARROT_CAN_RETURN_NULL
lsr_allocator *
-new_linear_scan_register_allocator(struct lexer_state *lexer) {
+new_linear_scan_register_allocator(ARGIN_NULLOK(struct lexer_state *lexer))
+{
+ ASSERT_ARGS(new_linear_scan_register_allocator)
lsr_allocator *lsr = (lsr_allocator *)mem_sys_allocate_zeroed(sizeof (lsr_allocator));
lsr->lexer = lexer;
@@ -97,7 +176,8 @@
*/
void print_list(char *msg, live_interval *i);
void
-print_list(char *msg, live_interval *i) {
+print_list(ARGIN(char *msg), ARGIN(live_interval *i))
+{
fprintf(stderr, "%s: ", msg);
while (i) {
fprintf(stderr, "[%d] ", i->endpoint);
@@ -108,8 +188,7 @@
/*
-=item C<void
-destroy_linear_scan_register_allocator(lsr_allocator *lsr)>
+=item C<void destroy_linear_scan_register_allocator(lsr_allocator *lsr)>
Destructor for linear scan register allocator. All live_interval
objects are destroyed as well.
@@ -118,7 +197,9 @@
*/
void
-destroy_linear_scan_register_allocator(lsr_allocator *lsr) {
+destroy_linear_scan_register_allocator(ARGMOD(lsr_allocator *lsr))
+{
+ ASSERT_ARGS(destroy_linear_scan_register_allocator)
pir_type type;
live_interval *i;
@@ -143,12 +224,18 @@
/*
+=item C<static unsigned lengthi(live_interval *list)>
+
XXX debug function only.
Return length of list C<list>
+=cut
+
*/
static unsigned
-lengthi(live_interval *list) {
+lengthi(ARGIN_NULLOK(live_interval *list))
+{
+ ASSERT_ARGS(lengthi)
unsigned len = 0;
while (list) {
@@ -160,8 +247,8 @@
/*
-=item C<static void
-add_live_interval(lsr_allocator * const lsr, live_interval * const i, pir_type type)>
+=item C<static void add_live_interval(lsr_allocator * const lsr, live_interval *
+const i, pir_type type)>
Add live_interval C<i> to the list; this list is sorted on increasing
start point.
@@ -170,7 +257,10 @@
*/
static void
-add_live_interval(lsr_allocator * const lsr, live_interval * const i, pir_type type) {
+add_live_interval(ARGIN(lsr_allocator * const lsr),
+ ARGIN(live_interval * const i), pir_type type)
+{
+ ASSERT_ARGS(add_live_interval)
live_interval *iter = lsr->intervals[type];
/* if there's no interval for the specified type, insert i as the first one and return */
@@ -234,8 +324,8 @@
/*
-=item C<live_interval *
-new_live_interval(lsr_allocator * const lsr, unsigned firstuse_location, pir_type type)>
+=item C<live_interval * new_live_interval(lsr_allocator * const lsr, unsigned
+firstuse_location, pir_type type)>
Constructor for a live_interval struct object. After creating the new interval object,
its startpoint and endpoint are initialized to the value in C<firstuse_location>. Note
@@ -247,10 +337,14 @@
=cut
*/
+PARROT_CAN_RETURN_NULL
PARROT_MALLOC
PARROT_WARN_UNUSED_RESULT
live_interval *
-new_live_interval(lsr_allocator * const lsr, unsigned firstuse_location, pir_type type) {
+new_live_interval(ARGIN(lsr_allocator * const lsr),
+ unsigned firstuse_location, pir_type type)
+{
+ ASSERT_ARGS(new_live_interval)
live_interval *i;
/* check whether there's an interval object that we can re-use, to prevent
* memory malloc() and free()s.
@@ -283,8 +377,8 @@
/*
-=item C<static void
-add_interval_to_active(lsr_allocator *lsr, live_interval * i, pir_type type)>
+=item C<static void add_interval_to_active(lsr_allocator *lsr, live_interval *
+const i, pir_type type)>
Add interval C<i> to the list of active intervals; the list is sorted
on increasing endpoint.
@@ -293,7 +387,10 @@
*/
static void
-add_interval_to_active(lsr_allocator *lsr, live_interval * const i, pir_type type) {
+add_interval_to_active(ARGIN(lsr_allocator *lsr),
+ ARGIN(live_interval * const i), pir_type type)
+{
+ ASSERT_ARGS(add_interval_to_active)
live_interval *iter = lsr->active[type];
/* if there's no active intervals, set i as first */
@@ -351,8 +448,7 @@
/*
-=item C<static unsigned
-get_free_reg(lsr_allocator * const lsr, pir_type type)>
+=item C<static unsigned get_free_reg(lsr_allocator * const lsr, pir_type type)>
Allocate a new register; if there's any old registers to be reused, return
such a second-hand register; otherwise, allocate a brand new one.
@@ -361,7 +457,9 @@
*/
static unsigned
-get_free_reg(lsr_allocator * const lsr, pir_type type) {
+get_free_reg(ARGIN(lsr_allocator * const lsr), pir_type type)
+{
+ ASSERT_ARGS(get_free_reg)
/* if there's any second hand register for the requested type, return that. */
if (lsr->free_regs[type]) {
free_reg *available = lsr->free_regs[type];
@@ -388,8 +486,8 @@
/*
-=item C<static void
-add_free_reg(lsr_allocator * const lsr, unsigned regno, pir_type type)>
+=item C<static void add_free_reg(lsr_allocator * const lsr, unsigned regno,
+pir_type type)>
Add register C<regno> to the list of free regs that can be reuse.
@@ -397,7 +495,10 @@
*/
static void
-add_free_reg(lsr_allocator * const lsr, unsigned regno, pir_type type) {
+add_free_reg(ARGIN(lsr_allocator * const lsr), unsigned regno, pir_type type)
+{
+ ASSERT_ARGS(add_free_reg)
+
free_reg *reg;
/* fprintf(stderr, "add_free_reg(): %u\n", regno); */
@@ -422,8 +523,7 @@
/*
-=item C<static void
-remove_from_active(live_interval *i)>
+=item C<static void remove_from_active(live_interval *i)>
Remove interval C<i> from the list of active intervals.
@@ -431,7 +531,9 @@
*/
static void
-remove_from_active(live_interval *i) {
+remove_from_active(ARGMOD(live_interval *i))
+{
+ ASSERT_ARGS(remove_from_active)
/* if it has a previous node, that previous node's next is set
* to i's next.
*/
@@ -448,8 +550,8 @@
/*
-=item C<static void
-expire_old_intervals(lsr_allocator * const lsr, live_interval * i, pir_type type)>
+=item C<static void expire_old_intervals(lsr_allocator * const lsr,
+live_interval * const i, pir_type type)>
Go over all active intervals; if the endpoint of one of them is >= than
C<i>'s start point, the action is aborted. This is why the C<active> list must be
@@ -460,7 +562,11 @@
*/
static void
-expire_old_intervals(lsr_allocator * const lsr, live_interval * const i, pir_type type) {
+expire_old_intervals(ARGIN(lsr_allocator * const lsr),
+ ARGIN(live_interval * const i), pir_type type)
+{
+ ASSERT_ARGS(expire_old_intervals)
+
live_interval *j;
for (j = lsr->active[type]; j != NULL; j = j->nexta) {
@@ -479,8 +585,8 @@
/*
-=item C<static void
-cache_interval_objects(lsr_allocator * const lsr, live_interval * interval)>
+=item C<static void cache_interval_object(lsr_allocator * const lsr,
+live_interval * interval)>
Store the interval C<interval> on a caching list; whenever a new C<live_interval>
object is requested, these interval objects can be re-used, instead of malloc()ing
@@ -490,15 +596,17 @@
*/
static void
-cache_interval_object(lsr_allocator * const lsr, live_interval * interval) {
+cache_interval_object(ARGIN(lsr_allocator * const lsr),
+ ARGIN(live_interval * interval))
+{
+ ASSERT_ARGS(cache_interval_object)
interval->nextc = lsr->cached_intervals;
lsr->cached_intervals = interval;
}
/*
-=item C<void
-linear_scan_register_allocation(lsr_allocator * const lsr)>
+=item C<void linear_scan_register_allocation(lsr_allocator * const lsr)>
Go over all live intervals; before handling any interval, expire all old ones;
they might have expired (see expire_old_intervals()). Then, allocate a new
@@ -508,7 +616,9 @@
*/
void
-linear_scan_register_allocation(lsr_allocator * const lsr) {
+linear_scan_register_allocation(ARGIN(lsr_allocator * const lsr))
+{
+ ASSERT_ARGS(linear_scan_register_allocation)
live_interval * i;
pir_type type = 0; /* types run from 0 to 4; see pircompunit.h */
Modified: branches/boehm_gc_2/compilers/pirc/src/pirregalloc.h
==============================================================================
--- branches/boehm_gc_2/compilers/pirc/src/pirregalloc.h Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/pirc/src/pirregalloc.h Mon Feb 22 12:30:02 2010 (r44294)
@@ -84,13 +84,41 @@
} lsr_allocator;
-lsr_allocator *new_linear_scan_register_allocator(struct lexer_state *lexer);
+/* HEADERIZER BEGIN: compilers/pirc/src/pirregalloc.c */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-void destroy_linear_scan_register_allocator(lsr_allocator *lsr);
-
-live_interval * new_live_interval(lsr_allocator * const lsr, unsigned firstuse, pir_type type);
-
-void linear_scan_register_allocation(lsr_allocator * const lsr);
+void destroy_linear_scan_register_allocator(ARGMOD(lsr_allocator *lsr))
+ __attribute__nonnull__(1)
+ FUNC_MODIFIES(*lsr);
+
+void linear_scan_register_allocation(ARGIN(lsr_allocator * const lsr))
+ __attribute__nonnull__(1);
+
+PARROT_CAN_RETURN_NULL
+lsr_allocator * new_linear_scan_register_allocator(
+ ARGIN_NULLOK(struct lexer_state *lexer));
+
+PARROT_CAN_RETURN_NULL
+PARROT_MALLOC
+PARROT_WARN_UNUSED_RESULT
+live_interval * new_live_interval(
+ ARGIN(lsr_allocator * const lsr),
+ unsigned firstuse_location,
+ pir_type type)
+ __attribute__nonnull__(1);
+
+#define ASSERT_ARGS_destroy_linear_scan_register_allocator \
+ __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lsr))
+#define ASSERT_ARGS_linear_scan_register_allocation \
+ __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lsr))
+#define ASSERT_ARGS_new_linear_scan_register_allocator \
+ __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_new_live_interval __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lsr))
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+/* HEADERIZER END: compilers/pirc/src/pirregalloc.c */
#endif /* PARROT_PIR_PIRREGALLOC_H_GUARD */
Modified: branches/boehm_gc_2/compilers/pirc/src/pirsymbol.c
==============================================================================
--- branches/boehm_gc_2/compilers/pirc/src/pirsymbol.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/pirc/src/pirsymbol.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -11,7 +11,6 @@
#include <string.h>
#include <stdio.h>
-
/*
=head1 NAME
@@ -49,6 +48,61 @@
*/
+/* HEADERIZER HFILE: compilers/pirc/src/pirsymbol.h */
+
+/* HEADERIZER BEGIN: static */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+static global_label * new_global_label(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const name))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+static local_label * new_local_label(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const name),
+ unsigned offset)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+static pir_reg * new_pir_reg(
+ ARGIN(lexer_state * const lexer),
+ pir_type type,
+ int regno)
+ __attribute__nonnull__(1);
+
+static int next_register(ARGIN(lexer_state * const lexer), pir_type type)
+ __attribute__nonnull__(1);
+
+static int use_register(
+ ARGIN(lexer_state * const lexer),
+ pir_type type,
+ int regno,
+ int pasmregno)
+ __attribute__nonnull__(1);
+
+#define ASSERT_ARGS_new_global_label __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(name))
+#define ASSERT_ARGS_new_local_label __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(name))
+#define ASSERT_ARGS_new_pir_reg __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_next_register __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_use_register __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+/* HEADERIZER END: static */
+
/* Conversion Look-Up Table (CLUT) for pir_type and value_type enums.
@@ -83,8 +137,7 @@
/*
-=item C<static int
-next_register(lexer_state * const lexer, pir_type type)>
+=item C<static int next_register(lexer_state * const lexer, pir_type type)>
Returns a new register of the specified type.
This is the vanilla register allocator.
@@ -93,7 +146,10 @@
*/
static int
-next_register(NOTNULL(lexer_state * const lexer), pir_type type) {
+next_register(ARGIN(lexer_state * const lexer), pir_type type)
+{
+ ASSERT_ARGS(next_register)
+
CURRENT_SUB(lexer)->info.regs_used[type]++; /* count number of registers used */
/* fprintf(stderr, "vanilla reg: %d of type %d\n", lexer->curregister[type], type); */
return lexer->curregister[type]++;
@@ -102,8 +158,8 @@
/*
-=item C<void
-assign_vanilla_register(lexer_state * const lexer, symbol * const sym)>
+=item C<void assign_vanilla_register(lexer_state * const lexer, symbol * const
+sym)>
Assign a new register to symbol C<sym>, and create a new live interval for C<sym>.
@@ -111,7 +167,10 @@
*/
void
-assign_vanilla_register(NOTNULL(lexer_state * const lexer), symbol * const sym) {
+assign_vanilla_register(ARGIN(lexer_state * const lexer),
+ ARGIN(symbol * const sym))
+{
+ ASSERT_ARGS(assign_vanilla_register)
sym->info.color = next_register(lexer, sym->info.type);
/* fprintf(stderr, "assigning vanilla reg %d to symbol %s\n", sym->info.color,
sym->info.id.name);
@@ -135,8 +194,7 @@
/*
-=item C<static unsigned
-get_hashcode(char const * const str, unsigned num_buckets)>
+=item C<unsigned get_hashcode(char const * const str, unsigned num_buckets)>
Calculate the hash code for the string C<str>.
This code is taken from IMCC.
@@ -147,7 +205,9 @@
PARROT_PURE_FUNCTION
PARROT_WARN_UNUSED_RESULT
unsigned
-get_hashcode(NOTNULL(char const * const str), unsigned num_buckets) {
+get_hashcode(ARGIN(char const * const str), unsigned num_buckets)
+{
+ ASSERT_ARGS(get_hashcode)
unsigned long key = 0;
char const *s;
@@ -159,8 +219,8 @@
/*
-=item C<void
-store_bucket(hashtable * const table, bucket * const buck, unsigned long hash)>
+=item C<void store_bucket(hashtable * const table, bucket * const buck, unsigned
+long hash)>
Store the bucket C<buck> in the hashtable C<table> at index C<hash>.
@@ -168,15 +228,17 @@
*/
void
-store_bucket(NOTNULL(hashtable * const table), NOTNULL(bucket * const buck), unsigned long hash) {
+store_bucket(ARGIN(hashtable * const table),
+ ARGIN(bucket * const buck), unsigned long hash)
+{
+ ASSERT_ARGS(store_bucket)
buck->next = table->contents[hash];
table->contents[hash] = buck;
}
/*
-=item C<bucket *
-get_bucket(hashtable * const table, unsigned long hash)>
+=item C<bucket * get_bucket(hashtable * const table, unsigned long hash)>
Return the bucket at hash index C<hash> from the hashtable C<table>.
@@ -186,14 +248,16 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
bucket *
-get_bucket(NOTNULL(hashtable * const table), unsigned long hash) {
+get_bucket(ARGIN(hashtable * const table), unsigned long hash)
+{
+ ASSERT_ARGS(get_bucket)
return table->contents[hash];
}
/*
-=item C<symbol *
-new_symbol(lexer_state * const lexer, char const * const name, pir_type type)>
+=item C<symbol * new_symbol(lexer_state * const lexer, char const * const name,
+pir_type type)>
Create a new symbol node, returns it after initialization.
@@ -203,7 +267,10 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
symbol *
-new_symbol(NOTNULL(lexer_state * const lexer), NOTNULL(char const * const name), pir_type type) {
+new_symbol(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const name), pir_type type)
+{
+ ASSERT_ARGS(new_symbol)
symbol *sym = pir_mem_allocate_zeroed_typed(lexer, symbol);
sym->info.id.name = name;
@@ -216,8 +283,8 @@
/*
-=item C<void
-declare_local(lexer_state * const lexer, pir_type type, symbol * const list)>
+=item C<void declare_local(lexer_state * const lexer, pir_type type, symbol *
+const list)>
Declare the local variables in the list pointed to by C<list>, all of which
are of the type C<type>. The variables are entered into the symbol table for
@@ -228,9 +295,10 @@
*/
void
-declare_local(NOTNULL(lexer_state * const lexer), pir_type type,
- NOTNULL(symbol * const list))
+declare_local(ARGIN(lexer_state * const lexer), pir_type type,
+ ARGIN(symbol * const list))
{
+ ASSERT_ARGS(declare_local)
symbol *iter = list;
hashtable *table = &CURRENT_SUB(lexer)->symbols;
@@ -272,8 +340,7 @@
/*
-=item C<void
-check_unused_symbols(lexer_state * const lexer)>
+=item C<void check_unused_symbols(lexer_state * const lexer)>
Check all subroutines for unused symbols. If a symbol is declared but
never used, a warning message is printed to C<stderr>. If there's
@@ -283,7 +350,9 @@
*/
void
-check_unused_symbols(NOTNULL(lexer_state * const lexer)) {
+check_unused_symbols(ARGIN(lexer_state * const lexer))
+{
+ ASSERT_ARGS(check_unused_symbols)
subroutine *subiter;
/* if there's no subs, just return. */
@@ -317,8 +386,8 @@
/*
-=item C<symbol *
-find_symbol(lexer_state * const lexer, char const * const name)>
+=item C<symbol * find_symbol(lexer_state * const lexer, char const * const
+name)>
Return the node for the symbol or NULL if the symbol
is not defined. If an attempt is made to find a symbol,
@@ -331,7 +400,10 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
symbol *
-find_symbol(NOTNULL(lexer_state * const lexer), NOTNULL(char const * const name)) {
+find_symbol(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const name))
+{
+ ASSERT_ARGS(find_symbol)
hashtable *table = &CURRENT_SUB(lexer)->symbols;
unsigned long hashcode = get_hashcode(name, table->size);
bucket *buck = get_bucket(table, hashcode);
@@ -369,8 +441,8 @@
/*
-=item C<static pir_reg *
-new_pir_reg(lexer_state * const lexer, pir_type type, int regno)>
+=item C<static pir_reg * new_pir_reg(lexer_state * const lexer, pir_type type,
+int regno)>
Create a new PIR register node representing PIR/symbolic register
identified by C<regno> and of type C<type>.
@@ -381,7 +453,9 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static pir_reg *
-new_pir_reg(NOTNULL(lexer_state * const lexer), pir_type type, int regno) {
+new_pir_reg(ARGIN(lexer_state * const lexer), pir_type type, int regno)
+{
+ ASSERT_ARGS(new_pir_reg)
pir_reg *r = pir_mem_allocate_zeroed_typed(lexer, pir_reg);
r->info.type = type;
@@ -395,8 +469,8 @@
/*
-=item C<pir_reg *
-find_register(lexer_state * const lexer, pir_type type, int regno)>
+=item C<pir_reg * find_register(lexer_state * const lexer, pir_type type, int
+regno)>
Find (symbolic) register no. C<regno> of type C<type>. If it's found,
a pointer to it is returned, if not, NULL is returned.
@@ -407,7 +481,9 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
pir_reg *
-find_register(NOTNULL(lexer_state * const lexer), pir_type type, int regno) {
+find_register(ARGIN(lexer_state * const lexer), pir_type type, int regno)
+{
+ ASSERT_ARGS(find_register)
/* should do a binary search. fix later.
*/
pir_reg *iter = CURRENT_SUB(lexer)->registers[type];
@@ -439,8 +515,8 @@
/*
-=item C<static int
-use_register(lexer_state * const lexer, pir_type type, int regno, int pasmregno)>
+=item C<static int use_register(lexer_state * const lexer, pir_type type, int
+regno, int pasmregno)>
This function registers (no pun intended) register C<regno> of type
C<type>; it uses register C<pasmregno>; each subsequent
@@ -454,7 +530,11 @@
*/
static int
-use_register(NOTNULL(lexer_state * const lexer), pir_type type, int regno, int pasmregno) {
+use_register(ARGIN(lexer_state * const lexer), pir_type type,
+ int regno, int pasmregno)
+{
+ ASSERT_ARGS(use_register)
+
pir_reg *reg;
/* create a new node representing this PIR register */
@@ -505,8 +585,7 @@
/*
-=item C<int
-color_reg(struct lexer_state * const lexer, pir_type type, int regno)>
+=item C<int color_reg(lexer_state * const lexer, pir_type type, int regno)>
Find register C<regno> of type C<type>; if it was used before in the
current subroutine, a (pasm) register was already assigned to it, which
@@ -519,7 +598,9 @@
*/
int
-color_reg(NOTNULL(lexer_state * const lexer), pir_type type, int regno) {
+color_reg(ARGIN(lexer_state * const lexer), pir_type type, int regno)
+{
+ ASSERT_ARGS(color_reg)
pir_reg *reg = find_register(lexer, type, regno);
/* was the register already used, then it was already colored by
@@ -555,8 +636,8 @@
/*
-=item C<static global_label *
-new_global_label(char * const name)>
+=item C<static global_label * new_global_label(lexer_state * const lexer, char
+const * const name)>
Constructor to create a new global_label object.
@@ -566,7 +647,10 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static global_label *
-new_global_label(NOTNULL(lexer_state * const lexer), NOTNULL(char const * const name)) {
+new_global_label(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const name))
+{
+ ASSERT_ARGS(new_global_label)
global_label *glob = pir_mem_allocate_zeroed_typed(lexer, global_label);
glob->name = name;
glob->const_table_index = 0;
@@ -575,8 +659,8 @@
/*
-=item C<void
-store_global_label(struct lexer_state * const lexer, char * const name)>
+=item C<void store_global_label(lexer_state * const lexer, char const * const
+name)>
Store the global identifier C<name> in C<lexer>'s global label table.
@@ -584,7 +668,10 @@
*/
void
-store_global_label(NOTNULL(lexer_state * const lexer), NOTNULL(char const * const name)) {
+store_global_label(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const name))
+{
+ ASSERT_ARGS(store_global_label)
hashtable *table = &lexer->globals;
unsigned long hash = get_hashcode(name, table->size);
bucket *b = new_bucket(lexer);
@@ -595,8 +682,8 @@
/*
-=item C<global_label *
-find_global_label(struct lexer_state * const lexer, char const * const name)>
+=item C<global_label * find_global_label(lexer_state * const lexer, char const *
+const name)>
Find the global identifier C<name>. If no such identifier was found,
then NULL is returned.
@@ -607,7 +694,10 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
global_label *
-find_global_label(NOTNULL(lexer_state * const lexer), NOTNULL(char const * const name)) {
+find_global_label(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const name))
+{
+ ASSERT_ARGS(find_global_label)
hashtable *table = &lexer->globals;
unsigned long hashcode = get_hashcode(name, table->size);
bucket *b = get_bucket(table, hashcode);
@@ -623,8 +713,8 @@
/*
-=item C<void
-store_global_constant(lexer_state *lexer, constant * const c)>
+=item C<void store_global_constant(lexer_state * const lexer, constdecl * const
+c)>
Store the globally defined constant C<c> in the constant table.
@@ -632,7 +722,10 @@
*/
void
-store_global_constant(NOTNULL(lexer_state * const lexer), NOTNULL(constdecl * const c)) {
+store_global_constant(ARGIN(lexer_state * const lexer),
+ ARGIN(constdecl * const c))
+{
+ ASSERT_ARGS(store_global_constant)
hashtable *table = &lexer->constants;
unsigned long hash = get_hashcode(c->name, table->size);
bucket *b = new_bucket(lexer);
@@ -642,8 +735,8 @@
/*
-=item C<constant *
-find_global_constant(lexer_state *lexer, char * const name)>
+=item C<constdecl * find_global_constant(lexer_state * const lexer, char const *
+const name)>
Find a constant defined as C<name>. If no constant was defined by
that name, then NULL is returned.
@@ -654,7 +747,10 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
constdecl *
-find_global_constant(NOTNULL(lexer_state * const lexer), NOTNULL(char const * const name)) {
+find_global_constant(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const name))
+{
+ ASSERT_ARGS(find_global_constant)
hashtable *table = &lexer->constants;
unsigned long hashcode = get_hashcode(name, table->size);
bucket *b = get_bucket(table, hashcode);
@@ -675,9 +771,8 @@
/*
-=item C<static local_label *
-new_local_label(lexer_state * const lexer, char const * const name,
-unsigned offset)>
+=item C<static local_label * new_local_label(lexer_state * const lexer, char
+const * const name, unsigned offset)>
Constructor for a label. Create a new label structure, fill out the details
and return it. C<name> is the name of the label; C<offset> is its current
@@ -689,9 +784,12 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static local_label *
-new_local_label(NOTNULL(lexer_state * const lexer), NOTNULL(char const * const name),
- unsigned offset)
+new_local_label(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const name),
+ unsigned offset)
{
+ ASSERT_ARGS(new_local_label)
+
local_label *l = pir_mem_allocate_zeroed_typed(lexer, local_label);
l->name = name;
l->offset = offset;
@@ -700,8 +798,8 @@
/*
-=item C<void
-store_local_label(lexer_state * const lexer, char const * const labelname, unsigned offset)>
+=item C<void store_local_label(lexer_state * const lexer, char const * const
+labelname, unsigned offset)>
Store the (sub-)local label C<labelname>, having I<address> C<offset> in the current
subroutine structure.
@@ -710,9 +808,11 @@
*/
void
-store_local_label(NOTNULL(lexer_state * const lexer), NOTNULL(char const * const labelname),
- unsigned offset)
+store_local_label(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const labelname),
+ unsigned offset)
{
+ ASSERT_ARGS(store_local_label)
local_label *l = new_local_label(lexer, labelname, offset);
hashtable *table = &CURRENT_SUB(lexer)->labels;
unsigned long hash = get_hashcode(labelname, table->size);
@@ -723,8 +823,8 @@
/*
-=item C<unsigned
-find_local_label(lexer_state * const lexer, char const * const labelname)>
+=item C<unsigned find_local_label(lexer_state * const lexer, char const * const
+labelname)>
Find the offset for label C<labelname>. If C<labelname> was not defined as
a label, an error is emitted, otherwise, the offset of that label is returned.
@@ -734,7 +834,10 @@
*/
PARROT_WARN_UNUSED_RESULT
unsigned
-find_local_label(NOTNULL(lexer_state * const lexer), NOTNULL(char const * const labelname)) {
+find_local_label(ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const labelname))
+{
+ ASSERT_ARGS(find_local_label)
hashtable *table = &CURRENT_SUB(lexer)->labels;
unsigned long hashcode = get_hashcode(labelname, table->size);
bucket *b = get_bucket(table, hashcode);
Modified: branches/boehm_gc_2/compilers/pirc/src/pirsymbol.h
==============================================================================
--- branches/boehm_gc_2/compilers/pirc/src/pirsymbol.h Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/compilers/pirc/src/pirsymbol.h Mon Feb 22 12:30:02 2010 (r44294)
@@ -75,49 +75,157 @@
/* lookup table to convert value_type and pir_type values into one another. */
extern const int valuetype_pirtype_clut[10];
+/* HEADERIZER BEGIN: compilers/pirc/src/pirsymbol.c */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-/* symbol constructor */
-symbol *new_symbol(struct lexer_state * const lexer, char const * const name, pir_type type);
-
-/* to enter a symbol in the symbol table */
-void declare_local(struct lexer_state * const lexer, pir_type type, symbol * const list);
-
-/* to find a symbol in the symbol table */
-symbol *find_symbol(struct lexer_state * const lexer, char const * const name);
-
-
-pir_reg *find_register(struct lexer_state * const lexer, pir_type type, int regno);
-
-
-/* to find declared symbols that are never referenced */
-void check_unused_symbols(struct lexer_state * const lexer);
-
-/* find specified register; if it was not used yet, assign a PASM register to it */
-int color_reg(struct lexer_state * const lexer, pir_type type, int regno);
-
-/* store a global identifier (label) */
-void store_global_label(struct lexer_state * const lexer, char const * const name);
-
-/* find a global identifier */
-global_label *find_global_label(struct lexer_state * const lexer, char const * const name);
-
-/* store a global .const symbol */
-void store_global_constant(struct lexer_state * const lexer, constdecl * const c);
-
-/* find a global .const symbol */
-constdecl *find_global_constant(struct lexer_state * const lexer, char const * const name);
-
-void assign_vanilla_register(struct lexer_state * const lexer, symbol * const sym);
-
-void store_local_label(struct lexer_state * const lexer, char const * const label, unsigned offset);
-
-unsigned find_local_label(struct lexer_state * const lexer, char const * const label);
-
-unsigned get_hashcode(char const * const str, unsigned num_buckets);
-
-bucket *get_bucket(hashtable * const table, unsigned long hash);
-
-void store_bucket(hashtable * const table, bucket * const buck, unsigned long hash);
+void assign_vanilla_register(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(symbol * const sym))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void check_unused_symbols(ARGIN(lexer_state * const lexer))
+ __attribute__nonnull__(1);
+
+int color_reg(ARGIN(lexer_state * const lexer), pir_type type, int regno)
+ __attribute__nonnull__(1);
+
+void declare_local(
+ ARGIN(lexer_state * const lexer),
+ pir_type type,
+ ARGIN(symbol * const list))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(3);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CAN_RETURN_NULL
+constdecl * find_global_constant(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const name))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CAN_RETURN_NULL
+global_label * find_global_label(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const name))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+unsigned find_local_label(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const labelname))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CAN_RETURN_NULL
+pir_reg * find_register(
+ ARGIN(lexer_state * const lexer),
+ pir_type type,
+ int regno)
+ __attribute__nonnull__(1);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CAN_RETURN_NULL
+symbol * find_symbol(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const name))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+bucket * get_bucket(ARGIN(hashtable * const table), unsigned long hash)
+ __attribute__nonnull__(1);
+
+PARROT_PURE_FUNCTION
+PARROT_WARN_UNUSED_RESULT
+unsigned get_hashcode(ARGIN(char const * const str), unsigned num_buckets)
+ __attribute__nonnull__(1);
+
+PARROT_WARN_UNUSED_RESULT
+PARROT_CANNOT_RETURN_NULL
+symbol * new_symbol(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const name),
+ pir_type type)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void store_bucket(
+ ARGIN(hashtable * const table),
+ ARGIN(bucket * const buck),
+ unsigned long hash)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void store_global_constant(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(constdecl * const c))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void store_global_label(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const name))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void store_local_label(
+ ARGIN(lexer_state * const lexer),
+ ARGIN(char const * const labelname),
+ unsigned offset)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+#define ASSERT_ARGS_assign_vanilla_register __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(sym))
+#define ASSERT_ARGS_check_unused_symbols __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_color_reg __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_declare_local __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(list))
+#define ASSERT_ARGS_find_global_constant __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(name))
+#define ASSERT_ARGS_find_global_label __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(name))
+#define ASSERT_ARGS_find_local_label __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(labelname))
+#define ASSERT_ARGS_find_register __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer))
+#define ASSERT_ARGS_find_symbol __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(name))
+#define ASSERT_ARGS_get_bucket __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(table))
+#define ASSERT_ARGS_get_hashcode __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(str))
+#define ASSERT_ARGS_new_symbol __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(name))
+#define ASSERT_ARGS_store_bucket __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(table) \
+ , PARROT_ASSERT_ARG(buck))
+#define ASSERT_ARGS_store_global_constant __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(c))
+#define ASSERT_ARGS_store_global_label __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(name))
+#define ASSERT_ARGS_store_local_label __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lexer) \
+ , PARROT_ASSERT_ARG(labelname))
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+/* HEADERIZER END: compilers/pirc/src/pirsymbol.c */
#endif /* PARROT_PIR_PIRSYMBOL_H_GUARD */
Modified: branches/boehm_gc_2/config/auto/perldoc.pm
==============================================================================
--- branches/boehm_gc_2/config/auto/perldoc.pm Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/config/auto/perldoc.pm Mon Feb 22 12:30:02 2010 (r44294)
@@ -68,7 +68,7 @@
if ( $new_perldoc ) {
$TEMP_pod_build .= <<"END"
ops$slash$pod: ..${slash}src${slash}ops${slash}$ops
-\t\$(PERLDOC) -ud ops${slash}$pod ..${slash}src${slash}ops${slash}$ops
+\t\$(PERLDOC_BIN) -ud ops${slash}$pod ..${slash}src${slash}ops${slash}$ops
\t\$(CHMOD) 0644 ops${slash}$pod
END
@@ -76,7 +76,7 @@
else {
$TEMP_pod_build .= <<"END"
ops$slash$pod: ..${slash}src${slash}ops${slash}$ops
-\t\$(PERLDOC) -u ..${slash}ops${slash}$ops > ops${slash}$pod
+\t\$(PERLDOC_BIN) -u ..${slash}ops${slash}$ops > ops${slash}$pod
\t\$(CHMOD) 0644 ..${slash}ops${slash}$pod
END
Deleted: branches/boehm_gc_2/config/gen/call_list.pm
==============================================================================
--- branches/boehm_gc_2/config/gen/call_list.pm Mon Feb 22 12:30:02 2010 (r44293)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,81 +0,0 @@
-# Copyright (C) 2008, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-config/gen/call_list.pm - Concatenate call_list.txt (NCI signatures) fragments
-
-=head1 DESCRIPTION
-
-Some portions of F<src/call_list.txt> (the NCI signature list) are generated,
-and others should only appear when certain features/libraries are enabled by
-Configure in previous steps. This step simply combines all fragments that
-appear in F<config/gen/call_list/> into the single C<src/call_list.txt> used
-by the main build.
-
-If a config step wishes to make its fragment optional, that step should only
-generate or copy its fragment to F<config/gen/call_list/> when the library is
-enabled.
-
-=cut
-
-package gen::call_list;
-
-use strict;
-use warnings;
-
-use base qw(Parrot::Configure::Step);
-
-use Parrot::Configure::Utils '_slurp';
-
-
-sub _init {
- my $self = shift;
- my %data;
- $data{description} = q{Generate NCI signature list};
- $data{result} = q{};
- $data{fragment_files} = [ sort glob 'config/gen/call_list/*.in' ];
- return \%data;
-}
-
-my $text_file_coda = <<'CODA';
-# Local variables:
-# mode: text
-# buffer-read-only: t
-# End:
-CODA
-
-sub runstep {
- my ( $self, $conf ) = @_;
-
- my $combined_file = 'src/call_list.txt';
-
- open my $combined, '>', $combined_file
- or die "Could not open '$combined_file' for write: $!";
-
- # add read-only metadata for the generated file
- print {$combined} "# ex: set ro:\n";
-
- foreach my $fragment_file ( @{ $self->{fragment_files} } ) {
- my $fragment = _slurp($fragment_file);
- $fragment =~ s/^\s*\n//;
- $fragment =~ s/\s*$/\n\n/;
-
- print {$combined} $fragment;
- }
- print {$combined} $text_file_coda;
-
- $conf->append_configure_log($combined_file);
-
- return 1;
-}
-
-1;
-
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Deleted: branches/boehm_gc_2/config/gen/call_list/core.in
==============================================================================
--- branches/boehm_gc_2/config/gen/call_list/core.in Mon Feb 22 12:30:02 2010 (r44293)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,119 +0,0 @@
-# Copyright (C) 2002-2008, Parrot Foundation.
-
-# DO NOT EDIT THIS FILE.
-#
-# Any changes made here will be lost.
-#
-# This file is generated automatically by config/gen/call_list.pm
-# using config/gen/call_list/*.in .
-
-
-# Function signature declarations for Parrot Native Call Interface.
-# The first alphanumeric is the type of the return value,
-# the other alphanumerics denote the input parameter types.
-
-# Types
-
-# INT register stuff
-# I - INTVAL
-# c - char
-# s - short
-# i - int
-# l - long
-
-# NUM register stuff
-# N - FLOATVAL
-# f - float
-# d - double
-
-# STR register stuff
-# S - pointer to a STRING-register
-# t - character string (0-terminated)
-# Buffers are not valid return parameters,
-# use 'p' when the native function returns a pointer value
-# b - void *
-# B - void **
-
-# PMC register stuff
-# P - pointer to a PMC-register
-# O - pointer to PMC-register (object)
-# p - data pointer from PMC (on store into a new UnManagedStruct PMC)
-# 2 - pointer to short
-# 3 - pointer to int
-# 4 - pointer to long
-
-# void stuff
-# v - void
-
-# special stuff
-# 0 - insert a NULL (pointer) - doesn't consume a register
-# J - Parrot_Interp param
-# @ - slurpy array
-
-# callback stuff
-# U - Single PMC parameter to pass into callback - user data
-
-# Signatures
-
-d JOd # Parrot builtins
-I JOS
-P JOl
-P Jt
-S JOS # ParrotIO.readline
-I JI # Parrot_is_char_*
-v JOSP # String.trans
-v JOS # String.reverse
-P JOS # Added for os.stat
-I JOI # os.umask
-P JOP # atan2
-P JOPS # Namespace.get_global
-v JOPSP # Namespace.set_global
-
-v JPPP # infix MMD
-v JPIP
-v JPSP
-v JPNP
-
-v JPP # inplace infix MMD
-v JPI
-v JPS
-v JPN
-
-P JPPP # infix MMD new
-P JPIP
-P JPSP
-P JPNP
-
-I JPP # MMD compare
-
-# These are needed for packfileconstanttable.pmc
-I JPS
-I JPN
-
-# These are needed for parrotio.pmc
-i JP
-v JP
-i JPi
-i JPii
-i JPiii
-i JPt
-P JOSSS
-
-# Needed by string.pmc
-v JOSS
-
-# Needed by integer.pmc
-S JOI
-
-# src/pmc/nci.pmc
-v JOb
-
-# ParrotThread creation
-i JOP@
-I JOP@
-I JOIP@
-
-# other ParrotThread
-P JO
-v JOP
-P Ji
Deleted: branches/boehm_gc_2/config/gen/call_list/misc.in
==============================================================================
--- branches/boehm_gc_2/config/gen/call_list/misc.in Mon Feb 22 12:30:02 2010 (r44293)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,416 +0,0 @@
-# t/src/embed.t
-v J
-
-# mod_parrot
-i ip
-i JPip
-i JpP
-i Jpii
-i p
-i tp
-p J
-p Jp
-t J
-t Jpti
-t p
-t pt
-v p
-v pit
-v ptt
-v Jtiiipt
-p JttPP
-P Jtpi
-i Vppp
-v JpPP
-v pt
-v Jpt
-
-v
-v Jiiip # examples/japh/japh11.pasm
-v i
-v ii
-v illllllll
-v l
-v p
-v pbip
-v pi
-v piiii
-v pl
-v pp
-
-# For python
-i JPP
-
-# Py_func signatures
-P JP
-P JPP
-P JO
-S JO
-i P
-
-# PyBuiltins
-P JOPP
-P JOPPP
-v JOPP
-v JOPPP
-P JOPPPP
-P JOPPPPP
-
-# Added for Tcl
-I JOSI
-P JOSII
-
-# Added for TclLibrary
-t p3
-i pp3p
-i pp3
-i ppd
-i ptii
-i pipi
-t ptti
-t pti
-t pttti
-
-# libpast
-p Ji
-p Jipp
-p Jbip
-v Jp
-v JS
-
-# crypt
-t tt
-
-# Sub.__get_regs_used
-I JOt
-
-# declare_lex_preg
-v JOSI
-
-# Added for .NET => PIR translator dynamic PMCs.
-S JOi
-v JOi
-I JO
-N JO
-v JON
-P JOi
-v JOI
-
-# Make lua stop panic'ing.
-P JOI
-P JOIS
-S JOSP
-
-i # void function returning int like fork()
-i i3i # POSIX's waitpid
-i ibi # POSIX's read
-
-# win32
-l lttl
-
-i pip
-i piS
-S i
-
-# --- start mysqlclient library ---
-#
-# Created from mysql.h using the following manual method:
-#
-# Edited copy of mysql.h using vi by doing g/, *$/j (repeat) then g/\* *$/j
-# (repeat) to get all functions on one line each.
-#
-# Extracted list of api func names from
-# http://dev.mysql.com/doc/refman/4.1/en/c-api-functions.html and copied to a
-# temporary file to clean up (mysql_api_names.txt)
-#
-# Stripped down to bare names and merged into one line separated by |
-# then egrep -w `cat mysql_api_names.txt` mysql.h > mysql_api.ncidef
-# then edit mysql_api.ncidef in vi: %s/^/ # /
-# to create space for nci signatures and to use original definition as a #
-# comment.
-#
-# This method isn't ideal, I'm just noting it here in case it helps others.
-# Ideally the process should be automated - but there be many dragons along
-# that path.
-#
-# NCI doesn't yet handle long long values (my_ulonglong), spec'd as long for now
-#
-#
-# MYSQL_FIELD and MYSQL_RES are structs
-# typedef char **MYSQL_ROW; /* return data as array of strings */
-# typedef unsigned int MYSQL_FIELD_OFFSET; /* offset to current field */
-# typedef MYSQL_ROWS *MYSQL_ROW_OFFSET; /* offset to current row */
-#
-l p #! my_ulonglong mysql_num_rows(MYSQL_RES *res)
-i p # unsigned int mysql_num_fields(MYSQL_RES *res)
-c p # my_bool mysql_eof(MYSQL_RES *res)
-p pi # MYSQL_FIELD *mysql_fetch_field_direct(MYSQL_RES *res,
-# unsigned int fieldnr)
-p p # MYSQL_FIELD * mysql_fetch_fields(MYSQL_RES *res)
-p p # MYSQL_ROW_OFFSET mysql_row_tell(MYSQL_RES *res)
-i p # MYSQL_FIELD_OFFSET mysql_field_tell(MYSQL_RES *res)
-i p # unsigned int mysql_field_count(MYSQL *mysql)
-l p #! my_ulonglong mysql_affected_rows(MYSQL *mysql)
-l p #! my_ulonglong mysql_insert_id(MYSQL *mysql)
-i p # unsigned int mysql_errno(MYSQL *mysql)
-t p # const char * mysql_error(MYSQL *mysql)
-t p # const char * mysql_info(MYSQL *mysql)
-l p # unsigned long mysql_thread_id(MYSQL *mysql)
-t p # const char * mysql_character_set_name(MYSQL *mysql)
-p p # MYSQL * mysql_init(MYSQL *mysql)
-
-i pttttt # int mysql_ssl_set(MYSQL *mysql, const char *key,
-# const char *cert, const char *ca, const char *capath,
-# const char *cipher)
-c pttt # my_bool mysql_change_user(MYSQL *mysql, const char *user,
-# const char *passwd, const char *db)
-p pttttiti # MYSQL * mysql_real_connect(MYSQL *mysql, const char *host,
-# const char *user, const char *passwd,
-# const char *db, unsigned int port,
-# const char *unix_socket,
-# unsigned int clientflag)
-v p # void mysql_close(MYSQL *sock)
-i pt # int mysql_select_db(MYSQL *mysql, const char *db)
-i pt # int mysql_query(MYSQL *mysql, const char *q)
-i ptl # int mysql_real_query(MYSQL *mysql, const char *q,
-# unsigned long length)
-i p # int mysql_shutdown(MYSQL *mysql)
-i p # int mysql_dump_debug_info(MYSQL *mysql)
-i pi # int mysql_refresh(MYSQL *mysql, unsigned int refresh_options)
-i pl # int mysql_kill(MYSQL *mysql,unsigned long pid)
-i p # int mysql_ping(MYSQL *mysql)
-t p # const char * mysql_stat(MYSQL *mysql)
-t p # const char * mysql_get_server_info(MYSQL *mysql)
-t p # const char * mysql_get_client_info(void)
-l # unsigned long mysql_get_client_version(void)
-t p # const char * mysql_get_host_info(MYSQL *mysql)
-t p # unsigned int mysql_get_proto_info(MYSQL *mysql)
-p pt # MYSQL_RES * mysql_list_dbs(MYSQL *mysql,const char *wild)
-p pt # MYSQL_RES * mysql_list_tables(MYSQL *mysql,const char *wild)
-p ptt # MYSQL_RES * mysql_list_fields(MYSQL *mysql, const char *table,
-# const char *wild)
-p p # MYSQL_RES * mysql_list_processes(MYSQL *mysql)
-p p # MYSQL_RES * mysql_store_result(MYSQL *mysql)
-p p # MYSQL_RES * mysql_use_result(MYSQL *mysql)
-i pit # int mysql_options(MYSQL *mysql,enum mysql_option option,
-# const char *arg)
-v p # void mysql_free_result(MYSQL_RES *result)
-v pl # void mysql_data_seek(MYSQL_RES *result, my_ulonglong offset)
-p pp # MYSQL_ROW_OFFSET mysql_row_seek(MYSQL_RES *result,
-# MYSQL_ROW_OFFSET offset)
-i pi # MYSQL_FIELD_OFFSET mysql_field_seek(MYSQL_RES *result,
-# MYSQL_FIELD_OFFSET offset)
-
-p p # MYSQL_ROW mysql_fetch_row(MYSQL_RES *result)
-l p # unsigned long * mysql_fetch_lengths(MYSQL_RES *result)
-p p # MYSQL_FIELD * mysql_fetch_field(MYSQL_RES *result)
-l ttl # unsigned long mysql_escape_string(char *to,const char *from, unsigned long from_length)
-l pttl # unsigned long mysql_real_escape_string(MYSQL *mysql, char *to,const char *from, unsigned long length)
-v t # void mysql_debug(const char *debug)
-# --- end mysqlclient library ---
-
-# My mysql does not fit with the previous section
-p pttttitl
-# MYSQL * mysql_real_connect(MYSQL *mysql, const char *host,
-# const char *user,
-# const char *passwd,
-# const char *db,
-# unsigned int port,
-# const char *unix_socket,
-# unsigned long clientflag)
-
-# Used by library/pcre.pir
-p tiB3P
-p tip3P
-i pPtiiipi
-i tpiibi
-
-# Oddball ones for postgres
-p ptippppi PQexecParams
-p pi33ipi PQfn
-p pttip PQprepage
-p ptipppi PQexecPrepared
-p ppP PQsetNoticeReceiver
-
-# Used by SDL
-p iiil
-i ppl
-v pip
-p pti
-i ppp
-# added by RNH for the RenderXXX_XXXX text routines
-p ptii
-
-# Used by SDL::Font
-p ti
-p ptp
-i pt33
-
-# t/pmc/nci.t
-c
-c p
-c pi
-
-d
-d d
-
-f
-f ff
-f is
-
-i
-i b
-i d
-i i
-i ii
-i ii4
-i ii4i
-i iiii
-i iiilsp
-i iil
-i iili
-i iip
-i iit
-i iiti
-i ilsp
-i iti
-i l
-i li
-i lp
-i lsp
-i p
-i p33
-i p333
-i p333333
-i p4
-i p42p
-i p4i
-i pb
-i pi
-i pii
-i pii4
-i pii4i
-i piii
-i piiiiii
-i piiilsp
-i piil
-i piili
-i piit
-i piiti
-i pilsp
-i pit
-i pl
-i pli
-i pll
-i pllllllll
-i plp
-i plsp
-i pp
-i ppi
-i ppiiiiiiii
-i pppp
-i psp
-i pt
-i pti
-i pitl
-i s
-i s22
-i s222
-i sp
-i sss
-i ssss
-i t
-i ti
-i 4
-i 4i
-i 42p
-
-l
-l ii
-l l4
-l p
-l pi
-l pii
-l p33l
-l 33l
-
-p
-p B
-p b
-p Jt
-p i
-p ii
-p iiii
-p iiiiii
-p iiiiiiii
-p p
-p pt
-p pi
-p pii
-p piiii
-p t
-p tpp
-p ttttttt
-
-s
-
-t
-t i
-t ii
-t p
-t pi
-t pii
-t pt
-t t
-t tl4
-t t4
-
-i sc
-s sc
-c sc
-i iii
-i i3
-t b
-t B
-v P
-v pP
-p ip
-i 33
-v pii
-v JO
-i JO
-i JOi
-i JOt
-i Jt
-i Ji
-
-v Vi
-v p
-
-# Testing xlib
-
-p ppiii
-p ppiiiiiii
-i ppii
-i ppiii
-i ppiiii
-i ppiiiii
-i ppiiiiii
-i ppt
-i pppi
-i pppii
-i pppiiii
-i ppppiiiiii
-
-# Testing OpenGL
-v fff
-
-# Testing Pointer PMC use
-v V
-v VVV
-
-# Testing SQLite
-i tV
-i ptiVp
-i pid
-i pitii
Modified: branches/boehm_gc_2/config/gen/crypto/digest_pmc.in
==============================================================================
--- branches/boehm_gc_2/config/gen/crypto/digest_pmc.in Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/config/gen/crypto/digest_pmc.in Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2008, Parrot Foundation.
+Copyright (C) 2008-2010, Parrot Foundation.
$Id$
=head1 NAME
@@ -34,7 +34,7 @@
*/
VTABLE void init() {
@TEMP_md_guard@
- @TEMP_md_ctx@ *c = mem_allocate_zeroed_typed(@TEMP_md_ctx@);
+ @TEMP_md_ctx@ *c = mem_gc_allocate_zeroed_typed(INTERP, @TEMP_md_ctx@);
PMC_data(SELF) = c;
PObj_custom_destroy_SET(SELF);
#else
@@ -54,7 +54,7 @@
@TEMP_md_guard@
@TEMP_md_ctx@ *c = PMC_data_typed(SELF, @TEMP_md_ctx@ *);
if (c) {
- mem_sys_free(c);
+ mem_gc_free(INTERP, c);
PMC_data(SELF) = NULL;
}
#endif
@@ -69,7 +69,7 @@
*/
VTABLE PMC* clone() {
@TEMP_md_guard@
- PMC *retval = pmc_new_noinit(INTERP, SELF->vtable->base_type);
+ PMC *retval = Parrot_pmc_new_noinit(INTERP, SELF->vtable->base_type);
@TEMP_md_ctx@ *c = mem_allocate_zeroed_typed(@TEMP_md_ctx@);
memcpy(c, PMC_data(SELF), sizeof (@TEMP_md_ctx@));
Modified: branches/boehm_gc_2/config/gen/makefiles/docs.in
==============================================================================
--- branches/boehm_gc_2/config/gen/makefiles/docs.in Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/config/gen/makefiles/docs.in Mon Feb 22 12:30:02 2010 (r44294)
@@ -8,7 +8,7 @@
TOUCH = @touch@
RM_F = @rm_f@
RM_RF = @rm_rf@
-PERLDOC = @perldoc@
+PERLDOC_BIN = @perldoc@
VERSION = @VERSION@@DEVEL@
# long list of .pod files
@@ -41,8 +41,8 @@
$(TOUCH) doc-prep
packfile-c.pod: ../src/packfile.c
-#IF(new_perldoc): $(PERLDOC) -ud packfile-c.pod ../src/packfile.c
-#ELSE: $(PERLDOC) -u ../src/packfile.c > packfile-c.pod
+#IF(new_perldoc): $(PERLDOC_BIN) -ud packfile-c.pod ../src/packfile.c
+#ELSE: $(PERLDOC_BIN) -u ../src/packfile.c > packfile-c.pod
clean:
$(RM_F) packfile-c.pod $(POD) doc-prep
Modified: branches/boehm_gc_2/config/gen/makefiles/root.in
==============================================================================
--- branches/boehm_gc_2/config/gen/makefiles/root.in Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/config/gen/makefiles/root.in Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
###############################################################################
@@ -158,7 +158,7 @@
$(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_opengl): src/glut_nci_thunks.nci \
#IF(has_glut): src/glut_callbacks.c \
src/core_pmcs.c \
#IF(has_crypto): src/dynpmc/md2.pmc \
@@ -226,10 +226,11 @@
$(GEN_MAKEFILES) \
ext/Parrot-Embed/Makefile.PL \
myconfig \
- src/call_list.txt \
MANIFEST.configure.generated \
.configure_trace.sto \
.parrot_current_rev \
+#IF(has_opengl): runtime/parrot/include/opengl_defines.pasm \
+#IF(has_opengl): runtime/parrot/library/OpenGL_funcs.pir \
runtime/parrot/include/signal.pasm
@@ -256,6 +257,7 @@
GEN_SOURCES = \
src/core_ops.c \
src/nci.c \
+ src/glut_nci_thunks.c \
src/core_ops_switch.c \
src/parrot_config.c \
src/null_config.c \
@@ -282,7 +284,6 @@
$(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 \
$(LIBRARY_DIR)/NCI/Utils.pbc \
@@ -476,7 +477,9 @@
src/misc$(O) \
src/multidispatch$(O) \
src/frame_builder$(O) \
- src/nci$(O) \
+ src/nci/api$(O) \
+ src/nci/core_thunks$(O) \
+ src/nci/extra_thunks$(O) \
src/oo$(O) \
src/packfile$(O) \
src/packout$(O) \
@@ -524,6 +527,7 @@
PARROT_CONFIG = ./parrot_config$(EXE)
PIRC = ./pirc$(EXE)
NQP_RX = ./parrot-nqp$(EXE)
+NCI_THUNK_GEN = ./parrot_nci_thunk_gen$(EXE)
# Installable executables
INSTALLABLEPARROT = ./installable_parrot$(EXE)
@@ -534,6 +538,7 @@
INSTALLABLEPDB = ./installable_parrot_debugger$(EXE)
INSTALLABLECONFIG = ./installable_parrot_config$(EXE)
INSTALLABLENQP = ./installable_parrot-nqp$(EXE)
+INSTALLABLENCITHUNKGEN = ./installable_parrot_nci_thunk_gen$(EXE)
# Libraries
LIBPARROT_STATIC = @blib_dir@/@libparrot_static@
@@ -553,6 +558,7 @@
DYNEXT_DIR = runtime/parrot/dynext
LIBNCI_TEST_SO = $(DYNEXT_DIR)/libnci_test$(LOAD_EXT)
LIBGLUTCB_SO = $(DYNEXT_DIR)/libglutcb$(LOAD_EXT)
+EXTRANCITHUNKS_SO = $(DYNEXT_DIR)/extra_nci_thunks$(LOAD_EXT)
###############################################################################
#
@@ -600,6 +606,7 @@
corevm \
docs \
#IF(has_glut): $(LIBGLUTCB_SO) \
+ $(EXTRANCITHUNKS_SO) \
$(DIS) \
$(PARROT_CONFIG) \
$(PBC_TO_EXE) \
@@ -611,6 +618,7 @@
$(PGE_LIB_PBCS) \
$(PCT_LIB_PBCS) \
$(JSON_LIB_PBCS) \
+ $(DATA_JSON_LIB_PBCS) \
$(NQP_LIB_PBCS)
corevm : \
@@ -649,7 +657,9 @@
src/library.str \
src/multidispatch.str \
src/frame_builder.str \
- src/nci.str \
+ src/nci/api.str \
+ src/nci/core_thunks.str \
+ src/nci/extra_thunks.str \
src/packfile.str \
src/pmc.str \
src/pmc_freeze.str \
@@ -800,7 +810,7 @@
parrot_utils : $(PDUMP) $(DIS) $(PDB) $(PBC_MERGE) $(PBC_TO_EXE) $(PARROT_CONFIG) src/install_config$(O)
-installable: all $(INSTALLABLEPARROT) $(INSTALLABLEPDUMP) $(INSTALLABLEDIS) $(INSTALLABLEPDB) $(INSTALLABLEPBC_MERGE) $(INSTALLABLEPBCTOEXE) $(INSTALLABLECONFIG) $(INSTALLABLENQP)
+installable: all $(INSTALLABLEPARROT) $(INSTALLABLEPDUMP) $(INSTALLABLEDIS) $(INSTALLABLEPDB) $(INSTALLABLEPBC_MERGE) $(INSTALLABLEPBCTOEXE) $(INSTALLABLECONFIG) $(INSTALLABLENQP) $(INSTALLABLENCITHUNKGEN)
flags_dummy :
@@ -825,6 +835,12 @@
$(PARROT) -o pbc_to_exe.pbc tools/dev/pbc_to_exe.pir
$(PARROT) pbc_to_exe.pbc pbc_to_exe.pbc
+parrot_nci_thunk_gen.pbc : tools/dev/nci_thunk_gen.pir $(DATA_JSON_LIB_PBCS) $(PARROT)
+ $(PARROT) -o parrot_nci_thunk_gen.pbc tools/dev/nci_thunk_gen.pir
+
+$(NCI_THUNK_GEN) : parrot_nci_thunk_gen.pbc $(PBC_TO_EXE)
+ $(PBC_TO_EXE) parrot_nci_thunk_gen.pbc
+
$(PARROT_CONFIG) : tools/util/parrot-config.pir $(PARROT) $(PBC_TO_EXE)
$(PARROT) -o parrot_config.pbc tools/util/parrot-config.pir
$(PARROT) pbc_to_exe.pbc parrot_config.pbc
@@ -937,6 +953,9 @@
$(INSTALLABLEPBCTOEXE) : $(PBC_TO_EXE) src/install_config$(O)
$(PBC_TO_EXE) pbc_to_exe.pbc --install
+$(INSTALLABLENCITHUNKGEN) : parrot_nci_thunk_gen.pbc $(PBC_TO_EXE) src/install_config$(O)
+ $(PBC_TO_EXE) parrot_nci_thunk_gen.pbc --install
+
#
# Parrot Debugger
#
@@ -1145,11 +1164,16 @@
examples/pasm/hello.pbc: examples/pasm/hello.pasm
$(PARROT) -o examples/pasm/hello.pbc examples/pasm/hello.pasm
-examples/pasm/hello$(O): examples/pasm/hello.pbc
- $(PARROT) -o examples/pasm/hello$(O) examples/pasm/hello.pbc
-
-examples/pasm/hello$(EXE): examples/pasm/hello$(O)
- $(MAKE) . EXEC=examples/pasm/hello exec
+# The -o option of parrot did not work with the object file extension ".o"
+# so as work around pbc_to_exe is used and the original commands are only
+# commented out so it can easily switched back.
+#examples/pasm/hello$(O): examples/pasm/hello.pbc
+# $(PARROT) -o examples/pasm/hello$(O) examples/pasm/hello.pbc
+#
+#examples/pasm/hello$(EXE): examples/pasm/hello$(O)
+# $(MAKE) . EXEC=examples/pasm/hello exec
+examples/pasm/hello$(EXE): examples/pasm/hello.pbc $(PBC_TO_EXE)
+ $(PBC_TO_EXE) examples/pasm/hello.pbc
@@ -1377,12 +1401,20 @@
src/exit$(O) : $(PARROT_H_HEADERS)
-src/nci$(O) : src/nci.str \
- $(INC_DIR)/oplib/ops.h $(PARROT_H_HEADERS) \
- src/frame_builder.h \
- include/pmc/pmc_managedstruct.h \
- include/pmc/pmc_nci.h \
- include/pmc/pmc_pointer.h
+src/nci/api$(O) : src/nci/api.str \
+ $(PARROT_H_HEADERS) \
+ include/pmc/pmc_unmanagedstruct.h \
+ include/pmc/pmc_nci.h
+
+src/nci/core_thunks$(O) : src/nci/core_thunks.str \
+ $(PARROT_H_HEADERS) \
+ include/pmc/pmc_unmanagedstruct.h \
+ include/pmc/pmc_nci.h
+
+src/nci/extra_thunks$(O) : src/nci/extra_thunks.str \
+ $(PARROT_H_HEADERS) \
+ include/pmc/pmc_unmanagedstruct.h \
+ include/pmc/pmc_nci.h
src/frame_builder$(O) : $(PARROT_H_HEADERS) src/frame_builder.h \
include/pmc/pmc_fixedintegerarray.h \
@@ -1395,10 +1427,6 @@
src/gc/system$(O) : $(PARROT_H_HEADERS) src/gc/gc_private.h
src/gc/gc_private.h : $(INC_DIR)/settings.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
-
src/warnings$(O) : $(PARROT_H_HEADERS)
src/misc$(O) : $(PARROT_H_HEADERS)
@@ -1805,7 +1833,7 @@
$(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) $(PIRC_CLEANUPS) $(PCT_CLEANUPS) $(DATA_JSON_CLEANUPS)
$(RM_F) $(GEN_PASM_INCLUDES) $(GEN_PM_INCLUDES)
prog-clean :
@@ -1822,7 +1850,9 @@
$(INSTALLABLEPDB) \
$(INSTALLABLECONFIG) \
$(INSTALLABLENQP) \
+ $(INSTALLABLENCITHUNKGEN) \
pbc_to_exe.pbc pbc_to_exe.c pbc_to_exe$(O) pbc_to_exe$(EXE) \
+ $(NCI_THUNK_GEN) parrot_nci_thunk_gen.c parrot_nci_thunk_gen$(O) parrot_nci_thunk_gen.pbc \
parrot_config$(EXE) parrot_config.c parrot_config$(O) parrot_config.pbc \
compilers/imcc/main$(O) \
$(PDUMP) src/pbc_dump$(O) src/packdump$(O) \
@@ -1837,7 +1867,10 @@
src/nci_test$(O) \
$(LIBNCI_TEST_SO) \
src/glut_callbacks$(O) \
+ src/glut_nci_thunks$(O) \
$(LIBGLUTCB_SO) \
+ src/extra_nci_thunks$(O) \
+ $(EXTRANCITHUNKS_SO) \
install_config.fpmc
$(PERL) $(BUILD_TOOLS_DIR)/c2str.pl --init
$(RM_F) \
@@ -1875,6 +1908,8 @@
$(LIBNCI_TEST_SO) \
src/glut_callbacks$(O) \
$(LIBGLUTCB_SO) \
+ src/extra_nci_thunks$(O) \
+ $(EXTRANCITHUNKS_SO) \
$(LIBPARROT_STATIC) \
$(LIBPARROT_SHARED)
@@ -2402,11 +2437,30 @@
# for use by runtime/parrot/library/OpenGL.pir
src/glut_callbacks$(O): $(GENERAL_H_FILES)
-$(LIBGLUTCB_SO): $(LIBPARROT) src/glut_callbacks$(O)
+src/glut_nci_thunks.c: $(NCI_THUNK_GEN)
+ $(NCI_THUNK_GEN) \
+ --loader-name=Parrot_glut_nci_loader \
+ --loader-storage-class=PARROT_DYNEXT_EXPORT \
+ --output=src/glut_nci_thunks.c \
+ <src/glut_nci_thunks.nci
+
+src/glut_nci_thunks$(O): $(GENERAL_H_FILES)
+
+$(LIBGLUTCB_SO): $(LIBPARROT) src/glut_callbacks$(O) src/glut_nci_thunks$(O)
$(LD) $(LD_LOAD_FLAGS) $(LDFLAGS) \
- @ld_out@$@ src/glut_callbacks$(O) \
+ @ld_out@$@ src/glut_callbacks$(O) src/glut_nci_thunks$(O) \
$(ALL_PARROT_LIBS) @opengl_lib@
+src/extra_nci_thunks.c : src/nci/extra_thunks.nci $(NCI_THUNK_GEN)
+ $(NCI_THUNK_GEN) --dynext --output=src/extra_nci_thunks.c <src/nci/extra_thunks.nci
+
+src/extra_nci_thunks$(O) : $(GENERAL_H_FILES)
+
+$(EXTRANCITHUNKS_SO) : $(LIBPARROT) src/extra_nci_thunks$(O)
+ $(LD) $(LD_LOAD_FLAGS) $(LDFLAGS) \
+ @ld_out@$@ src/extra_nci_thunks$(O) \
+ $(ALL_PARROT_LIBS)
+
# emacs etags
# this needs exuberant-ctags
Modified: branches/boehm_gc_2/config/gen/opengl.pm
==============================================================================
--- branches/boehm_gc_2/config/gen/opengl.pm Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/config/gen/opengl.pm Mon Feb 22 12:30:02 2010 (r44294)
@@ -15,7 +15,7 @@
=item F<runtime/parrot/library/OpenGL_funcs.pir>
-=item F<config/gen/call_list/opengl.in>
+=item F<src/glut_nci_thunks.nci>
=item F<src/glut_callbacks.c>
@@ -436,7 +436,7 @@
my $MACRO_FILE = 'runtime/parrot/include/opengl_defines.pasm';
my $FUNCS_FILE = 'runtime/parrot/library/OpenGL_funcs.pir';
-my $SIGS_FILE = 'config/gen/call_list/opengl.in';
+my $SIGS_FILE = 'src/glut_nci_thunks.nci';
my $C_FILE = 'src/glut_callbacks.c';
@@ -812,6 +812,8 @@
.sub _glutcb_func_list
.local pmc glutcb_funcs
glutcb_funcs = new 'ResizableStringArray'
+ push glutcb_funcs, 'Parrot_glut_nci_loader'
+ push glutcb_funcs, 'vJ'
push glutcb_funcs, 'glutcbCloseFunc'
push glutcb_funcs, 'vJP'
push glutcb_funcs, 'glutcbDisplayFunc'
Modified: branches/boehm_gc_2/config/gen/platform/generic/env.c
==============================================================================
--- branches/boehm_gc_2/config/gen/platform/generic/env.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/config/gen/platform/generic/env.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,6 +1,6 @@
/*
* $Id$
- * Copyright (C) 2004-2006, Parrot Foundation.
+ * Copyright (C) 2004-2010, Parrot Foundation.
*/
/*
@@ -26,7 +26,9 @@
/*
-=item C<void Parrot_setenv(const char *name, const char *value)>
+=item C<void Parrot_setenv(PARROT_INTERP, STRING *str_name, STRING *str_value)>
+
+Set up Environment vars
=cut
@@ -61,7 +63,9 @@
/*
-=item C<void Parrot_unsetenv(const char *name)>
+=item C<void Parrot_unsetenv(PARROT_INTERP, STRING *str_name)>
+
+UnSet Environment vars
=cut
@@ -81,7 +85,9 @@
/*
-=item C<char * Parrot_getenv(const char *name, int *free_it)>
+=item C<char * Parrot_getenv(PARROT_INTERP, STRING *str_name)>
+
+Get Environment vars
=cut
Modified: branches/boehm_gc_2/config/gen/platform/generic/exec.c
==============================================================================
--- branches/boehm_gc_2/config/gen/platform/generic/exec.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/config/gen/platform/generic/exec.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -106,7 +106,7 @@
int status, i;
STRING *s;
char *cmd;
- char **argv = mem_allocate_n_typed((len+1), char*);
+ char **argv = mem_gc_allocate_n_typed(interp, (len+1), char*);
for (i = 0; i < len; ++i) {
s = VTABLE_get_string_keyed_int(interp, cmdargs, i);
Modified: branches/boehm_gc_2/config/gen/platform/generic/memexec.c
==============================================================================
--- branches/boehm_gc_2/config/gen/platform/generic/memexec.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/config/gen/platform/generic/memexec.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,6 +1,6 @@
/*
* $Id$
- * Copyright (C) 2004-2006, Parrot Foundation.
+ * Copyright (C) 2004-2010, Parrot Foundation.
*/
/*
@@ -59,7 +59,7 @@
/*
-=item C<void mem_free_executable(void *p, size_t)>
+=item C<void mem_free_executable(void *p, size_t size)>
Free a buffer allocated with mem_alloc_executable().
@@ -81,7 +81,8 @@
/*
-=item C<void * mem_realloc_executable(void* oldp, size_t oldsize, size_t newsize)>
+=item C<void * mem_realloc_executable(void* oldp, size_t oldsize, size_t
+newsize)>
Reallocate executable memory.
Rounds up to page size because the whole page will be marked as executable.
Modified: branches/boehm_gc_2/config/gen/platform/openbsd/memexec.c
==============================================================================
--- branches/boehm_gc_2/config/gen/platform/openbsd/memexec.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/config/gen/platform/openbsd/memexec.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,6 +1,6 @@
/*
* $Id$
- * Copyright (C) 2004-2006, Parrot Foundation.
+ * Copyright (C) 2004-2010, Parrot Foundation.
*/
/*
@@ -65,7 +65,8 @@
/*
-=item C<void * mem_realloc_executable(void* oldp, size_t oldsize, size_t newsize)>
+=item C<void * mem_realloc_executable(void* oldp, size_t oldsize, size_t
+newsize)>
Reallocate executable memory
Round up to page size because the whole page will be marked as executable
Modified: branches/boehm_gc_2/config/gen/platform/platform_interface.h
==============================================================================
--- branches/boehm_gc_2/config/gen/platform/platform_interface.h Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/config/gen/platform/platform_interface.h Mon Feb 22 12:30:02 2010 (r44294)
@@ -44,9 +44,9 @@
void mem_free_executable(void *, size_t);
void *mem_realloc_executable(void *, size_t, size_t);
#else
-# define mem_alloc_executable mem_sys_allocate
-# define mem_free_executable(a, b) mem_sys_free(a)
-# define mem_realloc_executable(a, b, c) mem_sys_realloc((a), (c))
+# define mem_alloc_executable mem_internal_allocate
+# define mem_free_executable(a, b) mem_internal_free(a)
+# define mem_realloc_executable(a, b, c) mem_internal_realloc((a), (c))
#endif
/*
Modified: branches/boehm_gc_2/docs/embed.pod
==============================================================================
--- branches/boehm_gc_2/docs/embed.pod Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/docs/embed.pod Mon Feb 22 12:30:02 2010 (r44294)
@@ -84,21 +84,7 @@
=head2 Type signatures
-These are used with the Parrot_call_sub family of functions.
-
-=over 4
-
-=item v - void (return only)
-
-=item I - integer (return or argument)
-
-=item N - float (return or argument)
-
-=item S - string (return or argument)
-
-=item P - PMC (return or argument)
-
-=back
+ TODO: Write about signature strings
=head2 Interpreter initialization and destruction
@@ -1053,46 +1039,6 @@
=item C<Parrot_PMC_assign_string_native>
-=item C<Parrot_PMC_bitwise_and>
-
-=item C<Parrot_PMC_bitwise_and_int>
-
-=item C<Parrot_PMC_bitwise_ands>
-
-=item C<Parrot_PMC_bitwise_ands_str>
-
-=item C<Parrot_PMC_bitwise_lsr>
-
-=item C<Parrot_PMC_bitwise_lsr_int>
-
-=item C<Parrot_PMC_bitwise_not>
-
-=item C<Parrot_PMC_bitwise_nots>
-
-=item C<Parrot_PMC_bitwise_or>
-
-=item C<Parrot_PMC_bitwise_or_int>
-
-=item C<Parrot_PMC_bitwise_ors>
-
-=item C<Parrot_PMC_bitwise_ors_str>
-
-=item C<Parrot_PMC_bitwise_shl>
-
-=item C<Parrot_PMC_bitwise_shl_int>
-
-=item C<Parrot_PMC_bitwise_shr>
-
-=item C<Parrot_PMC_bitwise_shr_int>
-
-=item C<Parrot_PMC_bitwise_xor>
-
-=item C<Parrot_PMC_bitwise_xor_int>
-
-=item C<Parrot_PMC_bitwise_xors>
-
-=item C<Parrot_PMC_bitwise_xors_str>
-
=item C<Parrot_PMC_can>
=item C<Parrot_PMC_clone>
@@ -1163,8 +1109,6 @@
=item C<Parrot_PMC_get_attr_str>
-=item C<Parrot_PMC_get_bignum>
-
=item C<Parrot_PMC_get_bool>
=item C<Parrot_PMC_get_class>
@@ -1253,46 +1197,6 @@
=item C<Parrot_PMC_i_add_int>
-=item C<Parrot_PMC_i_bitwise_and>
-
-=item C<Parrot_PMC_i_bitwise_and_int>
-
-=item C<Parrot_PMC_i_bitwise_ands>
-
-=item C<Parrot_PMC_i_bitwise_ands_str>
-
-=item C<Parrot_PMC_i_bitwise_lsr>
-
-=item C<Parrot_PMC_i_bitwise_lsr_int>
-
-=item C<Parrot_PMC_i_bitwise_not>
-
-=item C<Parrot_PMC_i_bitwise_nots>
-
-=item C<Parrot_PMC_i_bitwise_or>
-
-=item C<Parrot_PMC_i_bitwise_or_int>
-
-=item C<Parrot_PMC_i_bitwise_ors>
-
-=item C<Parrot_PMC_i_bitwise_ors_str>
-
-=item C<Parrot_PMC_i_bitwise_shl>
-
-=item C<Parrot_PMC_i_bitwise_shl_int>
-
-=item C<Parrot_PMC_i_bitwise_shr>
-
-=item C<Parrot_PMC_i_bitwise_shr_int>
-
-=item C<Parrot_PMC_i_bitwise_xor>
-
-=item C<Parrot_PMC_i_bitwise_xor_int>
-
-=item C<Parrot_PMC_i_bitwise_xors>
-
-=item C<Parrot_PMC_i_bitwise_xors_str>
-
=item C<Parrot_PMC_i_concatenate>
=item C<Parrot_PMC_i_concatenate_str>
@@ -1661,14 +1565,6 @@
=item C<Parrot_str_append>
-=item C<Parrot_str_bitwise_and>
-
-=item C<Parrot_str_bitwise_not>
-
-=item C<Parrot_str_bitwise_or>
-
-=item C<Parrot_str_bitwise_xor>
-
=item C<Parrot_str_boolean>
=item C<Parrot_str_byte_length>
@@ -1807,7 +1703,7 @@
=item C<Parrot_warn>
-=item C<PMC_is_null>
+=item C<Parrot_pmc_is_null>
=item C<pmc_new>
Modified: branches/boehm_gc_2/docs/parrothist.pod
==============================================================================
--- branches/boehm_gc_2/docs/parrothist.pod Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/docs/parrothist.pod Mon Feb 22 12:30:02 2010 (r44294)
@@ -103,5 +103,5 @@
Gerd 1.9.0 2009-Dec-15 "Blue-fronted Amazon"
chromatic 2.0.0 * 2010-Jan-19 "Inevitable"
-
+ darbelo 2.1.0 2010-Feb-16 "As Scheduled"
=cut
Modified: branches/boehm_gc_2/docs/pdds/draft/pdd06_pasm.pod
==============================================================================
--- branches/boehm_gc_2/docs/pdds/draft/pdd06_pasm.pod Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/docs/pdds/draft/pdd06_pasm.pod Mon Feb 22 12:30:02 2010 (r44294)
@@ -989,8 +989,7 @@
"Perl5", "Perl6", "Perl5RE", "Perl6RE", "Python", "Ruby"... you get the
picture.
-Parrot knows of a "PASM1" compiler, i.e. a one statement PASM compiler
-implemented as PDB_eval. Imcc registers "PASM" and "PIR" compilers.
+Imcc registers "PASM" and "PIR" compilers automatically.
This is a high-level op, with the assumption that the resulting sub will be
called. It's the equivalent of perl 5's string eval, except for the actual
Modified: branches/boehm_gc_2/docs/pdds/draft/pdd11_extending.pod
==============================================================================
--- branches/boehm_gc_2/docs/pdds/draft/pdd11_extending.pod Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/docs/pdds/draft/pdd11_extending.pod Mon Feb 22 12:30:02 2010 (r44294)
@@ -275,11 +275,7 @@
=over 4
-=item C<Parrot_call_sub(interp, Parrot_PMC sub, Parrot_Int argcount, ...)>
-
-Calls a Parrot subroutine, with C<argcount> PMC parameters. This function sets
-up Parrot's registers in line with the Parrot calling conventions; see
-L<pdd03_calling_conventions.pod> for more details.
+ TODO: Add new call functions here
=back
Modified: branches/boehm_gc_2/docs/pdds/pdd17_pmc.pod
==============================================================================
--- branches/boehm_gc_2/docs/pdds/pdd17_pmc.pod Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/docs/pdds/pdd17_pmc.pod Mon Feb 22 12:30:02 2010 (r44294)
@@ -628,12 +628,6 @@
Return the native floating-point value of the PMC.
-=item get_bignum
-
- PMC* get_bignum(INTERP, PMC *self)
-
-Return the extended precision numeric value of the PMC as a new bignum PMC.
-
=item get_string
STRING* get_string(INTERP, PMC *self)
Modified: branches/boehm_gc_2/docs/pdds/pdd28_strings.pod
==============================================================================
--- branches/boehm_gc_2/docs/pdds/pdd28_strings.pod Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/docs/pdds/pdd28_strings.pod Mon Feb 22 12:30:02 2010 (r44294)
@@ -666,10 +666,6 @@
Return the floating-point representation of the string.
-=item get_bignum
-
-Return the big number representation of the string.
-
=item get_string
Return the string value of the String PMC.
Modified: branches/boehm_gc_2/docs/project/release_manager_guide.pod
==============================================================================
--- branches/boehm_gc_2/docs/project/release_manager_guide.pod Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/docs/project/release_manager_guide.pod Mon Feb 22 12:30:02 2010 (r44294)
@@ -393,9 +393,11 @@
visible at
L<http://www.google.com/calendar/render?cid=ldhctdamsgfg5a1cord52po9h8@group.calendar.google.com>.
- - Feb 16, 2010 - 2.1 - darbelo
- - Mar 16, 2010 - 2.2 - cotto
- - Apr 20, 2010 - 2.3* - gerd
+ - Mar 16, 2010 - 2.2 - cotto
+ - Apr 20, 2010 - 2.3* - gerd
+ - May 18, 2010 - 2.4 - whiteknight
+ - Jun 15, 2010 - 2.5 - gerd
+ - Jul 20, 2010 - 2.6* - coke
=cut
Modified: branches/boehm_gc_2/examples/c/nanoparrot.c
==============================================================================
--- branches/boehm_gc_2/examples/c/nanoparrot.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/examples/c/nanoparrot.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -94,7 +94,7 @@
* or for the curious: look at the preprocessor output
*/
-#define OP(x) OP_ ## (x)
+#define OP(x) OP_##x
typedef enum { OPCODES } opcodes;
#undef OP
@@ -148,6 +148,8 @@
=item C<static void run(Interp *interp, opcode_t *pc)>
+Execute a single opcode.
+
=cut
*/
@@ -167,7 +169,7 @@
switch (*pc) {
# endif
-# define CASE(x) case OP_ ## (x):
+# define CASE(x) case OP_##x:
# define NEXT continue;
# define DONE return;
# define ENDDISPATCH default : printf("illegal instruction"); \
@@ -228,11 +230,11 @@
#ifdef FUNC_CORE
# define DEF_OP(op) \
- interp->op_func[OP_ ## op] = (op); \
- interp->op_info[OP_ ## op] = #op
+ interp->op_func[OP_##op] = (op); \
+ interp->op_info[OP_##op] = #op
#else
# define DEF_OP(op) \
- interp->op_info[OP_ ## op] = #op
+ interp->op_info[OP_##op] = #op
#endif
/*
@@ -287,6 +289,8 @@
=item C<int main(int argc, char *argv[])>
+Initialize a minimal Parrotesque interpreter and run some hard-coded bytecode.
+
=cut
*/
Modified: branches/boehm_gc_2/examples/c/pbc_info.c
==============================================================================
--- branches/boehm_gc_2/examples/c/pbc_info.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/examples/c/pbc_info.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2003, Parrot Foundation.
+Copyright (C) 2001-2010, Parrot Foundation.
$Id$
=head1 NAME
@@ -27,6 +27,8 @@
#include "parrot/embed.h"
/*
+=item C<static INTVAL iter(PARROT_INTERP, PackFile_Segment *seg, void
+*user_data)>
=item C<static INTVAL iter(PARROT_INTERP, PackFile_Segment *seg, void *user_data)>
Modified: branches/boehm_gc_2/examples/embed/cotorra.c
==============================================================================
--- branches/boehm_gc_2/examples/embed/cotorra.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/examples/embed/cotorra.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -203,7 +203,7 @@
Parrot_String compiler = create_string(interp, "PIR");
Parrot_String errstr;
Parrot_PMC code = Parrot_compile_string(interp, compiler, exec, &errstr);
- void *discard = Parrot_call_sub(interp, code, "v");
+ Parrot_ext_call(interp, code, "->");
return 0;
}
@@ -224,8 +224,7 @@
Parrot_PMC parrotns = Parrot_PMC_get_pmc_strkey(interp, rootns, parrotname);
Parrot_String name = create_string(interp, stname);
Parrot_PMC start = Parrot_PMC_get_pmc_strkey(interp, parrotns, name);
- void *discard;
- discard = Parrot_call_sub(interp, start, "v");
+ Parrot_ext_call(interp, start, "->");
}
else {
Parrot_runcode(interp, argc - i, argv + i);
Modified: branches/boehm_gc_2/examples/nci/QtHelloWorld.pasm
==============================================================================
--- branches/boehm_gc_2/examples/nci/QtHelloWorld.pasm Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/examples/nci/QtHelloWorld.pasm Mon Feb 22 12:30:02 2010 (r44294)
@@ -21,7 +21,8 @@
Note that this will either need JIT for building the NCI-functions on
the fly. If this is not available try adding missing signatures to
-F<src/call_list.txt> and rebuilding Parrot.
+F<src/nci/extra_thunks.nci>, running F<tools/dev/mk_nci_thunks.pl>, and
+rebuilding Parrot.
=cut
Modified: branches/boehm_gc_2/examples/nci/QtHelloWorld.pir
==============================================================================
--- branches/boehm_gc_2/examples/nci/QtHelloWorld.pir Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/examples/nci/QtHelloWorld.pir Mon Feb 22 12:30:02 2010 (r44294)
@@ -21,7 +21,8 @@
Note that this will either need JIT for building the NCI-functions on
the fly. If this is not available try adding missing signatures to
-F<src/call_list.txt> and rebuilding Parrot.
+F<src/nci/extra_thunks.nci>, running F<tools/dev/mk_nci_thunks.pl>, and
+rebuilding Parrot.
=cut
.sub main
Modified: branches/boehm_gc_2/examples/pir/make_hello_pbc.pir
==============================================================================
--- branches/boehm_gc_2/examples/pir/make_hello_pbc.pir Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/examples/pir/make_hello_pbc.pir Mon Feb 22 12:30:02 2010 (r44294)
@@ -2,7 +2,7 @@
#$Id$
# Sample creating of "Hello World" program using Packfile PMCs.
.sub 'main'
- .local pmc pf, pfdir, pffixup, pfbc, pfconst
+ .local pmc pf, pfdir, pffixup, pfbc, pfconst, oplib
# Hello World is something like
# .sub 'hello'
@@ -40,15 +40,19 @@
# Generate bytecode
pfbc = new 'PackfileRawSegment'
+ oplib = new 'OpLib'
- # There is our function
- pfbc[0] = 0x1d1 # say_sc
+ # Here is our function
+ $I0 = oplib['say_sc']
+ pfbc[0] = $I0
pfbc[1] = 0x002 # constant id.
- pfbc[2] = 0x026 # set_return_pc
+ $I0 = oplib['set_returns_pc']
+ pfbc[2] = $I0
pfbc[3] = 0x001 # id of FIA
- pfbc[4] = 0x020 # returncc
+ $I0 = oplib['returncc']
+ pfbc[4] = $I0
# Store bytecode
pfdir['BYTECODE_hello.pir'] = pfbc
Modified: branches/boehm_gc_2/examples/sdl/anim_image.pir
==============================================================================
--- branches/boehm_gc_2/examples/sdl/anim_image.pir Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/examples/sdl/anim_image.pir Mon Feb 22 12:30:02 2010 (r44294)
@@ -96,7 +96,7 @@
.local pmc rect
.local pmc rect_array
- rect_array = new 'Array'
+ rect_array = new 'ResizablePMCArray'
set rect_array, 2
_loop:
Modified: branches/boehm_gc_2/examples/sdl/bounce_parrot_logo.pir
==============================================================================
--- branches/boehm_gc_2/examples/sdl/bounce_parrot_logo.pir Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/examples/sdl/bounce_parrot_logo.pir Mon Feb 22 12:30:02 2010 (r44294)
@@ -176,7 +176,7 @@
.local pmc prev_rect
.local pmc rect
.local pmc rect_array
- rect_array = new 'Array'
+ rect_array = new 'ResizablePMCArray'
set rect_array, 2
(prev_rect, rect) = sprite.'draw_undraw'( screen )
Modified: branches/boehm_gc_2/examples/sdl/move_parrot_logo.pir
==============================================================================
--- branches/boehm_gc_2/examples/sdl/move_parrot_logo.pir Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/examples/sdl/move_parrot_logo.pir Mon Feb 22 12:30:02 2010 (r44294)
@@ -91,7 +91,7 @@
.local pmc prev_rect
.local pmc rect
.local pmc rect_array
- rect_array = new 'Array'
+ rect_array = new 'ResizablePMCArray'
set rect_array, 2
(prev_rect, rect) = sprite.'draw_undraw'( screen )
Modified: branches/boehm_gc_2/ext/nqp-rx/src/stage0/HLL-s0.pir
==============================================================================
--- branches/boehm_gc_2/ext/nqp-rx/src/stage0/HLL-s0.pir Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/ext/nqp-rx/src/stage0/HLL-s0.pir Mon Feb 22 12:30:02 2010 (r44294)
@@ -854,7 +854,7 @@
### .include 'gen/hllgrammar-grammar.pir'
.namespace []
-.sub "_block11" :anon :subid("10_1261064003.48945")
+.sub "_block11" :anon :subid("10_1266337337.07931")
.annotate "line", 0
get_hll_global $P14, ["HLL";"Grammar"], "_block13"
capture_lex $P14
@@ -868,9 +868,9 @@
.namespace []
-.sub "" :load :init :subid("post94") :outer("10_1261064003.48945")
+.sub "" :load :init :subid("post94") :outer("10_1266337337.07931")
.annotate "line", 0
- .const 'Sub' $P12 = "10_1261064003.48945"
+ .const 'Sub' $P12 = "10_1266337337.07931"
.local pmc block
set block, $P12
$P297 = get_root_global ["parrot"], "P6metaclass"
@@ -879,78 +879,78 @@
.namespace ["HLL";"Grammar"]
-.sub "_block13" :subid("11_1261064003.48945") :outer("10_1261064003.48945")
+.sub "_block13" :subid("11_1266337337.07931") :outer("10_1266337337.07931")
.annotate "line", 5
- .const 'Sub' $P286 = "92_1261064003.48945"
+ .const 'Sub' $P286 = "92_1266337337.07931"
capture_lex $P286
- .const 'Sub' $P279 = "90_1261064003.48945"
+ .const 'Sub' $P279 = "90_1266337337.07931"
capture_lex $P279
- .const 'Sub' $P266 = "87_1261064003.48945"
+ .const 'Sub' $P266 = "87_1266337337.07931"
capture_lex $P266
- .const 'Sub' $P261 = "85_1261064003.48945"
+ .const 'Sub' $P261 = "85_1266337337.07931"
capture_lex $P261
- .const 'Sub' $P255 = "83_1261064003.48945"
+ .const 'Sub' $P255 = "83_1266337337.07931"
capture_lex $P255
- .const 'Sub' $P249 = "81_1261064003.48945"
+ .const 'Sub' $P249 = "81_1266337337.07931"
capture_lex $P249
- .const 'Sub' $P244 = "79_1261064003.48945"
+ .const 'Sub' $P244 = "79_1266337337.07931"
capture_lex $P244
- .const 'Sub' $P239 = "77_1261064003.48945"
+ .const 'Sub' $P239 = "77_1266337337.07931"
capture_lex $P239
- .const 'Sub' $P234 = "75_1261064003.48945"
+ .const 'Sub' $P234 = "75_1266337337.07931"
capture_lex $P234
- .const 'Sub' $P229 = "73_1261064003.48945"
+ .const 'Sub' $P229 = "73_1266337337.07931"
capture_lex $P229
- .const 'Sub' $P224 = "71_1261064003.48945"
+ .const 'Sub' $P224 = "71_1266337337.07931"
capture_lex $P224
- .const 'Sub' $P219 = "69_1261064003.48945"
+ .const 'Sub' $P219 = "69_1266337337.07931"
capture_lex $P219
- .const 'Sub' $P208 = "65_1261064003.48945"
+ .const 'Sub' $P208 = "65_1266337337.07931"
capture_lex $P208
- .const 'Sub' $P195 = "63_1261064003.48945"
+ .const 'Sub' $P195 = "63_1266337337.07931"
capture_lex $P195
- .const 'Sub' $P183 = "61_1261064003.48945"
+ .const 'Sub' $P183 = "61_1266337337.07931"
capture_lex $P183
- .const 'Sub' $P176 = "59_1261064003.48945"
+ .const 'Sub' $P176 = "59_1266337337.07931"
capture_lex $P176
- .const 'Sub' $P167 = "57_1261064003.48945"
+ .const 'Sub' $P167 = "57_1266337337.07931"
capture_lex $P167
- .const 'Sub' $P160 = "55_1261064003.48945"
+ .const 'Sub' $P160 = "55_1266337337.07931"
capture_lex $P160
- .const 'Sub' $P151 = "53_1261064003.48945"
+ .const 'Sub' $P151 = "53_1266337337.07931"
capture_lex $P151
- .const 'Sub' $P144 = "51_1261064003.48945"
+ .const 'Sub' $P144 = "51_1266337337.07931"
capture_lex $P144
- .const 'Sub' $P135 = "49_1261064003.48945"
+ .const 'Sub' $P135 = "49_1266337337.07931"
capture_lex $P135
- .const 'Sub' $P128 = "47_1261064003.48945"
+ .const 'Sub' $P128 = "47_1266337337.07931"
capture_lex $P128
- .const 'Sub' $P121 = "45_1261064003.48945"
+ .const 'Sub' $P121 = "45_1266337337.07931"
capture_lex $P121
- .const 'Sub' $P111 = "43_1261064003.48945"
+ .const 'Sub' $P111 = "43_1266337337.07931"
capture_lex $P111
- .const 'Sub' $P103 = "41_1261064003.48945"
+ .const 'Sub' $P103 = "41_1266337337.07931"
capture_lex $P103
- .const 'Sub' $P93 = "40_1261064003.48945"
+ .const 'Sub' $P93 = "40_1266337337.07931"
capture_lex $P93
- .const 'Sub' $P87 = "38_1261064003.48945"
+ .const 'Sub' $P87 = "38_1266337337.07931"
capture_lex $P87
- .const 'Sub' $P82 = "36_1261064003.48945"
+ .const 'Sub' $P82 = "36_1266337337.07931"
capture_lex $P82
- .const 'Sub' $P74 = "34_1261064003.48945"
+ .const 'Sub' $P74 = "34_1266337337.07931"
capture_lex $P74
- .const 'Sub' $P68 = "32_1261064003.48945"
+ .const 'Sub' $P68 = "32_1266337337.07931"
capture_lex $P68
- .const 'Sub' $P62 = "30_1261064003.48945"
+ .const 'Sub' $P62 = "30_1266337337.07931"
capture_lex $P62
- .const 'Sub' $P56 = "28_1261064003.48945"
+ .const 'Sub' $P56 = "28_1266337337.07931"
capture_lex $P56
- .const 'Sub' $P23 = "14_1261064003.48945"
+ .const 'Sub' $P23 = "14_1266337337.07931"
capture_lex $P23
- .const 'Sub' $P15 = "12_1261064003.48945"
+ .const 'Sub' $P15 = "12_1266337337.07931"
capture_lex $P15
.annotate "line", 33
- .const 'Sub' $P286 = "92_1261064003.48945"
+ .const 'Sub' $P286 = "92_1266337337.07931"
capture_lex $P286
.annotate "line", 5
.return ($P286)
@@ -958,7 +958,7 @@
.namespace ["HLL";"Grammar"]
-.sub "ws" :subid("12_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "ws" :subid("12_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 5
.local string rx16_tgt
.local int rx16_pos
@@ -1042,7 +1042,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__ws" :subid("13_1261064003.48945") :method
+.sub "!PREFIX__ws" :subid("13_1266337337.07931") :method
.annotate "line", 5
new $P18, "ResizablePMCArray"
push $P18, ""
@@ -1051,7 +1051,7 @@
.namespace ["HLL";"Grammar"]
-.sub "termish" :subid("14_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "termish" :subid("14_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 5
.local string rx24_tgt
.local int rx24_pos
@@ -1061,7 +1061,7 @@
.local pmc rx24_cur
(rx24_cur, rx24_pos, rx24_tgt) = self."!cursor_start"()
rx24_cur."!cursor_debug"("START ", "termish")
- rx24_cur."!cursor_caparray"("prefixish", "postfixish")
+ rx24_cur."!cursor_caparray"("postfixish", "prefixish")
.lex unicode:"$\x{a2}", rx24_cur
.local pmc match
.lex "$/", match
@@ -1143,7 +1143,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__termish" :subid("15_1261064003.48945") :method
+.sub "!PREFIX__termish" :subid("15_1266337337.07931") :method
.annotate "line", 5
new $P26, "ResizablePMCArray"
push $P26, ""
@@ -1152,7 +1152,7 @@
.namespace ["HLL";"Grammar"]
-.sub "term" :subid("16_1261064003.48945") :method
+.sub "term" :subid("16_1266337337.07931") :method
.annotate "line", 13
$P33 = self."!protoregex"("term")
.return ($P33)
@@ -1160,7 +1160,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__term" :subid("17_1261064003.48945") :method
+.sub "!PREFIX__term" :subid("17_1266337337.07931") :method
.annotate "line", 13
$P35 = self."!PREFIX__!protoregex"("term")
.return ($P35)
@@ -1168,7 +1168,7 @@
.namespace ["HLL";"Grammar"]
-.sub "infix" :subid("18_1261064003.48945") :method
+.sub "infix" :subid("18_1266337337.07931") :method
.annotate "line", 14
$P37 = self."!protoregex"("infix")
.return ($P37)
@@ -1176,7 +1176,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__infix" :subid("19_1261064003.48945") :method
+.sub "!PREFIX__infix" :subid("19_1266337337.07931") :method
.annotate "line", 14
$P39 = self."!PREFIX__!protoregex"("infix")
.return ($P39)
@@ -1184,7 +1184,7 @@
.namespace ["HLL";"Grammar"]
-.sub "prefix" :subid("20_1261064003.48945") :method
+.sub "prefix" :subid("20_1266337337.07931") :method
.annotate "line", 15
$P41 = self."!protoregex"("prefix")
.return ($P41)
@@ -1192,7 +1192,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__prefix" :subid("21_1261064003.48945") :method
+.sub "!PREFIX__prefix" :subid("21_1266337337.07931") :method
.annotate "line", 15
$P43 = self."!PREFIX__!protoregex"("prefix")
.return ($P43)
@@ -1200,7 +1200,7 @@
.namespace ["HLL";"Grammar"]
-.sub "postfix" :subid("22_1261064003.48945") :method
+.sub "postfix" :subid("22_1266337337.07931") :method
.annotate "line", 16
$P45 = self."!protoregex"("postfix")
.return ($P45)
@@ -1208,7 +1208,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__postfix" :subid("23_1261064003.48945") :method
+.sub "!PREFIX__postfix" :subid("23_1266337337.07931") :method
.annotate "line", 16
$P47 = self."!PREFIX__!protoregex"("postfix")
.return ($P47)
@@ -1216,7 +1216,7 @@
.namespace ["HLL";"Grammar"]
-.sub "circumfix" :subid("24_1261064003.48945") :method
+.sub "circumfix" :subid("24_1266337337.07931") :method
.annotate "line", 17
$P49 = self."!protoregex"("circumfix")
.return ($P49)
@@ -1224,7 +1224,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__circumfix" :subid("25_1261064003.48945") :method
+.sub "!PREFIX__circumfix" :subid("25_1266337337.07931") :method
.annotate "line", 17
$P51 = self."!PREFIX__!protoregex"("circumfix")
.return ($P51)
@@ -1232,7 +1232,7 @@
.namespace ["HLL";"Grammar"]
-.sub "postcircumfix" :subid("26_1261064003.48945") :method
+.sub "postcircumfix" :subid("26_1266337337.07931") :method
.annotate "line", 18
$P53 = self."!protoregex"("postcircumfix")
.return ($P53)
@@ -1240,7 +1240,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__postcircumfix" :subid("27_1261064003.48945") :method
+.sub "!PREFIX__postcircumfix" :subid("27_1266337337.07931") :method
.annotate "line", 18
$P55 = self."!PREFIX__!protoregex"("postcircumfix")
.return ($P55)
@@ -1248,7 +1248,7 @@
.namespace ["HLL";"Grammar"]
-.sub "term:sym<circumfix>" :subid("28_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "term:sym<circumfix>" :subid("28_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 5
.local string rx57_tgt
.local int rx57_pos
@@ -1306,7 +1306,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__term:sym<circumfix>" :subid("29_1261064003.48945") :method
+.sub "!PREFIX__term:sym<circumfix>" :subid("29_1266337337.07931") :method
.annotate "line", 5
$P59 = self."!PREFIX__!subrule"("circumfix", "")
new $P60, "ResizablePMCArray"
@@ -1316,7 +1316,7 @@
.namespace ["HLL";"Grammar"]
-.sub "infixish" :subid("30_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "infixish" :subid("30_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 5
.local string rx63_tgt
.local int rx63_pos
@@ -1374,7 +1374,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__infixish" :subid("31_1261064003.48945") :method
+.sub "!PREFIX__infixish" :subid("31_1266337337.07931") :method
.annotate "line", 5
$P65 = self."!PREFIX__!subrule"("OPER=infix", "")
new $P66, "ResizablePMCArray"
@@ -1384,7 +1384,7 @@
.namespace ["HLL";"Grammar"]
-.sub "prefixish" :subid("32_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "prefixish" :subid("32_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 5
.local string rx69_tgt
.local int rx69_pos
@@ -1447,7 +1447,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__prefixish" :subid("33_1261064003.48945") :method
+.sub "!PREFIX__prefixish" :subid("33_1266337337.07931") :method
.annotate "line", 5
$P71 = self."!PREFIX__!subrule"("OPER=prefix", "")
new $P72, "ResizablePMCArray"
@@ -1457,7 +1457,7 @@
.namespace ["HLL";"Grammar"]
-.sub "postfixish" :subid("34_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "postfixish" :subid("34_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 5
.local string rx75_tgt
.local int rx75_pos
@@ -1531,7 +1531,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__postfixish" :subid("35_1261064003.48945") :method
+.sub "!PREFIX__postfixish" :subid("35_1266337337.07931") :method
.annotate "line", 5
$P77 = self."!PREFIX__!subrule"("OPER=postcircumfix", "")
$P78 = self."!PREFIX__!subrule"("OPER=postfix", "")
@@ -1543,7 +1543,7 @@
.namespace ["HLL";"Grammar"]
-.sub "nullterm" :subid("36_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "nullterm" :subid("36_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 5
.local string rx83_tgt
.local int rx83_pos
@@ -1594,7 +1594,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__nullterm" :subid("37_1261064003.48945") :method
+.sub "!PREFIX__nullterm" :subid("37_1266337337.07931") :method
.annotate "line", 5
new $P85, "ResizablePMCArray"
push $P85, ""
@@ -1603,7 +1603,7 @@
.namespace ["HLL";"Grammar"]
-.sub "nullterm_alt" :subid("38_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "nullterm_alt" :subid("38_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 5
.local string rx88_tgt
.local int rx88_pos
@@ -1661,7 +1661,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__nullterm_alt" :subid("39_1261064003.48945") :method
+.sub "!PREFIX__nullterm_alt" :subid("39_1266337337.07931") :method
.annotate "line", 5
$P90 = self."!PREFIX__!subrule"("term", "")
new $P91, "ResizablePMCArray"
@@ -1671,7 +1671,7 @@
.namespace ["HLL";"Grammar"]
-.sub "nulltermish" :subid("40_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "nulltermish" :subid("40_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 33
new $P95, 'ExceptionHandler'
set_addr $P95, control_94
@@ -1698,7 +1698,7 @@
.namespace ["HLL";"Grammar"]
-.sub "quote_delimited" :subid("41_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "quote_delimited" :subid("41_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 33
.local string rx104_tgt
.local int rx104_pos
@@ -1780,7 +1780,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__quote_delimited" :subid("42_1261064003.48945") :method
+.sub "!PREFIX__quote_delimited" :subid("42_1266337337.07931") :method
.annotate "line", 33
$P106 = self."!PREFIX__!subrule"("starter", "")
new $P107, "ResizablePMCArray"
@@ -1790,7 +1790,7 @@
.namespace ["HLL";"Grammar"]
-.sub "quote_atom" :subid("43_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "quote_atom" :subid("43_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 33
.local string rx112_tgt
.local int rx112_pos
@@ -1881,7 +1881,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__quote_atom" :subid("44_1261064003.48945") :method
+.sub "!PREFIX__quote_atom" :subid("44_1266337337.07931") :method
.annotate "line", 33
new $P114, "ResizablePMCArray"
push $P114, ""
@@ -1890,7 +1890,7 @@
.namespace ["HLL";"Grammar"]
-.sub "decint" :subid("45_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "decint" :subid("45_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 33
.local string rx122_tgt
.local int rx122_pos
@@ -1962,7 +1962,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__decint" :subid("46_1261064003.48945") :method
+.sub "!PREFIX__decint" :subid("46_1266337337.07931") :method
.annotate "line", 33
new $P124, "ResizablePMCArray"
push $P124, ""
@@ -1971,7 +1971,7 @@
.namespace ["HLL";"Grammar"]
-.sub "hexints" :subid("47_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "hexints" :subid("47_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 33
.local string rx129_tgt
.local int rx129_pos
@@ -2055,7 +2055,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__hexints" :subid("48_1261064003.48945") :method
+.sub "!PREFIX__hexints" :subid("48_1266337337.07931") :method
.annotate "line", 33
new $P131, "ResizablePMCArray"
push $P131, ""
@@ -2064,7 +2064,7 @@
.namespace ["HLL";"Grammar"]
-.sub "hexint" :subid("49_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "hexint" :subid("49_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 33
.local string rx136_tgt
.local int rx136_pos
@@ -2145,7 +2145,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__hexint" :subid("50_1261064003.48945") :method
+.sub "!PREFIX__hexint" :subid("50_1266337337.07931") :method
.annotate "line", 33
new $P138, "ResizablePMCArray"
push $P138, ""
@@ -2154,7 +2154,7 @@
.namespace ["HLL";"Grammar"]
-.sub "hexints" :subid("51_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "hexints" :subid("51_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 33
.local string rx145_tgt
.local int rx145_pos
@@ -2238,7 +2238,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__hexints" :subid("52_1261064003.48945") :method
+.sub "!PREFIX__hexints" :subid("52_1266337337.07931") :method
.annotate "line", 33
new $P147, "ResizablePMCArray"
push $P147, ""
@@ -2247,7 +2247,7 @@
.namespace ["HLL";"Grammar"]
-.sub "octint" :subid("53_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "octint" :subid("53_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 33
.local string rx152_tgt
.local int rx152_pos
@@ -2328,7 +2328,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__octint" :subid("54_1261064003.48945") :method
+.sub "!PREFIX__octint" :subid("54_1266337337.07931") :method
.annotate "line", 33
new $P154, "ResizablePMCArray"
push $P154, ""
@@ -2337,7 +2337,7 @@
.namespace ["HLL";"Grammar"]
-.sub "octints" :subid("55_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "octints" :subid("55_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 33
.local string rx161_tgt
.local int rx161_pos
@@ -2421,7 +2421,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__octints" :subid("56_1261064003.48945") :method
+.sub "!PREFIX__octints" :subid("56_1266337337.07931") :method
.annotate "line", 33
new $P163, "ResizablePMCArray"
push $P163, ""
@@ -2430,7 +2430,7 @@
.namespace ["HLL";"Grammar"]
-.sub "binint" :subid("57_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "binint" :subid("57_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 33
.local string rx168_tgt
.local int rx168_pos
@@ -2511,7 +2511,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__binint" :subid("58_1261064003.48945") :method
+.sub "!PREFIX__binint" :subid("58_1266337337.07931") :method
.annotate "line", 33
new $P170, "ResizablePMCArray"
push $P170, ""
@@ -2520,7 +2520,7 @@
.namespace ["HLL";"Grammar"]
-.sub "binints" :subid("59_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "binints" :subid("59_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 33
.local string rx177_tgt
.local int rx177_pos
@@ -2604,7 +2604,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__binints" :subid("60_1261064003.48945") :method
+.sub "!PREFIX__binints" :subid("60_1266337337.07931") :method
.annotate "line", 33
new $P179, "ResizablePMCArray"
push $P179, ""
@@ -2613,7 +2613,7 @@
.namespace ["HLL";"Grammar"]
-.sub "integer" :subid("61_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "integer" :subid("61_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 33
.local string rx184_tgt
.local int rx184_pos
@@ -2761,7 +2761,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__integer" :subid("62_1261064003.48945") :method
+.sub "!PREFIX__integer" :subid("62_1266337337.07931") :method
.annotate "line", 33
$P186 = self."!PREFIX__!subrule"("VALUE=decint", "")
$P187 = self."!PREFIX__!subrule"("VALUE=decint", "0d")
@@ -2779,7 +2779,7 @@
.namespace ["HLL";"Grammar"]
-.sub "dec_number" :subid("63_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "dec_number" :subid("63_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 33
.local string rx196_tgt
.local int rx196_pos
@@ -2958,7 +2958,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__dec_number" :subid("64_1261064003.48945") :method
+.sub "!PREFIX__dec_number" :subid("64_1266337337.07931") :method
.annotate "line", 33
new $P198, "ResizablePMCArray"
push $P198, ""
@@ -2969,7 +2969,7 @@
.namespace ["HLL";"Grammar"]
-.sub "escale" :subid("65_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "escale" :subid("65_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 33
.local string rx209_tgt
.local int rx209_pos
@@ -3046,7 +3046,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__escale" :subid("66_1261064003.48945") :method
+.sub "!PREFIX__escale" :subid("66_1266337337.07931") :method
.annotate "line", 33
new $P211, "ResizablePMCArray"
push $P211, "e"
@@ -3056,7 +3056,7 @@
.namespace ["HLL";"Grammar"]
-.sub "quote_escape" :subid("67_1261064003.48945") :method
+.sub "quote_escape" :subid("67_1266337337.07931") :method
.annotate "line", 79
$P216 = self."!protoregex"("quote_escape")
.return ($P216)
@@ -3064,7 +3064,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__quote_escape" :subid("68_1261064003.48945") :method
+.sub "!PREFIX__quote_escape" :subid("68_1266337337.07931") :method
.annotate "line", 79
$P218 = self."!PREFIX__!protoregex"("quote_escape")
.return ($P218)
@@ -3072,7 +3072,7 @@
.namespace ["HLL";"Grammar"]
-.sub "quote_escape:sym<backslash>" :subid("69_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "quote_escape:sym<backslash>" :subid("69_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 33
.local string rx220_tgt
.local int rx220_pos
@@ -3134,7 +3134,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__quote_escape:sym<backslash>" :subid("70_1261064003.48945") :method
+.sub "!PREFIX__quote_escape:sym<backslash>" :subid("70_1266337337.07931") :method
.annotate "line", 33
new $P222, "ResizablePMCArray"
push $P222, "\\\\"
@@ -3143,7 +3143,7 @@
.namespace ["HLL";"Grammar"]
-.sub "quote_escape:sym<stopper>" :subid("71_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "quote_escape:sym<stopper>" :subid("71_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 33
.local string rx225_tgt
.local int rx225_pos
@@ -3212,7 +3212,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__quote_escape:sym<stopper>" :subid("72_1261064003.48945") :method
+.sub "!PREFIX__quote_escape:sym<stopper>" :subid("72_1266337337.07931") :method
.annotate "line", 33
new $P227, "ResizablePMCArray"
push $P227, "\\"
@@ -3221,7 +3221,7 @@
.namespace ["HLL";"Grammar"]
-.sub "quote_escape:sym<bs>" :subid("73_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "quote_escape:sym<bs>" :subid("73_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 33
.local string rx230_tgt
.local int rx230_pos
@@ -3283,7 +3283,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__quote_escape:sym<bs>" :subid("74_1261064003.48945") :method
+.sub "!PREFIX__quote_escape:sym<bs>" :subid("74_1266337337.07931") :method
.annotate "line", 33
new $P232, "ResizablePMCArray"
push $P232, "\\b"
@@ -3292,7 +3292,7 @@
.namespace ["HLL";"Grammar"]
-.sub "quote_escape:sym<nl>" :subid("75_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "quote_escape:sym<nl>" :subid("75_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 33
.local string rx235_tgt
.local int rx235_pos
@@ -3354,7 +3354,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__quote_escape:sym<nl>" :subid("76_1261064003.48945") :method
+.sub "!PREFIX__quote_escape:sym<nl>" :subid("76_1266337337.07931") :method
.annotate "line", 33
new $P237, "ResizablePMCArray"
push $P237, "\\n"
@@ -3363,7 +3363,7 @@
.namespace ["HLL";"Grammar"]
-.sub "quote_escape:sym<cr>" :subid("77_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "quote_escape:sym<cr>" :subid("77_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 33
.local string rx240_tgt
.local int rx240_pos
@@ -3425,7 +3425,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__quote_escape:sym<cr>" :subid("78_1261064003.48945") :method
+.sub "!PREFIX__quote_escape:sym<cr>" :subid("78_1266337337.07931") :method
.annotate "line", 33
new $P242, "ResizablePMCArray"
push $P242, "\\r"
@@ -3434,7 +3434,7 @@
.namespace ["HLL";"Grammar"]
-.sub "quote_escape:sym<tab>" :subid("79_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "quote_escape:sym<tab>" :subid("79_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 33
.local string rx245_tgt
.local int rx245_pos
@@ -3496,7 +3496,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__quote_escape:sym<tab>" :subid("80_1261064003.48945") :method
+.sub "!PREFIX__quote_escape:sym<tab>" :subid("80_1266337337.07931") :method
.annotate "line", 33
new $P247, "ResizablePMCArray"
push $P247, "\\t"
@@ -3505,7 +3505,7 @@
.namespace ["HLL";"Grammar"]
-.sub "quote_escape:sym<hex>" :subid("81_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "quote_escape:sym<hex>" :subid("81_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 33
.local string rx250_tgt
.local int rx250_pos
@@ -3603,7 +3603,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__quote_escape:sym<hex>" :subid("82_1261064003.48945") :method
+.sub "!PREFIX__quote_escape:sym<hex>" :subid("82_1266337337.07931") :method
.annotate "line", 33
new $P252, "ResizablePMCArray"
push $P252, unicode:"\\x"
@@ -3612,7 +3612,7 @@
.namespace ["HLL";"Grammar"]
-.sub "quote_escape:sym<oct>" :subid("83_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "quote_escape:sym<oct>" :subid("83_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 33
.local string rx256_tgt
.local int rx256_pos
@@ -3710,7 +3710,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__quote_escape:sym<oct>" :subid("84_1261064003.48945") :method
+.sub "!PREFIX__quote_escape:sym<oct>" :subid("84_1266337337.07931") :method
.annotate "line", 33
new $P258, "ResizablePMCArray"
push $P258, "\\o"
@@ -3719,7 +3719,7 @@
.namespace ["HLL";"Grammar"]
-.sub "quote_escape:sym<chr>" :subid("85_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "quote_escape:sym<chr>" :subid("85_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 33
.local string rx262_tgt
.local int rx262_pos
@@ -3788,7 +3788,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__quote_escape:sym<chr>" :subid("86_1261064003.48945") :method
+.sub "!PREFIX__quote_escape:sym<chr>" :subid("86_1266337337.07931") :method
.annotate "line", 33
new $P264, "ResizablePMCArray"
push $P264, "\\c"
@@ -3797,9 +3797,9 @@
.namespace ["HLL";"Grammar"]
-.sub "charname" :subid("87_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "charname" :subid("87_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 33
- .const 'Sub' $P276 = "89_1261064003.48945"
+ .const 'Sub' $P276 = "89_1266337337.07931"
capture_lex $P276
.local string rx267_tgt
.local int rx267_pos
@@ -3877,7 +3877,7 @@
.annotate "line", 100
# rx subrule "before" subtype=zerowidth negate=
rx267_cur."!cursor_pos"(rx267_pos)
- .const 'Sub' $P276 = "89_1261064003.48945"
+ .const 'Sub' $P276 = "89_1266337337.07931"
capture_lex $P276
$P10 = rx267_cur."before"($P276)
unless $P10, rx267_fail
@@ -3902,7 +3902,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__charname" :subid("88_1261064003.48945") :method
+.sub "!PREFIX__charname" :subid("88_1266337337.07931") :method
.annotate "line", 33
$P269 = self."!PREFIX__!subrule"("integer", "")
new $P270, "ResizablePMCArray"
@@ -3964,7 +3964,7 @@
.namespace ["HLL";"Grammar"]
-.sub "_block275" :anon :subid("89_1261064003.48945") :method :outer("87_1261064003.48945")
+.sub "_block275" :anon :subid("89_1266337337.07931") :method :outer("87_1266337337.07931")
.annotate "line", 100
.local string rx277_tgt
.local int rx277_pos
@@ -4024,7 +4024,7 @@
.namespace ["HLL";"Grammar"]
-.sub "charnames" :subid("90_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "charnames" :subid("90_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 33
.local string rx280_tgt
.local int rx280_pos
@@ -4108,7 +4108,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__charnames" :subid("91_1261064003.48945") :method
+.sub "!PREFIX__charnames" :subid("91_1266337337.07931") :method
.annotate "line", 33
new $P282, "ResizablePMCArray"
push $P282, ""
@@ -4117,7 +4117,7 @@
.namespace ["HLL";"Grammar"]
-.sub "charspec" :subid("92_1261064003.48945") :method :outer("11_1261064003.48945")
+.sub "charspec" :subid("92_1266337337.07931") :method :outer("11_1266337337.07931")
.annotate "line", 33
.local string rx287_tgt
.local int rx287_pos
@@ -4247,7 +4247,7 @@
.namespace ["HLL";"Grammar"]
-.sub "!PREFIX__charspec" :subid("93_1261064003.48945") :method
+.sub "!PREFIX__charspec" :subid("93_1266337337.07931") :method
.annotate "line", 33
$P289 = self."!PREFIX__!subrule"("", "")
$P290 = self."!PREFIX__!subrule"("charnames", "[")
@@ -4289,91 +4289,99 @@
### .include 'gen/hllgrammar-actions.pir'
.namespace []
-.sub "_block11" :anon :subid("10_1261064005.70696")
+.sub "_block11" :anon :subid("10_1266337339.18354")
.annotate "line", 0
get_hll_global $P14, ["HLL";"Actions"], "_block13"
capture_lex $P14
.annotate "line", 3
get_hll_global $P14, ["HLL";"Actions"], "_block13"
capture_lex $P14
- $P451 = $P14()
+ $P534 = $P14()
.annotate "line", 1
- .return ($P451)
+ .return ($P534)
.end
.namespace []
-.sub "" :load :init :subid("post41") :outer("10_1261064005.70696")
+.sub "" :load :init :subid("post46") :outer("10_1266337339.18354")
.annotate "line", 0
- .const 'Sub' $P12 = "10_1261064005.70696"
+ .const 'Sub' $P12 = "10_1266337339.18354"
.local pmc block
set block, $P12
- $P452 = get_root_global ["parrot"], "P6metaclass"
- $P452."new_class"("HLL::Actions")
+ $P535 = get_root_global ["parrot"], "P6metaclass"
+ $P535."new_class"("HLL::Actions")
.end
.namespace ["HLL";"Actions"]
-.sub "_block13" :subid("11_1261064005.70696") :outer("10_1261064005.70696")
+.sub "_block13" :subid("11_1266337339.18354") :outer("10_1266337339.18354")
.annotate "line", 3
- .const 'Sub' $P434 = "40_1261064005.70696"
+ .const 'Sub' $P517 = "45_1266337339.18354"
+ capture_lex $P517
+ .const 'Sub' $P492 = "43_1266337339.18354"
+ capture_lex $P492
+ .const 'Sub' $P461 = "42_1266337339.18354"
+ capture_lex $P461
+ .const 'Sub' $P451 = "41_1266337339.18354"
+ capture_lex $P451
+ .const 'Sub' $P434 = "40_1266337339.18354"
capture_lex $P434
- .const 'Sub' $P417 = "39_1261064005.70696"
+ .const 'Sub' $P417 = "39_1266337339.18354"
capture_lex $P417
- .const 'Sub' $P410 = "38_1261064005.70696"
+ .const 'Sub' $P410 = "38_1266337339.18354"
capture_lex $P410
- .const 'Sub' $P403 = "37_1261064005.70696"
+ .const 'Sub' $P403 = "37_1266337339.18354"
capture_lex $P403
- .const 'Sub' $P396 = "36_1261064005.70696"
+ .const 'Sub' $P396 = "36_1266337339.18354"
capture_lex $P396
- .const 'Sub' $P389 = "35_1261064005.70696"
+ .const 'Sub' $P389 = "35_1266337339.18354"
capture_lex $P389
- .const 'Sub' $P379 = "34_1261064005.70696"
+ .const 'Sub' $P379 = "34_1266337339.18354"
capture_lex $P379
- .const 'Sub' $P372 = "33_1261064005.70696"
+ .const 'Sub' $P372 = "33_1266337339.18354"
capture_lex $P372
- .const 'Sub' $P356 = "32_1261064005.70696"
+ .const 'Sub' $P356 = "32_1266337339.18354"
capture_lex $P356
- .const 'Sub' $P281 = "30_1261064005.70696"
+ .const 'Sub' $P281 = "30_1266337339.18354"
capture_lex $P281
- .const 'Sub' $P222 = "27_1261064005.70696"
+ .const 'Sub' $P222 = "27_1266337339.18354"
capture_lex $P222
- .const 'Sub' $P213 = "26_1261064005.70696"
+ .const 'Sub' $P213 = "26_1266337339.18354"
capture_lex $P213
- .const 'Sub' $P204 = "25_1261064005.70696"
+ .const 'Sub' $P204 = "25_1266337339.18354"
capture_lex $P204
- .const 'Sub' $P195 = "24_1261064005.70696"
+ .const 'Sub' $P195 = "24_1266337339.18354"
capture_lex $P195
- .const 'Sub' $P186 = "23_1261064005.70696"
+ .const 'Sub' $P186 = "23_1266337339.18354"
capture_lex $P186
- .const 'Sub' $P177 = "22_1261064005.70696"
+ .const 'Sub' $P177 = "22_1266337339.18354"
capture_lex $P177
- .const 'Sub' $P167 = "21_1261064005.70696"
+ .const 'Sub' $P167 = "21_1266337339.18354"
capture_lex $P167
- .const 'Sub' $P157 = "20_1261064005.70696"
+ .const 'Sub' $P157 = "20_1266337339.18354"
capture_lex $P157
- .const 'Sub' $P149 = "19_1261064005.70696"
+ .const 'Sub' $P149 = "19_1266337339.18354"
capture_lex $P149
- .const 'Sub' $P139 = "18_1261064005.70696"
+ .const 'Sub' $P139 = "18_1266337339.18354"
capture_lex $P139
- .const 'Sub' $P129 = "17_1261064005.70696"
+ .const 'Sub' $P129 = "17_1266337339.18354"
capture_lex $P129
- .const 'Sub' $P28 = "14_1261064005.70696"
+ .const 'Sub' $P28 = "14_1266337339.18354"
capture_lex $P28
- .const 'Sub' $P22 = "13_1261064005.70696"
+ .const 'Sub' $P22 = "13_1266337339.18354"
capture_lex $P22
- .const 'Sub' $P15 = "12_1261064005.70696"
+ .const 'Sub' $P15 = "12_1266337339.18354"
capture_lex $P15
-.annotate "line", 163
- .const 'Sub' $P434 = "40_1261064005.70696"
- capture_lex $P434
+.annotate "line", 185
+ .const 'Sub' $P517 = "45_1266337339.18354"
+ capture_lex $P517
.annotate "line", 3
- .return ($P434)
+ .return ($P517)
.end
.namespace ["HLL";"Actions"]
-.sub "string_to_int" :subid("12_1261064005.70696") :outer("11_1261064005.70696")
+.sub "string_to_int" :subid("12_1266337339.18354") :outer("11_1266337339.18354")
.param pmc param_18
.param pmc param_19
.annotate "line", 3
@@ -4426,7 +4434,7 @@
.namespace ["HLL";"Actions"]
-.sub "ints_to_string" :subid("13_1261064005.70696") :outer("11_1261064005.70696")
+.sub "ints_to_string" :subid("13_1266337339.18354") :outer("11_1266337339.18354")
.param pmc param_25
.annotate "line", 37
new $P24, 'ExceptionHandler'
@@ -4467,14 +4475,14 @@
.namespace ["HLL";"Actions"]
-.sub "EXPR" :subid("14_1261064005.70696") :method :outer("11_1261064005.70696")
+.sub "EXPR" :subid("14_1266337339.18354") :method :outer("11_1266337339.18354")
.param pmc param_31
.param pmc param_32 :optional
.param int has_param_32 :opt_flag
.annotate "line", 62
- .const 'Sub' $P111 = "16_1261064005.70696"
+ .const 'Sub' $P111 = "16_1266337339.18354"
capture_lex $P111
- .const 'Sub' $P78 = "15_1261064005.70696"
+ .const 'Sub' $P78 = "15_1266337339.18354"
capture_lex $P78
new $P30, 'ExceptionHandler'
set_addr $P30, control_29
@@ -4482,10 +4490,10 @@
push_eh $P30
.lex "self", self
.lex "$/", param_31
- if has_param_32, optparam_42
+ if has_param_32, optparam_47
new $P33, "Undef"
set param_32, $P33
- optparam_42:
+ optparam_47:
.lex "$key", param_32
.annotate "line", 64
new $P34, "Undef"
@@ -4507,13 +4515,13 @@
defined $I43, $P39
if $I43, default_42
find_lex $P44, "$/"
- unless_null $P44, vivify_43
+ unless_null $P44, vivify_48
new $P44, "Hash"
- vivify_43:
+ vivify_48:
set $P45, $P44["OPER"]
- unless_null $P45, vivify_44
+ unless_null $P45, vivify_49
new $P45, "Undef"
- vivify_44:
+ vivify_49:
$P46 = $P45."ast"()
set $P39, $P46
default_42:
@@ -4528,57 +4536,57 @@
store_lex "$past", $P51
.annotate "line", 67
find_lex $P53, "$/"
- unless_null $P53, vivify_45
+ unless_null $P53, vivify_50
new $P53, "Hash"
- vivify_45:
+ vivify_50:
set $P54, $P53["OPER"]
- unless_null $P54, vivify_46
+ unless_null $P54, vivify_51
new $P54, "Hash"
- vivify_46:
+ vivify_51:
set $P55, $P54["O"]
- unless_null $P55, vivify_47
+ unless_null $P55, vivify_52
new $P55, "Hash"
- vivify_47:
+ vivify_52:
set $P56, $P55["pasttype"]
- unless_null $P56, vivify_48
+ unless_null $P56, vivify_53
new $P56, "Undef"
- vivify_48:
+ vivify_53:
if $P56, if_52
.annotate "line", 68
find_lex $P64, "$/"
- unless_null $P64, vivify_49
+ unless_null $P64, vivify_54
new $P64, "Hash"
- vivify_49:
+ vivify_54:
set $P65, $P64["OPER"]
- unless_null $P65, vivify_50
+ unless_null $P65, vivify_55
new $P65, "Hash"
- vivify_50:
+ vivify_55:
set $P66, $P65["O"]
- unless_null $P66, vivify_51
+ unless_null $P66, vivify_56
new $P66, "Hash"
- vivify_51:
+ vivify_56:
set $P67, $P66["pirop"]
- unless_null $P67, vivify_52
+ unless_null $P67, vivify_57
new $P67, "Undef"
- vivify_52:
+ vivify_57:
unless $P67, if_63_end
find_lex $P68, "$past"
find_lex $P69, "$/"
- unless_null $P69, vivify_53
+ unless_null $P69, vivify_58
new $P69, "Hash"
- vivify_53:
+ vivify_58:
set $P70, $P69["OPER"]
- unless_null $P70, vivify_54
+ unless_null $P70, vivify_59
new $P70, "Hash"
- vivify_54:
+ vivify_59:
set $P71, $P70["O"]
- unless_null $P71, vivify_55
+ unless_null $P71, vivify_60
new $P71, "Hash"
- vivify_55:
+ vivify_60:
set $P72, $P71["pirop"]
- unless_null $P72, vivify_56
+ unless_null $P72, vivify_61
new $P72, "Undef"
- vivify_56:
+ vivify_61:
set $S73, $P72
$P68."pirop"($S73)
if_63_end:
@@ -4587,21 +4595,21 @@
.annotate "line", 67
find_lex $P57, "$past"
find_lex $P58, "$/"
- unless_null $P58, vivify_57
+ unless_null $P58, vivify_62
new $P58, "Hash"
- vivify_57:
+ vivify_62:
set $P59, $P58["OPER"]
- unless_null $P59, vivify_58
+ unless_null $P59, vivify_63
new $P59, "Hash"
- vivify_58:
+ vivify_63:
set $P60, $P59["O"]
- unless_null $P60, vivify_59
+ unless_null $P60, vivify_64
new $P60, "Hash"
- vivify_59:
+ vivify_64:
set $P61, $P60["pasttype"]
- unless_null $P61, vivify_60
+ unless_null $P61, vivify_65
new $P61, "Undef"
- vivify_60:
+ vivify_65:
set $S62, $P61
$P57."pasttype"($S62)
if_52_end:
@@ -4609,7 +4617,7 @@
find_lex $P75, "$past"
$P76 = $P75."name"()
if $P76, unless_74_end
- .const 'Sub' $P78 = "15_1261064005.70696"
+ .const 'Sub' $P78 = "15_1266337339.18354"
capture_lex $P78
$P78()
unless_74_end:
@@ -4623,7 +4631,7 @@
find_lex $P106, "$/"
$P107 = $P106."list"()
defined $I108, $P107
- unless $I108, for_undef_64
+ unless $I108, for_undef_69
iter $P105, $P107
new $P123, 'ExceptionHandler'
set_addr $P123, loop122_handler
@@ -4633,7 +4641,7 @@
unless $P105, loop122_done
shift $P109, $P105
loop122_redo:
- .const 'Sub' $P111 = "16_1261064005.70696"
+ .const 'Sub' $P111 = "16_1266337339.18354"
capture_lex $P111
$P111($P109)
loop122_next:
@@ -4646,20 +4654,20 @@
eq $P124, 67, loop122_redo
loop122_done:
pop_eh
- for_undef_64:
+ for_undef_69:
.annotate "line", 81
goto if_97_end
if_97:
.annotate "line", 80
find_lex $P101, "$past"
find_lex $P102, "$/"
- unless_null $P102, vivify_65
+ unless_null $P102, vivify_70
new $P102, "ResizablePMCArray"
- vivify_65:
+ vivify_70:
set $P103, $P102[0]
- unless_null $P103, vivify_66
+ unless_null $P103, vivify_71
new $P103, "Undef"
- vivify_66:
+ vivify_71:
$P104 = $P103."ast"()
$P101."unshift"($P104)
if_97_end:
@@ -4678,7 +4686,7 @@
.namespace ["HLL";"Actions"]
-.sub "_block77" :anon :subid("15_1261064005.70696") :outer("14_1261064005.70696")
+.sub "_block77" :anon :subid("15_1266337339.18354") :outer("14_1266337339.18354")
.annotate "line", 71
new $P79, "Undef"
.lex "$name", $P79
@@ -4701,17 +4709,17 @@
concat $P86, $P85, ":<"
.annotate "line", 76
find_lex $P87, "$/"
- unless_null $P87, vivify_61
+ unless_null $P87, vivify_66
new $P87, "Hash"
- vivify_61:
+ vivify_66:
set $P88, $P87["OPER"]
- unless_null $P88, vivify_62
+ unless_null $P88, vivify_67
new $P88, "Hash"
- vivify_62:
+ vivify_67:
set $P89, $P88["sym"]
- unless_null $P89, vivify_63
+ unless_null $P89, vivify_68
new $P89, "Undef"
- vivify_63:
+ vivify_68:
concat $P90, $P86, $P89
concat $P91, $P90, ">"
store_lex "$name", $P91
@@ -4728,7 +4736,7 @@
.namespace ["HLL";"Actions"]
-.sub "_block110" :anon :subid("16_1261064005.70696") :outer("14_1261064005.70696")
+.sub "_block110" :anon :subid("16_1266337339.18354") :outer("14_1266337339.18354")
.param pmc param_112
.annotate "line", 82
.lex "$_", param_112
@@ -4751,7 +4759,7 @@
.namespace ["HLL";"Actions"]
-.sub "term:sym<circumfix>" :subid("17_1261064005.70696") :method :outer("11_1261064005.70696")
+.sub "term:sym<circumfix>" :subid("17_1266337339.18354") :method :outer("11_1266337339.18354")
.param pmc param_132
.annotate "line", 87
new $P131, 'ExceptionHandler'
@@ -4762,13 +4770,13 @@
.lex "$/", param_132
find_lex $P133, "$/"
find_lex $P134, "$/"
- unless_null $P134, vivify_67
+ unless_null $P134, vivify_72
new $P134, "Hash"
- vivify_67:
+ vivify_72:
set $P135, $P134["circumfix"]
- unless_null $P135, vivify_68
+ unless_null $P135, vivify_73
new $P135, "Undef"
- vivify_68:
+ vivify_73:
$P136 = $P135."ast"()
$P137 = $P133."!make"($P136)
.return ($P137)
@@ -4781,7 +4789,7 @@
.namespace ["HLL";"Actions"]
-.sub "termish" :subid("18_1261064005.70696") :method :outer("11_1261064005.70696")
+.sub "termish" :subid("18_1266337339.18354") :method :outer("11_1266337339.18354")
.param pmc param_142
.annotate "line", 89
new $P141, 'ExceptionHandler'
@@ -4792,13 +4800,13 @@
.lex "$/", param_142
find_lex $P143, "$/"
find_lex $P144, "$/"
- unless_null $P144, vivify_69
+ unless_null $P144, vivify_74
new $P144, "Hash"
- vivify_69:
+ vivify_74:
set $P145, $P144["term"]
- unless_null $P145, vivify_70
+ unless_null $P145, vivify_75
new $P145, "Undef"
- vivify_70:
+ vivify_75:
$P146 = $P145."ast"()
$P147 = $P143."!make"($P146)
.return ($P147)
@@ -4811,7 +4819,7 @@
.namespace ["HLL";"Actions"]
-.sub "nullterm" :subid("19_1261064005.70696") :method :outer("11_1261064005.70696")
+.sub "nullterm" :subid("19_1266337339.18354") :method :outer("11_1266337339.18354")
.param pmc param_152
.annotate "line", 90
new $P151, 'ExceptionHandler'
@@ -4833,7 +4841,7 @@
.namespace ["HLL";"Actions"]
-.sub "nullterm_alt" :subid("20_1261064005.70696") :method :outer("11_1261064005.70696")
+.sub "nullterm_alt" :subid("20_1266337339.18354") :method :outer("11_1266337339.18354")
.param pmc param_160
.annotate "line", 91
new $P159, 'ExceptionHandler'
@@ -4844,13 +4852,13 @@
.lex "$/", param_160
find_lex $P161, "$/"
find_lex $P162, "$/"
- unless_null $P162, vivify_71
+ unless_null $P162, vivify_76
new $P162, "Hash"
- vivify_71:
+ vivify_76:
set $P163, $P162["term"]
- unless_null $P163, vivify_72
+ unless_null $P163, vivify_77
new $P163, "Undef"
- vivify_72:
+ vivify_77:
$P164 = $P163."ast"()
$P165 = $P161."!make"($P164)
.return ($P165)
@@ -4863,7 +4871,7 @@
.namespace ["HLL";"Actions"]
-.sub "integer" :subid("21_1261064005.70696") :method :outer("11_1261064005.70696")
+.sub "integer" :subid("21_1266337339.18354") :method :outer("11_1266337339.18354")
.param pmc param_170
.annotate "line", 93
new $P169, 'ExceptionHandler'
@@ -4874,13 +4882,13 @@
.lex "$/", param_170
find_lex $P171, "$/"
find_lex $P172, "$/"
- unless_null $P172, vivify_73
+ unless_null $P172, vivify_78
new $P172, "Hash"
- vivify_73:
+ vivify_78:
set $P173, $P172["VALUE"]
- unless_null $P173, vivify_74
+ unless_null $P173, vivify_79
new $P173, "Undef"
- vivify_74:
+ vivify_79:
$P174 = $P173."ast"()
$P175 = $P171."!make"($P174)
.return ($P175)
@@ -4893,7 +4901,7 @@
.namespace ["HLL";"Actions"]
-.sub "dec_number" :subid("22_1261064005.70696") :method :outer("11_1261064005.70696")
+.sub "dec_number" :subid("22_1266337339.18354") :method :outer("11_1266337339.18354")
.param pmc param_180
.annotate "line", 95
new $P179, 'ExceptionHandler'
@@ -4916,7 +4924,7 @@
.namespace ["HLL";"Actions"]
-.sub "decint" :subid("23_1261064005.70696") :method :outer("11_1261064005.70696")
+.sub "decint" :subid("23_1266337339.18354") :method :outer("11_1266337339.18354")
.param pmc param_189
.annotate "line", 97
new $P188, 'ExceptionHandler'
@@ -4939,7 +4947,7 @@
.namespace ["HLL";"Actions"]
-.sub "hexint" :subid("24_1261064005.70696") :method :outer("11_1261064005.70696")
+.sub "hexint" :subid("24_1266337339.18354") :method :outer("11_1266337339.18354")
.param pmc param_198
.annotate "line", 98
new $P197, 'ExceptionHandler'
@@ -4962,7 +4970,7 @@
.namespace ["HLL";"Actions"]
-.sub "octint" :subid("25_1261064005.70696") :method :outer("11_1261064005.70696")
+.sub "octint" :subid("25_1266337339.18354") :method :outer("11_1266337339.18354")
.param pmc param_207
.annotate "line", 99
new $P206, 'ExceptionHandler'
@@ -4985,7 +4993,7 @@
.namespace ["HLL";"Actions"]
-.sub "binint" :subid("26_1261064005.70696") :method :outer("11_1261064005.70696")
+.sub "binint" :subid("26_1266337339.18354") :method :outer("11_1266337339.18354")
.param pmc param_216
.annotate "line", 100
new $P215, 'ExceptionHandler'
@@ -5008,10 +5016,10 @@
.namespace ["HLL";"Actions"]
-.sub "quote_EXPR" :subid("27_1261064005.70696") :method :outer("11_1261064005.70696")
+.sub "quote_EXPR" :subid("27_1266337339.18354") :method :outer("11_1266337339.18354")
.param pmc param_225
.annotate "line", 102
- .const 'Sub' $P241 = "28_1261064005.70696"
+ .const 'Sub' $P241 = "28_1266337339.18354"
capture_lex $P241
new $P224, 'ExceptionHandler'
set_addr $P224, control_223
@@ -5023,13 +5031,13 @@
new $P226, "Undef"
.lex "$past", $P226
find_lex $P227, "$/"
- unless_null $P227, vivify_75
+ unless_null $P227, vivify_80
new $P227, "Hash"
- vivify_75:
+ vivify_80:
set $P228, $P227["quote_delimited"]
- unless_null $P228, vivify_76
+ unless_null $P228, vivify_81
new $P228, "Undef"
- vivify_76:
+ vivify_81:
$P229 = $P228."ast"()
store_lex "$past", $P229
.annotate "line", 104
@@ -5043,7 +5051,7 @@
$P237 = $P235."ACCEPTS"($P236)
if $P237, if_234
.annotate "line", 108
- .const 'Sub' $P241 = "28_1261064005.70696"
+ .const 'Sub' $P241 = "28_1266337339.18354"
capture_lex $P241
$P241()
goto if_234_end
@@ -5082,9 +5090,9 @@
.namespace ["HLL";"Actions"]
-.sub "_block240" :anon :subid("28_1261064005.70696") :outer("27_1261064005.70696")
+.sub "_block240" :anon :subid("28_1266337339.18354") :outer("27_1266337339.18354")
.annotate "line", 108
- .const 'Sub' $P260 = "29_1261064005.70696"
+ .const 'Sub' $P260 = "29_1266337339.18354"
capture_lex $P260
.annotate "line", 109
new $P242, "ResizablePMCArray"
@@ -5111,7 +5119,7 @@
.annotate "line", 112
find_lex $P256, "@words"
defined $I257, $P256
- unless $I257, for_undef_77
+ unless $I257, for_undef_82
iter $P255, $P256
new $P266, 'ExceptionHandler'
set_addr $P266, loop265_handler
@@ -5121,7 +5129,7 @@
unless $P255, loop265_done
shift $P258, $P255
loop265_redo:
- .const 'Sub' $P260 = "29_1261064005.70696"
+ .const 'Sub' $P260 = "29_1266337339.18354"
capture_lex $P260
$P260($P258)
loop265_next:
@@ -5134,7 +5142,7 @@
eq $P267, 67, loop265_redo
loop265_done:
pop_eh
- for_undef_77:
+ for_undef_82:
.annotate "line", 110
set $P247, $P255
if_248_end:
@@ -5144,7 +5152,7 @@
.namespace ["HLL";"Actions"]
-.sub "_block259" :anon :subid("29_1261064005.70696") :outer("28_1261064005.70696")
+.sub "_block259" :anon :subid("29_1266337339.18354") :outer("28_1266337339.18354")
.param pmc param_261
.annotate "line", 112
.lex "$_", param_261
@@ -5156,10 +5164,10 @@
.namespace ["HLL";"Actions"]
-.sub "quote_delimited" :subid("30_1261064005.70696") :method :outer("11_1261064005.70696")
+.sub "quote_delimited" :subid("30_1266337339.18354") :method :outer("11_1266337339.18354")
.param pmc param_284
.annotate "line", 122
- .const 'Sub' $P296 = "31_1261064005.70696"
+ .const 'Sub' $P296 = "31_1266337339.18354"
capture_lex $P296
new $P283, 'ExceptionHandler'
set_addr $P283, control_282
@@ -5184,15 +5192,15 @@
store_lex "$lastlit", $P289
.annotate "line", 125
find_lex $P291, "$/"
- unless_null $P291, vivify_78
+ unless_null $P291, vivify_83
new $P291, "Hash"
- vivify_78:
+ vivify_83:
set $P292, $P291["quote_atom"]
- unless_null $P292, vivify_79
+ unless_null $P292, vivify_84
new $P292, "Undef"
- vivify_79:
+ vivify_84:
defined $I293, $P292
- unless $I293, for_undef_80
+ unless $I293, for_undef_85
iter $P290, $P292
new $P329, 'ExceptionHandler'
set_addr $P329, loop328_handler
@@ -5202,7 +5210,7 @@
unless $P290, loop328_done
shift $P294, $P290
loop328_redo:
- .const 'Sub' $P296 = "31_1261064005.70696"
+ .const 'Sub' $P296 = "31_1266337339.18354"
capture_lex $P296
$P296($P294)
loop328_next:
@@ -5215,7 +5223,7 @@
eq $P330, 67, loop328_redo
loop328_done:
pop_eh
- for_undef_80:
+ for_undef_85:
.annotate "line", 139
find_lex $P332, "$lastlit"
set $S333, $P332
@@ -5280,7 +5288,7 @@
.namespace ["HLL";"Actions"]
-.sub "_block295" :anon :subid("31_1261064005.70696") :outer("30_1261064005.70696")
+.sub "_block295" :anon :subid("31_1266337339.18354") :outer("30_1266337339.18354")
.param pmc param_298
.annotate "line", 126
new $P297, "Undef"
@@ -5349,7 +5357,7 @@
.namespace ["HLL";"Actions"]
-.sub "quote_atom" :subid("32_1261064005.70696") :method :outer("11_1261064005.70696")
+.sub "quote_atom" :subid("32_1266337339.18354") :method :outer("11_1266337339.18354")
.param pmc param_359
.annotate "line", 147
new $P358, 'ExceptionHandler'
@@ -5361,13 +5369,13 @@
.annotate "line", 148
find_lex $P360, "$/"
find_lex $P363, "$/"
- unless_null $P363, vivify_81
+ unless_null $P363, vivify_86
new $P363, "Hash"
- vivify_81:
+ vivify_86:
set $P364, $P363["quote_escape"]
- unless_null $P364, vivify_82
+ unless_null $P364, vivify_87
new $P364, "Undef"
- vivify_82:
+ vivify_87:
if $P364, if_362
find_lex $P368, "$/"
set $S369, $P368
@@ -5376,13 +5384,13 @@
goto if_362_end
if_362:
find_lex $P365, "$/"
- unless_null $P365, vivify_83
+ unless_null $P365, vivify_88
new $P365, "Hash"
- vivify_83:
+ vivify_88:
set $P366, $P365["quote_escape"]
- unless_null $P366, vivify_84
+ unless_null $P366, vivify_89
new $P366, "Undef"
- vivify_84:
+ vivify_89:
$P367 = $P366."ast"()
set $P361, $P367
if_362_end:
@@ -5398,7 +5406,7 @@
.namespace ["HLL";"Actions"]
-.sub "quote_escape:sym<backslash>" :subid("33_1261064005.70696") :method :outer("11_1261064005.70696")
+.sub "quote_escape:sym<backslash>" :subid("33_1266337339.18354") :method :outer("11_1266337339.18354")
.param pmc param_375
.annotate "line", 151
new $P374, 'ExceptionHandler'
@@ -5419,7 +5427,7 @@
.namespace ["HLL";"Actions"]
-.sub "quote_escape:sym<stopper>" :subid("34_1261064005.70696") :method :outer("11_1261064005.70696")
+.sub "quote_escape:sym<stopper>" :subid("34_1266337339.18354") :method :outer("11_1266337339.18354")
.param pmc param_382
.annotate "line", 152
new $P381, 'ExceptionHandler'
@@ -5430,13 +5438,13 @@
.lex "$/", param_382
find_lex $P383, "$/"
find_lex $P384, "$/"
- unless_null $P384, vivify_85
+ unless_null $P384, vivify_90
new $P384, "Hash"
- vivify_85:
+ vivify_90:
set $P385, $P384["stopper"]
- unless_null $P385, vivify_86
+ unless_null $P385, vivify_91
new $P385, "Undef"
- vivify_86:
+ vivify_91:
set $S386, $P385
$P387 = $P383."!make"($S386)
.return ($P387)
@@ -5449,7 +5457,7 @@
.namespace ["HLL";"Actions"]
-.sub "quote_escape:sym<bs>" :subid("35_1261064005.70696") :method :outer("11_1261064005.70696")
+.sub "quote_escape:sym<bs>" :subid("35_1266337339.18354") :method :outer("11_1266337339.18354")
.param pmc param_392
.annotate "line", 154
new $P391, 'ExceptionHandler'
@@ -5470,7 +5478,7 @@
.namespace ["HLL";"Actions"]
-.sub "quote_escape:sym<nl>" :subid("36_1261064005.70696") :method :outer("11_1261064005.70696")
+.sub "quote_escape:sym<nl>" :subid("36_1266337339.18354") :method :outer("11_1266337339.18354")
.param pmc param_399
.annotate "line", 155
new $P398, 'ExceptionHandler'
@@ -5491,7 +5499,7 @@
.namespace ["HLL";"Actions"]
-.sub "quote_escape:sym<cr>" :subid("37_1261064005.70696") :method :outer("11_1261064005.70696")
+.sub "quote_escape:sym<cr>" :subid("37_1266337339.18354") :method :outer("11_1266337339.18354")
.param pmc param_406
.annotate "line", 156
new $P405, 'ExceptionHandler'
@@ -5512,7 +5520,7 @@
.namespace ["HLL";"Actions"]
-.sub "quote_escape:sym<tab>" :subid("38_1261064005.70696") :method :outer("11_1261064005.70696")
+.sub "quote_escape:sym<tab>" :subid("38_1266337339.18354") :method :outer("11_1266337339.18354")
.param pmc param_413
.annotate "line", 157
new $P412, 'ExceptionHandler'
@@ -5533,7 +5541,7 @@
.namespace ["HLL";"Actions"]
-.sub "quote_escape:sym<hex>" :subid("39_1261064005.70696") :method :outer("11_1261064005.70696")
+.sub "quote_escape:sym<hex>" :subid("39_1266337339.18354") :method :outer("11_1266337339.18354")
.param pmc param_420
.annotate "line", 159
new $P419, 'ExceptionHandler'
@@ -5545,37 +5553,37 @@
.annotate "line", 160
find_lex $P421, "$/"
find_lex $P424, "$/"
- unless_null $P424, vivify_87
+ unless_null $P424, vivify_92
new $P424, "Hash"
- vivify_87:
+ vivify_92:
set $P425, $P424["hexint"]
- unless_null $P425, vivify_88
+ unless_null $P425, vivify_93
new $P425, "Undef"
- vivify_88:
+ vivify_93:
if $P425, if_423
find_lex $P428, "$/"
- unless_null $P428, vivify_89
+ unless_null $P428, vivify_94
new $P428, "Hash"
- vivify_89:
+ vivify_94:
set $P429, $P428["hexints"]
- unless_null $P429, vivify_90
+ unless_null $P429, vivify_95
new $P429, "Hash"
- vivify_90:
+ vivify_95:
set $P430, $P429["hexint"]
- unless_null $P430, vivify_91
+ unless_null $P430, vivify_96
new $P430, "Undef"
- vivify_91:
+ vivify_96:
set $P422, $P430
goto if_423_end
if_423:
find_lex $P426, "$/"
- unless_null $P426, vivify_92
+ unless_null $P426, vivify_97
new $P426, "Hash"
- vivify_92:
+ vivify_97:
set $P427, $P426["hexint"]
- unless_null $P427, vivify_93
+ unless_null $P427, vivify_98
new $P427, "Undef"
- vivify_93:
+ vivify_98:
set $P422, $P427
if_423_end:
$P431 = "ints_to_string"($P422)
@@ -5591,7 +5599,7 @@
.namespace ["HLL";"Actions"]
-.sub "quote_escape:sym<oct>" :subid("40_1261064005.70696") :method :outer("11_1261064005.70696")
+.sub "quote_escape:sym<oct>" :subid("40_1266337339.18354") :method :outer("11_1266337339.18354")
.param pmc param_437
.annotate "line", 163
new $P436, 'ExceptionHandler'
@@ -5603,37 +5611,37 @@
.annotate "line", 164
find_lex $P438, "$/"
find_lex $P441, "$/"
- unless_null $P441, vivify_94
+ unless_null $P441, vivify_99
new $P441, "Hash"
- vivify_94:
+ vivify_99:
set $P442, $P441["octint"]
- unless_null $P442, vivify_95
+ unless_null $P442, vivify_100
new $P442, "Undef"
- vivify_95:
+ vivify_100:
if $P442, if_440
find_lex $P445, "$/"
- unless_null $P445, vivify_96
+ unless_null $P445, vivify_101
new $P445, "Hash"
- vivify_96:
+ vivify_101:
set $P446, $P445["octints"]
- unless_null $P446, vivify_97
+ unless_null $P446, vivify_102
new $P446, "Hash"
- vivify_97:
+ vivify_102:
set $P447, $P446["octint"]
- unless_null $P447, vivify_98
+ unless_null $P447, vivify_103
new $P447, "Undef"
- vivify_98:
+ vivify_103:
set $P439, $P447
goto if_440_end
if_440:
find_lex $P443, "$/"
- unless_null $P443, vivify_99
+ unless_null $P443, vivify_104
new $P443, "Hash"
- vivify_99:
+ vivify_104:
set $P444, $P443["octint"]
- unless_null $P444, vivify_100
+ unless_null $P444, vivify_105
new $P444, "Undef"
- vivify_100:
+ vivify_105:
set $P439, $P444
if_440_end:
$P448 = "ints_to_string"($P439)
@@ -5647,10 +5655,245 @@
.return ($P450)
.end
+
+.namespace ["HLL";"Actions"]
+.sub "quote_escape:sym<chr>" :subid("41_1266337339.18354") :method :outer("11_1266337339.18354")
+ .param pmc param_454
+.annotate "line", 167
+ new $P453, 'ExceptionHandler'
+ set_addr $P453, control_452
+ $P453."handle_types"(58)
+ push_eh $P453
+ .lex "self", self
+ .lex "$/", param_454
+.annotate "line", 168
+ find_lex $P455, "$/"
+ find_lex $P456, "$/"
+ unless_null $P456, vivify_106
+ new $P456, "Hash"
+ vivify_106:
+ set $P457, $P456["charspec"]
+ unless_null $P457, vivify_107
+ new $P457, "Undef"
+ vivify_107:
+ $P458 = $P457."ast"()
+ $P459 = $P455."!make"($P458)
+.annotate "line", 167
+ .return ($P459)
+ control_452:
+ .local pmc exception
+ .get_results (exception)
+ getattribute $P460, exception, "payload"
+ .return ($P460)
+.end
+
+
+.namespace ["HLL";"Actions"]
+.sub "charname" :subid("42_1266337339.18354") :method :outer("11_1266337339.18354")
+ .param pmc param_464
+.annotate "line", 171
+ new $P463, 'ExceptionHandler'
+ set_addr $P463, control_462
+ $P463."handle_types"(58)
+ push_eh $P463
+ .lex "self", self
+ .lex "$/", param_464
+.annotate "line", 172
+ new $P465, "Undef"
+ .lex "$codepoint", $P465
+.annotate "line", 173
+ find_lex $P468, "$/"
+ unless_null $P468, vivify_108
+ new $P468, "Hash"
+ vivify_108:
+ set $P469, $P468["integer"]
+ unless_null $P469, vivify_109
+ new $P469, "Undef"
+ vivify_109:
+ if $P469, if_467
+.annotate "line", 174
+ $P473 = new ['CodeString']
+ find_lex $P474, "$/"
+ set $S475, $P474
+ $P476 = $P473."charname_to_ord"($S475)
+ set $P466, $P476
+.annotate "line", 173
+ goto if_467_end
+ if_467:
+ find_lex $P470, "$/"
+ unless_null $P470, vivify_110
+ new $P470, "Hash"
+ vivify_110:
+ set $P471, $P470["integer"]
+ unless_null $P471, vivify_111
+ new $P471, "Undef"
+ vivify_111:
+ $P472 = $P471."ast"()
+ set $P466, $P472
+ if_467_end:
+ store_lex "$codepoint", $P466
+.annotate "line", 175
+ find_lex $P478, "$codepoint"
+ set $N479, $P478
+ islt $I480, $N479, 0.0
+ unless $I480, if_477_end
+ find_lex $P481, "$/"
+ $P482 = $P481."CURSOR"()
+ new $P483, 'String'
+ set $P483, "Unrecognized character name "
+ find_lex $P484, "$/"
+ concat $P485, $P483, $P484
+ $P482."panic"($P485)
+ if_477_end:
+.annotate "line", 176
+ find_lex $P486, "$/"
+ find_lex $P487, "$codepoint"
+ set $I488, $P487
+ chr $S489, $I488
+ $P490 = $P486."!make"($S489)
+.annotate "line", 171
+ .return ($P490)
+ control_462:
+ .local pmc exception
+ .get_results (exception)
+ getattribute $P491, exception, "payload"
+ .return ($P491)
+.end
+
+
+.namespace ["HLL";"Actions"]
+.sub "charnames" :subid("43_1266337339.18354") :method :outer("11_1266337339.18354")
+ .param pmc param_495
+.annotate "line", 179
+ .const 'Sub' $P504 = "44_1266337339.18354"
+ capture_lex $P504
+ new $P494, 'ExceptionHandler'
+ set_addr $P494, control_493
+ $P494."handle_types"(58)
+ push_eh $P494
+ .lex "self", self
+ .lex "$/", param_495
+.annotate "line", 180
+ new $P496, "Undef"
+ .lex "$str", $P496
+ new $P497, "String"
+ assign $P497, ""
+ store_lex "$str", $P497
+.annotate "line", 181
+ find_lex $P499, "$/"
+ unless_null $P499, vivify_112
+ new $P499, "Hash"
+ vivify_112:
+ set $P500, $P499["charname"]
+ unless_null $P500, vivify_113
+ new $P500, "Undef"
+ vivify_113:
+ defined $I501, $P500
+ unless $I501, for_undef_114
+ iter $P498, $P500
+ new $P511, 'ExceptionHandler'
+ set_addr $P511, loop510_handler
+ $P511."handle_types"(65, 67, 66)
+ push_eh $P511
+ loop510_test:
+ unless $P498, loop510_done
+ shift $P502, $P498
+ loop510_redo:
+ .const 'Sub' $P504 = "44_1266337339.18354"
+ capture_lex $P504
+ $P504($P502)
+ loop510_next:
+ goto loop510_test
+ loop510_handler:
+ .local pmc exception
+ .get_results (exception)
+ getattribute $P512, exception, 'type'
+ eq $P512, 65, loop510_next
+ eq $P512, 67, loop510_redo
+ loop510_done:
+ pop_eh
+ for_undef_114:
+.annotate "line", 182
+ find_lex $P513, "$/"
+ find_lex $P514, "$str"
+ $P515 = $P513."!make"($P514)
+.annotate "line", 179
+ .return ($P515)
+ control_493:
+ .local pmc exception
+ .get_results (exception)
+ getattribute $P516, exception, "payload"
+ .return ($P516)
+.end
+
+
+.namespace ["HLL";"Actions"]
+.sub "_block503" :anon :subid("44_1266337339.18354") :outer("43_1266337339.18354")
+ .param pmc param_505
+.annotate "line", 181
+ .lex "$_", param_505
+ find_lex $P506, "$str"
+ find_lex $P507, "$_"
+ $S508 = $P507."ast"()
+ concat $P509, $P506, $S508
+ store_lex "$str", $P509
+ .return ($P509)
+.end
+
+
+.namespace ["HLL";"Actions"]
+.sub "charspec" :subid("45_1266337339.18354") :method :outer("11_1266337339.18354")
+ .param pmc param_520
+.annotate "line", 185
+ new $P519, 'ExceptionHandler'
+ set_addr $P519, control_518
+ $P519."handle_types"(58)
+ push_eh $P519
+ .lex "self", self
+ .lex "$/", param_520
+.annotate "line", 186
+ find_lex $P521, "$/"
+ find_lex $P524, "$/"
+ unless_null $P524, vivify_115
+ new $P524, "Hash"
+ vivify_115:
+ set $P525, $P524["charnames"]
+ unless_null $P525, vivify_116
+ new $P525, "Undef"
+ vivify_116:
+ if $P525, if_523
+ find_lex $P529, "$/"
+ $I530 = "string_to_int"($P529, 10)
+ chr $S531, $I530
+ new $P522, 'String'
+ set $P522, $S531
+ goto if_523_end
+ if_523:
+ find_lex $P526, "$/"
+ unless_null $P526, vivify_117
+ new $P526, "Hash"
+ vivify_117:
+ set $P527, $P526["charnames"]
+ unless_null $P527, vivify_118
+ new $P527, "Undef"
+ vivify_118:
+ $P528 = $P527."ast"()
+ set $P522, $P528
+ if_523_end:
+ $P532 = $P521."!make"($P522)
+.annotate "line", 185
+ .return ($P532)
+ control_518:
+ .local pmc exception
+ .get_results (exception)
+ getattribute $P533, exception, "payload"
+ .return ($P533)
+.end
+
### .include 'gen/hllcompiler.pir'
.namespace []
-.sub "_block11" :anon :subid("10_1261064006.8204")
+.sub "_block11" :anon :subid("10_1266337340.21472")
.annotate "line", 0
get_hll_global $P14, ["HLL";"Compiler"], "_block13"
capture_lex $P14
@@ -5664,9 +5907,9 @@
.namespace []
-.sub "" :load :init :subid("post25") :outer("10_1261064006.8204")
+.sub "" :load :init :subid("post25") :outer("10_1266337340.21472")
.annotate "line", 0
- .const 'Sub' $P12 = "10_1261064006.8204"
+ .const 'Sub' $P12 = "10_1266337340.21472"
.local pmc block
set block, $P12
.annotate "line", 2
@@ -5680,28 +5923,28 @@
.namespace ["HLL";"Compiler"]
-.sub "_block13" :subid("11_1261064006.8204") :outer("10_1261064006.8204")
+.sub "_block13" :subid("11_1266337340.21472") :outer("10_1266337340.21472")
.annotate "line", 6
- .const 'Sub' $P187 = "20_1261064006.8204"
+ .const 'Sub' $P187 = "20_1266337340.21472"
capture_lex $P187
- .const 'Sub' $P152 = "18_1261064006.8204"
+ .const 'Sub' $P152 = "18_1266337340.21472"
capture_lex $P152
- .const 'Sub' $P137 = "17_1261064006.8204"
+ .const 'Sub' $P137 = "17_1266337340.21472"
capture_lex $P137
- .const 'Sub' $P121 = "16_1261064006.8204"
+ .const 'Sub' $P121 = "16_1266337340.21472"
capture_lex $P121
- .const 'Sub' $P32 = "13_1261064006.8204"
+ .const 'Sub' $P32 = "13_1266337340.21472"
capture_lex $P32
- .const 'Sub' $P15 = "12_1261064006.8204"
+ .const 'Sub' $P15 = "12_1266337340.21472"
capture_lex $P15
.annotate "line", 14
- .const 'Sub' $P15 = "12_1261064006.8204"
+ .const 'Sub' $P15 = "12_1266337340.21472"
capture_lex $P15
.lex "value_type", $P15
.annotate "line", 10
find_lex $P31, "value_type"
.annotate "line", 69
- .const 'Sub' $P187 = "20_1261064006.8204"
+ .const 'Sub' $P187 = "20_1266337340.21472"
capture_lex $P187
.annotate "line", 6
.return ($P187)
@@ -5709,7 +5952,7 @@
.namespace ["HLL";"Compiler"]
-.sub "" :load :init :subid("post26") :outer("11_1261064006.8204")
+.sub "" :load :init :subid("post26") :outer("11_1266337340.21472")
.annotate "line", 6
get_hll_global $P14, ["HLL";"Compiler"], "_block13"
.local pmc block
@@ -5721,7 +5964,7 @@
.namespace ["HLL";"Compiler"]
-.sub "value_type" :subid("12_1261064006.8204") :outer("11_1261064006.8204")
+.sub "value_type" :subid("12_1266337340.21472") :outer("11_1266337340.21472")
.param pmc param_18
.annotate "line", 14
new $P17, 'ExceptionHandler'
@@ -5765,15 +6008,15 @@
.namespace ["HLL";"Compiler"]
-.sub "get_exports" :subid("13_1261064006.8204") :method :outer("11_1261064006.8204")
+.sub "get_exports" :subid("13_1266337340.21472") :method :outer("11_1266337340.21472")
.param pmc param_35
.param pmc param_38 :slurpy
.param pmc param_36 :optional :named("tagset")
.param int has_param_36 :opt_flag
.annotate "line", 20
- .const 'Sub' $P104 = "15_1261064006.8204"
+ .const 'Sub' $P104 = "15_1266337340.21472"
capture_lex $P104
- .const 'Sub' $P83 = "14_1261064006.8204"
+ .const 'Sub' $P83 = "14_1266337340.21472"
capture_lex $P83
new $P34, 'ExceptionHandler'
set_addr $P34, control_33
@@ -5879,7 +6122,7 @@
unless $P99, loop116_done
shift $P102, $P99
loop116_redo:
- .const 'Sub' $P104 = "15_1261064006.8204"
+ .const 'Sub' $P104 = "15_1266337340.21472"
capture_lex $P104
$P104($P102)
loop116_next:
@@ -5909,7 +6152,7 @@
unless $P78, loop96_done
shift $P81, $P78
loop96_redo:
- .const 'Sub' $P83 = "14_1261064006.8204"
+ .const 'Sub' $P83 = "14_1266337340.21472"
capture_lex $P83
$P83($P81)
loop96_next:
@@ -5937,7 +6180,7 @@
.namespace ["HLL";"Compiler"]
-.sub "_block103" :anon :subid("15_1261064006.8204") :outer("13_1261064006.8204")
+.sub "_block103" :anon :subid("15_1266337340.21472") :outer("13_1266337340.21472")
.param pmc param_106
.annotate "line", 40
new $P105, "Undef"
@@ -5969,7 +6212,7 @@
.namespace ["HLL";"Compiler"]
-.sub "_block82" :anon :subid("14_1261064006.8204") :outer("13_1261064006.8204")
+.sub "_block82" :anon :subid("14_1266337340.21472") :outer("13_1266337340.21472")
.param pmc param_85
.annotate "line", 34
new $P84, "Undef"
@@ -6008,7 +6251,7 @@
.namespace ["HLL";"Compiler"]
-.sub "get_module" :subid("16_1261064006.8204") :method :outer("11_1261064006.8204")
+.sub "get_module" :subid("16_1266337340.21472") :method :outer("11_1266337340.21472")
.param pmc param_124
.annotate "line", 47
new $P123, 'ExceptionHandler'
@@ -6048,7 +6291,7 @@
.namespace ["HLL";"Compiler"]
-.sub "language" :subid("17_1261064006.8204") :method :outer("11_1261064006.8204")
+.sub "language" :subid("17_1266337340.21472") :method :outer("11_1266337340.21472")
.param pmc param_140 :optional
.param int has_param_140 :opt_flag
.annotate "line", 53
@@ -6092,10 +6335,10 @@
.namespace ["HLL";"Compiler"]
-.sub "load_module" :subid("18_1261064006.8204") :method :outer("11_1261064006.8204")
+.sub "load_module" :subid("18_1266337340.21472") :method :outer("11_1266337340.21472")
.param pmc param_155
.annotate "line", 61
- .const 'Sub' $P165 = "19_1261064006.8204"
+ .const 'Sub' $P165 = "19_1266337340.21472"
capture_lex $P165
new $P154, 'ExceptionHandler'
set_addr $P154, control_153
@@ -6122,7 +6365,7 @@
assign $P163, 0
store_lex "$loaded", $P163
.annotate "line", 64
- .const 'Sub' $P165 = "19_1261064006.8204"
+ .const 'Sub' $P165 = "19_1266337340.21472"
capture_lex $P165
$P165()
.annotate "line", 65
@@ -6151,7 +6394,7 @@
.namespace ["HLL";"Compiler"]
-.sub "_block164" :anon :subid("19_1261064006.8204") :outer("18_1261064006.8204")
+.sub "_block164" :anon :subid("19_1266337340.21472") :outer("18_1266337340.21472")
.annotate "line", 64
new $P172, 'ExceptionHandler'
set_addr $P172, control_171
@@ -6184,11 +6427,11 @@
.namespace ["HLL";"Compiler"]
-.sub "import" :subid("20_1261064006.8204") :method :outer("11_1261064006.8204")
+.sub "import" :subid("20_1266337340.21472") :method :outer("11_1266337340.21472")
.param pmc param_190
.param pmc param_191
.annotate "line", 69
- .const 'Sub' $P197 = "21_1261064006.8204"
+ .const 'Sub' $P197 = "21_1266337340.21472"
capture_lex $P197
new $P189, 'ExceptionHandler'
set_addr $P189, control_188
@@ -6210,7 +6453,7 @@
unless $P192, loop278_done
shift $P195, $P192
loop278_redo:
- .const 'Sub' $P197 = "21_1261064006.8204"
+ .const 'Sub' $P197 = "21_1266337340.21472"
capture_lex $P197
$P197($P195)
loop278_next:
@@ -6235,14 +6478,14 @@
.namespace ["HLL";"Compiler"]
-.sub "_block196" :anon :subid("21_1261064006.8204") :outer("20_1261064006.8204")
+.sub "_block196" :anon :subid("21_1266337340.21472") :outer("20_1266337340.21472")
.param pmc param_200
.annotate "line", 70
- .const 'Sub' $P267 = "24_1261064006.8204"
+ .const 'Sub' $P267 = "24_1266337340.21472"
capture_lex $P267
- .const 'Sub' $P247 = "23_1261064006.8204"
+ .const 'Sub' $P247 = "23_1266337340.21472"
capture_lex $P247
- .const 'Sub' $P218 = "22_1261064006.8204"
+ .const 'Sub' $P218 = "22_1266337340.21472"
capture_lex $P218
.annotate "line", 71
new $P198, "Undef"
@@ -6290,7 +6533,7 @@
unless $P262, loop275_done
shift $P265, $P262
loop275_redo:
- .const 'Sub' $P267 = "24_1261064006.8204"
+ .const 'Sub' $P267 = "24_1266337340.21472"
capture_lex $P267
$P267($P265)
loop275_next:
@@ -6322,7 +6565,7 @@
unless $P242, loop259_done
shift $P245, $P242
loop259_redo:
- .const 'Sub' $P247 = "23_1261064006.8204"
+ .const 'Sub' $P247 = "23_1266337340.21472"
capture_lex $P247
$P247($P245)
loop259_next:
@@ -6356,7 +6599,7 @@
unless $P213, loop231_done
shift $P216, $P213
loop231_redo:
- .const 'Sub' $P218 = "22_1261064006.8204"
+ .const 'Sub' $P218 = "22_1266337340.21472"
capture_lex $P218
$P218($P216)
loop231_next:
@@ -6379,7 +6622,7 @@
.namespace ["HLL";"Compiler"]
-.sub "_block266" :anon :subid("24_1261064006.8204") :outer("21_1261064006.8204")
+.sub "_block266" :anon :subid("24_1266337340.21472") :outer("21_1266337340.21472")
.param pmc param_268
.annotate "line", 80
.lex "$_", param_268
@@ -6399,7 +6642,7 @@
.namespace ["HLL";"Compiler"]
-.sub "_block246" :anon :subid("23_1261064006.8204") :outer("21_1261064006.8204")
+.sub "_block246" :anon :subid("23_1266337340.21472") :outer("21_1266337340.21472")
.param pmc param_248
.annotate "line", 77
.lex "$_", param_248
@@ -6419,7 +6662,7 @@
.namespace ["HLL";"Compiler"]
-.sub "_block217" :anon :subid("22_1261064006.8204") :outer("21_1261064006.8204")
+.sub "_block217" :anon :subid("22_1266337340.21472") :outer("21_1266337340.21472")
.param pmc param_219
.annotate "line", 74
.lex "$_", param_219
Modified: branches/boehm_gc_2/ext/nqp-rx/src/stage0/NQP-s0.pir
==============================================================================
--- branches/boehm_gc_2/ext/nqp-rx/src/stage0/NQP-s0.pir Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/ext/nqp-rx/src/stage0/NQP-s0.pir Mon Feb 22 12:30:02 2010 (r44294)
@@ -15,7 +15,7 @@
### .include 'gen/nqp-grammar.pir'
.namespace []
-.sub "_block11" :anon :subid("10_1261064023.05912")
+.sub "_block11" :anon :subid("10_1266337354.28388")
.annotate "line", 0
get_hll_global $P14, ["NQP";"Grammar"], "_block13"
capture_lex $P14
@@ -29,9 +29,9 @@
.namespace []
-.sub "" :load :init :subid("post331") :outer("10_1261064023.05912")
+.sub "" :load :init :subid("post331") :outer("10_1266337354.28388")
.annotate "line", 0
- .const 'Sub' $P12 = "10_1261064023.05912"
+ .const 'Sub' $P12 = "10_1266337354.28388"
.local pmc block
set block, $P12
$P1292 = get_root_global ["parrot"], "P6metaclass"
@@ -40,293 +40,293 @@
.namespace ["NQP";"Grammar"]
-.sub "_block13" :subid("11_1261064023.05912") :outer("10_1261064023.05912")
+.sub "_block13" :subid("11_1266337354.28388") :outer("10_1266337354.28388")
.annotate "line", 4
get_hll_global $P1235, ["NQP";"Regex"], "_block1234"
capture_lex $P1235
- .const 'Sub' $P1221 = "317_1261064023.05912"
+ .const 'Sub' $P1221 = "317_1266337354.28388"
capture_lex $P1221
- .const 'Sub' $P1215 = "315_1261064023.05912"
+ .const 'Sub' $P1215 = "315_1266337354.28388"
capture_lex $P1215
- .const 'Sub' $P1209 = "313_1261064023.05912"
+ .const 'Sub' $P1209 = "313_1266337354.28388"
capture_lex $P1209
- .const 'Sub' $P1202 = "311_1261064023.05912"
+ .const 'Sub' $P1202 = "311_1266337354.28388"
capture_lex $P1202
- .const 'Sub' $P1195 = "309_1261064023.05912"
+ .const 'Sub' $P1195 = "309_1266337354.28388"
capture_lex $P1195
- .const 'Sub' $P1188 = "307_1261064023.05912"
+ .const 'Sub' $P1188 = "307_1266337354.28388"
capture_lex $P1188
- .const 'Sub' $P1181 = "305_1261064023.05912"
+ .const 'Sub' $P1181 = "305_1266337354.28388"
capture_lex $P1181
- .const 'Sub' $P1175 = "303_1261064023.05912"
+ .const 'Sub' $P1175 = "303_1266337354.28388"
capture_lex $P1175
- .const 'Sub' $P1168 = "301_1261064023.05912"
+ .const 'Sub' $P1168 = "301_1266337354.28388"
capture_lex $P1168
- .const 'Sub' $P1161 = "299_1261064023.05912"
+ .const 'Sub' $P1161 = "299_1266337354.28388"
capture_lex $P1161
- .const 'Sub' $P1154 = "297_1261064023.05912"
+ .const 'Sub' $P1154 = "297_1266337354.28388"
capture_lex $P1154
- .const 'Sub' $P1147 = "295_1261064023.05912"
+ .const 'Sub' $P1147 = "295_1266337354.28388"
capture_lex $P1147
- .const 'Sub' $P1140 = "293_1261064023.05912"
+ .const 'Sub' $P1140 = "293_1266337354.28388"
capture_lex $P1140
- .const 'Sub' $P1133 = "291_1261064023.05912"
+ .const 'Sub' $P1133 = "291_1266337354.28388"
capture_lex $P1133
- .const 'Sub' $P1126 = "289_1261064023.05912"
+ .const 'Sub' $P1126 = "289_1266337354.28388"
capture_lex $P1126
- .const 'Sub' $P1119 = "287_1261064023.05912"
+ .const 'Sub' $P1119 = "287_1266337354.28388"
capture_lex $P1119
- .const 'Sub' $P1112 = "285_1261064023.05912"
+ .const 'Sub' $P1112 = "285_1266337354.28388"
capture_lex $P1112
- .const 'Sub' $P1105 = "283_1261064023.05912"
+ .const 'Sub' $P1105 = "283_1266337354.28388"
capture_lex $P1105
- .const 'Sub' $P1098 = "281_1261064023.05912"
+ .const 'Sub' $P1098 = "281_1266337354.28388"
capture_lex $P1098
- .const 'Sub' $P1091 = "279_1261064023.05912"
+ .const 'Sub' $P1091 = "279_1266337354.28388"
capture_lex $P1091
- .const 'Sub' $P1084 = "277_1261064023.05912"
+ .const 'Sub' $P1084 = "277_1266337354.28388"
capture_lex $P1084
- .const 'Sub' $P1077 = "275_1261064023.05912"
+ .const 'Sub' $P1077 = "275_1266337354.28388"
capture_lex $P1077
- .const 'Sub' $P1070 = "273_1261064023.05912"
+ .const 'Sub' $P1070 = "273_1266337354.28388"
capture_lex $P1070
- .const 'Sub' $P1063 = "271_1261064023.05912"
+ .const 'Sub' $P1063 = "271_1266337354.28388"
capture_lex $P1063
- .const 'Sub' $P1056 = "269_1261064023.05912"
+ .const 'Sub' $P1056 = "269_1266337354.28388"
capture_lex $P1056
- .const 'Sub' $P1049 = "267_1261064023.05912"
+ .const 'Sub' $P1049 = "267_1266337354.28388"
capture_lex $P1049
- .const 'Sub' $P1042 = "265_1261064023.05912"
+ .const 'Sub' $P1042 = "265_1266337354.28388"
capture_lex $P1042
- .const 'Sub' $P1035 = "263_1261064023.05912"
+ .const 'Sub' $P1035 = "263_1266337354.28388"
capture_lex $P1035
- .const 'Sub' $P1028 = "261_1261064023.05912"
+ .const 'Sub' $P1028 = "261_1266337354.28388"
capture_lex $P1028
- .const 'Sub' $P1021 = "259_1261064023.05912"
+ .const 'Sub' $P1021 = "259_1266337354.28388"
capture_lex $P1021
- .const 'Sub' $P1014 = "257_1261064023.05912"
+ .const 'Sub' $P1014 = "257_1266337354.28388"
capture_lex $P1014
- .const 'Sub' $P1007 = "255_1261064023.05912"
+ .const 'Sub' $P1007 = "255_1266337354.28388"
capture_lex $P1007
- .const 'Sub' $P1000 = "253_1261064023.05912"
+ .const 'Sub' $P1000 = "253_1266337354.28388"
capture_lex $P1000
- .const 'Sub' $P993 = "251_1261064023.05912"
+ .const 'Sub' $P993 = "251_1266337354.28388"
capture_lex $P993
- .const 'Sub' $P987 = "249_1261064023.05912"
+ .const 'Sub' $P987 = "249_1266337354.28388"
capture_lex $P987
- .const 'Sub' $P980 = "247_1261064023.05912"
+ .const 'Sub' $P980 = "247_1266337354.28388"
capture_lex $P980
- .const 'Sub' $P973 = "245_1261064023.05912"
+ .const 'Sub' $P973 = "245_1266337354.28388"
capture_lex $P973
- .const 'Sub' $P966 = "243_1261064023.05912"
+ .const 'Sub' $P966 = "243_1266337354.28388"
capture_lex $P966
- .const 'Sub' $P959 = "241_1261064023.05912"
+ .const 'Sub' $P959 = "241_1266337354.28388"
capture_lex $P959
- .const 'Sub' $P952 = "239_1261064023.05912"
+ .const 'Sub' $P952 = "239_1266337354.28388"
capture_lex $P952
- .const 'Sub' $P945 = "237_1261064023.05912"
+ .const 'Sub' $P945 = "237_1266337354.28388"
capture_lex $P945
- .const 'Sub' $P938 = "235_1261064023.05912"
+ .const 'Sub' $P938 = "235_1266337354.28388"
capture_lex $P938
- .const 'Sub' $P932 = "233_1261064023.05912"
+ .const 'Sub' $P932 = "233_1266337354.28388"
capture_lex $P932
- .const 'Sub' $P926 = "231_1261064023.05912"
+ .const 'Sub' $P926 = "231_1266337354.28388"
capture_lex $P926
- .const 'Sub' $P921 = "229_1261064023.05912"
+ .const 'Sub' $P921 = "229_1266337354.28388"
capture_lex $P921
- .const 'Sub' $P915 = "227_1261064023.05912"
+ .const 'Sub' $P915 = "227_1266337354.28388"
capture_lex $P915
- .const 'Sub' $P909 = "225_1261064023.05912"
+ .const 'Sub' $P909 = "225_1266337354.28388"
capture_lex $P909
- .const 'Sub' $P904 = "223_1261064023.05912"
+ .const 'Sub' $P904 = "223_1266337354.28388"
capture_lex $P904
- .const 'Sub' $P899 = "221_1261064023.05912"
+ .const 'Sub' $P899 = "221_1266337354.28388"
capture_lex $P899
- .const 'Sub' $P892 = "219_1261064023.05912"
+ .const 'Sub' $P892 = "219_1266337354.28388"
capture_lex $P892
- .const 'Sub' $P884 = "217_1261064023.05912"
+ .const 'Sub' $P884 = "217_1266337354.28388"
capture_lex $P884
- .const 'Sub' $P879 = "215_1261064023.05912"
+ .const 'Sub' $P879 = "215_1266337354.28388"
capture_lex $P879
- .const 'Sub' $P874 = "213_1261064023.05912"
+ .const 'Sub' $P874 = "213_1266337354.28388"
capture_lex $P874
- .const 'Sub' $P869 = "211_1261064023.05912"
+ .const 'Sub' $P869 = "211_1266337354.28388"
capture_lex $P869
- .const 'Sub' $P861 = "209_1261064023.05912"
+ .const 'Sub' $P861 = "209_1266337354.28388"
capture_lex $P861
- .const 'Sub' $P853 = "207_1261064023.05912"
+ .const 'Sub' $P853 = "207_1266337354.28388"
capture_lex $P853
- .const 'Sub' $P848 = "205_1261064023.05912"
+ .const 'Sub' $P848 = "205_1266337354.28388"
capture_lex $P848
- .const 'Sub' $P843 = "203_1261064023.05912"
+ .const 'Sub' $P843 = "203_1266337354.28388"
capture_lex $P843
- .const 'Sub' $P837 = "201_1261064023.05912"
+ .const 'Sub' $P837 = "201_1266337354.28388"
capture_lex $P837
- .const 'Sub' $P831 = "199_1261064023.05912"
+ .const 'Sub' $P831 = "199_1266337354.28388"
capture_lex $P831
- .const 'Sub' $P825 = "197_1261064023.05912"
+ .const 'Sub' $P825 = "197_1266337354.28388"
capture_lex $P825
- .const 'Sub' $P819 = "195_1261064023.05912"
+ .const 'Sub' $P819 = "195_1266337354.28388"
capture_lex $P819
- .const 'Sub' $P813 = "193_1261064023.05912"
+ .const 'Sub' $P813 = "193_1266337354.28388"
capture_lex $P813
- .const 'Sub' $P808 = "191_1261064023.05912"
+ .const 'Sub' $P808 = "191_1266337354.28388"
capture_lex $P808
- .const 'Sub' $P803 = "189_1261064023.05912"
+ .const 'Sub' $P803 = "189_1266337354.28388"
capture_lex $P803
- .const 'Sub' $P790 = "185_1261064023.05912"
+ .const 'Sub' $P790 = "185_1266337354.28388"
capture_lex $P790
- .const 'Sub' $P782 = "183_1261064023.05912"
+ .const 'Sub' $P782 = "183_1266337354.28388"
capture_lex $P782
- .const 'Sub' $P776 = "181_1261064023.05912"
+ .const 'Sub' $P776 = "181_1266337354.28388"
capture_lex $P776
- .const 'Sub' $P769 = "179_1261064023.05912"
+ .const 'Sub' $P769 = "179_1266337354.28388"
capture_lex $P769
- .const 'Sub' $P763 = "177_1261064023.05912"
+ .const 'Sub' $P763 = "177_1266337354.28388"
capture_lex $P763
- .const 'Sub' $P755 = "175_1261064023.05912"
+ .const 'Sub' $P755 = "175_1266337354.28388"
capture_lex $P755
- .const 'Sub' $P747 = "173_1261064023.05912"
+ .const 'Sub' $P747 = "173_1266337354.28388"
capture_lex $P747
- .const 'Sub' $P741 = "171_1261064023.05912"
+ .const 'Sub' $P741 = "171_1266337354.28388"
capture_lex $P741
- .const 'Sub' $P735 = "169_1261064023.05912"
+ .const 'Sub' $P735 = "169_1266337354.28388"
capture_lex $P735
- .const 'Sub' $P720 = "165_1261064023.05912"
+ .const 'Sub' $P720 = "165_1266337354.28388"
capture_lex $P720
- .const 'Sub' $P688 = "163_1261064023.05912"
+ .const 'Sub' $P688 = "163_1266337354.28388"
capture_lex $P688
- .const 'Sub' $P680 = "161_1261064023.05912"
+ .const 'Sub' $P680 = "161_1266337354.28388"
capture_lex $P680
- .const 'Sub' $P674 = "159_1261064023.05912"
+ .const 'Sub' $P674 = "159_1266337354.28388"
capture_lex $P674
- .const 'Sub' $P664 = "157_1261064023.05912"
+ .const 'Sub' $P664 = "157_1266337354.28388"
capture_lex $P664
- .const 'Sub' $P649 = "155_1261064023.05912"
+ .const 'Sub' $P649 = "155_1266337354.28388"
capture_lex $P649
- .const 'Sub' $P640 = "153_1261064023.05912"
+ .const 'Sub' $P640 = "153_1266337354.28388"
capture_lex $P640
- .const 'Sub' $P621 = "151_1261064023.05912"
+ .const 'Sub' $P621 = "151_1266337354.28388"
capture_lex $P621
- .const 'Sub' $P597 = "149_1261064023.05912"
+ .const 'Sub' $P597 = "149_1266337354.28388"
capture_lex $P597
- .const 'Sub' $P590 = "147_1261064023.05912"
+ .const 'Sub' $P590 = "147_1266337354.28388"
capture_lex $P590
- .const 'Sub' $P583 = "145_1261064023.05912"
+ .const 'Sub' $P583 = "145_1266337354.28388"
capture_lex $P583
- .const 'Sub' $P573 = "141_1261064023.05912"
+ .const 'Sub' $P573 = "141_1266337354.28388"
capture_lex $P573
- .const 'Sub' $P562 = "139_1261064023.05912"
+ .const 'Sub' $P562 = "139_1266337354.28388"
capture_lex $P562
- .const 'Sub' $P555 = "137_1261064023.05912"
+ .const 'Sub' $P555 = "137_1266337354.28388"
capture_lex $P555
- .const 'Sub' $P548 = "135_1261064023.05912"
+ .const 'Sub' $P548 = "135_1266337354.28388"
capture_lex $P548
- .const 'Sub' $P541 = "133_1261064023.05912"
+ .const 'Sub' $P541 = "133_1266337354.28388"
capture_lex $P541
- .const 'Sub' $P514 = "129_1261064023.05912"
+ .const 'Sub' $P514 = "129_1266337354.28388"
capture_lex $P514
- .const 'Sub' $P505 = "127_1261064023.05912"
+ .const 'Sub' $P505 = "127_1266337354.28388"
capture_lex $P505
- .const 'Sub' $P498 = "125_1261064023.05912"
+ .const 'Sub' $P498 = "125_1266337354.28388"
capture_lex $P498
- .const 'Sub' $P489 = "121_1261064023.05912"
+ .const 'Sub' $P489 = "121_1266337354.28388"
capture_lex $P489
- .const 'Sub' $P484 = "119_1261064023.05912"
+ .const 'Sub' $P484 = "119_1266337354.28388"
capture_lex $P484
- .const 'Sub' $P472 = "117_1261064023.05912"
+ .const 'Sub' $P472 = "117_1266337354.28388"
capture_lex $P472
- .const 'Sub' $P460 = "115_1261064023.05912"
+ .const 'Sub' $P460 = "115_1266337354.28388"
capture_lex $P460
- .const 'Sub' $P452 = "113_1261064023.05912"
+ .const 'Sub' $P452 = "113_1266337354.28388"
capture_lex $P452
- .const 'Sub' $P447 = "111_1261064023.05912"
+ .const 'Sub' $P447 = "111_1266337354.28388"
capture_lex $P447
- .const 'Sub' $P441 = "109_1261064023.05912"
+ .const 'Sub' $P441 = "109_1266337354.28388"
capture_lex $P441
- .const 'Sub' $P435 = "107_1261064023.05912"
+ .const 'Sub' $P435 = "107_1266337354.28388"
capture_lex $P435
- .const 'Sub' $P429 = "105_1261064023.05912"
+ .const 'Sub' $P429 = "105_1266337354.28388"
capture_lex $P429
- .const 'Sub' $P423 = "103_1261064023.05912"
+ .const 'Sub' $P423 = "103_1266337354.28388"
capture_lex $P423
- .const 'Sub' $P417 = "101_1261064023.05912"
+ .const 'Sub' $P417 = "101_1266337354.28388"
capture_lex $P417
- .const 'Sub' $P411 = "99_1261064023.05912"
+ .const 'Sub' $P411 = "99_1266337354.28388"
capture_lex $P411
- .const 'Sub' $P405 = "97_1261064023.05912"
+ .const 'Sub' $P405 = "97_1266337354.28388"
capture_lex $P405
- .const 'Sub' $P399 = "95_1261064023.05912"
+ .const 'Sub' $P399 = "95_1266337354.28388"
capture_lex $P399
- .const 'Sub' $P391 = "93_1261064023.05912"
+ .const 'Sub' $P391 = "93_1266337354.28388"
capture_lex $P391
- .const 'Sub' $P383 = "91_1261064023.05912"
+ .const 'Sub' $P383 = "91_1266337354.28388"
capture_lex $P383
- .const 'Sub' $P371 = "87_1261064023.05912"
+ .const 'Sub' $P371 = "87_1266337354.28388"
capture_lex $P371
- .const 'Sub' $P363 = "85_1261064023.05912"
+ .const 'Sub' $P363 = "85_1266337354.28388"
capture_lex $P363
- .const 'Sub' $P353 = "81_1261064023.05912"
+ .const 'Sub' $P353 = "81_1266337354.28388"
capture_lex $P353
- .const 'Sub' $P346 = "79_1261064023.05912"
+ .const 'Sub' $P346 = "79_1266337354.28388"
capture_lex $P346
- .const 'Sub' $P339 = "77_1261064023.05912"
+ .const 'Sub' $P339 = "77_1266337354.28388"
capture_lex $P339
- .const 'Sub' $P327 = "73_1261064023.05912"
+ .const 'Sub' $P327 = "73_1266337354.28388"
capture_lex $P327
- .const 'Sub' $P319 = "71_1261064023.05912"
+ .const 'Sub' $P319 = "71_1266337354.28388"
capture_lex $P319
- .const 'Sub' $P311 = "69_1261064023.05912"
+ .const 'Sub' $P311 = "69_1266337354.28388"
capture_lex $P311
- .const 'Sub' $P291 = "67_1261064023.05912"
+ .const 'Sub' $P291 = "67_1266337354.28388"
capture_lex $P291
- .const 'Sub' $P282 = "65_1261064023.05912"
+ .const 'Sub' $P282 = "65_1266337354.28388"
capture_lex $P282
- .const 'Sub' $P264 = "62_1261064023.05912"
+ .const 'Sub' $P264 = "62_1266337354.28388"
capture_lex $P264
- .const 'Sub' $P244 = "60_1261064023.05912"
+ .const 'Sub' $P244 = "60_1266337354.28388"
capture_lex $P244
- .const 'Sub' $P235 = "56_1261064023.05912"
+ .const 'Sub' $P235 = "56_1266337354.28388"
capture_lex $P235
- .const 'Sub' $P230 = "54_1261064023.05912"
+ .const 'Sub' $P230 = "54_1266337354.28388"
capture_lex $P230
- .const 'Sub' $P221 = "50_1261064023.05912"
+ .const 'Sub' $P221 = "50_1266337354.28388"
capture_lex $P221
- .const 'Sub' $P216 = "48_1261064023.05912"
+ .const 'Sub' $P216 = "48_1266337354.28388"
capture_lex $P216
- .const 'Sub' $P208 = "46_1261064023.05912"
+ .const 'Sub' $P208 = "46_1266337354.28388"
capture_lex $P208
- .const 'Sub' $P201 = "44_1261064023.05912"
+ .const 'Sub' $P201 = "44_1266337354.28388"
capture_lex $P201
- .const 'Sub' $P195 = "42_1261064023.05912"
+ .const 'Sub' $P195 = "42_1266337354.28388"
capture_lex $P195
- .const 'Sub' $P187 = "40_1261064023.05912"
+ .const 'Sub' $P187 = "40_1266337354.28388"
capture_lex $P187
- .const 'Sub' $P181 = "38_1261064023.05912"
+ .const 'Sub' $P181 = "38_1266337354.28388"
capture_lex $P181
- .const 'Sub' $P175 = "36_1261064023.05912"
+ .const 'Sub' $P175 = "36_1266337354.28388"
capture_lex $P175
- .const 'Sub' $P159 = "33_1261064023.05912"
+ .const 'Sub' $P159 = "33_1266337354.28388"
capture_lex $P159
- .const 'Sub' $P146 = "31_1261064023.05912"
+ .const 'Sub' $P146 = "31_1266337354.28388"
capture_lex $P146
- .const 'Sub' $P139 = "29_1261064023.05912"
+ .const 'Sub' $P139 = "29_1266337354.28388"
capture_lex $P139
- .const 'Sub' $P96 = "26_1261064023.05912"
+ .const 'Sub' $P96 = "26_1266337354.28388"
capture_lex $P96
- .const 'Sub' $P78 = "23_1261064023.05912"
+ .const 'Sub' $P78 = "23_1266337354.28388"
capture_lex $P78
- .const 'Sub' $P68 = "21_1261064023.05912"
+ .const 'Sub' $P68 = "21_1266337354.28388"
capture_lex $P68
- .const 'Sub' $P54 = "19_1261064023.05912"
+ .const 'Sub' $P54 = "19_1266337354.28388"
capture_lex $P54
- .const 'Sub' $P46 = "17_1261064023.05912"
+ .const 'Sub' $P46 = "17_1266337354.28388"
capture_lex $P46
- .const 'Sub' $P39 = "15_1261064023.05912"
+ .const 'Sub' $P39 = "15_1266337354.28388"
capture_lex $P39
- .const 'Sub' $P33 = "13_1261064023.05912"
+ .const 'Sub' $P33 = "13_1266337354.28388"
capture_lex $P33
- .const 'Sub' $P15 = "12_1261064023.05912"
+ .const 'Sub' $P15 = "12_1266337354.28388"
capture_lex $P15
.annotate "line", 527
get_hll_global $P1235, ["NQP";"Regex"], "_block1234"
@@ -338,7 +338,7 @@
.namespace ["NQP";"Grammar"]
-.sub "" :load :init :subid("post332") :outer("11_1261064023.05912")
+.sub "" :load :init :subid("post332") :outer("11_1266337354.28388")
.annotate "line", 4
get_hll_global $P14, ["NQP";"Grammar"], "_block13"
.local pmc block
@@ -395,7 +395,7 @@
.namespace ["NQP";"Grammar"]
-.sub "TOP" :subid("12_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "TOP" :subid("12_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
new $P17, 'ExceptionHandler'
set_addr $P17, control_16
@@ -478,7 +478,7 @@
.namespace ["NQP";"Grammar"]
-.sub "identifier" :subid("13_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "identifier" :subid("13_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx34_tgt
.local int rx34_pos
@@ -536,7 +536,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__identifier" :subid("14_1261064023.05912") :method
+.sub "!PREFIX__identifier" :subid("14_1266337354.28388") :method
.annotate "line", 4
$P36 = self."!PREFIX__!subrule"("ident", "")
new $P37, "ResizablePMCArray"
@@ -546,7 +546,7 @@
.namespace ["NQP";"Grammar"]
-.sub "name" :subid("15_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "name" :subid("15_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx40_tgt
.local int rx40_pos
@@ -620,7 +620,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__name" :subid("16_1261064023.05912") :method
+.sub "!PREFIX__name" :subid("16_1266337354.28388") :method
.annotate "line", 4
new $P42, "ResizablePMCArray"
push $P42, ""
@@ -629,7 +629,7 @@
.namespace ["NQP";"Grammar"]
-.sub "deflongname" :subid("17_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "deflongname" :subid("17_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx47_tgt
.local int rx47_pos
@@ -702,7 +702,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__deflongname" :subid("18_1261064023.05912") :method
+.sub "!PREFIX__deflongname" :subid("18_1266337354.28388") :method
.annotate "line", 4
$P49 = self."!PREFIX__!subrule"("identifier", "")
new $P50, "ResizablePMCArray"
@@ -712,7 +712,7 @@
.namespace ["NQP";"Grammar"]
-.sub "ENDSTMT" :subid("19_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "ENDSTMT" :subid("19_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx55_tgt
.local int rx55_pos
@@ -844,7 +844,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__ENDSTMT" :subid("20_1261064023.05912") :method
+.sub "!PREFIX__ENDSTMT" :subid("20_1266337354.28388") :method
.annotate "line", 4
new $P57, "ResizablePMCArray"
push $P57, ""
@@ -853,7 +853,7 @@
.namespace ["NQP";"Grammar"]
-.sub "ws" :subid("21_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "ws" :subid("21_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx69_tgt
.local int rx69_pos
@@ -979,7 +979,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__ws" :subid("22_1261064023.05912") :method
+.sub "!PREFIX__ws" :subid("22_1266337354.28388") :method
.annotate "line", 4
new $P71, "ResizablePMCArray"
push $P71, ""
@@ -989,9 +989,9 @@
.namespace ["NQP";"Grammar"]
-.sub "unv" :subid("23_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "unv" :subid("23_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
- .const 'Sub' $P86 = "25_1261064023.05912"
+ .const 'Sub' $P86 = "25_1266337354.28388"
capture_lex $P86
.local string rx79_tgt
.local int rx79_pos
@@ -1037,7 +1037,7 @@
rxanchor84_done:
# rx subrule "before" subtype=zerowidth negate=
rx79_cur."!cursor_pos"(rx79_pos)
- .const 'Sub' $P86 = "25_1261064023.05912"
+ .const 'Sub' $P86 = "25_1266337354.28388"
capture_lex $P86
$P10 = rx79_cur."before"($P86)
unless $P10, rx79_fail
@@ -1116,7 +1116,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__unv" :subid("24_1261064023.05912") :method
+.sub "!PREFIX__unv" :subid("24_1266337354.28388") :method
.annotate "line", 4
new $P81, "ResizablePMCArray"
push $P81, ""
@@ -1127,7 +1127,7 @@
.namespace ["NQP";"Grammar"]
-.sub "_block85" :anon :subid("25_1261064023.05912") :method :outer("23_1261064023.05912")
+.sub "_block85" :anon :subid("25_1266337354.28388") :method :outer("23_1266337354.28388")
.annotate "line", 44
.local string rx87_tgt
.local int rx87_pos
@@ -1217,9 +1217,9 @@
.namespace ["NQP";"Grammar"]
-.sub "pod_comment" :subid("26_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "pod_comment" :subid("26_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
- .const 'Sub' $P131 = "28_1261064023.05912"
+ .const 'Sub' $P131 = "28_1266337354.28388"
capture_lex $P131
.local string rx97_tgt
.local int rx97_pos
@@ -1651,7 +1651,7 @@
.annotate "line", 67
# rx subrule "before" subtype=zerowidth negate=
rx97_cur."!cursor_pos"(rx97_pos)
- .const 'Sub' $P131 = "28_1261064023.05912"
+ .const 'Sub' $P131 = "28_1266337354.28388"
capture_lex $P131
$P10 = rx97_cur."before"($P131)
unless $P10, rx97_fail
@@ -1718,7 +1718,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__pod_comment" :subid("27_1261064023.05912") :method
+.sub "!PREFIX__pod_comment" :subid("27_1266337354.28388") :method
.annotate "line", 4
new $P99, "ResizablePMCArray"
push $P99, ""
@@ -1727,7 +1727,7 @@
.namespace ["NQP";"Grammar"]
-.sub "_block130" :anon :subid("28_1261064023.05912") :method :outer("26_1261064023.05912")
+.sub "_block130" :anon :subid("28_1266337354.28388") :method :outer("26_1266337354.28388")
.annotate "line", 67
.local string rx132_tgt
.local int rx132_pos
@@ -1810,7 +1810,7 @@
.namespace ["NQP";"Grammar"]
-.sub "comp_unit" :subid("29_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "comp_unit" :subid("29_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx140_tgt
.local int rx140_pos
@@ -1889,7 +1889,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__comp_unit" :subid("30_1261064023.05912") :method
+.sub "!PREFIX__comp_unit" :subid("30_1266337354.28388") :method
.annotate "line", 4
$P142 = self."!PREFIX__!subrule"("", "")
new $P143, "ResizablePMCArray"
@@ -1899,7 +1899,7 @@
.namespace ["NQP";"Grammar"]
-.sub "statementlist" :subid("31_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "statementlist" :subid("31_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx147_tgt
.local int rx147_pos
@@ -2007,7 +2007,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statementlist" :subid("32_1261064023.05912") :method
+.sub "!PREFIX__statementlist" :subid("32_1266337354.28388") :method
.annotate "line", 4
new $P149, "ResizablePMCArray"
push $P149, ""
@@ -2017,9 +2017,9 @@
.namespace ["NQP";"Grammar"]
-.sub "statement" :subid("33_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "statement" :subid("33_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
- .const 'Sub' $P165 = "35_1261064023.05912"
+ .const 'Sub' $P165 = "35_1266337354.28388"
capture_lex $P165
.local string rx160_tgt
.local int rx160_pos
@@ -2029,7 +2029,7 @@
.local pmc rx160_cur
(rx160_cur, rx160_pos, rx160_tgt) = self."!cursor_start"()
rx160_cur."!cursor_debug"("START ", "statement")
- rx160_cur."!cursor_caparray"("statement_mod_loop", "statement_mod_cond")
+ rx160_cur."!cursor_caparray"("statement_mod_cond", "statement_mod_loop")
.lex unicode:"$\x{a2}", rx160_cur
.local pmc match
.lex "$/", match
@@ -2054,7 +2054,7 @@
.annotate "line", 89
# rx subrule "before" subtype=zerowidth negate=1
rx160_cur."!cursor_pos"(rx160_pos)
- .const 'Sub' $P165 = "35_1261064023.05912"
+ .const 'Sub' $P165 = "35_1266337354.28388"
capture_lex $P165
$P10 = rx160_cur."before"($P165)
if $P10, rx160_fail
@@ -2150,7 +2150,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement" :subid("34_1261064023.05912") :method
+.sub "!PREFIX__statement" :subid("34_1266337354.28388") :method
.annotate "line", 4
new $P162, "ResizablePMCArray"
push $P162, ""
@@ -2159,7 +2159,7 @@
.namespace ["NQP";"Grammar"]
-.sub "_block164" :anon :subid("35_1261064023.05912") :method :outer("33_1261064023.05912")
+.sub "_block164" :anon :subid("35_1266337354.28388") :method :outer("33_1266337354.28388")
.annotate "line", 89
.local string rx166_tgt
.local int rx166_pos
@@ -2223,7 +2223,7 @@
.namespace ["NQP";"Grammar"]
-.sub "eat_terminator" :subid("36_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "eat_terminator" :subid("36_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx176_tgt
.local int rx176_pos
@@ -2310,7 +2310,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__eat_terminator" :subid("37_1261064023.05912") :method
+.sub "!PREFIX__eat_terminator" :subid("37_1266337354.28388") :method
.annotate "line", 4
new $P178, "ResizablePMCArray"
push $P178, ""
@@ -2322,7 +2322,7 @@
.namespace ["NQP";"Grammar"]
-.sub "xblock" :subid("38_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "xblock" :subid("38_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx182_tgt
.local int rx182_pos
@@ -2393,7 +2393,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__xblock" :subid("39_1261064023.05912") :method
+.sub "!PREFIX__xblock" :subid("39_1266337354.28388") :method
.annotate "line", 4
$P184 = self."!PREFIX__!subrule"("EXPR", "")
new $P185, "ResizablePMCArray"
@@ -2403,7 +2403,7 @@
.namespace ["NQP";"Grammar"]
-.sub "pblock" :subid("40_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "pblock" :subid("40_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx188_tgt
.local int rx188_pos
@@ -2522,7 +2522,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__pblock" :subid("41_1261064023.05912") :method
+.sub "!PREFIX__pblock" :subid("41_1266337354.28388") :method
.annotate "line", 4
$P190 = self."!PREFIX__!subrule"("", "")
$P191 = self."!PREFIX__!subrule"("", "")
@@ -2535,7 +2535,7 @@
.namespace ["NQP";"Grammar"]
-.sub "lambda" :subid("42_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "lambda" :subid("42_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx196_tgt
.local int rx196_pos
@@ -2606,7 +2606,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__lambda" :subid("43_1261064023.05912") :method
+.sub "!PREFIX__lambda" :subid("43_1266337354.28388") :method
.annotate "line", 4
new $P198, "ResizablePMCArray"
push $P198, "<->"
@@ -2616,7 +2616,7 @@
.namespace ["NQP";"Grammar"]
-.sub "block" :subid("44_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "block" :subid("44_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx202_tgt
.local int rx202_pos
@@ -2699,7 +2699,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__block" :subid("45_1261064023.05912") :method
+.sub "!PREFIX__block" :subid("45_1266337354.28388") :method
.annotate "line", 4
$P204 = self."!PREFIX__!subrule"("", "")
new $P205, "ResizablePMCArray"
@@ -2710,7 +2710,7 @@
.namespace ["NQP";"Grammar"]
-.sub "blockoid" :subid("46_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "blockoid" :subid("46_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx209_tgt
.local int rx209_pos
@@ -2805,7 +2805,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__blockoid" :subid("47_1261064023.05912") :method
+.sub "!PREFIX__blockoid" :subid("47_1266337354.28388") :method
.annotate "line", 4
$P211 = self."!PREFIX__!subrule"("", "")
new $P212, "ResizablePMCArray"
@@ -2815,7 +2815,7 @@
.namespace ["NQP";"Grammar"]
-.sub "newpad" :subid("48_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "newpad" :subid("48_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx217_tgt
.local int rx217_pos
@@ -2866,7 +2866,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__newpad" :subid("49_1261064023.05912") :method
+.sub "!PREFIX__newpad" :subid("49_1266337354.28388") :method
.annotate "line", 4
new $P219, "ResizablePMCArray"
push $P219, ""
@@ -2875,7 +2875,7 @@
.namespace ["NQP";"Grammar"]
-.sub "finishpad" :subid("50_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "finishpad" :subid("50_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx222_tgt
.local int rx222_pos
@@ -2926,7 +2926,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__finishpad" :subid("51_1261064023.05912") :method
+.sub "!PREFIX__finishpad" :subid("51_1266337354.28388") :method
.annotate "line", 4
new $P224, "ResizablePMCArray"
push $P224, ""
@@ -2935,7 +2935,7 @@
.namespace ["NQP";"Grammar"]
-.sub "terminator" :subid("52_1261064023.05912") :method
+.sub "terminator" :subid("52_1266337354.28388") :method
.annotate "line", 139
$P227 = self."!protoregex"("terminator")
.return ($P227)
@@ -2943,7 +2943,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__terminator" :subid("53_1261064023.05912") :method
+.sub "!PREFIX__terminator" :subid("53_1266337354.28388") :method
.annotate "line", 139
$P229 = self."!PREFIX__!protoregex"("terminator")
.return ($P229)
@@ -2951,7 +2951,7 @@
.namespace ["NQP";"Grammar"]
-.sub "terminator:sym<;>" :subid("54_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "terminator:sym<;>" :subid("54_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx231_tgt
.local int rx231_pos
@@ -3008,7 +3008,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__terminator:sym<;>" :subid("55_1261064023.05912") :method
+.sub "!PREFIX__terminator:sym<;>" :subid("55_1266337354.28388") :method
.annotate "line", 4
new $P233, "ResizablePMCArray"
push $P233, ";"
@@ -3017,7 +3017,7 @@
.namespace ["NQP";"Grammar"]
-.sub "terminator:sym<}>" :subid("56_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "terminator:sym<}>" :subid("56_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx236_tgt
.local int rx236_pos
@@ -3074,7 +3074,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__terminator:sym<}>" :subid("57_1261064023.05912") :method
+.sub "!PREFIX__terminator:sym<}>" :subid("57_1266337354.28388") :method
.annotate "line", 4
new $P238, "ResizablePMCArray"
push $P238, "}"
@@ -3083,7 +3083,7 @@
.namespace ["NQP";"Grammar"]
-.sub "statement_control" :subid("58_1261064023.05912") :method
+.sub "statement_control" :subid("58_1266337354.28388") :method
.annotate "line", 146
$P241 = self."!protoregex"("statement_control")
.return ($P241)
@@ -3091,7 +3091,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_control" :subid("59_1261064023.05912") :method
+.sub "!PREFIX__statement_control" :subid("59_1266337354.28388") :method
.annotate "line", 146
$P243 = self."!PREFIX__!protoregex"("statement_control")
.return ($P243)
@@ -3099,7 +3099,7 @@
.namespace ["NQP";"Grammar"]
-.sub "statement_control:sym<if>" :subid("60_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "statement_control:sym<if>" :subid("60_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx245_tgt
.local int rx245_pos
@@ -3109,7 +3109,7 @@
.local pmc rx245_cur
(rx245_cur, rx245_pos, rx245_tgt) = self."!cursor_start"()
rx245_cur."!cursor_debug"("START ", "statement_control:sym<if>")
- rx245_cur."!cursor_caparray"("xblock", "else")
+ rx245_cur."!cursor_caparray"("else", "xblock")
.lex unicode:"$\x{a2}", rx245_cur
.local pmc match
.lex "$/", match
@@ -3293,7 +3293,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_control:sym<if>" :subid("61_1261064023.05912") :method
+.sub "!PREFIX__statement_control:sym<if>" :subid("61_1266337354.28388") :method
.annotate "line", 4
new $P247, "ResizablePMCArray"
push $P247, "if"
@@ -3302,9 +3302,9 @@
.namespace ["NQP";"Grammar"]
-.sub "statement_control:sym<unless>" :subid("62_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "statement_control:sym<unless>" :subid("62_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
- .const 'Sub' $P275 = "64_1261064023.05912"
+ .const 'Sub' $P275 = "64_1266337354.28388"
capture_lex $P275
.local string rx265_tgt
.local int rx265_pos
@@ -3392,7 +3392,7 @@
rx265_pos = $P10."pos"()
# rx subrule "before" subtype=zerowidth negate=1
rx265_cur."!cursor_pos"(rx265_pos)
- .const 'Sub' $P275 = "64_1261064023.05912"
+ .const 'Sub' $P275 = "64_1266337354.28388"
capture_lex $P275
$P10 = rx265_cur."before"($P275)
if $P10, rx265_fail
@@ -3444,7 +3444,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_control:sym<unless>" :subid("63_1261064023.05912") :method
+.sub "!PREFIX__statement_control:sym<unless>" :subid("63_1266337354.28388") :method
.annotate "line", 4
new $P267, "ResizablePMCArray"
push $P267, "unless"
@@ -3453,7 +3453,7 @@
.namespace ["NQP";"Grammar"]
-.sub "_block274" :anon :subid("64_1261064023.05912") :method :outer("62_1261064023.05912")
+.sub "_block274" :anon :subid("64_1266337354.28388") :method :outer("62_1266337354.28388")
.annotate "line", 158
.local string rx276_tgt
.local int rx276_pos
@@ -3509,7 +3509,7 @@
.namespace ["NQP";"Grammar"]
-.sub "statement_control:sym<while>" :subid("65_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "statement_control:sym<while>" :subid("65_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx283_tgt
.local int rx283_pos
@@ -3619,7 +3619,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_control:sym<while>" :subid("66_1261064023.05912") :method
+.sub "!PREFIX__statement_control:sym<while>" :subid("66_1266337354.28388") :method
.annotate "line", 4
new $P285, "ResizablePMCArray"
push $P285, "until"
@@ -3629,7 +3629,7 @@
.namespace ["NQP";"Grammar"]
-.sub "statement_control:sym<repeat>" :subid("67_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "statement_control:sym<repeat>" :subid("67_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx292_tgt
.local int rx292_pos
@@ -3864,7 +3864,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_control:sym<repeat>" :subid("68_1261064023.05912") :method
+.sub "!PREFIX__statement_control:sym<repeat>" :subid("68_1266337354.28388") :method
.annotate "line", 4
new $P294, "ResizablePMCArray"
push $P294, "repeat"
@@ -3873,7 +3873,7 @@
.namespace ["NQP";"Grammar"]
-.sub "statement_control:sym<for>" :subid("69_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "statement_control:sym<for>" :subid("69_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx312_tgt
.local int rx312_pos
@@ -3970,7 +3970,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_control:sym<for>" :subid("70_1261064023.05912") :method
+.sub "!PREFIX__statement_control:sym<for>" :subid("70_1266337354.28388") :method
.annotate "line", 4
new $P314, "ResizablePMCArray"
push $P314, "for"
@@ -3979,7 +3979,7 @@
.namespace ["NQP";"Grammar"]
-.sub "statement_control:sym<CATCH>" :subid("71_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "statement_control:sym<CATCH>" :subid("71_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx320_tgt
.local int rx320_pos
@@ -4076,7 +4076,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_control:sym<CATCH>" :subid("72_1261064023.05912") :method
+.sub "!PREFIX__statement_control:sym<CATCH>" :subid("72_1266337354.28388") :method
.annotate "line", 4
new $P322, "ResizablePMCArray"
push $P322, "CATCH"
@@ -4085,7 +4085,7 @@
.namespace ["NQP";"Grammar"]
-.sub "statement_control:sym<CONTROL>" :subid("73_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "statement_control:sym<CONTROL>" :subid("73_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx328_tgt
.local int rx328_pos
@@ -4182,7 +4182,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_control:sym<CONTROL>" :subid("74_1261064023.05912") :method
+.sub "!PREFIX__statement_control:sym<CONTROL>" :subid("74_1266337354.28388") :method
.annotate "line", 4
new $P330, "ResizablePMCArray"
push $P330, "CONTROL"
@@ -4191,7 +4191,7 @@
.namespace ["NQP";"Grammar"]
-.sub "statement_prefix" :subid("75_1261064023.05912") :method
+.sub "statement_prefix" :subid("75_1266337354.28388") :method
.annotate "line", 189
$P336 = self."!protoregex"("statement_prefix")
.return ($P336)
@@ -4199,7 +4199,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_prefix" :subid("76_1261064023.05912") :method
+.sub "!PREFIX__statement_prefix" :subid("76_1266337354.28388") :method
.annotate "line", 189
$P338 = self."!PREFIX__!protoregex"("statement_prefix")
.return ($P338)
@@ -4207,7 +4207,7 @@
.namespace ["NQP";"Grammar"]
-.sub "statement_prefix:sym<INIT>" :subid("77_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "statement_prefix:sym<INIT>" :subid("77_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx340_tgt
.local int rx340_pos
@@ -4286,7 +4286,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_prefix:sym<INIT>" :subid("78_1261064023.05912") :method
+.sub "!PREFIX__statement_prefix:sym<INIT>" :subid("78_1266337354.28388") :method
.annotate "line", 4
$P342 = self."!PREFIX__!subrule"("blorst", "INIT")
new $P343, "ResizablePMCArray"
@@ -4296,7 +4296,7 @@
.namespace ["NQP";"Grammar"]
-.sub "statement_prefix:sym<try>" :subid("79_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "statement_prefix:sym<try>" :subid("79_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx347_tgt
.local int rx347_pos
@@ -4377,7 +4377,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_prefix:sym<try>" :subid("80_1261064023.05912") :method
+.sub "!PREFIX__statement_prefix:sym<try>" :subid("80_1266337354.28388") :method
.annotate "line", 4
$P349 = self."!PREFIX__!subrule"("blorst", "try")
new $P350, "ResizablePMCArray"
@@ -4387,7 +4387,7 @@
.namespace ["NQP";"Grammar"]
-.sub "blorst" :subid("81_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "blorst" :subid("81_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx354_tgt
.local int rx354_pos
@@ -4476,7 +4476,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__blorst" :subid("82_1261064023.05912") :method
+.sub "!PREFIX__blorst" :subid("82_1266337354.28388") :method
.annotate "line", 4
new $P356, "ResizablePMCArray"
push $P356, ""
@@ -4485,7 +4485,7 @@
.namespace ["NQP";"Grammar"]
-.sub "statement_mod_cond" :subid("83_1261064023.05912") :method
+.sub "statement_mod_cond" :subid("83_1266337354.28388") :method
.annotate "line", 203
$P360 = self."!protoregex"("statement_mod_cond")
.return ($P360)
@@ -4493,7 +4493,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_mod_cond" :subid("84_1261064023.05912") :method
+.sub "!PREFIX__statement_mod_cond" :subid("84_1266337354.28388") :method
.annotate "line", 203
$P362 = self."!PREFIX__!protoregex"("statement_mod_cond")
.return ($P362)
@@ -4501,7 +4501,7 @@
.namespace ["NQP";"Grammar"]
-.sub "statement_mod_cond:sym<if>" :subid("85_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "statement_mod_cond:sym<if>" :subid("85_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx364_tgt
.local int rx364_pos
@@ -4590,7 +4590,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_mod_cond:sym<if>" :subid("86_1261064023.05912") :method
+.sub "!PREFIX__statement_mod_cond:sym<if>" :subid("86_1266337354.28388") :method
.annotate "line", 4
new $P366, "ResizablePMCArray"
push $P366, "if"
@@ -4599,7 +4599,7 @@
.namespace ["NQP";"Grammar"]
-.sub "statement_mod_cond:sym<unless>" :subid("87_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "statement_mod_cond:sym<unless>" :subid("87_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx372_tgt
.local int rx372_pos
@@ -4688,7 +4688,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_mod_cond:sym<unless>" :subid("88_1261064023.05912") :method
+.sub "!PREFIX__statement_mod_cond:sym<unless>" :subid("88_1266337354.28388") :method
.annotate "line", 4
new $P374, "ResizablePMCArray"
push $P374, "unless"
@@ -4697,7 +4697,7 @@
.namespace ["NQP";"Grammar"]
-.sub "statement_mod_loop" :subid("89_1261064023.05912") :method
+.sub "statement_mod_loop" :subid("89_1266337354.28388") :method
.annotate "line", 208
$P380 = self."!protoregex"("statement_mod_loop")
.return ($P380)
@@ -4705,7 +4705,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_mod_loop" :subid("90_1261064023.05912") :method
+.sub "!PREFIX__statement_mod_loop" :subid("90_1266337354.28388") :method
.annotate "line", 208
$P382 = self."!PREFIX__!protoregex"("statement_mod_loop")
.return ($P382)
@@ -4713,7 +4713,7 @@
.namespace ["NQP";"Grammar"]
-.sub "statement_mod_loop:sym<while>" :subid("91_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "statement_mod_loop:sym<while>" :subid("91_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx384_tgt
.local int rx384_pos
@@ -4802,7 +4802,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_mod_loop:sym<while>" :subid("92_1261064023.05912") :method
+.sub "!PREFIX__statement_mod_loop:sym<while>" :subid("92_1266337354.28388") :method
.annotate "line", 4
new $P386, "ResizablePMCArray"
push $P386, "while"
@@ -4811,7 +4811,7 @@
.namespace ["NQP";"Grammar"]
-.sub "statement_mod_loop:sym<until>" :subid("93_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "statement_mod_loop:sym<until>" :subid("93_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx392_tgt
.local int rx392_pos
@@ -4900,7 +4900,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__statement_mod_loop:sym<until>" :subid("94_1261064023.05912") :method
+.sub "!PREFIX__statement_mod_loop:sym<until>" :subid("94_1266337354.28388") :method
.annotate "line", 4
new $P394, "ResizablePMCArray"
push $P394, "until"
@@ -4909,7 +4909,7 @@
.namespace ["NQP";"Grammar"]
-.sub "term:sym<fatarrow>" :subid("95_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "term:sym<fatarrow>" :subid("95_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx400_tgt
.local int rx400_pos
@@ -4967,7 +4967,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term:sym<fatarrow>" :subid("96_1261064023.05912") :method
+.sub "!PREFIX__term:sym<fatarrow>" :subid("96_1266337354.28388") :method
.annotate "line", 4
$P402 = self."!PREFIX__!subrule"("fatarrow", "")
new $P403, "ResizablePMCArray"
@@ -4977,7 +4977,7 @@
.namespace ["NQP";"Grammar"]
-.sub "term:sym<colonpair>" :subid("97_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "term:sym<colonpair>" :subid("97_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx406_tgt
.local int rx406_pos
@@ -5035,7 +5035,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term:sym<colonpair>" :subid("98_1261064023.05912") :method
+.sub "!PREFIX__term:sym<colonpair>" :subid("98_1266337354.28388") :method
.annotate "line", 4
$P408 = self."!PREFIX__!subrule"("colonpair", "")
new $P409, "ResizablePMCArray"
@@ -5045,7 +5045,7 @@
.namespace ["NQP";"Grammar"]
-.sub "term:sym<variable>" :subid("99_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "term:sym<variable>" :subid("99_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx412_tgt
.local int rx412_pos
@@ -5103,7 +5103,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term:sym<variable>" :subid("100_1261064023.05912") :method
+.sub "!PREFIX__term:sym<variable>" :subid("100_1266337354.28388") :method
.annotate "line", 4
$P414 = self."!PREFIX__!subrule"("variable", "")
new $P415, "ResizablePMCArray"
@@ -5113,7 +5113,7 @@
.namespace ["NQP";"Grammar"]
-.sub "term:sym<package_declarator>" :subid("101_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "term:sym<package_declarator>" :subid("101_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx418_tgt
.local int rx418_pos
@@ -5171,7 +5171,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term:sym<package_declarator>" :subid("102_1261064023.05912") :method
+.sub "!PREFIX__term:sym<package_declarator>" :subid("102_1266337354.28388") :method
.annotate "line", 4
$P420 = self."!PREFIX__!subrule"("package_declarator", "")
new $P421, "ResizablePMCArray"
@@ -5181,7 +5181,7 @@
.namespace ["NQP";"Grammar"]
-.sub "term:sym<scope_declarator>" :subid("103_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "term:sym<scope_declarator>" :subid("103_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx424_tgt
.local int rx424_pos
@@ -5239,7 +5239,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term:sym<scope_declarator>" :subid("104_1261064023.05912") :method
+.sub "!PREFIX__term:sym<scope_declarator>" :subid("104_1266337354.28388") :method
.annotate "line", 4
$P426 = self."!PREFIX__!subrule"("scope_declarator", "")
new $P427, "ResizablePMCArray"
@@ -5249,7 +5249,7 @@
.namespace ["NQP";"Grammar"]
-.sub "term:sym<routine_declarator>" :subid("105_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "term:sym<routine_declarator>" :subid("105_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx430_tgt
.local int rx430_pos
@@ -5307,7 +5307,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term:sym<routine_declarator>" :subid("106_1261064023.05912") :method
+.sub "!PREFIX__term:sym<routine_declarator>" :subid("106_1266337354.28388") :method
.annotate "line", 4
$P432 = self."!PREFIX__!subrule"("routine_declarator", "")
new $P433, "ResizablePMCArray"
@@ -5317,7 +5317,7 @@
.namespace ["NQP";"Grammar"]
-.sub "term:sym<regex_declarator>" :subid("107_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "term:sym<regex_declarator>" :subid("107_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx436_tgt
.local int rx436_pos
@@ -5375,7 +5375,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term:sym<regex_declarator>" :subid("108_1261064023.05912") :method
+.sub "!PREFIX__term:sym<regex_declarator>" :subid("108_1266337354.28388") :method
.annotate "line", 4
$P438 = self."!PREFIX__!subrule"("regex_declarator", "")
new $P439, "ResizablePMCArray"
@@ -5385,7 +5385,7 @@
.namespace ["NQP";"Grammar"]
-.sub "term:sym<statement_prefix>" :subid("109_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "term:sym<statement_prefix>" :subid("109_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx442_tgt
.local int rx442_pos
@@ -5443,7 +5443,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term:sym<statement_prefix>" :subid("110_1261064023.05912") :method
+.sub "!PREFIX__term:sym<statement_prefix>" :subid("110_1266337354.28388") :method
.annotate "line", 4
$P444 = self."!PREFIX__!subrule"("statement_prefix", "")
new $P445, "ResizablePMCArray"
@@ -5453,7 +5453,7 @@
.namespace ["NQP";"Grammar"]
-.sub "term:sym<lambda>" :subid("111_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "term:sym<lambda>" :subid("111_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx448_tgt
.local int rx448_pos
@@ -5515,7 +5515,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term:sym<lambda>" :subid("112_1261064023.05912") :method
+.sub "!PREFIX__term:sym<lambda>" :subid("112_1266337354.28388") :method
.annotate "line", 4
new $P450, "ResizablePMCArray"
push $P450, ""
@@ -5524,7 +5524,7 @@
.namespace ["NQP";"Grammar"]
-.sub "fatarrow" :subid("113_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "fatarrow" :subid("113_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx453_tgt
.local int rx453_pos
@@ -5617,7 +5617,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__fatarrow" :subid("114_1261064023.05912") :method
+.sub "!PREFIX__fatarrow" :subid("114_1266337354.28388") :method
.annotate "line", 4
$P455 = self."!PREFIX__!subrule"("key", "")
new $P456, "ResizablePMCArray"
@@ -5627,7 +5627,7 @@
.namespace ["NQP";"Grammar"]
-.sub "colonpair" :subid("115_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "colonpair" :subid("115_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx461_tgt
.local int rx461_pos
@@ -5756,7 +5756,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__colonpair" :subid("116_1261064023.05912") :method
+.sub "!PREFIX__colonpair" :subid("116_1266337354.28388") :method
.annotate "line", 4
$P463 = self."!PREFIX__!subrule"("circumfix", ":")
$P464 = self."!PREFIX__!subrule"("identifier", ":")
@@ -5770,7 +5770,7 @@
.namespace ["NQP";"Grammar"]
-.sub "variable" :subid("117_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "variable" :subid("117_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx473_tgt
.local int rx473_pos
@@ -5925,7 +5925,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__variable" :subid("118_1261064023.05912") :method
+.sub "!PREFIX__variable" :subid("118_1266337354.28388") :method
.annotate "line", 4
$P475 = self."!PREFIX__!subrule"("sigil", "")
$P476 = self."!PREFIX__!subrule"("sigil", "")
@@ -5940,7 +5940,7 @@
.namespace ["NQP";"Grammar"]
-.sub "sigil" :subid("119_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "sigil" :subid("119_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx485_tgt
.local int rx485_pos
@@ -5998,7 +5998,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__sigil" :subid("120_1261064023.05912") :method
+.sub "!PREFIX__sigil" :subid("120_1266337354.28388") :method
.annotate "line", 4
new $P487, "ResizablePMCArray"
push $P487, "&"
@@ -6010,7 +6010,7 @@
.namespace ["NQP";"Grammar"]
-.sub "twigil" :subid("121_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "twigil" :subid("121_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx490_tgt
.local int rx490_pos
@@ -6068,7 +6068,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__twigil" :subid("122_1261064023.05912") :method
+.sub "!PREFIX__twigil" :subid("122_1266337354.28388") :method
.annotate "line", 4
new $P492, "ResizablePMCArray"
push $P492, "?"
@@ -6079,7 +6079,7 @@
.namespace ["NQP";"Grammar"]
-.sub "package_declarator" :subid("123_1261064023.05912") :method
+.sub "package_declarator" :subid("123_1266337354.28388") :method
.annotate "line", 248
$P495 = self."!protoregex"("package_declarator")
.return ($P495)
@@ -6087,7 +6087,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__package_declarator" :subid("124_1261064023.05912") :method
+.sub "!PREFIX__package_declarator" :subid("124_1266337354.28388") :method
.annotate "line", 248
$P497 = self."!PREFIX__!protoregex"("package_declarator")
.return ($P497)
@@ -6095,7 +6095,7 @@
.namespace ["NQP";"Grammar"]
-.sub "package_declarator:sym<module>" :subid("125_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "package_declarator:sym<module>" :subid("125_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx499_tgt
.local int rx499_pos
@@ -6174,7 +6174,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__package_declarator:sym<module>" :subid("126_1261064023.05912") :method
+.sub "!PREFIX__package_declarator:sym<module>" :subid("126_1266337354.28388") :method
.annotate "line", 4
$P501 = self."!PREFIX__!subrule"("package_def", "module")
new $P502, "ResizablePMCArray"
@@ -6184,7 +6184,7 @@
.namespace ["NQP";"Grammar"]
-.sub "package_declarator:sym<class>" :subid("127_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "package_declarator:sym<class>" :subid("127_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx506_tgt
.local int rx506_pos
@@ -6276,7 +6276,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__package_declarator:sym<class>" :subid("128_1261064023.05912") :method
+.sub "!PREFIX__package_declarator:sym<class>" :subid("128_1266337354.28388") :method
.annotate "line", 4
$P508 = self."!PREFIX__!subrule"("package_def", "grammar")
$P509 = self."!PREFIX__!subrule"("package_def", "class")
@@ -6288,7 +6288,7 @@
.namespace ["NQP";"Grammar"]
-.sub "package_def" :subid("129_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "package_def" :subid("129_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx515_tgt
.local int rx515_pos
@@ -6492,7 +6492,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__package_def" :subid("130_1261064023.05912") :method
+.sub "!PREFIX__package_def" :subid("130_1266337354.28388") :method
.annotate "line", 4
new $P517, "ResizablePMCArray"
push $P517, ""
@@ -6501,7 +6501,7 @@
.namespace ["NQP";"Grammar"]
-.sub "scope_declarator" :subid("131_1261064023.05912") :method
+.sub "scope_declarator" :subid("131_1266337354.28388") :method
.annotate "line", 262
$P538 = self."!protoregex"("scope_declarator")
.return ($P538)
@@ -6509,7 +6509,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__scope_declarator" :subid("132_1261064023.05912") :method
+.sub "!PREFIX__scope_declarator" :subid("132_1266337354.28388") :method
.annotate "line", 262
$P540 = self."!PREFIX__!protoregex"("scope_declarator")
.return ($P540)
@@ -6517,7 +6517,7 @@
.namespace ["NQP";"Grammar"]
-.sub "scope_declarator:sym<my>" :subid("133_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "scope_declarator:sym<my>" :subid("133_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx542_tgt
.local int rx542_pos
@@ -6596,7 +6596,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__scope_declarator:sym<my>" :subid("134_1261064023.05912") :method
+.sub "!PREFIX__scope_declarator:sym<my>" :subid("134_1266337354.28388") :method
.annotate "line", 4
$P544 = self."!PREFIX__!subrule"("scoped", "my")
new $P545, "ResizablePMCArray"
@@ -6606,7 +6606,7 @@
.namespace ["NQP";"Grammar"]
-.sub "scope_declarator:sym<our>" :subid("135_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "scope_declarator:sym<our>" :subid("135_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx549_tgt
.local int rx549_pos
@@ -6685,7 +6685,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__scope_declarator:sym<our>" :subid("136_1261064023.05912") :method
+.sub "!PREFIX__scope_declarator:sym<our>" :subid("136_1266337354.28388") :method
.annotate "line", 4
$P551 = self."!PREFIX__!subrule"("scoped", "our")
new $P552, "ResizablePMCArray"
@@ -6695,7 +6695,7 @@
.namespace ["NQP";"Grammar"]
-.sub "scope_declarator:sym<has>" :subid("137_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "scope_declarator:sym<has>" :subid("137_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx556_tgt
.local int rx556_pos
@@ -6774,7 +6774,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__scope_declarator:sym<has>" :subid("138_1261064023.05912") :method
+.sub "!PREFIX__scope_declarator:sym<has>" :subid("138_1266337354.28388") :method
.annotate "line", 4
$P558 = self."!PREFIX__!subrule"("scoped", "has")
new $P559, "ResizablePMCArray"
@@ -6784,7 +6784,7 @@
.namespace ["NQP";"Grammar"]
-.sub "scoped" :subid("139_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "scoped" :subid("139_1266337354.28388") :method :outer("11_1266337354.28388")
.param pmc param_563
.annotate "line", 267
.lex "$*SCOPE", param_563
@@ -6881,7 +6881,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__scoped" :subid("140_1261064023.05912") :method
+.sub "!PREFIX__scoped" :subid("140_1266337354.28388") :method
.annotate "line", 4
new $P566, "ResizablePMCArray"
push $P566, ""
@@ -6891,7 +6891,7 @@
.namespace ["NQP";"Grammar"]
-.sub "variable_declarator" :subid("141_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "variable_declarator" :subid("141_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx574_tgt
.local int rx574_pos
@@ -6949,7 +6949,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__variable_declarator" :subid("142_1261064023.05912") :method
+.sub "!PREFIX__variable_declarator" :subid("142_1266337354.28388") :method
.annotate "line", 4
$P576 = self."!PREFIX__!subrule"("variable", "")
new $P577, "ResizablePMCArray"
@@ -6959,7 +6959,7 @@
.namespace ["NQP";"Grammar"]
-.sub "routine_declarator" :subid("143_1261064023.05912") :method
+.sub "routine_declarator" :subid("143_1266337354.28388") :method
.annotate "line", 274
$P580 = self."!protoregex"("routine_declarator")
.return ($P580)
@@ -6967,7 +6967,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__routine_declarator" :subid("144_1261064023.05912") :method
+.sub "!PREFIX__routine_declarator" :subid("144_1266337354.28388") :method
.annotate "line", 274
$P582 = self."!PREFIX__!protoregex"("routine_declarator")
.return ($P582)
@@ -6975,7 +6975,7 @@
.namespace ["NQP";"Grammar"]
-.sub "routine_declarator:sym<sub>" :subid("145_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "routine_declarator:sym<sub>" :subid("145_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx584_tgt
.local int rx584_pos
@@ -7054,7 +7054,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__routine_declarator:sym<sub>" :subid("146_1261064023.05912") :method
+.sub "!PREFIX__routine_declarator:sym<sub>" :subid("146_1266337354.28388") :method
.annotate "line", 4
$P586 = self."!PREFIX__!subrule"("routine_def", "sub")
new $P587, "ResizablePMCArray"
@@ -7064,7 +7064,7 @@
.namespace ["NQP";"Grammar"]
-.sub "routine_declarator:sym<method>" :subid("147_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "routine_declarator:sym<method>" :subid("147_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx591_tgt
.local int rx591_pos
@@ -7143,7 +7143,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__routine_declarator:sym<method>" :subid("148_1261064023.05912") :method
+.sub "!PREFIX__routine_declarator:sym<method>" :subid("148_1266337354.28388") :method
.annotate "line", 4
$P593 = self."!PREFIX__!subrule"("method_def", "method")
new $P594, "ResizablePMCArray"
@@ -7153,7 +7153,7 @@
.namespace ["NQP";"Grammar"]
-.sub "routine_def" :subid("149_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "routine_def" :subid("149_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx598_tgt
.local int rx598_pos
@@ -7163,7 +7163,7 @@
.local pmc rx598_cur
(rx598_cur, rx598_pos, rx598_tgt) = self."!cursor_start"()
rx598_cur."!cursor_debug"("START ", "routine_def")
- rx598_cur."!cursor_caparray"("sigil", "deflongname")
+ rx598_cur."!cursor_caparray"("deflongname", "sigil")
.lex unicode:"$\x{a2}", rx598_cur
.local pmc match
.lex "$/", match
@@ -7360,7 +7360,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__routine_def" :subid("150_1261064023.05912") :method
+.sub "!PREFIX__routine_def" :subid("150_1266337354.28388") :method
.annotate "line", 4
new $P600, "ResizablePMCArray"
push $P600, ""
@@ -7369,7 +7369,7 @@
.namespace ["NQP";"Grammar"]
-.sub "method_def" :subid("151_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "method_def" :subid("151_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx622_tgt
.local int rx622_pos
@@ -7539,7 +7539,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__method_def" :subid("152_1261064023.05912") :method
+.sub "!PREFIX__method_def" :subid("152_1266337354.28388") :method
.annotate "line", 4
new $P624, "ResizablePMCArray"
push $P624, ""
@@ -7548,7 +7548,7 @@
.namespace ["NQP";"Grammar"]
-.sub "signature" :subid("153_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "signature" :subid("153_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx641_tgt
.local int rx641_pos
@@ -7638,7 +7638,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__signature" :subid("154_1261064023.05912") :method
+.sub "!PREFIX__signature" :subid("154_1266337354.28388") :method
.annotate "line", 4
new $P643, "ResizablePMCArray"
push $P643, ""
@@ -7647,7 +7647,7 @@
.namespace ["NQP";"Grammar"]
-.sub "parameter" :subid("155_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "parameter" :subid("155_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx650_tgt
.local int rx650_pos
@@ -7808,7 +7808,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__parameter" :subid("156_1261064023.05912") :method
+.sub "!PREFIX__parameter" :subid("156_1266337354.28388") :method
.annotate "line", 4
$P652 = self."!PREFIX__!subrule"("named_param", "")
$P653 = self."!PREFIX__!subrule"("param_var", "")
@@ -7822,7 +7822,7 @@
.namespace ["NQP";"Grammar"]
-.sub "param_var" :subid("157_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "param_var" :subid("157_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx665_tgt
.local int rx665_pos
@@ -7930,7 +7930,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__param_var" :subid("158_1261064023.05912") :method
+.sub "!PREFIX__param_var" :subid("158_1266337354.28388") :method
.annotate "line", 4
$P667 = self."!PREFIX__!subrule"("sigil", "")
new $P668, "ResizablePMCArray"
@@ -7940,7 +7940,7 @@
.namespace ["NQP";"Grammar"]
-.sub "named_param" :subid("159_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "named_param" :subid("159_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx675_tgt
.local int rx675_pos
@@ -8006,7 +8006,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__named_param" :subid("160_1261064023.05912") :method
+.sub "!PREFIX__named_param" :subid("160_1266337354.28388") :method
.annotate "line", 4
$P677 = self."!PREFIX__!subrule"("param_var", ":")
new $P678, "ResizablePMCArray"
@@ -8016,7 +8016,7 @@
.namespace ["NQP";"Grammar"]
-.sub "default_value" :subid("161_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "default_value" :subid("161_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx681_tgt
.local int rx681_pos
@@ -8096,7 +8096,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__default_value" :subid("162_1261064023.05912") :method
+.sub "!PREFIX__default_value" :subid("162_1266337354.28388") :method
.annotate "line", 4
new $P683, "ResizablePMCArray"
push $P683, ""
@@ -8105,7 +8105,7 @@
.namespace ["NQP";"Grammar"]
-.sub "regex_declarator" :subid("163_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "regex_declarator" :subid("163_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx689_tgt
.local int rx689_pos
@@ -8472,7 +8472,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__regex_declarator" :subid("164_1261064023.05912") :method
+.sub "!PREFIX__regex_declarator" :subid("164_1266337354.28388") :method
.annotate "line", 4
new $P691, "ResizablePMCArray"
push $P691, ""
@@ -8481,7 +8481,7 @@
.namespace ["NQP";"Grammar"]
-.sub "dotty" :subid("165_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "dotty" :subid("165_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx721_tgt
.local int rx721_pos
@@ -8637,7 +8637,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__dotty" :subid("166_1261064023.05912") :method
+.sub "!PREFIX__dotty" :subid("166_1266337354.28388") :method
.annotate "line", 4
$P723 = self."!PREFIX__!subrule"("longname=identifier", ".")
new $P724, "ResizablePMCArray"
@@ -8649,7 +8649,7 @@
.namespace ["NQP";"Grammar"]
-.sub "term" :subid("167_1261064023.05912") :method
+.sub "term" :subid("167_1266337354.28388") :method
.annotate "line", 343
$P732 = self."!protoregex"("term")
.return ($P732)
@@ -8657,7 +8657,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term" :subid("168_1261064023.05912") :method
+.sub "!PREFIX__term" :subid("168_1266337354.28388") :method
.annotate "line", 343
$P734 = self."!PREFIX__!protoregex"("term")
.return ($P734)
@@ -8665,7 +8665,7 @@
.namespace ["NQP";"Grammar"]
-.sub "term:sym<self>" :subid("169_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "term:sym<self>" :subid("169_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx736_tgt
.local int rx736_pos
@@ -8745,7 +8745,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term:sym<self>" :subid("170_1261064023.05912") :method
+.sub "!PREFIX__term:sym<self>" :subid("170_1266337354.28388") :method
.annotate "line", 4
new $P738, "ResizablePMCArray"
push $P738, "self"
@@ -8754,7 +8754,7 @@
.namespace ["NQP";"Grammar"]
-.sub "term:sym<identifier>" :subid("171_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "term:sym<identifier>" :subid("171_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx742_tgt
.local int rx742_pos
@@ -8826,7 +8826,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term:sym<identifier>" :subid("172_1261064023.05912") :method
+.sub "!PREFIX__term:sym<identifier>" :subid("172_1266337354.28388") :method
.annotate "line", 4
$P744 = self."!PREFIX__!subrule"("identifier", "")
new $P745, "ResizablePMCArray"
@@ -8836,7 +8836,7 @@
.namespace ["NQP";"Grammar"]
-.sub "term:sym<name>" :subid("173_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "term:sym<name>" :subid("173_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx748_tgt
.local int rx748_pos
@@ -8909,7 +8909,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term:sym<name>" :subid("174_1261064023.05912") :method
+.sub "!PREFIX__term:sym<name>" :subid("174_1266337354.28388") :method
.annotate "line", 4
$P750 = self."!PREFIX__!subrule"("name", "")
new $P751, "ResizablePMCArray"
@@ -8919,7 +8919,7 @@
.namespace ["NQP";"Grammar"]
-.sub "term:sym<pir::op>" :subid("175_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "term:sym<pir::op>" :subid("175_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx756_tgt
.local int rx756_pos
@@ -9012,7 +9012,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term:sym<pir::op>" :subid("176_1261064023.05912") :method
+.sub "!PREFIX__term:sym<pir::op>" :subid("176_1266337354.28388") :method
.annotate "line", 4
new $P758, "ResizablePMCArray"
push $P758, "pir::"
@@ -9021,7 +9021,7 @@
.namespace ["NQP";"Grammar"]
-.sub "args" :subid("177_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "args" :subid("177_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx764_tgt
.local int rx764_pos
@@ -9093,7 +9093,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__args" :subid("178_1261064023.05912") :method
+.sub "!PREFIX__args" :subid("178_1266337354.28388") :method
.annotate "line", 4
$P766 = self."!PREFIX__!subrule"("arglist", "(")
new $P767, "ResizablePMCArray"
@@ -9103,7 +9103,7 @@
.namespace ["NQP";"Grammar"]
-.sub "arglist" :subid("179_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "arglist" :subid("179_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx770_tgt
.local int rx770_pos
@@ -9175,7 +9175,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__arglist" :subid("180_1261064023.05912") :method
+.sub "!PREFIX__arglist" :subid("180_1266337354.28388") :method
.annotate "line", 4
$P772 = self."!PREFIX__!subrule"("", "")
new $P773, "ResizablePMCArray"
@@ -9185,7 +9185,7 @@
.namespace ["NQP";"Grammar"]
-.sub "term:sym<value>" :subid("181_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "term:sym<value>" :subid("181_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx777_tgt
.local int rx777_pos
@@ -9243,7 +9243,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__term:sym<value>" :subid("182_1261064023.05912") :method
+.sub "!PREFIX__term:sym<value>" :subid("182_1266337354.28388") :method
.annotate "line", 4
$P779 = self."!PREFIX__!subrule"("value", "")
new $P780, "ResizablePMCArray"
@@ -9253,7 +9253,7 @@
.namespace ["NQP";"Grammar"]
-.sub "value" :subid("183_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "value" :subid("183_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx783_tgt
.local int rx783_pos
@@ -9327,7 +9327,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__value" :subid("184_1261064023.05912") :method
+.sub "!PREFIX__value" :subid("184_1266337354.28388") :method
.annotate "line", 4
$P785 = self."!PREFIX__!subrule"("number", "")
$P786 = self."!PREFIX__!subrule"("quote", "")
@@ -9339,7 +9339,7 @@
.namespace ["NQP";"Grammar"]
-.sub "number" :subid("185_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "number" :subid("185_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx791_tgt
.local int rx791_pos
@@ -9439,7 +9439,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__number" :subid("186_1261064023.05912") :method
+.sub "!PREFIX__number" :subid("186_1266337354.28388") :method
.annotate "line", 4
new $P793, "ResizablePMCArray"
push $P793, ""
@@ -9448,7 +9448,7 @@
.namespace ["NQP";"Grammar"]
-.sub "quote" :subid("187_1261064023.05912") :method
+.sub "quote" :subid("187_1266337354.28388") :method
.annotate "line", 384
$P800 = self."!protoregex"("quote")
.return ($P800)
@@ -9456,7 +9456,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__quote" :subid("188_1261064023.05912") :method
+.sub "!PREFIX__quote" :subid("188_1266337354.28388") :method
.annotate "line", 384
$P802 = self."!PREFIX__!protoregex"("quote")
.return ($P802)
@@ -9464,7 +9464,7 @@
.namespace ["NQP";"Grammar"]
-.sub "quote:sym<apos>" :subid("189_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "quote:sym<apos>" :subid("189_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx804_tgt
.local int rx804_pos
@@ -9528,7 +9528,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__quote:sym<apos>" :subid("190_1261064023.05912") :method
+.sub "!PREFIX__quote:sym<apos>" :subid("190_1266337354.28388") :method
.annotate "line", 4
new $P806, "ResizablePMCArray"
push $P806, "'"
@@ -9537,7 +9537,7 @@
.namespace ["NQP";"Grammar"]
-.sub "quote:sym<dblq>" :subid("191_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "quote:sym<dblq>" :subid("191_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx809_tgt
.local int rx809_pos
@@ -9601,7 +9601,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__quote:sym<dblq>" :subid("192_1261064023.05912") :method
+.sub "!PREFIX__quote:sym<dblq>" :subid("192_1266337354.28388") :method
.annotate "line", 4
new $P811, "ResizablePMCArray"
push $P811, "\""
@@ -9610,7 +9610,7 @@
.namespace ["NQP";"Grammar"]
-.sub "quote:sym<q>" :subid("193_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "quote:sym<q>" :subid("193_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx814_tgt
.local int rx814_pos
@@ -9686,7 +9686,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__quote:sym<q>" :subid("194_1261064023.05912") :method
+.sub "!PREFIX__quote:sym<q>" :subid("194_1266337354.28388") :method
.annotate "line", 4
$P816 = self."!PREFIX__!subrule"("", "q")
new $P817, "ResizablePMCArray"
@@ -9696,7 +9696,7 @@
.namespace ["NQP";"Grammar"]
-.sub "quote:sym<qq>" :subid("195_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "quote:sym<qq>" :subid("195_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx820_tgt
.local int rx820_pos
@@ -9772,7 +9772,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__quote:sym<qq>" :subid("196_1261064023.05912") :method
+.sub "!PREFIX__quote:sym<qq>" :subid("196_1266337354.28388") :method
.annotate "line", 4
$P822 = self."!PREFIX__!subrule"("", "qq")
new $P823, "ResizablePMCArray"
@@ -9782,7 +9782,7 @@
.namespace ["NQP";"Grammar"]
-.sub "quote:sym<Q>" :subid("197_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "quote:sym<Q>" :subid("197_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx826_tgt
.local int rx826_pos
@@ -9858,7 +9858,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__quote:sym<Q>" :subid("198_1261064023.05912") :method
+.sub "!PREFIX__quote:sym<Q>" :subid("198_1266337354.28388") :method
.annotate "line", 4
$P828 = self."!PREFIX__!subrule"("", "Q")
new $P829, "ResizablePMCArray"
@@ -9868,7 +9868,7 @@
.namespace ["NQP";"Grammar"]
-.sub "quote:sym<Q:PIR>" :subid("199_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "quote:sym<Q:PIR>" :subid("199_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx832_tgt
.local int rx832_pos
@@ -9938,7 +9938,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__quote:sym<Q:PIR>" :subid("200_1261064023.05912") :method
+.sub "!PREFIX__quote:sym<Q:PIR>" :subid("200_1266337354.28388") :method
.annotate "line", 4
$P834 = self."!PREFIX__!subrule"("", "Q:PIR")
new $P835, "ResizablePMCArray"
@@ -9948,7 +9948,7 @@
.namespace ["NQP";"Grammar"]
-.sub "quote:sym</ />" :subid("201_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "quote:sym</ />" :subid("201_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx838_tgt
.local int rx838_pos
@@ -10033,7 +10033,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__quote:sym</ />" :subid("202_1261064023.05912") :method
+.sub "!PREFIX__quote:sym</ />" :subid("202_1266337354.28388") :method
.annotate "line", 4
$P840 = self."!PREFIX__!subrule"("", "/")
new $P841, "ResizablePMCArray"
@@ -10043,7 +10043,7 @@
.namespace ["NQP";"Grammar"]
-.sub "quote_escape:sym<$>" :subid("203_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "quote_escape:sym<$>" :subid("203_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx844_tgt
.local int rx844_pos
@@ -10111,7 +10111,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__quote_escape:sym<$>" :subid("204_1261064023.05912") :method
+.sub "!PREFIX__quote_escape:sym<$>" :subid("204_1266337354.28388") :method
.annotate "line", 4
new $P846, "ResizablePMCArray"
push $P846, "$"
@@ -10120,7 +10120,7 @@
.namespace ["NQP";"Grammar"]
-.sub "quote_escape:sym<{ }>" :subid("205_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "quote_escape:sym<{ }>" :subid("205_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx849_tgt
.local int rx849_pos
@@ -10188,7 +10188,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__quote_escape:sym<{ }>" :subid("206_1261064023.05912") :method
+.sub "!PREFIX__quote_escape:sym<{ }>" :subid("206_1266337354.28388") :method
.annotate "line", 4
new $P851, "ResizablePMCArray"
push $P851, "{"
@@ -10197,7 +10197,7 @@
.namespace ["NQP";"Grammar"]
-.sub "circumfix:sym<( )>" :subid("207_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "circumfix:sym<( )>" :subid("207_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx854_tgt
.local int rx854_pos
@@ -10281,7 +10281,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__circumfix:sym<( )>" :subid("208_1261064023.05912") :method
+.sub "!PREFIX__circumfix:sym<( )>" :subid("208_1266337354.28388") :method
.annotate "line", 4
$P856 = self."!PREFIX__!subrule"("", "(")
new $P857, "ResizablePMCArray"
@@ -10291,7 +10291,7 @@
.namespace ["NQP";"Grammar"]
-.sub "circumfix:sym<[ ]>" :subid("209_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "circumfix:sym<[ ]>" :subid("209_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx862_tgt
.local int rx862_pos
@@ -10375,7 +10375,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__circumfix:sym<[ ]>" :subid("210_1261064023.05912") :method
+.sub "!PREFIX__circumfix:sym<[ ]>" :subid("210_1266337354.28388") :method
.annotate "line", 4
$P864 = self."!PREFIX__!subrule"("", "[")
new $P865, "ResizablePMCArray"
@@ -10385,7 +10385,7 @@
.namespace ["NQP";"Grammar"]
-.sub "circumfix:sym<ang>" :subid("211_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "circumfix:sym<ang>" :subid("211_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx870_tgt
.local int rx870_pos
@@ -10449,7 +10449,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__circumfix:sym<ang>" :subid("212_1261064023.05912") :method
+.sub "!PREFIX__circumfix:sym<ang>" :subid("212_1266337354.28388") :method
.annotate "line", 4
new $P872, "ResizablePMCArray"
push $P872, "<"
@@ -10458,7 +10458,7 @@
.namespace ["NQP";"Grammar"]
-.sub unicode:"circumfix:sym<\x{ab} \x{bb}>" :subid("213_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub unicode:"circumfix:sym<\x{ab} \x{bb}>" :subid("213_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx875_tgt
.local int rx875_pos
@@ -10522,7 +10522,7 @@
.namespace ["NQP";"Grammar"]
-.sub unicode:"!PREFIX__circumfix:sym<\x{ab} \x{bb}>" :subid("214_1261064023.05912") :method
+.sub unicode:"!PREFIX__circumfix:sym<\x{ab} \x{bb}>" :subid("214_1266337354.28388") :method
.annotate "line", 4
new $P877, "ResizablePMCArray"
push $P877, unicode:"\x{ab}"
@@ -10531,7 +10531,7 @@
.namespace ["NQP";"Grammar"]
-.sub "circumfix:sym<{ }>" :subid("215_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "circumfix:sym<{ }>" :subid("215_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx880_tgt
.local int rx880_pos
@@ -10595,7 +10595,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__circumfix:sym<{ }>" :subid("216_1261064023.05912") :method
+.sub "!PREFIX__circumfix:sym<{ }>" :subid("216_1266337354.28388") :method
.annotate "line", 4
new $P882, "ResizablePMCArray"
push $P882, "{"
@@ -10604,7 +10604,7 @@
.namespace ["NQP";"Grammar"]
-.sub "circumfix:sym<sigil>" :subid("217_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "circumfix:sym<sigil>" :subid("217_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx885_tgt
.local int rx885_pos
@@ -10694,7 +10694,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__circumfix:sym<sigil>" :subid("218_1261064023.05912") :method
+.sub "!PREFIX__circumfix:sym<sigil>" :subid("218_1266337354.28388") :method
.annotate "line", 4
$P887 = self."!PREFIX__!subrule"("sigil", "")
new $P888, "ResizablePMCArray"
@@ -10704,7 +10704,7 @@
.namespace ["NQP";"Grammar"]
-.sub "semilist" :subid("219_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "semilist" :subid("219_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 4
.local string rx893_tgt
.local int rx893_pos
@@ -10772,7 +10772,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__semilist" :subid("220_1261064023.05912") :method
+.sub "!PREFIX__semilist" :subid("220_1266337354.28388") :method
.annotate "line", 4
new $P895, "ResizablePMCArray"
push $P895, ""
@@ -10781,7 +10781,7 @@
.namespace ["NQP";"Grammar"]
-.sub "infixish" :subid("221_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "infixish" :subid("221_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx900_tgt
.local int rx900_pos
@@ -10843,7 +10843,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infixish" :subid("222_1261064023.05912") :method
+.sub "!PREFIX__infixish" :subid("222_1266337354.28388") :method
.annotate "line", 413
new $P902, "ResizablePMCArray"
push $P902, ""
@@ -10852,7 +10852,7 @@
.namespace ["NQP";"Grammar"]
-.sub "infixstopper" :subid("223_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "infixstopper" :subid("223_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx905_tgt
.local int rx905_pos
@@ -10907,7 +10907,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infixstopper" :subid("224_1261064023.05912") :method
+.sub "!PREFIX__infixstopper" :subid("224_1266337354.28388") :method
.annotate "line", 413
new $P907, "ResizablePMCArray"
push $P907, ""
@@ -10916,7 +10916,7 @@
.namespace ["NQP";"Grammar"]
-.sub "postcircumfix:sym<[ ]>" :subid("225_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "postcircumfix:sym<[ ]>" :subid("225_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx910_tgt
.local int rx910_pos
@@ -11002,7 +11002,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__postcircumfix:sym<[ ]>" :subid("226_1261064023.05912") :method
+.sub "!PREFIX__postcircumfix:sym<[ ]>" :subid("226_1266337354.28388") :method
.annotate "line", 413
$P912 = self."!PREFIX__!subrule"("", "[")
new $P913, "ResizablePMCArray"
@@ -11012,7 +11012,7 @@
.namespace ["NQP";"Grammar"]
-.sub "postcircumfix:sym<{ }>" :subid("227_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "postcircumfix:sym<{ }>" :subid("227_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx916_tgt
.local int rx916_pos
@@ -11098,7 +11098,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__postcircumfix:sym<{ }>" :subid("228_1261064023.05912") :method
+.sub "!PREFIX__postcircumfix:sym<{ }>" :subid("228_1266337354.28388") :method
.annotate "line", 413
$P918 = self."!PREFIX__!subrule"("", "{")
new $P919, "ResizablePMCArray"
@@ -11108,7 +11108,7 @@
.namespace ["NQP";"Grammar"]
-.sub "postcircumfix:sym<ang>" :subid("229_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "postcircumfix:sym<ang>" :subid("229_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx922_tgt
.local int rx922_pos
@@ -11181,7 +11181,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__postcircumfix:sym<ang>" :subid("230_1261064023.05912") :method
+.sub "!PREFIX__postcircumfix:sym<ang>" :subid("230_1266337354.28388") :method
.annotate "line", 413
new $P924, "ResizablePMCArray"
push $P924, "<"
@@ -11190,7 +11190,7 @@
.namespace ["NQP";"Grammar"]
-.sub "postcircumfix:sym<( )>" :subid("231_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "postcircumfix:sym<( )>" :subid("231_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx927_tgt
.local int rx927_pos
@@ -11276,7 +11276,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__postcircumfix:sym<( )>" :subid("232_1261064023.05912") :method
+.sub "!PREFIX__postcircumfix:sym<( )>" :subid("232_1266337354.28388") :method
.annotate "line", 413
$P929 = self."!PREFIX__!subrule"("", "(")
new $P930, "ResizablePMCArray"
@@ -11286,7 +11286,7 @@
.namespace ["NQP";"Grammar"]
-.sub "postfix:sym<.>" :subid("233_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "postfix:sym<.>" :subid("233_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx933_tgt
.local int rx933_pos
@@ -11351,7 +11351,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__postfix:sym<.>" :subid("234_1261064023.05912") :method
+.sub "!PREFIX__postfix:sym<.>" :subid("234_1266337354.28388") :method
.annotate "line", 413
$P935 = self."!PREFIX__!subrule"("dotty", "")
new $P936, "ResizablePMCArray"
@@ -11361,7 +11361,7 @@
.namespace ["NQP";"Grammar"]
-.sub "prefix:sym<++>" :subid("235_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "prefix:sym<++>" :subid("235_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx939_tgt
.local int rx939_pos
@@ -11440,7 +11440,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__prefix:sym<++>" :subid("236_1261064023.05912") :method
+.sub "!PREFIX__prefix:sym<++>" :subid("236_1266337354.28388") :method
.annotate "line", 413
$P941 = self."!PREFIX__!subrule"("O", "++")
new $P942, "ResizablePMCArray"
@@ -11450,7 +11450,7 @@
.namespace ["NQP";"Grammar"]
-.sub "prefix:sym<-->" :subid("237_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "prefix:sym<-->" :subid("237_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx946_tgt
.local int rx946_pos
@@ -11529,7 +11529,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__prefix:sym<-->" :subid("238_1261064023.05912") :method
+.sub "!PREFIX__prefix:sym<-->" :subid("238_1266337354.28388") :method
.annotate "line", 413
$P948 = self."!PREFIX__!subrule"("O", "--")
new $P949, "ResizablePMCArray"
@@ -11539,7 +11539,7 @@
.namespace ["NQP";"Grammar"]
-.sub "postfix:sym<++>" :subid("239_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "postfix:sym<++>" :subid("239_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx953_tgt
.local int rx953_pos
@@ -11618,7 +11618,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__postfix:sym<++>" :subid("240_1261064023.05912") :method
+.sub "!PREFIX__postfix:sym<++>" :subid("240_1266337354.28388") :method
.annotate "line", 413
$P955 = self."!PREFIX__!subrule"("O", "++")
new $P956, "ResizablePMCArray"
@@ -11628,7 +11628,7 @@
.namespace ["NQP";"Grammar"]
-.sub "postfix:sym<-->" :subid("241_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "postfix:sym<-->" :subid("241_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx960_tgt
.local int rx960_pos
@@ -11707,7 +11707,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__postfix:sym<-->" :subid("242_1261064023.05912") :method
+.sub "!PREFIX__postfix:sym<-->" :subid("242_1266337354.28388") :method
.annotate "line", 413
$P962 = self."!PREFIX__!subrule"("O", "--")
new $P963, "ResizablePMCArray"
@@ -11717,7 +11717,7 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<**>" :subid("243_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "infix:sym<**>" :subid("243_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx967_tgt
.local int rx967_pos
@@ -11796,7 +11796,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<**>" :subid("244_1261064023.05912") :method
+.sub "!PREFIX__infix:sym<**>" :subid("244_1266337354.28388") :method
.annotate "line", 413
$P969 = self."!PREFIX__!subrule"("O", "**")
new $P970, "ResizablePMCArray"
@@ -11806,7 +11806,7 @@
.namespace ["NQP";"Grammar"]
-.sub "prefix:sym<+>" :subid("245_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "prefix:sym<+>" :subid("245_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx974_tgt
.local int rx974_pos
@@ -11885,7 +11885,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__prefix:sym<+>" :subid("246_1261064023.05912") :method
+.sub "!PREFIX__prefix:sym<+>" :subid("246_1266337354.28388") :method
.annotate "line", 413
$P976 = self."!PREFIX__!subrule"("O", "+")
new $P977, "ResizablePMCArray"
@@ -11895,7 +11895,7 @@
.namespace ["NQP";"Grammar"]
-.sub "prefix:sym<~>" :subid("247_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "prefix:sym<~>" :subid("247_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx981_tgt
.local int rx981_pos
@@ -11974,7 +11974,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__prefix:sym<~>" :subid("248_1261064023.05912") :method
+.sub "!PREFIX__prefix:sym<~>" :subid("248_1266337354.28388") :method
.annotate "line", 413
$P983 = self."!PREFIX__!subrule"("O", "~")
new $P984, "ResizablePMCArray"
@@ -11984,7 +11984,7 @@
.namespace ["NQP";"Grammar"]
-.sub "prefix:sym<->" :subid("249_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "prefix:sym<->" :subid("249_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx988_tgt
.local int rx988_pos
@@ -12073,7 +12073,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__prefix:sym<->" :subid("250_1261064023.05912") :method
+.sub "!PREFIX__prefix:sym<->" :subid("250_1266337354.28388") :method
.annotate "line", 413
new $P990, "ResizablePMCArray"
push $P990, "-"
@@ -12082,7 +12082,7 @@
.namespace ["NQP";"Grammar"]
-.sub "prefix:sym<?>" :subid("251_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "prefix:sym<?>" :subid("251_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx994_tgt
.local int rx994_pos
@@ -12161,7 +12161,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__prefix:sym<?>" :subid("252_1261064023.05912") :method
+.sub "!PREFIX__prefix:sym<?>" :subid("252_1266337354.28388") :method
.annotate "line", 413
$P996 = self."!PREFIX__!subrule"("O", "?")
new $P997, "ResizablePMCArray"
@@ -12171,7 +12171,7 @@
.namespace ["NQP";"Grammar"]
-.sub "prefix:sym<!>" :subid("253_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "prefix:sym<!>" :subid("253_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx1001_tgt
.local int rx1001_pos
@@ -12250,7 +12250,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__prefix:sym<!>" :subid("254_1261064023.05912") :method
+.sub "!PREFIX__prefix:sym<!>" :subid("254_1266337354.28388") :method
.annotate "line", 413
$P1003 = self."!PREFIX__!subrule"("O", "!")
new $P1004, "ResizablePMCArray"
@@ -12260,7 +12260,7 @@
.namespace ["NQP";"Grammar"]
-.sub "prefix:sym<|>" :subid("255_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "prefix:sym<|>" :subid("255_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx1008_tgt
.local int rx1008_pos
@@ -12339,7 +12339,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__prefix:sym<|>" :subid("256_1261064023.05912") :method
+.sub "!PREFIX__prefix:sym<|>" :subid("256_1266337354.28388") :method
.annotate "line", 413
$P1010 = self."!PREFIX__!subrule"("O", "|")
new $P1011, "ResizablePMCArray"
@@ -12349,7 +12349,7 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<*>" :subid("257_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "infix:sym<*>" :subid("257_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx1015_tgt
.local int rx1015_pos
@@ -12428,7 +12428,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<*>" :subid("258_1261064023.05912") :method
+.sub "!PREFIX__infix:sym<*>" :subid("258_1266337354.28388") :method
.annotate "line", 413
$P1017 = self."!PREFIX__!subrule"("O", "*")
new $P1018, "ResizablePMCArray"
@@ -12438,7 +12438,7 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym</>" :subid("259_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "infix:sym</>" :subid("259_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx1022_tgt
.local int rx1022_pos
@@ -12517,7 +12517,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym</>" :subid("260_1261064023.05912") :method
+.sub "!PREFIX__infix:sym</>" :subid("260_1266337354.28388") :method
.annotate "line", 413
$P1024 = self."!PREFIX__!subrule"("O", "/")
new $P1025, "ResizablePMCArray"
@@ -12527,7 +12527,7 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<%>" :subid("261_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "infix:sym<%>" :subid("261_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx1029_tgt
.local int rx1029_pos
@@ -12606,7 +12606,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<%>" :subid("262_1261064023.05912") :method
+.sub "!PREFIX__infix:sym<%>" :subid("262_1266337354.28388") :method
.annotate "line", 413
$P1031 = self."!PREFIX__!subrule"("O", "%")
new $P1032, "ResizablePMCArray"
@@ -12616,7 +12616,7 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<+>" :subid("263_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "infix:sym<+>" :subid("263_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx1036_tgt
.local int rx1036_pos
@@ -12695,7 +12695,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<+>" :subid("264_1261064023.05912") :method
+.sub "!PREFIX__infix:sym<+>" :subid("264_1266337354.28388") :method
.annotate "line", 413
$P1038 = self."!PREFIX__!subrule"("O", "+")
new $P1039, "ResizablePMCArray"
@@ -12705,7 +12705,7 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<->" :subid("265_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "infix:sym<->" :subid("265_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx1043_tgt
.local int rx1043_pos
@@ -12784,7 +12784,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<->" :subid("266_1261064023.05912") :method
+.sub "!PREFIX__infix:sym<->" :subid("266_1266337354.28388") :method
.annotate "line", 413
$P1045 = self."!PREFIX__!subrule"("O", "-")
new $P1046, "ResizablePMCArray"
@@ -12794,7 +12794,7 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<~>" :subid("267_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "infix:sym<~>" :subid("267_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx1050_tgt
.local int rx1050_pos
@@ -12873,7 +12873,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<~>" :subid("268_1261064023.05912") :method
+.sub "!PREFIX__infix:sym<~>" :subid("268_1266337354.28388") :method
.annotate "line", 413
$P1052 = self."!PREFIX__!subrule"("O", "~")
new $P1053, "ResizablePMCArray"
@@ -12883,7 +12883,7 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<==>" :subid("269_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "infix:sym<==>" :subid("269_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx1057_tgt
.local int rx1057_pos
@@ -12962,7 +12962,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<==>" :subid("270_1261064023.05912") :method
+.sub "!PREFIX__infix:sym<==>" :subid("270_1266337354.28388") :method
.annotate "line", 413
$P1059 = self."!PREFIX__!subrule"("O", "==")
new $P1060, "ResizablePMCArray"
@@ -12972,7 +12972,7 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<!=>" :subid("271_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "infix:sym<!=>" :subid("271_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx1064_tgt
.local int rx1064_pos
@@ -13051,7 +13051,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<!=>" :subid("272_1261064023.05912") :method
+.sub "!PREFIX__infix:sym<!=>" :subid("272_1266337354.28388") :method
.annotate "line", 413
$P1066 = self."!PREFIX__!subrule"("O", "!=")
new $P1067, "ResizablePMCArray"
@@ -13061,7 +13061,7 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<<=>" :subid("273_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "infix:sym<<=>" :subid("273_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx1071_tgt
.local int rx1071_pos
@@ -13140,7 +13140,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<<=>" :subid("274_1261064023.05912") :method
+.sub "!PREFIX__infix:sym<<=>" :subid("274_1266337354.28388") :method
.annotate "line", 413
$P1073 = self."!PREFIX__!subrule"("O", "<=")
new $P1074, "ResizablePMCArray"
@@ -13150,7 +13150,7 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<>=>" :subid("275_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "infix:sym<>=>" :subid("275_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx1078_tgt
.local int rx1078_pos
@@ -13229,7 +13229,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<>=>" :subid("276_1261064023.05912") :method
+.sub "!PREFIX__infix:sym<>=>" :subid("276_1266337354.28388") :method
.annotate "line", 413
$P1080 = self."!PREFIX__!subrule"("O", ">=")
new $P1081, "ResizablePMCArray"
@@ -13239,7 +13239,7 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<<>" :subid("277_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "infix:sym<<>" :subid("277_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx1085_tgt
.local int rx1085_pos
@@ -13318,7 +13318,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<<>" :subid("278_1261064023.05912") :method
+.sub "!PREFIX__infix:sym<<>" :subid("278_1266337354.28388") :method
.annotate "line", 413
$P1087 = self."!PREFIX__!subrule"("O", "<")
new $P1088, "ResizablePMCArray"
@@ -13328,7 +13328,7 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<>>" :subid("279_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "infix:sym<>>" :subid("279_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx1092_tgt
.local int rx1092_pos
@@ -13407,7 +13407,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<>>" :subid("280_1261064023.05912") :method
+.sub "!PREFIX__infix:sym<>>" :subid("280_1266337354.28388") :method
.annotate "line", 413
$P1094 = self."!PREFIX__!subrule"("O", ">")
new $P1095, "ResizablePMCArray"
@@ -13417,7 +13417,7 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<eq>" :subid("281_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "infix:sym<eq>" :subid("281_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx1099_tgt
.local int rx1099_pos
@@ -13496,7 +13496,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<eq>" :subid("282_1261064023.05912") :method
+.sub "!PREFIX__infix:sym<eq>" :subid("282_1266337354.28388") :method
.annotate "line", 413
$P1101 = self."!PREFIX__!subrule"("O", "eq")
new $P1102, "ResizablePMCArray"
@@ -13506,7 +13506,7 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<ne>" :subid("283_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "infix:sym<ne>" :subid("283_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx1106_tgt
.local int rx1106_pos
@@ -13585,7 +13585,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<ne>" :subid("284_1261064023.05912") :method
+.sub "!PREFIX__infix:sym<ne>" :subid("284_1266337354.28388") :method
.annotate "line", 413
$P1108 = self."!PREFIX__!subrule"("O", "ne")
new $P1109, "ResizablePMCArray"
@@ -13595,7 +13595,7 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<le>" :subid("285_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "infix:sym<le>" :subid("285_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx1113_tgt
.local int rx1113_pos
@@ -13674,7 +13674,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<le>" :subid("286_1261064023.05912") :method
+.sub "!PREFIX__infix:sym<le>" :subid("286_1266337354.28388") :method
.annotate "line", 413
$P1115 = self."!PREFIX__!subrule"("O", "le")
new $P1116, "ResizablePMCArray"
@@ -13684,7 +13684,7 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<ge>" :subid("287_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "infix:sym<ge>" :subid("287_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx1120_tgt
.local int rx1120_pos
@@ -13763,7 +13763,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<ge>" :subid("288_1261064023.05912") :method
+.sub "!PREFIX__infix:sym<ge>" :subid("288_1266337354.28388") :method
.annotate "line", 413
$P1122 = self."!PREFIX__!subrule"("O", "ge")
new $P1123, "ResizablePMCArray"
@@ -13773,7 +13773,7 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<lt>" :subid("289_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "infix:sym<lt>" :subid("289_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx1127_tgt
.local int rx1127_pos
@@ -13852,7 +13852,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<lt>" :subid("290_1261064023.05912") :method
+.sub "!PREFIX__infix:sym<lt>" :subid("290_1266337354.28388") :method
.annotate "line", 413
$P1129 = self."!PREFIX__!subrule"("O", "lt")
new $P1130, "ResizablePMCArray"
@@ -13862,7 +13862,7 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<gt>" :subid("291_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "infix:sym<gt>" :subid("291_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx1134_tgt
.local int rx1134_pos
@@ -13941,7 +13941,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<gt>" :subid("292_1261064023.05912") :method
+.sub "!PREFIX__infix:sym<gt>" :subid("292_1266337354.28388") :method
.annotate "line", 413
$P1136 = self."!PREFIX__!subrule"("O", "gt")
new $P1137, "ResizablePMCArray"
@@ -13951,7 +13951,7 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<=:=>" :subid("293_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "infix:sym<=:=>" :subid("293_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx1141_tgt
.local int rx1141_pos
@@ -14030,7 +14030,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<=:=>" :subid("294_1261064023.05912") :method
+.sub "!PREFIX__infix:sym<=:=>" :subid("294_1266337354.28388") :method
.annotate "line", 413
$P1143 = self."!PREFIX__!subrule"("O", "=:=")
new $P1144, "ResizablePMCArray"
@@ -14040,7 +14040,7 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<~~>" :subid("295_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "infix:sym<~~>" :subid("295_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx1148_tgt
.local int rx1148_pos
@@ -14119,7 +14119,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<~~>" :subid("296_1261064023.05912") :method
+.sub "!PREFIX__infix:sym<~~>" :subid("296_1266337354.28388") :method
.annotate "line", 413
$P1150 = self."!PREFIX__!subrule"("O", "~~")
new $P1151, "ResizablePMCArray"
@@ -14129,7 +14129,7 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<&&>" :subid("297_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "infix:sym<&&>" :subid("297_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx1155_tgt
.local int rx1155_pos
@@ -14208,7 +14208,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<&&>" :subid("298_1261064023.05912") :method
+.sub "!PREFIX__infix:sym<&&>" :subid("298_1266337354.28388") :method
.annotate "line", 413
$P1157 = self."!PREFIX__!subrule"("O", "&&")
new $P1158, "ResizablePMCArray"
@@ -14218,7 +14218,7 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<||>" :subid("299_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "infix:sym<||>" :subid("299_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx1162_tgt
.local int rx1162_pos
@@ -14297,7 +14297,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<||>" :subid("300_1261064023.05912") :method
+.sub "!PREFIX__infix:sym<||>" :subid("300_1266337354.28388") :method
.annotate "line", 413
$P1164 = self."!PREFIX__!subrule"("O", "||")
new $P1165, "ResizablePMCArray"
@@ -14307,7 +14307,7 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<//>" :subid("301_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "infix:sym<//>" :subid("301_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx1169_tgt
.local int rx1169_pos
@@ -14386,7 +14386,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<//>" :subid("302_1261064023.05912") :method
+.sub "!PREFIX__infix:sym<//>" :subid("302_1266337354.28388") :method
.annotate "line", 413
$P1171 = self."!PREFIX__!subrule"("O", "//")
new $P1172, "ResizablePMCArray"
@@ -14396,7 +14396,7 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<?? !!>" :subid("303_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "infix:sym<?? !!>" :subid("303_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx1176_tgt
.local int rx1176_pos
@@ -14485,7 +14485,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<?? !!>" :subid("304_1261064023.05912") :method
+.sub "!PREFIX__infix:sym<?? !!>" :subid("304_1266337354.28388") :method
.annotate "line", 413
$P1178 = self."!PREFIX__!subrule"("", "??")
new $P1179, "ResizablePMCArray"
@@ -14495,7 +14495,7 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<=>" :subid("305_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "infix:sym<=>" :subid("305_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx1182_tgt
.local int rx1182_pos
@@ -14573,7 +14573,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<=>" :subid("306_1261064023.05912") :method
+.sub "!PREFIX__infix:sym<=>" :subid("306_1266337354.28388") :method
.annotate "line", 413
$P1184 = self."!PREFIX__!subrule"("", "=")
new $P1185, "ResizablePMCArray"
@@ -14583,7 +14583,7 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<:=>" :subid("307_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "infix:sym<:=>" :subid("307_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx1189_tgt
.local int rx1189_pos
@@ -14662,7 +14662,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<:=>" :subid("308_1261064023.05912") :method
+.sub "!PREFIX__infix:sym<:=>" :subid("308_1266337354.28388") :method
.annotate "line", 413
$P1191 = self."!PREFIX__!subrule"("O", ":=")
new $P1192, "ResizablePMCArray"
@@ -14672,7 +14672,7 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<::=>" :subid("309_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "infix:sym<::=>" :subid("309_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx1196_tgt
.local int rx1196_pos
@@ -14751,7 +14751,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<::=>" :subid("310_1261064023.05912") :method
+.sub "!PREFIX__infix:sym<::=>" :subid("310_1266337354.28388") :method
.annotate "line", 413
$P1198 = self."!PREFIX__!subrule"("O", "::=")
new $P1199, "ResizablePMCArray"
@@ -14761,7 +14761,7 @@
.namespace ["NQP";"Grammar"]
-.sub "infix:sym<,>" :subid("311_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "infix:sym<,>" :subid("311_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx1203_tgt
.local int rx1203_pos
@@ -14840,7 +14840,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__infix:sym<,>" :subid("312_1261064023.05912") :method
+.sub "!PREFIX__infix:sym<,>" :subid("312_1266337354.28388") :method
.annotate "line", 413
$P1205 = self."!PREFIX__!subrule"("O", ",")
new $P1206, "ResizablePMCArray"
@@ -14850,7 +14850,7 @@
.namespace ["NQP";"Grammar"]
-.sub "prefix:sym<return>" :subid("313_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "prefix:sym<return>" :subid("313_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx1210_tgt
.local int rx1210_pos
@@ -14935,7 +14935,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__prefix:sym<return>" :subid("314_1261064023.05912") :method
+.sub "!PREFIX__prefix:sym<return>" :subid("314_1266337354.28388") :method
.annotate "line", 413
new $P1212, "ResizablePMCArray"
push $P1212, "return"
@@ -14944,7 +14944,7 @@
.namespace ["NQP";"Grammar"]
-.sub "prefix:sym<make>" :subid("315_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "prefix:sym<make>" :subid("315_1266337354.28388") :method :outer("11_1266337354.28388")
.annotate "line", 413
.local string rx1216_tgt
.local int rx1216_pos
@@ -15029,7 +15029,7 @@
.namespace ["NQP";"Grammar"]
-.sub "!PREFIX__prefix:sym<make>" :subid("316_1261064023.05912") :method
+.sub "!PREFIX__prefix:sym<make>" :subid("316_1266337354.28388") :method
.annotate "line", 413
new $P1218, "ResizablePMCArray"
push $P1218, "make"
@@ -15038,7 +15038,7 @@
.namespace ["NQP";"Grammar"]
-.sub "smartmatch" :subid("317_1261064023.05912") :method :outer("11_1261064023.05912")
+.sub "smartmatch" :subid("317_1266337354.28388") :method :outer("11_1266337354.28388")
.param pmc param_1224
.annotate "line", 521
new $P1223, 'ExceptionHandler'
@@ -15091,28 +15091,28 @@
.namespace ["NQP";"Regex"]
-.sub "_block1234" :subid("318_1261064023.05912") :outer("11_1261064023.05912")
+.sub "_block1234" :subid("318_1266337354.28388") :outer("11_1266337354.28388")
.annotate "line", 527
- .const 'Sub' $P1268 = "329_1261064023.05912"
+ .const 'Sub' $P1268 = "329_1266337354.28388"
capture_lex $P1268
- .const 'Sub' $P1255 = "326_1261064023.05912"
+ .const 'Sub' $P1255 = "326_1266337354.28388"
capture_lex $P1255
- .const 'Sub' $P1250 = "324_1261064023.05912"
+ .const 'Sub' $P1250 = "324_1266337354.28388"
capture_lex $P1250
- .const 'Sub' $P1245 = "322_1261064023.05912"
+ .const 'Sub' $P1245 = "322_1266337354.28388"
capture_lex $P1245
- .const 'Sub' $P1236 = "319_1261064023.05912"
+ .const 'Sub' $P1236 = "319_1266337354.28388"
capture_lex $P1236
- .const 'Sub' $P1268 = "329_1261064023.05912"
+ .const 'Sub' $P1268 = "329_1266337354.28388"
capture_lex $P1268
.return ($P1268)
.end
.namespace ["NQP";"Regex"]
-.sub "metachar:sym<:my>" :subid("319_1261064023.05912") :method :outer("318_1261064023.05912")
+.sub "metachar:sym<:my>" :subid("319_1266337354.28388") :method :outer("318_1266337354.28388")
.annotate "line", 527
- .const 'Sub' $P1242 = "321_1261064023.05912"
+ .const 'Sub' $P1242 = "321_1266337354.28388"
capture_lex $P1242
.local string rx1237_tgt
.local int rx1237_pos
@@ -15153,7 +15153,7 @@
add rx1237_pos, 1
# rx subrule "before" subtype=zerowidth negate=
rx1237_cur."!cursor_pos"(rx1237_pos)
- .const 'Sub' $P1242 = "321_1261064023.05912"
+ .const 'Sub' $P1242 = "321_1266337354.28388"
capture_lex $P1242
$P10 = rx1237_cur."before"($P1242)
unless $P10, rx1237_fail
@@ -15196,7 +15196,7 @@
.namespace ["NQP";"Regex"]
-.sub "!PREFIX__metachar:sym<:my>" :subid("320_1261064023.05912") :method
+.sub "!PREFIX__metachar:sym<:my>" :subid("320_1266337354.28388") :method
.annotate "line", 527
new $P1239, "ResizablePMCArray"
push $P1239, ":"
@@ -15205,7 +15205,7 @@
.namespace ["NQP";"Regex"]
-.sub "_block1241" :anon :subid("321_1261064023.05912") :method :outer("319_1261064023.05912")
+.sub "_block1241" :anon :subid("321_1266337354.28388") :method :outer("319_1266337354.28388")
.annotate "line", 529
.local string rx1243_tgt
.local int rx1243_pos
@@ -15261,7 +15261,7 @@
.namespace ["NQP";"Regex"]
-.sub "metachar:sym<{ }>" :subid("322_1261064023.05912") :method :outer("318_1261064023.05912")
+.sub "metachar:sym<{ }>" :subid("322_1266337354.28388") :method :outer("318_1266337354.28388")
.annotate "line", 527
.local string rx1246_tgt
.local int rx1246_pos
@@ -15326,7 +15326,7 @@
.namespace ["NQP";"Regex"]
-.sub "!PREFIX__metachar:sym<{ }>" :subid("323_1261064023.05912") :method
+.sub "!PREFIX__metachar:sym<{ }>" :subid("323_1266337354.28388") :method
.annotate "line", 527
new $P1248, "ResizablePMCArray"
push $P1248, "{"
@@ -15335,7 +15335,7 @@
.namespace ["NQP";"Regex"]
-.sub "assertion:sym<{ }>" :subid("324_1261064023.05912") :method :outer("318_1261064023.05912")
+.sub "assertion:sym<{ }>" :subid("324_1266337354.28388") :method :outer("318_1266337354.28388")
.annotate "line", 527
.local string rx1251_tgt
.local int rx1251_pos
@@ -15400,7 +15400,7 @@
.namespace ["NQP";"Regex"]
-.sub "!PREFIX__assertion:sym<{ }>" :subid("325_1261064023.05912") :method
+.sub "!PREFIX__assertion:sym<{ }>" :subid("325_1266337354.28388") :method
.annotate "line", 527
new $P1253, "ResizablePMCArray"
push $P1253, "{"
@@ -15409,9 +15409,9 @@
.namespace ["NQP";"Regex"]
-.sub "assertion:sym<name>" :subid("326_1261064023.05912") :method :outer("318_1261064023.05912")
+.sub "assertion:sym<name>" :subid("326_1266337354.28388") :method :outer("318_1266337354.28388")
.annotate "line", 527
- .const 'Sub' $P1264 = "328_1261064023.05912"
+ .const 'Sub' $P1264 = "328_1266337354.28388"
capture_lex $P1264
.local string rx1256_tgt
.local int rx1256_pos
@@ -15421,7 +15421,7 @@
.local pmc rx1256_cur
(rx1256_cur, rx1256_pos, rx1256_tgt) = self."!cursor_start"()
rx1256_cur."!cursor_debug"("START ", "assertion:sym<name>")
- rx1256_cur."!cursor_caparray"("arglist", "nibbler", "assertion")
+ rx1256_cur."!cursor_caparray"("nibbler", "arglist", "assertion")
.lex unicode:"$\x{a2}", rx1256_cur
.local pmc match
.lex "$/", match
@@ -15476,7 +15476,7 @@
.annotate "line", 543
# rx subrule "before" subtype=zerowidth negate=
rx1256_cur."!cursor_pos"(rx1256_pos)
- .const 'Sub' $P1264 = "328_1261064023.05912"
+ .const 'Sub' $P1264 = "328_1266337354.28388"
capture_lex $P1264
$P10 = rx1256_cur."before"($P1264)
unless $P10, rx1256_fail
@@ -15583,7 +15583,7 @@
.namespace ["NQP";"Regex"]
-.sub "!PREFIX__assertion:sym<name>" :subid("327_1261064023.05912") :method
+.sub "!PREFIX__assertion:sym<name>" :subid("327_1266337354.28388") :method
.annotate "line", 527
new $P1258, "ResizablePMCArray"
push $P1258, ""
@@ -15592,7 +15592,7 @@
.namespace ["NQP";"Regex"]
-.sub "_block1263" :anon :subid("328_1261064023.05912") :method :outer("326_1261064023.05912")
+.sub "_block1263" :anon :subid("328_1266337354.28388") :method :outer("326_1266337354.28388")
.annotate "line", 543
.local string rx1265_tgt
.local int rx1265_pos
@@ -15648,7 +15648,7 @@
.namespace ["NQP";"Regex"]
-.sub "codeblock" :subid("329_1261064023.05912") :method :outer("318_1261064023.05912")
+.sub "codeblock" :subid("329_1266337354.28388") :method :outer("318_1266337354.28388")
.annotate "line", 527
.local string rx1269_tgt
.local int rx1269_pos
@@ -15707,7 +15707,7 @@
.namespace ["NQP";"Regex"]
-.sub "!PREFIX__codeblock" :subid("330_1261064023.05912") :method
+.sub "!PREFIX__codeblock" :subid("330_1266337354.28388") :method
.annotate "line", 527
$P1271 = self."!PREFIX__!subrule"("block", "")
new $P1272, "ResizablePMCArray"
@@ -15718,7 +15718,7 @@
### .include 'gen/nqp-actions.pir'
.namespace []
-.sub "_block11" :anon :subid("10_1261064035.64813")
+.sub "_block11" :anon :subid("10_1266337365.65225")
.annotate "line", 0
get_hll_global $P14, ["NQP";"Actions"], "_block13"
capture_lex $P14
@@ -15732,9 +15732,9 @@
.namespace []
-.sub "" :load :init :subid("post126") :outer("10_1261064035.64813")
+.sub "" :load :init :subid("post126") :outer("10_1266337365.65225")
.annotate "line", 0
- .const 'Sub' $P12 = "10_1261064035.64813"
+ .const 'Sub' $P12 = "10_1266337365.65225"
.local pmc block
set block, $P12
$P2166 = get_root_global ["parrot"], "P6metaclass"
@@ -15743,199 +15743,199 @@
.namespace ["NQP";"Actions"]
-.sub "_block13" :subid("11_1261064035.64813") :outer("10_1261064035.64813")
+.sub "_block13" :subid("11_1266337365.65225") :outer("10_1266337365.65225")
.annotate "line", 3
- .const 'Sub' $P2161 = "125_1261064035.64813"
+ .const 'Sub' $P2161 = "125_1266337365.65225"
capture_lex $P2161
get_hll_global $P2097, ["NQP";"RegexActions"], "_block2096"
capture_lex $P2097
- .const 'Sub' $P2086 = "119_1261064035.64813"
+ .const 'Sub' $P2086 = "119_1266337365.65225"
capture_lex $P2086
- .const 'Sub' $P2074 = "118_1261064035.64813"
+ .const 'Sub' $P2074 = "118_1266337365.65225"
capture_lex $P2074
- .const 'Sub' $P2064 = "117_1261064035.64813"
+ .const 'Sub' $P2064 = "117_1266337365.65225"
capture_lex $P2064
- .const 'Sub' $P2054 = "116_1261064035.64813"
+ .const 'Sub' $P2054 = "116_1266337365.65225"
capture_lex $P2054
- .const 'Sub' $P2044 = "115_1261064035.64813"
+ .const 'Sub' $P2044 = "115_1266337365.65225"
capture_lex $P2044
- .const 'Sub' $P2030 = "114_1261064035.64813"
+ .const 'Sub' $P2030 = "114_1266337365.65225"
capture_lex $P2030
- .const 'Sub' $P2020 = "113_1261064035.64813"
+ .const 'Sub' $P2020 = "113_1266337365.65225"
capture_lex $P2020
- .const 'Sub' $P1983 = "112_1261064035.64813"
+ .const 'Sub' $P1983 = "112_1266337365.65225"
capture_lex $P1983
- .const 'Sub' $P1969 = "111_1261064035.64813"
+ .const 'Sub' $P1969 = "111_1266337365.65225"
capture_lex $P1969
- .const 'Sub' $P1959 = "110_1261064035.64813"
+ .const 'Sub' $P1959 = "110_1266337365.65225"
capture_lex $P1959
- .const 'Sub' $P1949 = "109_1261064035.64813"
+ .const 'Sub' $P1949 = "109_1266337365.65225"
capture_lex $P1949
- .const 'Sub' $P1939 = "108_1261064035.64813"
+ .const 'Sub' $P1939 = "108_1266337365.65225"
capture_lex $P1939
- .const 'Sub' $P1929 = "107_1261064035.64813"
+ .const 'Sub' $P1929 = "107_1266337365.65225"
capture_lex $P1929
- .const 'Sub' $P1919 = "106_1261064035.64813"
+ .const 'Sub' $P1919 = "106_1266337365.65225"
capture_lex $P1919
- .const 'Sub' $P1891 = "105_1261064035.64813"
+ .const 'Sub' $P1891 = "105_1266337365.65225"
capture_lex $P1891
- .const 'Sub' $P1874 = "104_1261064035.64813"
+ .const 'Sub' $P1874 = "104_1266337365.65225"
capture_lex $P1874
- .const 'Sub' $P1864 = "103_1261064035.64813"
+ .const 'Sub' $P1864 = "103_1266337365.65225"
capture_lex $P1864
- .const 'Sub' $P1852 = "102_1261064035.64813"
+ .const 'Sub' $P1852 = "102_1266337365.65225"
capture_lex $P1852
- .const 'Sub' $P1840 = "101_1261064035.64813"
+ .const 'Sub' $P1840 = "101_1266337365.65225"
capture_lex $P1840
- .const 'Sub' $P1828 = "100_1261064035.64813"
+ .const 'Sub' $P1828 = "100_1266337365.65225"
capture_lex $P1828
- .const 'Sub' $P1818 = "99_1261064035.64813"
+ .const 'Sub' $P1818 = "99_1266337365.65225"
capture_lex $P1818
- .const 'Sub' $P1789 = "98_1261064035.64813"
+ .const 'Sub' $P1789 = "98_1266337365.65225"
capture_lex $P1789
- .const 'Sub' $P1767 = "97_1261064035.64813"
+ .const 'Sub' $P1767 = "97_1266337365.65225"
capture_lex $P1767
- .const 'Sub' $P1757 = "96_1261064035.64813"
+ .const 'Sub' $P1757 = "96_1266337365.65225"
capture_lex $P1757
- .const 'Sub' $P1747 = "95_1261064035.64813"
+ .const 'Sub' $P1747 = "95_1266337365.65225"
capture_lex $P1747
- .const 'Sub' $P1720 = "94_1261064035.64813"
+ .const 'Sub' $P1720 = "94_1266337365.65225"
capture_lex $P1720
- .const 'Sub' $P1702 = "93_1261064035.64813"
+ .const 'Sub' $P1702 = "93_1266337365.65225"
capture_lex $P1702
- .const 'Sub' $P1692 = "92_1261064035.64813"
+ .const 'Sub' $P1692 = "92_1266337365.65225"
capture_lex $P1692
- .const 'Sub' $P1608 = "89_1261064035.64813"
+ .const 'Sub' $P1608 = "89_1266337365.65225"
capture_lex $P1608
- .const 'Sub' $P1598 = "88_1261064035.64813"
+ .const 'Sub' $P1598 = "88_1266337365.65225"
capture_lex $P1598
- .const 'Sub' $P1569 = "87_1261064035.64813"
+ .const 'Sub' $P1569 = "87_1266337365.65225"
capture_lex $P1569
- .const 'Sub' $P1527 = "86_1261064035.64813"
+ .const 'Sub' $P1527 = "86_1266337365.65225"
capture_lex $P1527
- .const 'Sub' $P1511 = "85_1261064035.64813"
+ .const 'Sub' $P1511 = "85_1266337365.65225"
capture_lex $P1511
- .const 'Sub' $P1502 = "84_1261064035.64813"
+ .const 'Sub' $P1502 = "84_1266337365.65225"
capture_lex $P1502
- .const 'Sub' $P1470 = "83_1261064035.64813"
+ .const 'Sub' $P1470 = "83_1266337365.65225"
capture_lex $P1470
- .const 'Sub' $P1371 = "80_1261064035.64813"
+ .const 'Sub' $P1371 = "80_1266337365.65225"
capture_lex $P1371
- .const 'Sub' $P1354 = "79_1261064035.64813"
+ .const 'Sub' $P1354 = "79_1266337365.65225"
capture_lex $P1354
- .const 'Sub' $P1334 = "78_1261064035.64813"
+ .const 'Sub' $P1334 = "78_1266337365.65225"
capture_lex $P1334
- .const 'Sub' $P1250 = "77_1261064035.64813"
+ .const 'Sub' $P1250 = "77_1266337365.65225"
capture_lex $P1250
- .const 'Sub' $P1226 = "75_1261064035.64813"
+ .const 'Sub' $P1226 = "75_1266337365.65225"
capture_lex $P1226
- .const 'Sub' $P1192 = "73_1261064035.64813"
+ .const 'Sub' $P1192 = "73_1266337365.65225"
capture_lex $P1192
- .const 'Sub' $P1142 = "71_1261064035.64813"
+ .const 'Sub' $P1142 = "71_1266337365.65225"
capture_lex $P1142
- .const 'Sub' $P1132 = "70_1261064035.64813"
+ .const 'Sub' $P1132 = "70_1266337365.65225"
capture_lex $P1132
- .const 'Sub' $P1122 = "69_1261064035.64813"
+ .const 'Sub' $P1122 = "69_1266337365.65225"
capture_lex $P1122
- .const 'Sub' $P1051 = "67_1261064035.64813"
+ .const 'Sub' $P1051 = "67_1266337365.65225"
capture_lex $P1051
- .const 'Sub' $P1034 = "66_1261064035.64813"
+ .const 'Sub' $P1034 = "66_1266337365.65225"
capture_lex $P1034
- .const 'Sub' $P1024 = "65_1261064035.64813"
+ .const 'Sub' $P1024 = "65_1266337365.65225"
capture_lex $P1024
- .const 'Sub' $P1014 = "64_1261064035.64813"
+ .const 'Sub' $P1014 = "64_1266337365.65225"
capture_lex $P1014
- .const 'Sub' $P1004 = "63_1261064035.64813"
+ .const 'Sub' $P1004 = "63_1266337365.65225"
capture_lex $P1004
- .const 'Sub' $P980 = "62_1261064035.64813"
+ .const 'Sub' $P980 = "62_1266337365.65225"
capture_lex $P980
- .const 'Sub' $P927 = "61_1261064035.64813"
+ .const 'Sub' $P927 = "61_1266337365.65225"
capture_lex $P927
- .const 'Sub' $P917 = "60_1261064035.64813"
+ .const 'Sub' $P917 = "60_1266337365.65225"
capture_lex $P917
- .const 'Sub' $P828 = "58_1261064035.64813"
+ .const 'Sub' $P828 = "58_1266337365.65225"
capture_lex $P828
- .const 'Sub' $P802 = "57_1261064035.64813"
+ .const 'Sub' $P802 = "57_1266337365.65225"
capture_lex $P802
- .const 'Sub' $P786 = "56_1261064035.64813"
+ .const 'Sub' $P786 = "56_1266337365.65225"
capture_lex $P786
- .const 'Sub' $P776 = "55_1261064035.64813"
+ .const 'Sub' $P776 = "55_1266337365.65225"
capture_lex $P776
- .const 'Sub' $P766 = "54_1261064035.64813"
+ .const 'Sub' $P766 = "54_1266337365.65225"
capture_lex $P766
- .const 'Sub' $P756 = "53_1261064035.64813"
+ .const 'Sub' $P756 = "53_1266337365.65225"
capture_lex $P756
- .const 'Sub' $P746 = "52_1261064035.64813"
+ .const 'Sub' $P746 = "52_1266337365.65225"
capture_lex $P746
- .const 'Sub' $P736 = "51_1261064035.64813"
+ .const 'Sub' $P736 = "51_1266337365.65225"
capture_lex $P736
- .const 'Sub' $P726 = "50_1261064035.64813"
+ .const 'Sub' $P726 = "50_1266337365.65225"
capture_lex $P726
- .const 'Sub' $P716 = "49_1261064035.64813"
+ .const 'Sub' $P716 = "49_1266337365.65225"
capture_lex $P716
- .const 'Sub' $P706 = "48_1261064035.64813"
+ .const 'Sub' $P706 = "48_1266337365.65225"
capture_lex $P706
- .const 'Sub' $P696 = "47_1261064035.64813"
+ .const 'Sub' $P696 = "47_1266337365.65225"
capture_lex $P696
- .const 'Sub' $P686 = "46_1261064035.64813"
+ .const 'Sub' $P686 = "46_1266337365.65225"
capture_lex $P686
- .const 'Sub' $P676 = "45_1261064035.64813"
+ .const 'Sub' $P676 = "45_1266337365.65225"
capture_lex $P676
- .const 'Sub' $P666 = "44_1261064035.64813"
+ .const 'Sub' $P666 = "44_1266337365.65225"
capture_lex $P666
- .const 'Sub' $P656 = "43_1261064035.64813"
+ .const 'Sub' $P656 = "43_1266337365.65225"
capture_lex $P656
- .const 'Sub' $P638 = "42_1261064035.64813"
+ .const 'Sub' $P638 = "42_1266337365.65225"
capture_lex $P638
- .const 'Sub' $P603 = "41_1261064035.64813"
+ .const 'Sub' $P603 = "41_1266337365.65225"
capture_lex $P603
- .const 'Sub' $P587 = "40_1261064035.64813"
+ .const 'Sub' $P587 = "40_1266337365.65225"
capture_lex $P587
- .const 'Sub' $P566 = "39_1261064035.64813"
+ .const 'Sub' $P566 = "39_1266337365.65225"
capture_lex $P566
- .const 'Sub' $P546 = "38_1261064035.64813"
+ .const 'Sub' $P546 = "38_1266337365.65225"
capture_lex $P546
- .const 'Sub' $P533 = "37_1261064035.64813"
+ .const 'Sub' $P533 = "37_1266337365.65225"
capture_lex $P533
- .const 'Sub' $P507 = "36_1261064035.64813"
+ .const 'Sub' $P507 = "36_1266337365.65225"
capture_lex $P507
- .const 'Sub' $P471 = "35_1261064035.64813"
+ .const 'Sub' $P471 = "35_1266337365.65225"
capture_lex $P471
- .const 'Sub' $P454 = "34_1261064035.64813"
+ .const 'Sub' $P454 = "34_1266337365.65225"
capture_lex $P454
- .const 'Sub' $P440 = "33_1261064035.64813"
+ .const 'Sub' $P440 = "33_1266337365.65225"
capture_lex $P440
- .const 'Sub' $P387 = "31_1261064035.64813"
+ .const 'Sub' $P387 = "31_1266337365.65225"
capture_lex $P387
- .const 'Sub' $P374 = "30_1261064035.64813"
+ .const 'Sub' $P374 = "30_1266337365.65225"
capture_lex $P374
- .const 'Sub' $P355 = "29_1261064035.64813"
+ .const 'Sub' $P355 = "29_1266337365.65225"
capture_lex $P355
- .const 'Sub' $P345 = "28_1261064035.64813"
+ .const 'Sub' $P345 = "28_1266337365.65225"
capture_lex $P345
- .const 'Sub' $P335 = "27_1261064035.64813"
+ .const 'Sub' $P335 = "27_1266337365.65225"
capture_lex $P335
- .const 'Sub' $P319 = "26_1261064035.64813"
+ .const 'Sub' $P319 = "26_1266337365.65225"
capture_lex $P319
- .const 'Sub' $P259 = "24_1261064035.64813"
+ .const 'Sub' $P259 = "24_1266337365.65225"
capture_lex $P259
- .const 'Sub' $P210 = "22_1261064035.64813"
+ .const 'Sub' $P210 = "22_1266337365.65225"
capture_lex $P210
- .const 'Sub' $P191 = "21_1261064035.64813"
+ .const 'Sub' $P191 = "21_1266337365.65225"
capture_lex $P191
- .const 'Sub' $P158 = "20_1261064035.64813"
+ .const 'Sub' $P158 = "20_1266337365.65225"
capture_lex $P158
- .const 'Sub' $P148 = "19_1261064035.64813"
+ .const 'Sub' $P148 = "19_1266337365.65225"
capture_lex $P148
- .const 'Sub' $P94 = "18_1261064035.64813"
+ .const 'Sub' $P94 = "18_1266337365.65225"
capture_lex $P94
- .const 'Sub' $P79 = "17_1261064035.64813"
+ .const 'Sub' $P79 = "17_1266337365.65225"
capture_lex $P79
- .const 'Sub' $P61 = "16_1261064035.64813"
+ .const 'Sub' $P61 = "16_1266337365.65225"
capture_lex $P61
- .const 'Sub' $P26 = "13_1261064035.64813"
+ .const 'Sub' $P26 = "13_1266337365.65225"
capture_lex $P26
- .const 'Sub' $P16 = "12_1261064035.64813"
+ .const 'Sub' $P16 = "12_1266337365.65225"
capture_lex $P16
get_global $P15, "@BLOCK"
unless_null $P15, vivify_129
@@ -15943,23 +15943,23 @@
set_global "@BLOCK", $P15
vivify_129:
.annotate "line", 9
- .const 'Sub' $P16 = "12_1261064035.64813"
+ .const 'Sub' $P16 = "12_1266337365.65225"
capture_lex $P16
.lex "xblock_immediate", $P16
.annotate "line", 14
- .const 'Sub' $P26 = "13_1261064035.64813"
+ .const 'Sub' $P26 = "13_1266337365.65225"
capture_lex $P26
.lex "block_immediate", $P26
.annotate "line", 24
- .const 'Sub' $P61 = "16_1261064035.64813"
+ .const 'Sub' $P61 = "16_1266337365.65225"
capture_lex $P61
.lex "sigiltype", $P61
.annotate "line", 40
- .const 'Sub' $P79 = "17_1261064035.64813"
+ .const 'Sub' $P79 = "17_1266337365.65225"
capture_lex $P79
.lex "colonpair_str", $P79
.annotate "line", 187
- .const 'Sub' $P94 = "18_1261064035.64813"
+ .const 'Sub' $P94 = "18_1266337365.65225"
capture_lex $P94
.lex "push_block_handler", $P94
.annotate "line", 3
@@ -15982,13 +15982,13 @@
.namespace ["NQP";"Actions"]
-.sub "" :load :init :subid("post127") :outer("11_1261064035.64813")
+.sub "" :load :init :subid("post127") :outer("11_1266337365.65225")
.annotate "line", 3
get_hll_global $P14, ["NQP";"Actions"], "_block13"
.local pmc block
set block, $P14
.annotate "line", 5
- .const 'Sub' $P2161 = "125_1261064035.64813"
+ .const 'Sub' $P2161 = "125_1266337365.65225"
capture_lex $P2161
$P2161()
$P2164 = get_root_global ["parrot"], "P6metaclass"
@@ -15997,7 +15997,7 @@
.namespace ["NQP";"Actions"]
-.sub "_block2160" :anon :subid("125_1261064035.64813") :outer("11_1261064035.64813")
+.sub "_block2160" :anon :subid("125_1266337365.65225") :outer("11_1266337365.65225")
.annotate "line", 6
get_global $P2162, "@BLOCK"
unless_null $P2162, vivify_128
@@ -16012,7 +16012,7 @@
.namespace ["NQP";"Actions"]
-.sub "xblock_immediate" :subid("12_1261064035.64813") :outer("11_1261064035.64813")
+.sub "xblock_immediate" :subid("12_1266337365.65225") :outer("11_1266337365.65225")
.param pmc param_19
.annotate "line", 9
new $P18, 'ExceptionHandler'
@@ -16048,10 +16048,10 @@
.namespace ["NQP";"Actions"]
-.sub "block_immediate" :subid("13_1261064035.64813") :outer("11_1261064035.64813")
+.sub "block_immediate" :subid("13_1266337365.65225") :outer("11_1266337365.65225")
.param pmc param_29
.annotate "line", 14
- .const 'Sub' $P39 = "14_1261064035.64813"
+ .const 'Sub' $P39 = "14_1266337365.65225"
capture_lex $P39
new $P28, 'ExceptionHandler'
set_addr $P28, control_27
@@ -16073,7 +16073,7 @@
set $P32, $P37
unless_33_end:
if $P32, unless_31_end
- .const 'Sub' $P39 = "14_1261064035.64813"
+ .const 'Sub' $P39 = "14_1266337365.65225"
capture_lex $P39
$P39()
unless_31_end:
@@ -16089,9 +16089,9 @@
.namespace ["NQP";"Actions"]
-.sub "_block38" :anon :subid("14_1261064035.64813") :outer("13_1261064035.64813")
+.sub "_block38" :anon :subid("14_1266337365.65225") :outer("13_1266337365.65225")
.annotate "line", 16
- .const 'Sub' $P50 = "15_1261064035.64813"
+ .const 'Sub' $P50 = "15_1266337365.65225"
capture_lex $P50
.annotate "line", 17
new $P40, "Undef"
@@ -16114,7 +16114,7 @@
unless $P44, loop55_done
shift $P48, $P44
loop55_redo:
- .const 'Sub' $P50 = "15_1261064035.64813"
+ .const 'Sub' $P50 = "15_1266337365.65225"
capture_lex $P50
$P50($P48)
loop55_next:
@@ -16137,7 +16137,7 @@
.namespace ["NQP";"Actions"]
-.sub "_block49" :anon :subid("15_1261064035.64813") :outer("14_1261064035.64813")
+.sub "_block49" :anon :subid("15_1266337365.65225") :outer("14_1266337365.65225")
.param pmc param_51
.annotate "line", 18
.lex "$_", param_51
@@ -16149,7 +16149,7 @@
.namespace ["NQP";"Actions"]
-.sub "sigiltype" :subid("16_1261064035.64813") :outer("11_1261064035.64813")
+.sub "sigiltype" :subid("16_1266337365.65225") :outer("11_1266337365.65225")
.param pmc param_64
.annotate "line", 24
new $P63, 'ExceptionHandler'
@@ -16195,7 +16195,7 @@
.namespace ["NQP";"Actions"]
-.sub "colonpair_str" :subid("17_1261064035.64813") :outer("11_1261064035.64813")
+.sub "colonpair_str" :subid("17_1266337365.65225") :outer("11_1266337365.65225")
.param pmc param_82
.annotate "line", 40
new $P81, 'ExceptionHandler'
@@ -16233,7 +16233,7 @@
.namespace ["NQP";"Actions"]
-.sub "push_block_handler" :subid("18_1261064035.64813") :outer("11_1261064035.64813")
+.sub "push_block_handler" :subid("18_1266337365.65225") :outer("11_1266337365.65225")
.param pmc param_97
.param pmc param_98
.annotate "line", 187
@@ -16350,7 +16350,7 @@
.namespace ["NQP";"Actions"]
-.sub "TOP" :subid("19_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "TOP" :subid("19_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_151
.annotate "line", 30
new $P150, 'ExceptionHandler'
@@ -16380,7 +16380,7 @@
.namespace ["NQP";"Actions"]
-.sub "deflongname" :subid("20_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "deflongname" :subid("20_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_161
.annotate "line", 32
new $P160, 'ExceptionHandler'
@@ -16469,7 +16469,7 @@
.namespace ["NQP";"Actions"]
-.sub "comp_unit" :subid("21_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "comp_unit" :subid("21_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_194
.annotate "line", 46
new $P193, 'ExceptionHandler'
@@ -16522,10 +16522,10 @@
.namespace ["NQP";"Actions"]
-.sub "statementlist" :subid("22_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "statementlist" :subid("22_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_213
.annotate "line", 54
- .const 'Sub' $P227 = "23_1261064035.64813"
+ .const 'Sub' $P227 = "23_1266337365.65225"
capture_lex $P227
new $P212, 'ExceptionHandler'
set_addr $P212, control_211
@@ -16570,7 +16570,7 @@
unless $P221, loop252_done
shift $P225, $P221
loop252_redo:
- .const 'Sub' $P227 = "23_1261064035.64813"
+ .const 'Sub' $P227 = "23_1266337365.65225"
capture_lex $P227
$P227($P225)
loop252_next:
@@ -16600,7 +16600,7 @@
.namespace ["NQP";"Actions"]
-.sub "_block226" :anon :subid("23_1261064035.64813") :outer("22_1261064035.64813")
+.sub "_block226" :anon :subid("23_1266337365.65225") :outer("22_1266337365.65225")
.param pmc param_229
.annotate "line", 58
new $P228, "Undef"
@@ -16660,12 +16660,12 @@
.namespace ["NQP";"Actions"]
-.sub "statement" :subid("24_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "statement" :subid("24_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_262
.param pmc param_263 :optional
.param int has_param_263 :opt_flag
.annotate "line", 69
- .const 'Sub' $P271 = "25_1261064035.64813"
+ .const 'Sub' $P271 = "25_1266337365.65225"
capture_lex $P271
new $P261, 'ExceptionHandler'
set_addr $P261, control_260
@@ -16724,7 +16724,7 @@
goto if_267_end
if_267:
.annotate "line", 71
- .const 'Sub' $P271 = "25_1261064035.64813"
+ .const 'Sub' $P271 = "25_1266337365.65225"
capture_lex $P271
$P271()
if_267_end:
@@ -16743,7 +16743,7 @@
.namespace ["NQP";"Actions"]
-.sub "_block270" :anon :subid("25_1261064035.64813") :outer("24_1261064035.64813")
+.sub "_block270" :anon :subid("25_1266337365.65225") :outer("24_1266337365.65225")
.annotate "line", 72
new $P272, "Undef"
.lex "$mc", $P272
@@ -16856,7 +16856,7 @@
.namespace ["NQP";"Actions"]
-.sub "xblock" :subid("26_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "xblock" :subid("26_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_322
.annotate "line", 87
new $P321, 'ExceptionHandler'
@@ -16900,7 +16900,7 @@
.namespace ["NQP";"Actions"]
-.sub "pblock" :subid("27_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "pblock" :subid("27_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_338
.annotate "line", 91
new $P337, 'ExceptionHandler'
@@ -16932,7 +16932,7 @@
.namespace ["NQP";"Actions"]
-.sub "block" :subid("28_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "block" :subid("28_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_348
.annotate "line", 95
new $P347, 'ExceptionHandler'
@@ -16964,7 +16964,7 @@
.namespace ["NQP";"Actions"]
-.sub "blockoid" :subid("29_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "blockoid" :subid("29_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_358
.annotate "line", 99
new $P357, 'ExceptionHandler'
@@ -17017,7 +17017,7 @@
.namespace ["NQP";"Actions"]
-.sub "newpad" :subid("30_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "newpad" :subid("30_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_377
.annotate "line", 107
new $P376, 'ExceptionHandler'
@@ -17052,10 +17052,10 @@
.namespace ["NQP";"Actions"]
-.sub "statement_control:sym<if>" :subid("31_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "statement_control:sym<if>" :subid("31_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_390
.annotate "line", 114
- .const 'Sub' $P418 = "32_1261064035.64813"
+ .const 'Sub' $P418 = "32_1266337365.65225"
capture_lex $P418
new $P389, 'ExceptionHandler'
set_addr $P389, control_388
@@ -17140,7 +17140,7 @@
isgt $I416, $N415, 0.0
unless $I416, loop433_done
loop433_redo:
- .const 'Sub' $P418 = "32_1261064035.64813"
+ .const 'Sub' $P418 = "32_1266337365.65225"
capture_lex $P418
$P418()
loop433_next:
@@ -17168,7 +17168,7 @@
.namespace ["NQP";"Actions"]
-.sub "_block417" :anon :subid("32_1261064035.64813") :outer("31_1261064035.64813")
+.sub "_block417" :anon :subid("32_1266337365.65225") :outer("31_1266337365.65225")
.annotate "line", 123
new $P419, "Undef"
.lex "$else", $P419
@@ -17207,7 +17207,7 @@
.namespace ["NQP";"Actions"]
-.sub "statement_control:sym<unless>" :subid("33_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "statement_control:sym<unless>" :subid("33_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_443
.annotate "line", 130
new $P442, 'ExceptionHandler'
@@ -17248,7 +17248,7 @@
.namespace ["NQP";"Actions"]
-.sub "statement_control:sym<while>" :subid("34_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "statement_control:sym<while>" :subid("34_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_457
.annotate "line", 136
new $P456, 'ExceptionHandler'
@@ -17298,7 +17298,7 @@
.namespace ["NQP";"Actions"]
-.sub "statement_control:sym<repeat>" :subid("35_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "statement_control:sym<repeat>" :subid("35_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_474
.annotate "line", 142
new $P473, 'ExceptionHandler'
@@ -17398,7 +17398,7 @@
.namespace ["NQP";"Actions"]
-.sub "statement_control:sym<for>" :subid("36_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "statement_control:sym<for>" :subid("36_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_510
.annotate "line", 156
new $P509, 'ExceptionHandler'
@@ -17478,7 +17478,7 @@
.namespace ["NQP";"Actions"]
-.sub "statement_control:sym<return>" :subid("37_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "statement_control:sym<return>" :subid("37_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_536
.annotate "line", 169
new $P535, 'ExceptionHandler'
@@ -17513,7 +17513,7 @@
.namespace ["NQP";"Actions"]
-.sub "statement_control:sym<CATCH>" :subid("38_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "statement_control:sym<CATCH>" :subid("38_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_549
.annotate "line", 173
new $P548, 'ExceptionHandler'
@@ -17571,7 +17571,7 @@
.namespace ["NQP";"Actions"]
-.sub "statement_control:sym<CONTROL>" :subid("39_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "statement_control:sym<CONTROL>" :subid("39_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_569
.annotate "line", 180
new $P568, 'ExceptionHandler'
@@ -17629,7 +17629,7 @@
.namespace ["NQP";"Actions"]
-.sub "statement_prefix:sym<INIT>" :subid("40_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "statement_prefix:sym<INIT>" :subid("40_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_590
.annotate "line", 224
new $P589, 'ExceptionHandler'
@@ -17675,7 +17675,7 @@
.namespace ["NQP";"Actions"]
-.sub "statement_prefix:sym<try>" :subid("41_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "statement_prefix:sym<try>" :subid("41_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_606
.annotate "line", 229
new $P605, 'ExceptionHandler'
@@ -17752,7 +17752,7 @@
.namespace ["NQP";"Actions"]
-.sub "blorst" :subid("42_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "blorst" :subid("42_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_641
.annotate "line", 252
new $P640, 'ExceptionHandler'
@@ -17811,7 +17811,7 @@
.namespace ["NQP";"Actions"]
-.sub "statement_mod_cond:sym<if>" :subid("43_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "statement_mod_cond:sym<if>" :subid("43_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_659
.annotate "line", 260
new $P658, 'ExceptionHandler'
@@ -17841,7 +17841,7 @@
.namespace ["NQP";"Actions"]
-.sub "statement_mod_cond:sym<unless>" :subid("44_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "statement_mod_cond:sym<unless>" :subid("44_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_669
.annotate "line", 261
new $P668, 'ExceptionHandler'
@@ -17871,7 +17871,7 @@
.namespace ["NQP";"Actions"]
-.sub "statement_mod_loop:sym<while>" :subid("45_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "statement_mod_loop:sym<while>" :subid("45_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_679
.annotate "line", 263
new $P678, 'ExceptionHandler'
@@ -17901,7 +17901,7 @@
.namespace ["NQP";"Actions"]
-.sub "statement_mod_loop:sym<until>" :subid("46_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "statement_mod_loop:sym<until>" :subid("46_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_689
.annotate "line", 264
new $P688, 'ExceptionHandler'
@@ -17931,7 +17931,7 @@
.namespace ["NQP";"Actions"]
-.sub "term:sym<fatarrow>" :subid("47_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "term:sym<fatarrow>" :subid("47_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_699
.annotate "line", 268
new $P698, 'ExceptionHandler'
@@ -17961,7 +17961,7 @@
.namespace ["NQP";"Actions"]
-.sub "term:sym<colonpair>" :subid("48_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "term:sym<colonpair>" :subid("48_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_709
.annotate "line", 269
new $P708, 'ExceptionHandler'
@@ -17991,7 +17991,7 @@
.namespace ["NQP";"Actions"]
-.sub "term:sym<variable>" :subid("49_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "term:sym<variable>" :subid("49_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_719
.annotate "line", 270
new $P718, 'ExceptionHandler'
@@ -18021,7 +18021,7 @@
.namespace ["NQP";"Actions"]
-.sub "term:sym<package_declarator>" :subid("50_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "term:sym<package_declarator>" :subid("50_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_729
.annotate "line", 271
new $P728, 'ExceptionHandler'
@@ -18051,7 +18051,7 @@
.namespace ["NQP";"Actions"]
-.sub "term:sym<scope_declarator>" :subid("51_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "term:sym<scope_declarator>" :subid("51_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_739
.annotate "line", 272
new $P738, 'ExceptionHandler'
@@ -18081,7 +18081,7 @@
.namespace ["NQP";"Actions"]
-.sub "term:sym<routine_declarator>" :subid("52_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "term:sym<routine_declarator>" :subid("52_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_749
.annotate "line", 273
new $P748, 'ExceptionHandler'
@@ -18111,7 +18111,7 @@
.namespace ["NQP";"Actions"]
-.sub "term:sym<regex_declarator>" :subid("53_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "term:sym<regex_declarator>" :subid("53_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_759
.annotate "line", 274
new $P758, 'ExceptionHandler'
@@ -18141,7 +18141,7 @@
.namespace ["NQP";"Actions"]
-.sub "term:sym<statement_prefix>" :subid("54_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "term:sym<statement_prefix>" :subid("54_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_769
.annotate "line", 275
new $P768, 'ExceptionHandler'
@@ -18171,7 +18171,7 @@
.namespace ["NQP";"Actions"]
-.sub "term:sym<lambda>" :subid("55_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "term:sym<lambda>" :subid("55_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_779
.annotate "line", 276
new $P778, 'ExceptionHandler'
@@ -18201,7 +18201,7 @@
.namespace ["NQP";"Actions"]
-.sub "fatarrow" :subid("56_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "fatarrow" :subid("56_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_789
.annotate "line", 278
new $P788, 'ExceptionHandler'
@@ -18250,7 +18250,7 @@
.namespace ["NQP";"Actions"]
-.sub "colonpair" :subid("57_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "colonpair" :subid("57_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_805
.annotate "line", 284
new $P804, 'ExceptionHandler'
@@ -18331,10 +18331,10 @@
.namespace ["NQP";"Actions"]
-.sub "variable" :subid("58_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "variable" :subid("58_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_831
.annotate "line", 292
- .const 'Sub' $P844 = "59_1261064035.64813"
+ .const 'Sub' $P844 = "59_1266337365.65225"
capture_lex $P844
new $P830, 'ExceptionHandler'
set_addr $P830, control_829
@@ -18358,7 +18358,7 @@
vivify_296:
if $P836, if_834
.annotate "line", 298
- .const 'Sub' $P844 = "59_1261064035.64813"
+ .const 'Sub' $P844 = "59_1266337365.65225"
capture_lex $P844
$P844()
goto if_834_end
@@ -18395,7 +18395,7 @@
.namespace ["NQP";"Actions"]
-.sub "_block843" :anon :subid("59_1261064035.64813") :outer("58_1261064035.64813")
+.sub "_block843" :anon :subid("59_1266337365.65225") :outer("58_1266337365.65225")
.annotate "line", 299
new $P845, "ResizablePMCArray"
.lex "@name", $P845
@@ -18564,7 +18564,7 @@
.namespace ["NQP";"Actions"]
-.sub "package_declarator:sym<module>" :subid("60_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "package_declarator:sym<module>" :subid("60_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_920
.annotate "line", 330
new $P919, 'ExceptionHandler'
@@ -18594,7 +18594,7 @@
.namespace ["NQP";"Actions"]
-.sub "package_declarator:sym<class>" :subid("61_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "package_declarator:sym<class>" :subid("61_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_930
.annotate "line", 331
new $P929, 'ExceptionHandler'
@@ -18751,7 +18751,7 @@
.namespace ["NQP";"Actions"]
-.sub "package_def" :subid("62_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "package_def" :subid("62_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_983
.annotate "line", 354
new $P982, 'ExceptionHandler'
@@ -18829,7 +18829,7 @@
.namespace ["NQP";"Actions"]
-.sub "scope_declarator:sym<my>" :subid("63_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "scope_declarator:sym<my>" :subid("63_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1007
.annotate "line", 361
new $P1006, 'ExceptionHandler'
@@ -18859,7 +18859,7 @@
.namespace ["NQP";"Actions"]
-.sub "scope_declarator:sym<our>" :subid("64_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "scope_declarator:sym<our>" :subid("64_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1017
.annotate "line", 362
new $P1016, 'ExceptionHandler'
@@ -18889,7 +18889,7 @@
.namespace ["NQP";"Actions"]
-.sub "scope_declarator:sym<has>" :subid("65_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "scope_declarator:sym<has>" :subid("65_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1027
.annotate "line", 363
new $P1026, 'ExceptionHandler'
@@ -18919,7 +18919,7 @@
.namespace ["NQP";"Actions"]
-.sub "scoped" :subid("66_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "scoped" :subid("66_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1037
.annotate "line", 365
new $P1036, 'ExceptionHandler'
@@ -18977,10 +18977,10 @@
.namespace ["NQP";"Actions"]
-.sub "variable_declarator" :subid("67_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "variable_declarator" :subid("67_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1054
.annotate "line", 371
- .const 'Sub' $P1094 = "68_1261064035.64813"
+ .const 'Sub' $P1094 = "68_1266337365.65225"
capture_lex $P1094
new $P1053, 'ExceptionHandler'
set_addr $P1053, control_1052
@@ -19062,7 +19062,7 @@
iseq $I1079, $S1078, "has"
if $I1079, if_1076
.annotate "line", 388
- .const 'Sub' $P1094 = "68_1261064035.64813"
+ .const 'Sub' $P1094 = "68_1266337365.65225"
capture_lex $P1094
$P1094()
goto if_1076_end
@@ -19122,7 +19122,7 @@
.namespace ["NQP";"Actions"]
-.sub "_block1093" :anon :subid("68_1261064035.64813") :outer("67_1261064035.64813")
+.sub "_block1093" :anon :subid("68_1266337365.65225") :outer("67_1266337365.65225")
.annotate "line", 389
new $P1095, "Undef"
.lex "$scope", $P1095
@@ -19183,7 +19183,7 @@
.namespace ["NQP";"Actions"]
-.sub "routine_declarator:sym<sub>" :subid("69_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "routine_declarator:sym<sub>" :subid("69_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1125
.annotate "line", 399
new $P1124, 'ExceptionHandler'
@@ -19213,7 +19213,7 @@
.namespace ["NQP";"Actions"]
-.sub "routine_declarator:sym<method>" :subid("70_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "routine_declarator:sym<method>" :subid("70_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1135
.annotate "line", 400
new $P1134, 'ExceptionHandler'
@@ -19243,10 +19243,10 @@
.namespace ["NQP";"Actions"]
-.sub "routine_def" :subid("71_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "routine_def" :subid("71_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1145
.annotate "line", 402
- .const 'Sub' $P1156 = "72_1261064035.64813"
+ .const 'Sub' $P1156 = "72_1266337365.65225"
capture_lex $P1156
new $P1144, 'ExceptionHandler'
set_addr $P1144, control_1143
@@ -19283,7 +19283,7 @@
new $P1154, "Undef"
vivify_380:
unless $P1154, if_1152_end
- .const 'Sub' $P1156 = "72_1261064035.64813"
+ .const 'Sub' $P1156 = "72_1266337365.65225"
capture_lex $P1156
$P1156()
if_1152_end:
@@ -19302,7 +19302,7 @@
.namespace ["NQP";"Actions"]
-.sub "_block1155" :anon :subid("72_1261064035.64813") :outer("71_1261064035.64813")
+.sub "_block1155" :anon :subid("72_1266337365.65225") :outer("71_1266337365.65225")
.annotate "line", 407
new $P1157, "Undef"
.lex "$name", $P1157
@@ -19398,10 +19398,10 @@
.namespace ["NQP";"Actions"]
-.sub "method_def" :subid("73_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "method_def" :subid("73_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1195
.annotate "line", 420
- .const 'Sub' $P1211 = "74_1261064035.64813"
+ .const 'Sub' $P1211 = "74_1266337365.65225"
capture_lex $P1211
new $P1194, 'ExceptionHandler'
set_addr $P1194, control_1193
@@ -19453,7 +19453,7 @@
new $P1209, "Undef"
vivify_399:
unless $P1209, if_1207_end
- .const 'Sub' $P1211 = "74_1261064035.64813"
+ .const 'Sub' $P1211 = "74_1266337365.65225"
capture_lex $P1211
$P1211()
if_1207_end:
@@ -19472,7 +19472,7 @@
.namespace ["NQP";"Actions"]
-.sub "_block1210" :anon :subid("74_1261064035.64813") :outer("73_1261064035.64813")
+.sub "_block1210" :anon :subid("74_1266337365.65225") :outer("73_1266337365.65225")
.annotate "line", 427
new $P1212, "Undef"
.lex "$name", $P1212
@@ -19503,10 +19503,10 @@
.namespace ["NQP";"Actions"]
-.sub "signature" :subid("75_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "signature" :subid("75_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1229
.annotate "line", 434
- .const 'Sub' $P1240 = "76_1261064035.64813"
+ .const 'Sub' $P1240 = "76_1266337365.65225"
capture_lex $P1240
new $P1228, 'ExceptionHandler'
set_addr $P1228, control_1227
@@ -19550,7 +19550,7 @@
unless $P1234, loop1246_done
shift $P1238, $P1234
loop1246_redo:
- .const 'Sub' $P1240 = "76_1261064035.64813"
+ .const 'Sub' $P1240 = "76_1266337365.65225"
capture_lex $P1240
$P1240($P1238)
loop1246_next:
@@ -19575,7 +19575,7 @@
.namespace ["NQP";"Actions"]
-.sub "_block1239" :anon :subid("76_1261064035.64813") :outer("75_1261064035.64813")
+.sub "_block1239" :anon :subid("76_1266337365.65225") :outer("75_1266337365.65225")
.param pmc param_1241
.annotate "line", 436
.lex "$_", param_1241
@@ -19588,7 +19588,7 @@
.namespace ["NQP";"Actions"]
-.sub "parameter" :subid("77_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "parameter" :subid("77_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1253
.annotate "line", 439
new $P1252, 'ExceptionHandler'
@@ -19820,7 +19820,7 @@
.namespace ["NQP";"Actions"]
-.sub "param_var" :subid("78_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "param_var" :subid("78_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1337
.annotate "line", 471
new $P1336, 'ExceptionHandler'
@@ -19873,7 +19873,7 @@
.namespace ["NQP";"Actions"]
-.sub "named_param" :subid("79_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "named_param" :subid("79_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1357
.annotate "line", 479
new $P1356, 'ExceptionHandler'
@@ -19926,14 +19926,14 @@
.namespace ["NQP";"Actions"]
-.sub "regex_declarator" :subid("80_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "regex_declarator" :subid("80_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1374
.param pmc param_1375 :optional
.param int has_param_1375 :opt_flag
.annotate "line", 485
- .const 'Sub' $P1445 = "82_1261064035.64813"
+ .const 'Sub' $P1445 = "82_1266337365.65225"
capture_lex $P1445
- .const 'Sub' $P1417 = "81_1261064035.64813"
+ .const 'Sub' $P1417 = "81_1266337365.65225"
capture_lex $P1417
new $P1373, 'ExceptionHandler'
set_addr $P1373, control_1372
@@ -19991,13 +19991,13 @@
iseq $I1415, $S1414, "open"
if $I1415, if_1412
.annotate "line", 531
- .const 'Sub' $P1445 = "82_1261064035.64813"
+ .const 'Sub' $P1445 = "82_1266337365.65225"
capture_lex $P1445
$P1445()
goto if_1412_end
if_1412:
.annotate "line", 518
- .const 'Sub' $P1417 = "81_1261064035.64813"
+ .const 'Sub' $P1417 = "81_1266337365.65225"
capture_lex $P1417
$P1417()
if_1412_end:
@@ -20054,7 +20054,7 @@
.namespace ["NQP";"Actions"]
-.sub "_block1444" :anon :subid("82_1261064035.64813") :outer("80_1261064035.64813")
+.sub "_block1444" :anon :subid("82_1266337365.65225") :outer("80_1266337365.65225")
.annotate "line", 532
new $P1446, "Undef"
.lex "$regex", $P1446
@@ -20105,7 +20105,7 @@
.namespace ["NQP";"Actions"]
-.sub "_block1416" :anon :subid("81_1261064035.64813") :outer("80_1261064035.64813")
+.sub "_block1416" :anon :subid("81_1266337365.65225") :outer("80_1266337365.65225")
.annotate "line", 519
new $P1418, "Hash"
.lex "%h", $P1418
@@ -20203,7 +20203,7 @@
.namespace ["NQP";"Actions"]
-.sub "dotty" :subid("83_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "dotty" :subid("83_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1473
.annotate "line", 549
new $P1472, 'ExceptionHandler'
@@ -20300,7 +20300,7 @@
.namespace ["NQP";"Actions"]
-.sub "term:sym<self>" :subid("84_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "term:sym<self>" :subid("84_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1505
.annotate "line", 558
new $P1504, 'ExceptionHandler'
@@ -20325,7 +20325,7 @@
.namespace ["NQP";"Actions"]
-.sub "term:sym<identifier>" :subid("85_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "term:sym<identifier>" :subid("85_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1514
.annotate "line", 562
new $P1513, 'ExceptionHandler'
@@ -20374,7 +20374,7 @@
.namespace ["NQP";"Actions"]
-.sub "term:sym<name>" :subid("86_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "term:sym<name>" :subid("86_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1530
.annotate "line", 568
new $P1529, 'ExceptionHandler'
@@ -20492,7 +20492,7 @@
.namespace ["NQP";"Actions"]
-.sub "term:sym<pir::op>" :subid("87_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "term:sym<pir::op>" :subid("87_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1572
.annotate "line", 582
new $P1571, 'ExceptionHandler'
@@ -20583,7 +20583,7 @@
.namespace ["NQP";"Actions"]
-.sub "args" :subid("88_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "args" :subid("88_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1601
.annotate "line", 597
new $P1600, 'ExceptionHandler'
@@ -20613,10 +20613,10 @@
.namespace ["NQP";"Actions"]
-.sub "arglist" :subid("89_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "arglist" :subid("89_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1611
.annotate "line", 599
- .const 'Sub' $P1622 = "90_1261064035.64813"
+ .const 'Sub' $P1622 = "90_1266337365.65225"
capture_lex $P1622
new $P1610, 'ExceptionHandler'
set_addr $P1610, control_1609
@@ -20648,7 +20648,7 @@
new $P1620, "Undef"
vivify_498:
unless $P1620, if_1618_end
- .const 'Sub' $P1622 = "90_1261064035.64813"
+ .const 'Sub' $P1622 = "90_1266337365.65225"
capture_lex $P1622
$P1622()
if_1618_end:
@@ -20756,9 +20756,9 @@
.namespace ["NQP";"Actions"]
-.sub "_block1621" :anon :subid("90_1261064035.64813") :outer("89_1261064035.64813")
+.sub "_block1621" :anon :subid("90_1266337365.65225") :outer("89_1266337365.65225")
.annotate "line", 601
- .const 'Sub' $P1643 = "91_1261064035.64813"
+ .const 'Sub' $P1643 = "91_1266337365.65225"
capture_lex $P1643
.annotate "line", 602
new $P1623, "Undef"
@@ -20811,7 +20811,7 @@
unless $P1637, loop1648_done
shift $P1641, $P1637
loop1648_redo:
- .const 'Sub' $P1643 = "91_1261064035.64813"
+ .const 'Sub' $P1643 = "91_1266337365.65225"
capture_lex $P1643
$P1643($P1641)
loop1648_next:
@@ -20834,7 +20834,7 @@
.namespace ["NQP";"Actions"]
-.sub "_block1642" :anon :subid("91_1261064035.64813") :outer("90_1261064035.64813")
+.sub "_block1642" :anon :subid("91_1266337365.65225") :outer("90_1266337365.65225")
.param pmc param_1644
.annotate "line", 604
.lex "$_", param_1644
@@ -20846,7 +20846,7 @@
.namespace ["NQP";"Actions"]
-.sub "term:sym<value>" :subid("92_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "term:sym<value>" :subid("92_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1695
.annotate "line", 621
new $P1694, 'ExceptionHandler'
@@ -20876,7 +20876,7 @@
.namespace ["NQP";"Actions"]
-.sub "circumfix:sym<( )>" :subid("93_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "circumfix:sym<( )>" :subid("93_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1705
.annotate "line", 623
new $P1704, 'ExceptionHandler'
@@ -20932,7 +20932,7 @@
.namespace ["NQP";"Actions"]
-.sub "circumfix:sym<[ ]>" :subid("94_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "circumfix:sym<[ ]>" :subid("94_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1723
.annotate "line", 629
new $P1722, 'ExceptionHandler'
@@ -21008,7 +21008,7 @@
.namespace ["NQP";"Actions"]
-.sub "circumfix:sym<ang>" :subid("95_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "circumfix:sym<ang>" :subid("95_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1750
.annotate "line", 644
new $P1749, 'ExceptionHandler'
@@ -21038,7 +21038,7 @@
.namespace ["NQP";"Actions"]
-.sub unicode:"circumfix:sym<\x{ab} \x{bb}>" :subid("96_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub unicode:"circumfix:sym<\x{ab} \x{bb}>" :subid("96_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1760
.annotate "line", 645
new $P1759, 'ExceptionHandler'
@@ -21068,7 +21068,7 @@
.namespace ["NQP";"Actions"]
-.sub "circumfix:sym<{ }>" :subid("97_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "circumfix:sym<{ }>" :subid("97_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1770
.annotate "line", 647
new $P1769, 'ExceptionHandler'
@@ -21134,7 +21134,7 @@
.namespace ["NQP";"Actions"]
-.sub "circumfix:sym<sigil>" :subid("98_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "circumfix:sym<sigil>" :subid("98_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1792
.annotate "line", 653
new $P1791, 'ExceptionHandler'
@@ -21213,7 +21213,7 @@
.namespace ["NQP";"Actions"]
-.sub "semilist" :subid("99_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "semilist" :subid("99_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1821
.annotate "line", 660
new $P1820, 'ExceptionHandler'
@@ -21243,7 +21243,7 @@
.namespace ["NQP";"Actions"]
-.sub "postcircumfix:sym<[ ]>" :subid("100_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "postcircumfix:sym<[ ]>" :subid("100_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1831
.annotate "line", 662
new $P1830, 'ExceptionHandler'
@@ -21277,7 +21277,7 @@
.namespace ["NQP";"Actions"]
-.sub "postcircumfix:sym<{ }>" :subid("101_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "postcircumfix:sym<{ }>" :subid("101_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1843
.annotate "line", 668
new $P1842, 'ExceptionHandler'
@@ -21311,7 +21311,7 @@
.namespace ["NQP";"Actions"]
-.sub "postcircumfix:sym<ang>" :subid("102_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "postcircumfix:sym<ang>" :subid("102_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1855
.annotate "line", 674
new $P1854, 'ExceptionHandler'
@@ -21345,7 +21345,7 @@
.namespace ["NQP";"Actions"]
-.sub "postcircumfix:sym<( )>" :subid("103_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "postcircumfix:sym<( )>" :subid("103_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1867
.annotate "line", 680
new $P1866, 'ExceptionHandler'
@@ -21377,7 +21377,7 @@
.namespace ["NQP";"Actions"]
-.sub "value" :subid("104_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "value" :subid("104_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1877
.annotate "line", 684
new $P1876, 'ExceptionHandler'
@@ -21432,7 +21432,7 @@
.namespace ["NQP";"Actions"]
-.sub "number" :subid("105_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "number" :subid("105_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1894
.annotate "line", 688
new $P1893, 'ExceptionHandler'
@@ -21510,7 +21510,7 @@
.namespace ["NQP";"Actions"]
-.sub "quote:sym<apos>" :subid("106_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "quote:sym<apos>" :subid("106_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1922
.annotate "line", 694
new $P1921, 'ExceptionHandler'
@@ -21540,7 +21540,7 @@
.namespace ["NQP";"Actions"]
-.sub "quote:sym<dblq>" :subid("107_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "quote:sym<dblq>" :subid("107_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1932
.annotate "line", 695
new $P1931, 'ExceptionHandler'
@@ -21570,7 +21570,7 @@
.namespace ["NQP";"Actions"]
-.sub "quote:sym<qq>" :subid("108_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "quote:sym<qq>" :subid("108_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1942
.annotate "line", 696
new $P1941, 'ExceptionHandler'
@@ -21600,7 +21600,7 @@
.namespace ["NQP";"Actions"]
-.sub "quote:sym<q>" :subid("109_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "quote:sym<q>" :subid("109_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1952
.annotate "line", 697
new $P1951, 'ExceptionHandler'
@@ -21630,7 +21630,7 @@
.namespace ["NQP";"Actions"]
-.sub "quote:sym<Q>" :subid("110_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "quote:sym<Q>" :subid("110_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1962
.annotate "line", 698
new $P1961, 'ExceptionHandler'
@@ -21660,7 +21660,7 @@
.namespace ["NQP";"Actions"]
-.sub "quote:sym<Q:PIR>" :subid("111_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "quote:sym<Q:PIR>" :subid("111_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1972
.annotate "line", 699
new $P1971, 'ExceptionHandler'
@@ -21696,7 +21696,7 @@
.namespace ["NQP";"Actions"]
-.sub "quote:sym</ />" :subid("112_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "quote:sym</ />" :subid("112_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_1986
.param pmc param_1987 :optional
.param int has_param_1987 :opt_flag
@@ -21805,7 +21805,7 @@
.namespace ["NQP";"Actions"]
-.sub "quote_escape:sym<$>" :subid("113_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "quote_escape:sym<$>" :subid("113_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_2023
.annotate "line", 728
new $P2022, 'ExceptionHandler'
@@ -21835,7 +21835,7 @@
.namespace ["NQP";"Actions"]
-.sub "quote_escape:sym<{ }>" :subid("114_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "quote_escape:sym<{ }>" :subid("114_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_2033
.annotate "line", 729
new $P2032, 'ExceptionHandler'
@@ -21873,7 +21873,7 @@
.namespace ["NQP";"Actions"]
-.sub "postfix:sym<.>" :subid("115_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "postfix:sym<.>" :subid("115_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_2047
.annotate "line", 737
new $P2046, 'ExceptionHandler'
@@ -21903,7 +21903,7 @@
.namespace ["NQP";"Actions"]
-.sub "postfix:sym<++>" :subid("116_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "postfix:sym<++>" :subid("116_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_2057
.annotate "line", 739
new $P2056, 'ExceptionHandler'
@@ -21933,7 +21933,7 @@
.namespace ["NQP";"Actions"]
-.sub "postfix:sym<-->" :subid("117_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "postfix:sym<-->" :subid("117_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_2067
.annotate "line", 745
new $P2066, 'ExceptionHandler'
@@ -21963,7 +21963,7 @@
.namespace ["NQP";"Actions"]
-.sub "prefix:sym<make>" :subid("118_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "prefix:sym<make>" :subid("118_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_2077
.annotate "line", 751
new $P2076, 'ExceptionHandler'
@@ -21993,7 +21993,7 @@
.namespace ["NQP";"Actions"]
-.sub "infix:sym<~~>" :subid("119_1261064035.64813") :method :outer("11_1261064035.64813")
+.sub "infix:sym<~~>" :subid("119_1266337365.65225") :method :outer("11_1266337365.65225")
.param pmc param_2089
.annotate "line", 760
new $P2088, 'ExceptionHandler'
@@ -22019,18 +22019,18 @@
.namespace ["NQP";"RegexActions"]
-.sub "_block2096" :subid("120_1261064035.64813") :outer("11_1261064035.64813")
+.sub "_block2096" :subid("120_1266337365.65225") :outer("11_1266337365.65225")
.annotate "line", 765
- .const 'Sub' $P2132 = "124_1261064035.64813"
+ .const 'Sub' $P2132 = "124_1266337365.65225"
capture_lex $P2132
- .const 'Sub' $P2122 = "123_1261064035.64813"
+ .const 'Sub' $P2122 = "123_1266337365.65225"
capture_lex $P2122
- .const 'Sub' $P2112 = "122_1261064035.64813"
+ .const 'Sub' $P2112 = "122_1266337365.65225"
capture_lex $P2112
- .const 'Sub' $P2098 = "121_1261064035.64813"
+ .const 'Sub' $P2098 = "121_1266337365.65225"
capture_lex $P2098
.annotate "line", 776
- .const 'Sub' $P2132 = "124_1261064035.64813"
+ .const 'Sub' $P2132 = "124_1266337365.65225"
capture_lex $P2132
.annotate "line", 765
.return ($P2132)
@@ -22038,7 +22038,7 @@
.namespace ["NQP";"RegexActions"]
-.sub "metachar:sym<:my>" :subid("121_1261064035.64813") :method :outer("120_1261064035.64813")
+.sub "metachar:sym<:my>" :subid("121_1266337365.65225") :method :outer("120_1266337365.65225")
.param pmc param_2101
.annotate "line", 767
new $P2100, 'ExceptionHandler'
@@ -22077,7 +22077,7 @@
.namespace ["NQP";"RegexActions"]
-.sub "metachar:sym<{ }>" :subid("122_1261064035.64813") :method :outer("120_1261064035.64813")
+.sub "metachar:sym<{ }>" :subid("122_1266337365.65225") :method :outer("120_1266337365.65225")
.param pmc param_2115
.annotate "line", 772
new $P2114, 'ExceptionHandler'
@@ -22107,7 +22107,7 @@
.namespace ["NQP";"RegexActions"]
-.sub "assertion:sym<{ }>" :subid("123_1261064035.64813") :method :outer("120_1261064035.64813")
+.sub "assertion:sym<{ }>" :subid("123_1266337365.65225") :method :outer("120_1266337365.65225")
.param pmc param_2125
.annotate "line", 774
new $P2124, 'ExceptionHandler'
@@ -22137,7 +22137,7 @@
.namespace ["NQP";"RegexActions"]
-.sub "codeblock" :subid("124_1261064035.64813") :method :outer("120_1261064035.64813")
+.sub "codeblock" :subid("124_1266337365.65225") :method :outer("120_1266337365.65225")
.param pmc param_2135
.annotate "line", 776
new $P2134, 'ExceptionHandler'
Modified: branches/boehm_gc_2/ext/nqp-rx/src/stage0/P6Regex-s0.pir
==============================================================================
--- branches/boehm_gc_2/ext/nqp-rx/src/stage0/P6Regex-s0.pir Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/ext/nqp-rx/src/stage0/P6Regex-s0.pir Mon Feb 22 12:30:02 2010 (r44294)
@@ -16,7 +16,7 @@
### .include 'gen/p6regex-grammar.pir'
.namespace []
-.sub "_block11" :anon :subid("10_1261064009.3328")
+.sub "_block11" :anon :subid("10_1266337342.27136")
.annotate "line", 0
get_hll_global $P14, ["Regex";"P6Regex";"Grammar"], "_block13"
capture_lex $P14
@@ -30,9 +30,9 @@
.namespace []
-.sub "" :load :init :subid("post158") :outer("10_1261064009.3328")
+.sub "" :load :init :subid("post158") :outer("10_1266337342.27136")
.annotate "line", 0
- .const 'Sub' $P12 = "10_1261064009.3328"
+ .const 'Sub' $P12 = "10_1266337342.27136"
.local pmc block
set block, $P12
$P580 = get_root_global ["parrot"], "P6metaclass"
@@ -41,140 +41,140 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "_block13" :subid("11_1261064009.3328") :outer("10_1261064009.3328")
+.sub "_block13" :subid("11_1266337342.27136") :outer("10_1266337342.27136")
.annotate "line", 3
- .const 'Sub' $P571 = "156_1261064009.3328"
+ .const 'Sub' $P571 = "156_1266337342.27136"
capture_lex $P571
- .const 'Sub' $P563 = "154_1261064009.3328"
+ .const 'Sub' $P563 = "154_1266337342.27136"
capture_lex $P563
- .const 'Sub' $P555 = "152_1261064009.3328"
+ .const 'Sub' $P555 = "152_1266337342.27136"
capture_lex $P555
- .const 'Sub' $P534 = "147_1261064009.3328"
+ .const 'Sub' $P534 = "147_1266337342.27136"
capture_lex $P534
- .const 'Sub' $P499 = "141_1261064009.3328"
+ .const 'Sub' $P499 = "141_1266337342.27136"
capture_lex $P499
- .const 'Sub' $P487 = "138_1261064009.3328"
+ .const 'Sub' $P487 = "138_1266337342.27136"
capture_lex $P487
- .const 'Sub' $P474 = "135_1261064009.3328"
+ .const 'Sub' $P474 = "135_1266337342.27136"
capture_lex $P474
- .const 'Sub' $P468 = "133_1261064009.3328"
+ .const 'Sub' $P468 = "133_1266337342.27136"
capture_lex $P468
- .const 'Sub' $P457 = "130_1261064009.3328"
+ .const 'Sub' $P457 = "130_1266337342.27136"
capture_lex $P457
- .const 'Sub' $P446 = "127_1261064009.3328"
+ .const 'Sub' $P446 = "127_1266337342.27136"
capture_lex $P446
- .const 'Sub' $P437 = "123_1261064009.3328"
+ .const 'Sub' $P437 = "123_1266337342.27136"
capture_lex $P437
- .const 'Sub' $P431 = "121_1261064009.3328"
+ .const 'Sub' $P431 = "121_1266337342.27136"
capture_lex $P431
- .const 'Sub' $P425 = "119_1261064009.3328"
+ .const 'Sub' $P425 = "119_1266337342.27136"
capture_lex $P425
- .const 'Sub' $P419 = "117_1261064009.3328"
+ .const 'Sub' $P419 = "117_1266337342.27136"
capture_lex $P419
- .const 'Sub' $P413 = "115_1261064009.3328"
+ .const 'Sub' $P413 = "115_1266337342.27136"
capture_lex $P413
- .const 'Sub' $P402 = "113_1261064009.3328"
- capture_lex $P402
- .const 'Sub' $P391 = "111_1261064009.3328"
- capture_lex $P391
- .const 'Sub' $P383 = "109_1261064009.3328"
+ .const 'Sub' $P405 = "113_1266337342.27136"
+ capture_lex $P405
+ .const 'Sub' $P394 = "111_1266337342.27136"
+ capture_lex $P394
+ .const 'Sub' $P383 = "109_1266337342.27136"
capture_lex $P383
- .const 'Sub' $P377 = "107_1261064009.3328"
+ .const 'Sub' $P377 = "107_1266337342.27136"
capture_lex $P377
- .const 'Sub' $P371 = "105_1261064009.3328"
+ .const 'Sub' $P371 = "105_1266337342.27136"
capture_lex $P371
- .const 'Sub' $P365 = "103_1261064009.3328"
+ .const 'Sub' $P365 = "103_1266337342.27136"
capture_lex $P365
- .const 'Sub' $P359 = "101_1261064009.3328"
+ .const 'Sub' $P359 = "101_1266337342.27136"
capture_lex $P359
- .const 'Sub' $P353 = "99_1261064009.3328"
+ .const 'Sub' $P353 = "99_1266337342.27136"
capture_lex $P353
- .const 'Sub' $P347 = "97_1261064009.3328"
+ .const 'Sub' $P347 = "97_1266337342.27136"
capture_lex $P347
- .const 'Sub' $P341 = "95_1261064009.3328"
+ .const 'Sub' $P341 = "95_1266337342.27136"
capture_lex $P341
- .const 'Sub' $P335 = "93_1261064009.3328"
+ .const 'Sub' $P335 = "93_1266337342.27136"
capture_lex $P335
- .const 'Sub' $P323 = "89_1261064009.3328"
+ .const 'Sub' $P323 = "89_1266337342.27136"
capture_lex $P323
- .const 'Sub' $P311 = "87_1261064009.3328"
+ .const 'Sub' $P311 = "87_1266337342.27136"
capture_lex $P311
- .const 'Sub' $P304 = "85_1261064009.3328"
+ .const 'Sub' $P304 = "85_1266337342.27136"
capture_lex $P304
- .const 'Sub' $P287 = "83_1261064009.3328"
+ .const 'Sub' $P287 = "83_1266337342.27136"
capture_lex $P287
- .const 'Sub' $P280 = "81_1261064009.3328"
+ .const 'Sub' $P280 = "81_1266337342.27136"
capture_lex $P280
- .const 'Sub' $P274 = "79_1261064009.3328"
+ .const 'Sub' $P274 = "79_1266337342.27136"
capture_lex $P274
- .const 'Sub' $P268 = "77_1261064009.3328"
+ .const 'Sub' $P268 = "77_1266337342.27136"
capture_lex $P268
- .const 'Sub' $P261 = "75_1261064009.3328"
+ .const 'Sub' $P261 = "75_1266337342.27136"
capture_lex $P261
- .const 'Sub' $P254 = "73_1261064009.3328"
+ .const 'Sub' $P254 = "73_1266337342.27136"
capture_lex $P254
- .const 'Sub' $P247 = "71_1261064009.3328"
+ .const 'Sub' $P247 = "71_1266337342.27136"
capture_lex $P247
- .const 'Sub' $P240 = "69_1261064009.3328"
+ .const 'Sub' $P240 = "69_1266337342.27136"
capture_lex $P240
- .const 'Sub' $P234 = "67_1261064009.3328"
+ .const 'Sub' $P234 = "67_1266337342.27136"
capture_lex $P234
- .const 'Sub' $P228 = "65_1261064009.3328"
+ .const 'Sub' $P228 = "65_1266337342.27136"
capture_lex $P228
- .const 'Sub' $P222 = "63_1261064009.3328"
+ .const 'Sub' $P222 = "63_1266337342.27136"
capture_lex $P222
- .const 'Sub' $P216 = "61_1261064009.3328"
+ .const 'Sub' $P216 = "61_1266337342.27136"
capture_lex $P216
- .const 'Sub' $P210 = "59_1261064009.3328"
+ .const 'Sub' $P210 = "59_1266337342.27136"
capture_lex $P210
- .const 'Sub' $P205 = "57_1261064009.3328"
+ .const 'Sub' $P205 = "57_1266337342.27136"
capture_lex $P205
- .const 'Sub' $P200 = "55_1261064009.3328"
+ .const 'Sub' $P200 = "55_1266337342.27136"
capture_lex $P200
- .const 'Sub' $P194 = "53_1261064009.3328"
+ .const 'Sub' $P194 = "53_1266337342.27136"
capture_lex $P194
- .const 'Sub' $P188 = "51_1261064009.3328"
+ .const 'Sub' $P188 = "51_1266337342.27136"
capture_lex $P188
- .const 'Sub' $P182 = "49_1261064009.3328"
+ .const 'Sub' $P182 = "49_1266337342.27136"
capture_lex $P182
- .const 'Sub' $P166 = "44_1261064009.3328"
+ .const 'Sub' $P166 = "44_1266337342.27136"
capture_lex $P166
- .const 'Sub' $P154 = "42_1261064009.3328"
+ .const 'Sub' $P154 = "42_1266337342.27136"
capture_lex $P154
- .const 'Sub' $P147 = "40_1261064009.3328"
+ .const 'Sub' $P147 = "40_1266337342.27136"
capture_lex $P147
- .const 'Sub' $P140 = "38_1261064009.3328"
+ .const 'Sub' $P140 = "38_1266337342.27136"
capture_lex $P140
- .const 'Sub' $P133 = "36_1261064009.3328"
+ .const 'Sub' $P133 = "36_1266337342.27136"
capture_lex $P133
- .const 'Sub' $P114 = "31_1261064009.3328"
+ .const 'Sub' $P114 = "31_1266337342.27136"
capture_lex $P114
- .const 'Sub' $P101 = "28_1261064009.3328"
+ .const 'Sub' $P101 = "28_1266337342.27136"
capture_lex $P101
- .const 'Sub' $P94 = "26_1261064009.3328"
+ .const 'Sub' $P94 = "26_1266337342.27136"
capture_lex $P94
- .const 'Sub' $P82 = "24_1261064009.3328"
+ .const 'Sub' $P82 = "24_1266337342.27136"
capture_lex $P82
- .const 'Sub' $P75 = "22_1261064009.3328"
+ .const 'Sub' $P75 = "22_1266337342.27136"
capture_lex $P75
- .const 'Sub' $P63 = "20_1261064009.3328"
+ .const 'Sub' $P63 = "20_1266337342.27136"
capture_lex $P63
- .const 'Sub' $P56 = "18_1261064009.3328"
+ .const 'Sub' $P56 = "18_1266337342.27136"
capture_lex $P56
- .const 'Sub' $P46 = "15_1261064009.3328"
+ .const 'Sub' $P46 = "15_1266337342.27136"
capture_lex $P46
- .const 'Sub' $P38 = "13_1261064009.3328"
+ .const 'Sub' $P38 = "13_1266337342.27136"
capture_lex $P38
- .const 'Sub' $P15 = "12_1261064009.3328"
+ .const 'Sub' $P15 = "12_1266337342.27136"
capture_lex $P15
- .const 'Sub' $P571 = "156_1261064009.3328"
+ .const 'Sub' $P571 = "156_1266337342.27136"
capture_lex $P571
.return ($P571)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "obs" :subid("12_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "obs" :subid("12_1266337342.27136") :method :outer("11_1266337342.27136")
.param pmc param_18
.param pmc param_19
.param pmc param_20 :optional
@@ -222,7 +222,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "ws" :subid("13_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "ws" :subid("13_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx39_tgt
.local int rx39_pos
@@ -304,7 +304,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__ws" :subid("14_1261064009.3328") :method
+.sub "!PREFIX__ws" :subid("14_1266337342.27136") :method
.annotate "line", 3
new $P41, "ResizablePMCArray"
push $P41, ""
@@ -313,9 +313,9 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "normspace" :subid("15_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "normspace" :subid("15_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
- .const 'Sub' $P52 = "17_1261064009.3328"
+ .const 'Sub' $P52 = "17_1266337342.27136"
capture_lex $P52
.local string rx47_tgt
.local int rx47_pos
@@ -349,7 +349,7 @@
.annotate "line", 10
# rx subrule "before" subtype=zerowidth negate=
rx47_cur."!cursor_pos"(rx47_pos)
- .const 'Sub' $P52 = "17_1261064009.3328"
+ .const 'Sub' $P52 = "17_1266337342.27136"
capture_lex $P52
$P10 = rx47_cur."before"($P52)
unless $P10, rx47_fail
@@ -377,7 +377,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__normspace" :subid("16_1261064009.3328") :method
+.sub "!PREFIX__normspace" :subid("16_1266337342.27136") :method
.annotate "line", 3
new $P49, "ResizablePMCArray"
push $P49, ""
@@ -386,7 +386,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "_block51" :anon :subid("17_1261064009.3328") :method :outer("15_1261064009.3328")
+.sub "_block51" :anon :subid("17_1266337342.27136") :method :outer("15_1266337342.27136")
.annotate "line", 10
.local string rx53_tgt
.local int rx53_pos
@@ -454,7 +454,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "arg" :subid("18_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "arg" :subid("18_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx57_tgt
.local int rx57_pos
@@ -565,7 +565,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__arg" :subid("19_1261064009.3328") :method
+.sub "!PREFIX__arg" :subid("19_1266337342.27136") :method
.annotate "line", 3
new $P59, "ResizablePMCArray"
push $P59, ""
@@ -576,7 +576,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "arglist" :subid("20_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "arglist" :subid("20_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx64_tgt
.local int rx64_pos
@@ -682,7 +682,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__arglist" :subid("21_1261064009.3328") :method
+.sub "!PREFIX__arglist" :subid("21_1266337342.27136") :method
.annotate "line", 3
new $P66, "ResizablePMCArray"
push $P66, ""
@@ -691,7 +691,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "TOP" :subid("22_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "TOP" :subid("22_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx76_tgt
.local int rx76_pos
@@ -764,7 +764,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__TOP" :subid("23_1261064009.3328") :method
+.sub "!PREFIX__TOP" :subid("23_1266337342.27136") :method
.annotate "line", 3
$P78 = self."!PREFIX__!subrule"("nibbler", "")
new $P79, "ResizablePMCArray"
@@ -774,7 +774,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "nibbler" :subid("24_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "nibbler" :subid("24_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx83_tgt
.local int rx83_pos
@@ -942,7 +942,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__nibbler" :subid("25_1261064009.3328") :method
+.sub "!PREFIX__nibbler" :subid("25_1266337342.27136") :method
.annotate "line", 3
new $P85, "ResizablePMCArray"
push $P85, ""
@@ -951,7 +951,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "termish" :subid("26_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "termish" :subid("26_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx95_tgt
.local int rx95_pos
@@ -1019,7 +1019,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__termish" :subid("27_1261064009.3328") :method
+.sub "!PREFIX__termish" :subid("27_1266337342.27136") :method
.annotate "line", 3
new $P97, "ResizablePMCArray"
push $P97, ""
@@ -1028,9 +1028,9 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "quantified_atom" :subid("28_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "quantified_atom" :subid("28_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
- .const 'Sub' $P110 = "30_1261064009.3328"
+ .const 'Sub' $P110 = "30_1266337342.27136"
capture_lex $P110
.local string rx102_tgt
.local int rx102_pos
@@ -1040,7 +1040,7 @@
.local pmc rx102_cur
(rx102_cur, rx102_pos, rx102_tgt) = self."!cursor_start"()
rx102_cur."!cursor_debug"("START ", "quantified_atom")
- rx102_cur."!cursor_caparray"("backmod", "quantifier")
+ rx102_cur."!cursor_caparray"("quantifier", "backmod")
.lex unicode:"$\x{a2}", rx102_cur
.local pmc match
.lex "$/", match
@@ -1093,7 +1093,7 @@
alt108_1:
# rx subrule "before" subtype=zerowidth negate=
rx102_cur."!cursor_pos"(rx102_pos)
- .const 'Sub' $P110 = "30_1261064009.3328"
+ .const 'Sub' $P110 = "30_1266337342.27136"
capture_lex $P110
$P10 = rx102_cur."before"($P110)
unless $P10, rx102_fail
@@ -1131,7 +1131,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__quantified_atom" :subid("29_1261064009.3328") :method
+.sub "!PREFIX__quantified_atom" :subid("29_1266337342.27136") :method
.annotate "line", 3
$P104 = self."!PREFIX__!subrule"("atom", "")
new $P105, "ResizablePMCArray"
@@ -1141,7 +1141,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "_block109" :anon :subid("30_1261064009.3328") :method :outer("28_1261064009.3328")
+.sub "_block109" :anon :subid("30_1266337342.27136") :method :outer("28_1266337342.27136")
.annotate "line", 41
.local string rx111_tgt
.local int rx111_pos
@@ -1197,9 +1197,9 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "atom" :subid("31_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "atom" :subid("31_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
- .const 'Sub' $P125 = "33_1261064009.3328"
+ .const 'Sub' $P125 = "33_1266337342.27136"
capture_lex $P125
.local string rx115_tgt
.local int rx115_pos
@@ -1259,7 +1259,7 @@
rxquantg122_done:
# rx subrule "before" subtype=zerowidth negate=
rx115_cur."!cursor_pos"(rx115_pos)
- .const 'Sub' $P125 = "33_1261064009.3328"
+ .const 'Sub' $P125 = "33_1266337342.27136"
capture_lex $P125
$P10 = rx115_cur."before"($P125)
unless $P10, rx115_fail
@@ -1296,7 +1296,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__atom" :subid("32_1261064009.3328") :method
+.sub "!PREFIX__atom" :subid("32_1266337342.27136") :method
.annotate "line", 3
$P117 = self."!PREFIX__!subrule"("metachar", "")
new $P118, "ResizablePMCArray"
@@ -1307,7 +1307,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "_block124" :anon :subid("33_1261064009.3328") :method :outer("31_1261064009.3328")
+.sub "_block124" :anon :subid("33_1266337342.27136") :method :outer("31_1266337342.27136")
.annotate "line", 47
.local string rx126_tgt
.local int rx126_pos
@@ -1362,7 +1362,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "quantifier" :subid("34_1261064009.3328") :method
+.sub "quantifier" :subid("34_1266337342.27136") :method
.annotate "line", 52
$P130 = self."!protoregex"("quantifier")
.return ($P130)
@@ -1370,7 +1370,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__quantifier" :subid("35_1261064009.3328") :method
+.sub "!PREFIX__quantifier" :subid("35_1266337342.27136") :method
.annotate "line", 52
$P132 = self."!PREFIX__!protoregex"("quantifier")
.return ($P132)
@@ -1378,7 +1378,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "quantifier:sym<*>" :subid("36_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "quantifier:sym<*>" :subid("36_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx134_tgt
.local int rx134_pos
@@ -1457,7 +1457,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__quantifier:sym<*>" :subid("37_1261064009.3328") :method
+.sub "!PREFIX__quantifier:sym<*>" :subid("37_1266337342.27136") :method
.annotate "line", 3
$P136 = self."!PREFIX__!subrule"("backmod", "*")
new $P137, "ResizablePMCArray"
@@ -1467,7 +1467,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "quantifier:sym<+>" :subid("38_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "quantifier:sym<+>" :subid("38_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx141_tgt
.local int rx141_pos
@@ -1546,7 +1546,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__quantifier:sym<+>" :subid("39_1261064009.3328") :method
+.sub "!PREFIX__quantifier:sym<+>" :subid("39_1266337342.27136") :method
.annotate "line", 3
$P143 = self."!PREFIX__!subrule"("backmod", "+")
new $P144, "ResizablePMCArray"
@@ -1556,7 +1556,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "quantifier:sym<?>" :subid("40_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "quantifier:sym<?>" :subid("40_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx148_tgt
.local int rx148_pos
@@ -1635,7 +1635,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__quantifier:sym<?>" :subid("41_1261064009.3328") :method
+.sub "!PREFIX__quantifier:sym<?>" :subid("41_1266337342.27136") :method
.annotate "line", 3
$P150 = self."!PREFIX__!subrule"("backmod", "?")
new $P151, "ResizablePMCArray"
@@ -1645,7 +1645,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "quantifier:sym<**>" :subid("42_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "quantifier:sym<**>" :subid("42_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx155_tgt
.local int rx155_pos
@@ -1834,7 +1834,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__quantifier:sym<**>" :subid("43_1261064009.3328") :method
+.sub "!PREFIX__quantifier:sym<**>" :subid("43_1266337342.27136") :method
.annotate "line", 3
new $P157, "ResizablePMCArray"
push $P157, "**"
@@ -1843,9 +1843,9 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backmod" :subid("44_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "backmod" :subid("44_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
- .const 'Sub' $P175 = "46_1261064009.3328"
+ .const 'Sub' $P175 = "46_1266337342.27136"
capture_lex $P175
.local string rx167_tgt
.local int rx167_pos
@@ -1915,7 +1915,7 @@
alt173_2:
# rx subrule "before" subtype=zerowidth negate=1
rx167_cur."!cursor_pos"(rx167_pos)
- .const 'Sub' $P175 = "46_1261064009.3328"
+ .const 'Sub' $P175 = "46_1266337342.27136"
capture_lex $P175
$P10 = rx167_cur."before"($P175)
if $P10, rx167_fail
@@ -1939,7 +1939,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backmod" :subid("45_1261064009.3328") :method
+.sub "!PREFIX__backmod" :subid("45_1266337342.27136") :method
.annotate "line", 3
new $P169, "ResizablePMCArray"
push $P169, ""
@@ -1948,7 +1948,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "_block174" :anon :subid("46_1261064009.3328") :method :outer("44_1261064009.3328")
+.sub "_block174" :anon :subid("46_1266337342.27136") :method :outer("44_1266337342.27136")
.annotate "line", 71
.local string rx176_tgt
.local int rx176_pos
@@ -2004,7 +2004,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar" :subid("47_1261064009.3328") :method
+.sub "metachar" :subid("47_1266337342.27136") :method
.annotate "line", 73
$P179 = self."!protoregex"("metachar")
.return ($P179)
@@ -2012,7 +2012,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar" :subid("48_1261064009.3328") :method
+.sub "!PREFIX__metachar" :subid("48_1266337342.27136") :method
.annotate "line", 73
$P181 = self."!PREFIX__!protoregex"("metachar")
.return ($P181)
@@ -2020,7 +2020,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<ws>" :subid("49_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "metachar:sym<ws>" :subid("49_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx183_tgt
.local int rx183_pos
@@ -2076,7 +2076,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<ws>" :subid("50_1261064009.3328") :method
+.sub "!PREFIX__metachar:sym<ws>" :subid("50_1266337342.27136") :method
.annotate "line", 3
$P185 = self."!PREFIX__!subrule"("", "")
new $P186, "ResizablePMCArray"
@@ -2086,7 +2086,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<[ ]>" :subid("51_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "metachar:sym<[ ]>" :subid("51_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx189_tgt
.local int rx189_pos
@@ -2158,7 +2158,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<[ ]>" :subid("52_1261064009.3328") :method
+.sub "!PREFIX__metachar:sym<[ ]>" :subid("52_1266337342.27136") :method
.annotate "line", 3
$P191 = self."!PREFIX__!subrule"("nibbler", "[")
new $P192, "ResizablePMCArray"
@@ -2168,7 +2168,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<( )>" :subid("53_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "metachar:sym<( )>" :subid("53_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx195_tgt
.local int rx195_pos
@@ -2240,7 +2240,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<( )>" :subid("54_1261064009.3328") :method
+.sub "!PREFIX__metachar:sym<( )>" :subid("54_1266337342.27136") :method
.annotate "line", 3
$P197 = self."!PREFIX__!subrule"("nibbler", "(")
new $P198, "ResizablePMCArray"
@@ -2250,7 +2250,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<'>" :subid("55_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "metachar:sym<'>" :subid("55_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx201_tgt
.local int rx201_pos
@@ -2314,7 +2314,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<'>" :subid("56_1261064009.3328") :method
+.sub "!PREFIX__metachar:sym<'>" :subid("56_1266337342.27136") :method
.annotate "line", 3
new $P203, "ResizablePMCArray"
push $P203, "'"
@@ -2323,7 +2323,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<\">" :subid("57_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "metachar:sym<\">" :subid("57_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx206_tgt
.local int rx206_pos
@@ -2387,7 +2387,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<\">" :subid("58_1261064009.3328") :method
+.sub "!PREFIX__metachar:sym<\">" :subid("58_1266337342.27136") :method
.annotate "line", 3
new $P208, "ResizablePMCArray"
push $P208, "\""
@@ -2396,7 +2396,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<.>" :subid("59_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "metachar:sym<.>" :subid("59_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx211_tgt
.local int rx211_pos
@@ -2468,7 +2468,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<.>" :subid("60_1261064009.3328") :method
+.sub "!PREFIX__metachar:sym<.>" :subid("60_1266337342.27136") :method
.annotate "line", 3
new $P213, "ResizablePMCArray"
push $P213, "."
@@ -2477,7 +2477,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<^>" :subid("61_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "metachar:sym<^>" :subid("61_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx217_tgt
.local int rx217_pos
@@ -2549,7 +2549,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<^>" :subid("62_1261064009.3328") :method
+.sub "!PREFIX__metachar:sym<^>" :subid("62_1266337342.27136") :method
.annotate "line", 3
new $P219, "ResizablePMCArray"
push $P219, "^"
@@ -2558,7 +2558,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<^^>" :subid("63_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "metachar:sym<^^>" :subid("63_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx223_tgt
.local int rx223_pos
@@ -2630,7 +2630,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<^^>" :subid("64_1261064009.3328") :method
+.sub "!PREFIX__metachar:sym<^^>" :subid("64_1266337342.27136") :method
.annotate "line", 3
new $P225, "ResizablePMCArray"
push $P225, "^^"
@@ -2639,7 +2639,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<$>" :subid("65_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "metachar:sym<$>" :subid("65_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx229_tgt
.local int rx229_pos
@@ -2711,7 +2711,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<$>" :subid("66_1261064009.3328") :method
+.sub "!PREFIX__metachar:sym<$>" :subid("66_1266337342.27136") :method
.annotate "line", 3
new $P231, "ResizablePMCArray"
push $P231, "$"
@@ -2720,7 +2720,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<$$>" :subid("67_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "metachar:sym<$$>" :subid("67_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx235_tgt
.local int rx235_pos
@@ -2792,7 +2792,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<$$>" :subid("68_1261064009.3328") :method
+.sub "!PREFIX__metachar:sym<$$>" :subid("68_1266337342.27136") :method
.annotate "line", 3
new $P237, "ResizablePMCArray"
push $P237, "$$"
@@ -2801,7 +2801,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<:::>" :subid("69_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "metachar:sym<:::>" :subid("69_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx241_tgt
.local int rx241_pos
@@ -2878,7 +2878,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<:::>" :subid("70_1261064009.3328") :method
+.sub "!PREFIX__metachar:sym<:::>" :subid("70_1266337342.27136") :method
.annotate "line", 3
$P243 = self."!PREFIX__!subrule"("", ":::")
new $P244, "ResizablePMCArray"
@@ -2888,7 +2888,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<::>" :subid("71_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "metachar:sym<::>" :subid("71_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx248_tgt
.local int rx248_pos
@@ -2965,7 +2965,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<::>" :subid("72_1261064009.3328") :method
+.sub "!PREFIX__metachar:sym<::>" :subid("72_1266337342.27136") :method
.annotate "line", 3
$P250 = self."!PREFIX__!subrule"("", "::")
new $P251, "ResizablePMCArray"
@@ -2975,7 +2975,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<lwb>" :subid("73_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "metachar:sym<lwb>" :subid("73_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx255_tgt
.local int rx255_pos
@@ -3060,7 +3060,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<lwb>" :subid("74_1261064009.3328") :method
+.sub "!PREFIX__metachar:sym<lwb>" :subid("74_1266337342.27136") :method
.annotate "line", 3
new $P257, "ResizablePMCArray"
push $P257, unicode:"\x{ab}"
@@ -3070,7 +3070,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<rwb>" :subid("75_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "metachar:sym<rwb>" :subid("75_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx262_tgt
.local int rx262_pos
@@ -3155,7 +3155,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<rwb>" :subid("76_1261064009.3328") :method
+.sub "!PREFIX__metachar:sym<rwb>" :subid("76_1266337342.27136") :method
.annotate "line", 3
new $P264, "ResizablePMCArray"
push $P264, unicode:"\x{bb}"
@@ -3165,7 +3165,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<bs>" :subid("77_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "metachar:sym<bs>" :subid("77_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx269_tgt
.local int rx269_pos
@@ -3230,7 +3230,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<bs>" :subid("78_1261064009.3328") :method
+.sub "!PREFIX__metachar:sym<bs>" :subid("78_1266337342.27136") :method
.annotate "line", 3
$P271 = self."!PREFIX__!subrule"("backslash", "\\")
new $P272, "ResizablePMCArray"
@@ -3240,7 +3240,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<mod>" :subid("79_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "metachar:sym<mod>" :subid("79_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx275_tgt
.local int rx275_pos
@@ -3298,7 +3298,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<mod>" :subid("80_1261064009.3328") :method
+.sub "!PREFIX__metachar:sym<mod>" :subid("80_1266337342.27136") :method
.annotate "line", 3
$P277 = self."!PREFIX__!subrule"("mod_internal", "")
new $P278, "ResizablePMCArray"
@@ -3308,7 +3308,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<~>" :subid("81_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "metachar:sym<~>" :subid("81_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx281_tgt
.local int rx281_pos
@@ -3407,7 +3407,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<~>" :subid("82_1261064009.3328") :method
+.sub "!PREFIX__metachar:sym<~>" :subid("82_1266337342.27136") :method
.annotate "line", 3
$P283 = self."!PREFIX__!subrule"("", "~")
new $P284, "ResizablePMCArray"
@@ -3417,7 +3417,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<{*}>" :subid("83_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "metachar:sym<{*}>" :subid("83_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx288_tgt
.local int rx288_pos
@@ -3584,7 +3584,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<{*}>" :subid("84_1261064009.3328") :method
+.sub "!PREFIX__metachar:sym<{*}>" :subid("84_1266337342.27136") :method
.annotate "line", 3
new $P290, "ResizablePMCArray"
push $P290, "{*}"
@@ -3593,7 +3593,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<assert>" :subid("85_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "metachar:sym<assert>" :subid("85_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx305_tgt
.local int rx305_pos
@@ -3678,7 +3678,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<assert>" :subid("86_1261064009.3328") :method
+.sub "!PREFIX__metachar:sym<assert>" :subid("86_1266337342.27136") :method
.annotate "line", 3
$P307 = self."!PREFIX__!subrule"("assertion", "<")
new $P308, "ResizablePMCArray"
@@ -3688,7 +3688,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<var>" :subid("87_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "metachar:sym<var>" :subid("87_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx312_tgt
.local int rx312_pos
@@ -3850,7 +3850,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<var>" :subid("88_1261064009.3328") :method
+.sub "!PREFIX__metachar:sym<var>" :subid("88_1266337342.27136") :method
.annotate "line", 3
new $P314, "ResizablePMCArray"
push $P314, "$"
@@ -3860,7 +3860,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "metachar:sym<PIR>" :subid("89_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "metachar:sym<PIR>" :subid("89_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx324_tgt
.local int rx324_pos
@@ -3951,7 +3951,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__metachar:sym<PIR>" :subid("90_1261064009.3328") :method
+.sub "!PREFIX__metachar:sym<PIR>" :subid("90_1266337342.27136") :method
.annotate "line", 3
new $P326, "ResizablePMCArray"
push $P326, ":PIR{{"
@@ -3960,7 +3960,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash" :subid("91_1261064009.3328") :method
+.sub "backslash" :subid("91_1266337342.27136") :method
.annotate "line", 120
$P332 = self."!protoregex"("backslash")
.return ($P332)
@@ -3968,7 +3968,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash" :subid("92_1261064009.3328") :method
+.sub "!PREFIX__backslash" :subid("92_1266337342.27136") :method
.annotate "line", 120
$P334 = self."!PREFIX__!protoregex"("backslash")
.return ($P334)
@@ -3976,7 +3976,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash:sym<w>" :subid("93_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "backslash:sym<w>" :subid("93_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx336_tgt
.local int rx336_pos
@@ -4048,7 +4048,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash:sym<w>" :subid("94_1261064009.3328") :method
+.sub "!PREFIX__backslash:sym<w>" :subid("94_1266337342.27136") :method
.annotate "line", 3
new $P338, "ResizablePMCArray"
push $P338, "N"
@@ -4064,7 +4064,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash:sym<b>" :subid("95_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "backslash:sym<b>" :subid("95_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx342_tgt
.local int rx342_pos
@@ -4136,7 +4136,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash:sym<b>" :subid("96_1261064009.3328") :method
+.sub "!PREFIX__backslash:sym<b>" :subid("96_1266337342.27136") :method
.annotate "line", 3
new $P344, "ResizablePMCArray"
push $P344, "B"
@@ -4146,7 +4146,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash:sym<e>" :subid("97_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "backslash:sym<e>" :subid("97_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx348_tgt
.local int rx348_pos
@@ -4218,7 +4218,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash:sym<e>" :subid("98_1261064009.3328") :method
+.sub "!PREFIX__backslash:sym<e>" :subid("98_1266337342.27136") :method
.annotate "line", 3
new $P350, "ResizablePMCArray"
push $P350, "E"
@@ -4228,7 +4228,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash:sym<f>" :subid("99_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "backslash:sym<f>" :subid("99_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx354_tgt
.local int rx354_pos
@@ -4300,7 +4300,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash:sym<f>" :subid("100_1261064009.3328") :method
+.sub "!PREFIX__backslash:sym<f>" :subid("100_1266337342.27136") :method
.annotate "line", 3
new $P356, "ResizablePMCArray"
push $P356, "F"
@@ -4310,7 +4310,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash:sym<h>" :subid("101_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "backslash:sym<h>" :subid("101_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx360_tgt
.local int rx360_pos
@@ -4382,7 +4382,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash:sym<h>" :subid("102_1261064009.3328") :method
+.sub "!PREFIX__backslash:sym<h>" :subid("102_1266337342.27136") :method
.annotate "line", 3
new $P362, "ResizablePMCArray"
push $P362, "H"
@@ -4392,7 +4392,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash:sym<r>" :subid("103_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "backslash:sym<r>" :subid("103_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx366_tgt
.local int rx366_pos
@@ -4464,7 +4464,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash:sym<r>" :subid("104_1261064009.3328") :method
+.sub "!PREFIX__backslash:sym<r>" :subid("104_1266337342.27136") :method
.annotate "line", 3
new $P368, "ResizablePMCArray"
push $P368, "R"
@@ -4474,7 +4474,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash:sym<t>" :subid("105_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "backslash:sym<t>" :subid("105_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx372_tgt
.local int rx372_pos
@@ -4546,7 +4546,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash:sym<t>" :subid("106_1261064009.3328") :method
+.sub "!PREFIX__backslash:sym<t>" :subid("106_1266337342.27136") :method
.annotate "line", 3
new $P374, "ResizablePMCArray"
push $P374, "T"
@@ -4556,7 +4556,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash:sym<v>" :subid("107_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "backslash:sym<v>" :subid("107_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx378_tgt
.local int rx378_pos
@@ -4628,7 +4628,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash:sym<v>" :subid("108_1261064009.3328") :method
+.sub "!PREFIX__backslash:sym<v>" :subid("108_1266337342.27136") :method
.annotate "line", 3
new $P380, "ResizablePMCArray"
push $P380, "V"
@@ -4638,7 +4638,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash:sym<c>" :subid("109_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "backslash:sym<o>" :subid("109_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx384_tgt
.local int rx384_pos
@@ -4647,7 +4647,7 @@
.local int rx384_rep
.local pmc rx384_cur
(rx384_cur, rx384_pos, rx384_tgt) = self."!cursor_start"()
- rx384_cur."!cursor_debug"("START ", "backslash:sym<c>")
+ rx384_cur."!cursor_debug"("START ", "backslash:sym<o>")
.lex unicode:"$\x{a2}", rx384_cur
.local pmc match
.lex "$/", match
@@ -4658,49 +4658,76 @@
substr rx384_tgt, rx384_tgt, rx384_off
rx384_start:
$I10 = self.'from'()
- ne $I10, -1, rxscan389_done
- goto rxscan389_scan
- rxscan389_loop:
+ ne $I10, -1, rxscan391_done
+ goto rxscan391_scan
+ rxscan391_loop:
($P10) = rx384_cur."from"()
inc $P10
set rx384_pos, $P10
- ge rx384_pos, rx384_eos, rxscan389_done
- rxscan389_scan:
- set_addr $I10, rxscan389_loop
+ ge rx384_pos, rx384_eos, rxscan391_done
+ rxscan391_scan:
+ set_addr $I10, rxscan391_loop
rx384_cur."!mark_push"(0, rx384_pos, $I10)
- rxscan389_done:
+ rxscan391_done:
.annotate "line", 129
# rx subcapture "sym"
- set_addr $I10, rxcap_390_fail
+ set_addr $I10, rxcap_392_fail
rx384_cur."!mark_push"(0, rx384_pos, $I10)
# rx enumcharlist negate=0
ge rx384_pos, rx384_eos, rx384_fail
sub $I10, rx384_pos, rx384_off
substr $S10, rx384_tgt, $I10, 1
- index $I11, "cC", $S10
+ index $I11, "oO", $S10
lt $I11, 0, rx384_fail
inc rx384_pos
- set_addr $I10, rxcap_390_fail
+ set_addr $I10, rxcap_392_fail
($I12, $I11) = rx384_cur."!mark_peek"($I10)
rx384_cur."!cursor_pos"($I11)
($P10) = rx384_cur."!cursor_start"()
$P10."!cursor_pass"(rx384_pos, "")
rx384_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("sym")
- goto rxcap_390_done
- rxcap_390_fail:
+ goto rxcap_392_done
+ rxcap_392_fail:
goto rx384_fail
- rxcap_390_done:
- # rx subrule "charspec" subtype=capture negate=
+ rxcap_392_done:
+ alt393_0:
+ set_addr $I10, alt393_1
+ rx384_cur."!mark_push"(0, rx384_pos, $I10)
+ # rx subrule "octint" subtype=capture negate=
rx384_cur."!cursor_pos"(rx384_pos)
- $P10 = rx384_cur."charspec"()
+ $P10 = rx384_cur."octint"()
unless $P10, rx384_fail
rx384_cur."!mark_push"(0, -1, 0, $P10)
- $P10."!cursor_names"("charspec")
+ $P10."!cursor_names"("octint")
rx384_pos = $P10."pos"()
+ goto alt393_end
+ alt393_1:
+ # rx literal "["
+ add $I11, rx384_pos, 1
+ gt $I11, rx384_eos, rx384_fail
+ sub $I11, rx384_pos, rx384_off
+ substr $S10, rx384_tgt, $I11, 1
+ ne $S10, "[", rx384_fail
+ add rx384_pos, 1
+ # rx subrule "octints" subtype=capture negate=
+ rx384_cur."!cursor_pos"(rx384_pos)
+ $P10 = rx384_cur."octints"()
+ unless $P10, rx384_fail
+ rx384_cur."!mark_push"(0, -1, 0, $P10)
+ $P10."!cursor_names"("octints")
+ rx384_pos = $P10."pos"()
+ # rx literal "]"
+ add $I11, rx384_pos, 1
+ gt $I11, rx384_eos, rx384_fail
+ sub $I11, rx384_pos, rx384_off
+ substr $S10, rx384_tgt, $I11, 1
+ ne $S10, "]", rx384_fail
+ add rx384_pos, 1
+ alt393_end:
# rx pass
- rx384_cur."!cursor_pass"(rx384_pos, "backslash:sym<c>")
- rx384_cur."!cursor_debug"("PASS ", "backslash:sym<c>", " at pos=", rx384_pos)
+ rx384_cur."!cursor_pass"(rx384_pos, "backslash:sym<o>")
+ rx384_cur."!cursor_debug"("PASS ", "backslash:sym<o>", " at pos=", rx384_pos)
.return (rx384_cur)
rx384_fail:
.annotate "line", 3
@@ -4710,270 +4737,243 @@
jump $I10
rx384_done:
rx384_cur."!cursor_fail"()
- rx384_cur."!cursor_debug"("FAIL ", "backslash:sym<c>")
+ rx384_cur."!cursor_debug"("FAIL ", "backslash:sym<o>")
.return (rx384_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash:sym<c>" :subid("110_1261064009.3328") :method
+.sub "!PREFIX__backslash:sym<o>" :subid("110_1266337342.27136") :method
.annotate "line", 3
- $P386 = self."!PREFIX__!subrule"("charspec", "C")
- $P387 = self."!PREFIX__!subrule"("charspec", "c")
- new $P388, "ResizablePMCArray"
- push $P388, $P386
- push $P388, $P387
- .return ($P388)
+ $P386 = self."!PREFIX__!subrule"("octints", "O[")
+ $P387 = self."!PREFIX__!subrule"("octint", "O")
+ $P388 = self."!PREFIX__!subrule"("octints", "o[")
+ $P389 = self."!PREFIX__!subrule"("octint", "o")
+ new $P390, "ResizablePMCArray"
+ push $P390, $P386
+ push $P390, $P387
+ push $P390, $P388
+ push $P390, $P389
+ .return ($P390)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash:sym<o>" :subid("111_1261064009.3328") :method :outer("11_1261064009.3328")
-.annotate "line", 3
- .local string rx392_tgt
- .local int rx392_pos
- .local int rx392_off
- .local int rx392_eos
- .local int rx392_rep
- .local pmc rx392_cur
- (rx392_cur, rx392_pos, rx392_tgt) = self."!cursor_start"()
- rx392_cur."!cursor_debug"("START ", "backslash:sym<o>")
- .lex unicode:"$\x{a2}", rx392_cur
- .local pmc match
- .lex "$/", match
- length rx392_eos, rx392_tgt
- set rx392_off, 0
- lt rx392_pos, 2, rx392_start
- sub rx392_off, rx392_pos, 1
- substr rx392_tgt, rx392_tgt, rx392_off
- rx392_start:
- $I10 = self.'from'()
- ne $I10, -1, rxscan399_done
- goto rxscan399_scan
- rxscan399_loop:
- ($P10) = rx392_cur."from"()
- inc $P10
- set rx392_pos, $P10
- ge rx392_pos, rx392_eos, rxscan399_done
- rxscan399_scan:
- set_addr $I10, rxscan399_loop
- rx392_cur."!mark_push"(0, rx392_pos, $I10)
- rxscan399_done:
+.sub "backslash:sym<x>" :subid("111_1266337342.27136") :method :outer("11_1266337342.27136")
+.annotate "line", 3
+ .local string rx395_tgt
+ .local int rx395_pos
+ .local int rx395_off
+ .local int rx395_eos
+ .local int rx395_rep
+ .local pmc rx395_cur
+ (rx395_cur, rx395_pos, rx395_tgt) = self."!cursor_start"()
+ rx395_cur."!cursor_debug"("START ", "backslash:sym<x>")
+ .lex unicode:"$\x{a2}", rx395_cur
+ .local pmc match
+ .lex "$/", match
+ length rx395_eos, rx395_tgt
+ set rx395_off, 0
+ lt rx395_pos, 2, rx395_start
+ sub rx395_off, rx395_pos, 1
+ substr rx395_tgt, rx395_tgt, rx395_off
+ rx395_start:
+ $I10 = self.'from'()
+ ne $I10, -1, rxscan402_done
+ goto rxscan402_scan
+ rxscan402_loop:
+ ($P10) = rx395_cur."from"()
+ inc $P10
+ set rx395_pos, $P10
+ ge rx395_pos, rx395_eos, rxscan402_done
+ rxscan402_scan:
+ set_addr $I10, rxscan402_loop
+ rx395_cur."!mark_push"(0, rx395_pos, $I10)
+ rxscan402_done:
.annotate "line", 130
# rx subcapture "sym"
- set_addr $I10, rxcap_400_fail
- rx392_cur."!mark_push"(0, rx392_pos, $I10)
+ set_addr $I10, rxcap_403_fail
+ rx395_cur."!mark_push"(0, rx395_pos, $I10)
# rx enumcharlist negate=0
- ge rx392_pos, rx392_eos, rx392_fail
- sub $I10, rx392_pos, rx392_off
- substr $S10, rx392_tgt, $I10, 1
- index $I11, "oO", $S10
- lt $I11, 0, rx392_fail
- inc rx392_pos
- set_addr $I10, rxcap_400_fail
- ($I12, $I11) = rx392_cur."!mark_peek"($I10)
- rx392_cur."!cursor_pos"($I11)
- ($P10) = rx392_cur."!cursor_start"()
- $P10."!cursor_pass"(rx392_pos, "")
- rx392_cur."!mark_push"(0, -1, 0, $P10)
+ ge rx395_pos, rx395_eos, rx395_fail
+ sub $I10, rx395_pos, rx395_off
+ substr $S10, rx395_tgt, $I10, 1
+ index $I11, "xX", $S10
+ lt $I11, 0, rx395_fail
+ inc rx395_pos
+ set_addr $I10, rxcap_403_fail
+ ($I12, $I11) = rx395_cur."!mark_peek"($I10)
+ rx395_cur."!cursor_pos"($I11)
+ ($P10) = rx395_cur."!cursor_start"()
+ $P10."!cursor_pass"(rx395_pos, "")
+ rx395_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("sym")
- goto rxcap_400_done
- rxcap_400_fail:
- goto rx392_fail
- rxcap_400_done:
- alt401_0:
- set_addr $I10, alt401_1
- rx392_cur."!mark_push"(0, rx392_pos, $I10)
- # rx subrule "octint" subtype=capture negate=
- rx392_cur."!cursor_pos"(rx392_pos)
- $P10 = rx392_cur."octint"()
- unless $P10, rx392_fail
- rx392_cur."!mark_push"(0, -1, 0, $P10)
- $P10."!cursor_names"("octint")
- rx392_pos = $P10."pos"()
- goto alt401_end
- alt401_1:
+ goto rxcap_403_done
+ rxcap_403_fail:
+ goto rx395_fail
+ rxcap_403_done:
+ alt404_0:
+ set_addr $I10, alt404_1
+ rx395_cur."!mark_push"(0, rx395_pos, $I10)
+ # rx subrule "hexint" subtype=capture negate=
+ rx395_cur."!cursor_pos"(rx395_pos)
+ $P10 = rx395_cur."hexint"()
+ unless $P10, rx395_fail
+ rx395_cur."!mark_push"(0, -1, 0, $P10)
+ $P10."!cursor_names"("hexint")
+ rx395_pos = $P10."pos"()
+ goto alt404_end
+ alt404_1:
# rx literal "["
- add $I11, rx392_pos, 1
- gt $I11, rx392_eos, rx392_fail
- sub $I11, rx392_pos, rx392_off
- substr $S10, rx392_tgt, $I11, 1
- ne $S10, "[", rx392_fail
- add rx392_pos, 1
- # rx subrule "octints" subtype=capture negate=
- rx392_cur."!cursor_pos"(rx392_pos)
- $P10 = rx392_cur."octints"()
- unless $P10, rx392_fail
- rx392_cur."!mark_push"(0, -1, 0, $P10)
- $P10."!cursor_names"("octints")
- rx392_pos = $P10."pos"()
+ add $I11, rx395_pos, 1
+ gt $I11, rx395_eos, rx395_fail
+ sub $I11, rx395_pos, rx395_off
+ substr $S10, rx395_tgt, $I11, 1
+ ne $S10, "[", rx395_fail
+ add rx395_pos, 1
+ # rx subrule "hexints" subtype=capture negate=
+ rx395_cur."!cursor_pos"(rx395_pos)
+ $P10 = rx395_cur."hexints"()
+ unless $P10, rx395_fail
+ rx395_cur."!mark_push"(0, -1, 0, $P10)
+ $P10."!cursor_names"("hexints")
+ rx395_pos = $P10."pos"()
# rx literal "]"
- add $I11, rx392_pos, 1
- gt $I11, rx392_eos, rx392_fail
- sub $I11, rx392_pos, rx392_off
- substr $S10, rx392_tgt, $I11, 1
- ne $S10, "]", rx392_fail
- add rx392_pos, 1
- alt401_end:
- # rx pass
- rx392_cur."!cursor_pass"(rx392_pos, "backslash:sym<o>")
- rx392_cur."!cursor_debug"("PASS ", "backslash:sym<o>", " at pos=", rx392_pos)
- .return (rx392_cur)
- rx392_fail:
-.annotate "line", 3
- (rx392_rep, rx392_pos, $I10, $P10) = rx392_cur."!mark_fail"(0)
- lt rx392_pos, -1, rx392_done
- eq rx392_pos, -1, rx392_fail
- jump $I10
- rx392_done:
- rx392_cur."!cursor_fail"()
- rx392_cur."!cursor_debug"("FAIL ", "backslash:sym<o>")
- .return (rx392_cur)
+ add $I11, rx395_pos, 1
+ gt $I11, rx395_eos, rx395_fail
+ sub $I11, rx395_pos, rx395_off
+ substr $S10, rx395_tgt, $I11, 1
+ ne $S10, "]", rx395_fail
+ add rx395_pos, 1
+ alt404_end:
+ # rx pass
+ rx395_cur."!cursor_pass"(rx395_pos, "backslash:sym<x>")
+ rx395_cur."!cursor_debug"("PASS ", "backslash:sym<x>", " at pos=", rx395_pos)
+ .return (rx395_cur)
+ rx395_fail:
+.annotate "line", 3
+ (rx395_rep, rx395_pos, $I10, $P10) = rx395_cur."!mark_fail"(0)
+ lt rx395_pos, -1, rx395_done
+ eq rx395_pos, -1, rx395_fail
+ jump $I10
+ rx395_done:
+ rx395_cur."!cursor_fail"()
+ rx395_cur."!cursor_debug"("FAIL ", "backslash:sym<x>")
+ .return (rx395_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash:sym<o>" :subid("112_1261064009.3328") :method
-.annotate "line", 3
- $P394 = self."!PREFIX__!subrule"("octints", "O[")
- $P395 = self."!PREFIX__!subrule"("octint", "O")
- $P396 = self."!PREFIX__!subrule"("octints", "o[")
- $P397 = self."!PREFIX__!subrule"("octint", "o")
- new $P398, "ResizablePMCArray"
- push $P398, $P394
- push $P398, $P395
- push $P398, $P396
- push $P398, $P397
- .return ($P398)
-.end
-
-
-.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash:sym<x>" :subid("113_1261064009.3328") :method :outer("11_1261064009.3328")
-.annotate "line", 3
- .local string rx403_tgt
- .local int rx403_pos
- .local int rx403_off
- .local int rx403_eos
- .local int rx403_rep
- .local pmc rx403_cur
- (rx403_cur, rx403_pos, rx403_tgt) = self."!cursor_start"()
- rx403_cur."!cursor_debug"("START ", "backslash:sym<x>")
- .lex unicode:"$\x{a2}", rx403_cur
- .local pmc match
- .lex "$/", match
- length rx403_eos, rx403_tgt
- set rx403_off, 0
- lt rx403_pos, 2, rx403_start
- sub rx403_off, rx403_pos, 1
- substr rx403_tgt, rx403_tgt, rx403_off
- rx403_start:
- $I10 = self.'from'()
- ne $I10, -1, rxscan410_done
- goto rxscan410_scan
- rxscan410_loop:
- ($P10) = rx403_cur."from"()
- inc $P10
- set rx403_pos, $P10
- ge rx403_pos, rx403_eos, rxscan410_done
- rxscan410_scan:
- set_addr $I10, rxscan410_loop
- rx403_cur."!mark_push"(0, rx403_pos, $I10)
- rxscan410_done:
+.sub "!PREFIX__backslash:sym<x>" :subid("112_1266337342.27136") :method
+.annotate "line", 3
+ $P397 = self."!PREFIX__!subrule"("hexints", "X[")
+ $P398 = self."!PREFIX__!subrule"("hexint", "X")
+ $P399 = self."!PREFIX__!subrule"("hexints", "x[")
+ $P400 = self."!PREFIX__!subrule"("hexint", "x")
+ new $P401, "ResizablePMCArray"
+ push $P401, $P397
+ push $P401, $P398
+ push $P401, $P399
+ push $P401, $P400
+ .return ($P401)
+.end
+
+
+.namespace ["Regex";"P6Regex";"Grammar"]
+.sub "backslash:sym<c>" :subid("113_1266337342.27136") :method :outer("11_1266337342.27136")
+.annotate "line", 3
+ .local string rx406_tgt
+ .local int rx406_pos
+ .local int rx406_off
+ .local int rx406_eos
+ .local int rx406_rep
+ .local pmc rx406_cur
+ (rx406_cur, rx406_pos, rx406_tgt) = self."!cursor_start"()
+ rx406_cur."!cursor_debug"("START ", "backslash:sym<c>")
+ .lex unicode:"$\x{a2}", rx406_cur
+ .local pmc match
+ .lex "$/", match
+ length rx406_eos, rx406_tgt
+ set rx406_off, 0
+ lt rx406_pos, 2, rx406_start
+ sub rx406_off, rx406_pos, 1
+ substr rx406_tgt, rx406_tgt, rx406_off
+ rx406_start:
+ $I10 = self.'from'()
+ ne $I10, -1, rxscan411_done
+ goto rxscan411_scan
+ rxscan411_loop:
+ ($P10) = rx406_cur."from"()
+ inc $P10
+ set rx406_pos, $P10
+ ge rx406_pos, rx406_eos, rxscan411_done
+ rxscan411_scan:
+ set_addr $I10, rxscan411_loop
+ rx406_cur."!mark_push"(0, rx406_pos, $I10)
+ rxscan411_done:
.annotate "line", 131
# rx subcapture "sym"
- set_addr $I10, rxcap_411_fail
- rx403_cur."!mark_push"(0, rx403_pos, $I10)
+ set_addr $I10, rxcap_412_fail
+ rx406_cur."!mark_push"(0, rx406_pos, $I10)
# rx enumcharlist negate=0
- ge rx403_pos, rx403_eos, rx403_fail
- sub $I10, rx403_pos, rx403_off
- substr $S10, rx403_tgt, $I10, 1
- index $I11, "xX", $S10
- lt $I11, 0, rx403_fail
- inc rx403_pos
- set_addr $I10, rxcap_411_fail
- ($I12, $I11) = rx403_cur."!mark_peek"($I10)
- rx403_cur."!cursor_pos"($I11)
- ($P10) = rx403_cur."!cursor_start"()
- $P10."!cursor_pass"(rx403_pos, "")
- rx403_cur."!mark_push"(0, -1, 0, $P10)
+ ge rx406_pos, rx406_eos, rx406_fail
+ sub $I10, rx406_pos, rx406_off
+ substr $S10, rx406_tgt, $I10, 1
+ index $I11, "cC", $S10
+ lt $I11, 0, rx406_fail
+ inc rx406_pos
+ set_addr $I10, rxcap_412_fail
+ ($I12, $I11) = rx406_cur."!mark_peek"($I10)
+ rx406_cur."!cursor_pos"($I11)
+ ($P10) = rx406_cur."!cursor_start"()
+ $P10."!cursor_pass"(rx406_pos, "")
+ rx406_cur."!mark_push"(0, -1, 0, $P10)
$P10."!cursor_names"("sym")
- goto rxcap_411_done
- rxcap_411_fail:
- goto rx403_fail
- rxcap_411_done:
- alt412_0:
- set_addr $I10, alt412_1
- rx403_cur."!mark_push"(0, rx403_pos, $I10)
- # rx subrule "hexint" subtype=capture negate=
- rx403_cur."!cursor_pos"(rx403_pos)
- $P10 = rx403_cur."hexint"()
- unless $P10, rx403_fail
- rx403_cur."!mark_push"(0, -1, 0, $P10)
- $P10."!cursor_names"("hexint")
- rx403_pos = $P10."pos"()
- goto alt412_end
- alt412_1:
- # rx literal "["
- add $I11, rx403_pos, 1
- gt $I11, rx403_eos, rx403_fail
- sub $I11, rx403_pos, rx403_off
- substr $S10, rx403_tgt, $I11, 1
- ne $S10, "[", rx403_fail
- add rx403_pos, 1
- # rx subrule "hexints" subtype=capture negate=
- rx403_cur."!cursor_pos"(rx403_pos)
- $P10 = rx403_cur."hexints"()
- unless $P10, rx403_fail
- rx403_cur."!mark_push"(0, -1, 0, $P10)
- $P10."!cursor_names"("hexints")
- rx403_pos = $P10."pos"()
- # rx literal "]"
- add $I11, rx403_pos, 1
- gt $I11, rx403_eos, rx403_fail
- sub $I11, rx403_pos, rx403_off
- substr $S10, rx403_tgt, $I11, 1
- ne $S10, "]", rx403_fail
- add rx403_pos, 1
- alt412_end:
+ goto rxcap_412_done
+ rxcap_412_fail:
+ goto rx406_fail
+ rxcap_412_done:
+ # rx subrule "charspec" subtype=capture negate=
+ rx406_cur."!cursor_pos"(rx406_pos)
+ $P10 = rx406_cur."charspec"()
+ unless $P10, rx406_fail
+ rx406_cur."!mark_push"(0, -1, 0, $P10)
+ $P10."!cursor_names"("charspec")
+ rx406_pos = $P10."pos"()
# rx pass
- rx403_cur."!cursor_pass"(rx403_pos, "backslash:sym<x>")
- rx403_cur."!cursor_debug"("PASS ", "backslash:sym<x>", " at pos=", rx403_pos)
- .return (rx403_cur)
- rx403_fail:
+ rx406_cur."!cursor_pass"(rx406_pos, "backslash:sym<c>")
+ rx406_cur."!cursor_debug"("PASS ", "backslash:sym<c>", " at pos=", rx406_pos)
+ .return (rx406_cur)
+ rx406_fail:
.annotate "line", 3
- (rx403_rep, rx403_pos, $I10, $P10) = rx403_cur."!mark_fail"(0)
- lt rx403_pos, -1, rx403_done
- eq rx403_pos, -1, rx403_fail
+ (rx406_rep, rx406_pos, $I10, $P10) = rx406_cur."!mark_fail"(0)
+ lt rx406_pos, -1, rx406_done
+ eq rx406_pos, -1, rx406_fail
jump $I10
- rx403_done:
- rx403_cur."!cursor_fail"()
- rx403_cur."!cursor_debug"("FAIL ", "backslash:sym<x>")
- .return (rx403_cur)
+ rx406_done:
+ rx406_cur."!cursor_fail"()
+ rx406_cur."!cursor_debug"("FAIL ", "backslash:sym<c>")
+ .return (rx406_cur)
.return ()
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash:sym<x>" :subid("114_1261064009.3328") :method
+.sub "!PREFIX__backslash:sym<c>" :subid("114_1266337342.27136") :method
.annotate "line", 3
- $P405 = self."!PREFIX__!subrule"("hexints", "X[")
- $P406 = self."!PREFIX__!subrule"("hexint", "X")
- $P407 = self."!PREFIX__!subrule"("hexints", "x[")
- $P408 = self."!PREFIX__!subrule"("hexint", "x")
- new $P409, "ResizablePMCArray"
- push $P409, $P405
- push $P409, $P406
- push $P409, $P407
- push $P409, $P408
- .return ($P409)
+ $P408 = self."!PREFIX__!subrule"("charspec", "C")
+ $P409 = self."!PREFIX__!subrule"("charspec", "c")
+ new $P410, "ResizablePMCArray"
+ push $P410, $P408
+ push $P410, $P409
+ .return ($P410)
.end
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash:sym<A>" :subid("115_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "backslash:sym<A>" :subid("115_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx414_tgt
.local int rx414_pos
@@ -5036,7 +5036,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash:sym<A>" :subid("116_1261064009.3328") :method
+.sub "!PREFIX__backslash:sym<A>" :subid("116_1266337342.27136") :method
.annotate "line", 3
$P416 = self."!PREFIX__!subrule"("", "A")
new $P417, "ResizablePMCArray"
@@ -5046,7 +5046,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash:sym<z>" :subid("117_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "backslash:sym<z>" :subid("117_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx420_tgt
.local int rx420_pos
@@ -5109,7 +5109,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash:sym<z>" :subid("118_1261064009.3328") :method
+.sub "!PREFIX__backslash:sym<z>" :subid("118_1266337342.27136") :method
.annotate "line", 3
$P422 = self."!PREFIX__!subrule"("", "z")
new $P423, "ResizablePMCArray"
@@ -5119,7 +5119,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash:sym<Z>" :subid("119_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "backslash:sym<Z>" :subid("119_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx426_tgt
.local int rx426_pos
@@ -5182,7 +5182,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash:sym<Z>" :subid("120_1261064009.3328") :method
+.sub "!PREFIX__backslash:sym<Z>" :subid("120_1266337342.27136") :method
.annotate "line", 3
$P428 = self."!PREFIX__!subrule"("", "Z")
new $P429, "ResizablePMCArray"
@@ -5192,7 +5192,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash:sym<Q>" :subid("121_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "backslash:sym<Q>" :subid("121_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx432_tgt
.local int rx432_pos
@@ -5255,7 +5255,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash:sym<Q>" :subid("122_1261064009.3328") :method
+.sub "!PREFIX__backslash:sym<Q>" :subid("122_1266337342.27136") :method
.annotate "line", 3
$P434 = self."!PREFIX__!subrule"("", "Q")
new $P435, "ResizablePMCArray"
@@ -5265,7 +5265,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "backslash:sym<misc>" :subid("123_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "backslash:sym<misc>" :subid("123_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx438_tgt
.local int rx438_pos
@@ -5322,7 +5322,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__backslash:sym<misc>" :subid("124_1261064009.3328") :method
+.sub "!PREFIX__backslash:sym<misc>" :subid("124_1266337342.27136") :method
.annotate "line", 3
new $P440, "ResizablePMCArray"
push $P440, ""
@@ -5331,7 +5331,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "assertion" :subid("125_1261064009.3328") :method
+.sub "assertion" :subid("125_1266337342.27136") :method
.annotate "line", 138
$P443 = self."!protoregex"("assertion")
.return ($P443)
@@ -5339,7 +5339,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__assertion" :subid("126_1261064009.3328") :method
+.sub "!PREFIX__assertion" :subid("126_1266337342.27136") :method
.annotate "line", 138
$P445 = self."!PREFIX__!protoregex"("assertion")
.return ($P445)
@@ -5347,9 +5347,9 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "assertion:sym<?>" :subid("127_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "assertion:sym<?>" :subid("127_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
- .const 'Sub' $P454 = "129_1261064009.3328"
+ .const 'Sub' $P454 = "129_1266337342.27136"
capture_lex $P454
.local string rx447_tgt
.local int rx447_pos
@@ -5393,7 +5393,7 @@
rx447_cur."!mark_push"(0, rx447_pos, $I10)
# rx subrule "before" subtype=zerowidth negate=
rx447_cur."!cursor_pos"(rx447_pos)
- .const 'Sub' $P454 = "129_1261064009.3328"
+ .const 'Sub' $P454 = "129_1266337342.27136"
capture_lex $P454
$P10 = rx447_cur."before"($P454)
unless $P10, rx447_fail
@@ -5426,7 +5426,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__assertion:sym<?>" :subid("128_1261064009.3328") :method
+.sub "!PREFIX__assertion:sym<?>" :subid("128_1266337342.27136") :method
.annotate "line", 3
$P449 = self."!PREFIX__!subrule"("assertion", "?")
new $P450, "ResizablePMCArray"
@@ -5437,7 +5437,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "_block453" :anon :subid("129_1261064009.3328") :method :outer("127_1261064009.3328")
+.sub "_block453" :anon :subid("129_1266337342.27136") :method :outer("127_1266337342.27136")
.annotate "line", 140
.local string rx455_tgt
.local int rx455_pos
@@ -5493,9 +5493,9 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "assertion:sym<!>" :subid("130_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "assertion:sym<!>" :subid("130_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
- .const 'Sub' $P465 = "132_1261064009.3328"
+ .const 'Sub' $P465 = "132_1266337342.27136"
capture_lex $P465
.local string rx458_tgt
.local int rx458_pos
@@ -5539,7 +5539,7 @@
rx458_cur."!mark_push"(0, rx458_pos, $I10)
# rx subrule "before" subtype=zerowidth negate=
rx458_cur."!cursor_pos"(rx458_pos)
- .const 'Sub' $P465 = "132_1261064009.3328"
+ .const 'Sub' $P465 = "132_1266337342.27136"
capture_lex $P465
$P10 = rx458_cur."before"($P465)
unless $P10, rx458_fail
@@ -5572,7 +5572,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__assertion:sym<!>" :subid("131_1261064009.3328") :method
+.sub "!PREFIX__assertion:sym<!>" :subid("131_1266337342.27136") :method
.annotate "line", 3
$P460 = self."!PREFIX__!subrule"("assertion", "!")
new $P461, "ResizablePMCArray"
@@ -5583,7 +5583,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "_block464" :anon :subid("132_1261064009.3328") :method :outer("130_1261064009.3328")
+.sub "_block464" :anon :subid("132_1266337342.27136") :method :outer("130_1266337342.27136")
.annotate "line", 141
.local string rx466_tgt
.local int rx466_pos
@@ -5639,7 +5639,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "assertion:sym<method>" :subid("133_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "assertion:sym<method>" :subid("133_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx469_tgt
.local int rx469_pos
@@ -5705,7 +5705,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__assertion:sym<method>" :subid("134_1261064009.3328") :method
+.sub "!PREFIX__assertion:sym<method>" :subid("134_1266337342.27136") :method
.annotate "line", 3
$P471 = self."!PREFIX__!subrule"("assertion", ".")
new $P472, "ResizablePMCArray"
@@ -5715,9 +5715,9 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "assertion:sym<name>" :subid("135_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "assertion:sym<name>" :subid("135_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
- .const 'Sub' $P483 = "137_1261064009.3328"
+ .const 'Sub' $P483 = "137_1266337342.27136"
capture_lex $P483
.local string rx475_tgt
.local int rx475_pos
@@ -5727,7 +5727,7 @@
.local pmc rx475_cur
(rx475_cur, rx475_pos, rx475_tgt) = self."!cursor_start"()
rx475_cur."!cursor_debug"("START ", "assertion:sym<name>")
- rx475_cur."!cursor_caparray"("arglist", "nibbler", "assertion")
+ rx475_cur."!cursor_caparray"("assertion", "nibbler", "arglist")
.lex unicode:"$\x{a2}", rx475_cur
.local pmc match
.lex "$/", match
@@ -5782,7 +5782,7 @@
.annotate "line", 150
# rx subrule "before" subtype=zerowidth negate=
rx475_cur."!cursor_pos"(rx475_pos)
- .const 'Sub' $P483 = "137_1261064009.3328"
+ .const 'Sub' $P483 = "137_1266337342.27136"
capture_lex $P483
$P10 = rx475_cur."before"($P483)
unless $P10, rx475_fail
@@ -5889,7 +5889,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__assertion:sym<name>" :subid("136_1261064009.3328") :method
+.sub "!PREFIX__assertion:sym<name>" :subid("136_1266337342.27136") :method
.annotate "line", 3
new $P477, "ResizablePMCArray"
push $P477, ""
@@ -5898,7 +5898,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "_block482" :anon :subid("137_1261064009.3328") :method :outer("135_1261064009.3328")
+.sub "_block482" :anon :subid("137_1266337342.27136") :method :outer("135_1266337342.27136")
.annotate "line", 150
.local string rx484_tgt
.local int rx484_pos
@@ -5954,9 +5954,9 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "assertion:sym<[>" :subid("138_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "assertion:sym<[>" :subid("138_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
- .const 'Sub' $P493 = "140_1261064009.3328"
+ .const 'Sub' $P493 = "140_1266337342.27136"
capture_lex $P493
.local string rx488_tgt
.local int rx488_pos
@@ -5991,7 +5991,7 @@
.annotate "line", 158
# rx subrule "before" subtype=zerowidth negate=
rx488_cur."!cursor_pos"(rx488_pos)
- .const 'Sub' $P493 = "140_1261064009.3328"
+ .const 'Sub' $P493 = "140_1266337342.27136"
capture_lex $P493
$P10 = rx488_cur."before"($P493)
unless $P10, rx488_fail
@@ -6029,7 +6029,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__assertion:sym<[>" :subid("139_1261064009.3328") :method
+.sub "!PREFIX__assertion:sym<[>" :subid("139_1266337342.27136") :method
.annotate "line", 3
new $P490, "ResizablePMCArray"
push $P490, ""
@@ -6038,7 +6038,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "_block492" :anon :subid("140_1261064009.3328") :method :outer("138_1261064009.3328")
+.sub "_block492" :anon :subid("140_1266337342.27136") :method :outer("138_1266337342.27136")
.annotate "line", 158
.local string rx494_tgt
.local int rx494_pos
@@ -6118,9 +6118,9 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "cclass_elem" :subid("141_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "cclass_elem" :subid("141_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
- .const 'Sub' $P511 = "143_1261064009.3328"
+ .const 'Sub' $P511 = "143_1266337342.27136"
capture_lex $P511
.local string rx500_tgt
.local int rx500_pos
@@ -6223,7 +6223,7 @@
.annotate "line", 164
# rx subrule $P511 subtype=capture negate=
rx500_cur."!cursor_pos"(rx500_pos)
- .const 'Sub' $P511 = "143_1261064009.3328"
+ .const 'Sub' $P511 = "143_1266337342.27136"
capture_lex $P511
$P10 = rx500_cur.$P511()
unless $P10, rx500_fail
@@ -6304,7 +6304,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__cclass_elem" :subid("142_1261064009.3328") :method
+.sub "!PREFIX__cclass_elem" :subid("142_1266337342.27136") :method
.annotate "line", 3
new $P502, "ResizablePMCArray"
push $P502, ""
@@ -6315,13 +6315,13 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "_block510" :anon :subid("143_1261064009.3328") :method :outer("141_1261064009.3328")
+.sub "_block510" :anon :subid("143_1266337342.27136") :method :outer("141_1266337342.27136")
.annotate "line", 164
- .const 'Sub' $P526 = "146_1261064009.3328"
+ .const 'Sub' $P526 = "146_1266337342.27136"
capture_lex $P526
- .const 'Sub' $P521 = "145_1261064009.3328"
+ .const 'Sub' $P521 = "145_1266337342.27136"
capture_lex $P521
- .const 'Sub' $P517 = "144_1261064009.3328"
+ .const 'Sub' $P517 = "144_1266337342.27136"
capture_lex $P517
.local string rx512_tgt
.local int rx512_pos
@@ -6392,7 +6392,7 @@
add rx512_pos, 1
# rx subrule $P517 subtype=capture negate=
rx512_cur."!cursor_pos"(rx512_pos)
- .const 'Sub' $P517 = "144_1261064009.3328"
+ .const 'Sub' $P517 = "144_1266337342.27136"
capture_lex $P517
$P10 = rx512_cur.$P517()
unless $P10, rx512_fail
@@ -6403,7 +6403,7 @@
alt515_1:
# rx subrule $P521 subtype=capture negate=
rx512_cur."!cursor_pos"(rx512_pos)
- .const 'Sub' $P521 = "145_1261064009.3328"
+ .const 'Sub' $P521 = "145_1266337342.27136"
capture_lex $P521
$P10 = rx512_cur.$P521()
unless $P10, rx512_fail
@@ -6432,7 +6432,7 @@
add rx512_pos, rx512_off, $I11
# rx subrule $P526 subtype=capture negate=
rx512_cur."!cursor_pos"(rx512_pos)
- .const 'Sub' $P526 = "146_1261064009.3328"
+ .const 'Sub' $P526 = "146_1266337342.27136"
capture_lex $P526
$P10 = rx512_cur.$P526()
unless $P10, rx512_fail
@@ -6461,7 +6461,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "_block516" :anon :subid("144_1261064009.3328") :method :outer("143_1261064009.3328")
+.sub "_block516" :anon :subid("144_1266337342.27136") :method :outer("143_1266337342.27136")
.annotate "line", 166
.local string rx518_tgt
.local int rx518_pos
@@ -6513,7 +6513,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "_block520" :anon :subid("145_1261064009.3328") :method :outer("143_1261064009.3328")
+.sub "_block520" :anon :subid("145_1266337342.27136") :method :outer("143_1266337342.27136")
.annotate "line", 166
.local string rx522_tgt
.local int rx522_pos
@@ -6569,7 +6569,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "_block525" :anon :subid("146_1261064009.3328") :method :outer("143_1261064009.3328")
+.sub "_block525" :anon :subid("146_1266337342.27136") :method :outer("143_1266337342.27136")
.annotate "line", 166
.local string rx527_tgt
.local int rx527_pos
@@ -6621,9 +6621,9 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "mod_internal" :subid("147_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "mod_internal" :subid("147_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
- .const 'Sub' $P543 = "149_1261064009.3328"
+ .const 'Sub' $P543 = "149_1266337342.27136"
capture_lex $P543
.local string rx535_tgt
.local int rx535_pos
@@ -6673,7 +6673,7 @@
rxquantr541_loop:
# rx subrule $P543 subtype=capture negate=
rx535_cur."!cursor_pos"(rx535_pos)
- .const 'Sub' $P543 = "149_1261064009.3328"
+ .const 'Sub' $P543 = "149_1266337342.27136"
capture_lex $P543
$P10 = rx535_cur.$P543()
unless $P10, rx535_fail
@@ -6775,7 +6775,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__mod_internal" :subid("148_1261064009.3328") :method
+.sub "!PREFIX__mod_internal" :subid("148_1266337342.27136") :method
.annotate "line", 3
$P537 = self."!PREFIX__!subrule"("mod_ident", ":")
new $P538, "ResizablePMCArray"
@@ -6786,7 +6786,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "_block542" :anon :subid("149_1261064009.3328") :method :outer("147_1261064009.3328")
+.sub "_block542" :anon :subid("149_1266337342.27136") :method :outer("147_1266337342.27136")
.annotate "line", 176
.local string rx544_tgt
.local int rx544_pos
@@ -6854,7 +6854,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "mod_ident" :subid("150_1261064009.3328") :method
+.sub "mod_ident" :subid("150_1266337342.27136") :method
.annotate "line", 181
$P552 = self."!protoregex"("mod_ident")
.return ($P552)
@@ -6862,7 +6862,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__mod_ident" :subid("151_1261064009.3328") :method
+.sub "!PREFIX__mod_ident" :subid("151_1266337342.27136") :method
.annotate "line", 181
$P554 = self."!PREFIX__!protoregex"("mod_ident")
.return ($P554)
@@ -6870,7 +6870,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "mod_ident:sym<ignorecase>" :subid("152_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "mod_ident:sym<ignorecase>" :subid("152_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx556_tgt
.local int rx556_pos
@@ -6955,7 +6955,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__mod_ident:sym<ignorecase>" :subid("153_1261064009.3328") :method
+.sub "!PREFIX__mod_ident:sym<ignorecase>" :subid("153_1266337342.27136") :method
.annotate "line", 3
new $P558, "ResizablePMCArray"
push $P558, "i"
@@ -6964,7 +6964,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "mod_ident:sym<ratchet>" :subid("154_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "mod_ident:sym<ratchet>" :subid("154_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx564_tgt
.local int rx564_pos
@@ -7049,7 +7049,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__mod_ident:sym<ratchet>" :subid("155_1261064009.3328") :method
+.sub "!PREFIX__mod_ident:sym<ratchet>" :subid("155_1266337342.27136") :method
.annotate "line", 3
new $P566, "ResizablePMCArray"
push $P566, "r"
@@ -7058,7 +7058,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "mod_ident:sym<sigspace>" :subid("156_1261064009.3328") :method :outer("11_1261064009.3328")
+.sub "mod_ident:sym<sigspace>" :subid("156_1266337342.27136") :method :outer("11_1266337342.27136")
.annotate "line", 3
.local string rx572_tgt
.local int rx572_pos
@@ -7143,7 +7143,7 @@
.namespace ["Regex";"P6Regex";"Grammar"]
-.sub "!PREFIX__mod_ident:sym<sigspace>" :subid("157_1261064009.3328") :method
+.sub "!PREFIX__mod_ident:sym<sigspace>" :subid("157_1266337342.27136") :method
.annotate "line", 3
new $P574, "ResizablePMCArray"
push $P574, "s"
@@ -7153,181 +7153,183 @@
### .include 'gen/p6regex-actions.pir'
.namespace []
-.sub "_block11" :anon :subid("10_1261064016.27984")
+.sub "_block11" :anon :subid("10_1266337348.54616")
.annotate "line", 0
get_hll_global $P14, ["Regex";"P6Regex";"Actions"], "_block13"
capture_lex $P14
.annotate "line", 4
get_hll_global $P14, ["Regex";"P6Regex";"Actions"], "_block13"
capture_lex $P14
- $P1556 = $P14()
+ $P1569 = $P14()
.annotate "line", 1
- .return ($P1556)
+ .return ($P1569)
.end
.namespace []
-.sub "" :load :init :subid("post89") :outer("10_1261064016.27984")
+.sub "" :load :init :subid("post90") :outer("10_1266337348.54616")
.annotate "line", 0
- .const 'Sub' $P12 = "10_1261064016.27984"
+ .const 'Sub' $P12 = "10_1266337348.54616"
.local pmc block
set block, $P12
- $P1557 = get_root_global ["parrot"], "P6metaclass"
- $P1557."new_class"("Regex::P6Regex::Actions", "HLL::Actions" :named("parent"))
+ $P1570 = get_root_global ["parrot"], "P6metaclass"
+ $P1570."new_class"("Regex::P6Regex::Actions", "HLL::Actions" :named("parent"))
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block13" :subid("11_1261064016.27984") :outer("10_1261064016.27984")
+.sub "_block13" :subid("11_1266337348.54616") :outer("10_1266337348.54616")
.annotate "line", 4
- .const 'Sub' $P1523 = "88_1261064016.27984"
- capture_lex $P1523
- .const 'Sub' $P1454 = "84_1261064016.27984"
- capture_lex $P1454
- .const 'Sub' $P1386 = "82_1261064016.27984"
- capture_lex $P1386
- .const 'Sub' $P1313 = "79_1261064016.27984"
- capture_lex $P1313
- .const 'Sub' $P1299 = "78_1261064016.27984"
- capture_lex $P1299
- .const 'Sub' $P1275 = "77_1261064016.27984"
- capture_lex $P1275
- .const 'Sub' $P1257 = "76_1261064016.27984"
- capture_lex $P1257
- .const 'Sub' $P1243 = "75_1261064016.27984"
+ .const 'Sub' $P1536 = "89_1266337348.54616"
+ capture_lex $P1536
+ .const 'Sub' $P1467 = "85_1266337348.54616"
+ capture_lex $P1467
+ .const 'Sub' $P1399 = "83_1266337348.54616"
+ capture_lex $P1399
+ .const 'Sub' $P1326 = "80_1266337348.54616"
+ capture_lex $P1326
+ .const 'Sub' $P1312 = "79_1266337348.54616"
+ capture_lex $P1312
+ .const 'Sub' $P1288 = "78_1266337348.54616"
+ capture_lex $P1288
+ .const 'Sub' $P1270 = "77_1266337348.54616"
+ capture_lex $P1270
+ .const 'Sub' $P1256 = "76_1266337348.54616"
+ capture_lex $P1256
+ .const 'Sub' $P1243 = "75_1266337348.54616"
capture_lex $P1243
- .const 'Sub' $P1212 = "74_1261064016.27984"
+ .const 'Sub' $P1212 = "74_1266337348.54616"
capture_lex $P1212
- .const 'Sub' $P1181 = "73_1261064016.27984"
+ .const 'Sub' $P1181 = "73_1266337348.54616"
capture_lex $P1181
- .const 'Sub' $P1165 = "72_1261064016.27984"
+ .const 'Sub' $P1165 = "72_1266337348.54616"
capture_lex $P1165
- .const 'Sub' $P1149 = "71_1261064016.27984"
+ .const 'Sub' $P1149 = "71_1266337348.54616"
capture_lex $P1149
- .const 'Sub' $P1133 = "70_1261064016.27984"
+ .const 'Sub' $P1133 = "70_1266337348.54616"
capture_lex $P1133
- .const 'Sub' $P1117 = "69_1261064016.27984"
+ .const 'Sub' $P1117 = "69_1266337348.54616"
capture_lex $P1117
- .const 'Sub' $P1101 = "68_1261064016.27984"
+ .const 'Sub' $P1101 = "68_1266337348.54616"
capture_lex $P1101
- .const 'Sub' $P1085 = "67_1261064016.27984"
+ .const 'Sub' $P1085 = "67_1266337348.54616"
capture_lex $P1085
- .const 'Sub' $P1069 = "66_1261064016.27984"
+ .const 'Sub' $P1069 = "66_1266337348.54616"
capture_lex $P1069
- .const 'Sub' $P1045 = "65_1261064016.27984"
+ .const 'Sub' $P1045 = "65_1266337348.54616"
capture_lex $P1045
- .const 'Sub' $P1030 = "64_1261064016.27984"
+ .const 'Sub' $P1030 = "64_1266337348.54616"
capture_lex $P1030
- .const 'Sub' $P974 = "63_1261064016.27984"
+ .const 'Sub' $P974 = "63_1266337348.54616"
capture_lex $P974
- .const 'Sub' $P953 = "62_1261064016.27984"
+ .const 'Sub' $P953 = "62_1266337348.54616"
capture_lex $P953
- .const 'Sub' $P931 = "61_1261064016.27984"
+ .const 'Sub' $P931 = "61_1266337348.54616"
capture_lex $P931
- .const 'Sub' $P921 = "60_1261064016.27984"
+ .const 'Sub' $P921 = "60_1266337348.54616"
capture_lex $P921
- .const 'Sub' $P911 = "59_1261064016.27984"
+ .const 'Sub' $P911 = "59_1266337348.54616"
capture_lex $P911
- .const 'Sub' $P901 = "58_1261064016.27984"
+ .const 'Sub' $P901 = "58_1266337348.54616"
capture_lex $P901
- .const 'Sub' $P889 = "57_1261064016.27984"
+ .const 'Sub' $P889 = "57_1266337348.54616"
capture_lex $P889
- .const 'Sub' $P877 = "56_1261064016.27984"
+ .const 'Sub' $P877 = "56_1266337348.54616"
capture_lex $P877
- .const 'Sub' $P865 = "55_1261064016.27984"
+ .const 'Sub' $P865 = "55_1266337348.54616"
capture_lex $P865
- .const 'Sub' $P853 = "54_1261064016.27984"
+ .const 'Sub' $P853 = "54_1266337348.54616"
capture_lex $P853
- .const 'Sub' $P841 = "53_1261064016.27984"
+ .const 'Sub' $P841 = "53_1266337348.54616"
capture_lex $P841
- .const 'Sub' $P829 = "52_1261064016.27984"
+ .const 'Sub' $P829 = "52_1266337348.54616"
capture_lex $P829
- .const 'Sub' $P817 = "51_1261064016.27984"
+ .const 'Sub' $P817 = "51_1266337348.54616"
capture_lex $P817
- .const 'Sub' $P805 = "50_1261064016.27984"
+ .const 'Sub' $P805 = "50_1266337348.54616"
capture_lex $P805
- .const 'Sub' $P782 = "49_1261064016.27984"
+ .const 'Sub' $P782 = "49_1266337348.54616"
capture_lex $P782
- .const 'Sub' $P759 = "48_1261064016.27984"
+ .const 'Sub' $P759 = "48_1266337348.54616"
capture_lex $P759
- .const 'Sub' $P741 = "47_1261064016.27984"
+ .const 'Sub' $P741 = "47_1266337348.54616"
capture_lex $P741
- .const 'Sub' $P731 = "46_1261064016.27984"
+ .const 'Sub' $P731 = "46_1266337348.54616"
capture_lex $P731
- .const 'Sub' $P713 = "45_1261064016.27984"
+ .const 'Sub' $P713 = "45_1266337348.54616"
capture_lex $P713
- .const 'Sub' $P666 = "44_1261064016.27984"
+ .const 'Sub' $P666 = "44_1266337348.54616"
capture_lex $P666
- .const 'Sub' $P649 = "43_1261064016.27984"
+ .const 'Sub' $P649 = "43_1266337348.54616"
capture_lex $P649
- .const 'Sub' $P634 = "42_1261064016.27984"
+ .const 'Sub' $P634 = "42_1266337348.54616"
capture_lex $P634
- .const 'Sub' $P619 = "41_1261064016.27984"
+ .const 'Sub' $P619 = "41_1266337348.54616"
capture_lex $P619
- .const 'Sub' $P593 = "40_1261064016.27984"
+ .const 'Sub' $P593 = "40_1266337348.54616"
capture_lex $P593
- .const 'Sub' $P543 = "38_1261064016.27984"
+ .const 'Sub' $P543 = "38_1266337348.54616"
capture_lex $P543
- .const 'Sub' $P475 = "36_1261064016.27984"
+ .const 'Sub' $P475 = "36_1266337348.54616"
capture_lex $P475
- .const 'Sub' $P420 = "33_1261064016.27984"
+ .const 'Sub' $P420 = "33_1266337348.54616"
capture_lex $P420
- .const 'Sub' $P405 = "32_1261064016.27984"
+ .const 'Sub' $P405 = "32_1266337348.54616"
capture_lex $P405
- .const 'Sub' $P379 = "30_1261064016.27984"
+ .const 'Sub' $P379 = "30_1266337348.54616"
capture_lex $P379
- .const 'Sub' $P362 = "29_1261064016.27984"
+ .const 'Sub' $P362 = "29_1266337348.54616"
capture_lex $P362
- .const 'Sub' $P340 = "28_1261064016.27984"
+ .const 'Sub' $P340 = "28_1266337348.54616"
capture_lex $P340
- .const 'Sub' $P308 = "27_1261064016.27984"
+ .const 'Sub' $P308 = "27_1266337348.54616"
capture_lex $P308
- .const 'Sub' $P54 = "14_1261064016.27984"
+ .const 'Sub' $P54 = "14_1266337348.54616"
capture_lex $P54
- .const 'Sub' $P21 = "13_1261064016.27984"
+ .const 'Sub' $P21 = "13_1266337348.54616"
capture_lex $P21
- .const 'Sub' $P16 = "12_1261064016.27984"
+ .const 'Sub' $P16 = "12_1266337348.54616"
capture_lex $P16
get_global $P15, "@MODIFIERS"
- unless_null $P15, vivify_90
+ unless_null $P15, vivify_91
new $P15, "ResizablePMCArray"
set_global "@MODIFIERS", $P15
- vivify_90:
+ vivify_91:
.annotate "line", 6
- .const 'Sub' $P16 = "12_1261064016.27984"
+ .const 'Sub' $P16 = "12_1266337348.54616"
capture_lex $P16
.lex "INIT", $P16
-.annotate "line", 475
- .const 'Sub' $P21 = "13_1261064016.27984"
+.annotate "line", 479
+ .const 'Sub' $P21 = "13_1266337348.54616"
capture_lex $P21
.lex "buildsub", $P21
-.annotate "line", 492
- .const 'Sub' $P54 = "14_1261064016.27984"
+.annotate "line", 496
+ .const 'Sub' $P54 = "14_1266337348.54616"
capture_lex $P54
.lex "capnames", $P54
-.annotate "line", 558
- .const 'Sub' $P308 = "27_1261064016.27984"
+.annotate "line", 562
+ .const 'Sub' $P308 = "27_1266337348.54616"
capture_lex $P308
.lex "backmod", $P308
-.annotate "line", 565
- .const 'Sub' $P340 = "28_1261064016.27984"
+.annotate "line", 569
+ .const 'Sub' $P340 = "28_1266337348.54616"
capture_lex $P340
.lex "subrule_alias", $P340
.annotate "line", 4
get_global $P360, "@MODIFIERS"
find_lex $P361, "INIT"
-.annotate "line", 468
- find_lex $P1552, "buildsub"
- find_lex $P1553, "capnames"
- find_lex $P1554, "backmod"
- find_lex $P1555, "subrule_alias"
+.annotate "line", 472
+ find_lex $P1565, "buildsub"
+ find_lex $P1566, "capnames"
+ find_lex $P1567, "backmod"
+ find_lex $P1568, "subrule_alias"
.annotate "line", 4
- .return ($P1555)
+ .return ($P1568)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "INIT" :subid("12_1261064016.27984") :outer("11_1261064016.27984")
+.sub "INIT" :subid("12_1266337348.54616") :outer("11_1266337348.54616")
.annotate "line", 6
new $P18, 'ExceptionHandler'
set_addr $P18, control_17
@@ -7351,73 +7353,73 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "buildsub" :subid("13_1261064016.27984") :outer("11_1261064016.27984")
+.sub "buildsub" :subid("13_1266337348.54616") :outer("11_1266337348.54616")
.param pmc param_24
.param pmc param_25 :optional
.param int has_param_25 :opt_flag
-.annotate "line", 475
+.annotate "line", 479
new $P23, 'ExceptionHandler'
set_addr $P23, control_22
$P23."handle_types"(58)
push_eh $P23
.lex "$rpast", param_24
- if has_param_25, optparam_91
+ if has_param_25, optparam_92
get_hll_global $P26, ["PAST"], "Block"
$P27 = $P26."new"()
set param_25, $P27
- optparam_91:
+ optparam_92:
.lex "$block", param_25
-.annotate "line", 476
+.annotate "line", 480
new $P28, "Hash"
.lex "%capnames", $P28
find_lex $P29, "$rpast"
$P30 = "capnames"($P29, 0)
store_lex "%capnames", $P30
-.annotate "line", 477
+.annotate "line", 481
new $P31, "Integer"
assign $P31, 0
find_lex $P32, "%capnames"
- unless_null $P32, vivify_92
+ unless_null $P32, vivify_93
new $P32, "Hash"
store_lex "%capnames", $P32
- vivify_92:
+ vivify_93:
set $P32[""], $P31
-.annotate "line", 478
+.annotate "line", 482
get_hll_global $P33, ["PAST"], "Regex"
-.annotate "line", 479
+.annotate "line", 483
get_hll_global $P34, ["PAST"], "Regex"
$P35 = $P34."new"("scan" :named("pasttype"))
find_lex $P36, "$rpast"
-.annotate "line", 481
+.annotate "line", 485
get_hll_global $P37, ["PAST"], "Regex"
$P38 = $P37."new"("pass" :named("pasttype"))
find_lex $P39, "%capnames"
$P40 = $P33."new"($P35, $P36, $P38, "concat" :named("pasttype"), $P39 :named("capnames"))
-.annotate "line", 478
+.annotate "line", 482
store_lex "$rpast", $P40
-.annotate "line", 485
+.annotate "line", 489
find_lex $P42, "$block"
$P43 = $P42."symbol"(unicode:"$\x{a2}")
if $P43, unless_41_end
find_lex $P44, "$block"
$P44."symbol"(unicode:"$\x{a2}", "lexical" :named("scope"))
unless_41_end:
-.annotate "line", 486
+.annotate "line", 490
find_lex $P46, "$block"
$P47 = $P46."symbol"("$/")
if $P47, unless_45_end
find_lex $P48, "$block"
$P48."symbol"("$/", "lexical" :named("scope"))
unless_45_end:
-.annotate "line", 487
+.annotate "line", 491
find_lex $P49, "$block"
find_lex $P50, "$rpast"
$P49."push"($P50)
-.annotate "line", 488
+.annotate "line", 492
find_lex $P51, "$block"
$P51."blocktype"("method")
find_lex $P52, "$block"
-.annotate "line", 475
+.annotate "line", 479
.return ($P52)
control_22:
.local pmc exception
@@ -7428,19 +7430,19 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "capnames" :subid("14_1261064016.27984") :outer("11_1261064016.27984")
+.sub "capnames" :subid("14_1266337348.54616") :outer("11_1266337348.54616")
.param pmc param_57
.param pmc param_58
-.annotate "line", 492
- .const 'Sub' $P283 = "25_1261064016.27984"
+.annotate "line", 496
+ .const 'Sub' $P283 = "25_1266337348.54616"
capture_lex $P283
- .const 'Sub' $P220 = "22_1261064016.27984"
+ .const 'Sub' $P220 = "22_1266337348.54616"
capture_lex $P220
- .const 'Sub' $P178 = "20_1261064016.27984"
+ .const 'Sub' $P178 = "20_1266337348.54616"
capture_lex $P178
- .const 'Sub' $P136 = "18_1261064016.27984"
+ .const 'Sub' $P136 = "18_1266337348.54616"
capture_lex $P136
- .const 'Sub' $P69 = "15_1261064016.27984"
+ .const 'Sub' $P69 = "15_1266337348.54616"
capture_lex $P69
new $P56, 'ExceptionHandler'
set_addr $P56, control_55
@@ -7448,29 +7450,29 @@
push_eh $P56
.lex "$ast", param_57
.lex "$count", param_58
-.annotate "line", 493
+.annotate "line", 497
new $P59, "Hash"
.lex "%capnames", $P59
-.annotate "line", 494
+.annotate "line", 498
new $P60, "Undef"
.lex "$pasttype", $P60
-.annotate "line", 492
+.annotate "line", 496
find_lex $P61, "%capnames"
-.annotate "line", 494
+.annotate "line", 498
find_lex $P62, "$ast"
$P63 = $P62."pasttype"()
store_lex "$pasttype", $P63
-.annotate "line", 495
+.annotate "line", 499
find_lex $P65, "$pasttype"
set $S66, $P65
iseq $I67, $S66, "alt"
if $I67, if_64
-.annotate "line", 508
+.annotate "line", 512
find_lex $P127, "$pasttype"
set $S128, $P127
iseq $I129, $S128, "concat"
if $I129, if_126
-.annotate "line", 517
+.annotate "line", 521
find_lex $P171, "$pasttype"
set $S172, $P171
iseq $I173, $S172, "subrule"
@@ -7486,41 +7488,41 @@
set $P169, $I176
if_170_end:
if $P169, if_168
-.annotate "line", 530
+.annotate "line", 534
find_lex $P216, "$pasttype"
set $S217, $P216
iseq $I218, $S217, "subcapture"
if $I218, if_215
-.annotate "line", 547
+.annotate "line", 551
find_lex $P279, "$pasttype"
set $S280, $P279
iseq $I281, $S280, "quant"
unless $I281, if_278_end
- .const 'Sub' $P283 = "25_1261064016.27984"
+ .const 'Sub' $P283 = "25_1266337348.54616"
capture_lex $P283
$P283()
if_278_end:
goto if_215_end
if_215:
-.annotate "line", 530
- .const 'Sub' $P220 = "22_1261064016.27984"
+.annotate "line", 534
+ .const 'Sub' $P220 = "22_1266337348.54616"
capture_lex $P220
$P220()
if_215_end:
goto if_168_end
if_168:
-.annotate "line", 517
- .const 'Sub' $P178 = "20_1261064016.27984"
+.annotate "line", 521
+ .const 'Sub' $P178 = "20_1266337348.54616"
capture_lex $P178
$P178()
if_168_end:
goto if_126_end
if_126:
-.annotate "line", 509
+.annotate "line", 513
find_lex $P131, "$ast"
$P132 = $P131."list"()
defined $I133, $P132
- unless $I133, for_undef_113
+ unless $I133, for_undef_114
iter $P130, $P132
new $P166, 'ExceptionHandler'
set_addr $P166, loop165_handler
@@ -7530,7 +7532,7 @@
unless $P130, loop165_done
shift $P134, $P130
loop165_redo:
- .const 'Sub' $P136 = "18_1261064016.27984"
+ .const 'Sub' $P136 = "18_1266337348.54616"
capture_lex $P136
$P136($P134)
loop165_next:
@@ -7543,26 +7545,26 @@
eq $P167, 67, loop165_redo
loop165_done:
pop_eh
- for_undef_113:
+ for_undef_114:
if_126_end:
-.annotate "line", 508
+.annotate "line", 512
goto if_64_end
if_64:
-.annotate "line", 495
- .const 'Sub' $P69 = "15_1261064016.27984"
+.annotate "line", 499
+ .const 'Sub' $P69 = "15_1266337348.54616"
capture_lex $P69
$P69()
if_64_end:
-.annotate "line", 554
+.annotate "line", 558
find_lex $P304, "$count"
find_lex $P305, "%capnames"
- unless_null $P305, vivify_133
+ unless_null $P305, vivify_134
new $P305, "Hash"
store_lex "%capnames", $P305
- vivify_133:
+ vivify_134:
set $P305[""], $P304
find_lex $P306, "%capnames"
-.annotate "line", 492
+.annotate "line", 496
.return ($P306)
control_55:
.local pmc exception
@@ -7573,28 +7575,28 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block282" :anon :subid("25_1261064016.27984") :outer("14_1261064016.27984")
-.annotate "line", 547
- .const 'Sub' $P294 = "26_1261064016.27984"
+.sub "_block282" :anon :subid("25_1266337348.54616") :outer("14_1266337348.54616")
+.annotate "line", 551
+ .const 'Sub' $P294 = "26_1266337348.54616"
capture_lex $P294
-.annotate "line", 548
+.annotate "line", 552
new $P284, "Hash"
.lex "%astcap", $P284
find_lex $P285, "$ast"
- unless_null $P285, vivify_93
+ unless_null $P285, vivify_94
new $P285, "ResizablePMCArray"
- vivify_93:
+ vivify_94:
set $P286, $P285[0]
- unless_null $P286, vivify_94
+ unless_null $P286, vivify_95
new $P286, "Undef"
- vivify_94:
+ vivify_95:
find_lex $P287, "$count"
$P288 = "capnames"($P286, $P287)
store_lex "%astcap", $P288
-.annotate "line", 549
+.annotate "line", 553
find_lex $P290, "%astcap"
defined $I291, $P290
- unless $I291, for_undef_95
+ unless $I291, for_undef_96
iter $P289, $P290
new $P300, 'ExceptionHandler'
set_addr $P300, loop299_handler
@@ -7604,7 +7606,7 @@
unless $P289, loop299_done
shift $P292, $P289
loop299_redo:
- .const 'Sub' $P294 = "26_1261064016.27984"
+ .const 'Sub' $P294 = "26_1266337348.54616"
capture_lex $P294
$P294($P292)
loop299_next:
@@ -7617,73 +7619,73 @@
eq $P301, 67, loop299_redo
loop299_done:
pop_eh
- for_undef_95:
-.annotate "line", 552
+ for_undef_96:
+.annotate "line", 556
find_lex $P302, "%astcap"
- unless_null $P302, vivify_97
+ unless_null $P302, vivify_98
new $P302, "Hash"
- vivify_97:
+ vivify_98:
set $P303, $P302[""]
- unless_null $P303, vivify_98
+ unless_null $P303, vivify_99
new $P303, "Undef"
- vivify_98:
+ vivify_99:
store_lex "$count", $P303
-.annotate "line", 547
+.annotate "line", 551
.return ($P303)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block293" :anon :subid("26_1261064016.27984") :outer("25_1261064016.27984")
+.sub "_block293" :anon :subid("26_1266337348.54616") :outer("25_1266337348.54616")
.param pmc param_295
-.annotate "line", 549
+.annotate "line", 553
.lex "$_", param_295
-.annotate "line", 550
+.annotate "line", 554
new $P296, "Integer"
assign $P296, 2
find_lex $P297, "$_"
find_lex $P298, "%capnames"
- unless_null $P298, vivify_96
+ unless_null $P298, vivify_97
new $P298, "Hash"
store_lex "%capnames", $P298
- vivify_96:
+ vivify_97:
set $P298[$P297], $P296
-.annotate "line", 549
+.annotate "line", 553
.return ($P296)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block219" :anon :subid("22_1261064016.27984") :outer("14_1261064016.27984")
-.annotate "line", 530
- .const 'Sub' $P260 = "24_1261064016.27984"
+.sub "_block219" :anon :subid("22_1266337348.54616") :outer("14_1266337348.54616")
+.annotate "line", 534
+ .const 'Sub' $P260 = "24_1266337348.54616"
capture_lex $P260
- .const 'Sub' $P232 = "23_1261064016.27984"
+ .const 'Sub' $P232 = "23_1266337348.54616"
capture_lex $P232
-.annotate "line", 531
+.annotate "line", 535
new $P221, "Undef"
.lex "$name", $P221
-.annotate "line", 532
+.annotate "line", 536
new $P222, "ResizablePMCArray"
.lex "@names", $P222
-.annotate "line", 541
+.annotate "line", 545
new $P223, "Hash"
.lex "%x", $P223
-.annotate "line", 531
+.annotate "line", 535
find_lex $P224, "$ast"
$P225 = $P224."name"()
store_lex "$name", $P225
-.annotate "line", 532
+.annotate "line", 536
$P0 = find_lex '$name'
$S0 = $P0
$P226 = split '=', $S0
store_lex "@names", $P226
-.annotate "line", 537
+.annotate "line", 541
find_lex $P228, "@names"
defined $I229, $P228
- unless $I229, for_undef_99
+ unless $I229, for_undef_100
iter $P227, $P228
new $P249, 'ExceptionHandler'
set_addr $P249, loop248_handler
@@ -7693,7 +7695,7 @@
unless $P227, loop248_done
shift $P230, $P227
loop248_redo:
- .const 'Sub' $P232 = "23_1261064016.27984"
+ .const 'Sub' $P232 = "23_1266337348.54616"
capture_lex $P232
$P232($P230)
loop248_next:
@@ -7706,23 +7708,23 @@
eq $P250, 67, loop248_redo
loop248_done:
pop_eh
- for_undef_99:
-.annotate "line", 541
+ for_undef_100:
+.annotate "line", 545
find_lex $P251, "$ast"
- unless_null $P251, vivify_101
+ unless_null $P251, vivify_102
new $P251, "ResizablePMCArray"
- vivify_101:
+ vivify_102:
set $P252, $P251[0]
- unless_null $P252, vivify_102
+ unless_null $P252, vivify_103
new $P252, "Undef"
- vivify_102:
+ vivify_103:
find_lex $P253, "$count"
$P254 = "capnames"($P252, $P253)
store_lex "%x", $P254
-.annotate "line", 542
+.annotate "line", 546
find_lex $P256, "%x"
defined $I257, $P256
- unless $I257, for_undef_103
+ unless $I257, for_undef_104
iter $P255, $P256
new $P274, 'ExceptionHandler'
set_addr $P274, loop273_handler
@@ -7732,7 +7734,7 @@
unless $P255, loop273_done
shift $P258, $P255
loop273_redo:
- .const 'Sub' $P260 = "24_1261064016.27984"
+ .const 'Sub' $P260 = "24_1266337348.54616"
capture_lex $P260
$P260($P258)
loop273_next:
@@ -7745,28 +7747,28 @@
eq $P275, 67, loop273_redo
loop273_done:
pop_eh
- for_undef_103:
-.annotate "line", 545
+ for_undef_104:
+.annotate "line", 549
find_lex $P276, "%x"
- unless_null $P276, vivify_109
+ unless_null $P276, vivify_110
new $P276, "Hash"
- vivify_109:
+ vivify_110:
set $P277, $P276[""]
- unless_null $P277, vivify_110
+ unless_null $P277, vivify_111
new $P277, "Undef"
- vivify_110:
+ vivify_111:
store_lex "$count", $P277
-.annotate "line", 530
+.annotate "line", 534
.return ($P277)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block231" :anon :subid("23_1261064016.27984") :outer("22_1261064016.27984")
+.sub "_block231" :anon :subid("23_1266337348.54616") :outer("22_1266337348.54616")
.param pmc param_233
-.annotate "line", 537
+.annotate "line", 541
.lex "$_", param_233
-.annotate "line", 538
+.annotate "line", 542
find_lex $P237, "$_"
set $S238, $P237
iseq $I239, $S238, "0"
@@ -7786,77 +7788,77 @@
add $P244, $P243, 1
store_lex "$count", $P244
if_234_end:
-.annotate "line", 539
+.annotate "line", 543
new $P245, "Integer"
assign $P245, 1
find_lex $P246, "$_"
find_lex $P247, "%capnames"
- unless_null $P247, vivify_100
+ unless_null $P247, vivify_101
new $P247, "Hash"
store_lex "%capnames", $P247
- vivify_100:
+ vivify_101:
set $P247[$P246], $P245
-.annotate "line", 537
+.annotate "line", 541
.return ($P245)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block259" :anon :subid("24_1261064016.27984") :outer("22_1261064016.27984")
+.sub "_block259" :anon :subid("24_1266337348.54616") :outer("22_1266337348.54616")
.param pmc param_261
-.annotate "line", 542
+.annotate "line", 546
.lex "$_", param_261
-.annotate "line", 543
+.annotate "line", 547
find_lex $P262, "$_"
find_lex $P263, "%capnames"
- unless_null $P263, vivify_104
+ unless_null $P263, vivify_105
new $P263, "Hash"
- vivify_104:
+ vivify_105:
set $P264, $P263[$P262]
- unless_null $P264, vivify_105
+ unless_null $P264, vivify_106
new $P264, "Undef"
- vivify_105:
+ vivify_106:
set $N265, $P264
new $P266, 'Float'
set $P266, $N265
find_lex $P267, "$_"
find_lex $P268, "%x"
- unless_null $P268, vivify_106
+ unless_null $P268, vivify_107
new $P268, "Hash"
- vivify_106:
+ vivify_107:
set $P269, $P268[$P267]
- unless_null $P269, vivify_107
+ unless_null $P269, vivify_108
new $P269, "Undef"
- vivify_107:
+ vivify_108:
add $P270, $P266, $P269
find_lex $P271, "$_"
find_lex $P272, "%capnames"
- unless_null $P272, vivify_108
+ unless_null $P272, vivify_109
new $P272, "Hash"
store_lex "%capnames", $P272
- vivify_108:
+ vivify_109:
set $P272[$P271], $P270
-.annotate "line", 542
+.annotate "line", 546
.return ($P270)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block177" :anon :subid("20_1261064016.27984") :outer("14_1261064016.27984")
-.annotate "line", 517
- .const 'Sub' $P196 = "21_1261064016.27984"
+.sub "_block177" :anon :subid("20_1266337348.54616") :outer("14_1266337348.54616")
+.annotate "line", 521
+ .const 'Sub' $P196 = "21_1266337348.54616"
capture_lex $P196
-.annotate "line", 518
+.annotate "line", 522
new $P179, "Undef"
.lex "$name", $P179
-.annotate "line", 520
+.annotate "line", 524
new $P180, "ResizablePMCArray"
.lex "@names", $P180
-.annotate "line", 518
+.annotate "line", 522
find_lex $P181, "$ast"
$P182 = $P181."name"()
store_lex "$name", $P182
-.annotate "line", 519
+.annotate "line", 523
find_lex $P184, "$name"
set $S185, $P184
iseq $I186, $S185, ""
@@ -7867,17 +7869,17 @@
find_lex $P189, "$name"
$P188."name"($P189)
if_183_end:
-.annotate "line", 520
+.annotate "line", 524
$P0 = find_lex '$name'
$S0 = $P0
$P190 = split '=', $S0
store_lex "@names", $P190
-.annotate "line", 525
+.annotate "line", 529
find_lex $P192, "@names"
defined $I193, $P192
- unless $I193, for_undef_111
+ unless $I193, for_undef_112
iter $P191, $P192
new $P213, 'ExceptionHandler'
set_addr $P213, loop212_handler
@@ -7887,7 +7889,7 @@
unless $P191, loop212_done
shift $P194, $P191
loop212_redo:
- .const 'Sub' $P196 = "21_1261064016.27984"
+ .const 'Sub' $P196 = "21_1266337348.54616"
capture_lex $P196
$P196($P194)
loop212_next:
@@ -7900,18 +7902,18 @@
eq $P214, 67, loop212_redo
loop212_done:
pop_eh
- for_undef_111:
-.annotate "line", 517
+ for_undef_112:
+.annotate "line", 521
.return ($P191)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block195" :anon :subid("21_1261064016.27984") :outer("20_1261064016.27984")
+.sub "_block195" :anon :subid("21_1266337348.54616") :outer("20_1266337348.54616")
.param pmc param_197
-.annotate "line", 525
+.annotate "line", 529
.lex "$_", param_197
-.annotate "line", 526
+.annotate "line", 530
find_lex $P201, "$_"
set $S202, $P201
iseq $I203, $S202, "0"
@@ -7931,28 +7933,28 @@
add $P208, $P207, 1
store_lex "$count", $P208
if_198_end:
-.annotate "line", 527
+.annotate "line", 531
new $P209, "Integer"
assign $P209, 1
find_lex $P210, "$_"
find_lex $P211, "%capnames"
- unless_null $P211, vivify_112
+ unless_null $P211, vivify_113
new $P211, "Hash"
store_lex "%capnames", $P211
- vivify_112:
+ vivify_113:
set $P211[$P210], $P209
-.annotate "line", 525
+.annotate "line", 529
.return ($P209)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block135" :anon :subid("18_1261064016.27984") :outer("14_1261064016.27984")
+.sub "_block135" :anon :subid("18_1266337348.54616") :outer("14_1266337348.54616")
.param pmc param_138
-.annotate "line", 509
- .const 'Sub' $P147 = "19_1261064016.27984"
+.annotate "line", 513
+ .const 'Sub' $P147 = "19_1266337348.54616"
capture_lex $P147
-.annotate "line", 510
+.annotate "line", 514
new $P137, "Hash"
.lex "%x", $P137
.lex "$_", param_138
@@ -7960,10 +7962,10 @@
find_lex $P140, "$count"
$P141 = "capnames"($P139, $P140)
store_lex "%x", $P141
-.annotate "line", 511
+.annotate "line", 515
find_lex $P143, "%x"
defined $I144, $P143
- unless $I144, for_undef_114
+ unless $I144, for_undef_115
iter $P142, $P143
new $P161, 'ExceptionHandler'
set_addr $P161, loop160_handler
@@ -7973,7 +7975,7 @@
unless $P142, loop160_done
shift $P145, $P142
loop160_redo:
- .const 'Sub' $P147 = "19_1261064016.27984"
+ .const 'Sub' $P147 = "19_1266337348.54616"
capture_lex $P147
$P147($P145)
loop160_next:
@@ -7986,77 +7988,77 @@
eq $P162, 67, loop160_redo
loop160_done:
pop_eh
- for_undef_114:
-.annotate "line", 514
+ for_undef_115:
+.annotate "line", 518
find_lex $P163, "%x"
- unless_null $P163, vivify_120
+ unless_null $P163, vivify_121
new $P163, "Hash"
- vivify_120:
+ vivify_121:
set $P164, $P163[""]
- unless_null $P164, vivify_121
+ unless_null $P164, vivify_122
new $P164, "Undef"
- vivify_121:
+ vivify_122:
store_lex "$count", $P164
-.annotate "line", 509
+.annotate "line", 513
.return ($P164)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block146" :anon :subid("19_1261064016.27984") :outer("18_1261064016.27984")
+.sub "_block146" :anon :subid("19_1266337348.54616") :outer("18_1266337348.54616")
.param pmc param_148
-.annotate "line", 511
+.annotate "line", 515
.lex "$_", param_148
-.annotate "line", 512
+.annotate "line", 516
find_lex $P149, "$_"
find_lex $P150, "%capnames"
- unless_null $P150, vivify_115
+ unless_null $P150, vivify_116
new $P150, "Hash"
- vivify_115:
+ vivify_116:
set $P151, $P150[$P149]
- unless_null $P151, vivify_116
+ unless_null $P151, vivify_117
new $P151, "Undef"
- vivify_116:
+ vivify_117:
set $N152, $P151
new $P153, 'Float'
set $P153, $N152
find_lex $P154, "$_"
find_lex $P155, "%x"
- unless_null $P155, vivify_117
+ unless_null $P155, vivify_118
new $P155, "Hash"
- vivify_117:
+ vivify_118:
set $P156, $P155[$P154]
- unless_null $P156, vivify_118
+ unless_null $P156, vivify_119
new $P156, "Undef"
- vivify_118:
+ vivify_119:
add $P157, $P153, $P156
find_lex $P158, "$_"
find_lex $P159, "%capnames"
- unless_null $P159, vivify_119
+ unless_null $P159, vivify_120
new $P159, "Hash"
store_lex "%capnames", $P159
- vivify_119:
+ vivify_120:
set $P159[$P158], $P157
-.annotate "line", 511
+.annotate "line", 515
.return ($P157)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block68" :anon :subid("15_1261064016.27984") :outer("14_1261064016.27984")
-.annotate "line", 495
- .const 'Sub' $P78 = "16_1261064016.27984"
+.sub "_block68" :anon :subid("15_1266337348.54616") :outer("14_1266337348.54616")
+.annotate "line", 499
+ .const 'Sub' $P78 = "16_1266337348.54616"
capture_lex $P78
-.annotate "line", 496
+.annotate "line", 500
new $P70, "Undef"
.lex "$max", $P70
find_lex $P71, "$count"
store_lex "$max", $P71
-.annotate "line", 497
+.annotate "line", 501
find_lex $P73, "$ast"
$P74 = $P73."list"()
defined $I75, $P74
- unless $I75, for_undef_122
+ unless $I75, for_undef_123
iter $P72, $P74
new $P123, 'ExceptionHandler'
set_addr $P123, loop122_handler
@@ -8066,7 +8068,7 @@
unless $P72, loop122_done
shift $P76, $P72
loop122_redo:
- .const 'Sub' $P78 = "16_1261064016.27984"
+ .const 'Sub' $P78 = "16_1266337348.54616"
capture_lex $P78
$P78($P76)
loop122_next:
@@ -8079,22 +8081,22 @@
eq $P124, 67, loop122_redo
loop122_done:
pop_eh
- for_undef_122:
-.annotate "line", 506
+ for_undef_123:
+.annotate "line", 510
find_lex $P125, "$max"
store_lex "$count", $P125
-.annotate "line", 495
+.annotate "line", 499
.return ($P125)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block77" :anon :subid("16_1261064016.27984") :outer("15_1261064016.27984")
+.sub "_block77" :anon :subid("16_1266337348.54616") :outer("15_1266337348.54616")
.param pmc param_80
-.annotate "line", 497
- .const 'Sub' $P89 = "17_1261064016.27984"
+.annotate "line", 501
+ .const 'Sub' $P89 = "17_1266337348.54616"
capture_lex $P89
-.annotate "line", 498
+.annotate "line", 502
new $P79, "Hash"
.lex "%x", $P79
.lex "$_", param_80
@@ -8102,10 +8104,10 @@
find_lex $P82, "$count"
$P83 = "capnames"($P81, $P82)
store_lex "%x", $P83
-.annotate "line", 499
+.annotate "line", 503
find_lex $P85, "%x"
defined $I86, $P85
- unless $I86, for_undef_123
+ unless $I86, for_undef_124
iter $P84, $P85
new $P110, 'ExceptionHandler'
set_addr $P110, loop109_handler
@@ -8115,7 +8117,7 @@
unless $P84, loop109_done
shift $P87, $P84
loop109_redo:
- .const 'Sub' $P89 = "17_1261064016.27984"
+ .const 'Sub' $P89 = "17_1266337348.54616"
capture_lex $P89
$P89($P87)
loop109_next:
@@ -8128,16 +8130,16 @@
eq $P111, 67, loop109_redo
loop109_done:
pop_eh
- for_undef_123:
-.annotate "line", 504
+ for_undef_124:
+.annotate "line", 508
find_lex $P114, "%x"
- unless_null $P114, vivify_129
+ unless_null $P114, vivify_130
new $P114, "Hash"
- vivify_129:
+ vivify_130:
set $P115, $P114[""]
- unless_null $P115, vivify_130
+ unless_null $P115, vivify_131
new $P115, "Undef"
- vivify_130:
+ vivify_131:
set $N116, $P115
find_lex $P117, "$max"
set $N118, $P117
@@ -8148,36 +8150,36 @@
goto if_113_end
if_113:
find_lex $P120, "%x"
- unless_null $P120, vivify_131
+ unless_null $P120, vivify_132
new $P120, "Hash"
- vivify_131:
+ vivify_132:
set $P121, $P120[""]
- unless_null $P121, vivify_132
+ unless_null $P121, vivify_133
new $P121, "Undef"
- vivify_132:
+ vivify_133:
store_lex "$max", $P121
set $P112, $P121
if_113_end:
-.annotate "line", 497
+.annotate "line", 501
.return ($P112)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block88" :anon :subid("17_1261064016.27984") :outer("16_1261064016.27984")
+.sub "_block88" :anon :subid("17_1266337348.54616") :outer("16_1266337348.54616")
.param pmc param_90
-.annotate "line", 499
+.annotate "line", 503
.lex "$_", param_90
-.annotate "line", 500
+.annotate "line", 504
find_lex $P95, "$_"
find_lex $P96, "%capnames"
- unless_null $P96, vivify_124
+ unless_null $P96, vivify_125
new $P96, "Hash"
- vivify_124:
+ vivify_125:
set $P97, $P96[$P95]
- unless_null $P97, vivify_125
+ unless_null $P97, vivify_126
new $P97, "Undef"
- vivify_125:
+ vivify_126:
set $N98, $P97
islt $I99, $N98, 2.0
if $I99, if_94
@@ -8187,13 +8189,13 @@
if_94:
find_lex $P100, "$_"
find_lex $P101, "%x"
- unless_null $P101, vivify_126
+ unless_null $P101, vivify_127
new $P101, "Hash"
- vivify_126:
+ vivify_127:
set $P102, $P101[$P100]
- unless_null $P102, vivify_127
+ unless_null $P102, vivify_128
new $P102, "Undef"
- vivify_127:
+ vivify_128:
set $N103, $P102
iseq $I104, $N103, 1.0
new $P93, 'Integer'
@@ -8209,36 +8211,36 @@
assign $P105, 1
set $P91, $P105
if_92_end:
-.annotate "line", 501
+.annotate "line", 505
find_lex $P107, "$_"
find_lex $P108, "%capnames"
- unless_null $P108, vivify_128
+ unless_null $P108, vivify_129
new $P108, "Hash"
store_lex "%capnames", $P108
- vivify_128:
+ vivify_129:
set $P108[$P107], $P91
-.annotate "line", 499
+.annotate "line", 503
.return ($P91)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "backmod" :subid("27_1261064016.27984") :outer("11_1261064016.27984")
+.sub "backmod" :subid("27_1266337348.54616") :outer("11_1266337348.54616")
.param pmc param_311
.param pmc param_312
-.annotate "line", 558
+.annotate "line", 562
new $P310, 'ExceptionHandler'
set_addr $P310, control_309
$P310."handle_types"(58)
push_eh $P310
.lex "$ast", param_311
.lex "$backmod", param_312
-.annotate "line", 559
+.annotate "line", 563
find_lex $P314, "$backmod"
set $S315, $P314
iseq $I316, $S315, ":"
if $I316, if_313
-.annotate "line", 560
+.annotate "line", 564
find_lex $P321, "$backmod"
set $S322, $P321
iseq $I323, $S322, ":?"
@@ -8254,7 +8256,7 @@
set $P319, $I326
unless_320_end:
if $P319, if_318
-.annotate "line", 561
+.annotate "line", 565
find_lex $P331, "$backmod"
set $S332, $P331
iseq $I333, $S332, ":!"
@@ -8275,18 +8277,18 @@
if_328_end:
goto if_318_end
if_318:
-.annotate "line", 560
+.annotate "line", 564
find_lex $P327, "$ast"
$P327."backtrack"("f")
if_318_end:
goto if_313_end
if_313:
-.annotate "line", 559
+.annotate "line", 563
find_lex $P317, "$ast"
$P317."backtrack"("r")
if_313_end:
find_lex $P338, "$ast"
-.annotate "line", 558
+.annotate "line", 562
.return ($P338)
control_309:
.local pmc exception
@@ -8297,28 +8299,28 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "subrule_alias" :subid("28_1261064016.27984") :outer("11_1261064016.27984")
+.sub "subrule_alias" :subid("28_1266337348.54616") :outer("11_1266337348.54616")
.param pmc param_343
.param pmc param_344
-.annotate "line", 565
+.annotate "line", 569
new $P342, 'ExceptionHandler'
set_addr $P342, control_341
$P342."handle_types"(58)
push_eh $P342
.lex "$past", param_343
.lex "$name", param_344
-.annotate "line", 566
+.annotate "line", 570
find_lex $P346, "$past"
$S347 = $P346."name"()
isgt $I348, $S347, ""
if $I348, if_345
-.annotate "line", 567
+.annotate "line", 571
find_lex $P355, "$past"
find_lex $P356, "$name"
$P355."name"($P356)
goto if_345_end
if_345:
-.annotate "line", 566
+.annotate "line", 570
find_lex $P349, "$past"
find_lex $P350, "$name"
concat $P351, $P350, "="
@@ -8327,10 +8329,10 @@
concat $P354, $P351, $S353
$P349."name"($P354)
if_345_end:
-.annotate "line", 568
+.annotate "line", 572
find_lex $P357, "$past"
$P358 = $P357."subtype"("capture")
-.annotate "line", 565
+.annotate "line", 569
.return ($P358)
control_341:
.local pmc exception
@@ -8341,7 +8343,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "arg" :subid("29_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "arg" :subid("29_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_365
.annotate "line", 14
new $P364, 'ExceptionHandler'
@@ -8353,35 +8355,35 @@
.annotate "line", 15
find_lex $P366, "$/"
find_lex $P369, "$/"
- unless_null $P369, vivify_134
+ unless_null $P369, vivify_135
new $P369, "Hash"
- vivify_134:
+ vivify_135:
set $P370, $P369["quote_EXPR"]
- unless_null $P370, vivify_135
+ unless_null $P370, vivify_136
new $P370, "Undef"
- vivify_135:
+ vivify_136:
if $P370, if_368
find_lex $P374, "$/"
- unless_null $P374, vivify_136
+ unless_null $P374, vivify_137
new $P374, "Hash"
- vivify_136:
+ vivify_137:
set $P375, $P374["val"]
- unless_null $P375, vivify_137
+ unless_null $P375, vivify_138
new $P375, "Undef"
- vivify_137:
+ vivify_138:
set $N376, $P375
new $P367, 'Float'
set $P367, $N376
goto if_368_end
if_368:
find_lex $P371, "$/"
- unless_null $P371, vivify_138
+ unless_null $P371, vivify_139
new $P371, "Hash"
- vivify_138:
+ vivify_139:
set $P372, $P371["quote_EXPR"]
- unless_null $P372, vivify_139
+ unless_null $P372, vivify_140
new $P372, "Undef"
- vivify_139:
+ vivify_140:
$P373 = $P372."ast"()
set $P367, $P373
if_368_end:
@@ -8397,10 +8399,10 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "arglist" :subid("30_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "arglist" :subid("30_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_382
.annotate "line", 18
- .const 'Sub' $P392 = "31_1261064016.27984"
+ .const 'Sub' $P392 = "31_1266337348.54616"
capture_lex $P392
new $P381, 'ExceptionHandler'
set_addr $P381, control_380
@@ -8416,15 +8418,15 @@
store_lex "$past", $P385
.annotate "line", 20
find_lex $P387, "$/"
- unless_null $P387, vivify_140
+ unless_null $P387, vivify_141
new $P387, "Hash"
- vivify_140:
+ vivify_141:
set $P388, $P387["arg"]
- unless_null $P388, vivify_141
+ unless_null $P388, vivify_142
new $P388, "Undef"
- vivify_141:
+ vivify_142:
defined $I389, $P388
- unless $I389, for_undef_142
+ unless $I389, for_undef_143
iter $P386, $P388
new $P399, 'ExceptionHandler'
set_addr $P399, loop398_handler
@@ -8434,7 +8436,7 @@
unless $P386, loop398_done
shift $P390, $P386
loop398_redo:
- .const 'Sub' $P392 = "31_1261064016.27984"
+ .const 'Sub' $P392 = "31_1266337348.54616"
capture_lex $P392
$P392($P390)
loop398_next:
@@ -8447,7 +8449,7 @@
eq $P400, 67, loop398_redo
loop398_done:
pop_eh
- for_undef_142:
+ for_undef_143:
.annotate "line", 21
find_lex $P401, "$/"
find_lex $P402, "$past"
@@ -8463,7 +8465,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block391" :anon :subid("31_1261064016.27984") :outer("30_1261064016.27984")
+.sub "_block391" :anon :subid("31_1266337348.54616") :outer("30_1266337348.54616")
.param pmc param_393
.annotate "line", 20
.lex "$_", param_393
@@ -8476,7 +8478,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "TOP" :subid("32_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "TOP" :subid("32_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_408
.annotate "line", 24
new $P407, 'ExceptionHandler'
@@ -8489,13 +8491,13 @@
new $P409, "Undef"
.lex "$past", $P409
find_lex $P410, "$/"
- unless_null $P410, vivify_143
+ unless_null $P410, vivify_144
new $P410, "Hash"
- vivify_143:
+ vivify_144:
set $P411, $P410["nibbler"]
- unless_null $P411, vivify_144
+ unless_null $P411, vivify_145
new $P411, "Undef"
- vivify_144:
+ vivify_145:
$P412 = $P411."ast"()
$P413 = "buildsub"($P412)
store_lex "$past", $P413
@@ -8518,14 +8520,14 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "nibbler" :subid("33_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "nibbler" :subid("33_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_423
.param pmc param_424 :optional
.param int has_param_424 :opt_flag
.annotate "line", 30
- .const 'Sub' $P458 = "35_1261064016.27984"
+ .const 'Sub' $P458 = "35_1266337348.54616"
capture_lex $P458
- .const 'Sub' $P432 = "34_1261064016.27984"
+ .const 'Sub' $P432 = "34_1266337348.54616"
capture_lex $P432
new $P422, 'ExceptionHandler'
set_addr $P422, control_421
@@ -8533,10 +8535,10 @@
push_eh $P422
.lex "self", self
.lex "$/", param_423
- if has_param_424, optparam_145
+ if has_param_424, optparam_146
new $P425, "Undef"
set param_424, $P425
- optparam_145:
+ optparam_146:
.lex "$key", param_424
.annotate "line", 42
new $P426, "Undef"
@@ -8546,7 +8548,7 @@
set $S429, $P428
iseq $I430, $S429, "open"
unless $I430, if_427_end
- .const 'Sub' $P432 = "34_1261064016.27984"
+ .const 'Sub' $P432 = "34_1266337348.54616"
capture_lex $P432
$P432()
if_427_end:
@@ -8556,29 +8558,29 @@
find_lex $P443, "$past"
.annotate "line", 43
find_lex $P445, "$/"
- unless_null $P445, vivify_148
+ unless_null $P445, vivify_149
new $P445, "Hash"
- vivify_148:
+ vivify_149:
set $P446, $P445["termish"]
- unless_null $P446, vivify_149
+ unless_null $P446, vivify_150
new $P446, "Undef"
- vivify_149:
+ vivify_150:
set $N447, $P446
isgt $I448, $N447, 1.0
if $I448, if_444
.annotate "line", 50
find_lex $P467, "$/"
- unless_null $P467, vivify_150
+ unless_null $P467, vivify_151
new $P467, "Hash"
- vivify_150:
+ vivify_151:
set $P468, $P467["termish"]
- unless_null $P468, vivify_151
+ unless_null $P468, vivify_152
new $P468, "ResizablePMCArray"
- vivify_151:
+ vivify_152:
set $P469, $P468[0]
- unless_null $P469, vivify_152
+ unless_null $P469, vivify_153
new $P469, "Undef"
- vivify_152:
+ vivify_153:
$P470 = $P469."ast"()
store_lex "$past", $P470
.annotate "line", 49
@@ -8591,15 +8593,15 @@
store_lex "$past", $P451
.annotate "line", 45
find_lex $P453, "$/"
- unless_null $P453, vivify_153
+ unless_null $P453, vivify_154
new $P453, "Hash"
- vivify_153:
+ vivify_154:
set $P454, $P453["termish"]
- unless_null $P454, vivify_154
+ unless_null $P454, vivify_155
new $P454, "Undef"
- vivify_154:
+ vivify_155:
defined $I455, $P454
- unless $I455, for_undef_155
+ unless $I455, for_undef_156
iter $P452, $P454
new $P465, 'ExceptionHandler'
set_addr $P465, loop464_handler
@@ -8609,7 +8611,7 @@
unless $P452, loop464_done
shift $P456, $P452
loop464_redo:
- .const 'Sub' $P458 = "35_1261064016.27984"
+ .const 'Sub' $P458 = "35_1266337348.54616"
capture_lex $P458
$P458($P456)
loop464_next:
@@ -8622,7 +8624,7 @@
eq $P466, 67, loop464_redo
loop464_done:
pop_eh
- for_undef_155:
+ for_undef_156:
if_444_end:
.annotate "line", 52
find_lex $P471, "$/"
@@ -8639,7 +8641,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block431" :anon :subid("34_1261064016.27984") :outer("33_1261064016.27984")
+.sub "_block431" :anon :subid("34_1266337348.54616") :outer("33_1266337348.54616")
.annotate "line", 32
new $P433, "Hash"
.lex "%old", $P433
@@ -8648,13 +8650,13 @@
.lex "%new", $P434
.annotate "line", 32
get_global $P435, "@MODIFIERS"
- unless_null $P435, vivify_146
+ unless_null $P435, vivify_147
new $P435, "ResizablePMCArray"
- vivify_146:
+ vivify_147:
set $P436, $P435[0]
- unless_null $P436, vivify_147
+ unless_null $P436, vivify_148
new $P436, "Undef"
- vivify_147:
+ vivify_148:
store_lex "%old", $P436
.annotate "line", 33
@@ -8679,7 +8681,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block457" :anon :subid("35_1261064016.27984") :outer("33_1261064016.27984")
+.sub "_block457" :anon :subid("35_1266337348.54616") :outer("33_1266337348.54616")
.param pmc param_459
.annotate "line", 45
.lex "$_", param_459
@@ -8694,10 +8696,10 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "termish" :subid("36_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "termish" :subid("36_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_478
.annotate "line", 55
- .const 'Sub' $P491 = "37_1261064016.27984"
+ .const 'Sub' $P491 = "37_1266337348.54616"
capture_lex $P491
new $P477, 'ExceptionHandler'
set_addr $P477, control_476
@@ -8722,15 +8724,15 @@
store_lex "$lastlit", $P484
.annotate "line", 58
find_lex $P486, "$/"
- unless_null $P486, vivify_156
+ unless_null $P486, vivify_157
new $P486, "Hash"
- vivify_156:
+ vivify_157:
set $P487, $P486["noun"]
- unless_null $P487, vivify_157
+ unless_null $P487, vivify_158
new $P487, "Undef"
- vivify_157:
+ vivify_158:
defined $I488, $P487
- unless $I488, for_undef_158
+ unless $I488, for_undef_159
iter $P485, $P487
new $P537, 'ExceptionHandler'
set_addr $P537, loop536_handler
@@ -8740,7 +8742,7 @@
unless $P485, loop536_done
shift $P489, $P485
loop536_redo:
- .const 'Sub' $P491 = "37_1261064016.27984"
+ .const 'Sub' $P491 = "37_1266337348.54616"
capture_lex $P491
$P491($P489)
loop536_next:
@@ -8753,7 +8755,7 @@
eq $P538, 67, loop536_redo
loop536_done:
pop_eh
- for_undef_158:
+ for_undef_159:
.annotate "line", 73
find_lex $P539, "$/"
find_lex $P540, "$past"
@@ -8769,7 +8771,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block490" :anon :subid("37_1261064016.27984") :outer("36_1261064016.27984")
+.sub "_block490" :anon :subid("37_1266337348.54616") :outer("36_1266337348.54616")
.param pmc param_493
.annotate "line", 59
new $P492, "Undef"
@@ -8803,13 +8805,13 @@
.annotate "line", 62
get_hll_global $P509, ["PAST"], "Node"
find_lex $P510, "$ast"
- unless_null $P510, vivify_159
+ unless_null $P510, vivify_160
new $P510, "ResizablePMCArray"
- vivify_159:
+ vivify_160:
set $P511, $P510[0]
- unless_null $P511, vivify_160
+ unless_null $P511, vivify_161
new $P511, "Undef"
- vivify_160:
+ vivify_161:
$P512 = $P509."ACCEPTS"($P511)
isfalse $I513, $P512
new $P501, 'Integer'
@@ -8832,13 +8834,13 @@
.annotate "line", 68
get_hll_global $P529, ["PAST"], "Node"
find_lex $P530, "$ast"
- unless_null $P530, vivify_161
+ unless_null $P530, vivify_162
new $P530, "ResizablePMCArray"
- vivify_161:
+ vivify_162:
set $P531, $P530[0]
- unless_null $P531, vivify_162
+ unless_null $P531, vivify_163
new $P531, "Undef"
- vivify_162:
+ vivify_163:
$P532 = $P529."ACCEPTS"($P531)
isfalse $I533, $P532
new $P524, 'Integer'
@@ -8862,27 +8864,27 @@
if_500:
.annotate "line", 63
find_lex $P514, "$lastlit"
- unless_null $P514, vivify_163
+ unless_null $P514, vivify_164
new $P514, "ResizablePMCArray"
- vivify_163:
+ vivify_164:
set $P515, $P514[0]
- unless_null $P515, vivify_164
+ unless_null $P515, vivify_165
new $P515, "Undef"
- vivify_164:
+ vivify_165:
find_lex $P516, "$ast"
- unless_null $P516, vivify_165
+ unless_null $P516, vivify_166
new $P516, "ResizablePMCArray"
- vivify_165:
+ vivify_166:
set $P517, $P516[0]
- unless_null $P517, vivify_166
+ unless_null $P517, vivify_167
new $P517, "Undef"
- vivify_166:
+ vivify_167:
concat $P518, $P515, $P517
find_lex $P519, "$lastlit"
- unless_null $P519, vivify_167
+ unless_null $P519, vivify_168
new $P519, "ResizablePMCArray"
store_lex "$lastlit", $P519
- vivify_167:
+ vivify_168:
set $P519[0], $P518
.annotate "line", 62
set $P499, $P518
@@ -8896,10 +8898,10 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "quantified_atom" :subid("38_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "quantified_atom" :subid("38_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_546
.annotate "line", 76
- .const 'Sub' $P555 = "39_1261064016.27984"
+ .const 'Sub' $P555 = "39_1266337348.54616"
capture_lex $P555
new $P545, 'ExceptionHandler'
set_addr $P545, control_544
@@ -8911,58 +8913,58 @@
new $P547, "Undef"
.lex "$past", $P547
find_lex $P548, "$/"
- unless_null $P548, vivify_168
+ unless_null $P548, vivify_169
new $P548, "Hash"
- vivify_168:
+ vivify_169:
set $P549, $P548["atom"]
- unless_null $P549, vivify_169
+ unless_null $P549, vivify_170
new $P549, "Undef"
- vivify_169:
+ vivify_170:
$P550 = $P549."ast"()
store_lex "$past", $P550
.annotate "line", 78
find_lex $P552, "$/"
- unless_null $P552, vivify_170
+ unless_null $P552, vivify_171
new $P552, "Hash"
- vivify_170:
+ vivify_171:
set $P553, $P552["quantifier"]
- unless_null $P553, vivify_171
+ unless_null $P553, vivify_172
new $P553, "Undef"
- vivify_171:
+ vivify_172:
if $P553, if_551
.annotate "line", 84
find_lex $P569, "$/"
- unless_null $P569, vivify_172
+ unless_null $P569, vivify_173
new $P569, "Hash"
- vivify_172:
+ vivify_173:
set $P570, $P569["backmod"]
- unless_null $P570, vivify_173
+ unless_null $P570, vivify_174
new $P570, "ResizablePMCArray"
- vivify_173:
+ vivify_174:
set $P571, $P570[0]
- unless_null $P571, vivify_174
+ unless_null $P571, vivify_175
new $P571, "Undef"
- vivify_174:
+ vivify_175:
unless $P571, if_568_end
find_lex $P572, "$past"
find_lex $P573, "$/"
- unless_null $P573, vivify_175
+ unless_null $P573, vivify_176
new $P573, "Hash"
- vivify_175:
+ vivify_176:
set $P574, $P573["backmod"]
- unless_null $P574, vivify_176
+ unless_null $P574, vivify_177
new $P574, "ResizablePMCArray"
- vivify_176:
+ vivify_177:
set $P575, $P574[0]
- unless_null $P575, vivify_177
+ unless_null $P575, vivify_178
new $P575, "Undef"
- vivify_177:
+ vivify_178:
"backmod"($P572, $P575)
if_568_end:
goto if_551_end
if_551:
.annotate "line", 78
- .const 'Sub' $P555 = "39_1261064016.27984"
+ .const 'Sub' $P555 = "39_1266337348.54616"
capture_lex $P555
$P555()
if_551_end:
@@ -8983,17 +8985,17 @@
goto if_578_end
if_578:
get_global $P585, "@MODIFIERS"
- unless_null $P585, vivify_181
+ unless_null $P585, vivify_182
new $P585, "ResizablePMCArray"
- vivify_181:
+ vivify_182:
set $P586, $P585[0]
- unless_null $P586, vivify_182
+ unless_null $P586, vivify_183
new $P586, "Hash"
- vivify_182:
+ vivify_183:
set $P587, $P586["r"]
- unless_null $P587, vivify_183
+ unless_null $P587, vivify_184
new $P587, "Undef"
- vivify_183:
+ vivify_184:
set $P577, $P587
if_578_end:
unless $P577, if_576_end
@@ -9016,7 +9018,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block554" :anon :subid("39_1261064016.27984") :outer("38_1261064016.27984")
+.sub "_block554" :anon :subid("39_1266337348.54616") :outer("38_1266337348.54616")
.annotate "line", 80
new $P556, "Undef"
.lex "$qast", $P556
@@ -9029,17 +9031,17 @@
if_557_end:
.annotate "line", 80
find_lex $P561, "$/"
- unless_null $P561, vivify_178
+ unless_null $P561, vivify_179
new $P561, "Hash"
- vivify_178:
+ vivify_179:
set $P562, $P561["quantifier"]
- unless_null $P562, vivify_179
+ unless_null $P562, vivify_180
new $P562, "ResizablePMCArray"
- vivify_179:
+ vivify_180:
set $P563, $P562[0]
- unless_null $P563, vivify_180
+ unless_null $P563, vivify_181
new $P563, "Undef"
- vivify_180:
+ vivify_181:
$P564 = $P563."ast"()
store_lex "$qast", $P564
.annotate "line", 81
@@ -9055,7 +9057,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "atom" :subid("40_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "atom" :subid("40_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_596
.annotate "line", 91
new $P595, 'ExceptionHandler'
@@ -9071,13 +9073,13 @@
find_lex $P598, "$past"
.annotate "line", 93
find_lex $P600, "$/"
- unless_null $P600, vivify_184
+ unless_null $P600, vivify_185
new $P600, "Hash"
- vivify_184:
+ vivify_185:
set $P601, $P600["metachar"]
- unless_null $P601, vivify_185
+ unless_null $P601, vivify_186
new $P601, "Undef"
- vivify_185:
+ vivify_186:
if $P601, if_599
.annotate "line", 95
get_hll_global $P605, ["PAST"], "Regex"
@@ -9088,17 +9090,17 @@
store_lex "$past", $P609
.annotate "line", 96
get_global $P611, "@MODIFIERS"
- unless_null $P611, vivify_186
+ unless_null $P611, vivify_187
new $P611, "ResizablePMCArray"
- vivify_186:
+ vivify_187:
set $P612, $P611[0]
- unless_null $P612, vivify_187
+ unless_null $P612, vivify_188
new $P612, "Hash"
- vivify_187:
+ vivify_188:
set $P613, $P612["i"]
- unless_null $P613, vivify_188
+ unless_null $P613, vivify_189
new $P613, "Undef"
- vivify_188:
+ vivify_189:
unless $P613, if_610_end
find_lex $P614, "$past"
$P614."subtype"("ignorecase")
@@ -9108,13 +9110,13 @@
if_599:
.annotate "line", 93
find_lex $P602, "$/"
- unless_null $P602, vivify_189
+ unless_null $P602, vivify_190
new $P602, "Hash"
- vivify_189:
+ vivify_190:
set $P603, $P602["metachar"]
- unless_null $P603, vivify_190
+ unless_null $P603, vivify_191
new $P603, "Undef"
- vivify_190:
+ vivify_191:
$P604 = $P603."ast"()
store_lex "$past", $P604
if_599_end:
@@ -9133,7 +9135,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "quantifier:sym<*>" :subid("41_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "quantifier:sym<*>" :subid("41_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_622
.annotate "line", 101
new $P621, 'ExceptionHandler'
@@ -9153,13 +9155,13 @@
find_lex $P627, "$/"
find_lex $P628, "$past"
find_lex $P629, "$/"
- unless_null $P629, vivify_191
+ unless_null $P629, vivify_192
new $P629, "Hash"
- vivify_191:
+ vivify_192:
set $P630, $P629["backmod"]
- unless_null $P630, vivify_192
+ unless_null $P630, vivify_193
new $P630, "Undef"
- vivify_192:
+ vivify_193:
$P631 = "backmod"($P628, $P630)
$P632 = $P627."!make"($P631)
.annotate "line", 101
@@ -9173,7 +9175,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "quantifier:sym<+>" :subid("42_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "quantifier:sym<+>" :subid("42_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_637
.annotate "line", 106
new $P636, 'ExceptionHandler'
@@ -9193,13 +9195,13 @@
find_lex $P642, "$/"
find_lex $P643, "$past"
find_lex $P644, "$/"
- unless_null $P644, vivify_193
+ unless_null $P644, vivify_194
new $P644, "Hash"
- vivify_193:
+ vivify_194:
set $P645, $P644["backmod"]
- unless_null $P645, vivify_194
+ unless_null $P645, vivify_195
new $P645, "Undef"
- vivify_194:
+ vivify_195:
$P646 = "backmod"($P643, $P645)
$P647 = $P642."!make"($P646)
.annotate "line", 106
@@ -9213,7 +9215,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "quantifier:sym<?>" :subid("43_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "quantifier:sym<?>" :subid("43_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_652
.annotate "line", 111
new $P651, 'ExceptionHandler'
@@ -9233,13 +9235,13 @@
find_lex $P657, "$/"
find_lex $P658, "$past"
find_lex $P659, "$/"
- unless_null $P659, vivify_195
+ unless_null $P659, vivify_196
new $P659, "Hash"
- vivify_195:
+ vivify_196:
set $P660, $P659["backmod"]
- unless_null $P660, vivify_196
+ unless_null $P660, vivify_197
new $P660, "Undef"
- vivify_196:
+ vivify_197:
$P661 = "backmod"($P658, $P660)
$P657."!make"($P661)
.annotate "line", 114
@@ -9257,7 +9259,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "quantifier:sym<**>" :subid("44_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "quantifier:sym<**>" :subid("44_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_669
.annotate "line", 117
new $P668, 'ExceptionHandler'
@@ -9273,68 +9275,68 @@
find_lex $P671, "$past"
.annotate "line", 119
find_lex $P673, "$/"
- unless_null $P673, vivify_197
+ unless_null $P673, vivify_198
new $P673, "Hash"
- vivify_197:
+ vivify_198:
set $P674, $P673["quantified_atom"]
- unless_null $P674, vivify_198
+ unless_null $P674, vivify_199
new $P674, "Undef"
- vivify_198:
+ vivify_199:
if $P674, if_672
.annotate "line", 124
get_hll_global $P681, ["PAST"], "Regex"
find_lex $P682, "$/"
- unless_null $P682, vivify_199
+ unless_null $P682, vivify_200
new $P682, "Hash"
- vivify_199:
+ vivify_200:
set $P683, $P682["min"]
- unless_null $P683, vivify_200
+ unless_null $P683, vivify_201
new $P683, "Undef"
- vivify_200:
+ vivify_201:
set $N684, $P683
find_lex $P685, "$/"
$P686 = $P681."new"("quant" :named("pasttype"), $N684 :named("min"), $P685 :named("node"))
store_lex "$past", $P686
.annotate "line", 125
find_lex $P688, "$/"
- unless_null $P688, vivify_201
+ unless_null $P688, vivify_202
new $P688, "Hash"
- vivify_201:
+ vivify_202:
set $P689, $P688["max"]
- unless_null $P689, vivify_202
+ unless_null $P689, vivify_203
new $P689, "Undef"
- vivify_202:
+ vivify_203:
isfalse $I690, $P689
if $I690, if_687
.annotate "line", 126
find_lex $P696, "$/"
- unless_null $P696, vivify_203
+ unless_null $P696, vivify_204
new $P696, "Hash"
- vivify_203:
+ vivify_204:
set $P697, $P696["max"]
- unless_null $P697, vivify_204
+ unless_null $P697, vivify_205
new $P697, "ResizablePMCArray"
- vivify_204:
+ vivify_205:
set $P698, $P697[0]
- unless_null $P698, vivify_205
+ unless_null $P698, vivify_206
new $P698, "Undef"
- vivify_205:
+ vivify_206:
set $S699, $P698
isne $I700, $S699, "*"
unless $I700, if_695_end
find_lex $P701, "$past"
find_lex $P702, "$/"
- unless_null $P702, vivify_206
+ unless_null $P702, vivify_207
new $P702, "Hash"
- vivify_206:
+ vivify_207:
set $P703, $P702["max"]
- unless_null $P703, vivify_207
+ unless_null $P703, vivify_208
new $P703, "ResizablePMCArray"
- vivify_207:
+ vivify_208:
set $P704, $P703[0]
- unless_null $P704, vivify_208
+ unless_null $P704, vivify_209
new $P704, "Undef"
- vivify_208:
+ vivify_209:
set $N705, $P704
$P701."max"($N705)
if_695_end:
@@ -9343,13 +9345,13 @@
.annotate "line", 125
find_lex $P691, "$past"
find_lex $P692, "$/"
- unless_null $P692, vivify_209
+ unless_null $P692, vivify_210
new $P692, "Hash"
- vivify_209:
+ vivify_210:
set $P693, $P692["min"]
- unless_null $P693, vivify_210
+ unless_null $P693, vivify_211
new $P693, "Undef"
- vivify_210:
+ vivify_211:
set $N694, $P693
$P691."max"($N694)
if_687_end:
@@ -9360,13 +9362,13 @@
get_hll_global $P675, ["PAST"], "Regex"
.annotate "line", 121
find_lex $P676, "$/"
- unless_null $P676, vivify_211
+ unless_null $P676, vivify_212
new $P676, "Hash"
- vivify_211:
+ vivify_212:
set $P677, $P676["quantified_atom"]
- unless_null $P677, vivify_212
+ unless_null $P677, vivify_213
new $P677, "Undef"
- vivify_212:
+ vivify_213:
$P678 = $P677."ast"()
find_lex $P679, "$/"
$P680 = $P675."new"("quant" :named("pasttype"), 1 :named("min"), $P678 :named("sep"), $P679 :named("node"))
@@ -9377,13 +9379,13 @@
find_lex $P706, "$/"
find_lex $P707, "$past"
find_lex $P708, "$/"
- unless_null $P708, vivify_213
+ unless_null $P708, vivify_214
new $P708, "Hash"
- vivify_213:
+ vivify_214:
set $P709, $P708["backmod"]
- unless_null $P709, vivify_214
+ unless_null $P709, vivify_215
new $P709, "Undef"
- vivify_214:
+ vivify_215:
$P710 = "backmod"($P707, $P709)
$P711 = $P706."!make"($P710)
.annotate "line", 117
@@ -9397,7 +9399,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "metachar:sym<ws>" :subid("45_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "metachar:sym<ws>" :subid("45_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_716
.annotate "line", 131
new $P715, 'ExceptionHandler'
@@ -9411,17 +9413,17 @@
.lex "$past", $P717
.annotate "line", 133
get_global $P720, "@MODIFIERS"
- unless_null $P720, vivify_215
+ unless_null $P720, vivify_216
new $P720, "ResizablePMCArray"
- vivify_215:
+ vivify_216:
set $P721, $P720[0]
- unless_null $P721, vivify_216
+ unless_null $P721, vivify_217
new $P721, "Hash"
- vivify_216:
+ vivify_217:
set $P722, $P721["s"]
- unless_null $P722, vivify_217
+ unless_null $P722, vivify_218
new $P722, "Undef"
- vivify_217:
+ vivify_218:
if $P722, if_719
new $P726, "Integer"
assign $P726, 0
@@ -9449,7 +9451,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "metachar:sym<[ ]>" :subid("46_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "metachar:sym<[ ]>" :subid("46_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_734
.annotate "line", 140
new $P733, 'ExceptionHandler'
@@ -9461,13 +9463,13 @@
.annotate "line", 141
find_lex $P735, "$/"
find_lex $P736, "$/"
- unless_null $P736, vivify_218
+ unless_null $P736, vivify_219
new $P736, "Hash"
- vivify_218:
+ vivify_219:
set $P737, $P736["nibbler"]
- unless_null $P737, vivify_219
+ unless_null $P737, vivify_220
new $P737, "Undef"
- vivify_219:
+ vivify_220:
$P738 = $P737."ast"()
$P739 = $P735."!make"($P738)
.annotate "line", 140
@@ -9481,7 +9483,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "metachar:sym<( )>" :subid("47_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "metachar:sym<( )>" :subid("47_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_744
.annotate "line", 144
new $P743, 'ExceptionHandler'
@@ -9498,13 +9500,13 @@
.lex "$past", $P746
.annotate "line", 145
find_lex $P747, "$/"
- unless_null $P747, vivify_220
+ unless_null $P747, vivify_221
new $P747, "Hash"
- vivify_220:
+ vivify_221:
set $P748, $P747["nibbler"]
- unless_null $P748, vivify_221
+ unless_null $P748, vivify_222
new $P748, "Undef"
- vivify_221:
+ vivify_222:
$P749 = $P748."ast"()
$P750 = "buildsub"($P749)
store_lex "$subpast", $P750
@@ -9529,7 +9531,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "metachar:sym<'>" :subid("48_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "metachar:sym<'>" :subid("48_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_762
.annotate "line", 151
new $P761, 'ExceptionHandler'
@@ -9546,13 +9548,13 @@
.lex "$past", $P764
.annotate "line", 152
find_lex $P765, "$/"
- unless_null $P765, vivify_222
+ unless_null $P765, vivify_223
new $P765, "Hash"
- vivify_222:
+ vivify_223:
set $P766, $P765["quote_EXPR"]
- unless_null $P766, vivify_223
+ unless_null $P766, vivify_224
new $P766, "Undef"
- vivify_223:
+ vivify_224:
$P767 = $P766."ast"()
store_lex "$quote", $P767
.annotate "line", 153
@@ -9585,7 +9587,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "metachar:sym<\">" :subid("49_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "metachar:sym<\">" :subid("49_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_785
.annotate "line", 158
new $P784, 'ExceptionHandler'
@@ -9602,13 +9604,13 @@
.lex "$past", $P787
.annotate "line", 159
find_lex $P788, "$/"
- unless_null $P788, vivify_224
+ unless_null $P788, vivify_225
new $P788, "Hash"
- vivify_224:
+ vivify_225:
set $P789, $P788["quote_EXPR"]
- unless_null $P789, vivify_225
+ unless_null $P789, vivify_226
new $P789, "Undef"
- vivify_225:
+ vivify_226:
$P790 = $P789."ast"()
store_lex "$quote", $P790
.annotate "line", 160
@@ -9641,7 +9643,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "metachar:sym<.>" :subid("50_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "metachar:sym<.>" :subid("50_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_808
.annotate "line", 165
new $P807, 'ExceptionHandler'
@@ -9672,7 +9674,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "metachar:sym<^>" :subid("51_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "metachar:sym<^>" :subid("51_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_820
.annotate "line", 170
new $P819, 'ExceptionHandler'
@@ -9703,7 +9705,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "metachar:sym<^^>" :subid("52_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "metachar:sym<^^>" :subid("52_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_832
.annotate "line", 175
new $P831, 'ExceptionHandler'
@@ -9734,7 +9736,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "metachar:sym<$>" :subid("53_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "metachar:sym<$>" :subid("53_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_844
.annotate "line", 180
new $P843, 'ExceptionHandler'
@@ -9765,7 +9767,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "metachar:sym<$$>" :subid("54_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "metachar:sym<$$>" :subid("54_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_856
.annotate "line", 185
new $P855, 'ExceptionHandler'
@@ -9796,7 +9798,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "metachar:sym<:::>" :subid("55_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "metachar:sym<:::>" :subid("55_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_868
.annotate "line", 190
new $P867, 'ExceptionHandler'
@@ -9827,7 +9829,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "metachar:sym<lwb>" :subid("56_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "metachar:sym<lwb>" :subid("56_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_880
.annotate "line", 195
new $P879, 'ExceptionHandler'
@@ -9858,7 +9860,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "metachar:sym<rwb>" :subid("57_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "metachar:sym<rwb>" :subid("57_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_892
.annotate "line", 200
new $P891, 'ExceptionHandler'
@@ -9889,7 +9891,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "metachar:sym<bs>" :subid("58_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "metachar:sym<bs>" :subid("58_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_904
.annotate "line", 205
new $P903, 'ExceptionHandler'
@@ -9901,13 +9903,13 @@
.annotate "line", 206
find_lex $P905, "$/"
find_lex $P906, "$/"
- unless_null $P906, vivify_226
+ unless_null $P906, vivify_227
new $P906, "Hash"
- vivify_226:
+ vivify_227:
set $P907, $P906["backslash"]
- unless_null $P907, vivify_227
+ unless_null $P907, vivify_228
new $P907, "Undef"
- vivify_227:
+ vivify_228:
$P908 = $P907."ast"()
$P909 = $P905."!make"($P908)
.annotate "line", 205
@@ -9921,7 +9923,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "metachar:sym<mod>" :subid("59_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "metachar:sym<mod>" :subid("59_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_914
.annotate "line", 209
new $P913, 'ExceptionHandler'
@@ -9933,13 +9935,13 @@
.annotate "line", 210
find_lex $P915, "$/"
find_lex $P916, "$/"
- unless_null $P916, vivify_228
+ unless_null $P916, vivify_229
new $P916, "Hash"
- vivify_228:
+ vivify_229:
set $P917, $P916["mod_internal"]
- unless_null $P917, vivify_229
+ unless_null $P917, vivify_230
new $P917, "Undef"
- vivify_229:
+ vivify_230:
$P918 = $P917."ast"()
$P919 = $P915."!make"($P918)
.annotate "line", 209
@@ -9953,7 +9955,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "metachar:sym<assert>" :subid("60_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "metachar:sym<assert>" :subid("60_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_924
.annotate "line", 213
new $P923, 'ExceptionHandler'
@@ -9965,13 +9967,13 @@
.annotate "line", 214
find_lex $P925, "$/"
find_lex $P926, "$/"
- unless_null $P926, vivify_230
+ unless_null $P926, vivify_231
new $P926, "Hash"
- vivify_230:
+ vivify_231:
set $P927, $P926["assertion"]
- unless_null $P927, vivify_231
+ unless_null $P927, vivify_232
new $P927, "Undef"
- vivify_231:
+ vivify_232:
$P928 = $P927."ast"()
$P929 = $P925."!make"($P928)
.annotate "line", 213
@@ -9985,7 +9987,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "metachar:sym<~>" :subid("61_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "metachar:sym<~>" :subid("61_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_934
.annotate "line", 217
new $P933, 'ExceptionHandler'
@@ -9999,36 +10001,36 @@
get_hll_global $P936, ["PAST"], "Regex"
.annotate "line", 219
find_lex $P937, "$/"
- unless_null $P937, vivify_232
+ unless_null $P937, vivify_233
new $P937, "Hash"
- vivify_232:
+ vivify_233:
set $P938, $P937["EXPR"]
- unless_null $P938, vivify_233
+ unless_null $P938, vivify_234
new $P938, "Undef"
- vivify_233:
+ vivify_234:
$P939 = $P938."ast"()
.annotate "line", 220
get_hll_global $P940, ["PAST"], "Regex"
.annotate "line", 221
find_lex $P941, "$/"
- unless_null $P941, vivify_234
+ unless_null $P941, vivify_235
new $P941, "Hash"
- vivify_234:
+ vivify_235:
set $P942, $P941["GOAL"]
- unless_null $P942, vivify_235
+ unless_null $P942, vivify_236
new $P942, "Undef"
- vivify_235:
+ vivify_236:
$P943 = $P942."ast"()
.annotate "line", 222
get_hll_global $P944, ["PAST"], "Regex"
find_lex $P945, "$/"
- unless_null $P945, vivify_236
+ unless_null $P945, vivify_237
new $P945, "Hash"
- vivify_236:
+ vivify_237:
set $P946, $P945["GOAL"]
- unless_null $P946, vivify_237
+ unless_null $P946, vivify_238
new $P946, "Undef"
- vivify_237:
+ vivify_238:
set $S947, $P946
$P948 = $P944."new"("FAILGOAL", $S947, "subrule" :named("pasttype"), "method" :named("subtype"))
$P949 = $P940."new"($P943, $P948, "alt" :named("pasttype"))
@@ -10047,7 +10049,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "metachar:sym<{*}>" :subid("62_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "metachar:sym<{*}>" :subid("62_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_956
.annotate "line", 230
new $P955, 'ExceptionHandler'
@@ -10061,13 +10063,13 @@
.lex "$past", $P957
.annotate "line", 232
find_lex $P960, "$/"
- unless_null $P960, vivify_238
+ unless_null $P960, vivify_239
new $P960, "Hash"
- vivify_238:
+ vivify_239:
set $P961, $P960["key"]
- unless_null $P961, vivify_239
+ unless_null $P961, vivify_240
new $P961, "Undef"
- vivify_239:
+ vivify_240:
if $P961, if_959
new $P969, "Integer"
assign $P969, 0
@@ -10076,17 +10078,17 @@
if_959:
get_hll_global $P962, ["PAST"], "Regex"
find_lex $P963, "$/"
- unless_null $P963, vivify_240
+ unless_null $P963, vivify_241
new $P963, "Hash"
- vivify_240:
+ vivify_241:
set $P964, $P963["key"]
- unless_null $P964, vivify_241
+ unless_null $P964, vivify_242
new $P964, "ResizablePMCArray"
- vivify_241:
+ vivify_242:
set $P965, $P964[0]
- unless_null $P965, vivify_242
+ unless_null $P965, vivify_243
new $P965, "Undef"
- vivify_242:
+ vivify_243:
set $S966, $P965
find_lex $P967, "$/"
$P968 = $P962."new"($S966, "reduce" :named("pasttype"), $P967 :named("node"))
@@ -10108,7 +10110,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "metachar:sym<var>" :subid("63_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "metachar:sym<var>" :subid("63_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_977
.annotate "line", 237
new $P976, 'ExceptionHandler'
@@ -10127,35 +10129,35 @@
find_lex $P980, "$past"
.annotate "line", 239
find_lex $P983, "$/"
- unless_null $P983, vivify_243
+ unless_null $P983, vivify_244
new $P983, "Hash"
- vivify_243:
+ vivify_244:
set $P984, $P983["pos"]
- unless_null $P984, vivify_244
+ unless_null $P984, vivify_245
new $P984, "Undef"
- vivify_244:
+ vivify_245:
if $P984, if_982
find_lex $P988, "$/"
- unless_null $P988, vivify_245
+ unless_null $P988, vivify_246
new $P988, "Hash"
- vivify_245:
+ vivify_246:
set $P989, $P988["name"]
- unless_null $P989, vivify_246
+ unless_null $P989, vivify_247
new $P989, "Undef"
- vivify_246:
+ vivify_247:
set $S990, $P989
new $P981, 'String'
set $P981, $S990
goto if_982_end
if_982:
find_lex $P985, "$/"
- unless_null $P985, vivify_247
+ unless_null $P985, vivify_248
new $P985, "Hash"
- vivify_247:
+ vivify_248:
set $P986, $P985["pos"]
- unless_null $P986, vivify_248
+ unless_null $P986, vivify_249
new $P986, "Undef"
- vivify_248:
+ vivify_249:
set $N987, $P986
new $P981, 'Float'
set $P981, $N987
@@ -10163,13 +10165,13 @@
store_lex "$name", $P981
.annotate "line", 240
find_lex $P992, "$/"
- unless_null $P992, vivify_249
+ unless_null $P992, vivify_250
new $P992, "Hash"
- vivify_249:
+ vivify_250:
set $P993, $P992["quantified_atom"]
- unless_null $P993, vivify_250
+ unless_null $P993, vivify_251
new $P993, "Undef"
- vivify_250:
+ vivify_251:
if $P993, if_991
.annotate "line", 251
get_hll_global $P1022, ["PAST"], "Regex"
@@ -10182,17 +10184,17 @@
if_991:
.annotate "line", 241
find_lex $P994, "$/"
- unless_null $P994, vivify_251
+ unless_null $P994, vivify_252
new $P994, "Hash"
- vivify_251:
+ vivify_252:
set $P995, $P994["quantified_atom"]
- unless_null $P995, vivify_252
+ unless_null $P995, vivify_253
new $P995, "ResizablePMCArray"
- vivify_252:
+ vivify_253:
set $P996, $P995[0]
- unless_null $P996, vivify_253
+ unless_null $P996, vivify_254
new $P996, "Undef"
- vivify_253:
+ vivify_254:
$P997 = $P996."ast"()
store_lex "$past", $P997
.annotate "line", 242
@@ -10205,13 +10207,13 @@
goto if_1000_end
if_1000:
find_lex $P1004, "$past"
- unless_null $P1004, vivify_254
+ unless_null $P1004, vivify_255
new $P1004, "ResizablePMCArray"
- vivify_254:
+ vivify_255:
set $P1005, $P1004[0]
- unless_null $P1005, vivify_255
+ unless_null $P1005, vivify_256
new $P1005, "Undef"
- vivify_255:
+ vivify_256:
$S1006 = $P1005."pasttype"()
iseq $I1007, $S1006, "subrule"
new $P999, 'Integer'
@@ -10242,13 +10244,13 @@
if_998:
.annotate "line", 243
find_lex $P1008, "$past"
- unless_null $P1008, vivify_256
+ unless_null $P1008, vivify_257
new $P1008, "ResizablePMCArray"
- vivify_256:
+ vivify_257:
set $P1009, $P1008[0]
- unless_null $P1009, vivify_257
+ unless_null $P1009, vivify_258
new $P1009, "Undef"
- vivify_257:
+ vivify_258:
find_lex $P1010, "$name"
"subrule_alias"($P1009, $P1010)
if_998_end:
@@ -10268,7 +10270,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "metachar:sym<PIR>" :subid("64_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "metachar:sym<PIR>" :subid("64_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_1033
.annotate "line", 257
new $P1032, 'ExceptionHandler'
@@ -10283,13 +10285,13 @@
.annotate "line", 259
get_hll_global $P1036, ["PAST"], "Op"
find_lex $P1037, "$/"
- unless_null $P1037, vivify_258
+ unless_null $P1037, vivify_259
new $P1037, "Hash"
- vivify_258:
+ vivify_259:
set $P1038, $P1037["pir"]
- unless_null $P1038, vivify_259
+ unless_null $P1038, vivify_260
new $P1038, "Undef"
- vivify_259:
+ vivify_260:
set $S1039, $P1038
$P1040 = $P1036."new"($S1039 :named("inline"), "inline" :named("pasttype"))
find_lex $P1041, "$/"
@@ -10307,7 +10309,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "backslash:sym<w>" :subid("65_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "backslash:sym<w>" :subid("65_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_1048
.annotate "line", 265
new $P1047, 'ExceptionHandler'
@@ -10324,24 +10326,24 @@
.lex "$past", $P1050
.annotate "line", 266
find_lex $P1053, "$/"
- unless_null $P1053, vivify_260
+ unless_null $P1053, vivify_261
new $P1053, "Hash"
- vivify_260:
+ vivify_261:
set $P1054, $P1053["sym"]
- unless_null $P1054, vivify_261
+ unless_null $P1054, vivify_262
new $P1054, "Undef"
- vivify_261:
+ vivify_262:
set $S1055, $P1054
iseq $I1056, $S1055, "n"
if $I1056, if_1052
find_lex $P1058, "$/"
- unless_null $P1058, vivify_262
+ unless_null $P1058, vivify_263
new $P1058, "Hash"
- vivify_262:
+ vivify_263:
set $P1059, $P1058["sym"]
- unless_null $P1059, vivify_263
+ unless_null $P1059, vivify_264
new $P1059, "Undef"
- vivify_263:
+ vivify_264:
set $S1060, $P1059
new $P1051, 'String'
set $P1051, $S1060
@@ -10373,7 +10375,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "backslash:sym<b>" :subid("66_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "backslash:sym<b>" :subid("66_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_1072
.annotate "line", 271
new $P1071, 'ExceptionHandler'
@@ -10388,13 +10390,13 @@
get_hll_global $P1074, ["PAST"], "Regex"
.annotate "line", 273
find_lex $P1075, "$/"
- unless_null $P1075, vivify_264
+ unless_null $P1075, vivify_265
new $P1075, "Hash"
- vivify_264:
+ vivify_265:
set $P1076, $P1075["sym"]
- unless_null $P1076, vivify_265
+ unless_null $P1076, vivify_266
new $P1076, "Undef"
- vivify_265:
+ vivify_266:
set $S1077, $P1076
iseq $I1078, $S1077, "B"
find_lex $P1079, "$/"
@@ -10416,7 +10418,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "backslash:sym<e>" :subid("67_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "backslash:sym<e>" :subid("67_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_1088
.annotate "line", 277
new $P1087, 'ExceptionHandler'
@@ -10431,13 +10433,13 @@
get_hll_global $P1090, ["PAST"], "Regex"
.annotate "line", 279
find_lex $P1091, "$/"
- unless_null $P1091, vivify_266
+ unless_null $P1091, vivify_267
new $P1091, "Hash"
- vivify_266:
+ vivify_267:
set $P1092, $P1091["sym"]
- unless_null $P1092, vivify_267
+ unless_null $P1092, vivify_268
new $P1092, "Undef"
- vivify_267:
+ vivify_268:
set $S1093, $P1092
iseq $I1094, $S1093, "E"
find_lex $P1095, "$/"
@@ -10459,7 +10461,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "backslash:sym<f>" :subid("68_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "backslash:sym<f>" :subid("68_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_1104
.annotate "line", 283
new $P1103, 'ExceptionHandler'
@@ -10474,13 +10476,13 @@
get_hll_global $P1106, ["PAST"], "Regex"
.annotate "line", 285
find_lex $P1107, "$/"
- unless_null $P1107, vivify_268
+ unless_null $P1107, vivify_269
new $P1107, "Hash"
- vivify_268:
+ vivify_269:
set $P1108, $P1107["sym"]
- unless_null $P1108, vivify_269
+ unless_null $P1108, vivify_270
new $P1108, "Undef"
- vivify_269:
+ vivify_270:
set $S1109, $P1108
iseq $I1110, $S1109, "F"
find_lex $P1111, "$/"
@@ -10502,7 +10504,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "backslash:sym<h>" :subid("69_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "backslash:sym<h>" :subid("69_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_1120
.annotate "line", 289
new $P1119, 'ExceptionHandler'
@@ -10517,13 +10519,13 @@
get_hll_global $P1122, ["PAST"], "Regex"
.annotate "line", 291
find_lex $P1123, "$/"
- unless_null $P1123, vivify_270
+ unless_null $P1123, vivify_271
new $P1123, "Hash"
- vivify_270:
+ vivify_271:
set $P1124, $P1123["sym"]
- unless_null $P1124, vivify_271
+ unless_null $P1124, vivify_272
new $P1124, "Undef"
- vivify_271:
+ vivify_272:
set $S1125, $P1124
iseq $I1126, $S1125, "H"
find_lex $P1127, "$/"
@@ -10545,7 +10547,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "backslash:sym<r>" :subid("70_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "backslash:sym<r>" :subid("70_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_1136
.annotate "line", 295
new $P1135, 'ExceptionHandler'
@@ -10560,13 +10562,13 @@
get_hll_global $P1138, ["PAST"], "Regex"
.annotate "line", 297
find_lex $P1139, "$/"
- unless_null $P1139, vivify_272
+ unless_null $P1139, vivify_273
new $P1139, "Hash"
- vivify_272:
+ vivify_273:
set $P1140, $P1139["sym"]
- unless_null $P1140, vivify_273
+ unless_null $P1140, vivify_274
new $P1140, "Undef"
- vivify_273:
+ vivify_274:
set $S1141, $P1140
iseq $I1142, $S1141, "R"
find_lex $P1143, "$/"
@@ -10588,7 +10590,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "backslash:sym<t>" :subid("71_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "backslash:sym<t>" :subid("71_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_1152
.annotate "line", 301
new $P1151, 'ExceptionHandler'
@@ -10603,13 +10605,13 @@
get_hll_global $P1154, ["PAST"], "Regex"
.annotate "line", 303
find_lex $P1155, "$/"
- unless_null $P1155, vivify_274
+ unless_null $P1155, vivify_275
new $P1155, "Hash"
- vivify_274:
+ vivify_275:
set $P1156, $P1155["sym"]
- unless_null $P1156, vivify_275
+ unless_null $P1156, vivify_276
new $P1156, "Undef"
- vivify_275:
+ vivify_276:
set $S1157, $P1156
iseq $I1158, $S1157, "T"
find_lex $P1159, "$/"
@@ -10631,7 +10633,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "backslash:sym<v>" :subid("72_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "backslash:sym<v>" :subid("72_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_1168
.annotate "line", 307
new $P1167, 'ExceptionHandler'
@@ -10646,13 +10648,13 @@
get_hll_global $P1170, ["PAST"], "Regex"
.annotate "line", 310
find_lex $P1171, "$/"
- unless_null $P1171, vivify_276
+ unless_null $P1171, vivify_277
new $P1171, "Hash"
- vivify_276:
+ vivify_277:
set $P1172, $P1171["sym"]
- unless_null $P1172, vivify_277
+ unless_null $P1172, vivify_278
new $P1172, "Undef"
- vivify_277:
+ vivify_278:
set $S1173, $P1172
iseq $I1174, $S1173, "V"
find_lex $P1175, "$/"
@@ -10674,7 +10676,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "backslash:sym<o>" :subid("73_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "backslash:sym<o>" :subid("73_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_1184
.annotate "line", 314
new $P1183, 'ExceptionHandler'
@@ -10689,29 +10691,29 @@
.annotate "line", 316
get_hll_global $P1186, ["HLL";"Actions"], "ints_to_string"
find_lex $P1189, "$/"
- unless_null $P1189, vivify_278
+ unless_null $P1189, vivify_279
new $P1189, "Hash"
- vivify_278:
+ vivify_279:
set $P1190, $P1189["octint"]
- unless_null $P1190, vivify_279
+ unless_null $P1190, vivify_280
new $P1190, "Undef"
- vivify_279:
+ vivify_280:
unless $P1190, unless_1188
set $P1187, $P1190
goto unless_1188_end
unless_1188:
find_lex $P1191, "$/"
- unless_null $P1191, vivify_280
+ unless_null $P1191, vivify_281
new $P1191, "Hash"
- vivify_280:
+ vivify_281:
set $P1192, $P1191["octints"]
- unless_null $P1192, vivify_281
+ unless_null $P1192, vivify_282
new $P1192, "Hash"
- vivify_281:
+ vivify_282:
set $P1193, $P1192["octint"]
- unless_null $P1193, vivify_282
+ unless_null $P1193, vivify_283
new $P1193, "Undef"
- vivify_282:
+ vivify_283:
set $P1187, $P1193
unless_1188_end:
$P1194 = $P1186($P1187)
@@ -10719,13 +10721,13 @@
.annotate "line", 317
find_lex $P1195, "$/"
find_lex $P1198, "$/"
- unless_null $P1198, vivify_283
+ unless_null $P1198, vivify_284
new $P1198, "Hash"
- vivify_283:
+ vivify_284:
set $P1199, $P1198["sym"]
- unless_null $P1199, vivify_284
+ unless_null $P1199, vivify_285
new $P1199, "Undef"
- vivify_284:
+ vivify_285:
set $S1200, $P1199
iseq $I1201, $S1200, "O"
if $I1201, if_1197
@@ -10757,7 +10759,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "backslash:sym<x>" :subid("74_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "backslash:sym<x>" :subid("74_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_1215
.annotate "line", 323
new $P1214, 'ExceptionHandler'
@@ -10772,29 +10774,29 @@
.annotate "line", 325
get_hll_global $P1217, ["HLL";"Actions"], "ints_to_string"
find_lex $P1220, "$/"
- unless_null $P1220, vivify_285
+ unless_null $P1220, vivify_286
new $P1220, "Hash"
- vivify_285:
+ vivify_286:
set $P1221, $P1220["hexint"]
- unless_null $P1221, vivify_286
+ unless_null $P1221, vivify_287
new $P1221, "Undef"
- vivify_286:
+ vivify_287:
unless $P1221, unless_1219
set $P1218, $P1221
goto unless_1219_end
unless_1219:
find_lex $P1222, "$/"
- unless_null $P1222, vivify_287
+ unless_null $P1222, vivify_288
new $P1222, "Hash"
- vivify_287:
+ vivify_288:
set $P1223, $P1222["hexints"]
- unless_null $P1223, vivify_288
+ unless_null $P1223, vivify_289
new $P1223, "Hash"
- vivify_288:
+ vivify_289:
set $P1224, $P1223["hexint"]
- unless_null $P1224, vivify_289
+ unless_null $P1224, vivify_290
new $P1224, "Undef"
- vivify_289:
+ vivify_290:
set $P1218, $P1224
unless_1219_end:
$P1225 = $P1217($P1218)
@@ -10802,13 +10804,13 @@
.annotate "line", 326
find_lex $P1226, "$/"
find_lex $P1229, "$/"
- unless_null $P1229, vivify_290
+ unless_null $P1229, vivify_291
new $P1229, "Hash"
- vivify_290:
+ vivify_291:
set $P1230, $P1229["sym"]
- unless_null $P1230, vivify_291
+ unless_null $P1230, vivify_292
new $P1230, "Undef"
- vivify_291:
+ vivify_292:
set $S1231, $P1230
iseq $I1232, $S1231, "X"
if $I1232, if_1228
@@ -10840,7 +10842,7 @@
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "backslash:sym<misc>" :subid("75_1261064016.27984") :method :outer("11_1261064016.27984")
+.sub "backslash:sym<c>" :subid("75_1266337348.54616") :method :outer("11_1266337348.54616")
.param pmc param_1246
.annotate "line", 332
new $P1245, 'ExceptionHandler'
@@ -10850,398 +10852,433 @@
.lex "self", self
.lex "$/", param_1246
.annotate "line", 333
- new $P1247, "Undef"
- .lex "$past", $P1247
+ find_lex $P1247, "$/"
get_hll_global $P1248, ["PAST"], "Regex"
find_lex $P1249, "$/"
- set $S1250, $P1249
- find_lex $P1251, "$/"
- $P1252 = $P1248."new"($S1250, "literal" :named("pasttype"), $P1251 :named("node"))
- store_lex "$past", $P1252
-.annotate "line", 334
- find_lex $P1253, "$/"
- find_lex $P1254, "$past"
- $P1255 = $P1253."!make"($P1254)
+ unless_null $P1249, vivify_293
+ new $P1249, "Hash"
+ vivify_293:
+ set $P1250, $P1249["charspec"]
+ unless_null $P1250, vivify_294
+ new $P1250, "Undef"
+ vivify_294:
+ $P1251 = $P1250."ast"()
+ find_lex $P1252, "$/"
+ $P1253 = $P1248."new"($P1251, "literal" :named("pasttype"), $P1252 :named("node"))
+ $P1254 = $P1247."!make"($P1253)
.annotate "line", 332
- .return ($P1255)
+ .return ($P1254)
control_1244:
.local pmc exception
.get_results (exception)
- getattribute $P1256, exception, "payload"
- .return ($P1256)
+ getattribute $P1255, exception, "payload"
+ .return ($P1255)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "assertion:sym<?>" :subid("76_1261064016.27984") :method :outer("11_1261064016.27984")
- .param pmc param_1260
-.annotate "line", 338
- new $P1259, 'ExceptionHandler'
- set_addr $P1259, control_1258
- $P1259."handle_types"(58)
- push_eh $P1259
- .lex "self", self
- .lex "$/", param_1260
-.annotate "line", 339
- new $P1261, "Undef"
- .lex "$past", $P1261
-.annotate "line", 338
- find_lex $P1262, "$past"
-.annotate "line", 340
+.sub "backslash:sym<misc>" :subid("76_1266337348.54616") :method :outer("11_1266337348.54616")
+ .param pmc param_1259
+.annotate "line", 336
+ new $P1258, 'ExceptionHandler'
+ set_addr $P1258, control_1257
+ $P1258."handle_types"(58)
+ push_eh $P1258
+ .lex "self", self
+ .lex "$/", param_1259
+.annotate "line", 337
+ new $P1260, "Undef"
+ .lex "$past", $P1260
+ get_hll_global $P1261, ["PAST"], "Regex"
+ find_lex $P1262, "$/"
+ set $S1263, $P1262
find_lex $P1264, "$/"
- unless_null $P1264, vivify_292
- new $P1264, "Hash"
- vivify_292:
- set $P1265, $P1264["assertion"]
- unless_null $P1265, vivify_293
- new $P1265, "Undef"
- vivify_293:
- if $P1265, if_1263
-.annotate "line", 344
- new $P1270, "Integer"
- assign $P1270, 0
- store_lex "$past", $P1270
- goto if_1263_end
- if_1263:
-.annotate "line", 341
- find_lex $P1266, "$/"
- unless_null $P1266, vivify_294
- new $P1266, "Hash"
- vivify_294:
- set $P1267, $P1266["assertion"]
- unless_null $P1267, vivify_295
- new $P1267, "Undef"
- vivify_295:
- $P1268 = $P1267."ast"()
- store_lex "$past", $P1268
-.annotate "line", 342
- find_lex $P1269, "$past"
- $P1269."subtype"("zerowidth")
- if_1263_end:
-.annotate "line", 345
- find_lex $P1271, "$/"
- find_lex $P1272, "$past"
- $P1273 = $P1271."!make"($P1272)
+ $P1265 = $P1261."new"($S1263, "literal" :named("pasttype"), $P1264 :named("node"))
+ store_lex "$past", $P1265
.annotate "line", 338
- .return ($P1273)
- control_1258:
+ find_lex $P1266, "$/"
+ find_lex $P1267, "$past"
+ $P1268 = $P1266."!make"($P1267)
+.annotate "line", 336
+ .return ($P1268)
+ control_1257:
.local pmc exception
.get_results (exception)
- getattribute $P1274, exception, "payload"
- .return ($P1274)
+ getattribute $P1269, exception, "payload"
+ .return ($P1269)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "assertion:sym<!>" :subid("77_1261064016.27984") :method :outer("11_1261064016.27984")
- .param pmc param_1278
-.annotate "line", 348
- new $P1277, 'ExceptionHandler'
- set_addr $P1277, control_1276
- $P1277."handle_types"(58)
- push_eh $P1277
- .lex "self", self
- .lex "$/", param_1278
-.annotate "line", 349
- new $P1279, "Undef"
- .lex "$past", $P1279
-.annotate "line", 348
- find_lex $P1280, "$past"
-.annotate "line", 350
- find_lex $P1282, "$/"
- unless_null $P1282, vivify_296
- new $P1282, "Hash"
+.sub "assertion:sym<?>" :subid("77_1266337348.54616") :method :outer("11_1266337348.54616")
+ .param pmc param_1273
+.annotate "line", 342
+ new $P1272, 'ExceptionHandler'
+ set_addr $P1272, control_1271
+ $P1272."handle_types"(58)
+ push_eh $P1272
+ .lex "self", self
+ .lex "$/", param_1273
+.annotate "line", 343
+ new $P1274, "Undef"
+ .lex "$past", $P1274
+.annotate "line", 342
+ find_lex $P1275, "$past"
+.annotate "line", 344
+ find_lex $P1277, "$/"
+ unless_null $P1277, vivify_295
+ new $P1277, "Hash"
+ vivify_295:
+ set $P1278, $P1277["assertion"]
+ unless_null $P1278, vivify_296
+ new $P1278, "Undef"
vivify_296:
- set $P1283, $P1282["assertion"]
- unless_null $P1283, vivify_297
- new $P1283, "Undef"
+ if $P1278, if_1276
+.annotate "line", 348
+ new $P1283, "Integer"
+ assign $P1283, 0
+ store_lex "$past", $P1283
+ goto if_1276_end
+ if_1276:
+.annotate "line", 345
+ find_lex $P1279, "$/"
+ unless_null $P1279, vivify_297
+ new $P1279, "Hash"
vivify_297:
- if $P1283, if_1281
-.annotate "line", 356
- get_hll_global $P1292, ["PAST"], "Regex"
- find_lex $P1293, "$/"
- $P1294 = $P1292."new"("anchor" :named("pasttype"), "fail" :named("subtype"), $P1293 :named("node"))
- store_lex "$past", $P1294
-.annotate "line", 355
- goto if_1281_end
- if_1281:
-.annotate "line", 351
- find_lex $P1284, "$/"
- unless_null $P1284, vivify_298
- new $P1284, "Hash"
+ set $P1280, $P1279["assertion"]
+ unless_null $P1280, vivify_298
+ new $P1280, "Undef"
vivify_298:
- set $P1285, $P1284["assertion"]
- unless_null $P1285, vivify_299
- new $P1285, "Undef"
- vivify_299:
- $P1286 = $P1285."ast"()
- store_lex "$past", $P1286
-.annotate "line", 352
- find_lex $P1287, "$past"
- find_lex $P1288, "$past"
- $P1289 = $P1288."negate"()
- isfalse $I1290, $P1289
- $P1287."negate"($I1290)
-.annotate "line", 353
- find_lex $P1291, "$past"
- $P1291."subtype"("zerowidth")
- if_1281_end:
-.annotate "line", 358
- find_lex $P1295, "$/"
- find_lex $P1296, "$past"
- $P1297 = $P1295."!make"($P1296)
-.annotate "line", 348
- .return ($P1297)
- control_1276:
+ $P1281 = $P1280."ast"()
+ store_lex "$past", $P1281
+.annotate "line", 346
+ find_lex $P1282, "$past"
+ $P1282."subtype"("zerowidth")
+ if_1276_end:
+.annotate "line", 349
+ find_lex $P1284, "$/"
+ find_lex $P1285, "$past"
+ $P1286 = $P1284."!make"($P1285)
+.annotate "line", 342
+ .return ($P1286)
+ control_1271:
.local pmc exception
.get_results (exception)
- getattribute $P1298, exception, "payload"
- .return ($P1298)
+ getattribute $P1287, exception, "payload"
+ .return ($P1287)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "assertion:sym<method>" :subid("78_1261064016.27984") :method :outer("11_1261064016.27984")
- .param pmc param_1302
-.annotate "line", 361
- new $P1301, 'ExceptionHandler'
- set_addr $P1301, control_1300
- $P1301."handle_types"(58)
- push_eh $P1301
+.sub "assertion:sym<!>" :subid("78_1266337348.54616") :method :outer("11_1266337348.54616")
+ .param pmc param_1291
+.annotate "line", 352
+ new $P1290, 'ExceptionHandler'
+ set_addr $P1290, control_1289
+ $P1290."handle_types"(58)
+ push_eh $P1290
.lex "self", self
- .lex "$/", param_1302
-.annotate "line", 362
- new $P1303, "Undef"
- .lex "$past", $P1303
- find_lex $P1304, "$/"
- unless_null $P1304, vivify_300
- new $P1304, "Hash"
+ .lex "$/", param_1291
+.annotate "line", 353
+ new $P1292, "Undef"
+ .lex "$past", $P1292
+.annotate "line", 352
+ find_lex $P1293, "$past"
+.annotate "line", 354
+ find_lex $P1295, "$/"
+ unless_null $P1295, vivify_299
+ new $P1295, "Hash"
+ vivify_299:
+ set $P1296, $P1295["assertion"]
+ unless_null $P1296, vivify_300
+ new $P1296, "Undef"
vivify_300:
- set $P1305, $P1304["assertion"]
- unless_null $P1305, vivify_301
- new $P1305, "Undef"
+ if $P1296, if_1294
+.annotate "line", 360
+ get_hll_global $P1305, ["PAST"], "Regex"
+ find_lex $P1306, "$/"
+ $P1307 = $P1305."new"("anchor" :named("pasttype"), "fail" :named("subtype"), $P1306 :named("node"))
+ store_lex "$past", $P1307
+.annotate "line", 359
+ goto if_1294_end
+ if_1294:
+.annotate "line", 355
+ find_lex $P1297, "$/"
+ unless_null $P1297, vivify_301
+ new $P1297, "Hash"
vivify_301:
- $P1306 = $P1305."ast"()
- store_lex "$past", $P1306
-.annotate "line", 363
- find_lex $P1307, "$past"
- $P1307."subtype"("method")
-.annotate "line", 364
- find_lex $P1308, "$past"
- $P1308."name"("")
-.annotate "line", 365
- find_lex $P1309, "$/"
- find_lex $P1310, "$past"
- $P1311 = $P1309."!make"($P1310)
-.annotate "line", 361
- .return ($P1311)
- control_1300:
+ set $P1298, $P1297["assertion"]
+ unless_null $P1298, vivify_302
+ new $P1298, "Undef"
+ vivify_302:
+ $P1299 = $P1298."ast"()
+ store_lex "$past", $P1299
+.annotate "line", 356
+ find_lex $P1300, "$past"
+ find_lex $P1301, "$past"
+ $P1302 = $P1301."negate"()
+ isfalse $I1303, $P1302
+ $P1300."negate"($I1303)
+.annotate "line", 357
+ find_lex $P1304, "$past"
+ $P1304."subtype"("zerowidth")
+ if_1294_end:
+.annotate "line", 362
+ find_lex $P1308, "$/"
+ find_lex $P1309, "$past"
+ $P1310 = $P1308."!make"($P1309)
+.annotate "line", 352
+ .return ($P1310)
+ control_1289:
.local pmc exception
.get_results (exception)
- getattribute $P1312, exception, "payload"
- .return ($P1312)
+ getattribute $P1311, exception, "payload"
+ .return ($P1311)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "assertion:sym<name>" :subid("79_1261064016.27984") :method :outer("11_1261064016.27984")
- .param pmc param_1316
-.annotate "line", 368
- .const 'Sub' $P1374 = "81_1261064016.27984"
- capture_lex $P1374
- .const 'Sub' $P1338 = "80_1261064016.27984"
- capture_lex $P1338
- new $P1315, 'ExceptionHandler'
- set_addr $P1315, control_1314
- $P1315."handle_types"(58)
- push_eh $P1315
- .lex "self", self
- .lex "$/", param_1316
-.annotate "line", 369
- new $P1317, "Undef"
- .lex "$name", $P1317
-.annotate "line", 370
+.sub "assertion:sym<method>" :subid("79_1266337348.54616") :method :outer("11_1266337348.54616")
+ .param pmc param_1315
+.annotate "line", 365
+ new $P1314, 'ExceptionHandler'
+ set_addr $P1314, control_1313
+ $P1314."handle_types"(58)
+ push_eh $P1314
+ .lex "self", self
+ .lex "$/", param_1315
+.annotate "line", 366
+ new $P1316, "Undef"
+ .lex "$past", $P1316
+ find_lex $P1317, "$/"
+ unless_null $P1317, vivify_303
+ new $P1317, "Hash"
+ vivify_303:
+ set $P1318, $P1317["assertion"]
+ unless_null $P1318, vivify_304
new $P1318, "Undef"
- .lex "$past", $P1318
+ vivify_304:
+ $P1319 = $P1318."ast"()
+ store_lex "$past", $P1319
+.annotate "line", 367
+ find_lex $P1320, "$past"
+ $P1320."subtype"("method")
+.annotate "line", 368
+ find_lex $P1321, "$past"
+ $P1321."name"("")
.annotate "line", 369
- find_lex $P1319, "$/"
- unless_null $P1319, vivify_302
- new $P1319, "Hash"
- vivify_302:
- set $P1320, $P1319["longname"]
- unless_null $P1320, vivify_303
- new $P1320, "Undef"
- vivify_303:
- set $S1321, $P1320
- new $P1322, 'String'
- set $P1322, $S1321
- store_lex "$name", $P1322
+ find_lex $P1322, "$/"
find_lex $P1323, "$past"
-.annotate "line", 371
- find_lex $P1325, "$/"
- unless_null $P1325, vivify_304
- new $P1325, "Hash"
- vivify_304:
- set $P1326, $P1325["assertion"]
- unless_null $P1326, vivify_305
- new $P1326, "Undef"
+ $P1324 = $P1322."!make"($P1323)
+.annotate "line", 365
+ .return ($P1324)
+ control_1313:
+ .local pmc exception
+ .get_results (exception)
+ getattribute $P1325, exception, "payload"
+ .return ($P1325)
+.end
+
+
+.namespace ["Regex";"P6Regex";"Actions"]
+.sub "assertion:sym<name>" :subid("80_1266337348.54616") :method :outer("11_1266337348.54616")
+ .param pmc param_1329
+.annotate "line", 372
+ .const 'Sub' $P1387 = "82_1266337348.54616"
+ capture_lex $P1387
+ .const 'Sub' $P1351 = "81_1266337348.54616"
+ capture_lex $P1351
+ new $P1328, 'ExceptionHandler'
+ set_addr $P1328, control_1327
+ $P1328."handle_types"(58)
+ push_eh $P1328
+ .lex "self", self
+ .lex "$/", param_1329
+.annotate "line", 373
+ new $P1330, "Undef"
+ .lex "$name", $P1330
+.annotate "line", 374
+ new $P1331, "Undef"
+ .lex "$past", $P1331
+.annotate "line", 373
+ find_lex $P1332, "$/"
+ unless_null $P1332, vivify_305
+ new $P1332, "Hash"
vivify_305:
- if $P1326, if_1324
-.annotate "line", 375
- find_lex $P1334, "$name"
- set $S1335, $P1334
- iseq $I1336, $S1335, "sym"
- if $I1336, if_1333
-.annotate "line", 391
- get_hll_global $P1348, ["PAST"], "Regex"
- find_lex $P1349, "$name"
- find_lex $P1350, "$name"
- find_lex $P1351, "$/"
- $P1352 = $P1348."new"($P1349, $P1350 :named("name"), "subrule" :named("pasttype"), "capture" :named("subtype"), $P1351 :named("node"))
- store_lex "$past", $P1352
-.annotate "line", 393
- find_lex $P1354, "$/"
- unless_null $P1354, vivify_306
- new $P1354, "Hash"
+ set $P1333, $P1332["longname"]
+ unless_null $P1333, vivify_306
+ new $P1333, "Undef"
vivify_306:
- set $P1355, $P1354["nibbler"]
- unless_null $P1355, vivify_307
- new $P1355, "Undef"
+ set $S1334, $P1333
+ new $P1335, 'String'
+ set $P1335, $S1334
+ store_lex "$name", $P1335
+ find_lex $P1336, "$past"
+.annotate "line", 375
+ find_lex $P1338, "$/"
+ unless_null $P1338, vivify_307
+ new $P1338, "Hash"
vivify_307:
- if $P1355, if_1353
-.annotate "line", 396
- find_lex $P1363, "$/"
- unless_null $P1363, vivify_308
- new $P1363, "Hash"
+ set $P1339, $P1338["assertion"]
+ unless_null $P1339, vivify_308
+ new $P1339, "Undef"
vivify_308:
- set $P1364, $P1363["arglist"]
- unless_null $P1364, vivify_309
- new $P1364, "Undef"
- vivify_309:
- unless $P1364, if_1362_end
+ if $P1339, if_1337
+.annotate "line", 379
+ find_lex $P1347, "$name"
+ set $S1348, $P1347
+ iseq $I1349, $S1348, "sym"
+ if $I1349, if_1346
+.annotate "line", 395
+ get_hll_global $P1361, ["PAST"], "Regex"
+ find_lex $P1362, "$name"
+ find_lex $P1363, "$name"
+ find_lex $P1364, "$/"
+ $P1365 = $P1361."new"($P1362, $P1363 :named("name"), "subrule" :named("pasttype"), "capture" :named("subtype"), $P1364 :named("node"))
+ store_lex "$past", $P1365
.annotate "line", 397
- find_lex $P1366, "$/"
- unless_null $P1366, vivify_310
- new $P1366, "Hash"
+ find_lex $P1367, "$/"
+ unless_null $P1367, vivify_309
+ new $P1367, "Hash"
+ vivify_309:
+ set $P1368, $P1367["nibbler"]
+ unless_null $P1368, vivify_310
+ new $P1368, "Undef"
vivify_310:
- set $P1367, $P1366["arglist"]
- unless_null $P1367, vivify_311
- new $P1367, "ResizablePMCArray"
+ if $P1368, if_1366
+.annotate "line", 400
+ find_lex $P1376, "$/"
+ unless_null $P1376, vivify_311
+ new $P1376, "Hash"
vivify_311:
- set $P1368, $P1367[0]
- unless_null $P1368, vivify_312
- new $P1368, "Undef"
+ set $P1377, $P1376["arglist"]
+ unless_null $P1377, vivify_312
+ new $P1377, "Undef"
vivify_312:
- $P1369 = $P1368."ast"()
- $P1370 = $P1369."list"()
- defined $I1371, $P1370
- unless $I1371, for_undef_313
- iter $P1365, $P1370
- new $P1380, 'ExceptionHandler'
- set_addr $P1380, loop1379_handler
- $P1380."handle_types"(65, 67, 66)
- push_eh $P1380
- loop1379_test:
- unless $P1365, loop1379_done
- shift $P1372, $P1365
- loop1379_redo:
- .const 'Sub' $P1374 = "81_1261064016.27984"
- capture_lex $P1374
- $P1374($P1372)
- loop1379_next:
- goto loop1379_test
- loop1379_handler:
- .local pmc exception
- .get_results (exception)
- getattribute $P1381, exception, 'type'
- eq $P1381, 65, loop1379_next
- eq $P1381, 67, loop1379_redo
- loop1379_done:
- pop_eh
- for_undef_313:
- if_1362_end:
-.annotate "line", 396
- goto if_1353_end
- if_1353:
-.annotate "line", 394
- find_lex $P1356, "$past"
- find_lex $P1357, "$/"
- unless_null $P1357, vivify_314
- new $P1357, "Hash"
+ unless $P1377, if_1375_end
+.annotate "line", 401
+ find_lex $P1379, "$/"
+ unless_null $P1379, vivify_313
+ new $P1379, "Hash"
+ vivify_313:
+ set $P1380, $P1379["arglist"]
+ unless_null $P1380, vivify_314
+ new $P1380, "ResizablePMCArray"
vivify_314:
- set $P1358, $P1357["nibbler"]
- unless_null $P1358, vivify_315
- new $P1358, "ResizablePMCArray"
+ set $P1381, $P1380[0]
+ unless_null $P1381, vivify_315
+ new $P1381, "Undef"
vivify_315:
- set $P1359, $P1358[0]
- unless_null $P1359, vivify_316
- new $P1359, "Undef"
- vivify_316:
- $P1360 = $P1359."ast"()
- $P1361 = "buildsub"($P1360)
- $P1356."push"($P1361)
- if_1353_end:
-.annotate "line", 390
- goto if_1333_end
- if_1333:
-.annotate "line", 375
- .const 'Sub' $P1338 = "80_1261064016.27984"
- capture_lex $P1338
- $P1338()
- if_1333_end:
- goto if_1324_end
- if_1324:
-.annotate "line", 372
- find_lex $P1327, "$/"
- unless_null $P1327, vivify_317
- new $P1327, "Hash"
+ $P1382 = $P1381."ast"()
+ $P1383 = $P1382."list"()
+ defined $I1384, $P1383
+ unless $I1384, for_undef_316
+ iter $P1378, $P1383
+ new $P1393, 'ExceptionHandler'
+ set_addr $P1393, loop1392_handler
+ $P1393."handle_types"(65, 67, 66)
+ push_eh $P1393
+ loop1392_test:
+ unless $P1378, loop1392_done
+ shift $P1385, $P1378
+ loop1392_redo:
+ .const 'Sub' $P1387 = "82_1266337348.54616"
+ capture_lex $P1387
+ $P1387($P1385)
+ loop1392_next:
+ goto loop1392_test
+ loop1392_handler:
+ .local pmc exception
+ .get_results (exception)
+ getattribute $P1394, exception, 'type'
+ eq $P1394, 65, loop1392_next
+ eq $P1394, 67, loop1392_redo
+ loop1392_done:
+ pop_eh
+ for_undef_316:
+ if_1375_end:
+.annotate "line", 400
+ goto if_1366_end
+ if_1366:
+.annotate "line", 398
+ find_lex $P1369, "$past"
+ find_lex $P1370, "$/"
+ unless_null $P1370, vivify_317
+ new $P1370, "Hash"
vivify_317:
- set $P1328, $P1327["assertion"]
- unless_null $P1328, vivify_318
- new $P1328, "ResizablePMCArray"
+ set $P1371, $P1370["nibbler"]
+ unless_null $P1371, vivify_318
+ new $P1371, "ResizablePMCArray"
vivify_318:
- set $P1329, $P1328[0]
- unless_null $P1329, vivify_319
- new $P1329, "Undef"
+ set $P1372, $P1371[0]
+ unless_null $P1372, vivify_319
+ new $P1372, "Undef"
vivify_319:
- $P1330 = $P1329."ast"()
- store_lex "$past", $P1330
-.annotate "line", 373
- find_lex $P1331, "$past"
- find_lex $P1332, "$name"
- "subrule_alias"($P1331, $P1332)
- if_1324_end:
-.annotate "line", 400
- find_lex $P1382, "$/"
- find_lex $P1383, "$past"
- $P1384 = $P1382."!make"($P1383)
-.annotate "line", 368
- .return ($P1384)
- control_1314:
+ $P1373 = $P1372."ast"()
+ $P1374 = "buildsub"($P1373)
+ $P1369."push"($P1374)
+ if_1366_end:
+.annotate "line", 394
+ goto if_1346_end
+ if_1346:
+.annotate "line", 379
+ .const 'Sub' $P1351 = "81_1266337348.54616"
+ capture_lex $P1351
+ $P1351()
+ if_1346_end:
+ goto if_1337_end
+ if_1337:
+.annotate "line", 376
+ find_lex $P1340, "$/"
+ unless_null $P1340, vivify_320
+ new $P1340, "Hash"
+ vivify_320:
+ set $P1341, $P1340["assertion"]
+ unless_null $P1341, vivify_321
+ new $P1341, "ResizablePMCArray"
+ vivify_321:
+ set $P1342, $P1341[0]
+ unless_null $P1342, vivify_322
+ new $P1342, "Undef"
+ vivify_322:
+ $P1343 = $P1342."ast"()
+ store_lex "$past", $P1343
+.annotate "line", 377
+ find_lex $P1344, "$past"
+ find_lex $P1345, "$name"
+ "subrule_alias"($P1344, $P1345)
+ if_1337_end:
+.annotate "line", 404
+ find_lex $P1395, "$/"
+ find_lex $P1396, "$past"
+ $P1397 = $P1395."!make"($P1396)
+.annotate "line", 372
+ .return ($P1397)
+ control_1327:
.local pmc exception
.get_results (exception)
- getattribute $P1385, exception, "payload"
- .return ($P1385)
+ getattribute $P1398, exception, "payload"
+ .return ($P1398)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block1373" :anon :subid("81_1261064016.27984") :outer("79_1261064016.27984")
- .param pmc param_1375
-.annotate "line", 397
- .lex "$_", param_1375
- find_lex $P1376, "$past"
- find_lex $P1377, "$_"
- $P1378 = $P1376."push"($P1377)
- .return ($P1378)
+.sub "_block1386" :anon :subid("82_1266337348.54616") :outer("80_1266337348.54616")
+ .param pmc param_1388
+.annotate "line", 401
+ .lex "$_", param_1388
+ find_lex $P1389, "$past"
+ find_lex $P1390, "$_"
+ $P1391 = $P1389."push"($P1390)
+ .return ($P1391)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block1337" :anon :subid("80_1261064016.27984") :outer("79_1261064016.27984")
-.annotate "line", 376
- new $P1339, "Undef"
- .lex "$regexsym", $P1339
+.sub "_block1350" :anon :subid("81_1266337348.54616") :outer("80_1266337348.54616")
+.annotate "line", 380
+ new $P1352, "Undef"
+ .lex "$regexsym", $P1352
$P0 = get_global '$REGEXNAME'
$S0 = $P0
@@ -11249,388 +11286,388 @@
add $I0, 5
$S0 = substr $S0, $I0
chopn $S0, 1
- $P1340 = box $S0
+ $P1353 = box $S0
- store_lex "$regexsym", $P1340
-.annotate "line", 385
- get_hll_global $P1341, ["PAST"], "Regex"
-.annotate "line", 386
- get_hll_global $P1342, ["PAST"], "Regex"
- find_lex $P1343, "$regexsym"
- $P1344 = $P1342."new"($P1343, "literal" :named("pasttype"))
- find_lex $P1345, "$name"
- find_lex $P1346, "$/"
- $P1347 = $P1341."new"($P1344, $P1345 :named("name"), "subcapture" :named("pasttype"), $P1346 :named("node"))
-.annotate "line", 385
- store_lex "$past", $P1347
-.annotate "line", 375
- .return ($P1347)
+ store_lex "$regexsym", $P1353
+.annotate "line", 389
+ get_hll_global $P1354, ["PAST"], "Regex"
+.annotate "line", 390
+ get_hll_global $P1355, ["PAST"], "Regex"
+ find_lex $P1356, "$regexsym"
+ $P1357 = $P1355."new"($P1356, "literal" :named("pasttype"))
+ find_lex $P1358, "$name"
+ find_lex $P1359, "$/"
+ $P1360 = $P1354."new"($P1357, $P1358 :named("name"), "subcapture" :named("pasttype"), $P1359 :named("node"))
+.annotate "line", 389
+ store_lex "$past", $P1360
+.annotate "line", 379
+ .return ($P1360)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "assertion:sym<[>" :subid("82_1261064016.27984") :method :outer("11_1261064016.27984")
- .param pmc param_1389
-.annotate "line", 403
- .const 'Sub' $P1424 = "83_1261064016.27984"
- capture_lex $P1424
- new $P1388, 'ExceptionHandler'
- set_addr $P1388, control_1387
- $P1388."handle_types"(58)
- push_eh $P1388
- .lex "self", self
- .lex "$/", param_1389
-.annotate "line", 404
- new $P1390, "Undef"
- .lex "$clist", $P1390
-.annotate "line", 405
- new $P1391, "Undef"
- .lex "$past", $P1391
-.annotate "line", 414
- new $P1392, "Undef"
- .lex "$i", $P1392
-.annotate "line", 415
- new $P1393, "Undef"
- .lex "$n", $P1393
-.annotate "line", 404
- find_lex $P1394, "$/"
- unless_null $P1394, vivify_320
- new $P1394, "Hash"
- vivify_320:
- set $P1395, $P1394["cclass_elem"]
- unless_null $P1395, vivify_321
- new $P1395, "Undef"
- vivify_321:
- store_lex "$clist", $P1395
-.annotate "line", 405
- find_lex $P1396, "$clist"
- unless_null $P1396, vivify_322
- new $P1396, "ResizablePMCArray"
- vivify_322:
- set $P1397, $P1396[0]
- unless_null $P1397, vivify_323
- new $P1397, "Undef"
- vivify_323:
- $P1398 = $P1397."ast"()
- store_lex "$past", $P1398
-.annotate "line", 406
- find_lex $P1402, "$past"
- $P1403 = $P1402."negate"()
- if $P1403, if_1401
- set $P1400, $P1403
- goto if_1401_end
- if_1401:
- find_lex $P1404, "$past"
- $S1405 = $P1404."pasttype"()
- iseq $I1406, $S1405, "subrule"
- new $P1400, 'Integer'
- set $P1400, $I1406
- if_1401_end:
- unless $P1400, if_1399_end
+.sub "assertion:sym<[>" :subid("83_1266337348.54616") :method :outer("11_1266337348.54616")
+ .param pmc param_1402
.annotate "line", 407
- find_lex $P1407, "$past"
- $P1407."subtype"("zerowidth")
+ .const 'Sub' $P1437 = "84_1266337348.54616"
+ capture_lex $P1437
+ new $P1401, 'ExceptionHandler'
+ set_addr $P1401, control_1400
+ $P1401."handle_types"(58)
+ push_eh $P1401
+ .lex "self", self
+ .lex "$/", param_1402
.annotate "line", 408
- get_hll_global $P1408, ["PAST"], "Regex"
- find_lex $P1409, "$past"
-.annotate "line", 410
- get_hll_global $P1410, ["PAST"], "Regex"
- $P1411 = $P1410."new"("charclass" :named("pasttype"), "." :named("subtype"))
- find_lex $P1412, "$/"
- $P1413 = $P1408."new"($P1409, $P1411, $P1412 :named("node"))
+ new $P1403, "Undef"
+ .lex "$clist", $P1403
+.annotate "line", 409
+ new $P1404, "Undef"
+ .lex "$past", $P1404
+.annotate "line", 418
+ new $P1405, "Undef"
+ .lex "$i", $P1405
+.annotate "line", 419
+ new $P1406, "Undef"
+ .lex "$n", $P1406
.annotate "line", 408
- store_lex "$past", $P1413
- if_1399_end:
+ find_lex $P1407, "$/"
+ unless_null $P1407, vivify_323
+ new $P1407, "Hash"
+ vivify_323:
+ set $P1408, $P1407["cclass_elem"]
+ unless_null $P1408, vivify_324
+ new $P1408, "Undef"
+ vivify_324:
+ store_lex "$clist", $P1408
+.annotate "line", 409
+ find_lex $P1409, "$clist"
+ unless_null $P1409, vivify_325
+ new $P1409, "ResizablePMCArray"
+ vivify_325:
+ set $P1410, $P1409[0]
+ unless_null $P1410, vivify_326
+ new $P1410, "Undef"
+ vivify_326:
+ $P1411 = $P1410."ast"()
+ store_lex "$past", $P1411
+.annotate "line", 410
+ find_lex $P1415, "$past"
+ $P1416 = $P1415."negate"()
+ if $P1416, if_1414
+ set $P1413, $P1416
+ goto if_1414_end
+ if_1414:
+ find_lex $P1417, "$past"
+ $S1418 = $P1417."pasttype"()
+ iseq $I1419, $S1418, "subrule"
+ new $P1413, 'Integer'
+ set $P1413, $I1419
+ if_1414_end:
+ unless $P1413, if_1412_end
+.annotate "line", 411
+ find_lex $P1420, "$past"
+ $P1420."subtype"("zerowidth")
+.annotate "line", 412
+ get_hll_global $P1421, ["PAST"], "Regex"
+ find_lex $P1422, "$past"
.annotate "line", 414
- new $P1414, "Integer"
- assign $P1414, 1
- store_lex "$i", $P1414
-.annotate "line", 415
- find_lex $P1415, "$clist"
- set $N1416, $P1415
- new $P1417, 'Float'
- set $P1417, $N1416
- store_lex "$n", $P1417
-.annotate "line", 416
- new $P1448, 'ExceptionHandler'
- set_addr $P1448, loop1447_handler
- $P1448."handle_types"(65, 67, 66)
- push_eh $P1448
- loop1447_test:
- find_lex $P1418, "$i"
- set $N1419, $P1418
- find_lex $P1420, "$n"
- set $N1421, $P1420
- islt $I1422, $N1419, $N1421
- unless $I1422, loop1447_done
- loop1447_redo:
- .const 'Sub' $P1424 = "83_1261064016.27984"
- capture_lex $P1424
- $P1424()
- loop1447_next:
- goto loop1447_test
- loop1447_handler:
- .local pmc exception
- .get_results (exception)
- getattribute $P1449, exception, 'type'
- eq $P1449, 65, loop1447_next
- eq $P1449, 67, loop1447_redo
- loop1447_done:
+ get_hll_global $P1423, ["PAST"], "Regex"
+ $P1424 = $P1423."new"("charclass" :named("pasttype"), "." :named("subtype"))
+ find_lex $P1425, "$/"
+ $P1426 = $P1421."new"($P1422, $P1424, $P1425 :named("node"))
+.annotate "line", 412
+ store_lex "$past", $P1426
+ if_1412_end:
+.annotate "line", 418
+ new $P1427, "Integer"
+ assign $P1427, 1
+ store_lex "$i", $P1427
+.annotate "line", 419
+ find_lex $P1428, "$clist"
+ set $N1429, $P1428
+ new $P1430, 'Float'
+ set $P1430, $N1429
+ store_lex "$n", $P1430
+.annotate "line", 420
+ new $P1461, 'ExceptionHandler'
+ set_addr $P1461, loop1460_handler
+ $P1461."handle_types"(65, 67, 66)
+ push_eh $P1461
+ loop1460_test:
+ find_lex $P1431, "$i"
+ set $N1432, $P1431
+ find_lex $P1433, "$n"
+ set $N1434, $P1433
+ islt $I1435, $N1432, $N1434
+ unless $I1435, loop1460_done
+ loop1460_redo:
+ .const 'Sub' $P1437 = "84_1266337348.54616"
+ capture_lex $P1437
+ $P1437()
+ loop1460_next:
+ goto loop1460_test
+ loop1460_handler:
+ .local pmc exception
+ .get_results (exception)
+ getattribute $P1462, exception, 'type'
+ eq $P1462, 65, loop1460_next
+ eq $P1462, 67, loop1460_redo
+ loop1460_done:
pop_eh
-.annotate "line", 427
- find_lex $P1450, "$/"
- find_lex $P1451, "$past"
- $P1452 = $P1450."!make"($P1451)
-.annotate "line", 403
- .return ($P1452)
- control_1387:
+.annotate "line", 431
+ find_lex $P1463, "$/"
+ find_lex $P1464, "$past"
+ $P1465 = $P1463."!make"($P1464)
+.annotate "line", 407
+ .return ($P1465)
+ control_1400:
.local pmc exception
.get_results (exception)
- getattribute $P1453, exception, "payload"
- .return ($P1453)
+ getattribute $P1466, exception, "payload"
+ .return ($P1466)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block1423" :anon :subid("83_1261064016.27984") :outer("82_1261064016.27984")
-.annotate "line", 417
- new $P1425, "Undef"
- .lex "$ast", $P1425
- find_lex $P1426, "$i"
- set $I1427, $P1426
- find_lex $P1428, "$clist"
- unless_null $P1428, vivify_324
- new $P1428, "ResizablePMCArray"
- vivify_324:
- set $P1429, $P1428[$I1427]
- unless_null $P1429, vivify_325
- new $P1429, "Undef"
- vivify_325:
- $P1430 = $P1429."ast"()
- store_lex "$ast", $P1430
-.annotate "line", 418
- find_lex $P1432, "$ast"
- $P1433 = $P1432."negate"()
- if $P1433, if_1431
-.annotate "line", 423
- get_hll_global $P1440, ["PAST"], "Regex"
- find_lex $P1441, "$past"
- find_lex $P1442, "$ast"
- find_lex $P1443, "$/"
- $P1444 = $P1440."new"($P1441, $P1442, "alt" :named("pasttype"), $P1443 :named("node"))
- store_lex "$past", $P1444
+.sub "_block1436" :anon :subid("84_1266337348.54616") :outer("83_1266337348.54616")
+.annotate "line", 421
+ new $P1438, "Undef"
+ .lex "$ast", $P1438
+ find_lex $P1439, "$i"
+ set $I1440, $P1439
+ find_lex $P1441, "$clist"
+ unless_null $P1441, vivify_327
+ new $P1441, "ResizablePMCArray"
+ vivify_327:
+ set $P1442, $P1441[$I1440]
+ unless_null $P1442, vivify_328
+ new $P1442, "Undef"
+ vivify_328:
+ $P1443 = $P1442."ast"()
+ store_lex "$ast", $P1443
.annotate "line", 422
- goto if_1431_end
- if_1431:
-.annotate "line", 419
- find_lex $P1434, "$ast"
- $P1434."subtype"("zerowidth")
+ find_lex $P1445, "$ast"
+ $P1446 = $P1445."negate"()
+ if $P1446, if_1444
+.annotate "line", 427
+ get_hll_global $P1453, ["PAST"], "Regex"
+ find_lex $P1454, "$past"
+ find_lex $P1455, "$ast"
+ find_lex $P1456, "$/"
+ $P1457 = $P1453."new"($P1454, $P1455, "alt" :named("pasttype"), $P1456 :named("node"))
+ store_lex "$past", $P1457
+.annotate "line", 426
+ goto if_1444_end
+ if_1444:
+.annotate "line", 423
+ find_lex $P1447, "$ast"
+ $P1447."subtype"("zerowidth")
+.annotate "line", 424
+ get_hll_global $P1448, ["PAST"], "Regex"
+ find_lex $P1449, "$ast"
+ find_lex $P1450, "$past"
+ find_lex $P1451, "$/"
+ $P1452 = $P1448."new"($P1449, $P1450, "concat" :named("pasttype"), $P1451 :named("node"))
+ store_lex "$past", $P1452
+ if_1444_end:
+.annotate "line", 429
+ find_lex $P1458, "$i"
+ add $P1459, $P1458, 1
+ store_lex "$i", $P1459
.annotate "line", 420
- get_hll_global $P1435, ["PAST"], "Regex"
- find_lex $P1436, "$ast"
- find_lex $P1437, "$past"
- find_lex $P1438, "$/"
- $P1439 = $P1435."new"($P1436, $P1437, "concat" :named("pasttype"), $P1438 :named("node"))
- store_lex "$past", $P1439
- if_1431_end:
-.annotate "line", 425
- find_lex $P1445, "$i"
- add $P1446, $P1445, 1
- store_lex "$i", $P1446
-.annotate "line", 416
- .return ($P1446)
+ .return ($P1459)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "cclass_elem" :subid("84_1261064016.27984") :method :outer("11_1261064016.27984")
- .param pmc param_1457
-.annotate "line", 430
- .const 'Sub' $P1482 = "86_1261064016.27984"
- capture_lex $P1482
- .const 'Sub' $P1466 = "85_1261064016.27984"
- capture_lex $P1466
- new $P1456, 'ExceptionHandler'
- set_addr $P1456, control_1455
- $P1456."handle_types"(58)
- push_eh $P1456
+.sub "cclass_elem" :subid("85_1266337348.54616") :method :outer("11_1266337348.54616")
+ .param pmc param_1470
+.annotate "line", 434
+ .const 'Sub' $P1495 = "87_1266337348.54616"
+ capture_lex $P1495
+ .const 'Sub' $P1479 = "86_1266337348.54616"
+ capture_lex $P1479
+ new $P1469, 'ExceptionHandler'
+ set_addr $P1469, control_1468
+ $P1469."handle_types"(58)
+ push_eh $P1469
.lex "self", self
- .lex "$/", param_1457
-.annotate "line", 431
- new $P1458, "Undef"
- .lex "$str", $P1458
-.annotate "line", 432
- new $P1459, "Undef"
- .lex "$past", $P1459
-.annotate "line", 431
- new $P1460, "String"
- assign $P1460, ""
- store_lex "$str", $P1460
- find_lex $P1461, "$past"
-.annotate "line", 433
- find_lex $P1463, "$/"
- unless_null $P1463, vivify_326
- new $P1463, "Hash"
- vivify_326:
- set $P1464, $P1463["name"]
- unless_null $P1464, vivify_327
- new $P1464, "Undef"
- vivify_327:
- if $P1464, if_1462
+ .lex "$/", param_1470
+.annotate "line", 435
+ new $P1471, "Undef"
+ .lex "$str", $P1471
+.annotate "line", 436
+ new $P1472, "Undef"
+ .lex "$past", $P1472
+.annotate "line", 435
+ new $P1473, "String"
+ assign $P1473, ""
+ store_lex "$str", $P1473
+ find_lex $P1474, "$past"
.annotate "line", 437
- find_lex $P1477, "$/"
- unless_null $P1477, vivify_328
- new $P1477, "Hash"
- vivify_328:
- set $P1478, $P1477["charspec"]
- unless_null $P1478, vivify_329
- new $P1478, "Undef"
+ find_lex $P1476, "$/"
+ unless_null $P1476, vivify_329
+ new $P1476, "Hash"
vivify_329:
- defined $I1479, $P1478
- unless $I1479, for_undef_330
- iter $P1476, $P1478
- new $P1508, 'ExceptionHandler'
- set_addr $P1508, loop1507_handler
- $P1508."handle_types"(65, 67, 66)
- push_eh $P1508
- loop1507_test:
- unless $P1476, loop1507_done
- shift $P1480, $P1476
- loop1507_redo:
- .const 'Sub' $P1482 = "86_1261064016.27984"
- capture_lex $P1482
- $P1482($P1480)
- loop1507_next:
- goto loop1507_test
- loop1507_handler:
- .local pmc exception
- .get_results (exception)
- getattribute $P1509, exception, 'type'
- eq $P1509, 65, loop1507_next
- eq $P1509, 67, loop1507_redo
- loop1507_done:
+ set $P1477, $P1476["name"]
+ unless_null $P1477, vivify_330
+ new $P1477, "Undef"
+ vivify_330:
+ if $P1477, if_1475
+.annotate "line", 441
+ find_lex $P1490, "$/"
+ unless_null $P1490, vivify_331
+ new $P1490, "Hash"
+ vivify_331:
+ set $P1491, $P1490["charspec"]
+ unless_null $P1491, vivify_332
+ new $P1491, "Undef"
+ vivify_332:
+ defined $I1492, $P1491
+ unless $I1492, for_undef_333
+ iter $P1489, $P1491
+ new $P1521, 'ExceptionHandler'
+ set_addr $P1521, loop1520_handler
+ $P1521."handle_types"(65, 67, 66)
+ push_eh $P1521
+ loop1520_test:
+ unless $P1489, loop1520_done
+ shift $P1493, $P1489
+ loop1520_redo:
+ .const 'Sub' $P1495 = "87_1266337348.54616"
+ capture_lex $P1495
+ $P1495($P1493)
+ loop1520_next:
+ goto loop1520_test
+ loop1520_handler:
+ .local pmc exception
+ .get_results (exception)
+ getattribute $P1522, exception, 'type'
+ eq $P1522, 65, loop1520_next
+ eq $P1522, 67, loop1520_redo
+ loop1520_done:
pop_eh
- for_undef_330:
-.annotate "line", 462
- get_hll_global $P1510, ["PAST"], "Regex"
- find_lex $P1511, "$str"
- find_lex $P1512, "$/"
- $P1513 = $P1510."new"($P1511, "enumcharlist" :named("pasttype"), $P1512 :named("node"))
- store_lex "$past", $P1513
-.annotate "line", 436
- goto if_1462_end
- if_1462:
-.annotate "line", 433
- .const 'Sub' $P1466 = "85_1261064016.27984"
- capture_lex $P1466
- $P1466()
- if_1462_end:
-.annotate "line", 464
- find_lex $P1514, "$past"
- find_lex $P1515, "$/"
- unless_null $P1515, vivify_342
- new $P1515, "Hash"
- vivify_342:
- set $P1516, $P1515["sign"]
- unless_null $P1516, vivify_343
- new $P1516, "Undef"
- vivify_343:
- set $S1517, $P1516
- iseq $I1518, $S1517, "-"
- $P1514."negate"($I1518)
-.annotate "line", 465
- find_lex $P1519, "$/"
- find_lex $P1520, "$past"
- $P1521 = $P1519."!make"($P1520)
-.annotate "line", 430
- .return ($P1521)
- control_1455:
+ for_undef_333:
+.annotate "line", 466
+ get_hll_global $P1523, ["PAST"], "Regex"
+ find_lex $P1524, "$str"
+ find_lex $P1525, "$/"
+ $P1526 = $P1523."new"($P1524, "enumcharlist" :named("pasttype"), $P1525 :named("node"))
+ store_lex "$past", $P1526
+.annotate "line", 440
+ goto if_1475_end
+ if_1475:
+.annotate "line", 437
+ .const 'Sub' $P1479 = "86_1266337348.54616"
+ capture_lex $P1479
+ $P1479()
+ if_1475_end:
+.annotate "line", 468
+ find_lex $P1527, "$past"
+ find_lex $P1528, "$/"
+ unless_null $P1528, vivify_345
+ new $P1528, "Hash"
+ vivify_345:
+ set $P1529, $P1528["sign"]
+ unless_null $P1529, vivify_346
+ new $P1529, "Undef"
+ vivify_346:
+ set $S1530, $P1529
+ iseq $I1531, $S1530, "-"
+ $P1527."negate"($I1531)
+.annotate "line", 469
+ find_lex $P1532, "$/"
+ find_lex $P1533, "$past"
+ $P1534 = $P1532."!make"($P1533)
+.annotate "line", 434
+ .return ($P1534)
+ control_1468:
.local pmc exception
.get_results (exception)
- getattribute $P1522, exception, "payload"
- .return ($P1522)
+ getattribute $P1535, exception, "payload"
+ .return ($P1535)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block1481" :anon :subid("86_1261064016.27984") :outer("84_1261064016.27984")
- .param pmc param_1483
-.annotate "line", 437
- .const 'Sub' $P1489 = "87_1261064016.27984"
- capture_lex $P1489
- .lex "$_", param_1483
-.annotate "line", 438
- find_lex $P1486, "$_"
- unless_null $P1486, vivify_331
- new $P1486, "ResizablePMCArray"
- vivify_331:
- set $P1487, $P1486[1]
- unless_null $P1487, vivify_332
- new $P1487, "Undef"
- vivify_332:
- if $P1487, if_1485
-.annotate "line", 460
- find_lex $P1503, "$str"
- find_lex $P1504, "$_"
- unless_null $P1504, vivify_333
- new $P1504, "ResizablePMCArray"
- vivify_333:
- set $P1505, $P1504[0]
- unless_null $P1505, vivify_334
- new $P1505, "Undef"
+.sub "_block1494" :anon :subid("87_1266337348.54616") :outer("85_1266337348.54616")
+ .param pmc param_1496
+.annotate "line", 441
+ .const 'Sub' $P1502 = "88_1266337348.54616"
+ capture_lex $P1502
+ .lex "$_", param_1496
+.annotate "line", 442
+ find_lex $P1499, "$_"
+ unless_null $P1499, vivify_334
+ new $P1499, "ResizablePMCArray"
vivify_334:
- concat $P1506, $P1503, $P1505
- store_lex "$str", $P1506
- set $P1484, $P1506
-.annotate "line", 438
- goto if_1485_end
- if_1485:
- .const 'Sub' $P1489 = "87_1261064016.27984"
- capture_lex $P1489
- $P1502 = $P1489()
- set $P1484, $P1502
- if_1485_end:
-.annotate "line", 437
- .return ($P1484)
+ set $P1500, $P1499[1]
+ unless_null $P1500, vivify_335
+ new $P1500, "Undef"
+ vivify_335:
+ if $P1500, if_1498
+.annotate "line", 464
+ find_lex $P1516, "$str"
+ find_lex $P1517, "$_"
+ unless_null $P1517, vivify_336
+ new $P1517, "ResizablePMCArray"
+ vivify_336:
+ set $P1518, $P1517[0]
+ unless_null $P1518, vivify_337
+ new $P1518, "Undef"
+ vivify_337:
+ concat $P1519, $P1516, $P1518
+ store_lex "$str", $P1519
+ set $P1497, $P1519
+.annotate "line", 442
+ goto if_1498_end
+ if_1498:
+ .const 'Sub' $P1502 = "88_1266337348.54616"
+ capture_lex $P1502
+ $P1515 = $P1502()
+ set $P1497, $P1515
+ if_1498_end:
+.annotate "line", 441
+ .return ($P1497)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block1488" :anon :subid("87_1261064016.27984") :outer("86_1261064016.27984")
-.annotate "line", 439
- new $P1490, "Undef"
- .lex "$a", $P1490
-.annotate "line", 440
- new $P1491, "Undef"
- .lex "$b", $P1491
-.annotate "line", 441
- new $P1492, "Undef"
- .lex "$c", $P1492
-.annotate "line", 439
- find_lex $P1493, "$_"
- unless_null $P1493, vivify_335
- new $P1493, "ResizablePMCArray"
- vivify_335:
- set $P1494, $P1493[0]
- unless_null $P1494, vivify_336
- new $P1494, "Undef"
- vivify_336:
- store_lex "$a", $P1494
-.annotate "line", 440
- find_lex $P1495, "$_"
- unless_null $P1495, vivify_337
- new $P1495, "ResizablePMCArray"
- vivify_337:
- set $P1496, $P1495[1]
- unless_null $P1496, vivify_338
- new $P1496, "ResizablePMCArray"
+.sub "_block1501" :anon :subid("88_1266337348.54616") :outer("87_1266337348.54616")
+.annotate "line", 443
+ new $P1503, "Undef"
+ .lex "$a", $P1503
+.annotate "line", 444
+ new $P1504, "Undef"
+ .lex "$b", $P1504
+.annotate "line", 445
+ new $P1505, "Undef"
+ .lex "$c", $P1505
+.annotate "line", 443
+ find_lex $P1506, "$_"
+ unless_null $P1506, vivify_338
+ new $P1506, "ResizablePMCArray"
vivify_338:
- set $P1497, $P1496[0]
- unless_null $P1497, vivify_339
- new $P1497, "Undef"
+ set $P1507, $P1506[0]
+ unless_null $P1507, vivify_339
+ new $P1507, "Undef"
vivify_339:
- store_lex "$b", $P1497
-.annotate "line", 441
+ store_lex "$a", $P1507
+.annotate "line", 444
+ find_lex $P1508, "$_"
+ unless_null $P1508, vivify_340
+ new $P1508, "ResizablePMCArray"
+ vivify_340:
+ set $P1509, $P1508[1]
+ unless_null $P1509, vivify_341
+ new $P1509, "ResizablePMCArray"
+ vivify_341:
+ set $P1510, $P1509[0]
+ unless_null $P1510, vivify_342
+ new $P1510, "Undef"
+ vivify_342:
+ store_lex "$b", $P1510
+.annotate "line", 445
$P0 = find_lex '$a'
$S0 = $P0
@@ -11646,142 +11683,142 @@
inc $I0
goto cclass_loop
cclass_done:
- $P1498 = box $S2
+ $P1511 = box $S2
- store_lex "$c", $P1498
-.annotate "line", 458
- find_lex $P1499, "$str"
- find_lex $P1500, "$c"
- concat $P1501, $P1499, $P1500
- store_lex "$str", $P1501
-.annotate "line", 438
- .return ($P1501)
+ store_lex "$c", $P1511
+.annotate "line", 462
+ find_lex $P1512, "$str"
+ find_lex $P1513, "$c"
+ concat $P1514, $P1512, $P1513
+ store_lex "$str", $P1514
+.annotate "line", 442
+ .return ($P1514)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "_block1465" :anon :subid("85_1261064016.27984") :outer("84_1261064016.27984")
-.annotate "line", 434
- new $P1467, "Undef"
- .lex "$name", $P1467
- find_lex $P1468, "$/"
- unless_null $P1468, vivify_340
- new $P1468, "Hash"
- vivify_340:
- set $P1469, $P1468["name"]
- unless_null $P1469, vivify_341
- new $P1469, "Undef"
- vivify_341:
- set $S1470, $P1469
- new $P1471, 'String'
- set $P1471, $S1470
- store_lex "$name", $P1471
-.annotate "line", 435
- get_hll_global $P1472, ["PAST"], "Regex"
- find_lex $P1473, "$name"
- find_lex $P1474, "$/"
- $P1475 = $P1472."new"($P1473, "subrule" :named("pasttype"), "method" :named("subtype"), $P1474 :named("node"))
- store_lex "$past", $P1475
-.annotate "line", 433
- .return ($P1475)
+.sub "_block1478" :anon :subid("86_1266337348.54616") :outer("85_1266337348.54616")
+.annotate "line", 438
+ new $P1480, "Undef"
+ .lex "$name", $P1480
+ find_lex $P1481, "$/"
+ unless_null $P1481, vivify_343
+ new $P1481, "Hash"
+ vivify_343:
+ set $P1482, $P1481["name"]
+ unless_null $P1482, vivify_344
+ new $P1482, "Undef"
+ vivify_344:
+ set $S1483, $P1482
+ new $P1484, 'String'
+ set $P1484, $S1483
+ store_lex "$name", $P1484
+.annotate "line", 439
+ get_hll_global $P1485, ["PAST"], "Regex"
+ find_lex $P1486, "$name"
+ find_lex $P1487, "$/"
+ $P1488 = $P1485."new"($P1486, "subrule" :named("pasttype"), "method" :named("subtype"), $P1487 :named("node"))
+ store_lex "$past", $P1488
+.annotate "line", 437
+ .return ($P1488)
.end
.namespace ["Regex";"P6Regex";"Actions"]
-.sub "mod_internal" :subid("88_1261064016.27984") :method :outer("11_1261064016.27984")
- .param pmc param_1526
-.annotate "line", 468
- new $P1525, 'ExceptionHandler'
- set_addr $P1525, control_1524
- $P1525."handle_types"(58)
- push_eh $P1525
- .lex "self", self
- .lex "$/", param_1526
-.annotate "line", 469
- new $P1527, "Hash"
- .lex "%mods", $P1527
-.annotate "line", 470
- new $P1528, "Undef"
- .lex "$n", $P1528
-.annotate "line", 469
- get_global $P1529, "@MODIFIERS"
- unless_null $P1529, vivify_344
- new $P1529, "ResizablePMCArray"
- vivify_344:
- set $P1530, $P1529[0]
- unless_null $P1530, vivify_345
- new $P1530, "Undef"
- vivify_345:
- store_lex "%mods", $P1530
-.annotate "line", 470
- find_lex $P1533, "$/"
- unless_null $P1533, vivify_346
- new $P1533, "Hash"
- vivify_346:
- set $P1534, $P1533["n"]
- unless_null $P1534, vivify_347
- new $P1534, "ResizablePMCArray"
+.sub "mod_internal" :subid("89_1266337348.54616") :method :outer("11_1266337348.54616")
+ .param pmc param_1539
+.annotate "line", 472
+ new $P1538, 'ExceptionHandler'
+ set_addr $P1538, control_1537
+ $P1538."handle_types"(58)
+ push_eh $P1538
+ .lex "self", self
+ .lex "$/", param_1539
+.annotate "line", 473
+ new $P1540, "Hash"
+ .lex "%mods", $P1540
+.annotate "line", 474
+ new $P1541, "Undef"
+ .lex "$n", $P1541
+.annotate "line", 473
+ get_global $P1542, "@MODIFIERS"
+ unless_null $P1542, vivify_347
+ new $P1542, "ResizablePMCArray"
vivify_347:
- set $P1535, $P1534[0]
- unless_null $P1535, vivify_348
- new $P1535, "Undef"
+ set $P1543, $P1542[0]
+ unless_null $P1543, vivify_348
+ new $P1543, "Undef"
vivify_348:
- set $S1536, $P1535
- isgt $I1537, $S1536, ""
- if $I1537, if_1532
- new $P1542, "Integer"
- assign $P1542, 1
- set $P1531, $P1542
- goto if_1532_end
- if_1532:
- find_lex $P1538, "$/"
- unless_null $P1538, vivify_349
- new $P1538, "Hash"
+ store_lex "%mods", $P1543
+.annotate "line", 474
+ find_lex $P1546, "$/"
+ unless_null $P1546, vivify_349
+ new $P1546, "Hash"
vivify_349:
- set $P1539, $P1538["n"]
- unless_null $P1539, vivify_350
- new $P1539, "ResizablePMCArray"
+ set $P1547, $P1546["n"]
+ unless_null $P1547, vivify_350
+ new $P1547, "ResizablePMCArray"
vivify_350:
- set $P1540, $P1539[0]
- unless_null $P1540, vivify_351
- new $P1540, "Undef"
+ set $P1548, $P1547[0]
+ unless_null $P1548, vivify_351
+ new $P1548, "Undef"
vivify_351:
- set $N1541, $P1540
- new $P1531, 'Float'
- set $P1531, $N1541
- if_1532_end:
- store_lex "$n", $P1531
-.annotate "line", 471
- find_lex $P1543, "$n"
- find_lex $P1544, "$/"
- unless_null $P1544, vivify_352
- new $P1544, "Hash"
+ set $S1549, $P1548
+ isgt $I1550, $S1549, ""
+ if $I1550, if_1545
+ new $P1555, "Integer"
+ assign $P1555, 1
+ set $P1544, $P1555
+ goto if_1545_end
+ if_1545:
+ find_lex $P1551, "$/"
+ unless_null $P1551, vivify_352
+ new $P1551, "Hash"
vivify_352:
- set $P1545, $P1544["mod_ident"]
- unless_null $P1545, vivify_353
- new $P1545, "Hash"
+ set $P1552, $P1551["n"]
+ unless_null $P1552, vivify_353
+ new $P1552, "ResizablePMCArray"
vivify_353:
- set $P1546, $P1545["sym"]
- unless_null $P1546, vivify_354
- new $P1546, "Undef"
+ set $P1553, $P1552[0]
+ unless_null $P1553, vivify_354
+ new $P1553, "Undef"
vivify_354:
- set $S1547, $P1546
- find_lex $P1548, "%mods"
- unless_null $P1548, vivify_355
- new $P1548, "Hash"
- store_lex "%mods", $P1548
+ set $N1554, $P1553
+ new $P1544, 'Float'
+ set $P1544, $N1554
+ if_1545_end:
+ store_lex "$n", $P1544
+.annotate "line", 475
+ find_lex $P1556, "$n"
+ find_lex $P1557, "$/"
+ unless_null $P1557, vivify_355
+ new $P1557, "Hash"
vivify_355:
- set $P1548[$S1547], $P1543
+ set $P1558, $P1557["mod_ident"]
+ unless_null $P1558, vivify_356
+ new $P1558, "Hash"
+ vivify_356:
+ set $P1559, $P1558["sym"]
+ unless_null $P1559, vivify_357
+ new $P1559, "Undef"
+ vivify_357:
+ set $S1560, $P1559
+ find_lex $P1561, "%mods"
+ unless_null $P1561, vivify_358
+ new $P1561, "Hash"
+ store_lex "%mods", $P1561
+ vivify_358:
+ set $P1561[$S1560], $P1556
+.annotate "line", 476
+ find_lex $P1562, "$/"
+ $P1563 = $P1562."!make"(0)
.annotate "line", 472
- find_lex $P1549, "$/"
- $P1550 = $P1549."!make"(0)
-.annotate "line", 468
- .return ($P1550)
- control_1524:
+ .return ($P1563)
+ control_1537:
.local pmc exception
.get_results (exception)
- getattribute $P1551, exception, "payload"
- .return ($P1551)
+ getattribute $P1564, exception, "payload"
+ .return ($P1564)
.end
# .include 'src/cheats/p6regex-grammar.pir'
Modified: branches/boehm_gc_2/include/parrot/atomic/gcc_pcc.h
==============================================================================
--- branches/boehm_gc_2/include/parrot/atomic/gcc_pcc.h Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/include/parrot/atomic/gcc_pcc.h Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,5 +1,5 @@
/* atomic/gcc_pcc.h
- * Copyright (C) 2006-2008, Parrot Foundation.
+ * Copyright (C) 2006-2010, Parrot Foundation.
* SVN Info
* $Id$
* Overview:
@@ -23,6 +23,18 @@
# define PARROT_ATOMIC_PTR_SET(a, b) (a).val = (void *) (b)
+/*
+
+=over 4
+
+=item C<inline static void *parrot_ppc_cmpset(void * volatile *ptr, void
+*expect, void *update)>
+
+Generate ppc cmpset
+
+=cut
+
+*/
inline static void *parrot_ppc_cmpset(void * volatile *ptr,
void *expect, void *update)
{
@@ -47,6 +59,18 @@
return tmp;
}
+/*
+
+=item C<inline static long parrot_ppc_add(volatile long *val, long what)>
+
+Generate ppc add
+
+=back
+
+=cut
+
+*/
+
inline static long parrot_ppc_add(volatile long *val, long what)
{
long tmp;
Modified: branches/boehm_gc_2/include/parrot/charset.h
==============================================================================
--- branches/boehm_gc_2/include/parrot/charset.h Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/include/parrot/charset.h Mon Feb 22 12:30:02 2010 (r44294)
@@ -101,7 +101,8 @@
__attribute__nonnull__(2);
PARROT_EXPORT
-void Parrot_charsets_encodings_deinit(SHIM_INTERP);
+void Parrot_charsets_encodings_deinit(PARROT_INTERP)
+ __attribute__nonnull__(1);
PARROT_EXPORT
void Parrot_charsets_encodings_init(PARROT_INTERP)
@@ -149,20 +150,23 @@
PARROT_EXPORT
PARROT_CAN_RETURN_NULL
PARROT_MALLOC
-CHARSET * Parrot_new_charset(SHIM_INTERP);
+CHARSET * Parrot_new_charset(PARROT_INTERP)
+ __attribute__nonnull__(1);
PARROT_EXPORT
-INTVAL Parrot_register_charset(SHIM_INTERP,
+INTVAL Parrot_register_charset(PARROT_INTERP,
ARGIN(const char *charsetname),
ARGIN(CHARSET *charset))
+ __attribute__nonnull__(1)
__attribute__nonnull__(2)
__attribute__nonnull__(3);
PARROT_EXPORT
-void Parrot_register_charset_converter(SHIM_INTERP,
+void Parrot_register_charset_converter(PARROT_INTERP,
ARGIN(const CHARSET *lhs),
ARGIN(CHARSET *rhs),
ARGIN(charset_converter_t func))
+ __attribute__nonnull__(1)
__attribute__nonnull__(2)
__attribute__nonnull__(3)
__attribute__nonnull__(4);
@@ -175,7 +179,8 @@
#define ASSERT_ARGS_Parrot_charset_number_of_str __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(src))
#define ASSERT_ARGS_Parrot_charsets_encodings_deinit \
- __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+ __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_Parrot_charsets_encodings_init \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
@@ -191,13 +196,16 @@
, PARROT_ASSERT_ARG(charsetname))
#define ASSERT_ARGS_Parrot_make_default_charset __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(charset))
-#define ASSERT_ARGS_Parrot_new_charset __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_Parrot_new_charset __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_Parrot_register_charset __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(charsetname) \
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(charsetname) \
, PARROT_ASSERT_ARG(charset))
#define ASSERT_ARGS_Parrot_register_charset_converter \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(lhs) \
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(lhs) \
, PARROT_ASSERT_ARG(rhs) \
, PARROT_ASSERT_ARG(func))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
Modified: branches/boehm_gc_2/include/parrot/context.h
==============================================================================
--- branches/boehm_gc_2/include/parrot/context.h Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/include/parrot/context.h Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,5 +1,5 @@
/* context.h
- * Copyright (C) 2009, Parrot Foundation.
+ * Copyright (C) 2009-2010, Parrot Foundation.
* SVN Info
* $Id$
* Overview:
@@ -225,12 +225,6 @@
PARROT_EXPORT
PARROT_CAN_RETURN_NULL
-opcode_t* Parrot_pcc_get_results_func(PARROT_INTERP, ARGIN(PMC *ctx))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_EXPORT
-PARROT_CAN_RETURN_NULL
PMC* Parrot_pcc_get_results_signature_func(PARROT_INTERP, ARGIN(PMC *ctx))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
@@ -335,13 +329,6 @@
__attribute__nonnull__(2);
PARROT_EXPORT
-void Parrot_pcc_set_results_func(PARROT_INTERP,
- ARGIN(PMC *ctx),
- ARGIN_NULLOK(opcode_t *pc))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_EXPORT
void Parrot_pcc_set_results_signature_func(PARROT_INTERP,
ARGIN(PMC *ctx),
ARGIN_NULLOK(PMC *sig))
@@ -465,9 +452,6 @@
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(ctx))
-#define ASSERT_ARGS_Parrot_pcc_get_results_func __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(ctx))
#define ASSERT_ARGS_Parrot_pcc_get_results_signature_func \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
@@ -523,9 +507,6 @@
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(ctx))
-#define ASSERT_ARGS_Parrot_pcc_set_results_func __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(ctx))
#define ASSERT_ARGS_Parrot_pcc_set_results_signature_func \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
@@ -567,9 +548,6 @@
# define Parrot_pcc_get_continuation(i, c) (__C(c)->current_cont)
# define Parrot_pcc_set_continuation(i, c, value) (__C(c)->current_cont = (value))
-# define Parrot_pcc_get_results(i, c) (__C(c)->current_results)
-# define Parrot_pcc_set_results(i, c, value) (__C(c)->current_results = (value))
-
# define Parrot_pcc_get_caller_ctx(i, c) (__C(c)->caller_ctx)
# define Parrot_pcc_set_caller_ctx(i, c, value) (__C(c)->caller_ctx = (value))
@@ -634,9 +612,6 @@
# define Parrot_pcc_get_continuation(i, c) Parrot_pcc_get_continuation_func((i), (c))
# define Parrot_pcc_set_continuation(i, c, value) Parrot_pcc_set_continuation_func((i), (c), (value))
-# define Parrot_pcc_get_results(i, c) Parrot_pcc_get_results_func((i), (c))
-# define Parrot_pcc_set_results(i, c, value) Parrot_pcc_set_results_func((i), (c), (value))
-
# define Parrot_pcc_get_caller_ctx(i, c) Parrot_pcc_get_caller_ctx_func((i), (c))
# define Parrot_pcc_set_caller_ctx(i, c, value) Parrot_pcc_set_caller_ctx_func((i), (c), (value))
Modified: branches/boehm_gc_2/include/parrot/debugger.h
==============================================================================
--- branches/boehm_gc_2/include/parrot/debugger.h Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/include/parrot/debugger.h Mon Feb 22 12:30:02 2010 (r44294)
@@ -214,12 +214,13 @@
__attribute__nonnull__(1)
__attribute__nonnull__(2);
-long PDB_add_label(
+long PDB_add_label(PARROT_INTERP,
ARGMOD(PDB_file_t *file),
ARGIN(const opcode_t *cur_opcode),
opcode_t offset)
__attribute__nonnull__(1)
__attribute__nonnull__(2)
+ __attribute__nonnull__(3)
FUNC_MODIFIES(*file);
void PDB_assign(PARROT_INTERP, ARGIN(const char *command))
@@ -240,11 +241,6 @@
__attribute__nonnull__(2);
PARROT_CAN_RETURN_NULL
-opcode_t * PDB_compile(PARROT_INTERP, ARGIN(const char *command))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_CAN_RETURN_NULL
PDB_condition_t * PDB_cond(PARROT_INTERP, ARGIN(const char *command))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
@@ -256,7 +252,9 @@
__attribute__nonnull__(1)
__attribute__nonnull__(2);
-void PDB_delete_condition(SHIM_INTERP, ARGMOD(PDB_breakpoint_t *breakpoint))
+void PDB_delete_condition(PARROT_INTERP,
+ ARGMOD(PDB_breakpoint_t *breakpoint))
+ __attribute__nonnull__(1)
__attribute__nonnull__(2)
FUNC_MODIFIES(*breakpoint);
@@ -289,8 +287,9 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
PARROT_MALLOC
-char * PDB_escape(ARGIN(const char *string), UINTVAL length)
- __attribute__nonnull__(1);
+char * PDB_escape(PARROT_INTERP, ARGIN(const char *string), UINTVAL length)
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
void PDB_eval(PARROT_INTERP, ARGIN(const char *command))
__attribute__nonnull__(1)
@@ -303,7 +302,9 @@
__attribute__nonnull__(1)
__attribute__nonnull__(2);
-void PDB_free_file(SHIM_INTERP, ARGIN_NULLOK(PDB_file_t *file));
+void PDB_free_file(PARROT_INTERP, ARGIN_NULLOK(PDB_file_t *file))
+ __attribute__nonnull__(1);
+
void PDB_get_command(PARROT_INTERP)
__attribute__nonnull__(1);
@@ -379,7 +380,8 @@
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(command))
#define ASSERT_ARGS_PDB_add_label __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(file) \
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(file) \
, PARROT_ASSERT_ARG(cur_opcode))
#define ASSERT_ARGS_PDB_assign __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
@@ -391,9 +393,6 @@
#define ASSERT_ARGS_PDB_check_condition __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(condition))
-#define ASSERT_ARGS_PDB_compile __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(command))
#define ASSERT_ARGS_PDB_cond __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(command))
@@ -403,7 +402,8 @@
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(command))
#define ASSERT_ARGS_PDB_delete_condition __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(breakpoint))
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(breakpoint))
#define ASSERT_ARGS_PDB_disable_breakpoint __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(command))
@@ -418,14 +418,16 @@
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(command))
#define ASSERT_ARGS_PDB_escape __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(string))
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(string))
#define ASSERT_ARGS_PDB_eval __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(command))
#define ASSERT_ARGS_PDB_find_breakpoint __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(command))
-#define ASSERT_ARGS_PDB_free_file __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_PDB_free_file __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_PDB_get_command __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_PDB_hasinstruction __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
Modified: branches/boehm_gc_2/include/parrot/encoding.h
==============================================================================
--- branches/boehm_gc_2/include/parrot/encoding.h Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/include/parrot/encoding.h Mon Feb 22 12:30:02 2010 (r44294)
@@ -143,7 +143,8 @@
PARROT_EXPORT
PARROT_MALLOC
PARROT_CANNOT_RETURN_NULL
-ENCODING * Parrot_new_encoding(SHIM_INTERP);
+ENCODING * Parrot_new_encoding(PARROT_INTERP)
+ __attribute__nonnull__(1);
PARROT_EXPORT
INTVAL Parrot_register_encoding(PARROT_INTERP,
@@ -153,7 +154,9 @@
__attribute__nonnull__(2)
__attribute__nonnull__(3);
-void parrot_deinit_encodings(void);
+void parrot_deinit_encodings(PARROT_INTERP)
+ __attribute__nonnull__(1);
+
void Parrot_str_internal_register_encoding_names(PARROT_INTERP)
__attribute__nonnull__(1);
@@ -178,12 +181,14 @@
, PARROT_ASSERT_ARG(encodingname))
#define ASSERT_ARGS_Parrot_make_default_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(encoding))
-#define ASSERT_ARGS_Parrot_new_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_Parrot_new_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_Parrot_register_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(encodingname) \
, PARROT_ASSERT_ARG(encoding))
-#define ASSERT_ARGS_parrot_deinit_encodings __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_parrot_deinit_encodings __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_Parrot_str_internal_register_encoding_names \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
Modified: branches/boehm_gc_2/include/parrot/extend.h
==============================================================================
--- branches/boehm_gc_2/include/parrot/extend.h Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/include/parrot/extend.h Mon Feb 22 12:30:02 2010 (r44294)
@@ -62,24 +62,6 @@
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
PARROT_EXPORT
-PARROT_WARN_UNUSED_RESULT
-PARROT_CAN_RETURN_NULL
-void * Parrot_call_sub(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),
- ...)
- __attribute__nonnull__(1)
- __attribute__nonnull__(3);
-
-PARROT_EXPORT
int Parrot_eprintf(NULLOK_INTERP, ARGIN(const char *s), ...)
__attribute__nonnull__(2);
@@ -412,12 +394,6 @@
__attribute__nonnull__(2)
__attribute__nonnull__(3);
-#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_int __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(signature))
#define ASSERT_ARGS_Parrot_eprintf __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(s))
#define ASSERT_ARGS_Parrot_ext_call __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
Modified: branches/boehm_gc_2/include/parrot/gc_api.h
==============================================================================
--- branches/boehm_gc_2/include/parrot/gc_api.h Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/include/parrot/gc_api.h Mon Feb 22 12:30:02 2010 (r44294)
@@ -109,6 +109,22 @@
__attribute__nonnull__(1);
PARROT_EXPORT
+PARROT_CANNOT_RETURN_NULL
+void * Parrot_gc_allocate_memory_chunk(PARROT_INTERP, size_t size)
+ __attribute__nonnull__(1);
+
+PARROT_EXPORT
+PARROT_CANNOT_RETURN_NULL
+void * Parrot_gc_allocate_memory_chunk_with_interior_pointers(PARROT_INTERP,
+ size_t size)
+ __attribute__nonnull__(1);
+
+PARROT_EXPORT
+PARROT_CANNOT_RETURN_NULL
+void Parrot_gc_free_memory_chunk(PARROT_INTERP, ARGIN_NULLOK(void *data))
+ __attribute__nonnull__(1);
+
+PARROT_EXPORT
void Parrot_gc_mark_PMC_alive_fun(PARROT_INTERP, ARGMOD_NULLOK(PMC *obj))
__attribute__nonnull__(1)
FUNC_MODIFIES(*obj);
@@ -126,6 +142,21 @@
FUNC_MODIFIES(*obj);
PARROT_EXPORT
+PARROT_CANNOT_RETURN_NULL
+void * Parrot_gc_reallocate_memory_chunk(PARROT_INTERP,
+ ARGFREE(void *data),
+ size_t newsize)
+ __attribute__nonnull__(1);
+
+PARROT_EXPORT
+PARROT_CANNOT_RETURN_NULL
+void * Parrot_gc_reallocate_memory_chunk_with_interior_pointers(PARROT_INTERP,
+ ARGFREE(void *data),
+ size_t newsize,
+ size_t oldsize)
+ __attribute__nonnull__(1);
+
+PARROT_EXPORT
unsigned int Parrot_is_blocked_GC_mark(PARROT_INTERP)
__attribute__nonnull__(1);
@@ -301,12 +332,18 @@
int Parrot_gc_total_sized_buffers(PARROT_INTERP)
__attribute__nonnull__(1);
-STRING *Parrot_gc_sys_name(PARROT_INTERP);
-
#define ASSERT_ARGS_Parrot_block_GC_mark __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_Parrot_block_GC_sweep __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_gc_allocate_memory_chunk \
+ __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_gc_allocate_memory_chunk_with_interior_pointers \
+ __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_gc_free_memory_chunk __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_Parrot_gc_mark_PMC_alive_fun __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_Parrot_gc_mark_PObj_alive __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
@@ -315,6 +352,12 @@
#define ASSERT_ARGS_Parrot_gc_mark_STRING_alive_fun \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_gc_reallocate_memory_chunk \
+ __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_gc_reallocate_memory_chunk_with_interior_pointers \
+ __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_Parrot_is_blocked_GC_mark __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_Parrot_is_blocked_GC_sweep __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
Modified: branches/boehm_gc_2/include/parrot/imcc.h
==============================================================================
--- branches/boehm_gc_2/include/parrot/imcc.h Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/include/parrot/imcc.h Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007-2008, Parrot Foundation.
+ * Copyright (C) 2007-2010, Parrot Foundation.
* $Id$
*/
@@ -8,7 +8,7 @@
PARROT_EXPORT void imcc_initialize(PARROT_INTERP);
PARROT_EXPORT void imcc_start_handling_flags(PARROT_INTERP);
-PARROT_EXPORT int imcc_handle_flag(PARROT_INTERP, struct longopt_opt_info *opt, INTVAL *core);
+PARROT_EXPORT int imcc_handle_flag(PARROT_INTERP, struct longopt_opt_info *opt, Parrot_Run_core_t *core);
PARROT_EXPORT int imcc_run(PARROT_INTERP, const char *sourcefile, int argc, char **argv);
#endif /* PARROT_IMCC_H_GUARD */
Modified: branches/boehm_gc_2/include/parrot/interpreter.h
==============================================================================
--- branches/boehm_gc_2/include/parrot/interpreter.h Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/include/parrot/interpreter.h Mon Feb 22 12:30:02 2010 (r44294)
@@ -606,7 +606,7 @@
#endif /* PARROT_IN_CORE */
#ifndef PMC_IS_NULL
-# define PMC_IS_NULL(pmc) PMC_is_null(NULL, (pmc))
+# define PMC_IS_NULL(pmc) Parrot_pmc_is_null(NULL, (pmc))
#endif
#ifndef STRING_IS_NULL
# define STRING_IS_NULL(s) ((s) == NULL || STRING_is_null(NULL, (s))
Modified: branches/boehm_gc_2/include/parrot/memory.h
==============================================================================
--- branches/boehm_gc_2/include/parrot/memory.h Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/include/parrot/memory.h Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,5 +1,5 @@
/* memory.h
- * Copyright (C) 2001-2008, Parrot Foundation.
+ * Copyright (C) 2001-2010, Parrot Foundation.
* SVN Info
* $Id$
* Overview:
@@ -24,22 +24,39 @@
__FILE__, __LINE__)
#define mem_internal_allocate_zeroed_typed(type) \
(type *)mem__internal_allocate_zeroed(sizeof (type), __FILE__, __LINE__)
+#define mem_internal_allocate_n_zeroed_typed(n, type) \
+ (type *)mem__internal_allocate_zeroed((n) * sizeof (type), __FILE__, __LINE__)
#define mem_internal_realloc(x, y) mem__internal_realloc((x), (y), __FILE__, __LINE__)
#define mem_internal_realloc_zeroed(p, x, y) mem__internal_realloc_zeroed((p), (x), (y), __FILE__, __LINE__)
+#define mem_internal_realloc_n_zeroed_typed(p, x, y, type) (type *)mem__internal_realloc_zeroed((p), (x) * sizeof (type), (y) * sizeof (type), __FILE__, __LINE__)
#define mem_internal_free(x) mem__internal_free((x), __FILE__, __LINE__)
-#define mem_allocate_new_stash() NULL
-#define mem_allocate_new_stack() NULL
#define mem_sys_memcopy memcpy
#define mem_sys_memmove memmove
#define mem_allocate_typed(type) (type *)mem_sys_allocate(sizeof (type))
-#define mem_allocate_n_typed(n, type) (type *)mem_sys_allocate((n) * sizeof(type))
+#define mem_allocate_n_typed(n, type) (type *)mem_sys_allocate((n) * sizeof (type))
#define mem_allocate_zeroed_typed(type) (type *)mem_sys_allocate_zeroed(sizeof (type))
-#define mem_allocate_n_zeroed_typed(n, type) (type *)mem_sys_allocate_zeroed((n) * sizeof(type))
-#define mem_realloc_n_typed(p, n, type) (p) = (type *)mem_sys_realloc((p), (n)*sizeof(type))
-#define mem_copy_n_typed(dest, src, n, type) memcpy((dest), (src), (n)*sizeof(type))
+#define mem_allocate_n_zeroed_typed(n, type) (type *)mem_sys_allocate_zeroed((n) * sizeof (type))
+#define mem_realloc_n_typed(p, n, type) (p) = (type *)mem_sys_realloc((p), (n) * sizeof (type))
+
+#define mem_gc_allocate_typed(i, type) \
+ (type *)Parrot_gc_allocate_memory_chunk((i), sizeof (type))
+#define mem_gc_allocate_n_typed(i, n, type) \
+ (type *)Parrot_gc_allocate_memory_chunk((i), (n) * sizeof (type))
+#define mem_gc_realloc_n_typed(i, p, n, type) \
+ (type *)Parrot_gc_reallocate_memory_chunk((i), (p), (n) * sizeof (type))
+#define mem_gc_allocate_zeroed_typed(i, type) \
+ (type *)Parrot_gc_allocate_memory_chunk_with_interior_pointers((i), sizeof (type))
+#define mem_gc_allocate_n_zeroed_typed(i, n, type) \
+ (type *)Parrot_gc_allocate_memory_chunk_with_interior_pointers((i), (n) * sizeof (type))
+#define mem_gc_realloc_n_typed_zeroed(i, p, n, o, type) \
+ (type *)Parrot_gc_reallocate_memory_chunk_with_interior_pointers((i), (p), (n) * sizeof (type), (o) * sizeof (type))
+#define mem_gc_free(i, p) \
+ Parrot_gc_free_memory_chunk((i), (p))
+
+#define mem_copy_n_typed(dest, src, n, type) memcpy((dest), (src), (n)*sizeof (type))
/* HEADERIZER BEGIN: src/gc/alloc_memory.c */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
Modified: branches/boehm_gc_2/include/parrot/nci.h
==============================================================================
--- branches/boehm_gc_2/include/parrot/nci.h Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/include/parrot/nci.h Mon Feb 22 12:30:02 2010 (r44294)
@@ -17,6 +17,10 @@
void *build_call_func(PARROT_INTERP, SHIM(PMC *pmc_nci), NOTNULL(STRING *signature), NOTNULL(int *jitted));
+void Parrot_nci_load_core_thunks(PARROT_INTERP);
+
+void Parrot_nci_load_extra_thunks(PARROT_INTERP);
+
#endif /* PARROT_NCI_H_GUARD */
/*
Modified: branches/boehm_gc_2/include/parrot/oo.h
==============================================================================
--- branches/boehm_gc_2/include/parrot/oo.h Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/include/parrot/oo.h Mon Feb 22 12:30:02 2010 (r44294)
@@ -164,11 +164,6 @@
PARROT_CAN_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
-PMC * Parrot_oo_get_namespace(SHIM_INTERP, ARGIN(const PMC *classobj))
- __attribute__nonnull__(2);
-
-PARROT_CAN_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
PMC * Parrot_oo_newclass_from_str(PARROT_INTERP, ARGIN(STRING *name))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
@@ -235,8 +230,6 @@
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(self) \
, PARROT_ASSERT_ARG(ns))
-#define ASSERT_ARGS_Parrot_oo_get_namespace __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(classobj))
#define ASSERT_ARGS_Parrot_oo_newclass_from_str __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(name))
Modified: branches/boehm_gc_2/include/parrot/oplib.h
==============================================================================
--- branches/boehm_gc_2/include/parrot/oplib.h Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/include/parrot/oplib.h Mon Feb 22 12:30:02 2010 (r44294)
@@ -32,7 +32,7 @@
size_t op_count;
op_info_t * op_info_table;
op_func_t * op_func_table;
- int (*op_code)(const char * name, int full);
+ int (*op_code)(PARROT_INTERP, const char * name, int full);
} op_lib_t;
typedef enum {
Modified: branches/boehm_gc_2/include/parrot/packfile.h
==============================================================================
--- branches/boehm_gc_2/include/parrot/packfile.h Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/include/parrot/packfile.h Mon Feb 22 12:30:02 2010 (r44294)
@@ -451,9 +451,10 @@
__attribute__nonnull__(2);
PARROT_EXPORT
-void PackFile_add_segment(SHIM_INTERP,
+void PackFile_add_segment(PARROT_INTERP,
ARGMOD(PackFile_Directory *dir),
ARGIN(PackFile_Segment *seg))
+ __attribute__nonnull__(1)
__attribute__nonnull__(2)
__attribute__nonnull__(3)
FUNC_MODIFIES(*dir);
@@ -470,28 +471,32 @@
FUNC_MODIFIES(*self);
PARROT_EXPORT
-void PackFile_Annotations_add_group(SHIM_INTERP,
+void PackFile_Annotations_add_group(PARROT_INTERP,
ARGMOD(PackFile_Annotations *self),
opcode_t offset)
+ __attribute__nonnull__(1)
__attribute__nonnull__(2)
FUNC_MODIFIES(*self);
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
-PackFile_Segment * PackFile_Annotations_new(SHIM_INTERP,
+PackFile_Segment * PackFile_Annotations_new(PARROT_INTERP,
SHIM(struct PackFile *pf),
SHIM(STRING *name),
- NULLOK(int add));
+ NULLOK(int add))
+ __attribute__nonnull__(1);
PARROT_EXPORT
-void PackFile_Constant_destroy(SHIM_INTERP,
+void PackFile_Constant_destroy(PARROT_INTERP,
ARGMOD_NULLOK(PackFile_Constant *self))
+ __attribute__nonnull__(1)
FUNC_MODIFIES(*self);
PARROT_EXPORT
PARROT_MALLOC
PARROT_CANNOT_RETURN_NULL
-PackFile_Constant * PackFile_Constant_new(SHIM_INTERP);
+PackFile_Constant * PackFile_Constant_new(PARROT_INTERP)
+ __attribute__nonnull__(1);
PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
@@ -655,10 +660,11 @@
PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
-PackFile_Segment * PackFile_Segment_new(SHIM_INTERP,
+PackFile_Segment * PackFile_Segment_new(PARROT_INTERP,
SHIM(PackFile *pf),
SHIM(STRING *name),
- NULLOK(int add));
+ NULLOK(int add))
+ __attribute__nonnull__(1);
PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
@@ -781,8 +787,9 @@
void mark_const_subs(PARROT_INTERP)
__attribute__nonnull__(1);
-void PackFile_Annotations_destroy(SHIM_INTERP,
+void PackFile_Annotations_destroy(PARROT_INTERP,
ARGMOD(PackFile_Segment *seg))
+ __attribute__nonnull__(1)
__attribute__nonnull__(2)
FUNC_MODIFIES(*seg);
@@ -830,7 +837,8 @@
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(self))
#define ASSERT_ARGS_PackFile_add_segment __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(dir) \
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(dir) \
, PARROT_ASSERT_ARG(seg))
#define ASSERT_ARGS_PackFile_Annotations_add_entry \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
@@ -838,10 +846,14 @@
, PARROT_ASSERT_ARG(self))
#define ASSERT_ARGS_PackFile_Annotations_add_group \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(self))
-#define ASSERT_ARGS_PackFile_Annotations_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
-#define ASSERT_ARGS_PackFile_Constant_destroy __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
-#define ASSERT_ARGS_PackFile_Constant_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(self))
+#define ASSERT_ARGS_PackFile_Annotations_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_PackFile_Constant_destroy __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_PackFile_Constant_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_PackFile_Constant_pack_size __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(self))
@@ -904,7 +916,8 @@
#define ASSERT_ARGS_PackFile_Segment_dump __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(self))
-#define ASSERT_ARGS_PackFile_Segment_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_PackFile_Segment_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_PackFile_Segment_new_seg __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(dir) \
@@ -954,7 +967,8 @@
#define ASSERT_ARGS_mark_const_subs __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_PackFile_Annotations_destroy __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(seg))
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(seg))
#define ASSERT_ARGS_PackFile_Annotations_dump __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(seg))
@@ -1025,9 +1039,12 @@
PARROT_MALLOC
PARROT_CANNOT_RETURN_NULL
-char * PF_fetch_cstring(ARGIN(PackFile *pf), ARGIN(const opcode_t **cursor))
+char * PF_fetch_cstring(PARROT_INTERP,
+ ARGIN(PackFile *pf),
+ ARGIN(const opcode_t **cursor))
__attribute__nonnull__(1)
- __attribute__nonnull__(2);
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3);
PARROT_WARN_UNUSED_RESULT
INTVAL PF_fetch_integer(
@@ -1112,7 +1129,8 @@
#define ASSERT_ARGS_PackFile_assign_transforms __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(pf))
#define ASSERT_ARGS_PF_fetch_cstring __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(pf) \
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(pf) \
, PARROT_ASSERT_ARG(cursor))
#define ASSERT_ARGS_PF_fetch_integer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(stream))
Modified: branches/boehm_gc_2/include/parrot/pmc.h
==============================================================================
--- branches/boehm_gc_2/include/parrot/pmc.h Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/include/parrot/pmc.h Mon Feb 22 12:30:02 2010 (r44294)
@@ -23,72 +23,84 @@
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
PARROT_EXPORT
-PARROT_CANNOT_RETURN_NULL
-PMC * constant_pmc_new(PARROT_INTERP, INTVAL base_type)
+void Parrot_pmc_create_mro(PARROT_INTERP, INTVAL type)
__attribute__nonnull__(1);
PARROT_EXPORT
-PARROT_CANNOT_RETURN_NULL
-PMC * constant_pmc_new_init(PARROT_INTERP,
- INTVAL base_type,
- ARGIN_NULLOK(PMC *init))
- __attribute__nonnull__(1);
+void Parrot_pmc_destroy(PARROT_INTERP, ARGMOD(PMC *pmc))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ FUNC_MODIFIES(*pmc);
PARROT_EXPORT
-PARROT_CANNOT_RETURN_NULL
-PMC * constant_pmc_new_noinit(PARROT_INTERP, INTVAL base_type)
- __attribute__nonnull__(1);
+void Parrot_pmc_gc_register(PARROT_INTERP, ARGIN(PMC *pmc))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
PARROT_EXPORT
-void gc_register_pmc(PARROT_INTERP, ARGIN(PMC *pmc))
+void Parrot_pmc_gc_unregister(PARROT_INTERP, ARGIN(PMC *pmc))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_EXPORT
-void gc_unregister_pmc(PARROT_INTERP, ARGIN(PMC *pmc))
+INTVAL Parrot_pmc_get_type(PARROT_INTERP, ARGIN(PMC *name))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_EXPORT
-void Parrot_create_mro(PARROT_INTERP, INTVAL type)
+PARROT_WARN_UNUSED_RESULT
+INTVAL Parrot_pmc_get_type_str(PARROT_INTERP, ARGIN_NULLOK(STRING *name))
__attribute__nonnull__(1);
PARROT_EXPORT
-void Parrot_pmc_destroy(PARROT_INTERP, ARGMOD(PMC *pmc))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- FUNC_MODIFIES(*pmc);
+INTVAL Parrot_pmc_is_null(SHIM_INTERP, ARGIN_NULLOK(const PMC *pmc));
PARROT_EXPORT
-INTVAL PMC_is_null(SHIM_INTERP, ARGIN_NULLOK(const PMC *pmc));
+PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
+PMC * Parrot_pmc_new(PARROT_INTERP, INTVAL base_type)
+ __attribute__nonnull__(1);
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
-PMC * pmc_new(PARROT_INTERP, INTVAL base_type)
+PMC * Parrot_pmc_new_constant(PARROT_INTERP, INTVAL base_type)
+ __attribute__nonnull__(1);
+
+PARROT_EXPORT
+PARROT_CANNOT_RETURN_NULL
+PMC * Parrot_pmc_new_constant_init(PARROT_INTERP,
+ INTVAL base_type,
+ ARGIN_NULLOK(PMC *init))
+ __attribute__nonnull__(1);
+
+PARROT_EXPORT
+PARROT_CANNOT_RETURN_NULL
+PMC * Parrot_pmc_new_constant_noinit(PARROT_INTERP, INTVAL base_type)
__attribute__nonnull__(1);
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
-PMC * pmc_new_init(PARROT_INTERP, INTVAL base_type, ARGOUT(PMC *init))
+PMC * Parrot_pmc_new_init(PARROT_INTERP,
+ INTVAL base_type,
+ ARGOUT(PMC *init))
__attribute__nonnull__(1)
__attribute__nonnull__(3)
FUNC_MODIFIES(*init);
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
-PMC * pmc_new_noinit(PARROT_INTERP, INTVAL base_type)
+PMC * Parrot_pmc_new_noinit(PARROT_INTERP, INTVAL base_type)
__attribute__nonnull__(1);
PARROT_EXPORT
-INTVAL pmc_register(PARROT_INTERP, ARGIN(STRING *name))
+INTVAL Parrot_pmc_register_new_type(PARROT_INTERP, ARGIN(STRING *name))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PARROT_IGNORABLE_RESULT
-PMC * pmc_reuse(PARROT_INTERP,
+PMC * Parrot_pmc_reuse(PARROT_INTERP,
ARGIN(PMC *pmc),
INTVAL new_type,
UINTVAL flags)
@@ -98,7 +110,7 @@
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PARROT_IGNORABLE_RESULT
-PMC * pmc_reuse_by_class(PARROT_INTERP,
+PMC * Parrot_pmc_reuse_by_class(PARROT_INTERP,
ARGMOD(PMC *pmc),
ARGIN(PMC *class_),
UINTVAL flags)
@@ -110,7 +122,7 @@
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PARROT_IGNORABLE_RESULT
-PMC * pmc_reuse_init(PARROT_INTERP,
+PMC * Parrot_pmc_reuse_init(PARROT_INTERP,
ARGIN(PMC *pmc),
INTVAL new_type,
ARGIN(PMC *init),
@@ -119,82 +131,92 @@
__attribute__nonnull__(2)
__attribute__nonnull__(4);
-PARROT_EXPORT
-PARROT_WARN_UNUSED_RESULT
-INTVAL pmc_type(PARROT_INTERP, ARGIN_NULLOK(STRING *name))
- __attribute__nonnull__(1);
-
-PARROT_EXPORT
-INTVAL pmc_type_p(PARROT_INTERP, ARGIN(PMC *name))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-INTVAL get_new_vtable_index(PARROT_INTERP)
- __attribute__nonnull__(1);
-
-void temporary_pmc_free(PARROT_INTERP, ARGMOD(PMC *pmc))
+void Parrot_pmc_free_temporary(PARROT_INTERP, ARGMOD(PMC *pmc))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
FUNC_MODIFIES(*pmc);
+INTVAL Parrot_pmc_get_new_vtable_index(PARROT_INTERP)
+ __attribute__nonnull__(1);
+
PARROT_CANNOT_RETURN_NULL
-PMC * temporary_pmc_new(PARROT_INTERP, INTVAL base_type)
+PMC * Parrot_pmc_new_temporary(PARROT_INTERP, INTVAL base_type)
__attribute__nonnull__(1);
-#define ASSERT_ARGS_constant_pmc_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_constant_pmc_new_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_constant_pmc_new_noinit __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_create_mro __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_gc_register_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_destroy __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(pmc))
-#define ASSERT_ARGS_gc_unregister_pmc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_gc_register __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(pmc))
-#define ASSERT_ARGS_Parrot_create_mro __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_Parrot_pmc_destroy __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_gc_unregister __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(pmc))
-#define ASSERT_ARGS_PMC_is_null __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
-#define ASSERT_ARGS_pmc_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_get_type __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(name))
+#define ASSERT_ARGS_Parrot_pmc_get_type_str __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_pmc_is_null __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_Parrot_pmc_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_pmc_new_constant __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_pmc_new_constant_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_pmc_new_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_new_constant_noinit \
+ __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_pmc_new_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(init))
-#define ASSERT_ARGS_pmc_new_noinit __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_new_noinit __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_pmc_register __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_register_new_type __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(name))
-#define ASSERT_ARGS_pmc_reuse __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_reuse __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(pmc))
-#define ASSERT_ARGS_pmc_reuse_by_class __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_reuse_by_class __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(pmc) \
, PARROT_ASSERT_ARG(class_))
-#define ASSERT_ARGS_pmc_reuse_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_reuse_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(pmc) \
, PARROT_ASSERT_ARG(init))
-#define ASSERT_ARGS_pmc_type __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_pmc_type_p __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(name))
-#define ASSERT_ARGS_get_new_vtable_index __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_temporary_pmc_free __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_free_temporary __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(pmc))
-#define ASSERT_ARGS_temporary_pmc_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_get_new_vtable_index \
+ __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_pmc_new_temporary __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: src/pmc.c */
+/* Allows compatibility with old name (see r44190) */
+#define Parrot_create_mro Parrot_pmc_create_mro
+#define PMC_is_null Parrot_pmc_is_null
+#define constant_pmc_new Parrot_pmc_new_constant
+#define constant_pmc_new_init Parrot_pmc_new_constant_init
+#define gc_register_pmc Parrot_pmc_gc_register
+#define gc_unregister_pmc Parrot_pmc_gc_unregister
+#define pmc_new Parrot_pmc_new
+#define pmc_new_init Parrot_pmc_new_init
+#define pmc_new_noinit Parrot_pmc_new_noinit
+#define pmc_register Parrot_pmc_register_new_type
+#define pmc_reuse Parrot_pmc_reuse
+#define pmc_reuse_by_class Parrot_pmc_reuse_by_class
+#define pmc_reuse_init Parrot_pmc_reuse_init
+#define pmc_reuse_no_init Parrot_pmc_reuse_noinit
+#define pmc_type Parrot_pmc_get_type_str
+#define pmc_type_p Parrot_pmc_get_type
+
#endif /* PARROT_PMC_H_GUARD */
/*
Modified: branches/boehm_gc_2/include/parrot/pmc_freeze.h
==============================================================================
--- branches/boehm_gc_2/include/parrot/pmc_freeze.h Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/include/parrot/pmc_freeze.h Mon Feb 22 12:30:02 2010 (r44294)
@@ -13,9 +13,6 @@
#ifndef PARROT_PMC_FREEZE_H_GUARD
#define PARROT_PMC_FREEZE_H_GUARD
-struct _visit_info;
-typedef void (*visit_f)(PARROT_INTERP, ARGIN_NULLOK(PMC*), ARGIN(PMC*));
-
typedef enum {
VISIT_HOW_PMC_TO_VISITOR = 0x00, /* push to visitor */
VISIT_HOW_VISITOR_TO_PMC = 0x01, /* shift from visitor */
@@ -124,6 +121,13 @@
PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
+INTVAL Parrot_freeze_size(PARROT_INTERP, ARGIN(PMC *pmc))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+PARROT_EXPORT
+PARROT_WARN_UNUSED_RESULT
+PARROT_CAN_RETURN_NULL
PMC* Parrot_thaw(PARROT_INTERP, ARGIN(STRING *image))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
@@ -135,18 +139,35 @@
__attribute__nonnull__(1)
__attribute__nonnull__(2);
+void Parrot_visit_loop_thawfinish(PARROT_INTERP, ARGIN(PMC *info))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
+void Parrot_visit_loop_visit(PARROT_INTERP, ARGIN(PMC *info))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
#define ASSERT_ARGS_Parrot_clone __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(pmc))
#define ASSERT_ARGS_Parrot_freeze __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(pmc))
+#define ASSERT_ARGS_Parrot_freeze_size __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(pmc))
#define ASSERT_ARGS_Parrot_thaw __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(image))
#define ASSERT_ARGS_Parrot_thaw_constants __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(image))
+#define ASSERT_ARGS_Parrot_visit_loop_thawfinish __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(info))
+#define ASSERT_ARGS_Parrot_visit_loop_visit __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(info))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: src/pmc_freeze.c */
Modified: branches/boehm_gc_2/include/parrot/runcore_profiling.h
==============================================================================
--- branches/boehm_gc_2/include/parrot/runcore_profiling.h Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/include/parrot/runcore_profiling.h Mon Feb 22 12:30:02 2010 (r44294)
@@ -40,7 +40,7 @@
PPROF_LINE_END_OF_RUNLOOP
} Parrot_profiling_line;
-typedef void (*profiling_output_fn)(ARGIN(Parrot_profiling_runcore_t*), ARGIN_NULLOK(Parrot_profiling_line));
+typedef void (*profiling_output_fn)(ARGIN(Parrot_profiling_runcore_t*), ARGIN(PPROF_DATA*), ARGIN_NULLOK(Parrot_profiling_line));
typedef profiling_output_fn Parrot_profiling_output_fn;
typedef enum Parrot_profiling_datatype {
@@ -92,7 +92,6 @@
UINTVAL time_size; /* how big is the following array */
UHUGEINTVAL *time; /* time spent between DO_OP and start/end of a runcore */
Hash *line_cache; /* hash for caching pc -> line mapping */
- PPROF_DATA pprof_data[PPROF_DATA_MAX+1]; /* array for storage of one line of profiling data */
};
#define Profiling_flag_SET(runcore, flag) \
Modified: branches/boehm_gc_2/lib/Parrot/Configure/Messages.pm
==============================================================================
--- branches/boehm_gc_2/lib/Parrot/Configure/Messages.pm Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/lib/Parrot/Configure/Messages.pm Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
package Parrot::Configure::Messages;
@@ -17,7 +17,7 @@
my $parrot_version = shift;
print <<"END";
Parrot Version $parrot_version Configure 2.0
-Copyright (C) 2001-2009, Parrot Foundation.
+Copyright (C) 2001-2010, Parrot Foundation.
Hello, I'm Configure. My job is to poke and prod your system to figure out
how to build Parrot. The process is completely automated, unless you passed in
Modified: branches/boehm_gc_2/lib/Parrot/Configure/Step/List.pm
==============================================================================
--- branches/boehm_gc_2/lib/Parrot/Configure/Step/List.pm Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/lib/Parrot/Configure/Step/List.pm Mon Feb 22 12:30:02 2010 (r44294)
@@ -68,7 +68,6 @@
gen::core_pmcs
gen::crypto
gen::opengl
- gen::call_list
gen::makefiles
gen::platform
gen::config_pm
Modified: branches/boehm_gc_2/lib/Parrot/Docs/Section/Tools.pm
==============================================================================
--- branches/boehm_gc_2/lib/Parrot/Docs/Section/Tools.pm Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/lib/Parrot/Docs/Section/Tools.pm Mon Feb 22 12:30:02 2010 (r44294)
@@ -46,7 +46,6 @@
'',
$self->new_item( '', 'tools/dev/as2c.pl' ),
$self->new_item( '', 'tools/build/cc_flags.pl' ),
- $self->new_item( '', 'tools/build/nativecall.pl' ),
$self->new_item( '', 'tools/build/vtable_h.pl' ),
$self->new_item( '', 'tools/build/vtable_extend.pl' ),
),
Modified: branches/boehm_gc_2/lib/Parrot/Ops2c/Utils.pm
==============================================================================
--- branches/boehm_gc_2/lib/Parrot/Ops2c/Utils.pm Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/lib/Parrot/Ops2c/Utils.pm Mon Feb 22 12:30:02 2010 (r44294)
@@ -197,7 +197,7 @@
my ( $op_info, $op_func, $getop );
$op_info = $op_func = 'NULL';
- $getop = '( int (*)(const char *, int) )NULL';
+ $getop = '( int (*)(PARROT_INTERP, const char *, int) )NULL';
if ($self->{suffix} eq '') {
$op_func = $self->{bs} . "op_func_table";
@@ -559,7 +559,7 @@
if ( $self->{suffix} eq '' && !$self->{flag}->{dynamic} ) {
print $fh <<END_C_2;
-static int get_op(const char * name, int full);
+static int get_op(PARROT_INTERP, const char * name, int full);
END_C_2
}
@@ -892,9 +892,9 @@
} HOP;
static HOP **hop;
-static void hop_init(void);
+static void hop_init(PARROT_INTERP);
static size_t hash_str(const char *str);
-static void store_op(op_info_t *info, int full);
+static void store_op(PARROT_INTERP, op_info_t *info, int full);
/* XXX on changing interpreters, this should be called,
through a hook */
@@ -923,8 +923,8 @@
return key;
}
-static void store_op(op_info_t *info, int full) {
- HOP * const p = mem_allocate_typed(HOP);
+static void store_op(PARROT_INTERP, op_info_t *info, int full) {
+ HOP * const p = mem_gc_allocate_zeroed_typed(interp, HOP);
const size_t hidx =
hash_str(full ? info->full_name : info->name) % OP_HASH_SIZE;
@@ -932,12 +932,12 @@
p->next = hop[hidx];
hop[hidx] = p;
}
-static int get_op(const char * name, int full) {
+static int get_op(PARROT_INTERP, const char * name, int full) {
const HOP * p;
const size_t hidx = hash_str(name) % OP_HASH_SIZE;
if (!hop) {
- hop = mem_allocate_n_zeroed_typed(OP_HASH_SIZE,HOP *);
- hop_init();
+ hop = mem_gc_allocate_n_zeroed_typed(interp, OP_HASH_SIZE,HOP *);
+ hop_init(interp);
}
for (p = hop[hidx]; p; p = p->next) {
if(STREQ(name, full ? p->info->full_name : p->info->name))
@@ -945,16 +945,16 @@
}
return -1;
}
-static void hop_init(void) {
+static void hop_init(PARROT_INTERP) {
size_t i;
op_info_t * const info = $self->{bs}op_lib.op_info_table;
/* store full names */
for (i = 0; i < $self->{bs}op_lib.op_count; i++)
- store_op(info + i, 1);
+ store_op(interp, info + i, 1);
/* plus one short name */
for (i = 0; i < $self->{bs}op_lib.op_count; i++)
- if (get_op(info[i].name, 0) == -1)
- store_op(info + i, 0);
+ if (get_op(interp, info[i].name, 0) == -1)
+ store_op(interp, info + i, 0);
}
static void hop_deinit(void)
{
@@ -1063,7 +1063,7 @@
$self->{sym_export} PMC*
$load_func(PARROT_INTERP)
{
- PMC *const lib = pmc_new(interp, enum_class_ParrotLibrary);
+ PMC *const lib = Parrot_pmc_new(interp, enum_class_ParrotLibrary);
((Parrot_ParrotLibrary_attributes*)PMC_data(lib))->oplib_init = (void *) $self->{init_func};
dynop_register(interp, lib);
return lib;
Modified: branches/boehm_gc_2/lib/Parrot/Pmc2c/Attribute.pm
==============================================================================
--- branches/boehm_gc_2/lib/Parrot/Pmc2c/Attribute.pm Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/lib/Parrot/Pmc2c/Attribute.pm Mon Feb 22 12:30:02 2010 (r44294)
@@ -207,7 +207,7 @@
}
elsif ($attrtype eq "INTVAL") {
$decl .= <<"EOA";
- PMC * const attr_value = pmc_new(interp, enum_class_Integer); \\
+ PMC * const attr_value = Parrot_pmc_new(interp, enum_class_Integer); \\
VTABLE_set_integer_native(interp, attr_value, value); \\
VTABLE_set_attr_str(interp, pmc, \\
Parrot_str_new_constant(interp, "$attrname"), attr_value); \\
@@ -215,7 +215,7 @@
}
elsif ($attrtype eq "FLOATVAL") {
$decl .= <<"EOA";
- PMC * const attr_value = pmc_new(interp, enum_class_Float); \\
+ PMC * const attr_value = Parrot_pmc_new(interp, enum_class_Float); \\
VTABLE_set_number_native(interp, attr_value, value); \\
VTABLE_set_attr_str(interp, pmc, \\
Parrot_str_new_constant(interp, "$attrname"), attr_value); \\
@@ -223,7 +223,7 @@
}
elsif ($attrtype =~ $isptrtostring) {
$decl .= <<"EOA";
- PMC * const attr_value = pmc_new(interp, enum_class_String); \\
+ PMC * const attr_value = Parrot_pmc_new(interp, enum_class_String); \\
VTABLE_set_string_native(interp, attr_value, value); \\
VTABLE_set_attr_str(interp, pmc, \\
Parrot_str_new_constant(interp, "$attrname"), attr_value); \\
Modified: branches/boehm_gc_2/lib/Parrot/Pmc2c/MethodEmitter.pm
==============================================================================
--- branches/boehm_gc_2/lib/Parrot/Pmc2c/MethodEmitter.pm Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/lib/Parrot/Pmc2c/MethodEmitter.pm Mon Feb 22 12:30:02 2010 (r44294)
@@ -115,58 +115,6 @@
EOC
}
-=item C<proto($type,$parameters)>
-
-Determines the prototype (argument signature) for a method body
-(see F<src/call_list>).
-
-=cut
-
-my %calltype = (
- 'char' => 'c',
- 'short' => 's',
- 'char' => 'c',
- 'short' => 's',
- 'int' => 'i',
- 'INTVAL' => 'I',
- 'float' => 'f',
- 'FLOATVAL' => 'N',
- 'double' => 'd',
- 'STRING*' => 'S',
- 'STRING *' => 'S',
- 'char*' => 't',
- 'char *' => 't',
- 'PMC*' => 'P',
- 'PMC *' => 'P',
- 'short*' => '2',
- 'short *' => '2',
- 'int*' => '3',
- 'int *' => '3',
- 'long*' => '4',
- 'long *' => '4',
- 'void' => 'v',
- 'void*' => 'b',
- 'void *' => 'b',
- 'void**' => 'B',
- 'void **' => 'B',
-);
-
-sub proto {
- my ( $type, $parameters ) = @_;
-
- # reduce to a comma separated set of types
- $parameters =~ s/\w+(,|$)/,/g;
- $parameters =~ s/ //g;
-
- # type method(interp, self, parameters...)
- my $ret = $calltype{ $type or "void" };
- $ret .= "JO" . join( '',
- map { $calltype{$_} or die "Unknown signature type '$_'" }
- split( /,/, $parameters ) );
-
- return $ret;
-}
-
=item C<rewrite_nci_method($self, $pmc )>
Rewrites the method body performing the various macro substitutions for
Modified: branches/boehm_gc_2/lib/Parrot/Pmc2c/PMCEmitter.pm
==============================================================================
--- branches/boehm_gc_2/lib/Parrot/Pmc2c/PMCEmitter.pm Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/lib/Parrot/Pmc2c/PMCEmitter.pm Mon Feb 22 12:30:02 2010 (r44294)
@@ -251,54 +251,6 @@
unless $self->is_dynamic;
}
-=item C<proto($type,$parameters)>
-
-Determines the prototype (argument signature) for a method body
-(see F<src/call_list>).
-
-=cut
-
-my %calltype = (
- "char" => "c",
- "short" => "s",
- "char" => "c",
- "short" => "s",
- "int" => "i",
- "INTVAL" => "I",
- "float" => "f",
- "FLOATVAL" => "N",
- "double" => "d",
- "STRING*" => "S",
- "char*" => "t",
- "PMC*" => "P",
- "short*" => "2",
- "int*" => "3",
- "long*" => "4",
- "void" => "v",
- "void*" => "b",
- "void**" => "B",
-);
-
-sub proto {
- my ( $type, $parameters ) = @_;
-
- # reduce to a comma separated set of types
- $parameters =~ s/\w+(,|$)/,/g;
- $parameters =~ s/ //g;
-
- # flatten whitespace before "*" in return value
- $type =~ s/\s+\*$/\*/ if defined $type;
-
- # type method(interp, self, parameters...)
- my $ret = $calltype{ $type or "void" }
- . "JO"
- . join( '',
- map { $calltype{$_} or die "Unknown signature type '$_'" }
- split( /,/, $parameters ) );
-
- return $ret;
-}
-
=item C<pre_method_gen>
Generate switch-bases VTABLE for MULTI
@@ -704,7 +656,7 @@
}
/* set up MRO and _namespace */
- Parrot_create_mro(interp, entry);
+ Parrot_pmc_create_mro(interp, entry);
EOC
# declare each nci method for this class
@@ -878,7 +830,7 @@
PARROT_WARN_UNUSED_RESULT
PMC* Parrot_${classname}_get_mro(PARROT_INTERP, PMC* mro) {
if (PMC_IS_NULL(mro)) {
- mro = pmc_new(interp, enum_class_ResizableStringArray);
+ mro = Parrot_pmc_new(interp, enum_class_ResizableStringArray);
}
$get_mro
VTABLE_unshift_string(interp, mro,
Modified: branches/boehm_gc_2/lib/Parrot/Pmc2c/UtilFunctions.pm
==============================================================================
--- branches/boehm_gc_2/lib/Parrot/Pmc2c/UtilFunctions.pm Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/lib/Parrot/Pmc2c/UtilFunctions.pm Mon Feb 22 12:30:02 2010 (r44294)
@@ -163,7 +163,7 @@
int pass;
/* create a library PMC */
- pmc = constant_pmc_new(interp, enum_class_ParrotLibrary);
+ pmc = Parrot_pmc_new_constant(interp, enum_class_ParrotLibrary);
/* TODO: stuff some info into this PMC's props */
@@ -173,7 +173,7 @@
my $lhs = $info->{flags}{no_init} ? "" : "type$class = ";
$cout .= <<"EOC";
whoami = CONST_STRING_GEN(interp, "$class");
- ${lhs}pmc_register(interp, whoami);
+ ${lhs}Parrot_pmc_register_new_type(interp, whoami);
EOC
}
$cout .= <<"EOC";
Modified: branches/boehm_gc_2/runtime/parrot/include/test_more.pir
==============================================================================
--- branches/boehm_gc_2/runtime/parrot/include/test_more.pir Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/runtime/parrot/include/test_more.pir Mon Feb 22 12:30:02 2010 (r44294)
@@ -20,7 +20,7 @@
.local pmc exports, curr_namespace, test_namespace
curr_namespace = get_namespace
test_namespace = get_root_namespace [ 'parrot'; 'Test'; 'More' ]
- exports = split ' ', 'plan diag ok nok is is_deeply like substring isa_ok skip isnt todo throws_like lives_ok dies_ok throws_substring'
+ exports = split ' ', 'plan diag ok nok is is_deeply is_null like substring isa_ok skip isnt todo throws_like lives_ok dies_ok throws_substring'
test_namespace.'export_to'(curr_namespace, exports)
Modified: branches/boehm_gc_2/runtime/parrot/library/Configure/genfile.pir
==============================================================================
--- branches/boehm_gc_2/runtime/parrot/library/Configure/genfile.pir Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/runtime/parrot/library/Configure/genfile.pir Mon Feb 22 12:30:02 2010 (r44294)
@@ -44,15 +44,19 @@
.param string tmpl
.param string outfile
.param pmc config
+ .param int verbose :named('verbose') :optional
+ .param int has_verbose :opt_flag
$S0 = slurp(tmpl)
$S0 = conditioned_line($S0, config)
$S0 = interpolate_var($S0, config)
$S1 = sysinfo .SYSINFO_PARROT_OS
$S0 = replace_slash($S0, $S1)
spew(outfile, $S0)
- printerr "\n\tGenerating '"
- printerr outfile
- printerr "'\n\n"
+ unless has_verbose goto L1
+ unless verbose goto L1
+ print "generate "
+ say outfile
+ L1:
.end
.sub 'slurp' :anon
Modified: branches/boehm_gc_2/runtime/parrot/library/Math/Rand.pir
==============================================================================
--- branches/boehm_gc_2/runtime/parrot/library/Math/Rand.pir Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/runtime/parrot/library/Math/Rand.pir Mon Feb 22 12:30:02 2010 (r44294)
@@ -52,9 +52,7 @@
.namespace [ 'Math'; 'Rand' ]
.sub '__onload' :anon :load
-# print "__onload Math::Rand\n"
- new $P0, 'Integer'
- set $P0, 1
+ $P0 = box 1
set_global 'next', $P0
.end
Deleted: branches/boehm_gc_2/runtime/parrot/library/Math/Random/mt19937ar.pir
==============================================================================
--- branches/boehm_gc_2/runtime/parrot/library/Math/Random/mt19937ar.pir Mon Feb 22 12:30:02 2010 (r44293)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,379 +0,0 @@
-# Copyright (C) 2008, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-Math/Random/mt19937ar.pir - the Mersenne Twisted pseudorandom number generator
-
-=head1 DESCRIPTION
-
-This is a PIR version of the C-program for MT19937.
-
-The MT19937 algorithm was created by Makoto Matsumoto and Takuji Nishimura.
-
-See L<http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html> and
-L<http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/emt19937ar.html>.
-
-=cut
-
-.namespace [ 'Math'; 'Random'; 'MT' ]
-
-.sub '__onload' :anon :load
-# print "__onload Math::Random::MT\n"
- $P0 = newclass ['Math'; 'Random'; 'MT']
- addattribute $P0, '@mt'
- addattribute $P0, '$mti'
- addattribute $P0, '@mag01'
-.end
-
-.const int N = 624
-.const int M = 397
-.const int MATRIX_A = 0x9908b0df
-.const int UPPER_MASK = 0x80000000
-.const int LOWER_MASK = 0x7fffffff
-
-.sub 'init' :vtable :method
- new $P0, 'Integer'
- set $P0, N
- inc $P0 # $mti == N+1 means @mt is not initialized
- setattribute self, '$mti', $P0
- new $P0, 'FixedIntegerArray'
- set $P0, N
- setattribute self, '@mt', $P0
- new $P0, 'FixedIntegerArray'
- set $P0, 2
- $P0[0] = 0
- $P0[1] = MATRIX_A
- setattribute self, '@mag01', $P0
-.end
-
-
-.sub 'clone' :vtable :method
- .local pmc res
- res = new [ 'Math'; 'Random'; 'MT' ]
- $P0 = getattribute self, '$mti'
- $P1 = clone $P0
- setattribute res, '$mti', $P1
- $P0 = getattribute self, '@mt'
- $P1 = clone $P0
- setattribute res, '@mt', $P1
- .return (res)
-.end
-
-
-=head2 Initialization
-
-=over 4
-
-=item C<init_genrand (seed)>
-
-initializes the state vector by using one "seed", which may be zero.
-
-=cut
-
-.sub 'init_genrand' :method
- .param int seed
- .local pmc mt
- .local int i
- mt = getattribute self, '@mt'
- seed &= 0xffffffff
- mt[0] = seed
- $I1 = seed
- i = 1
- L1:
- unless i < N goto L2
- $I0 = $I1 >>> 30
- bxor $I0, $I1
- $I0 *= 1812433253
- $I0 += i
- $I0 &= 0xffffffff
- mt[i] = $I0
- $I1 = $I0
- inc i
- goto L1
- L2:
- .local pmc mti
- mti = getattribute self, '$mti'
- set mti, i
-.end
-
-
-=item C<init_by_array (init_key)>
-
-initializes the state vector by using an array.
-
-=cut
-
-.sub 'init_by_array' :method
- .param pmc init_key
- .local pmc mt
- mt = getattribute self, '@mt'
- .local int i, j, k, key_length
- self.'init_genrand'(19650218)
- i = 1
- j = 0
- key_length = elements init_key
- k = key_length
- unless N > k goto L0
- k = N
- L0:
- L1:
- unless k goto L2
- $I0 = i - 1
- $I1 = mt[$I0]
- $I2 = $I1 >>> 30
- bxor $I2, $I1
- $I2 *= 1664525
- $I1 = mt[i]
- bxor $I1, $I2
- $I2 = init_key[j]
- $I1 += $I2
- $I1 += j
- $I1 &= 0xffffffff
- mt[i] = $I1
- inc i
- inc j
- unless i >= N goto L3
- $I0 = N - 1
- $I1 = mt[$I0]
- mt[0] = $I1
- i = 1
- L3:
- unless j >= key_length goto L4
- j = 0
- L4:
- dec k
- goto L1
- L2:
- k = N - 1
- L5:
- unless k goto L6
- $I0 = i - 1
- $I1 = mt[$I0]
- $I2 = $I1 >>> 30
- bxor $I2, $I1
- $I2 *= 1566083941
- $I1 = mt[i]
- bxor $I1, $I2
- $I1 -= i
- $I1 &= 0xffffffff
- mt[i] = $I1
- inc i
- unless i >= N goto L7
- $I0 = N - 1
- $I1 = mt[$I0]
- mt[0] = $I1
- i = 1
- L7:
- dec k
- goto L5
- L6:
- mt[0] = 0x80000000
- $I1 = mt[0]
-.end
-
-=back
-
-=head2 Generation
-
-After initialization, the following type of pseudorandom numbers are available.
-
-=over 4
-
-=item C<genrand_int32 ()>
-
-generates a random number on [0,0xffffffff]-interval
-
-=cut
-
-.sub 'genrand_int32' :method
- .local int y
- .local pmc mt
- mt = getattribute self, '@mt'
- .local pmc mti
- mti = getattribute self, '$mti'
- .local pmc mag01
- mag01 = getattribute self, '@mag01'
- unless mti >= N goto L1 # generate N words at one time
- $I0 = N + 1
- unless mti == $I0 goto L2 # if init_genrand() has not been called
- self.'init_genrand'(5489) # a default seed is used
- L2:
- .local int kk
- kk = 0
- L3:
- $I0 = N - M
- unless kk < $I0 goto L4
- $I0 = kk
- $I1 = mt[$I0]
- $I1 &= UPPER_MASK
- $I0 = kk + 1
- $I2 = mt[$I0]
- $I2 &= LOWER_MASK
- y = $I1 | $I2
- $I0 = kk + M
- $I1 = mt[$I0]
- $I2 = y >>> 1
- bxor $I1, $I2
- $I0 = y & 1
- $I2 = mag01[$I0]
- bxor $I1, $I2
- mt[kk] = $I1
- inc kk
- goto L3
- L4:
- $I0 = N - 1
- unless kk < $I0 goto L5
- $I0 = kk
- $I1 = mt[$I0]
- $I1 &= UPPER_MASK
- $I0 = kk + 1
- $I2 = mt[$I0]
- $I2 &= LOWER_MASK
- y = $I1 | $I2
- $I0 = M - N
- $I0 += kk
- $I1 = mt[$I0]
- $I2 = y >>> 1
- bxor $I1, $I2
- $I0 = y & 1
- $I2 = mag01[$I0]
- bxor $I1, $I2
- mt[kk] = $I1
- inc kk
- goto L4
- L5:
- $I0 = N - 1
- $I1 = mt[$I0]
- $I1 &= UPPER_MASK
- $I0 = 0
- $I2 = mt[$I0]
- $I2 &= LOWER_MASK
- y = $I1 | $I2
- $I0 = M - 1
- $I1 = mt[$I0]
- $I2 = y >>> 1
- bxor $I1, $I2
- $I0 = y & 1
- $I2 = mag01[$I0]
- bxor $I1, $I2
- $I0 = N - 1
- mt[$I0] = $I1
- set mti, 0
- L1:
- y = mt[mti]
- inc mti
- # Tempering
- $I0 = y >>> 11
- bxor y, $I0
- $I0 = y << 7
- $I0 &= 0x9d2c5680
- bxor y, $I0
- $I0 = y << 15
- $I0 &= 0xefc60000
- bxor y, $I0
- $I0 = y >>> 18
- bxor y, $I0
- .return (y)
-.end
-
-
-=item C<genrand_int31 ()>
-
-generates a random number on [0,0x7fffffff]-interval
-
-=cut
-
-.sub 'genrand_int31' :method
- $I0 = self.'genrand_int32'()
- $I0 >>>= 1
- .return ($I0)
-.end
-
-
-=item C<genrand_real1 ()>
-
-generates a random number on [0,1]-real-interval
-
-=cut
-
-.sub 'genrand_real1' :method
- $I0 = self.'genrand_int32'()
- $N0 = $I0
- unless $I0 < 0 goto L1
- $N0 += 4294967296.0
- L1:
- $N0 /= 4294967295.0 # divided by 2^32-1
- .return ($N0)
-.end
-
-
-=item C<genrand_real2 ()>
-
-generates a random number on [0,1)-real-interval
-
-=cut
-
-.sub 'genrand_real2' :method
- $I0 = self.'genrand_int32'()
- $N0 = $I0
- unless $I0 < 0 goto L1
- $N0 += 4294967296.0
- L1:
- $N0 /= 4294967296.0 # divided by 2^32
- .return ($N0)
-.end
-
-
-=item C<genrand_real3 ()>
-
-generates a random number on (0,1)-real-interval
-
-=cut
-
-.sub 'genrand_real3' :method
- $I0 = self.'genrand_int32'()
- $N0 = $I0
- unless $I0 < 0 goto L1
- $N0 += 4294967296.0
- L1:
- $N0 += 0.5
- $N0 /= 4294967296.0 # divided by 2^32
- .return ($N0)
-.end
-
-
-=item C<genrand_res53 ()>
-
-generates a random number on [0,1) with 53-bit resolution
-
-=cut
-
-.sub 'genrand_res53' :method
- $I1 = self.'genrand_int32'()
- $I1 >>>= 5
- $N1 = $I1
- $I2 = self.'genrand_int32'()
- $I2 >>>= 6
- $N2 = $I2
- $N0 = $N1 * 67108864.0
- $N0 += $N2
- $N0 /= 9007199254740992.0
- .return ($N0)
-.end
-
-
-=back
-
-=head1 AUTHORS
-
-Francois Perrad
-
-=cut
-
-
-# Local Variables:
-# mode: pir
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/boehm_gc_2/runtime/parrot/library/OpenGL.pir
==============================================================================
--- branches/boehm_gc_2/runtime/parrot/library/OpenGL.pir Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/runtime/parrot/library/OpenGL.pir Mon Feb 22 12:30:02 2010 (r44294)
@@ -91,6 +91,7 @@
load_bytecode 'OpenGL_funcs.pbc'
_load_opengl_libs()
_wrap_opengl_entry_points()
+ _load_nci_thunks()
_export_opengl_functions()
.end
@@ -241,6 +242,25 @@
=back
+=head2 Thunk Loading
+
+These routines ensure that all NCI thunks necessary for calling OpenGL functions are
+available to Parrot.
+
+=cut
+
+.sub _load_nci_thunks
+ # load the nci thunks
+ .local pmc ns, loader
+ ns = get_namespace
+ loader = ns['Parrot_glut_nci_loader']
+ loader()
+
+ # delete loader the function, it isn't for public consumption
+ $P0 = new ['Undef']
+ set_global 'Parrot_glut_nci_loader', $P0
+.end
+
=head2 Symbol Export
These routines allow OpenGL symbols to exported to other namespaces to more
Modified: branches/boehm_gc_2/runtime/parrot/library/P6object.pir
==============================================================================
--- branches/boehm_gc_2/runtime/parrot/library/P6object.pir Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/runtime/parrot/library/P6object.pir Mon Feb 22 12:30:02 2010 (r44294)
@@ -819,7 +819,7 @@
# If this fails, and we want Any, and it's something form outside
# of the Perl 6 world, we'd best just accept it.
unless $S0 == 'Any' goto end
- $I0 = isa topicwhat, 'Perl6Object'
+ $I0 = isa topicwhat, 'Mu'
unless $I0 goto accept_anyway
$I0 = 0
goto end
Modified: branches/boehm_gc_2/runtime/parrot/library/SDL.pir
==============================================================================
--- branches/boehm_gc_2/runtime/parrot/library/SDL.pir Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/runtime/parrot/library/SDL.pir Mon Feb 22 12:30:02 2010 (r44294)
@@ -88,6 +88,18 @@
.local pmc libsdl
.local pmc sdl_function
+ .local pmc env
+ env = new 'Env'
+ .local string sdlpath
+ say'Hu'
+ sdlpath = env['SDLLIBPATH']
+ if sdlpath == '' goto default_locations
+ say sdlpath
+ loadlib libsdl, sdlpath
+ if libsdl goto OK
+ goto failed
+
+default_locations:
loadlib libsdl, 'libSDL'
if libsdl goto OK
@@ -103,6 +115,7 @@
loadlib libsdl, 'cygSDL-1-2-0'
if libsdl goto OK
+failed:
# failed to load libSDL
$P0 = new 'Exception'
$P0 = "libSDL not found!"
@@ -224,7 +237,7 @@
initialize:
.local pmc nci_sub
- dlfunc nci_sub, ttf_lib, 'TTF_Init', 'iv'
+ dlfunc nci_sub, ttf_lib, 'TTF_Init', 'i'
unless nci_sub goto error
set_hll_global ['SDL::NCI::TTF'], 'Init', nci_sub
@@ -238,7 +251,7 @@
error:
.local pmc e
e = new 'Exception'
- e[0] = "SDL_ttf not initialized\n"
+ e['message'] = "SDL_ttf not initialized\n"
throw e
success:
Modified: branches/boehm_gc_2/runtime/parrot/library/Test/More.pir
==============================================================================
--- branches/boehm_gc_2/runtime/parrot/library/Test/More.pir Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/runtime/parrot/library/Test/More.pir Mon Feb 22 12:30:02 2010 (r44294)
@@ -35,6 +35,8 @@
is( some_pmc, another_pmc, 'pmc comparison uses "eq" op' )
+ is_null( some_pmc, 'pmc was null' )
+
diag( 'this may take a while' )
is_deeply( some_deep_pmc, another_deep_pmc, 'deep structure comparison' )
@@ -155,6 +157,20 @@
=cut
+.sub one_or_both_null
+ .param pmc left
+ .param pmc right
+
+ .local int one
+ .local int both
+
+ $I0 = isnull left
+ $I1 = isnull right
+ or one, $I0, $I1
+ and both, $I0, $I1
+ .return (one, both)
+.end
+
.sub is :multi(PMC, Integer)
.param pmc left
.param pmc right
@@ -164,11 +180,17 @@
.local pmc test
get_hll_global test, [ 'Test'; 'More' ], '_test'
- .local int l, r, pass
+ .local int pass
+ ($I0, pass) = one_or_both_null(left, right)
+ if $I0 goto report
+
+ .local int l, r
l = left
r = right
+
pass = iseq l, r
+report:
test.'ok'( pass, description )
if pass goto done
@@ -176,17 +198,27 @@
.local string l_string
.local string r_string
+ l_string = 'null'
+ if null left goto r_str
l_string = left
+
+r_str:
+ r_string = 'null'
+ if null right goto diag
r_string = right
+diag:
diagnostic = _make_diagnostic( l_string, r_string )
test.'diag'( diagnostic )
done:
.end
-.sub is :multi(_, Float)
- .param num left
- .param num right
+#.sub is :multi(_, Float)
+# .param num left
+# .param num right
+.sub is :multi(PMC, Float)
+ .param pmc left
+ .param pmc right
.param string description :optional
.param int have_desc :opt_flag
.param num precision :optional
@@ -195,15 +227,23 @@
.local pmc test
get_hll_global test, [ 'Test'; 'More' ], '_test'
+ .local int pass
+
+ ($I0, pass) = one_or_both_null(left, right)
+ if $I0 goto report
+
+ .local num l, r
+ l = left
+ r = right
+
if have_prec goto check_precision
- .local int pass
- pass = iseq left, right
+ pass = iseq l, r
goto report
check_precision:
.local num diff
- diff = left - right
+ diff = l - r
diff = abs diff
pass = isle diff, precision
@@ -215,10 +255,17 @@
.local string l_string
.local string r_string
+ l_string = 'null'
+ if null left goto r_str
l_string = left
+
+r_str:
+ r_string = 'null'
+ if null right goto diag
r_string = right
- diagnostic = _make_diagnostic( left, right )
+diag:
+ diagnostic = _make_diagnostic( l_string, r_string )
test.'diag'( diagnostic )
done:
.end
@@ -232,12 +279,16 @@
.local pmc test
get_hll_global test, [ 'Test'; 'More' ], '_test'
- .local string l, r
.local int pass
- l = left
- r = right
+ ($I0, pass) = one_or_both_null(left, right)
+ if $I0 goto report
+
+ .local string l, r
+ l = left
+ r = right
pass = iseq l, r
+report:
test.'ok'( pass, description )
if pass goto done
@@ -245,9 +296,16 @@
.local string l_string
.local string r_string
+ l_string = 'null'
+ if null left goto r_str
l_string = left
+
+r_str:
+ r_string = 'null'
+ if null right goto diag
r_string = right
+diag:
diagnostic = _make_diagnostic( l_string, r_string )
test.'diag'( diagnostic )
done:
@@ -263,8 +321,11 @@
get_hll_global test, [ 'Test'; 'More' ], '_test'
.local int pass
- .local int does_type
+ ($I0, pass) = one_or_both_null(left, right)
+ if $I0 goto result
+
+ .local int does_type
does_type = does right, 'String'
if does_type goto check_string
@@ -300,9 +361,16 @@
.local string l_string
.local string r_string
+ l_string = 'null'
+ if null left goto r_str
l_string = left
+
+r_str:
+ r_string = 'null'
+ if null right goto diag
r_string = right
+diag:
diagnostic = _make_diagnostic( l_string, r_string )
test.'diag'( diagnostic )
done:
@@ -324,7 +392,9 @@
get_hll_global test, [ 'Test'; 'More' ], '_test'
.local int pass
- pass = 0
+
+ ($I0, pass) = one_or_both_null(left, right)
+ if $I0 goto report
if left != right goto pass_it
goto report
@@ -359,7 +429,9 @@
get_hll_global test, [ 'Test'; 'More' ], '_test'
.local int pass
- pass = 0
+
+ ($I0, pass) = one_or_both_null(left, right)
+ if $I0 goto report
ne left, right, pass_it
goto report
@@ -394,7 +466,9 @@
get_hll_global test, [ 'Test'; 'More' ], '_test'
.local int pass
- pass = 0
+
+ ($I0, pass) = one_or_both_null(left, right)
+ if $I0 goto report
ne left, right, pass_it
goto report
@@ -428,8 +502,12 @@
.local pmc test
get_hll_global test, [ 'Test'; 'More' ], '_test'
- # this comparison may not work in general, but it's worth trying
.local int pass
+
+ ($I0, pass) = one_or_both_null(left, right)
+ if $I0 goto report
+
+ # this comparison may not work in general, but it's worth trying
pass = isne left, right
report:
@@ -848,6 +926,37 @@
.return( equal )
.end
+=item C<is_null( pmc, description )>
+
+Records a passing test if the PMC passed in is null, fails otherwise.
+
+=cut
+
+.sub is_null
+ .param pmc victim
+ .param string description :optional
+
+ .local pmc test
+ get_hll_global test, [ 'Test'; 'More' ], '_test'
+
+ .local int passed
+ passed = isnull victim
+
+ test.'ok'( passed, description )
+ if passed goto done
+
+ .local string v_string
+ v_string = 'null'
+ if null victim goto diag
+ v_string = victim
+
+ diag:
+ .local string diagnostic
+ diagnostic = _make_diagnostic( v_string, 'null')
+ test.'diag'( diagnostic )
+ done:
+.end
+
=item C<dies_ok( codestring, description )>
Takes PIR code in C<codestring> and an optional message in C<description>.
Modified: branches/boehm_gc_2/runtime/parrot/library/distutils.pir
==============================================================================
--- branches/boehm_gc_2/runtime/parrot/library/distutils.pir Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/runtime/parrot/library/distutils.pir Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,4 +1,4 @@
-# Copyright (C) 2009, Parrot Foundation.
+# Copyright (C) 2009-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -14,7 +14,7 @@
to a wider audience with very little overhead for build/release/install mechanics.
All the rules needed (dynops, dynpmc, pbc_to_exe, nqp, ...) are coded in this module distutils.
-A module author just must write a script C<setup.pir> (or C<setup.nqp> in future).
+A module author just must write a script C<setup.pir> or C<setup.nqp>.
A setup script can be as simple as this:
@@ -194,6 +194,8 @@
L<http://bitbucket.org/riffraff/shakespeare-parrot/src/tip/setup.pir>
+L<http://gitorious.org/kakapo/kakapo/blobs/master/setup.nqp>
+
=cut
.sub '__onload' :load :init :anon
@@ -212,6 +214,8 @@
register_step_after('build', _build_pir_nqp)
.const 'Sub' _build_pir_nqp_rx = '_build_pir_nqp_rx'
register_step_after('build', _build_pir_nqp_rx)
+ .const 'Sub' _build_pir_pir = '_build_pir_pir'
+ register_step_after('build', _build_pir_pir)
.const 'Sub' _build_pbc_pir = '_build_pbc_pir'
register_step_after('build', _build_pbc_pir)
.const 'Sub' _build_pbc_pbc = '_build_pbc_pbc'
@@ -235,6 +239,8 @@
register_step_after('clean', _clean_pir_nqp)
.const 'Sub' _clean_pir_nqp_rx = '_clean_pir_nqp_rx'
register_step_after('clean', _clean_pir_nqp_rx)
+ .const 'Sub' _clean_pir_pir = '_clean_pir_pir'
+ register_step_after('clean', _clean_pir_pir)
.const 'Sub' _clean_pbc_pir = '_clean_pbc_pir'
register_step_after('clean', _clean_pbc_pir)
.const 'Sub' _clean_pbc_pbc = '_clean_pbc_pbc'
@@ -450,15 +456,27 @@
Overload the default message
+=item setup
+
+the default value is setup.pir
+
=back
=cut
.sub '_usage' :anon
.param pmc kv :slurpy :named
- .local string msg
- msg = <<'USAGE'
-usage: parrot setup.pir [target|--key value]*
+ .local string setup
+ setup = get_value('setup', "setup.pir" :named('default'), kv :flat :named)
+ .local string command
+ command = _command_setup(setup)
+
+ $P0 = new 'FixedStringArray'
+ set $P0, 1
+ $P0[0] = command
+
+ $S0 = <<'USAGE'
+usage: %s [target|--key value]*
Default targets are :
@@ -482,7 +500,8 @@
help: Print this help message.
USAGE
- $S0 = get_value('usage', msg :named('default'), kv :flat :named)
+ $S0 = sprintf $S0, $P0
+ $S0 = get_value('usage', $S0 :named('default'), kv :flat :named)
say $S0
.end
@@ -695,7 +714,7 @@
L2:
.end
-=item pir_nqp-rx
+=item pir_nqp-rx / pir_nqprx
hash
@@ -712,6 +731,11 @@
$P0 = kv['pir_nqp-rx']
build_pir_nqp_rx($P0)
L1:
+ $I0 = exists kv['pir_nqprx']
+ unless $I0 goto L2
+ $P0 = kv['pir_nqprx']
+ build_pir_nqp_rx($P0)
+ L2:
.end
.sub 'build_pir_nqp_rx'
@@ -735,6 +759,50 @@
L2:
.end
+=item pir_pir (concat)
+
+hash
+
+the key is the PIR pathname
+
+the value is an array of PIR pathname
+
+=cut
+
+.sub '_build_pir_pir' :anon
+ .param pmc kv :slurpy :named
+ $I0 = exists kv['pir_pir']
+ unless $I0 goto L1
+ $P0 = kv['pir_pir']
+ build_pir_pir($P0)
+ L1:
+.end
+
+.sub 'build_pir_pir'
+ .param pmc hash
+ $P0 = iter hash
+ L1:
+ unless $P0 goto L2
+ .local string pir, src
+ pir = shift $P0
+ .local pmc srcs
+ srcs = hash[pir]
+ $I0 = newer(pir, srcs)
+ if $I0 goto L1
+ spew(pir, '', 1 :named('verbose'))
+ $P1 = iter srcs
+ L3:
+ unless $P1 goto L4
+ .local string src
+ src = shift $P1
+ $S0 = slurp(src)
+ append(pir, $S0)
+ goto L3
+ L4:
+ goto L1
+ L2:
+.end
+
=item pbc_pbc
hash
@@ -1075,9 +1143,11 @@
hash
-the key is the group name
+the key is the PMC name
+
+the value is an array of PMC pathname or a single PPC pathname
-the value is an array of PMC pathname
+an array creates a PMC group
=item dynpmc_cflags
@@ -1108,10 +1178,12 @@
$P0 = iter hash
L1:
unless $P0 goto L2
- .local string group
- group = shift $P0
+ .local string name
+ name = shift $P0
.local pmc srcs
- srcs = hash[group]
+ srcs = hash[name]
+ $I0 = does srcs, 'array'
+ unless $I0 goto L5
$P1 = iter srcs
L3:
unless $P1 goto L4
@@ -1123,11 +1195,18 @@
__build_dynpmc(src, cflags)
goto L3
L4:
- if group == '' goto L1
- $S0 = _mk_path_dynpmc(group, load_ext)
+ $S0 = _mk_path_dynpmc(name, load_ext)
$I0 = newer($S0, srcs)
if $I0 goto L1
- __build_dynpmc_group(srcs, group, cflags, ldflags)
+ __build_dynpmc_group(srcs, name, cflags, ldflags)
+ goto L1
+ L5:
+ src = srcs
+ $S0 = _mk_path_dynpmc(name, load_ext)
+ $I0 = newer($S0, src)
+ if $I0 goto L1
+ __build_dynpmc(src, cflags)
+ __build_dynpmc_alone(src, name, cflags, ldflags)
goto L1
L2:
.end
@@ -1269,6 +1348,50 @@
L6:
.end
+.sub '__build_dynpmc_alone' :anon
+ .param string src
+ .param string name
+ .param string cflags
+ .param string ldflags
+ .local pmc config
+ config = get_config()
+
+ .local string dynext
+ $S0 = config['load_ext']
+ dynext = _mk_path_dynpmc(name, $S0)
+ .local string cmd
+ cmd = config['ld']
+ cmd .= " "
+ $S0 = config['ld_out']
+ cmd .= $S0
+ cmd .= dynext
+ cmd .= " "
+ $S0 = config['o']
+ $S0 = _mk_path_gen_dynpmc(src, $S0)
+ cmd .= $S0
+ cmd .= " "
+ $S0 = get_ldflags()
+ cmd .= $S0
+ cmd .= " "
+ $S0 = config['ld_load_flags']
+ cmd .= $S0
+ cmd .= " "
+ $I0 = config['parrot_is_shared']
+ unless $I0 goto L5
+ $S0 = config['inst_libparrot_ldflags']
+ cmd .= $S0
+ cmd .= " "
+ L5:
+ cmd .= ldflags
+ system(cmd, 1 :named('verbose'))
+
+ $I0 = _has_strip(cflags)
+ unless $I0 goto L6
+ cmd = "strip " . dynext
+ system(cmd, 1 :named('verbose'))
+ L6:
+.end
+
.sub '_mk_path_dynpmc' :anon
.param string group
.param string load_ext
@@ -1375,6 +1498,19 @@
L2:
.end
+=item pir_pir
+
+=cut
+
+.sub '_clean_pir_pir' :anon
+ .param pmc kv :slurpy :named
+ $I0 = exists kv['pir_pir']
+ unless $I0 goto L1
+ $P0 = kv['pir_pir']
+ clean_key($P0)
+ L1:
+.end
+
=item pir_pge
=cut
@@ -1414,7 +1550,7 @@
L1:
.end
-=item pir_nqp-rx
+=item pir_nqp-rx / pir_nqprx
=cut
@@ -1425,6 +1561,11 @@
$P0 = kv['pir_nqp-rx']
clean_key($P0)
L1:
+ $I0 = exists kv['pir_nqprx']
+ unless $I0 goto L2
+ $P0 = kv['pir_nqprx']
+ clean_key($P0)
+ L2:
.end
=item pbc_pbc
@@ -1580,12 +1721,14 @@
$P0 = iter hash
L1:
unless $P0 goto L2
- .local string group
- group = shift $P0
+ .local string name
+ name = shift $P0
.local pmc srcs
- srcs = hash[group]
- $S0 = _mk_path_dynpmc(group, load_ext)
+ srcs = hash[name]
+ $S0 = _mk_path_dynpmc(name, load_ext)
unlink($S0, 1 :named('verbose'))
+ $I0 = does srcs, 'array'
+ unless $I0 goto L5
$P1 = iter srcs
L3:
unless $P1 goto L4
@@ -1602,11 +1745,22 @@
goto L3
L4:
src = srcs[0]
- $S0 = _mk_path_gen_dynpmc_group(src, group, '.c')
+ $S0 = _mk_path_gen_dynpmc_group(src, name, '.c')
unlink($S0, 1 :named('verbose'))
- $S0 = _mk_path_gen_dynpmc_group(src, group, '.h')
+ $S0 = _mk_path_gen_dynpmc_group(src, name, '.h')
unlink($S0, 1 :named('verbose'))
- $S0 = _mk_path_gen_dynpmc_group(src, group, obj)
+ $S0 = _mk_path_gen_dynpmc_group(src, name, obj)
+ unlink($S0, 1 :named('verbose'))
+ goto L1
+ L5:
+ src = srcs
+ $S0 = _mk_path_gen_dynpmc(src, '.c')
+ unlink($S0, 1 :named('verbose'))
+ $S0 = _mk_path_gen_dynpmc(src, '.h')
+ unlink($S0, 1 :named('verbose'))
+ $S0 = _mk_path_gen_dynpmc(src, '.dump')
+ unlink($S0, 1 :named('verbose'))
+ $S0 = _mk_path_gen_dynpmc(src, obj)
unlink($S0, 1 :named('verbose'))
goto L1
L2:
@@ -2348,6 +2502,10 @@
=item project_uri
+=item setup
+
+the default value is setup.pir
+
=back
=cut
@@ -2421,6 +2579,11 @@
keywords .= "\""
L10:
+ .local string setup
+ setup = get_value('setup', "setup.pir" :named('default'), kv :flat :named)
+ .local string instruction
+ instruction = _plumage_instruction(setup)
+
.local string vcs
vcs = get_vcs()
@@ -2434,7 +2597,7 @@
project_uri =get_value('project_uri', kv :flat :named)
$P0 = new 'FixedStringArray'
- set $P0, 16
+ set $P0, 23
$P0[0] = name
$P0[1] = abstract
$P0[2] = authority
@@ -2445,12 +2608,19 @@
$P0[7] = packager
$P0[8] = keywords
$P0[9] = description
- $P0[10] = name
- $P0[11] = vcs
- $P0[12] = vcs
- $P0[13] = checkout_uri
- $P0[14] = browser_uri
- $P0[15] = project_uri
+ $P0[10] = instruction
+ $P0[11] = instruction
+ $P0[12] = instruction
+ $P0[13] = instruction
+ $P0[14] = instruction
+ $P0[15] = instruction
+ $P0[16] = instruction
+ $P0[17] = name
+ $P0[18] = vcs
+ $P0[19] = vcs
+ $P0[20] = checkout_uri
+ $P0[21] = browser_uri
+ $P0[22] = project_uri
$S0 = <<'TEMPLATE'
{
@@ -2477,25 +2647,25 @@
"type" : "repository"
},
"update" : {
- "type" : "parrot_setup"
+ "type" : "%s"
},
"build" : {
- "type" : "parrot_setup"
+ "type" : "%s"
},
"test" : {
- "type" : "parrot_setup"
+ "type" : "%s"
},
"smoke" : {
- "type" : "parrot_setup"
+ "type" : "%s"
},
"install" : {
- "type" : "parrot_setup"
+ "type" : "%s"
},
"uninstall": {
- "type" : "parrot_setup"
+ "type" : "%s"
},
"clean" : {
- "type" : "parrot_setup"
+ "type" : "%s"
}
},
"dependency-info" : {
@@ -2531,6 +2701,18 @@
.return (str)
.end
+.sub '_plumage_instruction' :anon
+ .param string setup
+ .local string instruction
+ instruction = "parrot_setup"
+ $I0 = index setup, "."
+ $S0 = substr setup, $I0
+ unless $S0 == '.nqp' goto L1
+ instruction = "nqp_setup"
+ L1:
+ .return (instruction)
+.end
+
=head3 Step manifest
=over 4
@@ -2547,13 +2729,17 @@
array of pathname or a single pathname
-=item pbc_pir, pir_pge, pir_tge, pir_nqp, pir_nqp-rx, pbc_pbc, exe_pbc,
-installable_pbc, dynops, dynpmc, html_pod
+=item pbc_pir, pir_pge, pir_tge, pir_nqp, pir_nqp-rx, pir_nqprx, pir_pir
+pbc_pbc, exe_pbc, installable_pbc, dynops, dynpmc, html_pod
=item inst_bin, inst_dynext, inst_inc, inst_lang, inst_lib
=item harness_files, prove_files
+=item setup
+
+the default value is setup.pir
+
=back
=cut
@@ -2579,7 +2765,7 @@
needed = new 'Hash'
generated = new 'Hash'
- $P0 = split ' ', 'pbc_pir pir_pge pir_tge pir_nqp pir_nqp-rx pbc_pbc exe_pbc installable_pbc dynops dynpmc html_pod'
+ $P0 = split ' ', 'pbc_pir pir_pge pir_tge pir_nqp pir_nqp-rx pir_nqprx pir_pir pbc_pbc exe_pbc installable_pbc dynops dynpmc html_pod'
L1:
unless $P0 goto L2
$S0 = shift $P0
@@ -2617,7 +2803,9 @@
_manifest_add_glob(needed, 't/*.t')
L7:
- $P0 = split ' ', 'setup.pir setup.nqp t/harness'
+ $P0 = split ' ', 't/harness'
+ $S0 = get_value('setup', 'setup.pir' :named('default'), kv :flat :named)
+ push $P0, $S0
L8:
unless $P0 goto L9
$S0 = shift $P0
@@ -2984,6 +3172,10 @@
=item inst_bin, inst_dynext, inst_inc, inst_lang, inst_lib
+=item setup
+
+the default value is setup.pir
+
=back
=cut
@@ -3059,8 +3251,13 @@
.local string packager
packager = get_value('packager', "you <you at you.org>" :named('default'), kv :flat :named)
+ .local string setup
+ setup = get_value('setup', "setup.pir" :named('default'), kv :flat :named)
+ .local string command
+ command = _command_setup(setup)
+
$P0 = new 'FixedStringArray'
- set $P0, 9
+ set $P0, 12
$P0[0] = parrot_version
$P0[1] = name
$P0[2] = version
@@ -3070,6 +3267,9 @@
$P0[6] = project_uri
$P0[7] = tarball
$P0[8] = description
+ $P0[9] = command
+ $P0[10] = command
+ $P0[11] = command
$S0 = <<'TEMPLATE'
%%define parrot_version %s
@@ -3093,14 +3293,14 @@
%%setup -n %%{name}-%%{version}
%%build
-parrot setup.pir
+%s
%%install
rm -rf $RPM_BUILD_ROOT
-parrot setup.pir --root $RPM_BUILD_ROOT install
+%s --root $RPM_BUILD_ROOT install
%%check
-parrot setup.pir test
+%s test
%%clean
rm -rf $RPM_BUILD_ROOT
@@ -3142,6 +3342,18 @@
.return (spec)
.end
+.sub '_command_setup' :anon
+ .param string setup
+ .local string command
+ command = "parrot setup.pir"
+ $I0 = index setup, "."
+ $S0 = substr setup, $I0
+ unless $S0 == '.nqp' goto L1
+ command = "parrot-nqp setup.nqp"
+ L1:
+ .return (command)
+.end
+
=head3 Step bdist_rpm
=cut
@@ -3202,6 +3414,10 @@
=item inst_bin, inst_dynext, inst_inc, inst_lang, inst_lib
+=item setup
+
+the default value is setup.pir
+
=back
=cut
@@ -3417,6 +3633,17 @@
.sub 'mk_deb_rules' :anon
.param pmc kv :slurpy :named
+ .local string setup
+ setup = get_value('setup', "setup.pir" :named('default'), kv :flat :named)
+ .local string command
+ command = _command_setup(setup)
+
+ $P0 = new 'FixedStringArray'
+ set $P0, 3
+ $P0[0] = command
+ $P0[1] = command
+ $P0[2] = command
+
$S0 = <<'TEMPLATE'
#!/usr/bin/make -f
# -*- makefile -*-
@@ -3431,14 +3658,14 @@
build: build-stamp
build-stamp: configure-stamp
dh_testdir
- parrot setup.pir build
+ %s build
touch $@
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
- parrot setup.pir clean
+ %s clean
dh_clean
install: build
@@ -3446,7 +3673,7 @@
dh_testroot
dh_prep
dh_installdirs
- parrot setup.pir --root $(CURDIR)/debian/tmp install
+ %s --root $(CURDIR)/debian/tmp install
dh_install --sourcedir=$(CURDIR)/debian/tmp --list-missing
# Build architecture-independent files here.
@@ -3475,6 +3702,7 @@
.PHONY: build clean binary-indep binary-arch binary install configure
TEMPLATE
+ $S0 = sprintf $S0, $P0
.return ($S0)
.end
@@ -3544,6 +3772,10 @@
=item doc_files
+=item setup
+
+the default value is setup.pir
+
=back
=cut
@@ -3590,6 +3822,11 @@
.local string license_type
license_type = get_value('license_type', kv :flat :named)
+ .local string setup
+ setup = get_value('setup', "setup.pir" :named('default'), kv :flat :named)
+ .local string command
+ command = _command_setup(setup)
+
.local string doc
doc = ''
$I0 = exists kv['doc_files']
@@ -3608,11 +3845,14 @@
L1:
$P0 = new 'FixedStringArray'
- set $P0, 4
+ set $P0, 7
$P0[0] = description
$P0[1] = project_uri
$P0[2] = license_type
- $P0[3] = doc
+ $P0[3] = command
+ $P0[4] = command
+ $P0[5] = doc
+ $P0[6] = command
$S0 = <<'TEMPLATE'
@@ -3629,16 +3869,16 @@
#RDEPEND=""
src_compile() {
- parrot setup.pir build || die "build failed"
+ %s build || die "build failed"
}
src_install() {
- parrot setup.pir --root ${D} install || die "install failed"
+ %s --root ${D} install || die "install failed"
%s
}
src_test() {
- parrot setup.pir test || die "test failed"
+ %s test || die "test failed"
}
TEMPLATE
$S0 = sprintf $S0, $P0
@@ -4264,37 +4504,22 @@
.return ($S0)
.end
-=item probe_include
+=item cc_run
=cut
-.sub 'probe_include'
- .param string include
- .param int verbose :named('verbose') :optional
+.sub 'cc_run'
+ .param string source
.param string cflags :named('cflags') :optional
.param int has_cflags :opt_flag
-
- $S0 = <<'SOURCE_C'
-#include <%s>
-#include <stdio.h>
-
-int
-main(int argc, char* argv[])
-{
- printf("%s OK\n");
- return 0;
-}
-SOURCE_C
- $P0 = new 'FixedStringArray'
- set $P0, 2
- $P0[0] = include
- $P0[1] = include
- $S0 = sprintf $S0, $P0
- spew('probe.c', $S0)
-
- .local string probe
+ .param string ldflags :named('ldflags') :optional
+ .param int has_ldflags :opt_flag
+ .param int verbose :named('verbose') :optional
+ .const string srcname = 'tmp.c'
+ spew(srcname, source)
+ .local string exename
$S0 = get_exe()
- probe = "probe" . $S0
+ exename = 'tmp' . $S0
.local pmc config
config = get_config()
.local string cmd
@@ -4306,15 +4531,55 @@
cmd .= " "
cmd .= cflags
L1:
- cmd .= " probe.c -o "
- cmd .= probe
+ cmd .= " "
+ $S0 = get_ldflags()
+ cmd .= $S0
+ unless has_ldflags goto L2
+ cmd .= " "
+ cmd .= ldflags
+ L2:
+ cmd .= " "
+ cmd .= srcname
+ cmd .= " -o "
+ cmd .= exename
system(cmd, verbose :named('verbose'), 1 :named('ignore_error'))
+ unlink(srcname, verbose :named('verbose'))
+
+ cmd = "./" . exename
+ $P0 = open cmd, 'rp'
+ $S0 = $P0.'readall'()
+ $P0.'close'()
- cmd = "./" . probe
- $I0 = system(cmd, verbose :named('verbose'), 1 :named('ignore_error'))
+ unlink(exename, verbose :named('verbose'))
+ .return ($S0)
+.end
+
+
+=item probe_include
+
+=cut
+
+.sub 'probe_include'
+ .param string include
+ .param string cflags :named('cflags') :optional
+ .param int verbose :named('verbose') :optional
+ $P0 = new 'FixedStringArray'
+ set $P0, 2
+ $P0[0] = include
+ $P0[1] = include
+ $S0 = sprintf <<'SOURCE_C', $P0
+#include <%s>
+#include <stdio.h>
- unlink('probe.c', verbose :named('verbose'))
- unlink(probe, verbose :named('verbose'))
+int
+main(int argc, char* argv[])
+{
+ printf("OK %s\n");
+ return 0;
+}
+SOURCE_C
+ $S0 = cc_run($S0, cflags :named('cflags'), verbose :named('verbose'))
+ $I0 = index $S0, 'OK '
.return ($I0)
.end
@@ -4412,6 +4677,13 @@
.return ($I0)
.end
+.sub 'newer' :multi(pmc, pmc)
+ .param pmc target
+ .param pmc depend
+ $S0 = target
+ .tailcall newer($S0, depend)
+.end
+
=item mkpath
=cut
Modified: branches/boehm_gc_2/src/atomic/gcc_x86.c
==============================================================================
--- branches/boehm_gc_2/src/atomic/gcc_x86.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/atomic/gcc_x86.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,5 +1,5 @@
/* atomic/gcc_x86.c
- * Copyright (C) 2006, Parrot Foundation.
+ * Copyright (C) 2006-2010, Parrot Foundation.
* SVN Info
* $Id$
*/
@@ -34,7 +34,8 @@
*/
/*
-=item C<void * parrot_i386_cmpxchg>
+=item C<void * parrot_i386_cmpxchg(void *volatile *ptr, void *expect, void
+*update)>
The CMPXCHG assembly instruction is a single cycle x86 instruction
that compares C<expect> and C<*ptr>. If they are equal, sets
@@ -68,7 +69,7 @@
/*
-=item C<long parrot_i386_xadd>
+=item C<long parrot_i386_xadd(volatile long *l, long amount)>
C<xadd> is an x86 instruction that performs the following operation:
Temporary = C<result>;
Modified: branches/boehm_gc_2/src/call/args.c
==============================================================================
--- branches/boehm_gc_2/src/call/args.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/call/args.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -573,7 +573,7 @@
INTVAL arg_index;
if (PMC_IS_NULL(signature))
- call_object = pmc_new(interp, enum_class_CallContext);
+ call_object = Parrot_pmc_new(interp, enum_class_CallContext);
else
call_object = signature;
@@ -749,7 +749,7 @@
else if (VTABLE_does(interp, aggregate, CONST_STRING(interp, "hash"))) {
const INTVAL elements = VTABLE_elements(interp, aggregate);
INTVAL index;
- PMC * const key = pmc_new(interp, enum_class_Key);
+ PMC * const key = Parrot_pmc_new(interp, enum_class_Key);
VTABLE_set_integer_native(interp, key, 0);
SETATTR_Key_next_key(interp, key, (PMC *)INITBucketIndex);
@@ -799,7 +799,7 @@
INTVAL arg_count;
if (PMC_IS_NULL(signature))
- call_object = pmc_new(interp, enum_class_CallContext);
+ call_object = Parrot_pmc_new(interp, enum_class_CallContext);
/* A hack to support 'get_results' as the way of fetching the
* exception object inside an exception handler. The first argument
* in the call object is the exception, stick it directly into the
@@ -884,7 +884,7 @@
PMC *type_tuple = PMCNULL;
PMC *arg_flags = PMCNULL;
PMC *return_flags = PMCNULL;
- PMC * const call_object = pmc_new(interp, enum_class_CallContext);
+ PMC * const call_object = Parrot_pmc_new(interp, enum_class_CallContext);
const INTVAL sig_len = strlen(sig);
INTVAL in_return_sig = 0;
INTVAL i;
@@ -1000,15 +1000,17 @@
ARGIN(PMC *raw_sig), ARGIN(void *arg_info), ARGIN(struct pcc_set_funcs *accessor))
{
ASSERT_ARGS(fill_params)
- PMC *named_used_list = PMCNULL;
INTVAL *raw_params;
- const INTVAL param_count = VTABLE_elements(interp, raw_sig);
+ PMC *named_used_list = PMCNULL;
+ INTVAL param_count = 0;
INTVAL param_index = 0;
INTVAL arg_index = 0;
INTVAL named_count = 0;
INTVAL err_check = 0;
INTVAL positional_args;
+ GETATTR_FixedIntegerArray_size(interp, raw_sig, param_count);
+
/* Check if we should be throwing errors. This is configured separately
* for parameters and return values. */
if (PARROT_ERRORS_test(interp, PARROT_ERRORS_PARAM_COUNT_FLAG))
@@ -1087,7 +1089,7 @@
EXCEPTION_INVALID_OPERATION,
"named parameters must follow all positional parameters");
- collect_positional = pmc_new(interp,
+ collect_positional = Parrot_pmc_new(interp,
Parrot_get_ctx_HLL_type(interp, enum_class_ResizablePMCArray));
for (; arg_index < positional_args; arg_index++) {
VTABLE_push_pmc(interp, collect_positional,
@@ -1119,7 +1121,7 @@
/* Mark the name as used, cannot be filled again. */
if (PMC_IS_NULL(named_used_list)) /* Only created if needed. */
- named_used_list = pmc_new(interp, enum_class_Hash);
+ named_used_list = Parrot_pmc_new(interp, enum_class_Hash);
VTABLE_set_integer_keyed_str(interp, named_used_list, param_name, 1);
}
@@ -1242,7 +1244,7 @@
/* Collected ("slurpy") named parameter */
if (param_flags & PARROT_ARG_SLURPY_ARRAY) {
- PMC * const collect_named = pmc_new(interp,
+ PMC * const collect_named = Parrot_pmc_new(interp,
Parrot_get_ctx_HLL_type(interp, enum_class_Hash));
PMC * const named_arg_list = VTABLE_get_attr_str(interp, call_object, CONST_STRING(interp, "named"));
if (!PMC_IS_NULL(named_arg_list)) {
@@ -1260,7 +1262,7 @@
VTABLE_get_pmc_keyed_str(interp, call_object, name));
/* Mark the name as used, cannot be filled again. */
if (PMC_IS_NULL(named_used_list)) /* Only created if needed. */
- named_used_list = pmc_new(interp, enum_class_Hash);
+ named_used_list = Parrot_pmc_new(interp, enum_class_Hash);
VTABLE_set_integer_keyed_str(interp, named_used_list, name, 1);
named_count++;
}
@@ -1291,7 +1293,7 @@
/* Mark the name as used, cannot be filled again. */
if (PMC_IS_NULL(named_used_list)) /* Only created if needed. */
- named_used_list = pmc_new(interp, enum_class_Hash);
+ named_used_list = Parrot_pmc_new(interp, enum_class_Hash);
VTABLE_set_integer_keyed_str(interp, named_used_list, param_name, 1);
named_count++;
@@ -1582,8 +1584,8 @@
ARGIN(PMC *raw_sig), ARGIN(void *return_info), ARGIN(struct pcc_get_funcs *accessor))
{
ASSERT_ARGS(fill_results)
- INTVAL *return_array;
- INTVAL *result_array;
+ INTVAL *return_array = NULL;
+ INTVAL *result_array = NULL;
PMC *result_sig = NULL;
PMC * const ctx = CURRENT_CONTEXT(interp);
PMC *named_used_list = PMCNULL;
@@ -1610,7 +1612,7 @@
if (PMC_IS_NULL(call_object)) {
/* If the return_count is 0, then there are no return values waiting to
* fill the results, so no error. */
- if (return_count > 0 && (err_check))
+ if (return_count > 0 && err_check)
Parrot_ex_throw_from_c_args(interp, NULL,
EXCEPTION_INVALID_OPERATION,
"too few returns: 0 passed, %d expected", return_count);
@@ -1680,7 +1682,7 @@
EXCEPTION_INVALID_OPERATION,
"named results must follow all positional results");
- collect_positional = pmc_new(interp,
+ collect_positional = Parrot_pmc_new(interp,
Parrot_get_ctx_HLL_type(interp, enum_class_ResizablePMCArray));
/* Iterate over all positional returns in the list. */
@@ -1768,7 +1770,7 @@
/* Mark the name as used, cannot be filled again. */
if (PMC_IS_NULL(named_used_list)) /* Only created if needed. */
- named_used_list = pmc_new(interp,
+ named_used_list = Parrot_pmc_new(interp,
Parrot_get_ctx_HLL_type(interp, enum_class_Hash));
VTABLE_set_integer_keyed_str(interp, named_used_list, result_name, 1);
}
@@ -1921,7 +1923,7 @@
return_flags = return_array[return_index];
if (PMC_IS_NULL(named_return_list)) /* Only created if needed. */
- named_return_list = pmc_new(interp,
+ named_return_list = Parrot_pmc_new(interp,
Parrot_get_ctx_HLL_type(interp, enum_class_Hash));
if (VTABLE_exists_keyed_str(interp, named_return_list, return_name))
@@ -1987,7 +1989,7 @@
/* Collected ("slurpy") named result */
if (result_flags & PARROT_ARG_SLURPY_ARRAY) {
if (PMC_IS_NULL(named_return_list))
- named_return_list = pmc_new(interp,
+ named_return_list = Parrot_pmc_new(interp,
Parrot_get_ctx_HLL_type(interp, enum_class_Hash));
csr_fill_pmc(interp, call_object, result_index, named_return_list);
@@ -2104,8 +2106,7 @@
ARGIN(PMC *raw_sig), ARGIN(opcode_t *raw_returns))
{
ASSERT_ARGS(Parrot_pcc_fill_returns_from_op)
- const INTVAL raw_return_count = VTABLE_elements(interp, raw_sig);
- INTVAL err_check = 0;
+
static pcc_get_funcs function_pointers = {
(intval_func_t)intval_arg_from_op,
(numval_func_t)numval_arg_from_op,
@@ -2118,20 +2119,21 @@
(pmc_func_t)pmc_constant_from_op,
};
+ INTVAL raw_return_count = 0;
- /* Check if we should be throwing errors. This is configured separately
- * for parameters and return values. */
- if (PARROT_ERRORS_test(interp, PARROT_ERRORS_RESULT_COUNT_FLAG))
- err_check = 1;
+ GETATTR_FixedIntegerArray_size(interp, raw_sig, raw_return_count);
/* A null call object is fine if there are no arguments and no returns. */
if (PMC_IS_NULL(call_object)) {
- if (raw_return_count > 0) {
- if (err_check)
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
- "too many return values: %d passed, 0 expected",
- raw_return_count);
- }
+
+ /* Check if we should be throwing errors. This is configured separately
+ * for parameters and return values. */
+ if (raw_return_count > 0
+ && PARROT_ERRORS_test(interp, PARROT_ERRORS_RESULT_COUNT_FLAG))
+ Parrot_ex_throw_from_c_args(interp, NULL,
+ EXCEPTION_INVALID_OPERATION,
+ "too many return values: %d passed, 0 expected",
+ raw_return_count);
return;
}
@@ -2139,6 +2141,8 @@
return;
}
+
+
/*
=item C<void Parrot_pcc_fill_returns_from_continuation(PARROT_INTERP, PMC
@@ -2158,7 +2162,7 @@
{
ASSERT_ARGS(Parrot_pcc_fill_returns_from_continuation)
const INTVAL raw_return_count = VTABLE_elements(interp, raw_sig);
- INTVAL err_check = 0;
+
static pcc_get_funcs function_pointers = {
(intval_func_t)intval_arg_from_continuation,
(numval_func_t)numval_arg_from_continuation,
@@ -2171,20 +2175,17 @@
(pmc_func_t)pmc_arg_from_continuation,
};
-
- /* Check if we should be throwing errors. This is configured separately
- * for parameters and return values. */
- if (PARROT_ERRORS_test(interp, PARROT_ERRORS_RESULT_COUNT_FLAG))
- err_check = 1;
-
/* A null call object is fine if there are no arguments and no returns. */
if (PMC_IS_NULL(call_object)) {
- if (raw_return_count > 0) {
- if (err_check)
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
- "too many return values: %d passed, 0 expected",
- raw_return_count);
- }
+
+ /* Check if we should be throwing errors. This is configured separately
+ * for parameters and return values. */
+ if (raw_return_count > 0
+ && PARROT_ERRORS_test(interp, PARROT_ERRORS_RESULT_COUNT_FLAG))
+ Parrot_ex_throw_from_c_args(interp, NULL,
+ EXCEPTION_INVALID_OPERATION,
+ "too many return values: %d passed, 0 expected",
+ raw_return_count);
return;
}
@@ -2193,6 +2194,7 @@
return;
}
+
/*
=item C<void Parrot_pcc_fill_returns_from_c_args(PARROT_INTERP, PMC
@@ -2219,7 +2221,6 @@
ASSERT_ARGS(Parrot_pcc_fill_returns_from_c_args)
va_list args;
INTVAL raw_return_count = 0;
- INTVAL err_check = 0;
PMC *raw_sig = PMCNULL;
PMC *invalid_sig = PMCNULL;
@@ -2236,21 +2237,20 @@
};
parse_signature_string(interp, signature, &raw_sig, &invalid_sig);
+
if (!PMC_IS_NULL(invalid_sig))
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
"parameters should not be included in the return signature");
raw_return_count = VTABLE_elements(interp, raw_sig);
- /* Check if we should be throwing errors. This is configured separately
- * for parameters and return values. */
- if (PARROT_ERRORS_test(interp, PARROT_ERRORS_RESULT_COUNT_FLAG))
- err_check = 1;
-
/* A null call object is fine if there are no arguments and no returns. */
if (PMC_IS_NULL(call_object)) {
- if (raw_return_count > 0)
- if (err_check)
+
+ /* Check if we should be throwing errors. This is configured separately
+ * for parameters and return values. */
+ if (raw_return_count > 0
+ && PARROT_ERRORS_test(interp, PARROT_ERRORS_RESULT_COUNT_FLAG))
Parrot_ex_throw_from_c_args(interp, NULL,
EXCEPTION_INVALID_OPERATION,
"too many return values: %d passed, 0 expected",
@@ -2263,6 +2263,7 @@
va_end(args);
}
+
/*
=item C<static void parse_signature_string(PARROT_INTERP, const char *signature,
@@ -2288,7 +2289,7 @@
INTVAL set = 0;
if (PMC_IS_NULL(*arg_flags))
- *arg_flags = pmc_new(interp, enum_class_ResizableIntegerArray);
+ *arg_flags = Parrot_pmc_new(interp, enum_class_ResizableIntegerArray);
current_array = *arg_flags;
for (x = signature; *x != '\0'; x++) {
@@ -2307,7 +2308,7 @@
/* Switch to the return argument flags. */
if (PMC_IS_NULL(*return_flags))
- *return_flags = pmc_new(interp, enum_class_ResizableIntegerArray);
+ *return_flags = Parrot_pmc_new(interp, enum_class_ResizableIntegerArray);
current_array = *return_flags;
}
/* parse arg type */
@@ -2860,7 +2861,7 @@
if (cur == 8) {
void * const old_values = values;
- values = mem_allocate_n_typed(8, void *);
+ values = mem_gc_allocate_n_typed(interp, 8, void *);
memcpy(values, old_values, 8 * sizeof (void *));
Parrot_gc_free_fixed_size_storage(interp,
8 * sizeof (void *), old_values);
@@ -2874,7 +2875,8 @@
cur &= ~0xfff;
}
- mem_realloc_n_typed(values, cur, void *);
+ values = mem_gc_realloc_n_typed_zeroed(interp, values,
+ cur, resize_threshold, void *);
SETATTR_CallContext_returns_values(interp, self, values);
SETATTR_CallContext_returns_size(interp, self, size);
@@ -3142,7 +3144,7 @@
return_flags = VTABLE_get_attr_str(interp, sig_object, return_flags_name);
if (PMC_IS_NULL(return_flags)) {
/* Create return_flags for single element */
- return_flags = pmc_new(interp, enum_class_FixedIntegerArray);
+ return_flags = Parrot_pmc_new(interp, enum_class_FixedIntegerArray);
return_flags_size = 0;
VTABLE_set_integer_native(interp, return_flags, 1);
VTABLE_set_attr_str(interp, sig_object, return_flags_name, return_flags);
Modified: branches/boehm_gc_2/src/call/context.c
==============================================================================
--- branches/boehm_gc_2/src/call/context.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/call/context.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -315,7 +315,6 @@
if (!PMC_IS_NULL(ctx->current_sub))
return;
- ctx->current_results = NULL;
ctx->results_signature = NULL;
ctx->lex_pad = PMCNULL;
ctx->outer_ctx = NULL;
@@ -567,7 +566,7 @@
ARGIN_NULLOK(PMC *old))
{
ASSERT_ARGS(Parrot_alloc_context)
- PMC *pmcctx = pmc_new(interp, enum_class_CallContext);
+ PMC *pmcctx = Parrot_pmc_new(interp, enum_class_CallContext);
allocate_registers(interp, pmcctx, number_regs_used);
init_context(interp, pmcctx, old);
@@ -593,7 +592,7 @@
Parrot_pcc_allocate_empty_context(PARROT_INTERP, ARGIN_NULLOK(PMC *old))
{
ASSERT_ARGS(Parrot_pcc_allocate_empty_context)
- PMC *pmcctx = pmc_new(interp, enum_class_CallContext);
+ PMC *pmcctx = Parrot_pmc_new(interp, enum_class_CallContext);
init_context(interp, pmcctx, old);
Modified: branches/boehm_gc_2/src/call/context_accessors.c
==============================================================================
--- branches/boehm_gc_2/src/call/context_accessors.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/call/context_accessors.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -471,37 +471,6 @@
/*
-=item C<opcode_t* Parrot_pcc_get_results_func(PARROT_INTERP, PMC *ctx)>
-
-=item C<void Parrot_pcc_set_results_func(PARROT_INTERP, PMC *ctx, opcode_t *pc)>
-
-Get/set ptr into code with get_results opcode.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-PARROT_CAN_RETURN_NULL
-opcode_t*
-Parrot_pcc_get_results_func(PARROT_INTERP, ARGIN(PMC *ctx))
-{
- ASSERT_ARGS(Parrot_pcc_get_results_func)
- Parrot_Context const *c = get_context_struct_fast(interp, ctx);
- return c->current_results;
-}
-
-PARROT_EXPORT
-void
-Parrot_pcc_set_results_func(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(opcode_t *pc))
-{
- ASSERT_ARGS(Parrot_pcc_set_results_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
- c->current_results = pc;
-}
-
-/*
-
=item C<PMC* Parrot_pcc_get_results_signature_func(PARROT_INTERP, PMC *ctx)>
=item C<void Parrot_pcc_set_results_signature_func(PARROT_INTERP, PMC *ctx, PMC
Modified: branches/boehm_gc_2/src/call/ops.c
==============================================================================
--- branches/boehm_gc_2/src/call/ops.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/call/ops.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -142,7 +142,7 @@
interp->runloop_jmp_free_list = jump_point->prev;
}
else
- jump_point = mem_allocate_typed(Parrot_runloop);
+ jump_point = mem_gc_allocate_zeroed_typed(interp, Parrot_runloop);
jump_point->prev = interp->current_runloop;
interp->current_runloop = jump_point;
Modified: branches/boehm_gc_2/src/debug.c
==============================================================================
--- branches/boehm_gc_2/src/debug.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/debug.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2009, Parrot Foundation.
+Copyright (C) 2001-2010, Parrot Foundation.
$Id$
=head1 NAME
@@ -603,6 +603,9 @@
=item C<static const DebuggerCmd * get_cmd(const char **cmd)>
+Parse the debuggger command indicated by C<**cmd>. Return a pointer to the
+matching function for known commands, or a NULL pointer otherwise.
+
=cut
*/
@@ -658,6 +661,8 @@
=item C<static const char * skip_whitespace(const char *cmd)>
+Return a pointer to the first non-whitespace character in C<cmd>.
+
=cut
*/
@@ -677,6 +682,8 @@
=item C<static unsigned long get_uint(const char **cmd, unsigned int def)>
+Get an unsigned int from C<**cmd>.
+
=cut
*/
@@ -700,6 +707,8 @@
=item C<static unsigned long get_ulong(const char **cmd, unsigned long def)>
+Get an unsigned long from C<**cmd>.
+
=cut
*/
@@ -1001,7 +1010,7 @@
TRACEDEB_MSG("Parrot_debugger_init");
if (! interp->pdb) {
- PDB_t *pdb = mem_allocate_zeroed_typed(PDB_t);
+ PDB_t *pdb = mem_gc_allocate_zeroed_typed(interp, PDB_t);
Parrot_Interp debugger = Parrot_new(interp);
interp->pdb = pdb;
debugger->pdb = pdb;
@@ -1009,9 +1018,9 @@
pdb->debugger = debugger;
/* Allocate space for command line buffers, NUL terminated c strings */
- pdb->cur_command = (char *)mem_sys_allocate_zeroed(DEBUG_CMD_BUFFER_LENGTH + 1);
- pdb->last_command = (char *)mem_sys_allocate_zeroed(DEBUG_CMD_BUFFER_LENGTH + 1);
- pdb->file = mem_allocate_zeroed_typed(PDB_file_t);
+ pdb->cur_command = mem_gc_allocate_n_typed(interp, DEBUG_CMD_BUFFER_LENGTH + 1, char);
+ pdb->last_command = mem_gc_allocate_n_typed(interp, DEBUG_CMD_BUFFER_LENGTH + 1, char);
+ pdb->file = mem_gc_allocate_zeroed_typed(interp, PDB_file_t);
}
/* PDB_disassemble(interp, NULL); */
@@ -1044,10 +1053,10 @@
PARROT_ASSERT(pdb);
PARROT_ASSERT(pdb->debugee == interp);
- mem_sys_free(pdb->last_command);
- mem_sys_free(pdb->cur_command);
+ mem_gc_free(interp, pdb->last_command);
+ mem_gc_free(interp, pdb->cur_command);
- mem_sys_free(pdb);
+ mem_gc_free(interp, pdb);
interp->pdb = NULL;
}
@@ -1245,7 +1254,6 @@
strcpy(pdb->cur_command, buf);
}
else {
-
/* update the last command */
if (pdb->cur_command[0] != '\0')
strcpy(pdb->last_command, pdb->cur_command);
@@ -1254,44 +1262,26 @@
c = pdb->cur_command;
- /*Parrot_io_eprintf(pdb->debugger, "\n(pdb) ");*/
Parrot_io_eprintf(pdb->debugger, "\n");
- /* skip leading whitespace */
-/*
- do {
- ch = fgetc(stdin);
- } while (isspace((unsigned char)ch) && ch != '\n');
-*/
- {
- Interp * interpdeb = interp->pdb->debugger;
- STRING * readline = CONST_STRING(interpdeb, "readline_interactive");
- STRING * prompt = CONST_STRING(interpdeb, "(pdb) ");
- STRING *s= Parrot_str_new(interpdeb, NULL, 0);
- PMC *tmp_stdin = Parrot_io_stdhandle(interpdeb, 0, NULL);
-
- Parrot_pcc_invoke_method_from_c_args(interpdeb,
- tmp_stdin, readline,
- "S->S", prompt, & s);
{
- char * const aux = Parrot_str_to_cstring(interpdeb, s);
- strcpy(c, aux);
- Parrot_str_free_cstring(aux);
- }
- ch = '\n';
- }
+ Interp *interpdeb = interp->pdb->debugger;
+ STRING *readline = CONST_STRING(interpdeb, "readline_interactive");
+ STRING *prompt = CONST_STRING(interpdeb, "(pdb) ");
+ STRING *s = Parrot_str_new(interpdeb, NULL, 0);
+ PMC *tmp_stdin = Parrot_io_stdhandle(interpdeb, 0, NULL);
+
+ Parrot_pcc_invoke_method_from_c_args(interpdeb,
+ tmp_stdin, readline,
+ "S->S", prompt, & s);
+ {
+ char * const aux = Parrot_str_to_cstring(interpdeb, s);
+ strcpy(c, aux);
+ Parrot_str_free_cstring(aux);
+ }
- /* generate string (no more than buffer length) */
-/*
- while (ch != EOF && ch != '\n' && (i < DEBUG_CMD_BUFFER_LENGTH)) {
- c[i++] = (char)ch;
- ch = fgetc(tmp_stdin);
+ ch = '\n';
}
-
- c[i] = '\0';
-*/
- if (ch == -1)
- strcpy(c, "quit");
}
}
@@ -1500,6 +1490,8 @@
=item C<static unsigned short condition_regtype(const char *cmd)>
+Return the type of the register represented by C<*cmd>.
+
=cut
*/
@@ -1627,7 +1619,7 @@
}
/* Allocate new condition */
- condition = mem_allocate_zeroed_typed(PDB_condition_t);
+ condition = mem_gc_allocate_zeroed_typed(interp, PDB_condition_t);
condition->type = cond_argleft | cond_type;
@@ -1640,7 +1632,7 @@
if (cond_argright != cond_argleft) {
Parrot_io_eprintf(interp->pdb->debugger, "Register types don't agree\n");
- mem_sys_free(condition);
+ mem_gc_free(interp, condition);
return NULL;
}
@@ -1649,28 +1641,28 @@
reg_number = (int)get_uint(&command, 0);
if (auxcmd == command) {
Parrot_io_eprintf(interp->pdb->debugger, "Invalid register\n");
- mem_sys_free(condition);
+ mem_gc_free(interp, condition);
return NULL;
}
if (reg_number < 0) {
Parrot_io_eprintf(interp->pdb->debugger, "Out-of-bounds register\n");
- mem_sys_free(condition);
+ mem_gc_free(interp, condition);
return NULL;
}
- condition->value = mem_allocate_typed(int);
+ condition->value = mem_gc_allocate_typed(interp, int);
*(int *)condition->value = reg_number;
}
/* If the first argument was an integer */
else if (condition->type & PDB_cond_int) {
/* This must be either an integer constant or register */
- condition->value = mem_allocate_typed(INTVAL);
+ condition->value = mem_gc_allocate_typed(interp, INTVAL);
*(INTVAL *)condition->value = (INTVAL)atoi(command);
condition->type |= PDB_cond_const;
}
else if (condition->type & PDB_cond_num) {
- condition->value = mem_allocate_typed(FLOATVAL);
+ condition->value = mem_gc_allocate_typed(interp, FLOATVAL);
*(FLOATVAL *)condition->value = (FLOATVAL)atof(command);
condition->type |= PDB_cond_const;
}
@@ -1690,7 +1682,7 @@
/* TT #1259: Need to figure out what to do in this case.
* For the time being, we just bail. */
Parrot_io_eprintf(interp->pdb->debugger, "Can't compare PMC with constant\n");
- mem_sys_free(condition);
+ mem_gc_free(interp, condition);
return NULL;
}
@@ -1813,7 +1805,7 @@
TRACEDEB_MSG("PDB_set_break allocate breakpoint");
/* Allocate the new break point */
- newbreak = mem_allocate_zeroed_typed(PDB_breakpoint_t);
+ newbreak = mem_gc_allocate_zeroed_typed(interp, PDB_breakpoint_t);
if (command) {
/*command = skip_command(command);*/
@@ -1865,6 +1857,8 @@
=item C<static void list_breakpoints(PDB_t *pdb)>
+Print all breakpoints for this debugger session to C<pdb->debugger>.
+
=cut
*/
@@ -2104,7 +2098,7 @@
}
bp_id = breakpoint->id;
/* Kill the breakpoint */
- mem_sys_free(breakpoint);
+ mem_gc_free(interp, breakpoint);
Parrot_io_eprintf(interp->pdb->debugger, "Breakpoint %li deleted\n", bp_id);
}
@@ -2121,7 +2115,7 @@
*/
void
-PDB_delete_condition(SHIM_INTERP, ARGMOD(PDB_breakpoint_t *breakpoint))
+PDB_delete_condition(PARROT_INTERP, ARGMOD(PDB_breakpoint_t *breakpoint))
{
ASSERT_ARGS(PDB_delete_condition)
if (breakpoint->condition->value) {
@@ -2134,12 +2128,12 @@
}
else {
/* 'value' is a float or an int, so we can just free it */
- mem_sys_free(breakpoint->condition->value);
+ mem_gc_free(interp, breakpoint->condition->value);
breakpoint->condition->value = NULL;
}
}
- mem_sys_free(breakpoint->condition);
+ mem_gc_free(interp, breakpoint->condition);
breakpoint->condition = NULL;
}
@@ -2397,7 +2391,7 @@
/*
-=item C<char * PDB_escape(const char *string, UINTVAL length)>
+=item C<char * PDB_escape(PARROT_INTERP, const char *string, UINTVAL length)>
Escapes C<">, C<\r>, C<\n>, C<\t>, C<\a> and C<\\>.
@@ -2411,7 +2405,7 @@
PARROT_CAN_RETURN_NULL
PARROT_MALLOC
char *
-PDB_escape(ARGIN(const char *string), UINTVAL length)
+PDB_escape(PARROT_INTERP, ARGIN(const char *string), UINTVAL length)
{
ASSERT_ARGS(PDB_escape)
const char *end;
@@ -2424,7 +2418,7 @@
if (!string)
return NULL;
- fill = _new = (char *)mem_sys_allocate(length * 2 + 1);
+ fill = _new = mem_gc_allocate_n_typed(interp, length * 2 + 1, char);
for (; string < end; string++) {
switch (*string) {
@@ -2584,7 +2578,7 @@
(info->jump & PARROT_JUMP_RELATIVE)) {
if (file) {
dest[size++] = 'L';
- i = PDB_add_label(file, op, op[j]);
+ i = PDB_add_label(interp, file, op, op[j]);
}
else if (code_start) {
dest[size++] = 'O';
@@ -2624,12 +2618,12 @@
Parrot_str_to_cstring(interp, interp->code->
const_table->constants[op[j]]->u.string);
char * const escaped =
- PDB_escape(unescaped, interp->code->const_table->
+ PDB_escape(interp, unescaped, interp->code->const_table->
constants[op[j]]->u.string->strlen);
if (escaped) {
strcpy(&dest[size], escaped);
size += strlen(escaped);
- mem_sys_free(escaped);
+ mem_gc_free(interp, escaped);
}
Parrot_str_free_cstring(unescaped);
}
@@ -2855,8 +2849,8 @@
TRACEDEB_MSG("PDB_disassemble");
- pfile = mem_allocate_zeroed_typed(PDB_file_t);
- pline = mem_allocate_zeroed_typed(PDB_line_t);
+ pfile = mem_gc_allocate_zeroed_typed(interp, PDB_file_t);
+ pline = mem_gc_allocate_zeroed_typed(interp, PDB_line_t);
/* If we already got a source, free it */
if (pdb->file) {
@@ -2866,7 +2860,7 @@
pfile->line = pline;
pline->number = 1;
- pfile->source = (char *)mem_sys_allocate(default_size);
+ pfile->source = mem_gc_allocate_n_typed(interp, default_size, char);
alloced = space = default_size;
code_end = pc + interp->code->base.size;
@@ -2876,7 +2870,7 @@
if (space < default_size) {
alloced += default_size;
space += default_size;
- pfile->source = (char *)mem_sys_realloc(pfile->source, alloced);
+ pfile->source = mem_gc_realloc_n_typed(interp, pfile->source, alloced, char);
}
size = PDB_disassemble_op(interp, pfile->source + pfile->size,
@@ -2893,7 +2887,7 @@
pc += n;
/* Prepare for next line */
- newline = mem_allocate_typed(PDB_line_t);
+ newline = mem_gc_allocate_zeroed_typed(interp, PDB_line_t);
newline->label = NULL;
newline->next = NULL;
newline->number = pline->number + 1;
@@ -2931,8 +2925,8 @@
/*
-=item C<long PDB_add_label(PDB_file_t *file, const opcode_t *cur_opcode,
-opcode_t offset)>
+=item C<long PDB_add_label(PARROT_INTERP, PDB_file_t *file, const opcode_t
+*cur_opcode, opcode_t offset)>
Add a label to the label list.
@@ -2941,7 +2935,8 @@
*/
long
-PDB_add_label(ARGMOD(PDB_file_t *file), ARGIN(const opcode_t *cur_opcode),
+PDB_add_label(PARROT_INTERP, ARGMOD(PDB_file_t *file),
+ ARGIN(const opcode_t *cur_opcode),
opcode_t offset)
{
ASSERT_ARGS(PDB_add_label)
@@ -2957,7 +2952,7 @@
/* Allocate a new label */
label = file->label;
- _new = mem_allocate_typed(PDB_label_t);
+ _new = mem_gc_allocate_zeroed_typed(interp, PDB_label_t);
_new->opcode = cur_opcode + offset;
_new->next = NULL;
@@ -2987,7 +2982,7 @@
*/
void
-PDB_free_file(SHIM_INTERP, ARGIN_NULLOK(PDB_file_t *file))
+PDB_free_file(PARROT_INTERP, ARGIN_NULLOK(PDB_file_t *file))
{
ASSERT_ARGS(PDB_free_file)
while (file) {
@@ -2998,7 +2993,7 @@
while (line) {
PDB_line_t * const nline = line->next;
- mem_sys_free(line);
+ mem_gc_free(interp, line);
line = nline;
}
@@ -3008,19 +3003,19 @@
while (label) {
PDB_label_t * const nlabel = label->next;
- mem_sys_free(label);
+ mem_gc_free(interp, label);
label = nlabel;
}
/* Free the remaining allocated portions of the file structure */
if (file->sourcefilename)
- mem_sys_free(file->sourcefilename);
+ mem_gc_free(interp, file->sourcefilename);
if (file->source)
- mem_sys_free(file->source);
+ mem_gc_free(interp, file->source);
nfile = file->next;
- mem_sys_free(file);
+ mem_gc_free(interp, file);
file = nfile;
}
}
@@ -3076,10 +3071,10 @@
return;
}
- pfile = mem_allocate_zeroed_typed(PDB_file_t);
- pline = mem_allocate_zeroed_typed(PDB_line_t);
+ pfile = mem_gc_allocate_zeroed_typed(interp, PDB_file_t);
+ pline = mem_gc_allocate_zeroed_typed(interp, PDB_line_t);
- pfile->source = (char *)mem_sys_allocate(1024);
+ pfile->source = mem_gc_allocate_n_typed(interp, 1024, char);
pfile->line = pline;
pline->number = 1;
@@ -3089,8 +3084,8 @@
while ((c = fgetc(file)) != EOF) {
/* Grow it */
if (++size == 1024) {
- pfile->source = (char *)mem_sys_realloc(pfile->source,
- (size_t)pfile->size + 1024);
+ pfile->source = mem_gc_realloc_n_typed(interp, pfile->source,
+ (size_t)pfile->size + 1024, char);
size = 0;
}
pfile->source[pfile->size] = (char)c;
@@ -3100,7 +3095,7 @@
if (c == '\n') {
/* If the line has an opcode move to the next one,
otherwise leave it with NULL to skip it. */
- PDB_line_t *newline = mem_allocate_zeroed_typed(PDB_line_t);
+ PDB_line_t *newline = mem_gc_allocate_zeroed_typed(interp, PDB_line_t);
if (PDB_hasinstruction(pfile->source + pline->source_offset)) {
size_t n = interp->op_info_table[*pc].op_count;
@@ -3350,33 +3345,6 @@
/*
-=item C<opcode_t * PDB_compile(PARROT_INTERP, const char *command)>
-
-Compiles instructions with the PASM compiler.
-
-Appends an C<end> op.
-
-This may be called from C<PDB_eval> above or from the compile opcode
-which generates a malloced string.
-
-=cut
-
-*/
-
-PARROT_CAN_RETURN_NULL
-opcode_t *
-PDB_compile(PARROT_INTERP, ARGIN(const char *command))
-{
- ASSERT_ARGS(PDB_compile)
-
- UNUSED(command);
- Parrot_ex_throw_from_c_args(interp, NULL,
- EXCEPTION_UNIMPLEMENTED,
- "PDB_compile ('PASM1' compiler) has been deprecated");
-}
-
-/*
-
=item C<void PDB_print(PARROT_INTERP, const char *command)>
Print interp registers.
Modified: branches/boehm_gc_2/src/dynext.c
==============================================================================
--- branches/boehm_gc_2/src/dynext.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/dynext.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -155,7 +155,7 @@
{
ASSERT_ARGS(set_cstring_prop)
STRING * const key = Parrot_str_new_constant(interp, what);
- PMC * const prop = constant_pmc_new(interp, enum_class_String);
+ PMC * const prop = Parrot_pmc_new_constant(interp, enum_class_String);
VTABLE_set_string_native(interp, prop, name);
VTABLE_setprop(interp, lib_pmc, key, prop);
@@ -396,7 +396,7 @@
/* seems to be a native/NCI lib */
if (!load_func || !lib_pmc)
- lib_pmc = constant_pmc_new(interp, enum_class_ParrotLibrary);
+ lib_pmc = Parrot_pmc_new_constant(interp, enum_class_ParrotLibrary);
/* Call init, if it exists */
if (init_func)
@@ -532,7 +532,7 @@
make_string_pmc(PARROT_INTERP, ARGIN(STRING *string))
{
ASSERT_ARGS(make_string_pmc)
- PMC * const ret = constant_pmc_new(interp, enum_class_String);
+ PMC * const ret = Parrot_pmc_new_constant(interp, enum_class_String);
VTABLE_set_string_native(interp, ret, string);
return ret;
@@ -576,7 +576,7 @@
* Anyways, if we hope to share bytecode at runtime, we need to have
* them have identical opcodes anyways.
*/
- PMC * const new_lib_pmc = constant_pmc_new(d, enum_class_ParrotLibrary);
+ PMC * const new_lib_pmc = Parrot_pmc_new_constant(d, enum_class_ParrotLibrary);
PMC_data(new_lib_pmc) = handle;
VTABLE_setprop(d, new_lib_pmc, CONST_STRING(s, "_filename"), make_string_pmc(d, wo_ext));
@@ -587,10 +587,10 @@
if (d->n_libs != s->n_libs) {
INTVAL i;
if (d->all_op_libs)
- d->all_op_libs = (op_lib_t **)mem_sys_realloc(d->all_op_libs,
+ d->all_op_libs = (op_lib_t **)mem_internal_realloc(d->all_op_libs,
sizeof (op_lib_t *) * s->n_libs);
else
- d->all_op_libs = (op_lib_t **)mem_sys_allocate(sizeof (op_lib_t *) *
+ d->all_op_libs = (op_lib_t **)mem_internal_allocate(sizeof (op_lib_t *) *
s->n_libs);
for (i = d->n_libs; i < s->n_libs; ++i)
d->all_op_libs[i] = s->all_op_libs[i];
@@ -668,7 +668,7 @@
* XXX Parrot_ex_throw_from_c_args? return PMCNULL?
* PMC Undef seems convenient, because it can be queried with get_bool()
*/
- return pmc_new(interp, enum_class_Undef);
+ return Parrot_pmc_new(interp, enum_class_Undef);
}
return run_init_lib(interp, handle, lib_name, wo_ext);
Modified: branches/boehm_gc_2/src/dynpmc/dynlexpad.pmc
==============================================================================
--- branches/boehm_gc_2/src/dynpmc/dynlexpad.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/dynpmc/dynlexpad.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -45,7 +45,7 @@
(Parrot_DynLexPad_attributes *) PMC_data(SELF);
if (VTABLE_elements(interp, lexinfo)) {
- attrs->init = pmc_new_init(interp, enum_class_LexPad, lexinfo);
+ attrs->init = Parrot_pmc_new_init(interp, enum_class_LexPad, lexinfo);
}
else
attrs->init = NULL;
Modified: branches/boehm_gc_2/src/dynpmc/foo.pmc
==============================================================================
--- branches/boehm_gc_2/src/dynpmc/foo.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/dynpmc/foo.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -16,14 +16,14 @@
MULTI PMC* subtract(Integer value, PMC *dest) {
if (!dest)
- dest = pmc_new(interp, SELF->vtable->base_type);
+ dest = Parrot_pmc_new(interp, SELF->vtable->base_type);
VTABLE_set_integer_native(interp, dest, 144);
return dest;
}
MULTI PMC* subtract(DEFAULT value, PMC *dest) {
if (!dest)
- dest = pmc_new(interp, SELF->vtable->base_type);
+ dest = Parrot_pmc_new(interp, SELF->vtable->base_type);
VTABLE_set_integer_native(interp, dest, 244);
return dest;
}
Modified: branches/boehm_gc_2/src/dynpmc/gdbmhash.pmc
==============================================================================
--- branches/boehm_gc_2/src/dynpmc/gdbmhash.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/dynpmc/gdbmhash.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -73,7 +73,7 @@
}
-pmclass GDBMHash provides hash dynpmc lib gdbm {
+pmclass GDBMHash provides hash dynpmc lib gdbm auto_attrs {
ATTR struct GDBM_FH *db_handle;
/*
@@ -100,18 +100,14 @@
}
VTABLE void init() {
- Parrot_GDBMHash_attributes *attrs =
- mem_allocate_zeroed_typed(Parrot_GDBMHash_attributes);
-
- attrs->db_handle = mem_allocate_zeroed_typed(GDBM_FH);
- PMC_data(SELF) = attrs;
+ Parrot_GDBMHash_attributes *attrs = PARROT_GDBMHASH(SELF);
+ attrs->db_handle = mem_gc_allocate_zeroed_typed(INTERP, GDBM_FH);
PObj_custom_destroy_SET(SELF);
}
VTABLE void destroy() {
- mem_sys_free(
- ((Parrot_GDBMHash_attributes *)PMC_data(SELF))->db_handle);
- mem_sys_free(PMC_data(SELF));
+ Parrot_GDBMHash_attributes *attrs = PARROT_GDBMHASH(SELF);
+ mem_gc_free(INTERP, attrs->db_handle);
PMC_data(SELF) = NULL;
}
@@ -291,7 +287,7 @@
VTABLE PMC* get_pmc_keyed(PMC* key) {
STRING * ret_string = SELF.get_string_keyed(key);
- PMC *ret_pmc = pmc_new(interp, enum_class_String);
+ PMC *ret_pmc = Parrot_pmc_new(interp, enum_class_String);
VTABLE_set_string_native(interp, ret_pmc, ret_string);
@@ -311,7 +307,7 @@
VTABLE void set_integer_keyed(PMC* key, INTVAL value) {
PMC *temp;
- temp = pmc_new(interp, enum_class_String);
+ temp = Parrot_pmc_new(interp, enum_class_String);
VTABLE_set_integer_native(interp, temp, value);
SELF.set_pmc_keyed(key, temp);
}
@@ -330,7 +326,7 @@
VTABLE void set_number_keyed(PMC* key, FLOATVAL value) {
PMC *temp;
- temp = pmc_new(interp, enum_class_String);
+ temp = Parrot_pmc_new(interp, enum_class_String);
VTABLE_set_number_native(interp, temp, value);
SELF.set_pmc_keyed(key, temp);
}
Modified: branches/boehm_gc_2/src/dynpmc/rational.pmc
==============================================================================
--- branches/boehm_gc_2/src/dynpmc/rational.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/dynpmc/rational.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -227,7 +227,7 @@
*/
-pmclass Rational dynpmc provides scalar {
+pmclass Rational dynpmc provides scalar auto_attrs {
ATTR struct RATIONAL *rational;
/*
@@ -265,9 +265,8 @@
VTABLE void init() {
#ifdef PARROT_HAS_GMP
Parrot_Rational_attributes *attrs =
- mem_allocate_zeroed_typed(Parrot_Rational_attributes);
- PMC_data(SELF) = attrs;
- PMC_rational(SELF) = (RATIONAL *)malloc(sizeof (RATIONAL));
+ PARROT_RATIONAL(SELF);
+ attrs->rational = mem_gc_allocate_zeroed_typed(INTERP, RATIONAL);
mpq_init(RT(SELF));
PObj_custom_destroy_SET(SELF);
#endif
@@ -282,7 +281,7 @@
*/
VTABLE PMC *clone() {
#ifdef PARROT_HAS_GMP
- PMC * const ret = pmc_new(INTERP, SELF->vtable->base_type);
+ PMC * const ret = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
mpq_set(RT(ret), RT(SELF));
return ret;
#else
@@ -300,9 +299,7 @@
VTABLE void destroy() {
#ifdef PARROT_HAS_GMP
mpq_clear(RT(SELF));
- mem_sys_free(RT(SELF));
- mem_sys_free(PMC_data(SELF));
- PMC_data(SELF) = NULL;
+ mem_gc_free(INTERP, RT(SELF));
#else
RAISE_EXCEPTION
#endif
@@ -522,7 +519,7 @@
MULTI PMC *add(Rational value, PMC* dest) {
#ifdef PARROT_HAS_GMP
- dest = pmc_new(INTERP, SELF->vtable->base_type);
+ dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
mpq_add(RT(dest), RT(SELF), RT(value));
return dest;
@@ -633,7 +630,7 @@
MULTI PMC *subtract(Rational value, PMC* dest) {
#ifdef PARROT_HAS_GMP
- dest = pmc_new(INTERP, SELF->vtable->base_type);
+ dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
mpq_sub(RT(dest), RT(SELF), RT(value));
return dest;
#else
@@ -743,7 +740,7 @@
MULTI PMC *multiply(Rational value, PMC* dest) {
#ifdef PARROT_HAS_GMP
- dest = pmc_new(INTERP, SELF->vtable->base_type);
+ dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
mpq_mul(RT(dest), RT(SELF), RT(value));
return dest;
#else
@@ -853,7 +850,7 @@
MULTI PMC *divide(Rational value, PMC* dest) {
#ifdef PARROT_HAS_GMP
- dest = pmc_new(INTERP, SELF->vtable->base_type);
+ dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
mpq_div(RT(dest), RT(SELF), RT(value));
return dest;
#else
@@ -951,7 +948,7 @@
*/
VTABLE PMC *neg(PMC* dest) {
#ifdef PARROT_HAS_GMP
- dest = pmc_new(INTERP, SELF->vtable->base_type);
+ dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
mpq_neg(RT(dest), RT(SELF));
return dest;
@@ -984,7 +981,7 @@
*/
VTABLE PMC *absolute(PMC* dest) {
#ifdef PARROT_HAS_GMP
- dest = pmc_new(INTERP, SELF->vtable->base_type);
+ dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
mpq_abs(RT(dest), RT(SELF));
return dest;
Modified: branches/boehm_gc_2/src/embed.c
==============================================================================
--- branches/boehm_gc_2/src/embed.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/embed.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2009, Parrot Foundation.
+Copyright (C) 2001-2010, Parrot Foundation.
$Id$
=head1 NAME
@@ -37,8 +37,9 @@
static const char * op_name(PARROT_INTERP, int k)
__attribute__nonnull__(1);
-static void print_constant_table(PARROT_INTERP)
- __attribute__nonnull__(1);
+static void print_constant_table(PARROT_INTERP, ARGIN(PMC *output))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
static void print_debug(PARROT_INTERP, SHIM(int status), SHIM(void *p))
__attribute__nonnull__(1);
@@ -55,7 +56,8 @@
#define ASSERT_ARGS_op_name __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_print_constant_table __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(output))
#define ASSERT_ARGS_print_debug __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_set_current_sub __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
@@ -186,7 +188,7 @@
void
Parrot_set_executable_name(PARROT_INTERP, Parrot_String name)
{
- PMC * const name_pmc = pmc_new(interp, enum_class_String);
+ PMC * const name_pmc = Parrot_pmc_new(interp, enum_class_String);
VTABLE_set_string_native(interp, name_pmc, name);
VTABLE_set_pmc_keyed_int(interp, interp->iglobals, IGLOBALS_EXECUTABLE,
name_pmc);
@@ -463,7 +465,7 @@
INTVAL wanted = program_size;
size_t read_result;
- program_code = mem_allocate_n_typed(chunk_size, char);
+ program_code = mem_gc_allocate_n_typed(interp, chunk_size, char);
cursor = program_code;
program_size = 0;
@@ -474,7 +476,8 @@
break;
chunk_size = 1024;
- mem_realloc_n_typed(program_code, program_size + chunk_size, char);
+ program_code = mem_gc_realloc_n_typed(interp, program_code,
+ program_size + chunk_size, char);
if (!program_code) {
Parrot_io_eprintf(interp,
@@ -492,7 +495,7 @@
"Parrot VM: Problem reading packfile from PIO: code %d.\n",
ferror(io));
fclose(io);
- mem_sys_free(program_code);
+ mem_gc_free(interp, program_code);
return NULL;
}
@@ -635,7 +638,7 @@
setup_argv(PARROT_INTERP, int argc, ARGIN(char **argv))
{
ASSERT_ARGS(setup_argv)
- PMC *userargv = pmc_new(interp, enum_class_ResizableStringArray);
+ PMC *userargv = Parrot_pmc_new(interp, enum_class_ResizableStringArray);
INTVAL i;
if (Interp_debug_TEST(interp, PARROT_START_DEBUG_FLAG)) {
@@ -763,7 +766,7 @@
/* 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);
+ sub_pmc = Parrot_pmc_new(interp, enum_class_Sub);
Parrot_pcc_set_sub(interp, CURRENT_CONTEXT(interp), sub_pmc);
return sub_pmc;
@@ -868,7 +871,7 @@
/*
-=item C<static void print_constant_table(PARROT_INTERP)>
+=item C<static void print_constant_table(PARROT_INTERP, PMC *output)>
Prints the contents of the constants table.
@@ -876,41 +879,41 @@
*/
static void
-print_constant_table(PARROT_INTERP)
+print_constant_table(PARROT_INTERP, ARGIN(PMC *output))
{
ASSERT_ARGS(print_constant_table)
const INTVAL numconstants = interp->code->const_table->const_count;
INTVAL i;
/* TODO: would be nice to print the name of the file as well */
- Parrot_io_printf(interp, "=head1 Constant-table\n\n");
+ Parrot_io_fprintf(interp, output, "=head1 Constant-table\n\n");
for (i = 0; i < numconstants; ++i) {
const PackFile_Constant * const c = interp->code->const_table->constants[i];
switch (c->type) {
case PFC_NUMBER:
- Parrot_io_printf(interp, "PMC_CONST(%d): %f\n", i, c->u.number);
+ Parrot_io_fprintf(interp, output, "PMC_CONST(%d): %f\n", i, c->u.number);
break;
case PFC_STRING:
- Parrot_io_printf(interp, "PMC_CONST(%d): %S\n", i, c->u.string);
+ Parrot_io_fprintf(interp, output, "PMC_CONST(%d): %S\n", i, c->u.string);
break;
case PFC_KEY:
- Parrot_io_printf(interp, "PMC_CONST(%d): ", i);
+ Parrot_io_fprintf(interp, output, "PMC_CONST(%d): ", i);
/* XXX */
/* Parrot_print_p(interp, c->u.key); */
- Parrot_io_printf(interp, "(PMC constant)");
- Parrot_io_printf(interp, "\n");
+ Parrot_io_fprintf(interp, output, "(PMC constant)");
+ Parrot_io_fprintf(interp, output, "\n");
break;
case PFC_PMC:
{
- Parrot_io_printf(interp, "PMC_CONST(%d): ", i);
+ Parrot_io_fprintf(interp, output, "PMC_CONST(%d): ", i);
switch (c->u.key->vtable->base_type) {
/* each PBC file has a ParrotInterpreter, but it can't
* stringify by itself */
case enum_class_ParrotInterpreter:
- Parrot_io_printf(interp, "'ParrotInterpreter'");
+ Parrot_io_fprintf(interp, output, "'ParrotInterpreter'");
break;
/* FixedIntegerArrays used for signatures, handy to print */
@@ -918,15 +921,15 @@
{
INTVAL n = VTABLE_elements(interp, c->u.key);
INTVAL i;
- Parrot_io_printf(interp, "[");
+ Parrot_io_fprintf(interp, output, "[");
for (i = 0; i < n; ++i) {
INTVAL val = VTABLE_get_integer_keyed_int(interp, c->u.key, i);
- Parrot_io_printf(interp, "%d", val);
+ Parrot_io_fprintf(interp, output, "%d", val);
if (i < n - 1)
- Parrot_io_printf(interp, ",");
+ Parrot_io_fprintf(interp, output, ",");
}
- Parrot_io_printf(interp, "]");
+ Parrot_io_fprintf(interp, output, "]");
break;
}
case enum_class_NameSpace:
@@ -937,28 +940,28 @@
/*Parrot_print_p(interp, c->u.key);*/
STRING * const s = VTABLE_get_string(interp, c->u.key);
if (s)
- Parrot_io_printf(interp, "%Ss", s);
+ Parrot_io_fprintf(interp, output, "%Ss", s);
break;
}
case enum_class_Sub:
- Parrot_io_printf(interp, "%S", VTABLE_get_string(interp, c->u.key));
+ Parrot_io_fprintf(interp, output, "%S", VTABLE_get_string(interp, c->u.key));
break;
default:
- Parrot_io_printf(interp, "(PMC constant)");
+ Parrot_io_fprintf(interp, output, "(PMC constant)");
break;
}
- Parrot_io_printf(interp, "\n");
+ Parrot_io_fprintf(interp, output, "\n");
break;
}
default:
- Parrot_io_printf(interp, "wrong constant type in constant table!\n");
+ Parrot_io_fprintf(interp, output, "wrong constant type in constant table!\n");
/* XXX throw an exception? Is it worth the trouble? */
break;
}
}
- Parrot_io_printf(interp, "\n=cut\n\n");
+ Parrot_io_fprintf(interp, output, "\n=cut\n\n");
}
@@ -977,14 +980,23 @@
PARROT_EXPORT
void
-Parrot_disassemble(PARROT_INTERP, SHIM(const char *outfile), Parrot_disassemble_options options)
+Parrot_disassemble(PARROT_INTERP, ARGIN(const char *outfile), Parrot_disassemble_options options)
{
PDB_line_t *line;
- PDB_t * const pdb = mem_allocate_zeroed_typed(PDB_t);
+ PDB_t * const pdb = mem_gc_allocate_typed(interp, PDB_t);
int num_mappings = 0;
int curr_mapping = 0;
int op_code_seq_num = 0;
int debugs;
+ PMC *output;
+
+ if (outfile != NULL) {
+ output = Parrot_io_open(interp, PMCNULL,
+ Parrot_str_new(interp, outfile, 0),
+ Parrot_str_new_constant(interp, "tw"));
+ }
+ else
+ output = Parrot_io_stdhandle(interp, PIO_STDOUT_FILENO, PMCNULL);
interp->pdb = pdb;
pdb->cur_opcode = interp->code->base.data;
@@ -994,26 +1006,26 @@
line = pdb->file->line;
debugs = (interp->code->debugs != NULL);
- print_constant_table(interp);
+ print_constant_table(interp, output);
if (options & enum_DIS_HEADER)
return;
if (!(options & enum_DIS_BARE))
- Parrot_io_printf(interp, "# %12s-%12s", "Seq_Op_Num", "Relative-PC");
+ Parrot_io_fprintf(interp, output, "# %12s-%12s", "Seq_Op_Num", "Relative-PC");
if (debugs) {
if (!(options & enum_DIS_BARE))
- Parrot_io_printf(interp, " %6s:\n", "SrcLn#");
+ Parrot_io_fprintf(interp, output, " %6s:\n", "SrcLn#");
num_mappings = interp->code->debugs->num_mappings;
}
else {
- Parrot_io_printf(interp, "\n");
+ Parrot_io_fprintf(interp, output, "\n");
}
while (line->next) {
const char *c;
- /* Parrot_io_printf(interp, "%i < %i %i == %i \n", curr_mapping,
+ /* Parrot_io_fprintf(interp, output, "%i < %i %i == %i \n", curr_mapping,
* num_mappings, op_code_seq_num,
* interp->code->debugs->mappings[curr_mapping]->offset); */
@@ -1021,35 +1033,37 @@
if (op_code_seq_num == interp->code->debugs->mappings[curr_mapping]->offset) {
const int filename_const_offset =
interp->code->debugs->mappings[curr_mapping]->filename;
- Parrot_io_printf(interp, "# Current Source Filename '%Ss'\n",
+ Parrot_io_fprintf(interp, output, "# Current Source Filename '%Ss'\n",
interp->code->const_table->constants[filename_const_offset]->u.string);
curr_mapping++;
}
}
if (!(options & enum_DIS_BARE))
- Parrot_io_printf(interp, "%012i-%012i",
+ Parrot_io_fprintf(interp, output, "%012i-%012i",
op_code_seq_num, line->opcode - interp->code->base.data);
if (debugs && !(options & enum_DIS_BARE))
- Parrot_io_printf(interp, " %06i: ",
+ Parrot_io_fprintf(interp, output, " %06i: ",
interp->code->debugs->base.data[op_code_seq_num]);
/* If it has a label print it */
if (line->label)
- Parrot_io_printf(interp, "L%li:\t", line->label->number);
+ Parrot_io_fprintf(interp, output, "L%li:\t", line->label->number);
else
- Parrot_io_printf(interp, "\t");
+ Parrot_io_fprintf(interp, output, "\t");
c = pdb->file->source + line->source_offset;
while (c && *c != '\n')
- Parrot_io_printf(interp, "%c", *(c++));
+ Parrot_io_fprintf(interp, output, "%c", *(c++));
- Parrot_io_printf(interp, "\n");
+ Parrot_io_fprintf(interp, output, "\n");
line = line->next;
op_code_seq_num++;
}
+ if (outfile != NULL)
+ Parrot_io_close(interp, output);
return;
}
@@ -1076,7 +1090,7 @@
PackFile * const pf = PackFile_new(interp, 0);
static opcode_t program_code[2];
- program_code[0] = interp->op_lib->op_code("enternative", 0);
+ program_code[0] = interp->op_lib->op_code(interp, "enternative", 0);
program_code[1] = 0; /* end */
pf->cur_cs = (PackFile_ByteCode *)
Modified: branches/boehm_gc_2/src/events.c
==============================================================================
--- branches/boehm_gc_2/src/events.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/events.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -472,7 +472,7 @@
Parrot_schedule_event(PARROT_INTERP, ARGMOD(parrot_event* ev))
{
ASSERT_ARGS(Parrot_schedule_event)
- QUEUE_ENTRY * const entry = mem_allocate_typed(QUEUE_ENTRY);
+ QUEUE_ENTRY * const entry = mem_internal_allocate_typed(QUEUE_ENTRY);
entry->next = NULL;
ev->interp = interp;
entry->data = ev;
@@ -509,8 +509,8 @@
schedule_signal_event(int signum)
{
ASSERT_ARGS(schedule_signal_event)
- parrot_event* const ev = mem_allocate_typed(parrot_event);
- QUEUE_ENTRY * const entry = mem_allocate_typed(QUEUE_ENTRY);
+ parrot_event* const ev = mem_internal_allocate_typed(parrot_event);
+ QUEUE_ENTRY * const entry = mem_internal_allocate_typed(QUEUE_ENTRY);
entry->next = NULL;
entry->type = QUEUE_ENTRY_TYPE_EVENT;
@@ -541,7 +541,7 @@
FLOATVAL interval, int repeat, ARGIN_NULLOK(PMC *sub), parrot_event_type_enum typ)
{
ASSERT_ARGS(Parrot_new_timer_event)
- parrot_event* const ev = mem_allocate_typed(parrot_event);
+ parrot_event* const ev = mem_internal_allocate_typed(parrot_event);
const FLOATVAL now = Parrot_floatval_time();
@@ -573,8 +573,8 @@
Parrot_new_cb_event(PARROT_INTERP, ARGIN(PMC *cbi), ARGIN(char *ext))
{
ASSERT_ARGS(Parrot_new_cb_event)
- parrot_event* const ev = mem_allocate_typed(parrot_event);
- QUEUE_ENTRY* const entry = mem_allocate_typed(QUEUE_ENTRY);
+ parrot_event* const ev = mem_internal_allocate_typed(parrot_event);
+ QUEUE_ENTRY* const entry = mem_internal_allocate_typed(QUEUE_ENTRY);
entry->next = NULL;
entry->data = ev;
@@ -636,7 +636,7 @@
Parrot_new_terminate_event(PARROT_INTERP)
{
ASSERT_ARGS(Parrot_new_terminate_event)
- parrot_event* const ev = mem_allocate_typed(parrot_event);
+ parrot_event* const ev = mem_internal_allocate_typed(parrot_event);
ev->type = EVENT_TYPE_TERMINATE;
Parrot_schedule_event(interp, ev);
}
@@ -658,9 +658,9 @@
{
ASSERT_ARGS(Parrot_new_suspend_for_gc_event)
QUEUE_ENTRY *qe;
- parrot_event* const ev = mem_allocate_typed(parrot_event);
+ parrot_event* const ev = mem_internal_allocate_typed(parrot_event);
ev->type = EVENT_TYPE_SUSPEND_FOR_GC;
- qe = mem_allocate_typed(QUEUE_ENTRY);
+ qe = mem_internal_allocate_typed(QUEUE_ENTRY);
qe->next = NULL;
qe->data = ev;
qe->type = QUEUE_ENTRY_TYPE_EVENT;
@@ -685,7 +685,7 @@
Parrot_kill_event_loop(PARROT_INTERP)
{
ASSERT_ARGS(Parrot_kill_event_loop)
- parrot_event* const ev = mem_allocate_typed(parrot_event);
+ parrot_event* const ev = mem_internal_allocate_typed(parrot_event);
ev->type = EVENT_TYPE_EVENT_TERMINATE;
Parrot_schedule_event(interp, ev);
}
@@ -786,13 +786,13 @@
}
break;
default:
- mem_sys_free(entry);
- mem_sys_free(event);
+ mem_internal_free(entry);
+ mem_internal_free(event);
}
break;
default:
- mem_sys_free(entry);
- mem_sys_free(event);
+ mem_internal_free(entry);
+ mem_internal_free(event);
exit_fatal(1, "Unknown event to broadcast");
break;
}
@@ -828,11 +828,12 @@
ASSERT_ARGS(store_io_event)
if (!ios->alloced) {
ios->alloced = 16;
- ios->events = mem_allocate_n_zeroed_typed(ios->alloced, parrot_event *);
+ ios->events = mem_internal_allocate_n_zeroed_typed(ios->alloced, parrot_event *);
}
else if (ios->n >= ios->alloced) {
+ ios->events = mem_internal_realloc_n_zeroed_typed(ios->events,
+ ios->alloced * 2, ios->alloced, parrot_event *);
ios->alloced *= 2;
- mem_realloc_n_typed(ios->events, ios->alloced, parrot_event *);
}
ios->events[ios->n++] = ev;
}
@@ -965,7 +966,7 @@
PMC * const pio = buf.ev->u.io_event.pio;
const int fd = Parrot_io_getfd(buf.ev->interp, pio);
if (FD_ISSET(fd, &act_rfds)) {
- mem_sys_free(buf.ev);
+ mem_internal_free(buf.ev);
break;
}
FD_SET(fd, &act_rfds);
@@ -1048,7 +1049,7 @@
{
ASSERT_ARGS(Parrot_event_add_io_event)
io_thread_msg buf;
- parrot_event * const event = mem_allocate_typed(parrot_event);
+ parrot_event * const event = mem_internal_allocate_typed(parrot_event);
event->type = EVENT_TYPE_IO;
event->interp = interp;
@@ -1093,11 +1094,11 @@
dup_entry(ARGIN(const QUEUE_ENTRY *entry))
{
ASSERT_ARGS(dup_entry)
- QUEUE_ENTRY * const new_entry = mem_allocate_typed(QUEUE_ENTRY);
+ QUEUE_ENTRY * const new_entry = mem_internal_allocate_typed(QUEUE_ENTRY);
new_entry->next = NULL;
new_entry->type = entry->type;
- new_entry->data = mem_allocate_typed(parrot_event);
+ new_entry->data = mem_internal_allocate_typed(parrot_event);
mem_sys_memcopy(new_entry->data, entry->data, sizeof (parrot_event));
return new_entry;
@@ -1188,13 +1189,13 @@
}
PARROT_ASSERT(event);
if (event->type == EVENT_TYPE_NONE) {
- mem_sys_free(entry);
- mem_sys_free(event);
+ mem_internal_free(entry);
+ mem_internal_free(event);
continue;
}
else if (event->type == EVENT_TYPE_EVENT_TERMINATE) {
- mem_sys_free(entry);
- mem_sys_free(event);
+ mem_internal_free(entry);
+ mem_internal_free(event);
return 0;
}
@@ -1323,7 +1324,7 @@
QUEUE_ENTRY * const entry = wait_for_entry(tq);
parrot_event * const event = (parrot_event*)entry->data;
- mem_sys_free(entry);
+ mem_internal_free(entry);
edebug((stderr, "got ev %s head : %p\n", et(event), tq->head));
next = do_event(interp, event, next);
}
@@ -1497,7 +1498,7 @@
fprintf(stderr, "Unhandled event type %d\n", (int)event->type);
break;
}
- mem_sys_free(event);
+ mem_internal_free(event);
return next;
}
@@ -1533,7 +1534,7 @@
QUEUE_ENTRY * const entry = pop_entry(tq);
parrot_event * const event = (parrot_event*)entry->data;
- mem_sys_free(entry);
+ mem_internal_free(entry);
next = do_event(interp, event, next);
}
Modified: branches/boehm_gc_2/src/exceptions.c
==============================================================================
--- branches/boehm_gc_2/src/exceptions.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/exceptions.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -68,7 +68,7 @@
long error, ARGIN_NULLOK(STRING *msg))
{
ASSERT_ARGS(Parrot_ex_build_exception)
- PMC *exception = pmc_new(interp, enum_class_Exception);
+ PMC *exception = Parrot_pmc_new(interp, enum_class_Exception);
VTABLE_set_integer_keyed_str(interp, exception, CONST_STRING(interp, "severity"), severity);
VTABLE_set_integer_keyed_str(interp, exception, CONST_STRING(interp, "type"), error);
@@ -176,7 +176,7 @@
Parrot_ex_add_c_handler(PARROT_INTERP, ARGIN(Parrot_runloop *jp))
{
ASSERT_ARGS(Parrot_ex_add_c_handler)
- PMC * const handler = pmc_new(interp, enum_class_ExceptionHandler);
+ PMC * const handler = Parrot_pmc_new(interp, enum_class_ExceptionHandler);
/* Flag to mark a C exception handler */
PObj_get_FLAGS(handler) |= SUB_FLAG_C_HANDLER;
VTABLE_set_pointer(interp, handler, jp);
Modified: branches/boehm_gc_2/src/exit.c
==============================================================================
--- branches/boehm_gc_2/src/exit.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/exit.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -42,7 +42,7 @@
{
ASSERT_ARGS(Parrot_on_exit)
- handler_node_t * const new_node = mem_allocate_typed(handler_node_t);
+ handler_node_t * const new_node = mem_internal_allocate_typed(handler_node_t);
new_node->function = function;
new_node->arg = arg;
@@ -88,7 +88,7 @@
handler_node_t * const next = node->next;
(node->function)(interp, status, node->arg);
- mem_sys_free(node);
+ mem_internal_free(node);
node = next;
}
Modified: branches/boehm_gc_2/src/extend.c
==============================================================================
--- branches/boehm_gc_2/src/extend.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/extend.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -945,7 +945,7 @@
ASSERT_ARGS(Parrot_PMC_new)
Parrot_PMC newpmc;
PARROT_CALLIN_START(interp);
- newpmc = pmc_new_noinit(interp, type);
+ newpmc = Parrot_pmc_new_noinit(interp, type);
VTABLE_init(interp, newpmc);
PARROT_CALLIN_END(interp);
return newpmc;
@@ -968,7 +968,7 @@
ASSERT_ARGS(Parrot_PMC_typenum)
Parrot_Int retval;
PARROT_CALLIN_START(interp);
- retval = pmc_type(interp, Parrot_str_new(interp, _class, 0));
+ retval = Parrot_pmc_get_type_str(interp, Parrot_str_new(interp, _class, 0));
PARROT_CALLIN_END(interp);
return retval;
}
@@ -1058,120 +1058,6 @@
/*
-=item C<void * Parrot_call_sub(PARROT_INTERP, Parrot_PMC sub_pmc, const char
-*signature, ...)>
-
-Call a parrot subroutine with the given function signature. The first char in
-C<signature> denotes the return value. Next chars are arguments.
-
-The return value of this function can be void or a pointer type.
-
-Signature chars are:
-
- v ... void return
- I ... Parrot_Int
- N ... Parrot_Float
- S ... Parrot_String
- P ... Parrot_PMC
-
-=cut
-
-*/
-
-PARROT_EXPORT
-PARROT_WARN_UNUSED_RESULT
-PARROT_CAN_RETURN_NULL
-void *
-Parrot_call_sub(PARROT_INTERP, Parrot_PMC sub_pmc,
- ARGIN(const char *signature), ...)
-{
- ASSERT_ARGS(Parrot_call_sub)
- va_list args;
- PMC *sig_object;
- Parrot_sub *sub;
- void *result = NULL;
- const char *arg_sig = signature;
- char return_sig = signature[0];
-
- 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). */
- 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_sub_ret_int(PARROT_INTERP, Parrot_PMC sub_pmc,
-const char *signature, ...)>
-
-Like C<Parrot_call_sub>, with Parrot_Int return result.
-
-=cut
-
-*/
-
-PARROT_EXPORT
-Parrot_Int
-Parrot_call_sub_ret_int(PARROT_INTERP, Parrot_PMC sub_pmc,
- ARGIN(const char *signature), ...)
-{
- ASSERT_ARGS(Parrot_call_sub_ret_int)
- va_list args;
- PMC *sig_object;
- Parrot_Int 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, "I"), &result);
- 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.
@@ -1391,7 +1277,7 @@
{
ASSERT_ARGS(Parrot_register_pmc)
PARROT_CALLIN_START(interp);
- gc_register_pmc(interp, pmc);
+ Parrot_pmc_gc_register(interp, pmc);
PARROT_CALLIN_END(interp);
}
@@ -1412,7 +1298,7 @@
{
ASSERT_ARGS(Parrot_unregister_pmc)
PARROT_CALLIN_START(interp);
- gc_unregister_pmc(interp, pmc);
+ Parrot_pmc_gc_unregister(interp, pmc);
PARROT_CALLIN_END(interp);
}
@@ -1473,7 +1359,7 @@
ASSERT_ARGS(Parrot_sub_new_from_c_func)
Parrot_String sig = Parrot_new_string(interp, signature, strlen(signature),
(char *) NULL, 0);
- Parrot_PMC sub = pmc_new(interp, enum_class_NCI);
+ Parrot_PMC sub = Parrot_pmc_new(interp, enum_class_NCI);
VTABLE_set_pointer_keyed_str(interp, sub, sig, F2DPTR(func));
PObj_get_FLAGS(sub) |= PObj_private1_FLAG;
return sub;
@@ -1497,7 +1383,7 @@
Parrot_PMC result;
PARROT_CALLIN_START(interp);
- result = pmc_new_init(interp, enum_class_Class, classtype);
+ result = Parrot_pmc_new_init(interp, enum_class_Class, classtype);
PARROT_CALLIN_END(interp);
return result;
Modified: branches/boehm_gc_2/src/frame_builder.c
==============================================================================
--- branches/boehm_gc_2/src/frame_builder.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/frame_builder.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -62,7 +62,7 @@
PMC *
Parrot_jit_clone_buffer(PARROT_INTERP, PMC *pmc, void *priv)
{
- PMC * const rv = pmc_new(interp, pmc->vtable->base_type);
+ PMC * const rv = Parrot_pmc_new(interp, pmc->vtable->base_type);
VTABLE_init(interp, rv);
/* copy the attributes */
@@ -82,7 +82,7 @@
GETATTR_ManagedStruct_custom_free_priv(interp , pmc, freepriv);
GETATTR_ManagedStruct_custom_clone_priv(interp, pmc, clonepriv);
if (freepriv) {
- void *tmp = mem_sys_allocate(sizeof (struct jit_buffer_private_data));
+ void *tmp = mem_gc_allocate_zeroed_typed(interp, struct jit_buffer_private_data);
memcpy(tmp, freepriv, sizeof (struct jit_buffer_private_data));
SETATTR_ManagedStruct_custom_free_priv(interp, rv , tmp);
if (clonepriv == freepriv) {
@@ -92,7 +92,7 @@
}
}
if (clonepriv) {
- void *tmp = mem_sys_allocate(sizeof (struct jit_buffer_private_data));
+ void *tmp = mem_gc_allocate_zeroed_typed(interp, struct jit_buffer_private_data);
memcpy(tmp, clonepriv, sizeof (struct jit_buffer_private_data));
SETATTR_ManagedStruct_custom_clone_priv(interp, rv , tmp);
}
@@ -550,7 +550,7 @@
/* make new pmc */
emitm_movl_i_m(pc, enum_class_UnManagedStruct, emit_EBP, 0, 1, temp_calls_offset + 4);
- emitm_call_cfunc(pc, pmc_new);
+ emitm_call_cfunc(pc, Parrot_pmc_new);
/* restore pointer p to EDX */
emitm_movl_m_r(interp, pc, emit_EDX, emit_EBP, 0, 1, temp_calls_offset + 12);
Modified: branches/boehm_gc_2/src/gc/alloc_memory.c
==============================================================================
--- branches/boehm_gc_2/src/gc/alloc_memory.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/gc/alloc_memory.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2009, Parrot Foundation.
+Copyright (C) 2001-2010, Parrot Foundation.
$Id$
=head1 NAME
@@ -268,8 +268,6 @@
return ptr;
}
-#if 0
-
/*
=item C<void * mem__internal_realloc_zeroed(void *from, size_t size, size_t
@@ -292,15 +290,15 @@
{
ASSERT_ARGS(mem__internal_realloc_zeroed)
void * const ptr = realloc(from, size);
-# ifdef DETAIL_MEMORY_DEBUG
+#ifdef DETAIL_MEMORY_DEBUG
fprintf(stderr, "internal free of %p (realloc -- %i bytes) (%s/%d)\n",
from, size, file, line);
fprintf(stderr, "Internal malloc %i at %p (%s/%d)\n",
size, ptr, file, line);
-# else
+#else
UNUSED(file);
UNUSED(line);
-# endif
+#endif
if (!ptr)
PANIC_OUT_OF_MEM(size);
if (size > old_size)
@@ -309,8 +307,6 @@
return ptr;
}
-#endif
-
/*
=item C<void mem_sys_free(void *from)>
Modified: branches/boehm_gc_2/src/gc/alloc_resources.c
==============================================================================
--- branches/boehm_gc_2/src/gc/alloc_resources.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/gc/alloc_resources.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2009, Parrot Foundation.
+Copyright (C) 2001-2010, Parrot Foundation.
$Id$
=head1 NAME
@@ -80,6 +80,7 @@
__attribute__nonnull__(2)
FUNC_MODIFIES(*dest_interp);
+static void free_memory_pool(Variable_Size_Pool *pool);
static void free_pool(ARGMOD(Fixed_Size_Pool *pool))
__attribute__nonnull__(1)
FUNC_MODIFIES(*pool);
@@ -143,6 +144,7 @@
#define ASSERT_ARGS_fix_pmc_syncs __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(dest_interp) \
, PARROT_ASSERT_ARG(pool))
+#define ASSERT_ARGS_free_memory_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_free_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(pool))
#define ASSERT_ARGS_new_memory_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
@@ -627,33 +629,6 @@
/*
-=item C<size_t aligned_size(const Buffer *buffer, size_t len)>
-
-Determines the size of Buffer C<buffer> which has nominal length C<len>.
-The actual size in RAM of the Buffer might be different because of
-alignment issues.
-
-=cut
-
-*/
-
-PARROT_PURE_FUNCTION
-PARROT_WARN_UNUSED_RESULT
-size_t
-aligned_size(ARGIN(const Buffer *buffer), size_t len)
-{
- ASSERT_ARGS(aligned_size)
- if (PObj_is_COWable_TEST(buffer))
- len += sizeof (void*);
- if (PObj_aligned_TEST(buffer))
- len = (len + BUFFER_ALIGN_1) & BUFFER_ALIGN_MASK;
- else
- len = (len + WORD_ALIGN_1) & WORD_ALIGN_MASK;
- return len;
-}
-
-/*
-
=item C<char * aligned_mem(const Buffer *buffer, char *mem)>
Returns a pointer to the aligned allocated storage for Buffer C<buffer>,
@@ -670,6 +645,10 @@
aligned_mem(ARGIN(const Buffer *buffer), ARGIN(char *mem))
{
ASSERT_ARGS(aligned_mem)
+#if 0
+ This code causing assert in compact_pool. Looks like STRINGs have
+ aligned flag set, but allocated less memory.
+ See C<aligned_string_size>.
if (PObj_is_COWable_TEST(buffer))
mem += sizeof (void*);
if (PObj_aligned_TEST(buffer))
@@ -677,6 +656,9 @@
BUFFER_ALIGN_MASK);
else
mem = (char*)(((unsigned long)(mem + WORD_ALIGN_1)) & WORD_ALIGN_MASK);
+#endif
+ mem += sizeof (void*);
+ mem = (char*)(((unsigned long)(mem + WORD_ALIGN_1)) & WORD_ALIGN_MASK);
return mem;
}
@@ -1160,6 +1142,33 @@
/*
+=item C<static void free_memory_pool(Variable_Size_Pool *pool)>
+
+Frees a memory pool; helper function for C<Parrot_gc_destroy_memory_pools>.
+
+=cut
+
+*/
+
+static void
+free_memory_pool(Variable_Size_Pool *pool)
+{
+ ASSERT_ARGS(free_memory_pool)
+
+ Memory_Block *cur_block = pool->top_block;
+
+ while (cur_block) {
+ Memory_Block * const next_block = cur_block->prev;
+ mem_internal_free(cur_block);
+ cur_block = next_block;
+ }
+
+ mem_internal_free(pool);
+}
+
+
+/*
+
=item C<void Parrot_gc_destroy_memory_pools(PARROT_INTERP, Memory_Pools * const
mem_pools)>
@@ -1176,24 +1185,9 @@
ARGIN(Memory_Pools * const mem_pools))
{
ASSERT_ARGS(Parrot_gc_destroy_memory_pools)
- int i;
-
- for (i = 0; i < 2; i++) {
- Variable_Size_Pool * const pool = i ?
- mem_pools->constant_string_pool :
- mem_pools->memory_pool;
- Memory_Block *cur_block;
-
- cur_block = pool->top_block;
-
- while (cur_block) {
- Memory_Block * const next_block = cur_block->prev;
- mem_internal_free(cur_block);
- cur_block = next_block;
- }
- mem_internal_free(pool);
- }
+ free_memory_pool(mem_pools->constant_string_pool);
+ free_memory_pool(mem_pools->memory_pool);
}
/*
Modified: branches/boehm_gc_2/src/gc/api.c
==============================================================================
--- branches/boehm_gc_2/src/gc/api.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/gc/api.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -279,7 +279,54 @@
default:
/* die horribly because of invalid GC core specified */
break;
- }
+ };
+
+ /* Assertions that GC subsystem has complete API */
+ PARROT_ASSERT(interp->gc_sys->finalize_gc_system);
+ PARROT_ASSERT(interp->gc_sys->destroy_child_interp);
+
+ PARROT_ASSERT(interp->gc_sys->do_gc_mark);
+ PARROT_ASSERT(interp->gc_sys->compact_string_pool);
+
+ PARROT_ASSERT(interp->gc_sys->mark_special);
+ PARROT_ASSERT(interp->gc_sys->pmc_needs_early_collection);
+
+ PARROT_ASSERT(interp->gc_sys->allocate_pmc_header);
+ PARROT_ASSERT(interp->gc_sys->free_pmc_header);
+
+ PARROT_ASSERT(interp->gc_sys->allocate_string_header);
+ PARROT_ASSERT(interp->gc_sys->free_string_header);
+
+ PARROT_ASSERT(interp->gc_sys->allocate_bufferlike_header);
+ PARROT_ASSERT(interp->gc_sys->free_bufferlike_header);
+
+ PARROT_ASSERT(interp->gc_sys->allocate_pmc_attributes);
+ PARROT_ASSERT(interp->gc_sys->free_pmc_attributes);
+
+ PARROT_ASSERT(interp->gc_sys->allocate_string_storage);
+ PARROT_ASSERT(interp->gc_sys->reallocate_string_storage);
+
+ PARROT_ASSERT(interp->gc_sys->allocate_buffer_storage);
+ PARROT_ASSERT(interp->gc_sys->reallocate_buffer_storage);
+
+ PARROT_ASSERT(interp->gc_sys->allocate_fixed_size_storage);
+ PARROT_ASSERT(interp->gc_sys->free_fixed_size_storage);
+
+ PARROT_ASSERT(interp->gc_sys->allocate_memory_chunk);
+ PARROT_ASSERT(interp->gc_sys->reallocate_memory_chunk);
+ PARROT_ASSERT(interp->gc_sys->allocate_memory_chunk_with_interior_pointers);
+ PARROT_ASSERT(interp->gc_sys->reallocate_memory_chunk_with_interior_pointers);
+ PARROT_ASSERT(interp->gc_sys->free_memory_chunk);
+
+ PARROT_ASSERT(interp->gc_sys->block_mark);
+ PARROT_ASSERT(interp->gc_sys->unblock_mark);
+ PARROT_ASSERT(interp->gc_sys->is_blocked_mark);
+
+ PARROT_ASSERT(interp->gc_sys->block_sweep);
+ PARROT_ASSERT(interp->gc_sys->unblock_sweep);
+ PARROT_ASSERT(interp->gc_sys->is_blocked_sweep);
+
+ PARROT_ASSERT(interp->gc_sys->get_gc_info);
}
/*
@@ -300,7 +347,7 @@
if (interp->gc_sys->finalize_gc_system)
interp->gc_sys->finalize_gc_system(interp);
- mem_sys_free(interp->gc_sys);
+ mem_internal_free(interp->gc_sys);
interp->gc_sys = NULL;
}
@@ -399,7 +446,7 @@
if (PMC_sync(pmc))
return;
- PMC_sync(pmc) = mem_allocate_typed(Sync);
+ PMC_sync(pmc) = mem_gc_allocate_zeroed_typed(interp, Sync);
if (!PMC_sync(pmc))
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_ALLOCATION_ERROR,
@@ -657,6 +704,75 @@
interp->gc_sys->free_fixed_size_storage(interp, size, data);
}
+/*
+
+=item C<void * Parrot_gc_allocate_memory_chunk(PARROT_INTERP, size_t size)>
+
+=item C<void * Parrot_gc_reallocate_memory_chunk(PARROT_INTERP, void *data,
+size_t newsize)>
+
+=item C<void Parrot_gc_free_memory_chunk(PARROT_INTERP, void *data)>
+
+=item C<void *
+Parrot_gc_allocate_memory_chunk_with_interior_pointers(PARROT_INTERP, size_t
+size)>
+
+=item C<void *
+Parrot_gc_reallocate_memory_chunk_with_interior_pointers(PARROT_INTERP, void
+*data, size_t newsize, size_t oldsize)>
+
+TODO Write docu.
+
+*/
+
+PARROT_EXPORT
+PARROT_CANNOT_RETURN_NULL
+void *
+Parrot_gc_allocate_memory_chunk(PARROT_INTERP, size_t size)
+{
+ ASSERT_ARGS(Parrot_gc_allocate_memory_chunk)
+ return interp->gc_sys->allocate_memory_chunk(interp, size);
+}
+
+PARROT_EXPORT
+PARROT_CANNOT_RETURN_NULL
+void *
+Parrot_gc_reallocate_memory_chunk(PARROT_INTERP, ARGFREE(void *data), size_t newsize)
+{
+ ASSERT_ARGS(Parrot_gc_reallocate_memory_chunk)
+ return interp->gc_sys->reallocate_memory_chunk(interp, data, newsize);
+}
+
+PARROT_EXPORT
+PARROT_CANNOT_RETURN_NULL
+void
+Parrot_gc_free_memory_chunk(PARROT_INTERP, ARGIN_NULLOK(void *data))
+{
+ ASSERT_ARGS(Parrot_gc_free_memory_chunk)
+ interp->gc_sys->free_memory_chunk(interp, data);
+}
+
+
+PARROT_EXPORT
+PARROT_CANNOT_RETURN_NULL
+void *
+Parrot_gc_allocate_memory_chunk_with_interior_pointers(PARROT_INTERP, size_t size)
+{
+ ASSERT_ARGS(Parrot_gc_allocate_memory_chunk_with_interior_pointers)
+ return interp->gc_sys->allocate_memory_chunk_with_interior_pointers(interp, size);
+}
+
+PARROT_EXPORT
+PARROT_CANNOT_RETURN_NULL
+void *
+Parrot_gc_reallocate_memory_chunk_with_interior_pointers(PARROT_INTERP,
+ ARGFREE(void *data), size_t newsize, size_t oldsize)
+{
+ ASSERT_ARGS(Parrot_gc_reallocate_memory_chunk_with_interior_pointers)
+ return interp->gc_sys->reallocate_memory_chunk_with_interior_pointers(interp,
+ data, newsize, oldsize);
+}
+
/*
@@ -1004,7 +1120,8 @@
PARROT_CANNOT_RETURN_NULL
STRING *
-Parrot_gc_sys_name(PARROT_INTERP) {
+Parrot_gc_sys_name(PARROT_INTERP)
+{
ASSERT_ARGS(Parrot_gc_sys_name)
STRING *name = NULL;
switch (interp->gc_sys->sys_type) {
Modified: branches/boehm_gc_2/src/gc/gc_inf.c
==============================================================================
--- branches/boehm_gc_2/src/gc/gc_inf.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/gc/gc_inf.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -60,46 +60,60 @@
__attribute__nonnull__(2)
FUNC_MODIFIES(*buffer);
+PARROT_CAN_RETURN_NULL
static Buffer* gc_inf_allocate_bufferlike_header(PARROT_INTERP, size_t size)
__attribute__nonnull__(1);
+PARROT_CAN_RETURN_NULL
static void* gc_inf_allocate_fixed_size_storage(PARROT_INTERP, size_t size)
__attribute__nonnull__(1);
-static void* gc_inf_allocate_pmc_attributes(PARROT_INTERP, PMC *pmc)
- __attribute__nonnull__(1);
+PARROT_CAN_RETURN_NULL
+static void* gc_inf_allocate_pmc_attributes(PARROT_INTERP, ARGMOD(PMC *pmc))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ FUNC_MODIFIES(*pmc);
+PARROT_CAN_RETURN_NULL
static PMC* gc_inf_allocate_pmc_header(PARROT_INTERP, UINTVAL flags)
__attribute__nonnull__(1);
+PARROT_CAN_RETURN_NULL
static STRING* gc_inf_allocate_string_header(PARROT_INTERP, UINTVAL flags)
__attribute__nonnull__(1);
static void gc_inf_allocate_string_storage(PARROT_INTERP,
- STRING *str,
+ ARGMOD(STRING *str),
size_t size)
- __attribute__nonnull__(1);
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ FUNC_MODIFIES(*str);
static void gc_inf_compact_memory_pool(PARROT_INTERP)
__attribute__nonnull__(1);
static void gc_inf_free_bufferlike_header(PARROT_INTERP,
- Buffer *b,
+ ARGIN_NULLOK(Buffer *b),
size_t size)
__attribute__nonnull__(1);
static void gc_inf_free_fixed_size_storage(PARROT_INTERP,
size_t size,
- void *data)
- __attribute__nonnull__(1);
+ ARGMOD(void *data))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(3)
+ FUNC_MODIFIES(*data);
-static void gc_inf_free_pmc_attributes(PARROT_INTERP, PMC *pmc)
- __attribute__nonnull__(1);
+static void gc_inf_free_pmc_attributes(PARROT_INTERP, ARGMOD(PMC *pmc))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ FUNC_MODIFIES(*pmc);
-static void gc_inf_free_pmc_header(PARROT_INTERP, PMC *pmc)
+static void gc_inf_free_pmc_header(PARROT_INTERP, ARGIN_NULLOK(PMC *pmc))
__attribute__nonnull__(1);
-static void gc_inf_free_string_header(PARROT_INTERP, STRING *s)
+static void gc_inf_free_string_header(PARROT_INTERP,
+ ARGIN_NULLOK(STRING *s))
__attribute__nonnull__(1);
PARROT_CANNOT_RETURN_NULL
@@ -133,9 +147,11 @@
FUNC_MODIFIES(*buffer);
static void gc_inf_reallocate_string_storage(PARROT_INTERP,
- STRING *str,
+ ARGMOD(STRING *str),
size_t size)
- __attribute__nonnull__(1);
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ FUNC_MODIFIES(*str);
#define ASSERT_ARGS_gc_inf_add_free_object __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(mem_pools) \
@@ -156,23 +172,27 @@
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_gc_inf_allocate_pmc_attributes \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(pmc))
#define ASSERT_ARGS_gc_inf_allocate_pmc_header __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_gc_inf_allocate_string_header __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_gc_inf_allocate_string_storage \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(str))
#define ASSERT_ARGS_gc_inf_compact_memory_pool __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_gc_inf_free_bufferlike_header __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_gc_inf_free_fixed_size_storage \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(data))
#define ASSERT_ARGS_gc_inf_free_pmc_attributes __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(pmc))
#define ASSERT_ARGS_gc_inf_free_pmc_header __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_gc_inf_free_string_header __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
@@ -194,7 +214,8 @@
, PARROT_ASSERT_ARG(buffer))
#define ASSERT_ARGS_gc_inf_reallocate_string_storage \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(str))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: static */
@@ -424,6 +445,7 @@
*/
+PARROT_CAN_RETURN_NULL
static PMC*
gc_inf_allocate_pmc_header(PARROT_INTERP, UINTVAL flags)
{
@@ -432,14 +454,14 @@
}
static void
-gc_inf_free_pmc_header(PARROT_INTERP, PMC *pmc)
+gc_inf_free_pmc_header(PARROT_INTERP, ARGIN_NULLOK(PMC *pmc))
{
ASSERT_ARGS(gc_inf_free_pmc_header)
if (pmc)
free(pmc);
}
-
+PARROT_CAN_RETURN_NULL
static STRING*
gc_inf_allocate_string_header(PARROT_INTERP, UINTVAL flags)
{
@@ -448,14 +470,14 @@
}
static void
-gc_inf_free_string_header(PARROT_INTERP, STRING *s)
+gc_inf_free_string_header(PARROT_INTERP, ARGIN_NULLOK(STRING *s))
{
ASSERT_ARGS(gc_inf_free_string_header)
if (s)
free(s);
}
-
+PARROT_CAN_RETURN_NULL
static Buffer*
gc_inf_allocate_bufferlike_header(PARROT_INTERP, size_t size)
{
@@ -464,16 +486,16 @@
}
static void
-gc_inf_free_bufferlike_header(PARROT_INTERP, Buffer *b, size_t size)
+gc_inf_free_bufferlike_header(PARROT_INTERP, ARGIN_NULLOK(Buffer *b), size_t size)
{
ASSERT_ARGS(gc_inf_free_bufferlike_header)
if (b)
free(b);
}
-
+PARROT_CAN_RETURN_NULL
static void*
-gc_inf_allocate_pmc_attributes(PARROT_INTERP, PMC *pmc)
+gc_inf_allocate_pmc_attributes(PARROT_INTERP, ARGMOD(PMC *pmc))
{
ASSERT_ARGS(gc_inf_allocate_pmc_attributes)
const size_t attr_size = pmc->vtable->attr_size;
@@ -482,7 +504,7 @@
}
static void
-gc_inf_free_pmc_attributes(PARROT_INTERP, PMC *pmc)
+gc_inf_free_pmc_attributes(PARROT_INTERP, ARGMOD(PMC *pmc))
{
ASSERT_ARGS(gc_inf_free_pmc_attributes)
if (PMC_data(pmc))
@@ -491,7 +513,7 @@
static void
-gc_inf_allocate_string_storage(PARROT_INTERP, STRING *str, size_t size)
+gc_inf_allocate_string_storage(PARROT_INTERP, ARGMOD(STRING *str), size_t size)
{
ASSERT_ARGS(gc_inf_allocate_string_storage)
char *mem;
@@ -502,19 +524,19 @@
if (size == 0)
return;
- mem = (char *)mem_sys_allocate(size);
+ mem = (char *)mem_internal_allocate(size);
Buffer_bufstart(str) = str->strstart = mem;
Buffer_buflen(str) = size;
}
static void
-gc_inf_reallocate_string_storage(PARROT_INTERP, STRING *str, size_t size)
+gc_inf_reallocate_string_storage(PARROT_INTERP, ARGMOD(STRING *str), size_t size)
{
ASSERT_ARGS(gc_inf_reallocate_string_storage)
char *mem;
- mem = (char *)mem_sys_realloc(Buffer_bufstart(str), size);
+ mem = (char *)mem_internal_realloc(Buffer_bufstart(str), size);
Buffer_bufstart(str) = str->strstart = mem;
Buffer_buflen(str) = size;
@@ -533,7 +555,7 @@
if (size == 0)
return;
- mem = (char *)mem_sys_allocate(size);
+ mem = (char *)mem_internal_allocate(size);
Buffer_bufstart(buffer) = mem;
Buffer_buflen(buffer) = size;
@@ -545,13 +567,13 @@
ASSERT_ARGS(gc_inf_reallocate_buffer_storage)
char *mem;
- mem = (char *)mem_sys_realloc(Buffer_bufstart(buffer), size);
+ mem = (char *)mem_internal_realloc(Buffer_bufstart(buffer), size);
Buffer_bufstart(buffer) = mem;
Buffer_buflen(buffer) = size;
}
-
+PARROT_CAN_RETURN_NULL
static void*
gc_inf_allocate_fixed_size_storage(PARROT_INTERP, size_t size)
{
@@ -560,11 +582,11 @@
}
static void
-gc_inf_free_fixed_size_storage(PARROT_INTERP, size_t size, void *data)
+gc_inf_free_fixed_size_storage(PARROT_INTERP, size_t size, ARGMOD(void *data))
{
ASSERT_ARGS(gc_inf_free_fixed_size_storage)
if (data)
- free(data);
+ mem_internal_free(data);
}
/*
Modified: branches/boehm_gc_2/src/gc/gc_ms.c
==============================================================================
--- branches/boehm_gc_2/src/gc/gc_ms.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/gc/gc_ms.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2009, Parrot Foundation.
+Copyright (C) 2001-2010, Parrot Foundation.
$Id$
=head1 NAME
@@ -56,6 +56,12 @@
static Buffer * gc_ms_allocate_bufferlike_header(PARROT_INTERP, size_t size)
__attribute__nonnull__(1);
+static void * gc_ms_allocate_memory_chunk(PARROT_INTERP, size_t size)
+ __attribute__nonnull__(1);
+
+static void * gc_ms_allocate_memory_chunk_zeroed(PARROT_INTERP, size_t size)
+ __attribute__nonnull__(1);
+
PARROT_CAN_RETURN_NULL
static PMC* gc_ms_allocate_pmc_header(PARROT_INTERP, UINTVAL flags)
__attribute__nonnull__(1);
@@ -85,6 +91,15 @@
__attribute__nonnull__(1)
__attribute__nonnull__(2);
+static void gc_ms_free_attributes_from_pool(PARROT_INTERP,
+ ARGMOD(PMC_Attribute_Pool *pool),
+ ARGMOD(void *data))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3)
+ FUNC_MODIFIES(*pool)
+ FUNC_MODIFIES(*data);
+
static void gc_ms_free_bufferlike_header(PARROT_INTERP,
ARGMOD(Buffer *obj),
size_t size)
@@ -92,6 +107,9 @@
__attribute__nonnull__(2)
FUNC_MODIFIES(*obj);
+static void gc_ms_free_memory_chunk(PARROT_INTERP, ARGFREE(void *data))
+ __attribute__nonnull__(1);
+
static void gc_ms_free_pmc_header(PARROT_INTERP, ARGMOD(PMC *pmc))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
@@ -147,6 +165,17 @@
__attribute__nonnull__(2)
FUNC_MODIFIES(*buffer);
+static void * gc_ms_reallocate_memory_chunk(PARROT_INTERP,
+ ARGFREE(void *data),
+ size_t newsize)
+ __attribute__nonnull__(1);
+
+static void * gc_ms_reallocate_memory_chunk_zeroed(PARROT_INTERP,
+ ARGFREE(void *data),
+ size_t newsize,
+ size_t oldsize)
+ __attribute__nonnull__(1);
+
static void gc_ms_reallocate_string_storage(PARROT_INTERP,
ARGMOD(STRING *str),
size_t newsize)
@@ -181,15 +210,6 @@
static void gc_ms_unblock_GC_sweep(PARROT_INTERP)
__attribute__nonnull__(1);
-static void gc_ms_free_attributes_from_pool(PARROT_INTERP,
- ARGMOD(PMC_Attribute_Pool *pool),
- ARGMOD(void *data))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3)
- FUNC_MODIFIES(*pool)
- FUNC_MODIFIES(*data);
-
#define ASSERT_ARGS_gc_ms_active_sized_buffers __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(mem_pools))
@@ -207,6 +227,11 @@
#define ASSERT_ARGS_gc_ms_allocate_bufferlike_header \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_gc_ms_allocate_memory_chunk __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_gc_ms_allocate_memory_chunk_zeroed \
+ __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_gc_ms_allocate_pmc_header __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_gc_ms_allocate_string_header __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
@@ -223,9 +248,16 @@
#define ASSERT_ARGS_gc_ms_finalize_memory_pools __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(mem_pools))
+#define ASSERT_ARGS_gc_ms_free_attributes_from_pool \
+ __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(pool) \
+ , PARROT_ASSERT_ARG(data))
#define ASSERT_ARGS_gc_ms_free_bufferlike_header __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(obj))
+#define ASSERT_ARGS_gc_ms_free_memory_chunk __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_gc_ms_free_pmc_header __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(pmc))
@@ -257,6 +289,11 @@
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(buffer))
+#define ASSERT_ARGS_gc_ms_reallocate_memory_chunk __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_gc_ms_reallocate_memory_chunk_zeroed \
+ __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_gc_ms_reallocate_string_storage \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
@@ -275,11 +312,6 @@
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_gc_ms_unblock_GC_sweep __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_gc_ms_free_attributes_from_pool \
- __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(pool) \
- , PARROT_ASSERT_ARG(data))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: static */
@@ -305,7 +337,7 @@
{
ASSERT_ARGS(Parrot_gc_ms_init)
- interp->mem_pools = mem_allocate_zeroed_typed(Memory_Pools);
+ interp->mem_pools = mem_internal_allocate_zeroed_typed(Memory_Pools);
interp->mem_pools->num_sized = 0;
interp->mem_pools->num_attribs = 0;
interp->mem_pools->attrib_pools = NULL;
@@ -342,6 +374,15 @@
interp->gc_sys->allocate_fixed_size_storage = gc_ms_allocate_fixed_size_storage;
interp->gc_sys->free_fixed_size_storage = gc_ms_free_fixed_size_storage;
+ /* We don't distinguish between chunk and chunk_with_pointers */
+ interp->gc_sys->allocate_memory_chunk = gc_ms_allocate_memory_chunk;
+ interp->gc_sys->reallocate_memory_chunk = gc_ms_reallocate_memory_chunk;
+ interp->gc_sys->allocate_memory_chunk_with_interior_pointers
+ = gc_ms_allocate_memory_chunk_zeroed;
+ interp->gc_sys->reallocate_memory_chunk_with_interior_pointers
+ = gc_ms_reallocate_memory_chunk_zeroed;
+ interp->gc_sys->free_memory_chunk = gc_ms_free_memory_chunk;
+
interp->gc_sys->block_mark = gc_ms_block_GC_mark;
interp->gc_sys->unblock_mark = gc_ms_unblock_GC_mark;
interp->gc_sys->is_blocked_mark = gc_ms_is_blocked_GC_mark;
@@ -379,7 +420,7 @@
Parrot_gc_destroy_memory_pools(interp, interp->mem_pools);
/* mem subsystem is dead now */
- mem_sys_free(interp->mem_pools);
+ mem_internal_free(interp->mem_pools);
interp->mem_pools = NULL;
}
@@ -471,6 +512,7 @@
/* Note it */
mem_pools->gc_mark_runs++;
--mem_pools->gc_mark_block_level;
+ mem_pools->header_allocs_since_last_collect = 0;
return;
}
@@ -720,7 +762,7 @@
PMC_data(pmc) = attrs;
return attrs;
#else
- void * const data = mem_sys_allocate_zeroed(attr_size);
+ void * const data = gc_ms_allocate_memory_chunk(attr_size);
PMC_data(pmc) = data;
return data;
#endif
@@ -750,7 +792,7 @@
const size_t idx = item_size - sizeof (void *);
gc_ms_free_attributes_from_pool(interp, pools[idx], data);
#else
- mem_sys_free(PMC_data(pmc));
+ gc_ms_free_memory_chunk(PMC_data(pmc));
PMC_data(pmc) = NULL;
#endif
}
@@ -803,13 +845,12 @@
Buffer_buflen(buffer) = 0;
Buffer_bufstart(buffer) = NULL;
- new_size = aligned_size(buffer, size);
+ new_size = aligned_string_size(size);
mem = (char *)mem_allocate(interp, interp->mem_pools, new_size,
interp->mem_pools->memory_pool);
mem = aligned_mem(buffer, mem);
Buffer_bufstart(buffer) = mem;
- if (PObj_is_COWable_TEST(buffer))
- new_size -= sizeof (void*);
+ new_size -= sizeof (void*);
Buffer_buflen(buffer) = new_size;
}
@@ -852,8 +893,8 @@
* normally, which play ping pong with buffers.
* The normal case is therefore always to allocate a new block
*/
- new_size = aligned_size(buffer, newsize);
- old_size = aligned_size(buffer, Buffer_buflen(buffer));
+ new_size = aligned_string_size(newsize);
+ old_size = aligned_string_size(Buffer_buflen(buffer));
needed = new_size - old_size;
if ((pool->top_block->free >= needed)
@@ -881,8 +922,7 @@
Buffer_bufstart(buffer) = mem;
- if (PObj_is_COWable_TEST(buffer))
- new_size -= sizeof (void *);
+ new_size -= sizeof (void *);
Buffer_buflen(buffer) = new_size;
}
@@ -1050,6 +1090,65 @@
gc_ms_free_attributes_from_pool(interp, pools[idx], data);
}
+/*
+
+=item C<static void * gc_ms_allocate_memory_chunk(PARROT_INTERP, size_t size)>
+
+=item C<static void * gc_ms_reallocate_memory_chunk(PARROT_INTERP, void *data,
+size_t newsize)>
+
+=item C<static void * gc_ms_allocate_memory_chunk_zeroed(PARROT_INTERP, size_t
+size)>
+
+=item C<static void * gc_ms_reallocate_memory_chunk_zeroed(PARROT_INTERP, void
+*data, size_t newsize, size_t oldsize)>
+
+=item C<static void gc_ms_free_memory_chunk(PARROT_INTERP, void *data)>
+
+TODO Write docu.
+
+*/
+
+static void *
+gc_ms_allocate_memory_chunk(PARROT_INTERP, size_t size)
+{
+ ASSERT_ARGS(gc_ms_allocate_memory_chunk)
+ return mem_sys_allocate(size);
+}
+
+static void *
+gc_ms_reallocate_memory_chunk(PARROT_INTERP, ARGFREE(void *data), size_t newsize)
+{
+ ASSERT_ARGS(gc_ms_reallocate_memory_chunk)
+ return mem_sys_realloc(data, newsize);
+}
+
+static void *
+gc_ms_allocate_memory_chunk_zeroed(PARROT_INTERP, size_t size)
+{
+ ASSERT_ARGS(gc_ms_allocate_memory_chunk_zeroed)
+ /* FIXME UB of realloc to clear allocated memory */
+ return mem_sys_realloc(NULL, size);
+}
+
+static void *
+gc_ms_reallocate_memory_chunk_zeroed(PARROT_INTERP, ARGFREE(void *data),
+ size_t newsize, size_t oldsize)
+{
+ ASSERT_ARGS(gc_ms_reallocate_memory_chunk_zeroed)
+ void * const ptr = realloc(data, newsize);
+ if (newsize > oldsize)
+ memset((char*)ptr + oldsize, 0, newsize - oldsize);
+ return ptr;
+}
+
+static void
+gc_ms_free_memory_chunk(PARROT_INTERP, ARGFREE(void *data))
+{
+ ASSERT_ARGS(gc_ms_free_memory_chunk)
+ mem_sys_free(data);
+}
+
/*
@@ -1156,12 +1255,10 @@
if (pool->skip == GC_ONE_SKIP)
pool->skip = GC_NO_SKIP;
- else if (pool->skip == GC_NO_SKIP) {
- Fixed_Size_Arena * const arena = pool->last_Arena;
- if (arena
- && arena->used == arena->total_objects)
- Parrot_gc_mark_and_sweep(interp, GC_trace_stack_FLAG);
- }
+ else if (pool->skip == GC_NEVER_SKIP
+ || (pool->skip == GC_NO_SKIP
+ && mem_pools->header_allocs_since_last_collect >= GC_SIZE_THRESHOLD))
+ Parrot_gc_mark_and_sweep(interp, GC_trace_stack_FLAG);
/* requires that num_free_objects be updated in Parrot_gc_mark_and_sweep.
If gc is disabled, then we must check the free list directly. */
@@ -1323,13 +1420,17 @@
if (alloc_size > POOL_MAX_BYTES)
pool->objects_per_alloc = POOL_MAX_BYTES / pool->object_size;
+
+ if (alloc_size > GC_SIZE_THRESHOLD)
+ pool->skip = GC_NEVER_SKIP;
}
+
/*
=item C<static void gc_ms_block_GC_mark(PARROT_INTERP)>
-Blocks the GC from performing it's mark phase.
+Blocks the GC from performing its mark phase.
=item C<static void gc_ms_unblock_GC_mark(PARROT_INTERP)>
@@ -1337,7 +1438,7 @@
=item C<static void gc_ms_block_GC_sweep(PARROT_INTERP)>
-Blocks the GC from performing it's sweep phase.
+Blocks the GC from performing its sweep phase.
=item C<static void gc_ms_unblock_GC_sweep(PARROT_INTERP)>
Modified: branches/boehm_gc_2/src/gc/gc_private.h
==============================================================================
--- branches/boehm_gc_2/src/gc/gc_private.h Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/gc/gc_private.h Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2009, Parrot Foundation.
+Copyright (C) 2001-2010, Parrot Foundation.
$Id$
=head1 NAME
@@ -45,6 +45,7 @@
#define UNITS_PER_ALLOC_GROWTH_FACTOR 1.75
#define POOL_MAX_BYTES 65536 * 128
+#define GC_SIZE_THRESHOLD 1024 * 1024
#define PMC_HEADERS_PER_ALLOC 4096 * 10 / sizeof (PMC)
#define BUFFER_HEADERS_PER_ALLOC 4096 / sizeof (Buffer)
@@ -92,7 +93,8 @@
typedef enum _gc_skip_type_enum {
GC_NO_SKIP = 0,
GC_ONE_SKIP,
- GC_ALWAYS_SKIP
+ GC_ALWAYS_SKIP,
+ GC_NEVER_SKIP
} gc_skip_type_enum;
typedef struct GC_Subsystem {
@@ -133,6 +135,13 @@
void* (*allocate_fixed_size_storage)(PARROT_INTERP, size_t size);
void (*free_fixed_size_storage)(PARROT_INTERP, size_t size, void *);
+ void* (*allocate_memory_chunk)(PARROT_INTERP, size_t size);
+ void* (*reallocate_memory_chunk)(PARROT_INTERP, void *data, size_t newsize);
+ void* (*allocate_memory_chunk_with_interior_pointers)(PARROT_INTERP, size_t size);
+ void* (*reallocate_memory_chunk_with_interior_pointers)(PARROT_INTERP, void *data,
+ size_t oldsize, size_t newsize);
+ void (*free_memory_chunk)(PARROT_INTERP, void *data);
+
void (*block_mark)(PARROT_INTERP);
void (*unblock_mark)(PARROT_INTERP);
unsigned int (*is_blocked_mark)(PARROT_INTERP);
@@ -250,21 +259,20 @@
} Fixed_Size_Pool;
typedef struct Memory_Pools {
- Variable_Size_Pool *memory_pool;
- Variable_Size_Pool *constant_string_pool;
- struct Fixed_Size_Pool *string_header_pool;
- struct Fixed_Size_Pool *pmc_pool;
- struct Fixed_Size_Pool *constant_pmc_pool;
- struct Fixed_Size_Pool *constant_string_header_pool;
- struct Fixed_Size_Pool **sized_header_pools;
- size_t num_sized;
+ Variable_Size_Pool *memory_pool;
+ Variable_Size_Pool *constant_string_pool;
+ Fixed_Size_Pool *string_header_pool;
+ Fixed_Size_Pool *pmc_pool;
+ Fixed_Size_Pool *constant_pmc_pool;
+ Fixed_Size_Pool *constant_string_header_pool;
+ Fixed_Size_Pool **sized_header_pools;
+ size_t num_sized;
PMC_Attribute_Pool **attrib_pools;
- size_t num_attribs;
-
+ size_t num_attribs;
/** statistics for GC **/
- size_t gc_mark_runs; /* Number of times we've done a mark run*/
+ size_t gc_mark_runs; /* Number of times we've done a mark run */
size_t gc_lazy_mark_runs; /* Number of successful lazy mark runs */
size_t gc_collect_runs; /* Number of times we've done a memory
compaction */
@@ -272,7 +280,7 @@
* allocations from the
* system since the last
* compaction run */
- size_t header_allocs_since_last_collect; /* The number of header
+ size_t header_allocs_since_last_collect; /* The size of header
* blocks allocated from
* the system since the last
* GC run */
@@ -286,24 +294,21 @@
during collection */
UINTVAL num_early_gc_PMCs; /* how many PMCs want immediate destruction */
UINTVAL num_early_PMCs_seen; /* how many such PMCs has GC seen */
- PMC* gc_mark_start; /* first PMC marked during a GC run */
- PMC* gc_mark_ptr; /* last PMC marked during a GC run */
- PMC* gc_trace_ptr; /* last PMC trace_children was called on */
- int lazy_gc; /* flag that indicates whether we should stop
+ PMC *gc_mark_start; /* first PMC marked during a GC run */
+ PMC *gc_mark_ptr; /* last PMC marked during a GC run */
+ PMC *gc_trace_ptr; /* last PMC trace_children was called on */
+ int lazy_gc; /* flag that indicates whether we should stop
when we've seen all impatient PMCs */
- /*
- * GC blocking
- */
+
+ /* GC blocking */
UINTVAL gc_mark_block_level; /* How many outstanding GC block
requests are there? */
UINTVAL gc_sweep_block_level; /* How many outstanding GC block
requests are there? */
- /*
- * private data for the GC subsystem
- */
- void * gc_private; /* gc subsystem data */
-} Memory_Pools;
+ /* private data for the GC subsystem */
+ void *gc_private; /* gc subsystem data */
+} Memory_Pools;
/* HEADERIZER BEGIN: src/gc/system.c */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
@@ -490,11 +495,6 @@
__attribute__nonnull__(1)
__attribute__nonnull__(2);
-PARROT_PURE_FUNCTION
-PARROT_WARN_UNUSED_RESULT
-size_t aligned_size(ARGIN(const Buffer *buffer), size_t len)
- __attribute__nonnull__(1);
-
PARROT_CONST_FUNCTION
PARROT_WARN_UNUSED_RESULT
size_t aligned_string_size(size_t len);
@@ -561,8 +561,6 @@
#define ASSERT_ARGS_aligned_mem __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(buffer) \
, PARROT_ASSERT_ARG(mem))
-#define ASSERT_ARGS_aligned_size __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(buffer))
#define ASSERT_ARGS_aligned_string_size __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_check_buffer_ptr __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(pobj) \
@@ -690,8 +688,6 @@
#endif /* PARROT_GC_PRIVATE_H_GUARD */
-
-
/*
* Local variables:
* c-file-style: "parrot"
Modified: branches/boehm_gc_2/src/gc/mark_sweep.c
==============================================================================
--- branches/boehm_gc_2/src/gc/mark_sweep.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/gc/mark_sweep.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -538,7 +538,7 @@
new_arena->prev->next = new_arena;
pool->last_Arena = new_arena;
- mem_pools->header_allocs_since_last_collect++;
+ mem_pools->header_allocs_since_last_collect += size;
}
/*
Modified: branches/boehm_gc_2/src/global.c
==============================================================================
--- branches/boehm_gc_2/src/global.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/global.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -249,7 +249,7 @@
return PMCNULL;
/* TT #1221 - match HLL of enclosing namespace? */
- sub_ns = pmc_new(interp, Parrot_get_ctx_HLL_type(interp,
+ sub_ns = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp,
enum_class_NameSpace));
if (PMC_IS_NULL(sub_ns))
@@ -765,7 +765,7 @@
/* is there an existing MultiSub PMC? or do we need to create one? */
if (PMC_IS_NULL(multisub)) {
- multisub = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_MultiSub));
+ multisub = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_MultiSub));
/* we have to push the sub onto the MultiSub before we try to store
it because storing requires information from the sub */
VTABLE_push_pmc(interp, multisub, sub_pmc);
Modified: branches/boehm_gc_2/src/global_setup.c
==============================================================================
--- branches/boehm_gc_2/src/global_setup.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/global_setup.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -104,7 +104,7 @@
config_hash = Parrot_thaw(interp, config_string);
}
else {
- config_hash = pmc_new(interp, enum_class_Hash);
+ config_hash = Parrot_pmc_new(interp, enum_class_Hash);
}
VTABLE_set_pmc_keyed_int(interp, iglobals,
@@ -172,7 +172,7 @@
VTABLE_set_pmc_keyed_int(interp, iglobals,
(INTVAL)IGLOBALS_CLASSNAME_HASH, interp->class_hash);
- self = pmc_new_noinit(interp, enum_class_ParrotInterpreter);
+ self = Parrot_pmc_new_noinit(interp, enum_class_ParrotInterpreter);
VTABLE_set_pointer(interp, self, interp);
/* PMC_data(self) = interp; */
@@ -185,10 +185,10 @@
parrot_init_library_paths(interp);
/* load_bytecode and dynlib loaded hash */
- pmc = pmc_new(interp, enum_class_Hash);
+ pmc = Parrot_pmc_new(interp, enum_class_Hash);
VTABLE_set_pmc_keyed_int(interp, iglobals, IGLOBALS_PBC_LIBS, pmc);
- pmc = pmc_new(interp, enum_class_Hash);
+ pmc = Parrot_pmc_new(interp, enum_class_Hash);
VTABLE_set_pmc_keyed_int(interp, iglobals, IGLOBALS_DYN_LIBS, pmc);
}
@@ -212,18 +212,18 @@
create_initial_context(interp);
/* create the namespace root stash */
- interp->root_namespace = pmc_new(interp, enum_class_NameSpace);
+ interp->root_namespace = Parrot_pmc_new(interp, enum_class_NameSpace);
Parrot_init_HLL(interp);
Parrot_pcc_set_namespace(interp, CURRENT_CONTEXT(interp),
VTABLE_get_pmc_keyed_int(interp, interp->HLL_namespace, 0));
/* We need a class hash */
- interp->class_hash = classname_hash = pmc_new(interp, enum_class_NameSpace);
+ interp->class_hash = classname_hash = Parrot_pmc_new(interp, enum_class_NameSpace);
Parrot_register_core_pmcs(interp, classname_hash);
/* init the interpreter globals array */
- iglobals = pmc_new(interp, enum_class_FixedPMCArray);
+ iglobals = Parrot_pmc_new(interp, enum_class_FixedPMCArray);
interp->iglobals = iglobals;
VTABLE_set_integer_native(interp, iglobals, (INTVAL)IGLOBALS_SIZE);
Modified: branches/boehm_gc_2/src/hash.c
==============================================================================
--- branches/boehm_gc_2/src/hash.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/hash.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -61,9 +61,7 @@
__attribute__nonnull__(3)
FUNC_MODIFIES(*info);
-static void hash_thaw(PARROT_INTERP,
- ARGMOD(Hash *hash),
- ARGMOD(PMC *info))
+static void hash_thaw(PARROT_INTERP, ARGMOD(Hash *hash), ARGMOD(PMC *info))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
__attribute__nonnull__(3)
@@ -1448,7 +1446,7 @@
get_integer_pmc(PARROT_INTERP, INTVAL value)
{
ASSERT_ARGS(get_integer_pmc)
- PMC * const ret = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Integer));
+ PMC * const ret = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Integer));
VTABLE_set_integer_native(interp, ret, value);
return ret;
}
@@ -1469,7 +1467,7 @@
get_number_pmc(PARROT_INTERP, FLOATVAL value)
{
ASSERT_ARGS(get_number_pmc)
- PMC * const ret = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
+ PMC * const ret = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
VTABLE_set_number_native(interp, ret, value);
return ret;
}
@@ -1489,7 +1487,7 @@
get_string_pmc(PARROT_INTERP, ARGIN(STRING *value))
{
ASSERT_ARGS(get_string_pmc)
- PMC * const ret = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_String));
+ PMC * const ret = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_String));
VTABLE_set_string_native(interp, ret, value);
return ret;
}
Modified: branches/boehm_gc_2/src/hll.c
==============================================================================
--- branches/boehm_gc_2/src/hll.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/hll.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -88,7 +88,7 @@
PMC *entry_id;
- PMC * const entry = constant_pmc_new(interp, enum_class_FixedPMCArray);
+ PMC * const entry = Parrot_pmc_new_constant(interp, enum_class_FixedPMCArray);
if (entry_name && !STRING_IS_EMPTY(entry_name)) {
VTABLE_set_pmc_keyed_str(interp, hll_info, entry_name, entry);
@@ -98,7 +98,7 @@
VTABLE_set_integer_native(interp, entry, e_HLL_MAX);
- entry_id = constant_pmc_new(interp, enum_class_Integer);
+ entry_id = Parrot_pmc_new_constant(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, entry_id, id);
VTABLE_set_pmc_keyed_int(interp, entry, e_HLL_id, entry_id);
@@ -122,9 +122,9 @@
{
ASSERT_ARGS(Parrot_init_HLL)
interp->HLL_info =
- pmc_new(interp, enum_class_OrderedHash);
+ Parrot_pmc_new(interp, enum_class_OrderedHash);
interp->HLL_namespace =
- constant_pmc_new(interp, enum_class_ResizablePMCArray);
+ Parrot_pmc_new_constant(interp, enum_class_ResizablePMCArray);
Parrot_register_HLL(interp, CONST_STRING(interp, "parrot"));
}
@@ -168,7 +168,7 @@
entry = new_hll_entry(interp, hll_name);
/* register HLL name */
- name = constant_pmc_new(interp, enum_class_String);
+ name = Parrot_pmc_new_constant(interp, enum_class_String);
VTABLE_set_string_native(interp, name, hll_name);
VTABLE_set_pmc_keyed_int(interp, entry, e_HLL_name, name);
@@ -188,7 +188,7 @@
VTABLE_set_pmc_keyed_int(interp, interp->HLL_namespace, idx, ns_hash);
/* create HLL typemap hash */
- type_hash = constant_pmc_new(interp, enum_class_Hash);
+ type_hash = Parrot_pmc_new_constant(interp, enum_class_Hash);
VTABLE_set_pointer(interp, type_hash, parrot_new_intval_hash(interp));
VTABLE_set_pmc_keyed_int(interp, entry, e_HLL_typemap, type_hash);
@@ -243,7 +243,7 @@
VTABLE_set_pmc_keyed_int(interp, entry, e_HLL_name, PMCNULL);
/* register dynlib */
- name = constant_pmc_new(interp, enum_class_String);
+ name = Parrot_pmc_new_constant(interp, enum_class_String);
VTABLE_set_string_native(interp, name, hll_lib);
VTABLE_set_pmc_keyed_int(interp, entry, e_HLL_lib, name);
Modified: branches/boehm_gc_2/src/interp/inter_cb.c
==============================================================================
--- branches/boehm_gc_2/src/interp/inter_cb.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/interp/inter_cb.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -110,7 +110,7 @@
Parrot_ex_throw_from_c_args(interp, NULL, 1,
"unhandled signature '%Ss' in make_cb", cb_signature);
- cb_sig = pmc_new(interp, enum_class_String);
+ cb_sig = Parrot_pmc_new(interp, enum_class_String);
VTABLE_set_string_native(interp, cb_sig, cb_signature);
sc = CONST_STRING(interp, "_signature");
VTABLE_setprop(interp, user_data, sc, cb_sig);
@@ -122,14 +122,14 @@
* we need to anchor it.
*
*/
- gc_register_pmc(interp, user_data);
+ Parrot_pmc_gc_register(interp, user_data);
/*
* Finally, the external lib awaits a function pointer.
* Create a PMC that points to Parrot_callback_C (or _D);
* it can be passed on with signature 'p'.
*/
- cb = pmc_new(interp, enum_class_UnManagedStruct);
+ cb = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
/*
* Currently, we handle only 2 types:
* _C ... user_data is 2nd parameter
@@ -139,7 +139,7 @@
VTABLE_set_pointer(interp, cb, F2DPTR(Parrot_callback_C));
else
VTABLE_set_pointer(interp, cb, F2DPTR(Parrot_callback_D));
- gc_register_pmc(interp, cb);
+ Parrot_pmc_gc_register(interp, cb);
return cb;
}
@@ -345,7 +345,7 @@
#endif
case 'p':
/* created a UnManagedStruct */
- p_param = pmc_new(interp, enum_class_UnManagedStruct);
+ p_param = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
VTABLE_set_pointer(interp, p_param, external_data);
pasm_sig[1] = 'P';
param = (void*) p_param;
Modified: branches/boehm_gc_2/src/interp/inter_create.c
==============================================================================
--- branches/boehm_gc_2/src/interp/inter_create.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/interp/inter_create.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -37,14 +37,9 @@
__attribute__nonnull__(1)
__attribute__nonnull__(2);
-static void setup_default_compreg(PARROT_INTERP)
- __attribute__nonnull__(1);
-
#define ASSERT_ARGS_is_env_var_set __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(var))
-#define ASSERT_ARGS_setup_default_compreg __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: static */
@@ -78,26 +73,6 @@
/*
-=item C<static void setup_default_compreg(PARROT_INTERP)>
-
-Setup default compiler for PASM.
-
-=cut
-
-*/
-
-static void
-setup_default_compreg(PARROT_INTERP)
-{
- ASSERT_ARGS(setup_default_compreg)
- STRING * const pasm1 = CONST_STRING(interp, "PASM1");
-
- /* register the nci compiler object */
- Parrot_compreg(interp, pasm1, (Parrot_compiler_func_t)PDB_compile);
-}
-
-/*
-
=item C<Parrot_Interp make_interpreter(Interp *parent, INTVAL flags)>
Create the Parrot interpreter. Allocate memory and clear the registers.
@@ -147,7 +122,7 @@
Interp *interp;
/* Get an empty interpreter from system memory */
- interp = mem_allocate_zeroed_typed(Interp);
+ interp = mem_internal_allocate_zeroed_typed(Interp);
interp->lo_var_ptr = NULL;
@@ -181,9 +156,9 @@
interp->current_runloop_level = 0;
/* Allocate IMCC info */
- IMCC_INFO(interp) = mem_allocate_zeroed_typed(imc_info_t);
+ IMCC_INFO(interp) = mem_internal_allocate_zeroed_typed(imc_info_t);
- interp->gc_sys = mem_allocate_zeroed_typed(GC_Subsystem);
+ interp->gc_sys = mem_internal_allocate_zeroed_typed(GC_Subsystem);
interp->gc_sys->sys_type = parent
? parent->gc_sys->sys_type
: PARROT_GC_DEFAULT_TYPE;
@@ -229,8 +204,6 @@
*/
Parrot_str_init(interp);
- Parrot_initialize_core_vtables(interp);
-
/* Set up MMD; MMD cache for builtins. */
interp->op_mmd_cache = Parrot_mmd_cache_create(interp);
@@ -239,6 +212,8 @@
/* initialize classes - this needs mmd func table */
interp->HLL_info = NULL;
+
+ Parrot_initialize_core_vtables(interp);
init_world_once(interp);
/* context data */
@@ -289,19 +264,16 @@
interp->code = NULL;
/* create the root set registry */
- interp->gc_registry = pmc_new(interp, enum_class_AddrRegistry);
+ interp->gc_registry = Parrot_pmc_new(interp, enum_class_AddrRegistry);
/* And a dynamic environment stack */
/* TODO: We should really consider removing this (TT #876) */
- interp->dynamic_env = pmc_new(interp, enum_class_ResizablePMCArray);
+ interp->dynamic_env = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
/* create exceptions list */
interp->current_runloop_id = 0;
interp->current_runloop_level = 0;
- /* register assembler/compilers */
- setup_default_compreg(interp);
-
/* setup stdio PMCs */
Parrot_io_init(interp);
Modified: branches/boehm_gc_2/src/interp/inter_misc.c
==============================================================================
--- branches/boehm_gc_2/src/interp/inter_misc.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/interp/inter_misc.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -51,7 +51,7 @@
ARGIN(const char *name), ARGIN(const char *proto))
{
ASSERT_ARGS(register_nci_method)
- PMC * const method = pmc_new(interp, enum_class_NCI);
+ PMC * const method = Parrot_pmc_new(interp, enum_class_NCI);
STRING * const method_name = string_make(interp, name, strlen(name),
NULL, PObj_constant_FLAG|PObj_external_FLAG);
@@ -84,7 +84,7 @@
ARGIN(STRING *name))
{
ASSERT_ARGS(register_raw_nci_method_in_ns)
- PMC * const method = pmc_new(interp, enum_class_NCI);
+ PMC * const method = Parrot_pmc_new(interp, enum_class_NCI);
/* setup call func */
VTABLE_set_pointer(interp, method, func);
@@ -111,7 +111,7 @@
{
ASSERT_ARGS(Parrot_mark_method_writes)
STRING *const str_name = Parrot_str_new_constant(interp, name);
- PMC *const pmc_true = pmc_new(interp, enum_class_Integer);
+ PMC *const pmc_true = Parrot_pmc_new(interp, enum_class_Integer);
PMC *const method = VTABLE_get_pmc_keyed_str(
interp, interp->vtables[type]->_namespace, str_name);
VTABLE_set_integer_native(interp, pmc_true, 1);
@@ -136,13 +136,13 @@
{
ASSERT_ARGS(Parrot_compreg)
PMC* const iglobals = interp->iglobals;
- PMC *nci = pmc_new(interp, enum_class_NCI);
+ PMC *nci = Parrot_pmc_new(interp, enum_class_NCI);
STRING *sc = CONST_STRING(interp, "PJt");
PMC *hash = VTABLE_get_pmc_keyed_int(interp, interp->iglobals,
IGLOBALS_COMPREG_HASH);
if (!hash) {
- hash = pmc_new_noinit(interp, enum_class_Hash);
+ hash = Parrot_pmc_new_noinit(interp, enum_class_Hash);
VTABLE_init(interp, hash);
VTABLE_set_pmc_keyed_int(interp, iglobals,
(INTVAL)IGLOBALS_COMPREG_HASH, hash);
Modified: branches/boehm_gc_2/src/io/api.c
==============================================================================
--- branches/boehm_gc_2/src/io/api.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/io/api.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -89,7 +89,7 @@
Parrot_io_new_pmc(PARROT_INTERP, INTVAL flags)
{
ASSERT_ARGS(Parrot_io_new_pmc)
- PMC * const new_io = pmc_new(interp, enum_class_FileHandle);
+ PMC * const new_io = Parrot_pmc_new(interp, enum_class_FileHandle);
Parrot_io_set_flags(interp, new_io, flags);
@@ -125,7 +125,7 @@
if (PMC_IS_NULL(pmc)) {
/* TODO: We should look up the HLL mapped type, instead of always
using FileHandle here */
- new_filehandle = pmc_new(interp, enum_class_FileHandle);
+ new_filehandle = Parrot_pmc_new(interp, enum_class_FileHandle);
PARROT_ASSERT(new_filehandle->vtable->base_type == enum_class_FileHandle);
}
else
Modified: branches/boehm_gc_2/src/io/buffer.c
==============================================================================
--- branches/boehm_gc_2/src/io/buffer.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/io/buffer.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -99,14 +99,14 @@
buffer_size = Parrot_io_get_buffer_size(interp, filehandle);
if (buffer_start && (buffer_flags & PIO_BF_MALLOC)) {
- mem_sys_free(buffer_start);
+ mem_gc_free(interp, buffer_start);
Parrot_io_set_buffer_start(interp, filehandle, NULL);
Parrot_io_set_buffer_next(interp, filehandle, NULL);
buffer_start = buffer_next = NULL;
}
if (buffer_size > 0) {
- buffer_start = buffer_next = (unsigned char *)mem_sys_allocate(buffer_size);
+ buffer_start = buffer_next = mem_gc_allocate_n_typed(interp, buffer_size, unsigned char);
Parrot_io_set_buffer_start(interp, filehandle, buffer_start);
Parrot_io_set_buffer_next(interp, filehandle, buffer_next);
buffer_flags |= PIO_BF_MALLOC;
Modified: branches/boehm_gc_2/src/io/core.c
==============================================================================
--- branches/boehm_gc_2/src/io/core.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/io/core.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -64,12 +64,12 @@
}
- interp->piodata = mem_allocate_typed(ParrotIOData);
+ interp->piodata = mem_gc_allocate_zeroed_typed(interp, ParrotIOData);
if (interp->piodata == NULL)
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_PIO_ERROR,
"PIO alloc piodata failure.");
interp->piodata->table =
- (PMC **)mem_sys_allocate_zeroed(PIO_NR_OPEN * sizeof (PMC *));
+ mem_gc_allocate_n_zeroed_typed(interp, PIO_NR_OPEN, PMC *);
if (!interp->piodata->table)
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_PIO_ERROR,
@@ -95,9 +95,9 @@
/*
* TODO free IO of std-handles
*/
- mem_sys_free(interp->piodata->table);
+ mem_gc_free(interp, interp->piodata->table);
interp->piodata->table = NULL;
- mem_sys_free(interp->piodata);
+ mem_gc_free(interp, interp->piodata);
interp->piodata = NULL;
}
Modified: branches/boehm_gc_2/src/io/socket_api.c
==============================================================================
--- branches/boehm_gc_2/src/io/socket_api.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/io/socket_api.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -346,7 +346,7 @@
Parrot_io_new_socket_pmc(PARROT_INTERP, INTVAL flags)
{
ASSERT_ARGS(Parrot_io_new_socket_pmc)
- PMC * const new_io = pmc_new(interp, enum_class_Socket);
+ PMC * const new_io = Parrot_pmc_new(interp, enum_class_Socket);
Parrot_io_set_flags(interp, new_io, flags);
Modified: branches/boehm_gc_2/src/io/socket_unix.c
==============================================================================
--- branches/boehm_gc_2/src/io/socket_unix.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/io/socket_unix.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -102,7 +102,7 @@
ASSERT_ARGS(Parrot_io_sockaddr_in)
char * const s = Parrot_str_to_cstring(interp, addr);
- PMC * const sockaddr = pmc_new(interp, enum_class_Sockaddr);
+ PMC * const sockaddr = Parrot_pmc_new(interp, enum_class_Sockaddr);
get_sockaddr_in(interp, sockaddr, s, port);
Parrot_str_free_cstring(s);
@@ -258,7 +258,7 @@
int newsock;
PARROT_SOCKET(newio)->local = PARROT_SOCKET(socket)->local;
- PARROT_SOCKET(newio)->remote = pmc_new(interp, enum_class_Sockaddr);
+ PARROT_SOCKET(newio)->remote = Parrot_pmc_new(interp, enum_class_Sockaddr);
saddr = SOCKADDR_REMOTE(newio);
newsock = accept(io->os_handle, (struct sockaddr *)saddr, &addrlen);
Modified: branches/boehm_gc_2/src/io/socket_win32.c
==============================================================================
--- branches/boehm_gc_2/src/io/socket_win32.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/io/socket_win32.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -205,7 +205,7 @@
int newsock;
PARROT_SOCKET(newio)->local = PARROT_SOCKET(socket)->local;
- PARROT_SOCKET(newio)->remote = pmc_new(interp, enum_class_Sockaddr);
+ PARROT_SOCKET(newio)->remote = Parrot_pmc_new(interp, enum_class_Sockaddr);
saddr = SOCKADDR_REMOTE(newio);
newsock = accept((int)io->os_handle, (struct sockaddr *)saddr, &addrlen);
@@ -445,7 +445,7 @@
ASSERT_ARGS(Parrot_io_sockaddr_in)
PMC * sockaddr;
char * const s = Parrot_str_to_cstring(interp, addr);
- sockaddr = pmc_new(interp, enum_class_Sockaddr);
+ sockaddr = Parrot_pmc_new(interp, enum_class_Sockaddr);
get_sockaddr_in(interp, sockaddr, s, port);
Parrot_str_free_cstring(s);
return sockaddr;
Modified: branches/boehm_gc_2/src/key.c
==============================================================================
--- branches/boehm_gc_2/src/key.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/key.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -43,7 +43,7 @@
key_new(PARROT_INTERP)
{
ASSERT_ARGS(key_new)
- return pmc_new(interp, enum_class_Key);
+ return Parrot_pmc_new(interp, enum_class_Key);
}
@@ -64,7 +64,7 @@
key_new_integer(PARROT_INTERP, INTVAL value)
{
ASSERT_ARGS(key_new_integer)
- PMC * const key = pmc_new(interp, enum_class_Key);
+ PMC * const key = Parrot_pmc_new(interp, enum_class_Key);
PObj_get_FLAGS(key) |= KEY_integer_FLAG;
SETATTR_Key_int_key(interp, key, value);
@@ -90,7 +90,7 @@
key_new_number(PARROT_INTERP, FLOATVAL value)
{
ASSERT_ARGS(key_new_number)
- PMC * const key = pmc_new(interp, enum_class_Key);
+ PMC * const key = Parrot_pmc_new(interp, enum_class_Key);
PObj_get_FLAGS(key) |= KEY_number_FLAG;
SETATTR_Key_num_key(interp, key, value);
@@ -116,7 +116,7 @@
key_new_string(PARROT_INTERP, ARGIN(STRING *value))
{
ASSERT_ARGS(key_new_string)
- PMC * const key = pmc_new(interp, enum_class_Key);
+ PMC * const key = Parrot_pmc_new(interp, enum_class_Key);
PObj_get_FLAGS(key) |= KEY_string_FLAG;
SETATTR_Key_str_key(interp, key, value);
@@ -164,7 +164,7 @@
key_new_pmc(PARROT_INTERP, ARGIN(PMC *value))
{
ASSERT_ARGS(key_new_pmc)
- PMC * const key = pmc_new(interp, enum_class_Key);
+ PMC * const key = Parrot_pmc_new(interp, enum_class_Key);
PObj_get_FLAGS(key) |= KEY_pmc_FLAG;
Parrot_ex_throw_from_c_args(interp, NULL, 1, "this is broken - see slice.pmc");
Modified: branches/boehm_gc_2/src/library.c
==============================================================================
--- branches/boehm_gc_2/src/library.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/library.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -168,7 +168,7 @@
(INTVAL)IGLOBALS_CONFIG_HASH);
/* create the lib_paths array */
- PMC * const lib_paths = pmc_new(interp, enum_class_FixedPMCArray);
+ PMC * const lib_paths = Parrot_pmc_new(interp, enum_class_FixedPMCArray);
VTABLE_set_integer_native(interp, lib_paths, PARROT_LIB_PATH_SIZE);
VTABLE_set_pmc_keyed_int(interp, iglobals,
@@ -191,7 +191,7 @@
/* each is an array of strings */
/* define include paths */
- paths = pmc_new(interp, enum_class_ResizableStringArray);
+ paths = Parrot_pmc_new(interp, enum_class_ResizableStringArray);
VTABLE_set_pmc_keyed_int(interp, lib_paths,
PARROT_LIB_PATH_INCLUDE, paths);
if (!STRING_IS_NULL(builddir)) {
@@ -209,7 +209,7 @@
/* define library paths */
- paths = pmc_new(interp, enum_class_ResizableStringArray);
+ paths = Parrot_pmc_new(interp, enum_class_ResizableStringArray);
VTABLE_set_pmc_keyed_int(interp, lib_paths,
PARROT_LIB_PATH_LIBRARY, paths);
if (!STRING_IS_NULL(builddir)) {
@@ -224,7 +224,7 @@
}
/* define languages paths */
- paths = pmc_new(interp, enum_class_ResizableStringArray);
+ paths = Parrot_pmc_new(interp, enum_class_ResizableStringArray);
VTABLE_set_pmc_keyed_int(interp, lib_paths,
PARROT_LIB_PATH_LANG, paths);
if (!STRING_IS_NULL(builddir)) {
@@ -239,7 +239,7 @@
}
/* define dynext paths */
- paths = pmc_new(interp, enum_class_ResizableStringArray);
+ paths = Parrot_pmc_new(interp, enum_class_ResizableStringArray);
VTABLE_set_pmc_keyed_int(interp, lib_paths,
PARROT_LIB_PATH_DYNEXT, paths);
if (!STRING_IS_NULL(builddir)) {
@@ -254,7 +254,7 @@
}
/* shared exts */
- paths = pmc_new(interp, enum_class_ResizableStringArray);
+ paths = Parrot_pmc_new(interp, enum_class_ResizableStringArray);
VTABLE_set_pmc_keyed_int(interp, lib_paths,
PARROT_LIB_DYN_EXTS, paths);
/* no CONST_STRING here - the c2str.pl preprocessor needs "real strs" */
Modified: branches/boehm_gc_2/src/main.c
==============================================================================
--- branches/boehm_gc_2/src/main.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/main.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -49,7 +49,7 @@
static const char * parseflags(PARROT_INTERP,
ARGIN(int *argc),
ARGIN(char **argv[]),
- ARGIN(INTVAL *core),
+ ARGIN(Parrot_Run_core_t *core),
ARGIN(Parrot_trace_flags *trace))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
@@ -57,6 +57,10 @@
__attribute__nonnull__(4)
__attribute__nonnull__(5);
+static void parseflags_minimal(PARROT_INTERP, int argc, ARGIN(char *argv[]))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(3);
+
static void usage(ARGMOD(FILE *fp))
__attribute__nonnull__(1)
FUNC_MODIFIES(*fp);
@@ -73,6 +77,9 @@
, PARROT_ASSERT_ARG(argv) \
, PARROT_ASSERT_ARG(core) \
, PARROT_ASSERT_ARG(trace))
+#define ASSERT_ARGS_parseflags_minimal __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(argv))
#define ASSERT_ARGS_usage __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(fp))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
@@ -97,7 +104,7 @@
Interp *interp;
int status;
- INTVAL core = 0;
+ Parrot_Run_core_t core = PARROT_SLOW_CORE;
Parrot_trace_flags trace = PARROT_NO_TRACE;
/* internationalization setup */
@@ -114,13 +121,28 @@
available. */
execname = argv[0];
- /* Parse flags */
- sourcefile = parseflags(interp, &argc, &argv, &core, &trace);
+ /* Parse minimal subset of flags */
+ parseflags_minimal(interp, argc, argv);
/* Now initialize interpreter */
initialize_interpreter(interp, (void*)&stacktop);
imcc_initialize(interp);
+ { /* EXPERIMENTAL: add library and include paths from environment */
+ PMC *env = Parrot_pmc_new(interp, enum_class_Env);
+ STRING *path = VTABLE_get_string_keyed_str(interp, env,
+ Parrot_str_new_constant(interp, "PARROT_LIBRARY"));
+ if (!STRING_is_null(interp, path) && Parrot_str_length(interp, path) > 0)
+ Parrot_lib_add_path(interp, path, PARROT_LIB_PATH_LIBRARY);
+ path = VTABLE_get_string_keyed_str(interp, env,
+ Parrot_str_new_constant(interp, "PARROT_INCLUDE"));
+ if (!STRING_is_null(interp, path) && Parrot_str_length(interp, path) > 0)
+ Parrot_lib_add_path(interp, path, PARROT_LIB_PATH_INCLUDE);
+ }
+
+ /* Parse flags */
+ sourcefile = parseflags(interp, &argc, &argv, &core, &trace);
+
Parrot_set_trace(interp, trace);
Parrot_set_run_core(interp, (Parrot_Run_core_t) core);
Parrot_set_executable_name(interp, Parrot_str_new(interp, execname, 0));
@@ -148,6 +170,7 @@
{ 'D', 'D', OPTION_optional_FLAG, { "--parrot-debug" } },
{ 'E', 'E', (OPTION_flags)0, { "--pre-process-only" } },
{ 'G', 'G', (OPTION_flags)0, { "--no-gc" } },
+ { 'H', 'H', OPTION_required_FLAG, { "--hash-seed" } },
{ 'I', 'I', OPTION_required_FLAG, { "--include" } },
{ 'L', 'L', OPTION_required_FLAG, { "--library" } },
{ 'O', 'O', OPTION_optional_FLAG, { "--optimize" } },
@@ -283,6 +306,7 @@
" -V --version\n"
" -I --include add path to include search\n"
" -L --library add path to library search\n"
+ " -H --hash-seed F00F specify hex value to use as hash seed\n"
" -X --dynext add path to dynamic extension search\n"
" <Run core options>\n"
" -R --runcore slow|bounds|fast|cgoto|cgp\n"
@@ -341,10 +365,56 @@
exit(EXIT_SUCCESS);
}
+
+/*
+
+=item C<static void parseflags_minimal(PARROT_INTERP, int argc, char *argv[])>
+
+Parse minimal subset of args required for initializing interpreter.
+
+=cut
+
+*/
+static void
+parseflags_minimal(PARROT_INTERP, int argc, ARGIN(char *argv[]))
+{
+ ASSERT_ARGS(parseflags_minimal)
+
+ int pos = 0;
+ const char *arg;
+ while (pos < argc) {
+ arg = argv[pos];
+ if (STREQ(arg, "--gc")) {
+ ++pos;
+ if (pos == argc) {
+ fprintf(stderr,
+ "main: No GC specified."
+ "\n\nhelp: parrot -h\n");
+ exit(EXIT_FAILURE);
+ }
+ arg = argv[pos];
+ if (STREQ(arg, "ms"))
+ interp->gc_sys->sys_type = MS;
+ else if (STREQ(arg, "inf"))
+ interp->gc_sys->sys_type = INF;
+ else if (STREQ(arg, "boehm"))
+ interp->gc_sys->sys_type = BOEHM;
+ else {
+ fprintf(stderr,
+ "main: Unrecognized GC '%s' specified."
+ "\n\nhelp: parrot -h\n", arg);
+ exit(EXIT_FAILURE);
+ }
+ break;
+ }
+ ++pos;
+ }
+}
+
/*
=item C<static const char * parseflags(PARROT_INTERP, int *argc, char **argv[],
-INTVAL *core, Parrot_trace_flags *trace)>
+Parrot_Run_core_t *core, Parrot_trace_flags *trace)>
Parse Parrot's command line for options and set appropriate flags.
@@ -356,7 +426,7 @@
static const char *
parseflags(PARROT_INTERP,
ARGIN(int *argc), ARGIN(char **argv[]),
- ARGIN(INTVAL *core), ARGIN(Parrot_trace_flags *trace))
+ ARGIN(Parrot_Run_core_t *core), ARGIN(Parrot_trace_flags *trace))
{
ASSERT_ARGS(parseflags)
struct longopt_opt_info opt = LONGOPT_OPT_INFO_INIT;
@@ -397,22 +467,15 @@
*core = PARROT_PROFILING_CORE;
else if (STREQ(opt.opt_arg, "gcdebug"))
*core = PARROT_GC_DEBUG_CORE;
- else
- Parrot_ex_throw_from_c_args(interp, NULL, 1,
+ else {
+ fprintf(stderr,
"main: Unrecognized runcore '%s' specified."
"\n\nhelp: parrot -h\n", opt.opt_arg);
+ exit(EXIT_FAILURE);
+ }
break;
case 'g':
- if (STREQ(opt.opt_arg, "ms"))
- interp->gc_sys->sys_type = MS;
- else if (STREQ(opt.opt_arg, "inf"))
- interp->gc_sys->sys_type = INF;
- else if (STREQ(opt.opt_arg, "boehm"))
- interp->gc_sys->sys_type = BOEHM;
- else
- Parrot_ex_throw_from_c_args(interp, NULL, 1,
- "main: Unrecognized GC '%s' specified."
- "\n\nhelp: parrot -h\n", opt.opt_arg);
+ /* Handled in parseflags_minimal */
break;
case 't':
if (opt.opt_arg && is_all_hex_digits(opt.opt_arg))
@@ -427,6 +490,12 @@
else
SET_DEBUG(PARROT_MEM_STAT_DEBUG_FLAG);
break;
+ case 'H':
+ if (opt.opt_arg && is_all_hex_digits(opt.opt_arg)) {
+ interp->hash_seed = strtoul(opt.opt_arg, NULL, 16);
+ }
+ break;
+
case '.': /* Give Windows Parrot hackers an opportunity to
* attach a debuggger. */
fgetc(stdin);
@@ -449,10 +518,9 @@
case OPT_GC_DEBUG:
#if DISABLE_GC_DEBUG
- if (!PMC_IS_NULL(CURRENT_CONTEXT(interp)))
- Parrot_warn(interp, PARROT_WARNINGS_ALL_FLAG,
- "PARROT_GC_DEBUG is set but the binary was compiled "
- "with DISABLE_GC_DEBUG.");
+ Parrot_warn(interp, PARROT_WARNINGS_ALL_FLAG,
+ "PARROT_GC_DEBUG is set but the binary was compiled "
+ "with DISABLE_GC_DEBUG.");
#endif
SET_FLAG(PARROT_GC_DEBUG_FLAG);
break;
@@ -477,9 +545,10 @@
break;
/* PIRC flags handling goes here */
- Parrot_ex_throw_from_c_args(interp, NULL, 1,
+ fprintf(stderr,
"main: Invalid flag '%s' used.\n\nhelp: parrot -h\n",
(*argv)[0]);
+ exit(EXIT_FAILURE);
}
}
Modified: branches/boehm_gc_2/src/multidispatch.c
==============================================================================
--- branches/boehm_gc_2/src/multidispatch.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/multidispatch.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -255,7 +255,7 @@
Parrot_mmd_find_multi_from_sig_obj(PARROT_INTERP, ARGIN(STRING *name), ARGIN(PMC *invoke_sig))
{
ASSERT_ARGS(Parrot_mmd_find_multi_from_sig_obj)
- PMC * const candidate_list = pmc_new(interp, enum_class_ResizablePMCArray);
+ PMC * const candidate_list = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
mmd_search_by_sig_obj(interp, name, invoke_sig, candidate_list);
mmd_search_global(interp, name, candidate_list);
@@ -442,7 +442,7 @@
mmd_build_type_tuple_from_type_list(PARROT_INTERP, ARGIN(PMC *type_list))
{
ASSERT_ARGS(mmd_build_type_tuple_from_type_list)
- PMC *multi_sig = constant_pmc_new(interp, enum_class_FixedIntegerArray);
+ PMC *multi_sig = Parrot_pmc_new_constant(interp, enum_class_FixedIntegerArray);
INTVAL param_count = VTABLE_elements(interp, type_list);
INTVAL i;
@@ -461,7 +461,7 @@
else if (Parrot_str_equal(interp, type_name, CONST_STRING(interp, "FLOATVAL")))
type = enum_type_FLOATVAL;
else
- type = pmc_type(interp, type_name);
+ type = Parrot_pmc_get_type_str(interp, type_name);
VTABLE_set_integer_keyed_int(interp, multi_sig, i, type);
}
@@ -513,7 +513,7 @@
Parrot_mmd_build_type_tuple_from_sig_obj(PARROT_INTERP, ARGIN(PMC *sig_obj))
{
ASSERT_ARGS(Parrot_mmd_build_type_tuple_from_sig_obj)
- PMC * const type_tuple = pmc_new(interp, enum_class_ResizableIntegerArray);
+ PMC * const type_tuple = Parrot_pmc_new(interp, enum_class_ResizableIntegerArray);
STRING *string_sig = VTABLE_get_string(interp, sig_obj);
INTVAL tuple_size = 0;
INTVAL args_ended = 0;
@@ -633,7 +633,7 @@
if (!sig)
return PMCNULL;
- type = pmc_type(interp, sig);
+ type = Parrot_pmc_get_type_str(interp, sig);
if (type == enum_type_undef)
return PMCNULL;
@@ -642,11 +642,11 @@
type = VTABLE_get_integer(interp, sig_elem);
}
else
- type = pmc_type_p(interp, sig_elem);
+ type = Parrot_pmc_get_type(interp, sig_elem);
/* create destination PMC only as necessary */
if (PMC_IS_NULL(ar)) {
- ar = pmc_new(interp, enum_class_FixedIntegerArray);
+ ar = Parrot_pmc_new(interp, enum_class_FixedIntegerArray);
VTABLE_set_integer_native(interp, ar, n);
}
@@ -899,7 +899,7 @@
Parrot_mmd_search_scopes(PARROT_INTERP, ARGIN(STRING *meth))
{
ASSERT_ARGS(Parrot_mmd_search_scopes)
- PMC * const candidates = pmc_new(interp, enum_class_ResizablePMCArray);
+ PMC * const candidates = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
const int stop = mmd_search_local(interp, meth, candidates);
if (!stop)
@@ -1061,7 +1061,7 @@
PMC *multi_sub = Parrot_get_global(interp, ns, sub_name);
if (PMC_IS_NULL(multi_sub)) {
- multi_sub = constant_pmc_new(interp, enum_class_MultiSub);
+ multi_sub = Parrot_pmc_new_constant(interp, enum_class_MultiSub);
Parrot_set_global(interp, ns, sub_name, multi_sub);
}
@@ -1094,7 +1094,7 @@
PMC *multi_sub = Parrot_get_global(interp, ns, sub_name);
if (PMC_IS_NULL(multi_sub)) {
- multi_sub = constant_pmc_new(interp, enum_class_MultiSub);
+ multi_sub = Parrot_pmc_new_constant(interp, enum_class_MultiSub);
Parrot_set_global(interp, ns, sub_name, multi_sub);
}
@@ -1172,7 +1172,7 @@
STRING *ns_name = VTABLE_get_string_keyed_int(interp, type_list, 0);
/* Create an NCI sub for the C function */
- PMC *sub_obj = constant_pmc_new(interp, enum_class_NCI);
+ PMC *sub_obj = Parrot_pmc_new_constant(interp, enum_class_NCI);
PMC *multi_sig = mmd_build_type_tuple_from_long_sig(interp,
long_sig_str);
@@ -1219,7 +1219,7 @@
STRING *ns_name = mmd_info[i].ns_name;
/* Create an NCI sub for the C function */
- PMC *sub_obj = constant_pmc_new(interp, enum_class_NCI);
+ PMC *sub_obj = Parrot_pmc_new_constant(interp, enum_class_NCI);
VTABLE_set_pointer_keyed_str(interp, sub_obj, short_sig,
F2DPTR(func_ptr));
@@ -1278,14 +1278,14 @@
const INTVAL num_values = VTABLE_elements(interp, values);
const INTVAL name_len = name ? strlen(name) + 1: 0;
const size_t id_size = num_values * sizeof (INTVAL) + name_len;
- INTVAL *type_ids = (INTVAL *)mem_sys_allocate(id_size);
+ INTVAL *type_ids = mem_gc_allocate_n_typed(interp, num_values + name_len, INTVAL);
STRING *key;
INTVAL i;
for (i = 0; i < num_values; i++) {
const INTVAL id = VTABLE_type(interp, VTABLE_get_pmc_keyed_int(interp, values, i));
if (id == 0) {
- mem_sys_free(type_ids);
+ mem_gc_free(interp, type_ids);
return NULL;
}
@@ -1296,7 +1296,7 @@
strcpy((char *)(type_ids + num_values), name);
key = Parrot_str_new(interp, (char *)type_ids, id_size);
- mem_sys_free(type_ids);
+ mem_gc_free(interp, type_ids);
return key;
}
@@ -1378,7 +1378,7 @@
const INTVAL num_types = VTABLE_elements(interp, types);
const INTVAL name_len = name ? strlen(name) + 1: 0;
const size_t id_size = num_types * sizeof (INTVAL) + name_len;
- INTVAL * const type_ids = (INTVAL *)mem_sys_allocate(id_size);
+ INTVAL * const type_ids = mem_gc_allocate_n_typed(interp, num_types + name_len, INTVAL);
STRING *key;
INTVAL i;
@@ -1387,7 +1387,7 @@
const INTVAL id = VTABLE_get_integer_keyed_int(interp, types, i);
if (id == 0) {
- mem_sys_free(type_ids);
+ mem_gc_free(interp, type_ids);
return NULL;
}
@@ -1399,7 +1399,7 @@
key = Parrot_str_new(interp, (char *)type_ids, id_size);
- mem_sys_free(type_ids);
+ mem_gc_free(interp, type_ids);
return key;
}
Added: branches/boehm_gc_2/src/nci/api.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/boehm_gc_2/src/nci/api.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -0,0 +1,85 @@
+/* nci.c
+ * Copyright (C) 2001-2009, Parrot Foundation.
+ * SVN Info
+ * $Id$
+ * Overview:
+ * Native Call Interface routines. The code needed to build a
+ * parrot to C call frame is in here
+ * Data Structure and Algorithms:
+ * History:
+ * Notes:
+ * References:
+ */
+
+#include "parrot/parrot.h"
+#include "parrot/nci.h"
+#include "api.str"
+
+/* HEADERIZER HFILE: include/parrot/nci.h */
+/* HEADERIZER STOP */
+
+static void
+init_nci_funcs(PARROT_INTERP) {
+ VTABLE_set_pmc_keyed_int(interp, interp->iglobals, IGLOBALS_NCI_FUNCS,
+ Parrot_pmc_new(interp, enum_class_Hash));
+ Parrot_nci_load_core_thunks(interp);
+ Parrot_nci_load_extra_thunks(interp);
+}
+
+/* This function serves a single purpose. It takes the function
+ signature for a C function we want to call and returns a pointer
+ to a function that can call it. */
+
+void *
+build_call_func(PARROT_INTERP, SHIM(PMC *pmc_nci), NOTNULL(STRING *signature), SHIM(int *jitted)) {
+ PMC *iglobals;
+ PMC *nci_funcs;
+ PMC *thunk;
+
+ /* fixup empty signatures */
+ if (STRING_IS_EMPTY(signature))
+ signature = CONST_STRING(interp, "v");
+
+ iglobals = interp->iglobals;
+ if (PMC_IS_NULL(iglobals))
+ PANIC(interp, "iglobals isn't created yet");
+
+ nci_funcs = VTABLE_get_pmc_keyed_int(interp, iglobals, IGLOBALS_NCI_FUNCS);
+ if (PMC_IS_NULL(nci_funcs)) {
+ init_nci_funcs(interp);
+ nci_funcs = VTABLE_get_pmc_keyed_int(interp, iglobals, IGLOBALS_NCI_FUNCS);
+ }
+
+ thunk = VTABLE_get_pmc_keyed_str(interp, nci_funcs, signature);
+
+ PARROT_ASSERT(PMC_IS_NULL(thunk) || thunk->vtable);
+
+ if ((!PMC_IS_NULL(thunk)) && thunk->vtable->base_type == enum_class_UnManagedStruct)
+ return F2DPTR(VTABLE_get_pointer(interp, thunk));
+
+ /*
+ These lines have been added to aid debugging. I want to be able to
+ see which signature has an unknown type. I am sure someone can come up
+ with a neater way to do this.
+ */
+ {
+ STRING *ns = CONST_STRING(interp, " is an unknown signature type");
+ STRING *message = Parrot_str_concat(interp, signature, ns, 0);
+
+ ns = CONST_STRING(interp, ".\nCAN_BUILD_CALL_FRAMES is disabled, add the signature to src/nci/extra_thunks.nci");
+ message = Parrot_str_concat(interp, message, ns, 0);
+
+ /*
+ * I think there may be memory issues with this but if we get to here we are
+ * aborting.
+ */
+ PANIC(interp, Parrot_str_to_cstring(interp, message));
+ }
+}
+
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
Added: branches/boehm_gc_2/src/nci/core_thunks.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/boehm_gc_2/src/nci/core_thunks.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -0,0 +1,1243 @@
+/* ex: set ro ft=c:
+ * !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
+ *
+ * This file is generated automatically by tools/dev/nci_thunk_gen.pir
+ *
+ * Any changes made here will be lost!
+ *
+ */
+
+/* src/nci/core_thunks.c
+ * Copyright (C) 2010, Parrot Foundation.
+ * SVN Info
+ * $Id$
+ * Overview:
+ * Native Call Interface routines. The code needed to build a
+ * parrot to C call frame is in here
+ * Data Structure and Algorithms:
+ * History:
+ * Notes:
+ * References:
+ */
+
+
+#include "parrot/parrot.h"
+#include "pmc/pmc_nci.h"
+
+
+#ifdef PARROT_IN_EXTENSION
+/* external libraries can't have strings statically compiled into parrot */
+# define CONST_STRING(i, s) Parrot_str_new_constant((i), (s))
+#else
+# include "core_thunks.str"
+#endif
+
+/* HEADERIZER HFILE: none */
+/* HEADERIZER STOP */
+
+/* All our static functions that call in various ways. Yes, terribly
+ hackish, but that is just fine */
+
+
+static void
+pcf_d_JOd(PARROT_INTERP, PMC *self)
+{
+ typedef double(* func_t)(PARROT_INTERP, PMC *, double);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ FLOATVAL return_data;
+
+ PMC * t_1;
+ FLOATVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiN", &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (double)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "N", return_data);
+
+
+
+}
+static void
+pcf_I_JOS(PARROT_INTERP, PMC *self)
+{
+ typedef INTVAL(* func_t)(PARROT_INTERP, PMC *, STRING *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ STRING * t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiS", &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (INTVAL)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_P_JOl(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, PMC *, long);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ PMC * t_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiI", &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+
+
+}
+static void
+pcf_P_Jt(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, char *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ char *t_1; STRING *ts_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "S", &ts_1);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+if (t_1) Parrot_str_free_cstring(t_1);
+}
+static void
+pcf_S_JOS(PARROT_INTERP, PMC *self)
+{
+ typedef STRING *(* func_t)(PARROT_INTERP, PMC *, STRING *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ STRING * return_data;
+
+ PMC * t_1;
+ STRING * t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiS", &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (STRING *)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "S", return_data);
+
+
+
+}
+static void
+pcf_I_JI(PARROT_INTERP, PMC *self)
+{
+ typedef INTVAL(* func_t)(PARROT_INTERP, INTVAL);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "I", &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (INTVAL)(*fn_pointer)(interp, t_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+}
+static void
+pcf_v_JOSP(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, STRING *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ STRING * t_2;
+ PMC * t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiSP", &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2, t_3);
+
+
+
+
+
+}
+static void
+pcf_v_JOS(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, STRING *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ STRING * t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiS", &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2);
+
+
+
+
+}
+static void
+pcf_P_JOS(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, PMC *, STRING *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ PMC * t_1;
+ STRING * t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiS", &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+
+
+}
+static void
+pcf_I_JOI(PARROT_INTERP, PMC *self)
+{
+ typedef INTVAL(* func_t)(PARROT_INTERP, PMC *, INTVAL);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiI", &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (INTVAL)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_P_JOP(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, PMC *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ PMC * t_1;
+ PMC * t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiP", &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+
+
+}
+static void
+pcf_P_JOPS(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, PMC *, PMC *, STRING *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ PMC * t_1;
+ PMC * t_2;
+ STRING * t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiPS", &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1, t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+
+
+
+}
+static void
+pcf_v_JOPSP(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, PMC *, STRING *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ PMC * t_2;
+ STRING * t_3;
+ PMC * t_4;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiPSP", &t_1, &t_2, &t_3, &t_4);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2, t_3, t_4);
+
+
+
+
+
+
+}
+static void
+pcf_v_JPPP(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, PMC *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ PMC * t_2;
+ PMC * t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPP", &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2, t_3);
+
+
+
+
+
+}
+static void
+pcf_v_JPIP(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, INTVAL, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ INTVAL t_2;
+ PMC * t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PIP", &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2, t_3);
+
+
+
+
+
+}
+static void
+pcf_v_JPSP(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, STRING *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ STRING * t_2;
+ PMC * t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PSP", &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2, t_3);
+
+
+
+
+
+}
+static void
+pcf_v_JPNP(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, FLOATVAL, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ FLOATVAL t_2;
+ PMC * t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PNP", &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2, t_3);
+
+
+
+
+
+}
+static void
+pcf_v_JPP(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ PMC * t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PP", &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2);
+
+
+
+
+}
+static void
+pcf_v_JPI(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, INTVAL);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PI", &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2);
+
+
+
+
+}
+static void
+pcf_v_JPS(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, STRING *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ STRING * t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PS", &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2);
+
+
+
+
+}
+static void
+pcf_v_JPN(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, FLOATVAL);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ FLOATVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PN", &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2);
+
+
+
+
+}
+static void
+pcf_P_JPPP(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, PMC *, PMC *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ PMC * t_1;
+ PMC * t_2;
+ PMC * t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPP", &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1, t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+
+
+
+}
+static void
+pcf_P_JPIP(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, PMC *, INTVAL, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ PMC * t_1;
+ INTVAL t_2;
+ PMC * t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PIP", &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1, t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+
+
+
+}
+static void
+pcf_P_JPSP(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, PMC *, STRING *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ PMC * t_1;
+ STRING * t_2;
+ PMC * t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PSP", &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1, t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+
+
+
+}
+static void
+pcf_P_JPNP(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, PMC *, FLOATVAL, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ PMC * t_1;
+ FLOATVAL t_2;
+ PMC * t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PNP", &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1, t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+
+
+
+}
+static void
+pcf_I_JPP(PARROT_INTERP, PMC *self)
+{
+ typedef INTVAL(* func_t)(PARROT_INTERP, PMC *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ PMC * t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PP", &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (INTVAL)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_I_JPS(PARROT_INTERP, PMC *self)
+{
+ typedef INTVAL(* func_t)(PARROT_INTERP, PMC *, STRING *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ STRING * t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PS", &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (INTVAL)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_I_JPN(PARROT_INTERP, PMC *self)
+{
+ typedef INTVAL(* func_t)(PARROT_INTERP, PMC *, FLOATVAL);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ FLOATVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PN", &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (INTVAL)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_i_JP(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(PARROT_INTERP, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "P", &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(interp, t_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+}
+static void
+pcf_v_JP(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "P", &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1);
+
+
+
+}
+static void
+pcf_i_JPi(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(PARROT_INTERP, PMC *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PI", &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_i_JPii(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(PARROT_INTERP, PMC *, int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PII", &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(interp, t_1, t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+}
+static void
+pcf_i_JPiii(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(PARROT_INTERP, PMC *, int, int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ INTVAL t_4;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PIII", &t_1, &t_2, &t_3, &t_4);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(interp, t_1, t_2, t_3, t_4);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+
+}
+static void
+pcf_i_JPt(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(PARROT_INTERP, PMC *, char *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ char *t_2; STRING *ts_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PS", &t_1, &ts_2);
+ t_2 = ts_2 ? Parrot_str_to_cstring(interp, ts_2) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+if (t_2) Parrot_str_free_cstring(t_2);
+}
+static void
+pcf_P_JOSSS(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, PMC *, STRING *, STRING *, STRING *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ PMC * t_1;
+ STRING * t_2;
+ STRING * t_3;
+ STRING * t_4;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiSSS", &t_1, &t_2, &t_3, &t_4);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1, t_2, t_3, t_4);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+
+
+
+
+}
+static void
+pcf_v_JOSS(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, STRING *, STRING *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ STRING * t_2;
+ STRING * t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiSS", &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2, t_3);
+
+
+
+
+
+}
+static void
+pcf_S_JOI(PARROT_INTERP, PMC *self)
+{
+ typedef STRING *(* func_t)(PARROT_INTERP, PMC *, INTVAL);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ STRING * return_data;
+
+ PMC * t_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiI", &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (STRING *)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "S", return_data);
+
+
+
+}
+static void
+pcf_v_JOb(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ STRING *t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiS", &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, Buffer_bufstart(t_2));
+
+
+
+
+}
+static void
+pcf_i_JOPxAT_(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(PARROT_INTERP, PMC *, PMC *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ PMC * t_2;
+ PMC * t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiPPs", &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(interp, t_1, t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+}
+static void
+pcf_I_JOPxAT_(PARROT_INTERP, PMC *self)
+{
+ typedef INTVAL(* func_t)(PARROT_INTERP, PMC *, PMC *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ PMC * t_2;
+ PMC * t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiPPs", &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (INTVAL)(*fn_pointer)(interp, t_1, t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+}
+static void
+pcf_I_JOIPxAT_(PARROT_INTERP, PMC *self)
+{
+ typedef INTVAL(* func_t)(PARROT_INTERP, PMC *, INTVAL, PMC *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ INTVAL t_2;
+ PMC * t_3;
+ PMC * t_4;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiIPPs", &t_1, &t_2, &t_3, &t_4);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (INTVAL)(*fn_pointer)(interp, t_1, t_2, t_3, t_4);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+
+}
+static void
+pcf_P_JO(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ PMC * t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "Pi", &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+
+}
+static void
+pcf_v_JOP(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ PMC * t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiP", &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2);
+
+
+
+
+}
+static void
+pcf_P_Ji(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ INTVAL t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "I", &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+
+}
+
+
+ void
+Parrot_nci_load_core_thunks(PARROT_INTERP)
+{
+ PMC *iglobals;
+ PMC *nci_funcs;
+ PMC *temp_pmc;
+
+ iglobals = interp->iglobals;
+ PARROT_ASSERT(!(PMC_IS_NULL(iglobals)));
+
+ nci_funcs = VTABLE_get_pmc_keyed_int(interp, iglobals,
+ IGLOBALS_NCI_FUNCS);
+ PARROT_ASSERT(!(PMC_IS_NULL(nci_funcs)));
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_d_JOd);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "dJOd"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_I_JOS);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "IJOS"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JOl);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJOl"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_Jt);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJt"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_S_JOS);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "SJOS"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_I_JI);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "IJI"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JOSP);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJOSP"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JOS);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJOS"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JOS);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJOS"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_I_JOI);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "IJOI"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JOP);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJOP"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JOPS);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJOPS"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JOPSP);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJOPSP"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JPPP);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJPPP"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JPIP);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJPIP"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JPSP);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJPSP"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JPNP);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJPNP"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JPP);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJPP"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JPI);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJPI"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JPS);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJPS"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JPN);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJPN"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JPPP);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJPPP"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JPIP);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJPIP"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JPSP);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJPSP"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JPNP);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJPNP"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_I_JPP);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "IJPP"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_I_JPS);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "IJPS"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_I_JPN);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "IJPN"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_JP);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iJP"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JP);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJP"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_JPi);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iJPi"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_JPii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iJPii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_JPiii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iJPiii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_JPt);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iJPt"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JOSSS);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJOSSS"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JOSS);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJOSS"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_S_JOI);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "SJOI"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JOb);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJOb"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_JOPxAT_);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iJOP@"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_I_JOPxAT_);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "IJOP@"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_I_JOIPxAT_);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "IJOIP@"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JO);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJO"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JOP);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJOP"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_Ji);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJi"), temp_pmc);
+
+}
+
+
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
+
Added: branches/boehm_gc_2/src/nci/core_thunks.nci
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/boehm_gc_2/src/nci/core_thunks.nci Mon Feb 22 12:30:02 2010 (r44294)
@@ -0,0 +1,70 @@
+# Copyright (C) 2002-2010, Parrot Foundation.
+
+# This file contains the Parrot Native Call Interface signature
+# declarations required by Parrot's core. To add signatures for extensions,
+# add to F<src/nci/extra_thunks.nci>
+
+# The format of this file is explained in F<src/nci/extra_thunks.nci>
+
+d JOd # Parrot builtins
+I JOS
+P JOl
+P Jt
+S JOS # ParrotIO.readline
+I JI # Parrot_is_char_*
+v JOSP # String.trans
+v JOS # String.reverse
+P JOS # Added for os.stat
+I JOI # os.umask
+P JOP # atan2
+P JOPS # Namespace.get_global
+v JOPSP # Namespace.set_global
+
+v JPPP # infix MMD
+v JPIP
+v JPSP
+v JPNP
+
+v JPP # inplace infix MMD
+v JPI
+v JPS
+v JPN
+
+P JPPP # infix MMD new
+P JPIP
+P JPSP
+P JPNP
+
+I JPP # MMD compare
+
+# These are needed for packfileconstanttable.pmc
+I JPS
+I JPN
+
+# These are needed for parrotio.pmc
+i JP
+v JP
+i JPi
+i JPii
+i JPiii
+i JPt
+P JOSSS
+
+# Needed by string.pmc
+v JOSS
+
+# Needed by integer.pmc
+S JOI
+
+# src/pmc/nci.pmc
+v JOb
+
+# ParrotThread creation
+i JOP@
+I JOP@
+I JOIP@
+
+# other ParrotThread
+P JO
+v JOP
+P Ji
Added: branches/boehm_gc_2/src/nci/extra_thunks.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/boehm_gc_2/src/nci/extra_thunks.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -0,0 +1,7235 @@
+/* ex: set ro ft=c:
+ * !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
+ *
+ * This file is generated automatically by tools/dev/nci_thunk_gen.pir
+ *
+ * Any changes made here will be lost!
+ *
+ */
+
+/* src/nci/extra_thunks.c
+ * Copyright (C) 2010, Parrot Foundation.
+ * SVN Info
+ * $Id$
+ * Overview:
+ * Native Call Interface routines. The code needed to build a
+ * parrot to C call frame is in here
+ * Data Structure and Algorithms:
+ * History:
+ * Notes:
+ * References:
+ */
+
+
+#include "parrot/parrot.h"
+#include "pmc/pmc_nci.h"
+
+
+#ifdef PARROT_IN_EXTENSION
+/* external libraries can't have strings statically compiled into parrot */
+# define CONST_STRING(i, s) Parrot_str_new_constant((i), (s))
+#else
+# include "extra_thunks.str"
+#endif
+
+/* HEADERIZER HFILE: none */
+/* HEADERIZER STOP */
+
+/* All our static functions that call in various ways. Yes, terribly
+ hackish, but that is just fine */
+
+
+static void
+pcf_v_J(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ ;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "");
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp);
+
+
+}
+static void
+pcf_i_ip(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(int, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ PMC *t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "IP", &t_0, &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0, PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1));
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+}
+static void
+pcf_i_JPip(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(PARROT_INTERP, PMC *, int, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ INTVAL t_2;
+ PMC *t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PIP", &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(interp, t_1, t_2, PMC_IS_NULL((PMC*)t_3) ? (void *)NULL : VTABLE_get_pointer(interp, t_3));
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+}
+static void
+pcf_i_JpP(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(PARROT_INTERP, void *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_1;
+ PMC * t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PP", &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(interp, PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_i_Jpii(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(PARROT_INTERP, void *, int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PII", &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(interp, PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+}
+static void
+pcf_i_p(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "P", &t_0);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0));
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+}
+static void
+pcf_i_tp(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(char *, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ char *t_0; STRING *ts_0;
+ PMC *t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "SP", &ts_0, &t_1);
+ t_0 = ts_0 ? Parrot_str_to_cstring(interp, ts_0) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0, PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1));
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+ if (t_0) Parrot_str_free_cstring(t_0);
+
+}
+static void
+pcf_p_J(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(PARROT_INTERP);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ ;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "");
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(interp);
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+}
+static void
+pcf_p_Jp(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(PARROT_INTERP, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ PMC *t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "P", &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(interp, PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1));
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+
+}
+static void
+pcf_t_J(PARROT_INTERP, PMC *self)
+{
+ typedef char *(* func_t)(PARROT_INTERP);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ char * return_data;
+STRING *final_destination;
+
+ ;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "");
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (char *)(*fn_pointer)(interp);
+ final_destination = Parrot_str_new(interp, return_data, 0);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "S", final_destination);
+
+}
+static void
+pcf_t_Jpti(PARROT_INTERP, PMC *self)
+{
+ typedef char *(* func_t)(PARROT_INTERP, void *, char *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ char * return_data;
+STRING *final_destination;
+
+ PMC *t_1;
+ char *t_2; STRING *ts_2;
+ INTVAL t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PSI", &t_1, &ts_2, &t_3);
+ t_2 = ts_2 ? Parrot_str_to_cstring(interp, ts_2) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (char *)(*fn_pointer)(interp, PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), t_2, t_3);
+ final_destination = Parrot_str_new(interp, return_data, 0);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "S", final_destination);
+
+
+if (t_2) Parrot_str_free_cstring(t_2);
+
+}
+static void
+pcf_t_p(PARROT_INTERP, PMC *self)
+{
+ typedef char *(* func_t)(void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ char * return_data;
+STRING *final_destination;
+
+ PMC *t_0;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "P", &t_0);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (char *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0));
+ final_destination = Parrot_str_new(interp, return_data, 0);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "S", final_destination);
+
+}
+static void
+pcf_t_pt(PARROT_INTERP, PMC *self)
+{
+ typedef char *(* func_t)(void *, char *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ char * return_data;
+STRING *final_destination;
+
+ PMC *t_0;
+ char *t_1; STRING *ts_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PS", &t_0, &ts_1);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (char *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1);
+ final_destination = Parrot_str_new(interp, return_data, 0);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "S", final_destination);
+
+if (t_1) Parrot_str_free_cstring(t_1);
+}
+static void
+pcf_v_p(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC *t_0;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "P", &t_0);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0));
+
+
+}
+static void
+pcf_v_pit(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(void *, int, char *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ char *t_2; STRING *ts_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PIS", &t_0, &t_1, &ts_2);
+ t_2 = ts_2 ? Parrot_str_to_cstring(interp, ts_2) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2);
+
+
+
+if (t_2) Parrot_str_free_cstring(t_2);
+}
+static void
+pcf_v_ptt(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(void *, char *, char *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC *t_0;
+ char *t_1; STRING *ts_1;
+ char *t_2; STRING *ts_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PSS", &t_0, &ts_1, &ts_2);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;t_2 = ts_2 ? Parrot_str_to_cstring(interp, ts_2) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2);
+
+
+if (t_1) Parrot_str_free_cstring(t_1);
+if (t_2) Parrot_str_free_cstring(t_2);
+}
+static void
+pcf_v_Jtiiipt(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, char *, int, int, int, void *, char *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ char *t_1; STRING *ts_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ INTVAL t_4;
+ PMC *t_5;
+ char *t_6; STRING *ts_6;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "SIIIPS", &ts_1, &t_2, &t_3, &t_4, &t_5, &ts_6);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;t_6 = ts_6 ? Parrot_str_to_cstring(interp, ts_6) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2, t_3, t_4, PMC_IS_NULL((PMC*)t_5) ? (void *)NULL : VTABLE_get_pointer(interp, t_5), t_6);
+
+
+if (t_1) Parrot_str_free_cstring(t_1);
+
+
+
+
+if (t_6) Parrot_str_free_cstring(t_6);
+}
+static void
+pcf_p_JttPP(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(PARROT_INTERP, char *, char *, PMC *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ char *t_1; STRING *ts_1;
+ char *t_2; STRING *ts_2;
+ PMC * t_3;
+ PMC * t_4;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "SSPP", &ts_1, &ts_2, &t_3, &t_4);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;t_2 = ts_2 ? Parrot_str_to_cstring(interp, ts_2) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(interp, t_1, t_2, t_3, t_4);
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+if (t_1) Parrot_str_free_cstring(t_1);
+if (t_2) Parrot_str_free_cstring(t_2);
+
+
+}
+static void
+pcf_P_Jtpi(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, char *, void *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ char *t_1; STRING *ts_1;
+ PMC *t_2;
+ INTVAL t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "SPI", &ts_1, &t_2, &t_3);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1, PMC_IS_NULL((PMC*)t_2) ? (void *)NULL : VTABLE_get_pointer(interp, t_2), t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+if (t_1) Parrot_str_free_cstring(t_1);
+
+
+}
+static void
+pcf_i_Vppp(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void **, void *, void *, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0; void *v_0;
+ PMC *t_1;
+ PMC *t_2;
+ PMC *t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPPP", &t_0, &t_1, &t_2, &t_3);
+ v_0 = VTABLE_get_pointer(interp, t_0);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(&v_0, PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), PMC_IS_NULL((PMC*)t_2) ? (void *)NULL : VTABLE_get_pointer(interp, t_2), PMC_IS_NULL((PMC*)t_3) ? (void *)NULL : VTABLE_get_pointer(interp, t_3));
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+ VTABLE_set_pointer(interp, t_0, v_0);
+
+
+
+}
+static void
+pcf_v_JpPP(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, void *, PMC *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC *t_1;
+ PMC * t_2;
+ PMC * t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPP", &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), t_2, t_3);
+
+
+
+
+
+}
+static void
+pcf_v_pt(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(void *, char *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC *t_0;
+ char *t_1; STRING *ts_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PS", &t_0, &ts_1);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1);
+
+
+if (t_1) Parrot_str_free_cstring(t_1);
+}
+static void
+pcf_v_Jpt(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, void *, char *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC *t_1;
+ char *t_2; STRING *ts_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PS", &t_1, &ts_2);
+ t_2 = ts_2 ? Parrot_str_to_cstring(interp, ts_2) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), t_2);
+
+
+
+if (t_2) Parrot_str_free_cstring(t_2);
+}
+static void
+pcf_v_(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)();
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ ;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)();
+
+
+}
+static void
+pcf_v_Jiiip(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, int, int, int, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ INTVAL t_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ PMC *t_4;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "IIIP", &t_1, &t_2, &t_3, &t_4);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2, t_3, PMC_IS_NULL((PMC*)t_4) ? (void *)NULL : VTABLE_get_pointer(interp, t_4));
+
+
+
+
+
+
+}
+static void
+pcf_v_i(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ INTVAL t_0;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "I", &t_0);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(t_0);
+
+
+}
+static void
+pcf_v_ii(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ INTVAL t_0;
+ INTVAL t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "II", &t_0, &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(t_0, t_1);
+
+
+
+}
+static void
+pcf_v_illllllll(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(int, long, long, long, long, long, long, long, long);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ INTVAL t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ INTVAL t_4;
+ INTVAL t_5;
+ INTVAL t_6;
+ INTVAL t_7;
+ INTVAL t_8;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "IIIIIIIII", &t_0, &t_1, &t_2, &t_3, &t_4, &t_5, &t_6, &t_7, &t_8);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(t_0, t_1, t_2, t_3, t_4, t_5, t_6, t_7, t_8);
+
+
+
+
+
+
+
+
+
+
+}
+static void
+pcf_v_l(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(long);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ INTVAL t_0;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "I", &t_0);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(t_0);
+
+
+}
+static void
+pcf_v_pbip(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(void *, void *, int, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC *t_0;
+ STRING *t_1;
+ INTVAL t_2;
+ PMC *t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PSIP", &t_0, &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), Buffer_bufstart(t_1), t_2, PMC_IS_NULL((PMC*)t_3) ? (void *)NULL : VTABLE_get_pointer(interp, t_3));
+
+
+
+
+
+}
+static void
+pcf_v_pi(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(void *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PI", &t_0, &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1);
+
+
+
+}
+static void
+pcf_v_piiii(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(void *, int, int, int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ INTVAL t_4;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PIIII", &t_0, &t_1, &t_2, &t_3, &t_4);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, t_3, t_4);
+
+
+
+
+
+
+}
+static void
+pcf_v_pl(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(void *, long);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PI", &t_0, &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1);
+
+
+
+}
+static void
+pcf_v_pp(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(void *, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC *t_0;
+ PMC *t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PP", &t_0, &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1));
+
+
+
+}
+static void
+pcf_i_JPP(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(PARROT_INTERP, PMC *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ PMC * t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PP", &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_P_JP(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ PMC * t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "P", &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+
+}
+static void
+pcf_P_JPP(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, PMC *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ PMC * t_1;
+ PMC * t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PP", &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+
+
+}
+static void
+pcf_P_JO(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ PMC * t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "Pi", &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+
+}
+static void
+pcf_S_JO(PARROT_INTERP, PMC *self)
+{
+ typedef STRING *(* func_t)(PARROT_INTERP, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ STRING * return_data;
+
+ PMC * t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "Pi", &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (STRING *)(*fn_pointer)(interp, t_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "S", return_data);
+
+
+}
+static void
+pcf_i_P(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_0;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "P", &t_0);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+}
+static void
+pcf_P_JOPP(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, PMC *, PMC *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ PMC * t_1;
+ PMC * t_2;
+ PMC * t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiPP", &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1, t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+
+
+
+}
+static void
+pcf_P_JOPPP(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, PMC *, PMC *, PMC *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ PMC * t_1;
+ PMC * t_2;
+ PMC * t_3;
+ PMC * t_4;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiPPP", &t_1, &t_2, &t_3, &t_4);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1, t_2, t_3, t_4);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+
+
+
+
+}
+static void
+pcf_v_JOPP(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, PMC *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ PMC * t_2;
+ PMC * t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiPP", &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2, t_3);
+
+
+
+
+
+}
+static void
+pcf_v_JOPPP(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, PMC *, PMC *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ PMC * t_2;
+ PMC * t_3;
+ PMC * t_4;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiPPP", &t_1, &t_2, &t_3, &t_4);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2, t_3, t_4);
+
+
+
+
+
+
+}
+static void
+pcf_P_JOPPPP(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, PMC *, PMC *, PMC *, PMC *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ PMC * t_1;
+ PMC * t_2;
+ PMC * t_3;
+ PMC * t_4;
+ PMC * t_5;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiPPPP", &t_1, &t_2, &t_3, &t_4, &t_5);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1, t_2, t_3, t_4, t_5);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+
+
+
+
+
+}
+static void
+pcf_P_JOPPPPP(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, PMC *, PMC *, PMC *, PMC *, PMC *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ PMC * t_1;
+ PMC * t_2;
+ PMC * t_3;
+ PMC * t_4;
+ PMC * t_5;
+ PMC * t_6;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiPPPPP", &t_1, &t_2, &t_3, &t_4, &t_5, &t_6);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1, t_2, t_3, t_4, t_5, t_6);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+
+
+
+
+
+
+}
+static void
+pcf_I_JOSI(PARROT_INTERP, PMC *self)
+{
+ typedef INTVAL(* func_t)(PARROT_INTERP, PMC *, STRING *, INTVAL);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ STRING * t_2;
+ INTVAL t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiSI", &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (INTVAL)(*fn_pointer)(interp, t_1, t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+}
+static void
+pcf_P_JOSII(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, PMC *, STRING *, INTVAL, INTVAL);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ PMC * t_1;
+ STRING * t_2;
+ INTVAL t_3;
+ INTVAL t_4;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiSII", &t_1, &t_2, &t_3, &t_4);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1, t_2, t_3, t_4);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+
+
+
+
+}
+static void
+pcf_t_p3(PARROT_INTERP, PMC *self)
+{
+ typedef char *(* func_t)(void *, int *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ char * return_data;
+STRING *final_destination;
+
+ PMC *t_0;
+ PMC *t_1; int i_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PP", &t_0, &t_1);
+ i_1 = VTABLE_get_integer(interp, t_1);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (char *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), &i_1);
+ final_destination = Parrot_str_new(interp, return_data, 0);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "S", final_destination);
+
+VTABLE_set_integer_native(interp, t_1, i_1);
+}
+static void
+pcf_i_pp3p(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, void *, int *, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ PMC *t_1;
+ PMC *t_2; int i_2;
+ PMC *t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPPP", &t_0, &t_1, &t_2, &t_3);
+ i_2 = VTABLE_get_integer(interp, t_2);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), &i_2, PMC_IS_NULL((PMC*)t_3) ? (void *)NULL : VTABLE_get_pointer(interp, t_3));
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+VTABLE_set_integer_native(interp, t_2, i_2);
+
+}
+static void
+pcf_i_pp3(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, void *, int *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ PMC *t_1;
+ PMC *t_2; int i_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPP", &t_0, &t_1, &t_2);
+ i_2 = VTABLE_get_integer(interp, t_2);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), &i_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+VTABLE_set_integer_native(interp, t_2, i_2);
+}
+static void
+pcf_i_ppd(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, void *, double);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ PMC *t_1;
+ FLOATVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPN", &t_0, &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_i_ptii(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, char *, int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ char *t_1; STRING *ts_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PSII", &t_0, &ts_1, &t_2, &t_3);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+if (t_1) Parrot_str_free_cstring(t_1);
+
+
+}
+static void
+pcf_i_pipi(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, int, void *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ PMC *t_2;
+ INTVAL t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PIPI", &t_0, &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, PMC_IS_NULL((PMC*)t_2) ? (void *)NULL : VTABLE_get_pointer(interp, t_2), t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+}
+static void
+pcf_t_ptti(PARROT_INTERP, PMC *self)
+{
+ typedef char *(* func_t)(void *, char *, char *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ char * return_data;
+STRING *final_destination;
+
+ PMC *t_0;
+ char *t_1; STRING *ts_1;
+ char *t_2; STRING *ts_2;
+ INTVAL t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PSSI", &t_0, &ts_1, &ts_2, &t_3);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;t_2 = ts_2 ? Parrot_str_to_cstring(interp, ts_2) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (char *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, t_3);
+ final_destination = Parrot_str_new(interp, return_data, 0);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "S", final_destination);
+
+if (t_1) Parrot_str_free_cstring(t_1);
+if (t_2) Parrot_str_free_cstring(t_2);
+
+}
+static void
+pcf_t_pti(PARROT_INTERP, PMC *self)
+{
+ typedef char *(* func_t)(void *, char *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ char * return_data;
+STRING *final_destination;
+
+ PMC *t_0;
+ char *t_1; STRING *ts_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PSI", &t_0, &ts_1, &t_2);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (char *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2);
+ final_destination = Parrot_str_new(interp, return_data, 0);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "S", final_destination);
+
+if (t_1) Parrot_str_free_cstring(t_1);
+
+}
+static void
+pcf_t_pttti(PARROT_INTERP, PMC *self)
+{
+ typedef char *(* func_t)(void *, char *, char *, char *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ char * return_data;
+STRING *final_destination;
+
+ PMC *t_0;
+ char *t_1; STRING *ts_1;
+ char *t_2; STRING *ts_2;
+ char *t_3; STRING *ts_3;
+ INTVAL t_4;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PSSSI", &t_0, &ts_1, &ts_2, &ts_3, &t_4);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;t_2 = ts_2 ? Parrot_str_to_cstring(interp, ts_2) : (char *)NULL;t_3 = ts_3 ? Parrot_str_to_cstring(interp, ts_3) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (char *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, t_3, t_4);
+ final_destination = Parrot_str_new(interp, return_data, 0);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "S", final_destination);
+
+if (t_1) Parrot_str_free_cstring(t_1);
+if (t_2) Parrot_str_free_cstring(t_2);
+if (t_3) Parrot_str_free_cstring(t_3);
+
+}
+static void
+pcf_p_Ji(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(PARROT_INTERP, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ INTVAL t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "I", &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(interp, t_1);
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+
+}
+static void
+pcf_p_Jipp(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(PARROT_INTERP, int, void *, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ INTVAL t_1;
+ PMC *t_2;
+ PMC *t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "IPP", &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(interp, t_1, PMC_IS_NULL((PMC*)t_2) ? (void *)NULL : VTABLE_get_pointer(interp, t_2), PMC_IS_NULL((PMC*)t_3) ? (void *)NULL : VTABLE_get_pointer(interp, t_3));
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+
+
+
+}
+static void
+pcf_p_Jbip(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(PARROT_INTERP, void *, int, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ STRING *t_1;
+ INTVAL t_2;
+ PMC *t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "SIP", &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(interp, Buffer_bufstart(t_1), t_2, PMC_IS_NULL((PMC*)t_3) ? (void *)NULL : VTABLE_get_pointer(interp, t_3));
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+
+
+
+}
+static void
+pcf_v_Jp(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC *t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "P", &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1));
+
+
+
+}
+static void
+pcf_v_JS(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, STRING *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ STRING * t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "S", &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1);
+
+
+
+}
+static void
+pcf_t_tt(PARROT_INTERP, PMC *self)
+{
+ typedef char *(* func_t)(char *, char *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ char * return_data;
+STRING *final_destination;
+
+ char *t_0; STRING *ts_0;
+ char *t_1; STRING *ts_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "SS", &ts_0, &ts_1);
+ t_0 = ts_0 ? Parrot_str_to_cstring(interp, ts_0) : (char *)NULL;t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (char *)(*fn_pointer)(t_0, t_1);
+ final_destination = Parrot_str_new(interp, return_data, 0);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "S", final_destination);
+ if (t_0) Parrot_str_free_cstring(t_0);
+if (t_1) Parrot_str_free_cstring(t_1);
+}
+static void
+pcf_I_JOt(PARROT_INTERP, PMC *self)
+{
+ typedef INTVAL(* func_t)(PARROT_INTERP, PMC *, char *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ char *t_2; STRING *ts_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiS", &t_1, &ts_2);
+ t_2 = ts_2 ? Parrot_str_to_cstring(interp, ts_2) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (INTVAL)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+if (t_2) Parrot_str_free_cstring(t_2);
+}
+static void
+pcf_v_JOSI(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, STRING *, INTVAL);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ STRING * t_2;
+ INTVAL t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiSI", &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2, t_3);
+
+
+
+
+
+}
+static void
+pcf_S_JOi(PARROT_INTERP, PMC *self)
+{
+ typedef STRING *(* func_t)(PARROT_INTERP, PMC *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ STRING * return_data;
+
+ PMC * t_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiI", &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (STRING *)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "S", return_data);
+
+
+
+}
+static void
+pcf_v_JOi(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiI", &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2);
+
+
+
+
+}
+static void
+pcf_I_JO(PARROT_INTERP, PMC *self)
+{
+ typedef INTVAL(* func_t)(PARROT_INTERP, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "Pi", &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (INTVAL)(*fn_pointer)(interp, t_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+}
+static void
+pcf_N_JO(PARROT_INTERP, PMC *self)
+{
+ typedef FLOATVAL(* func_t)(PARROT_INTERP, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ FLOATVAL return_data;
+
+ PMC * t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "Pi", &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (FLOATVAL)(*fn_pointer)(interp, t_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "N", return_data);
+
+
+}
+static void
+pcf_v_JON(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, FLOATVAL);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ FLOATVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiN", &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2);
+
+
+
+
+}
+static void
+pcf_P_JOi(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, PMC *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ PMC * t_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiI", &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+
+
+}
+static void
+pcf_v_JOI(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, INTVAL);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiI", &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2);
+
+
+
+
+}
+static void
+pcf_P_JOI(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, PMC *, INTVAL);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ PMC * t_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiI", &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+
+
+}
+static void
+pcf_P_JOIS(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, PMC *, INTVAL, STRING *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ PMC * t_1;
+ INTVAL t_2;
+ STRING * t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiIS", &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1, t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+
+
+
+}
+static void
+pcf_S_JOSP(PARROT_INTERP, PMC *self)
+{
+ typedef STRING *(* func_t)(PARROT_INTERP, PMC *, STRING *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ STRING * return_data;
+
+ PMC * t_1;
+ STRING * t_2;
+ PMC * t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiSP", &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (STRING *)(*fn_pointer)(interp, t_1, t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "S", return_data);
+
+
+
+
+}
+static void
+pcf_i_(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)();
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ ;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)();
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+}
+static void
+pcf_i_i3i(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(int, int *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ PMC *t_1; int i_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "IPI", &t_0, &t_1, &t_2);
+ i_1 = VTABLE_get_integer(interp, t_1);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0, &i_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+VTABLE_set_integer_native(interp, t_1, i_1);
+
+}
+static void
+pcf_i_ibi(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(int, void *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ STRING *t_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "ISI", &t_0, &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0, Buffer_bufstart(t_1), t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_l_lttl(PARROT_INTERP, PMC *self)
+{
+ typedef long(* func_t)(long, char *, char *, long);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ char *t_1; STRING *ts_1;
+ char *t_2; STRING *ts_2;
+ INTVAL t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "ISSI", &t_0, &ts_1, &ts_2, &t_3);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;t_2 = ts_2 ? Parrot_str_to_cstring(interp, ts_2) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (long)(*fn_pointer)(t_0, t_1, t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+if (t_1) Parrot_str_free_cstring(t_1);
+if (t_2) Parrot_str_free_cstring(t_2);
+
+}
+static void
+pcf_i_pip(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, int, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ PMC *t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PIP", &t_0, &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, PMC_IS_NULL((PMC*)t_2) ? (void *)NULL : VTABLE_get_pointer(interp, t_2));
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_i_piS(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, int, STRING *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ STRING * t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PIS", &t_0, &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_S_i(PARROT_INTERP, PMC *self)
+{
+ typedef STRING *(* func_t)(int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ STRING * return_data;
+
+ INTVAL t_0;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "I", &t_0);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (STRING *)(*fn_pointer)(t_0);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "S", return_data);
+
+}
+static void
+pcf_l_p(PARROT_INTERP, PMC *self)
+{
+ typedef long(* func_t)(void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "P", &t_0);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (long)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0));
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+}
+static void
+pcf_c_p(PARROT_INTERP, PMC *self)
+{
+ typedef char(* func_t)(void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "P", &t_0);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (char)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0));
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+}
+static void
+pcf_p_pi(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(void *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ PMC *t_0;
+ INTVAL t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PI", &t_0, &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1);
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+
+}
+static void
+pcf_p_p(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ PMC *t_0;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "P", &t_0);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0));
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+}
+static void
+pcf_i_pttttt(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, char *, char *, char *, char *, char *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ char *t_1; STRING *ts_1;
+ char *t_2; STRING *ts_2;
+ char *t_3; STRING *ts_3;
+ char *t_4; STRING *ts_4;
+ char *t_5; STRING *ts_5;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PSSSSS", &t_0, &ts_1, &ts_2, &ts_3, &ts_4, &ts_5);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;t_2 = ts_2 ? Parrot_str_to_cstring(interp, ts_2) : (char *)NULL;t_3 = ts_3 ? Parrot_str_to_cstring(interp, ts_3) : (char *)NULL;t_4 = ts_4 ? Parrot_str_to_cstring(interp, ts_4) : (char *)NULL;t_5 = ts_5 ? Parrot_str_to_cstring(interp, ts_5) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, t_3, t_4, t_5);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+if (t_1) Parrot_str_free_cstring(t_1);
+if (t_2) Parrot_str_free_cstring(t_2);
+if (t_3) Parrot_str_free_cstring(t_3);
+if (t_4) Parrot_str_free_cstring(t_4);
+if (t_5) Parrot_str_free_cstring(t_5);
+}
+static void
+pcf_c_pttt(PARROT_INTERP, PMC *self)
+{
+ typedef char(* func_t)(void *, char *, char *, char *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ char *t_1; STRING *ts_1;
+ char *t_2; STRING *ts_2;
+ char *t_3; STRING *ts_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PSSS", &t_0, &ts_1, &ts_2, &ts_3);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;t_2 = ts_2 ? Parrot_str_to_cstring(interp, ts_2) : (char *)NULL;t_3 = ts_3 ? Parrot_str_to_cstring(interp, ts_3) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (char)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+if (t_1) Parrot_str_free_cstring(t_1);
+if (t_2) Parrot_str_free_cstring(t_2);
+if (t_3) Parrot_str_free_cstring(t_3);
+}
+static void
+pcf_p_pttttiti(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(void *, char *, char *, char *, char *, int, char *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ PMC *t_0;
+ char *t_1; STRING *ts_1;
+ char *t_2; STRING *ts_2;
+ char *t_3; STRING *ts_3;
+ char *t_4; STRING *ts_4;
+ INTVAL t_5;
+ char *t_6; STRING *ts_6;
+ INTVAL t_7;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PSSSSISI", &t_0, &ts_1, &ts_2, &ts_3, &ts_4, &t_5, &ts_6, &t_7);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;t_2 = ts_2 ? Parrot_str_to_cstring(interp, ts_2) : (char *)NULL;t_3 = ts_3 ? Parrot_str_to_cstring(interp, ts_3) : (char *)NULL;t_4 = ts_4 ? Parrot_str_to_cstring(interp, ts_4) : (char *)NULL;t_6 = ts_6 ? Parrot_str_to_cstring(interp, ts_6) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, t_3, t_4, t_5, t_6, t_7);
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+if (t_1) Parrot_str_free_cstring(t_1);
+if (t_2) Parrot_str_free_cstring(t_2);
+if (t_3) Parrot_str_free_cstring(t_3);
+if (t_4) Parrot_str_free_cstring(t_4);
+
+if (t_6) Parrot_str_free_cstring(t_6);
+
+}
+static void
+pcf_i_pt(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, char *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ char *t_1; STRING *ts_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PS", &t_0, &ts_1);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+if (t_1) Parrot_str_free_cstring(t_1);
+}
+static void
+pcf_i_ptl(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, char *, long);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ char *t_1; STRING *ts_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PSI", &t_0, &ts_1, &t_2);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+if (t_1) Parrot_str_free_cstring(t_1);
+
+}
+static void
+pcf_i_pi(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PI", &t_0, &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+}
+static void
+pcf_i_pl(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, long);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PI", &t_0, &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+}
+static void
+pcf_l_(PARROT_INTERP, PMC *self)
+{
+ typedef long(* func_t)();
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ ;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (long)(*fn_pointer)();
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+}
+static void
+pcf_p_pt(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(void *, char *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ PMC *t_0;
+ char *t_1; STRING *ts_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PS", &t_0, &ts_1);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1);
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+if (t_1) Parrot_str_free_cstring(t_1);
+}
+static void
+pcf_p_ptt(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(void *, char *, char *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ PMC *t_0;
+ char *t_1; STRING *ts_1;
+ char *t_2; STRING *ts_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PSS", &t_0, &ts_1, &ts_2);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;t_2 = ts_2 ? Parrot_str_to_cstring(interp, ts_2) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2);
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+if (t_1) Parrot_str_free_cstring(t_1);
+if (t_2) Parrot_str_free_cstring(t_2);
+}
+static void
+pcf_i_pit(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, int, char *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ char *t_2; STRING *ts_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PIS", &t_0, &t_1, &ts_2);
+ t_2 = ts_2 ? Parrot_str_to_cstring(interp, ts_2) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+if (t_2) Parrot_str_free_cstring(t_2);
+}
+static void
+pcf_p_pp(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(void *, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ PMC *t_0;
+ PMC *t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PP", &t_0, &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1));
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+
+}
+static void
+pcf_l_ttl(PARROT_INTERP, PMC *self)
+{
+ typedef long(* func_t)(char *, char *, long);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ char *t_0; STRING *ts_0;
+ char *t_1; STRING *ts_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "SSI", &ts_0, &ts_1, &t_2);
+ t_0 = ts_0 ? Parrot_str_to_cstring(interp, ts_0) : (char *)NULL;t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (long)(*fn_pointer)(t_0, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+ if (t_0) Parrot_str_free_cstring(t_0);
+if (t_1) Parrot_str_free_cstring(t_1);
+
+}
+static void
+pcf_l_pttl(PARROT_INTERP, PMC *self)
+{
+ typedef long(* func_t)(void *, char *, char *, long);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ char *t_1; STRING *ts_1;
+ char *t_2; STRING *ts_2;
+ INTVAL t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PSSI", &t_0, &ts_1, &ts_2, &t_3);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;t_2 = ts_2 ? Parrot_str_to_cstring(interp, ts_2) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (long)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+if (t_1) Parrot_str_free_cstring(t_1);
+if (t_2) Parrot_str_free_cstring(t_2);
+
+}
+static void
+pcf_v_t(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(char *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ char *t_0; STRING *ts_0;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "S", &ts_0);
+ t_0 = ts_0 ? Parrot_str_to_cstring(interp, ts_0) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(t_0);
+
+ if (t_0) Parrot_str_free_cstring(t_0);
+}
+static void
+pcf_p_pttttitl(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(void *, char *, char *, char *, char *, int, char *, long);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ PMC *t_0;
+ char *t_1; STRING *ts_1;
+ char *t_2; STRING *ts_2;
+ char *t_3; STRING *ts_3;
+ char *t_4; STRING *ts_4;
+ INTVAL t_5;
+ char *t_6; STRING *ts_6;
+ INTVAL t_7;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PSSSSISI", &t_0, &ts_1, &ts_2, &ts_3, &ts_4, &t_5, &ts_6, &t_7);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;t_2 = ts_2 ? Parrot_str_to_cstring(interp, ts_2) : (char *)NULL;t_3 = ts_3 ? Parrot_str_to_cstring(interp, ts_3) : (char *)NULL;t_4 = ts_4 ? Parrot_str_to_cstring(interp, ts_4) : (char *)NULL;t_6 = ts_6 ? Parrot_str_to_cstring(interp, ts_6) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, t_3, t_4, t_5, t_6, t_7);
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+if (t_1) Parrot_str_free_cstring(t_1);
+if (t_2) Parrot_str_free_cstring(t_2);
+if (t_3) Parrot_str_free_cstring(t_3);
+if (t_4) Parrot_str_free_cstring(t_4);
+
+if (t_6) Parrot_str_free_cstring(t_6);
+
+}
+static void
+pcf_p_tiB3P(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(char *, int, char **, int *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ char *t_0; STRING *ts_0;
+ INTVAL t_1;
+ char *t_2; STRING *ts_2;
+ PMC *t_3; int i_3;
+ PMC * t_4;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "SISPP", &ts_0, &t_1, &ts_2, &t_3, &t_4);
+ t_0 = ts_0 ? Parrot_str_to_cstring(interp, ts_0) : (char *)NULL;t_2 = ts_2 ? Parrot_str_to_cstring(interp, ts_2) : (char *) NULL;i_3 = VTABLE_get_integer(interp, t_3);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(t_0, t_1, &t_2, &i_3, t_4);
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+ if (t_0) Parrot_str_free_cstring(t_0);
+
+if (t_2) Parrot_str_free_cstring(t_2);
+VTABLE_set_integer_native(interp, t_3, i_3);
+
+}
+static void
+pcf_p_tip3P(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(char *, int, void *, int *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ char *t_0; STRING *ts_0;
+ INTVAL t_1;
+ PMC *t_2;
+ PMC *t_3; int i_3;
+ PMC * t_4;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "SIPPP", &ts_0, &t_1, &t_2, &t_3, &t_4);
+ t_0 = ts_0 ? Parrot_str_to_cstring(interp, ts_0) : (char *)NULL;i_3 = VTABLE_get_integer(interp, t_3);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(t_0, t_1, PMC_IS_NULL((PMC*)t_2) ? (void *)NULL : VTABLE_get_pointer(interp, t_2), &i_3, t_4);
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+ if (t_0) Parrot_str_free_cstring(t_0);
+
+
+VTABLE_set_integer_native(interp, t_3, i_3);
+
+}
+static void
+pcf_i_pPtiiipi(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, PMC *, char *, int, int, int, void *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ PMC * t_1;
+ char *t_2; STRING *ts_2;
+ INTVAL t_3;
+ INTVAL t_4;
+ INTVAL t_5;
+ PMC *t_6;
+ INTVAL t_7;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPSIIIPI", &t_0, &t_1, &ts_2, &t_3, &t_4, &t_5, &t_6, &t_7);
+ t_2 = ts_2 ? Parrot_str_to_cstring(interp, ts_2) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, t_3, t_4, t_5, PMC_IS_NULL((PMC*)t_6) ? (void *)NULL : VTABLE_get_pointer(interp, t_6), t_7);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+if (t_2) Parrot_str_free_cstring(t_2);
+
+
+
+
+
+}
+static void
+pcf_i_tpiibi(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(char *, void *, int, int, void *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ char *t_0; STRING *ts_0;
+ PMC *t_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ STRING *t_4;
+ INTVAL t_5;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "SPIISI", &ts_0, &t_1, &t_2, &t_3, &t_4, &t_5);
+ t_0 = ts_0 ? Parrot_str_to_cstring(interp, ts_0) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0, PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), t_2, t_3, Buffer_bufstart(t_4), t_5);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+ if (t_0) Parrot_str_free_cstring(t_0);
+
+
+
+
+
+}
+static void
+pcf_p_ptippppi(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(void *, char *, int, void *, void *, void *, void *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ PMC *t_0;
+ char *t_1; STRING *ts_1;
+ INTVAL t_2;
+ PMC *t_3;
+ PMC *t_4;
+ PMC *t_5;
+ PMC *t_6;
+ INTVAL t_7;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PSIPPPPI", &t_0, &ts_1, &t_2, &t_3, &t_4, &t_5, &t_6, &t_7);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, PMC_IS_NULL((PMC*)t_3) ? (void *)NULL : VTABLE_get_pointer(interp, t_3), PMC_IS_NULL((PMC*)t_4) ? (void *)NULL : VTABLE_get_pointer(interp, t_4), PMC_IS_NULL((PMC*)t_5) ? (void *)NULL : VTABLE_get_pointer(interp, t_5), PMC_IS_NULL((PMC*)t_6) ? (void *)NULL : VTABLE_get_pointer(interp, t_6), t_7);
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+if (t_1) Parrot_str_free_cstring(t_1);
+
+
+
+
+
+
+}
+static void
+pcf_p_pi33ipi(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(void *, int, int *, int *, int, void *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ PMC *t_0;
+ INTVAL t_1;
+ PMC *t_2; int i_2;
+ PMC *t_3; int i_3;
+ INTVAL t_4;
+ PMC *t_5;
+ INTVAL t_6;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PIPPIPI", &t_0, &t_1, &t_2, &t_3, &t_4, &t_5, &t_6);
+ i_2 = VTABLE_get_integer(interp, t_2);i_3 = VTABLE_get_integer(interp, t_3);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, &i_2, &i_3, t_4, PMC_IS_NULL((PMC*)t_5) ? (void *)NULL : VTABLE_get_pointer(interp, t_5), t_6);
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+
+VTABLE_set_integer_native(interp, t_2, i_2);
+VTABLE_set_integer_native(interp, t_3, i_3);
+
+
+
+}
+static void
+pcf_p_pttip(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(void *, char *, char *, int, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ PMC *t_0;
+ char *t_1; STRING *ts_1;
+ char *t_2; STRING *ts_2;
+ INTVAL t_3;
+ PMC *t_4;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PSSIP", &t_0, &ts_1, &ts_2, &t_3, &t_4);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;t_2 = ts_2 ? Parrot_str_to_cstring(interp, ts_2) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, t_3, PMC_IS_NULL((PMC*)t_4) ? (void *)NULL : VTABLE_get_pointer(interp, t_4));
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+if (t_1) Parrot_str_free_cstring(t_1);
+if (t_2) Parrot_str_free_cstring(t_2);
+
+
+}
+static void
+pcf_p_ptipppi(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(void *, char *, int, void *, void *, void *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ PMC *t_0;
+ char *t_1; STRING *ts_1;
+ INTVAL t_2;
+ PMC *t_3;
+ PMC *t_4;
+ PMC *t_5;
+ INTVAL t_6;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PSIPPPI", &t_0, &ts_1, &t_2, &t_3, &t_4, &t_5, &t_6);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, PMC_IS_NULL((PMC*)t_3) ? (void *)NULL : VTABLE_get_pointer(interp, t_3), PMC_IS_NULL((PMC*)t_4) ? (void *)NULL : VTABLE_get_pointer(interp, t_4), PMC_IS_NULL((PMC*)t_5) ? (void *)NULL : VTABLE_get_pointer(interp, t_5), t_6);
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+if (t_1) Parrot_str_free_cstring(t_1);
+
+
+
+
+
+}
+static void
+pcf_p_ppP(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(void *, void *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ PMC *t_0;
+ PMC *t_1;
+ PMC * t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPP", &t_0, &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), t_2);
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+
+
+}
+static void
+pcf_p_iiil(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(int, int, int, long);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ INTVAL t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "IIII", &t_0, &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(t_0, t_1, t_2, t_3);
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+
+
+
+}
+static void
+pcf_i_ppl(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, void *, long);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ PMC *t_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPI", &t_0, &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_v_pip(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(void *, int, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ PMC *t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PIP", &t_0, &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, PMC_IS_NULL((PMC*)t_2) ? (void *)NULL : VTABLE_get_pointer(interp, t_2));
+
+
+
+
+}
+static void
+pcf_p_pti(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(void *, char *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ PMC *t_0;
+ char *t_1; STRING *ts_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PSI", &t_0, &ts_1, &t_2);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2);
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+if (t_1) Parrot_str_free_cstring(t_1);
+
+}
+static void
+pcf_i_ppp(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, void *, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ PMC *t_1;
+ PMC *t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPP", &t_0, &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), PMC_IS_NULL((PMC*)t_2) ? (void *)NULL : VTABLE_get_pointer(interp, t_2));
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_p_ptii(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(void *, char *, int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ PMC *t_0;
+ char *t_1; STRING *ts_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PSII", &t_0, &ts_1, &t_2, &t_3);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, t_3);
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+if (t_1) Parrot_str_free_cstring(t_1);
+
+
+}
+static void
+pcf_p_ti(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(char *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ char *t_0; STRING *ts_0;
+ INTVAL t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "SI", &ts_0, &t_1);
+ t_0 = ts_0 ? Parrot_str_to_cstring(interp, ts_0) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(t_0, t_1);
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+ if (t_0) Parrot_str_free_cstring(t_0);
+
+}
+static void
+pcf_p_ptp(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(void *, char *, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ PMC *t_0;
+ char *t_1; STRING *ts_1;
+ PMC *t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PSP", &t_0, &ts_1, &t_2);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, PMC_IS_NULL((PMC*)t_2) ? (void *)NULL : VTABLE_get_pointer(interp, t_2));
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+if (t_1) Parrot_str_free_cstring(t_1);
+
+}
+static void
+pcf_i_pt33(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, char *, int *, int *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ char *t_1; STRING *ts_1;
+ PMC *t_2; int i_2;
+ PMC *t_3; int i_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PSPP", &t_0, &ts_1, &t_2, &t_3);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;i_2 = VTABLE_get_integer(interp, t_2);i_3 = VTABLE_get_integer(interp, t_3);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, &i_2, &i_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+if (t_1) Parrot_str_free_cstring(t_1);
+VTABLE_set_integer_native(interp, t_2, i_2);
+VTABLE_set_integer_native(interp, t_3, i_3);
+}
+static void
+pcf_c_(PARROT_INTERP, PMC *self)
+{
+ typedef char(* func_t)();
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ ;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (char)(*fn_pointer)();
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+}
+static void
+pcf_c_pi(PARROT_INTERP, PMC *self)
+{
+ typedef char(* func_t)(void *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PI", &t_0, &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (char)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+}
+static void
+pcf_d_(PARROT_INTERP, PMC *self)
+{
+ typedef double(* func_t)();
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ FLOATVAL return_data;
+
+ ;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (double)(*fn_pointer)();
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "N", return_data);
+
+}
+static void
+pcf_d_d(PARROT_INTERP, PMC *self)
+{
+ typedef double(* func_t)(double);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ FLOATVAL return_data;
+
+ FLOATVAL t_0;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "N", &t_0);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (double)(*fn_pointer)(t_0);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "N", return_data);
+
+}
+static void
+pcf_f_(PARROT_INTERP, PMC *self)
+{
+ typedef float(* func_t)();
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ FLOATVAL return_data;
+
+ ;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (float)(*fn_pointer)();
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "N", return_data);
+
+}
+static void
+pcf_f_ff(PARROT_INTERP, PMC *self)
+{
+ typedef float(* func_t)(float, float);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ FLOATVAL return_data;
+
+ FLOATVAL t_0;
+ FLOATVAL t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "NN", &t_0, &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (float)(*fn_pointer)(t_0, t_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "N", return_data);
+
+
+}
+static void
+pcf_f_is(PARROT_INTERP, PMC *self)
+{
+ typedef float(* func_t)(int, short);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ FLOATVAL return_data;
+
+ INTVAL t_0;
+ INTVAL t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "II", &t_0, &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (float)(*fn_pointer)(t_0, t_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "N", return_data);
+
+
+}
+static void
+pcf_i_b(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ STRING *t_0;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "S", &t_0);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(Buffer_bufstart(t_0));
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+}
+static void
+pcf_i_d(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(double);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ FLOATVAL t_0;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "N", &t_0);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+}
+static void
+pcf_i_i(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "I", &t_0);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+}
+static void
+pcf_i_ii(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ INTVAL t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "II", &t_0, &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0, t_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+}
+static void
+pcf_i_ii4(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(int, int, long *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ INTVAL t_1;
+ PMC *t_2; long i_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "IIP", &t_0, &t_1, &t_2);
+ i_2 = VTABLE_get_integer(interp, t_2);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0, t_1, &i_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+VTABLE_set_integer_native(interp, t_2, i_2);
+}
+static void
+pcf_i_ii4i(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(int, int, long *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ INTVAL t_1;
+ PMC *t_2; long i_2;
+ INTVAL t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "IIPI", &t_0, &t_1, &t_2, &t_3);
+ i_2 = VTABLE_get_integer(interp, t_2);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0, t_1, &i_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+VTABLE_set_integer_native(interp, t_2, i_2);
+
+}
+static void
+pcf_i_iiii(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(int, int, int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "IIII", &t_0, &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0, t_1, t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+}
+static void
+pcf_i_iiilsp(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(int, int, int, long, short, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ INTVAL t_4;
+ PMC *t_5;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "IIIIIP", &t_0, &t_1, &t_2, &t_3, &t_4, &t_5);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0, t_1, t_2, t_3, t_4, PMC_IS_NULL((PMC*)t_5) ? (void *)NULL : VTABLE_get_pointer(interp, t_5));
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+
+
+}
+static void
+pcf_i_iil(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(int, int, long);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "III", &t_0, &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_i_iili(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(int, int, long, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "IIII", &t_0, &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0, t_1, t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+}
+static void
+pcf_i_iip(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(int, int, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ INTVAL t_1;
+ PMC *t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "IIP", &t_0, &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0, t_1, PMC_IS_NULL((PMC*)t_2) ? (void *)NULL : VTABLE_get_pointer(interp, t_2));
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_i_iit(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(int, int, char *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ INTVAL t_1;
+ char *t_2; STRING *ts_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "IIS", &t_0, &t_1, &ts_2);
+ t_2 = ts_2 ? Parrot_str_to_cstring(interp, ts_2) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+if (t_2) Parrot_str_free_cstring(t_2);
+}
+static void
+pcf_i_iiti(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(int, int, char *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ INTVAL t_1;
+ char *t_2; STRING *ts_2;
+ INTVAL t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "IISI", &t_0, &t_1, &ts_2, &t_3);
+ t_2 = ts_2 ? Parrot_str_to_cstring(interp, ts_2) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0, t_1, t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+if (t_2) Parrot_str_free_cstring(t_2);
+
+}
+static void
+pcf_i_ilsp(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(int, long, short, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ PMC *t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "IIIP", &t_0, &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0, t_1, t_2, PMC_IS_NULL((PMC*)t_3) ? (void *)NULL : VTABLE_get_pointer(interp, t_3));
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+}
+static void
+pcf_i_iti(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(int, char *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ char *t_1; STRING *ts_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "ISI", &t_0, &ts_1, &t_2);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+if (t_1) Parrot_str_free_cstring(t_1);
+
+}
+static void
+pcf_i_l(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(long);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "I", &t_0);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+}
+static void
+pcf_i_li(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(long, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ INTVAL t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "II", &t_0, &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0, t_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+}
+static void
+pcf_i_lp(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(long, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ PMC *t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "IP", &t_0, &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0, PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1));
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+}
+static void
+pcf_i_lsp(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(long, short, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ INTVAL t_1;
+ PMC *t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "IIP", &t_0, &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0, t_1, PMC_IS_NULL((PMC*)t_2) ? (void *)NULL : VTABLE_get_pointer(interp, t_2));
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_i_p33(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, int *, int *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ PMC *t_1; int i_1;
+ PMC *t_2; int i_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPP", &t_0, &t_1, &t_2);
+ i_1 = VTABLE_get_integer(interp, t_1);i_2 = VTABLE_get_integer(interp, t_2);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), &i_1, &i_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+VTABLE_set_integer_native(interp, t_1, i_1);
+VTABLE_set_integer_native(interp, t_2, i_2);
+}
+static void
+pcf_i_p333(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, int *, int *, int *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ PMC *t_1; int i_1;
+ PMC *t_2; int i_2;
+ PMC *t_3; int i_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPPP", &t_0, &t_1, &t_2, &t_3);
+ i_1 = VTABLE_get_integer(interp, t_1);i_2 = VTABLE_get_integer(interp, t_2);i_3 = VTABLE_get_integer(interp, t_3);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), &i_1, &i_2, &i_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+VTABLE_set_integer_native(interp, t_1, i_1);
+VTABLE_set_integer_native(interp, t_2, i_2);
+VTABLE_set_integer_native(interp, t_3, i_3);
+}
+static void
+pcf_i_p333333(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, int *, int *, int *, int *, int *, int *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ PMC *t_1; int i_1;
+ PMC *t_2; int i_2;
+ PMC *t_3; int i_3;
+ PMC *t_4; int i_4;
+ PMC *t_5; int i_5;
+ PMC *t_6; int i_6;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPPPPPP", &t_0, &t_1, &t_2, &t_3, &t_4, &t_5, &t_6);
+ i_1 = VTABLE_get_integer(interp, t_1);i_2 = VTABLE_get_integer(interp, t_2);i_3 = VTABLE_get_integer(interp, t_3);i_4 = VTABLE_get_integer(interp, t_4);i_5 = VTABLE_get_integer(interp, t_5);i_6 = VTABLE_get_integer(interp, t_6);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), &i_1, &i_2, &i_3, &i_4, &i_5, &i_6);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+VTABLE_set_integer_native(interp, t_1, i_1);
+VTABLE_set_integer_native(interp, t_2, i_2);
+VTABLE_set_integer_native(interp, t_3, i_3);
+VTABLE_set_integer_native(interp, t_4, i_4);
+VTABLE_set_integer_native(interp, t_5, i_5);
+VTABLE_set_integer_native(interp, t_6, i_6);
+}
+static void
+pcf_i_p4(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, long *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ PMC *t_1; long i_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PP", &t_0, &t_1);
+ i_1 = VTABLE_get_integer(interp, t_1);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), &i_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+VTABLE_set_integer_native(interp, t_1, i_1);
+}
+static void
+pcf_i_p42p(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, long *, short *, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ PMC *t_1; long i_1;
+ PMC *t_2; short i_2;
+ PMC *t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPPP", &t_0, &t_1, &t_2, &t_3);
+ i_1 = VTABLE_get_integer(interp, t_1);i_2 = VTABLE_get_integer(interp, t_2);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), &i_1, &i_2, PMC_IS_NULL((PMC*)t_3) ? (void *)NULL : VTABLE_get_pointer(interp, t_3));
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+VTABLE_set_integer_native(interp, t_1, i_1);
+VTABLE_set_integer_native(interp, t_2, i_2);
+
+}
+static void
+pcf_i_p4i(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, long *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ PMC *t_1; long i_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPI", &t_0, &t_1, &t_2);
+ i_1 = VTABLE_get_integer(interp, t_1);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), &i_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+VTABLE_set_integer_native(interp, t_1, i_1);
+
+}
+static void
+pcf_i_pb(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ STRING *t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PS", &t_0, &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), Buffer_bufstart(t_1));
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+}
+static void
+pcf_i_pii(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PII", &t_0, &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_i_pii4(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, int, int, long *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ PMC *t_3; long i_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PIIP", &t_0, &t_1, &t_2, &t_3);
+ i_3 = VTABLE_get_integer(interp, t_3);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, &i_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+VTABLE_set_integer_native(interp, t_3, i_3);
+}
+static void
+pcf_i_pii4i(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, int, int, long *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ PMC *t_3; long i_3;
+ INTVAL t_4;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PIIPI", &t_0, &t_1, &t_2, &t_3, &t_4);
+ i_3 = VTABLE_get_integer(interp, t_3);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, &i_3, t_4);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+VTABLE_set_integer_native(interp, t_3, i_3);
+
+}
+static void
+pcf_i_piii(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, int, int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PIII", &t_0, &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+}
+static void
+pcf_i_piiiiii(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, int, int, int, int, int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ INTVAL t_4;
+ INTVAL t_5;
+ INTVAL t_6;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PIIIIII", &t_0, &t_1, &t_2, &t_3, &t_4, &t_5, &t_6);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, t_3, t_4, t_5, t_6);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+
+
+
+}
+static void
+pcf_i_piiilsp(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, int, int, int, long, short, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ INTVAL t_4;
+ INTVAL t_5;
+ PMC *t_6;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PIIIIIP", &t_0, &t_1, &t_2, &t_3, &t_4, &t_5, &t_6);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, t_3, t_4, t_5, PMC_IS_NULL((PMC*)t_6) ? (void *)NULL : VTABLE_get_pointer(interp, t_6));
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+
+
+
+}
+static void
+pcf_i_piil(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, int, int, long);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PIII", &t_0, &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+}
+static void
+pcf_i_piili(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, int, int, long, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ INTVAL t_4;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PIIII", &t_0, &t_1, &t_2, &t_3, &t_4);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, t_3, t_4);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+
+}
+static void
+pcf_i_piit(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, int, int, char *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ char *t_3; STRING *ts_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PIIS", &t_0, &t_1, &t_2, &ts_3);
+ t_3 = ts_3 ? Parrot_str_to_cstring(interp, ts_3) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+if (t_3) Parrot_str_free_cstring(t_3);
+}
+static void
+pcf_i_piiti(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, int, int, char *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ char *t_3; STRING *ts_3;
+ INTVAL t_4;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PIISI", &t_0, &t_1, &t_2, &ts_3, &t_4);
+ t_3 = ts_3 ? Parrot_str_to_cstring(interp, ts_3) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, t_3, t_4);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+if (t_3) Parrot_str_free_cstring(t_3);
+
+}
+static void
+pcf_i_pilsp(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, int, long, short, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ PMC *t_4;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PIIIP", &t_0, &t_1, &t_2, &t_3, &t_4);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, t_3, PMC_IS_NULL((PMC*)t_4) ? (void *)NULL : VTABLE_get_pointer(interp, t_4));
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+
+}
+static void
+pcf_i_pli(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, long, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PII", &t_0, &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_i_pll(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, long, long);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PII", &t_0, &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_i_pllllllll(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, long, long, long, long, long, long, long, long);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ INTVAL t_4;
+ INTVAL t_5;
+ INTVAL t_6;
+ INTVAL t_7;
+ INTVAL t_8;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PIIIIIIII", &t_0, &t_1, &t_2, &t_3, &t_4, &t_5, &t_6, &t_7, &t_8);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, t_3, t_4, t_5, t_6, t_7, t_8);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+
+
+
+
+
+}
+static void
+pcf_i_plp(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, long, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ PMC *t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PIP", &t_0, &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, PMC_IS_NULL((PMC*)t_2) ? (void *)NULL : VTABLE_get_pointer(interp, t_2));
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_i_plsp(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, long, short, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ PMC *t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PIIP", &t_0, &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, PMC_IS_NULL((PMC*)t_3) ? (void *)NULL : VTABLE_get_pointer(interp, t_3));
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+}
+static void
+pcf_i_pp(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ PMC *t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PP", &t_0, &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1));
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+}
+static void
+pcf_i_ppi(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, void *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ PMC *t_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPI", &t_0, &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_i_ppiiiiiiii(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, void *, int, int, int, int, int, int, int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ PMC *t_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ INTVAL t_4;
+ INTVAL t_5;
+ INTVAL t_6;
+ INTVAL t_7;
+ INTVAL t_8;
+ INTVAL t_9;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPIIIIIIII", &t_0, &t_1, &t_2, &t_3, &t_4, &t_5, &t_6, &t_7, &t_8, &t_9);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), t_2, t_3, t_4, t_5, t_6, t_7, t_8, t_9);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+
+
+
+
+
+
+}
+static void
+pcf_i_pppp(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, void *, void *, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ PMC *t_1;
+ PMC *t_2;
+ PMC *t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPPP", &t_0, &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), PMC_IS_NULL((PMC*)t_2) ? (void *)NULL : VTABLE_get_pointer(interp, t_2), PMC_IS_NULL((PMC*)t_3) ? (void *)NULL : VTABLE_get_pointer(interp, t_3));
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+}
+static void
+pcf_i_psp(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, short, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ PMC *t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PIP", &t_0, &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, PMC_IS_NULL((PMC*)t_2) ? (void *)NULL : VTABLE_get_pointer(interp, t_2));
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_i_pti(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, char *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ char *t_1; STRING *ts_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PSI", &t_0, &ts_1, &t_2);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+if (t_1) Parrot_str_free_cstring(t_1);
+
+}
+static void
+pcf_i_pitl(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, int, char *, long);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ char *t_2; STRING *ts_2;
+ INTVAL t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PISI", &t_0, &t_1, &ts_2, &t_3);
+ t_2 = ts_2 ? Parrot_str_to_cstring(interp, ts_2) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+if (t_2) Parrot_str_free_cstring(t_2);
+
+}
+static void
+pcf_i_s(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(short);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "I", &t_0);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+}
+static void
+pcf_i_s22(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(short, short *, short *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ PMC *t_1; short i_1;
+ PMC *t_2; short i_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "IPP", &t_0, &t_1, &t_2);
+ i_1 = VTABLE_get_integer(interp, t_1);i_2 = VTABLE_get_integer(interp, t_2);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0, &i_1, &i_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+VTABLE_set_integer_native(interp, t_1, i_1);
+VTABLE_set_integer_native(interp, t_2, i_2);
+}
+static void
+pcf_i_s222(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(short, short *, short *, short *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ PMC *t_1; short i_1;
+ PMC *t_2; short i_2;
+ PMC *t_3; short i_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "IPPP", &t_0, &t_1, &t_2, &t_3);
+ i_1 = VTABLE_get_integer(interp, t_1);i_2 = VTABLE_get_integer(interp, t_2);i_3 = VTABLE_get_integer(interp, t_3);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0, &i_1, &i_2, &i_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+VTABLE_set_integer_native(interp, t_1, i_1);
+VTABLE_set_integer_native(interp, t_2, i_2);
+VTABLE_set_integer_native(interp, t_3, i_3);
+}
+static void
+pcf_i_sp(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(short, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ PMC *t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "IP", &t_0, &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0, PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1));
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+}
+static void
+pcf_i_sss(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(short, short, short);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "III", &t_0, &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_i_ssss(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(short, short, short, short);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "IIII", &t_0, &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0, t_1, t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+}
+static void
+pcf_i_t(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(char *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ char *t_0; STRING *ts_0;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "S", &ts_0);
+ t_0 = ts_0 ? Parrot_str_to_cstring(interp, ts_0) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+ if (t_0) Parrot_str_free_cstring(t_0);
+}
+static void
+pcf_i_ti(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(char *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ char *t_0; STRING *ts_0;
+ INTVAL t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "SI", &ts_0, &t_1);
+ t_0 = ts_0 ? Parrot_str_to_cstring(interp, ts_0) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0, t_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+ if (t_0) Parrot_str_free_cstring(t_0);
+
+}
+static void
+pcf_i_4(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(long *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0; long i_0;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "P", &t_0);
+ i_0 = VTABLE_get_integer(interp, t_0);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(&i_0);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+ VTABLE_set_integer_native(interp, t_0, i_0);
+}
+static void
+pcf_i_4i(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(long *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0; long i_0;
+ INTVAL t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PI", &t_0, &t_1);
+ i_0 = VTABLE_get_integer(interp, t_0);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(&i_0, t_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+ VTABLE_set_integer_native(interp, t_0, i_0);
+
+}
+static void
+pcf_i_42p(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(long *, short *, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0; long i_0;
+ PMC *t_1; short i_1;
+ PMC *t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPP", &t_0, &t_1, &t_2);
+ i_0 = VTABLE_get_integer(interp, t_0);i_1 = VTABLE_get_integer(interp, t_1);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(&i_0, &i_1, PMC_IS_NULL((PMC*)t_2) ? (void *)NULL : VTABLE_get_pointer(interp, t_2));
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+ VTABLE_set_integer_native(interp, t_0, i_0);
+VTABLE_set_integer_native(interp, t_1, i_1);
+
+}
+static void
+pcf_l_ii(PARROT_INTERP, PMC *self)
+{
+ typedef long(* func_t)(int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ INTVAL t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "II", &t_0, &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (long)(*fn_pointer)(t_0, t_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+}
+static void
+pcf_l_l4(PARROT_INTERP, PMC *self)
+{
+ typedef long(* func_t)(long, long *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ PMC *t_1; long i_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "IP", &t_0, &t_1);
+ i_1 = VTABLE_get_integer(interp, t_1);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (long)(*fn_pointer)(t_0, &i_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+VTABLE_set_integer_native(interp, t_1, i_1);
+}
+static void
+pcf_l_pi(PARROT_INTERP, PMC *self)
+{
+ typedef long(* func_t)(void *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PI", &t_0, &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (long)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+}
+static void
+pcf_l_pii(PARROT_INTERP, PMC *self)
+{
+ typedef long(* func_t)(void *, int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PII", &t_0, &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (long)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_l_p33l(PARROT_INTERP, PMC *self)
+{
+ typedef long(* func_t)(void *, int *, int *, long);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ PMC *t_1; int i_1;
+ PMC *t_2; int i_2;
+ INTVAL t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPPI", &t_0, &t_1, &t_2, &t_3);
+ i_1 = VTABLE_get_integer(interp, t_1);i_2 = VTABLE_get_integer(interp, t_2);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (long)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), &i_1, &i_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+VTABLE_set_integer_native(interp, t_1, i_1);
+VTABLE_set_integer_native(interp, t_2, i_2);
+
+}
+static void
+pcf_l_33l(PARROT_INTERP, PMC *self)
+{
+ typedef long(* func_t)(int *, int *, long);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0; int i_0;
+ PMC *t_1; int i_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPI", &t_0, &t_1, &t_2);
+ i_0 = VTABLE_get_integer(interp, t_0);i_1 = VTABLE_get_integer(interp, t_1);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (long)(*fn_pointer)(&i_0, &i_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+ VTABLE_set_integer_native(interp, t_0, i_0);
+VTABLE_set_integer_native(interp, t_1, i_1);
+
+}
+static void
+pcf_p_(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)();
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ ;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)();
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+}
+static void
+pcf_p_B(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(char **);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ char *t_0; STRING *ts_0;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "S", &ts_0);
+ t_0 = ts_0 ? Parrot_str_to_cstring(interp, ts_0) : (char *) NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(&t_0);
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+ if (t_0) Parrot_str_free_cstring(t_0);
+}
+static void
+pcf_p_b(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ STRING *t_0;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "S", &t_0);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(Buffer_bufstart(t_0));
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+}
+static void
+pcf_p_Jt(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(PARROT_INTERP, char *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ char *t_1; STRING *ts_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "S", &ts_1);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(interp, t_1);
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+if (t_1) Parrot_str_free_cstring(t_1);
+}
+static void
+pcf_p_i(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ INTVAL t_0;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "I", &t_0);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(t_0);
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+}
+static void
+pcf_p_ii(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ INTVAL t_0;
+ INTVAL t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "II", &t_0, &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(t_0, t_1);
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+
+}
+static void
+pcf_p_iiii(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(int, int, int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ INTVAL t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "IIII", &t_0, &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(t_0, t_1, t_2, t_3);
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+
+
+
+}
+static void
+pcf_p_iiiiii(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(int, int, int, int, int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ INTVAL t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ INTVAL t_4;
+ INTVAL t_5;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "IIIIII", &t_0, &t_1, &t_2, &t_3, &t_4, &t_5);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(t_0, t_1, t_2, t_3, t_4, t_5);
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+
+
+
+
+
+}
+static void
+pcf_p_iiiiiiii(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(int, int, int, int, int, int, int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ INTVAL t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ INTVAL t_4;
+ INTVAL t_5;
+ INTVAL t_6;
+ INTVAL t_7;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "IIIIIIII", &t_0, &t_1, &t_2, &t_3, &t_4, &t_5, &t_6, &t_7);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(t_0, t_1, t_2, t_3, t_4, t_5, t_6, t_7);
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+
+
+
+
+
+
+
+}
+static void
+pcf_p_pii(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(void *, int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ PMC *t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PII", &t_0, &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2);
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+
+
+}
+static void
+pcf_p_piiii(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(void *, int, int, int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ PMC *t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ INTVAL t_4;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PIIII", &t_0, &t_1, &t_2, &t_3, &t_4);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, t_3, t_4);
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+
+
+
+
+}
+static void
+pcf_p_t(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(char *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ char *t_0; STRING *ts_0;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "S", &ts_0);
+ t_0 = ts_0 ? Parrot_str_to_cstring(interp, ts_0) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(t_0);
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+ if (t_0) Parrot_str_free_cstring(t_0);
+}
+static void
+pcf_p_tpp(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(char *, void *, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ char *t_0; STRING *ts_0;
+ PMC *t_1;
+ PMC *t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "SPP", &ts_0, &t_1, &t_2);
+ t_0 = ts_0 ? Parrot_str_to_cstring(interp, ts_0) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(t_0, PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), PMC_IS_NULL((PMC*)t_2) ? (void *)NULL : VTABLE_get_pointer(interp, t_2));
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+ if (t_0) Parrot_str_free_cstring(t_0);
+
+
+}
+static void
+pcf_p_ttttttt(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(char *, char *, char *, char *, char *, char *, char *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ char *t_0; STRING *ts_0;
+ char *t_1; STRING *ts_1;
+ char *t_2; STRING *ts_2;
+ char *t_3; STRING *ts_3;
+ char *t_4; STRING *ts_4;
+ char *t_5; STRING *ts_5;
+ char *t_6; STRING *ts_6;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "SSSSSSS", &ts_0, &ts_1, &ts_2, &ts_3, &ts_4, &ts_5, &ts_6);
+ t_0 = ts_0 ? Parrot_str_to_cstring(interp, ts_0) : (char *)NULL;t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;t_2 = ts_2 ? Parrot_str_to_cstring(interp, ts_2) : (char *)NULL;t_3 = ts_3 ? Parrot_str_to_cstring(interp, ts_3) : (char *)NULL;t_4 = ts_4 ? Parrot_str_to_cstring(interp, ts_4) : (char *)NULL;t_5 = ts_5 ? Parrot_str_to_cstring(interp, ts_5) : (char *)NULL;t_6 = ts_6 ? Parrot_str_to_cstring(interp, ts_6) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(t_0, t_1, t_2, t_3, t_4, t_5, t_6);
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+ if (t_0) Parrot_str_free_cstring(t_0);
+if (t_1) Parrot_str_free_cstring(t_1);
+if (t_2) Parrot_str_free_cstring(t_2);
+if (t_3) Parrot_str_free_cstring(t_3);
+if (t_4) Parrot_str_free_cstring(t_4);
+if (t_5) Parrot_str_free_cstring(t_5);
+if (t_6) Parrot_str_free_cstring(t_6);
+}
+static void
+pcf_s_(PARROT_INTERP, PMC *self)
+{
+ typedef short(* func_t)();
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ ;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (short)(*fn_pointer)();
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+}
+static void
+pcf_t_(PARROT_INTERP, PMC *self)
+{
+ typedef char *(* func_t)();
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ char * return_data;
+STRING *final_destination;
+
+ ;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (char *)(*fn_pointer)();
+ final_destination = Parrot_str_new(interp, return_data, 0);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "S", final_destination);
+
+}
+static void
+pcf_t_i(PARROT_INTERP, PMC *self)
+{
+ typedef char *(* func_t)(int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ char * return_data;
+STRING *final_destination;
+
+ INTVAL t_0;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "I", &t_0);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (char *)(*fn_pointer)(t_0);
+ final_destination = Parrot_str_new(interp, return_data, 0);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "S", final_destination);
+
+}
+static void
+pcf_t_ii(PARROT_INTERP, PMC *self)
+{
+ typedef char *(* func_t)(int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ char * return_data;
+STRING *final_destination;
+
+ INTVAL t_0;
+ INTVAL t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "II", &t_0, &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (char *)(*fn_pointer)(t_0, t_1);
+ final_destination = Parrot_str_new(interp, return_data, 0);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "S", final_destination);
+
+
+}
+static void
+pcf_t_pi(PARROT_INTERP, PMC *self)
+{
+ typedef char *(* func_t)(void *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ char * return_data;
+STRING *final_destination;
+
+ PMC *t_0;
+ INTVAL t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PI", &t_0, &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (char *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1);
+ final_destination = Parrot_str_new(interp, return_data, 0);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "S", final_destination);
+
+
+}
+static void
+pcf_t_pii(PARROT_INTERP, PMC *self)
+{
+ typedef char *(* func_t)(void *, int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ char * return_data;
+STRING *final_destination;
+
+ PMC *t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PII", &t_0, &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (char *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2);
+ final_destination = Parrot_str_new(interp, return_data, 0);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "S", final_destination);
+
+
+
+}
+static void
+pcf_t_t(PARROT_INTERP, PMC *self)
+{
+ typedef char *(* func_t)(char *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ char * return_data;
+STRING *final_destination;
+
+ char *t_0; STRING *ts_0;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "S", &ts_0);
+ t_0 = ts_0 ? Parrot_str_to_cstring(interp, ts_0) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (char *)(*fn_pointer)(t_0);
+ final_destination = Parrot_str_new(interp, return_data, 0);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "S", final_destination);
+ if (t_0) Parrot_str_free_cstring(t_0);
+}
+static void
+pcf_t_tl4(PARROT_INTERP, PMC *self)
+{
+ typedef char *(* func_t)(char *, long, long *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ char * return_data;
+STRING *final_destination;
+
+ char *t_0; STRING *ts_0;
+ INTVAL t_1;
+ PMC *t_2; long i_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "SIP", &ts_0, &t_1, &t_2);
+ t_0 = ts_0 ? Parrot_str_to_cstring(interp, ts_0) : (char *)NULL;i_2 = VTABLE_get_integer(interp, t_2);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (char *)(*fn_pointer)(t_0, t_1, &i_2);
+ final_destination = Parrot_str_new(interp, return_data, 0);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "S", final_destination);
+ if (t_0) Parrot_str_free_cstring(t_0);
+
+VTABLE_set_integer_native(interp, t_2, i_2);
+}
+static void
+pcf_t_t4(PARROT_INTERP, PMC *self)
+{
+ typedef char *(* func_t)(char *, long *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ char * return_data;
+STRING *final_destination;
+
+ char *t_0; STRING *ts_0;
+ PMC *t_1; long i_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "SP", &ts_0, &t_1);
+ t_0 = ts_0 ? Parrot_str_to_cstring(interp, ts_0) : (char *)NULL;i_1 = VTABLE_get_integer(interp, t_1);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (char *)(*fn_pointer)(t_0, &i_1);
+ final_destination = Parrot_str_new(interp, return_data, 0);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "S", final_destination);
+ if (t_0) Parrot_str_free_cstring(t_0);
+VTABLE_set_integer_native(interp, t_1, i_1);
+}
+static void
+pcf_i_sc(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(short, char);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ INTVAL t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "II", &t_0, &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0, t_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+}
+static void
+pcf_s_sc(PARROT_INTERP, PMC *self)
+{
+ typedef short(* func_t)(short, char);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ INTVAL t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "II", &t_0, &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (short)(*fn_pointer)(t_0, t_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+}
+static void
+pcf_c_sc(PARROT_INTERP, PMC *self)
+{
+ typedef char(* func_t)(short, char);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ INTVAL t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "II", &t_0, &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (char)(*fn_pointer)(t_0, t_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+}
+static void
+pcf_i_iii(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(int, int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "III", &t_0, &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_i_i3(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(int, int *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_0;
+ PMC *t_1; int i_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "IP", &t_0, &t_1);
+ i_1 = VTABLE_get_integer(interp, t_1);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0, &i_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+VTABLE_set_integer_native(interp, t_1, i_1);
+}
+static void
+pcf_t_b(PARROT_INTERP, PMC *self)
+{
+ typedef char *(* func_t)(void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ char * return_data;
+STRING *final_destination;
+
+ STRING *t_0;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "S", &t_0);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (char *)(*fn_pointer)(Buffer_bufstart(t_0));
+ final_destination = Parrot_str_new(interp, return_data, 0);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "S", final_destination);
+
+}
+static void
+pcf_t_B(PARROT_INTERP, PMC *self)
+{
+ typedef char *(* func_t)(char **);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ char * return_data;
+STRING *final_destination;
+
+ char *t_0; STRING *ts_0;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "S", &ts_0);
+ t_0 = ts_0 ? Parrot_str_to_cstring(interp, ts_0) : (char *) NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (char *)(*fn_pointer)(&t_0);
+ final_destination = Parrot_str_new(interp, return_data, 0);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "S", final_destination);
+ if (t_0) Parrot_str_free_cstring(t_0);
+}
+static void
+pcf_v_P(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_0;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "P", &t_0);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(t_0);
+
+
+}
+static void
+pcf_v_pP(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(void *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC *t_0;
+ PMC * t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PP", &t_0, &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1);
+
+
+
+}
+static void
+pcf_p_ip(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(int, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ INTVAL t_0;
+ PMC *t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "IP", &t_0, &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(t_0, PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1));
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+
+}
+static void
+pcf_i_33(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(int *, int *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0; int i_0;
+ PMC *t_1; int i_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PP", &t_0, &t_1);
+ i_0 = VTABLE_get_integer(interp, t_0);i_1 = VTABLE_get_integer(interp, t_1);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(&i_0, &i_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+ VTABLE_set_integer_native(interp, t_0, i_0);
+VTABLE_set_integer_native(interp, t_1, i_1);
+}
+static void
+pcf_v_pii(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(void *, int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PII", &t_0, &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2);
+
+
+
+
+}
+static void
+pcf_v_JO(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "Pi", &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1);
+
+
+
+}
+static void
+pcf_i_JO(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(PARROT_INTERP, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "Pi", &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(interp, t_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+}
+static void
+pcf_i_JOi(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(PARROT_INTERP, PMC *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiI", &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_i_JOt(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(PARROT_INTERP, PMC *, char *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ char *t_2; STRING *ts_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiS", &t_1, &ts_2);
+ t_2 = ts_2 ? Parrot_str_to_cstring(interp, ts_2) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+if (t_2) Parrot_str_free_cstring(t_2);
+}
+static void
+pcf_i_Jt(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(PARROT_INTERP, char *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ char *t_1; STRING *ts_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "S", &ts_1);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(interp, t_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+if (t_1) Parrot_str_free_cstring(t_1);
+}
+static void
+pcf_i_Ji(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(PARROT_INTERP, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "I", &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(interp, t_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+}
+static void
+pcf_v_Vi(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(void **, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC *t_0; void *v_0;
+ INTVAL t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PI", &t_0, &t_1);
+ v_0 = VTABLE_get_pointer(interp, t_0);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(&v_0, t_1);
+
+ VTABLE_set_pointer(interp, t_0, v_0);
+
+}
+static void
+pcf_p_ppiii(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(void *, void *, int, int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ PMC *t_0;
+ PMC *t_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ INTVAL t_4;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPIII", &t_0, &t_1, &t_2, &t_3, &t_4);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), t_2, t_3, t_4);
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+
+
+
+
+}
+static void
+pcf_p_ppiiiiiii(PARROT_INTERP, PMC *self)
+{
+ typedef void *(* func_t)(void *, void *, int, int, int, int, int, int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+PMC * final_destination = PMCNULL;
+
+ PMC *t_0;
+ PMC *t_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ INTVAL t_4;
+ INTVAL t_5;
+ INTVAL t_6;
+ INTVAL t_7;
+ INTVAL t_8;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPIIIIIII", &t_0, &t_1, &t_2, &t_3, &t_4, &t_5, &t_6, &t_7, &t_8);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (void *)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), t_2, t_3, t_4, t_5, t_6, t_7, t_8);
+ if (return_data != NULL) {
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, final_destination, return_data);
+ }
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", final_destination);
+
+
+
+
+
+
+
+
+
+}
+static void
+pcf_i_ppii(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, void *, int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ PMC *t_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPII", &t_0, &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+}
+static void
+pcf_i_ppiii(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, void *, int, int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ PMC *t_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ INTVAL t_4;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPIII", &t_0, &t_1, &t_2, &t_3, &t_4);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), t_2, t_3, t_4);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+
+}
+static void
+pcf_i_ppiiii(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, void *, int, int, int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ PMC *t_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ INTVAL t_4;
+ INTVAL t_5;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPIIII", &t_0, &t_1, &t_2, &t_3, &t_4, &t_5);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), t_2, t_3, t_4, t_5);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+
+
+}
+static void
+pcf_i_ppiiiii(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, void *, int, int, int, int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ PMC *t_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ INTVAL t_4;
+ INTVAL t_5;
+ INTVAL t_6;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPIIIII", &t_0, &t_1, &t_2, &t_3, &t_4, &t_5, &t_6);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), t_2, t_3, t_4, t_5, t_6);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+
+
+
+}
+static void
+pcf_i_ppiiiiii(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, void *, int, int, int, int, int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ PMC *t_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ INTVAL t_4;
+ INTVAL t_5;
+ INTVAL t_6;
+ INTVAL t_7;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPIIIIII", &t_0, &t_1, &t_2, &t_3, &t_4, &t_5, &t_6, &t_7);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), t_2, t_3, t_4, t_5, t_6, t_7);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+
+
+
+
+}
+static void
+pcf_i_ppt(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, void *, char *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ PMC *t_1;
+ char *t_2; STRING *ts_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPS", &t_0, &t_1, &ts_2);
+ t_2 = ts_2 ? Parrot_str_to_cstring(interp, ts_2) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+if (t_2) Parrot_str_free_cstring(t_2);
+}
+static void
+pcf_i_pppi(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, void *, void *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ PMC *t_1;
+ PMC *t_2;
+ INTVAL t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPPI", &t_0, &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), PMC_IS_NULL((PMC*)t_2) ? (void *)NULL : VTABLE_get_pointer(interp, t_2), t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+}
+static void
+pcf_i_pppii(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, void *, void *, int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ PMC *t_1;
+ PMC *t_2;
+ INTVAL t_3;
+ INTVAL t_4;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPPII", &t_0, &t_1, &t_2, &t_3, &t_4);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), PMC_IS_NULL((PMC*)t_2) ? (void *)NULL : VTABLE_get_pointer(interp, t_2), t_3, t_4);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+
+}
+static void
+pcf_i_pppiiii(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, void *, void *, int, int, int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ PMC *t_1;
+ PMC *t_2;
+ INTVAL t_3;
+ INTVAL t_4;
+ INTVAL t_5;
+ INTVAL t_6;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPPIIII", &t_0, &t_1, &t_2, &t_3, &t_4, &t_5, &t_6);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), PMC_IS_NULL((PMC*)t_2) ? (void *)NULL : VTABLE_get_pointer(interp, t_2), t_3, t_4, t_5, t_6);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+
+
+
+}
+static void
+pcf_i_ppppiiiiii(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, void *, void *, void *, int, int, int, int, int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ PMC *t_1;
+ PMC *t_2;
+ PMC *t_3;
+ INTVAL t_4;
+ INTVAL t_5;
+ INTVAL t_6;
+ INTVAL t_7;
+ INTVAL t_8;
+ INTVAL t_9;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPPPIIIIII", &t_0, &t_1, &t_2, &t_3, &t_4, &t_5, &t_6, &t_7, &t_8, &t_9);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), PMC_IS_NULL((PMC*)t_1) ? (void *)NULL : VTABLE_get_pointer(interp, t_1), PMC_IS_NULL((PMC*)t_2) ? (void *)NULL : VTABLE_get_pointer(interp, t_2), PMC_IS_NULL((PMC*)t_3) ? (void *)NULL : VTABLE_get_pointer(interp, t_3), t_4, t_5, t_6, t_7, t_8, t_9);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+
+
+
+
+
+
+}
+static void
+pcf_v_fff(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(float, float, float);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ FLOATVAL t_0;
+ FLOATVAL t_1;
+ FLOATVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "NNN", &t_0, &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(t_0, t_1, t_2);
+
+
+
+
+}
+static void
+pcf_v_V(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(void **);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC *t_0; void *v_0;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "P", &t_0);
+ v_0 = VTABLE_get_pointer(interp, t_0);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(&v_0);
+
+ VTABLE_set_pointer(interp, t_0, v_0);
+}
+static void
+pcf_v_VVV(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(void **, void **, void **);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC *t_0; void *v_0;
+ PMC *t_1; void *v_1;
+ PMC *t_2; void *v_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPP", &t_0, &t_1, &t_2);
+ v_0 = VTABLE_get_pointer(interp, t_0);v_1 = VTABLE_get_pointer(interp, t_1);v_2 = VTABLE_get_pointer(interp, t_2);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(&v_0, &v_1, &v_2);
+
+ VTABLE_set_pointer(interp, t_0, v_0);
+VTABLE_set_pointer(interp, t_1, v_1);
+VTABLE_set_pointer(interp, t_2, v_2);
+}
+static void
+pcf_i_tV(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(char *, void **);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ char *t_0; STRING *ts_0;
+ PMC *t_1; void *v_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "SP", &ts_0, &t_1);
+ t_0 = ts_0 ? Parrot_str_to_cstring(interp, ts_0) : (char *)NULL;v_1 = VTABLE_get_pointer(interp, t_1);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(t_0, &v_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+ if (t_0) Parrot_str_free_cstring(t_0);
+VTABLE_set_pointer(interp, t_1, v_1);
+}
+static void
+pcf_i_ptiVp(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, char *, int, void **, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ char *t_1; STRING *ts_1;
+ INTVAL t_2;
+ PMC *t_3; void *v_3;
+ PMC *t_4;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PSIPP", &t_0, &ts_1, &t_2, &t_3, &t_4);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;v_3 = VTABLE_get_pointer(interp, t_3);
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, &v_3, PMC_IS_NULL((PMC*)t_4) ? (void *)NULL : VTABLE_get_pointer(interp, t_4));
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+if (t_1) Parrot_str_free_cstring(t_1);
+
+VTABLE_set_pointer(interp, t_3, v_3);
+
+}
+static void
+pcf_i_pid(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, int, double);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ FLOATVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PIN", &t_0, &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_i_pitii(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(void *, int, char *, int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC *t_0;
+ INTVAL t_1;
+ char *t_2; STRING *ts_2;
+ INTVAL t_3;
+ INTVAL t_4;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PISII", &t_0, &t_1, &ts_2, &t_3, &t_4);
+ t_2 = ts_2 ? Parrot_str_to_cstring(interp, ts_2) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(PMC_IS_NULL((PMC*)t_0) ? (void *)NULL : VTABLE_get_pointer(interp, t_0), t_1, t_2, t_3, t_4);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+if (t_2) Parrot_str_free_cstring(t_2);
+
+
+}
+
+
+ void
+Parrot_nci_load_extra_thunks(PARROT_INTERP)
+{
+ PMC *iglobals;
+ PMC *nci_funcs;
+ PMC *temp_pmc;
+
+ iglobals = interp->iglobals;
+ PARROT_ASSERT(!(PMC_IS_NULL(iglobals)));
+
+ nci_funcs = VTABLE_get_pmc_keyed_int(interp, iglobals,
+ IGLOBALS_NCI_FUNCS);
+ PARROT_ASSERT(!(PMC_IS_NULL(nci_funcs)));
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_J);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJ"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ip);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iip"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_JPip);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iJPip"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_JpP);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iJpP"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_Jpii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iJpii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_p);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ip"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_tp);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "itp"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_J);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pJ"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_Jp);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pJp"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_J);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "tJ"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_Jpti);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "tJpti"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_p);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "tp"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_pt);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "tpt"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_p);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vp"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_pit);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vpit"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_ptt);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vptt"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_Jtiiipt);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJtiiipt"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_JttPP);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pJttPP"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_Jtpi);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJtpi"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_Vppp);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iVppp"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JpPP);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJpPP"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_pt);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vpt"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_Jpt);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJpt"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "v"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_Jiiip);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJiiip"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_i);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vi"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_ii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_illllllll);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "villllllll"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_l);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vl"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_pbip);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vpbip"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_pi);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vpi"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_piiii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vpiiii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_pl);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vpl"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_pp);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vpp"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_JPP);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iJPP"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JP);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJP"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JPP);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJPP"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JO);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJO"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_S_JO);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "SJO"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_P);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iP"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JOPP);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJOPP"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JOPPP);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJOPPP"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JOPP);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJOPP"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JOPPP);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJOPPP"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JOPPPP);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJOPPPP"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JOPPPPP);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJOPPPPP"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_I_JOSI);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "IJOSI"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JOSII);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJOSII"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_p3);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "tp3"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pp3p);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipp3p"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pp3);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipp3"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ppd);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ippd"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ptii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iptii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pipi);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipipi"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_ptti);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "tptti"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_pti);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "tpti"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_pttti);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "tpttti"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_Ji);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pJi"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_Jipp);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pJipp"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_Jbip);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pJbip"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_Jp);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJp"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JS);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJS"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_tt);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ttt"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_I_JOt);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "IJOt"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JOSI);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJOSI"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_S_JOi);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "SJOi"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JOi);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJOi"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_I_JO);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "IJO"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_N_JO);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "NJO"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JON);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJON"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JOi);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJOi"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JOI);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJOI"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JOI);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJOI"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JOIS);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJOIS"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_S_JOSP);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "SJOSP"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "i"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_i3i);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ii3i"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ibi);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iibi"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_l_lttl);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "llttl"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pip);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipip"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_piS);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipiS"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_S_i);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "Si"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_l_p);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "lp"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_c_p);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "cp"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_pi);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ppi"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_p);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pp"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pttttt);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipttttt"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_c_pttt);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "cpttt"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_pttttiti);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ppttttiti"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pt);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipt"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ptl);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iptl"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pi);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipi"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pl);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipl"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_l_);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "l"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_pt);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ppt"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_ptt);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pptt"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pit);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipit"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_pp);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ppp"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_l_ttl);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "lttl"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_l_pttl);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "lpttl"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_t);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vt"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_pttttitl);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ppttttitl"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_tiB3P);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ptiB3P"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_tip3P);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ptip3P"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pPtiiipi);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipPtiiipi"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_tpiibi);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "itpiibi"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_ptippppi);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pptippppi"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_pi33ipi);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ppi33ipi"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_pttip);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ppttip"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_ptipppi);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pptipppi"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_ppP);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pppP"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_iiil);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "piiil"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ppl);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ippl"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_pip);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vpip"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_pti);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ppti"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ppp);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ippp"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_ptii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pptii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_ti);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pti"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_ptp);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pptp"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pt33);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipt33"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_c_);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "c"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_c_pi);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "cpi"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_d_);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "d"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_d_d);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "dd"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_f_);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "f"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_f_ff);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "fff"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_f_is);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "fis"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_b);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ib"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_d);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "id"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_i);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ii4);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iii4"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ii4i);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iii4i"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_iiii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iiiii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_iiilsp);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iiiilsp"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_iil);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iiil"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_iili);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iiili"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_iip);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iiip"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_iit);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iiit"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_iiti);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iiiti"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ilsp);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iilsp"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_iti);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iiti"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_l);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "il"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_li);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ili"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_lp);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ilp"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_lsp);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ilsp"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_p33);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ip33"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_p333);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ip333"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_p333333);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ip333333"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_p4);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ip4"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_p42p);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ip42p"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_p4i);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ip4i"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pb);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipb"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pii4);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipii4"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pii4i);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipii4i"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_piii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipiii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_piiiiii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipiiiiii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_piiilsp);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipiiilsp"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_piil);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipiil"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_piili);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipiili"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_piit);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipiit"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_piiti);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipiiti"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pilsp);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipilsp"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pli);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipli"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pll);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipll"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pllllllll);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipllllllll"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_plp);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iplp"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_plsp);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iplsp"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pp);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipp"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ppi);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ippi"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ppiiiiiiii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ippiiiiiiii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pppp);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipppp"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_psp);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipsp"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pti);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipti"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pitl);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipitl"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_s);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "is"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_s22);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "is22"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_s222);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "is222"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_sp);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "isp"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_sss);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "isss"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ssss);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "issss"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_t);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "it"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ti);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iti"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_4);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "i4"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_4i);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "i4i"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_42p);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "i42p"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_l_ii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "lii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_l_l4);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ll4"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_l_pi);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "lpi"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_l_pii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "lpii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_l_p33l);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "lp33l"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_l_33l);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "l33l"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "p"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_B);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pB"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_b);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pb"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_Jt);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pJt"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_i);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pi"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_ii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_iiii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "piiii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_iiiiii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "piiiiii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_iiiiiiii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "piiiiiiii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_pii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ppii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_piiii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ppiiii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_t);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pt"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_tpp);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ptpp"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_ttttttt);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pttttttt"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_s_);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "s"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "t"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_i);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ti"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_ii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "tii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_pi);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "tpi"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_pii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "tpii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_t);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "tt"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_tl4);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ttl4"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_t4);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "tt4"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_sc);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "isc"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_s_sc);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ssc"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_c_sc);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "csc"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_iii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iiii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_i3);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ii3"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_b);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "tb"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_t_B);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "tB"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_P);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vP"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_pP);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vpP"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_ip);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pip"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_33);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "i33"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_pii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vpii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JO);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vJO"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_JO);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iJO"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_JOi);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iJOi"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_JOt);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iJOt"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_Jt);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iJt"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_Ji);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iJi"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_Vi);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vVi"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_ppiii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pppiii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_p_ppiiiiiii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "pppiiiiiii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ppii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ippii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ppiii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ippiii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ppiiii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ippiiii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ppiiiii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ippiiiii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ppiiiiii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ippiiiiii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ppt);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ippt"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pppi);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipppi"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pppii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipppii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pppiiii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipppiiii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ppppiiiiii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ippppiiiiii"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_fff);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vfff"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_V);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vV"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_VVV);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "vVVV"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_tV);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "itV"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_ptiVp);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "iptiVp"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pid);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipid"), temp_pmc);
+
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pitii);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipitii"), temp_pmc);
+
+}
+
+
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
+
Copied and modified: branches/boehm_gc_2/src/nci/extra_thunks.nci (from r44275, branches/boehm_gc_2/config/gen/call_list/misc.in)
==============================================================================
--- branches/boehm_gc_2/config/gen/call_list/misc.in Sun Feb 21 06:45:35 2010 (r44275, copy source)
+++ branches/boehm_gc_2/src/nci/extra_thunks.nci Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,3 +1,52 @@
+# Copyright (C) 2002-2010, Parrot Foundation.
+
+# Function signature declarations for Parrot Native Call Interface.
+# The first alphanumeric is the type of the return value,
+# the other alphanumerics denote the input parameter types.
+
+# Types
+
+# INT register stuff
+# I - INTVAL
+# c - char
+# s - short
+# i - int
+# l - long
+
+# NUM register stuff
+# N - FLOATVAL
+# f - float
+# d - double
+
+# STR register stuff
+# S - pointer to a STRING-register
+# t - character string (0-terminated)
+# Buffers are not valid return parameters,
+# use 'p' when the native function returns a pointer value
+# b - void *
+# B - void **
+
+# PMC register stuff
+# P - pointer to a PMC-register
+# O - pointer to PMC-register (object)
+# p - data pointer from PMC (on store into a new UnManagedStruct PMC)
+# 2 - pointer to short
+# 3 - pointer to int
+# 4 - pointer to long
+
+# void stuff
+# v - void
+
+# special stuff
+# 0 - insert a NULL (pointer) - doesn't consume a register
+# J - Parrot_Interp param
+# @ - slurpy array
+
+# callback stuff
+# U - Single PMC parameter to pass into callback - user data
+
+# Signatures
+
# t/src/embed.t
v J
Modified: branches/boehm_gc_2/src/nci_test.c
==============================================================================
--- branches/boehm_gc_2/src/nci_test.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/nci_test.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -67,7 +67,7 @@
/* Function declarations.
*** If you add a new test function here,
-*** please update src/libnci_test.def and src/call_list.txt too. ***
+*** please update src/libnci_test.def and src/nci/extra_thunks.nci too. ***
*/
Modified: branches/boehm_gc_2/src/oo.c
==============================================================================
--- branches/boehm_gc_2/src/oo.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/oo.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -152,35 +152,6 @@
/*
-=item C<PMC * Parrot_oo_get_namespace(PARROT_INTERP, const PMC *classobj)>
-
-Lookup a namespace object from a class PMC.
-
-This function is deprecated, see TT #1069.
-Use the inspect interface in the Class PMC instead.
-
-=cut
-
-*/
-
-PARROT_CAN_RETURN_NULL
-PARROT_WARN_UNUSED_RESULT
-PMC *
-Parrot_oo_get_namespace(SHIM_INTERP, ARGIN(const PMC *classobj))
-{
- ASSERT_ARGS(Parrot_oo_get_namespace)
- Parrot_Class_attributes * const _class = PARROT_CLASS(classobj);
- PMC * const _namespace = _class->_namespace;
-
- if (PMC_IS_NULL(_namespace))
- return PMCNULL;
-
- return _namespace;
-}
-
-
-/*
-
=item C<PMC * Parrot_oo_get_class(PARROT_INTERP, PMC *key)>
Lookup a class object from a namespace, string, or key PMC.
@@ -236,9 +207,9 @@
if (base_type == enum_class_Key
|| base_type == enum_class_ResizableStringArray
|| base_type == enum_class_String)
- type = pmc_type_p(interp, key);
+ type = Parrot_pmc_get_type(interp, key);
else
- type = pmc_type(interp, VTABLE_get_string(interp, key));
+ type = Parrot_pmc_get_type_str(interp, VTABLE_get_string(interp, key));
classobj = get_pmc_proxy(interp, type);
}
@@ -280,7 +251,7 @@
}
else {
obj = PARROT_OBJECT(pmc);
- cloned = pmc_new_noinit(interp, enum_class_Object);
+ cloned = Parrot_pmc_new_noinit(interp, enum_class_Object);
}
_class = PARROT_CLASS(obj->_class);
@@ -371,9 +342,9 @@
/* Create proxy if not found */
if (PMC_IS_NULL(proxy)) {
- PMC * const type_num = pmc_new(interp, enum_class_Integer);
+ PMC * const type_num = Parrot_pmc_new(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, type_num, type);
- proxy = pmc_new_init(interp, enum_class_PMCProxy, type_num);
+ proxy = Parrot_pmc_new_init(interp, enum_class_PMCProxy, type_num);
Parrot_pcc_invoke_method_from_c_args(interp, pmc_ns, CONST_STRING(interp, "set_class"), "P->", proxy);
}
return proxy;
@@ -411,7 +382,7 @@
/* If not found, check for a PMC */
if (PMC_IS_NULL(_class))
- return get_pmc_proxy(interp, pmc_type(interp, name));
+ return get_pmc_proxy(interp, Parrot_pmc_get_type_str(interp, name));
else
return _class;
}
@@ -434,14 +405,14 @@
Parrot_oo_newclass_from_str(PARROT_INTERP, ARGIN(STRING *name))
{
ASSERT_ARGS(Parrot_oo_newclass_from_str)
- PMC * const namearg = pmc_new(interp, enum_class_String);
- PMC * const namehash = pmc_new(interp, enum_class_Hash);
+ PMC * const namearg = Parrot_pmc_new(interp, enum_class_String);
+ PMC * const namehash = Parrot_pmc_new(interp, enum_class_Hash);
PMC *classobj;
VTABLE_set_string_native(interp, namearg, name);
VTABLE_set_pmc_keyed_str(interp, namehash, CONST_STRING(interp, "name"), namearg);
- classobj = pmc_new_init(interp, enum_class_Class, namehash);
+ classobj = Parrot_pmc_new_init(interp, enum_class_Class, namehash);
PARROT_ASSERT(classobj);
return classobj;
@@ -516,7 +487,7 @@
break;
}
if (PMC_IS_NULL(result))
- result = pmc_new(interp, enum_class_Undef);
+ result = Parrot_pmc_new(interp, enum_class_Undef);
VTABLE_set_pmc_keyed_str(interp, _class->parent_overrides, name, result);
}
if (result->vtable->base_type == enum_class_Undef)
@@ -678,12 +649,12 @@
* pt_shared_fixup() can safely do a type lookup. */
LOCK_INTERPRETER(interp);
{
- type = get_new_vtable_index(interp);
+ type = Parrot_pmc_get_new_vtable_index(interp);
}
{
if (!typeid_exists) {
PMC * const classname_hash = interp->class_hash;
- PMC * const item = pmc_new(interp, enum_class_Integer);
+ PMC * const item = Parrot_pmc_new(interp, enum_class_Integer);
/* set entry in name->type hash */
VTABLE_set_integer_native(interp, item, type);
@@ -749,7 +720,7 @@
init_object_cache(PARROT_INTERP)
{
ASSERT_ARGS(init_object_cache)
- Caches * const mc = interp->caches = mem_allocate_zeroed_typed(Caches);
+ Caches * const mc = interp->caches = mem_gc_allocate_zeroed_typed(interp, Caches);
mc->idx = NULL;
}
@@ -778,8 +749,8 @@
invalidate_type_caches(interp, i);
}
- mem_sys_free(mc->idx);
- mem_sys_free(mc);
+ mem_gc_free(interp, mc->idx);
+ mem_gc_free(interp, mc);
}
@@ -812,12 +783,12 @@
Meth_cache_entry *e = mc->idx[type][i];
while (e) {
Meth_cache_entry * const next = e->next;
- mem_sys_free(e);
+ mem_gc_free(interp, e);
e = next;
}
}
- mem_sys_free(mc->idx[type]);
+ mem_gc_free(interp, mc->idx[type]);
mc->idx[type] = NULL;
}
@@ -874,7 +845,7 @@
return;
}
- type = pmc_type(interp, _class);
+ type = Parrot_pmc_get_type_str(interp, _class);
if (type == 0)
invalidate_all_caches(interp);
@@ -958,19 +929,18 @@
if (type >= mc->mc_size) {
if (mc->idx) {
- mc->idx = (Meth_cache_entry ***)mem_sys_realloc_zeroed(mc->idx,
- sizeof (Meth_cache_entry ***) * (type + 1),
- sizeof (Meth_cache_entry ***) * mc->mc_size);
+ mc->idx = mem_gc_realloc_n_typed_zeroed(interp, mc->idx,
+ type + 1, mc->mc_size, Meth_cache_entry**);
}
else {
- mc->idx = mem_allocate_n_zeroed_typed(type + 1, Meth_cache_entry**);
+ mc->idx = mem_gc_allocate_n_zeroed_typed(interp, type + 1, Meth_cache_entry**);
}
mc->mc_size = type + 1;
}
if (mc->idx[type] == NULL) {
- mc->idx[type] = (Meth_cache_entry **)mem_sys_allocate_zeroed(
- sizeof (Meth_cache_entry *) * TBL_SIZE);
+ mc->idx[type] = mem_gc_allocate_n_zeroed_typed(interp,
+ TBL_SIZE, Meth_cache_entry*);
}
e = mc->idx[type][bits];
@@ -981,7 +951,7 @@
if (!e) {
/* when here no or no correct entry was at [bits] */
- e = mem_allocate_typed(Meth_cache_entry);
+ e = mem_gc_allocate_typed(interp, Meth_cache_entry);
mc->idx[type][bits] = e;
@@ -1159,7 +1129,7 @@
/* If we never found any candidates, return an empty list. */
if (cand_count == 0)
- return pmc_new(interp, enum_class_ResizablePMCArray);
+ return Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
/* If we didn't find anything to accept, error. */
if (PMC_IS_NULL(accepted))
@@ -1229,7 +1199,7 @@
if (parent_count == 0) {
/* No parents - MRO just contains this class. */
- result = pmc_new(interp, enum_class_ResizablePMCArray);
+ result = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
VTABLE_push_pmc(interp, result, _class);
return result;
}
@@ -1246,7 +1216,7 @@
/* instantiated lazily */
if (PMC_IS_NULL(merge_list))
- merge_list = pmc_new(interp, enum_class_ResizablePMCArray);
+ merge_list = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
VTABLE_push_pmc(interp, merge_list, lin);
}
@@ -1318,7 +1288,7 @@
/* We need to check for conflicts before we do the composition. We
* put each method that would be OK to add into a proposal list, and
* bail out right away if we find a problem. */
- proposed_add_methods = pmc_new(interp, enum_class_Hash);
+ proposed_add_methods = Parrot_pmc_new(interp, enum_class_Hash);
methods_iter = VTABLE_get_iter(interp, methods);
while (VTABLE_get_bool(interp, methods_iter)) {
Modified: branches/boehm_gc_2/src/ops/bit.ops
==============================================================================
--- branches/boehm_gc_2/src/ops/bit.ops Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/ops/bit.ops Mon Feb 22 12:30:02 2010 (r44294)
@@ -63,11 +63,15 @@
}
inline op band(invar PMC, in INT) :base_core {
- VTABLE_i_bitwise_and_int(interp, $1, $2);
+ const INTVAL a = VTABLE_get_integer(interp, $1);
+ const INTVAL b = a & $2;
+ VTABLE_set_integer_native(interp, $1, b);
}
inline op band(invar PMC, invar PMC) :base_core {
- VTABLE_i_bitwise_and(interp, $1, $2);
+ const INTVAL a = VTABLE_get_integer(interp, $1);
+ const INTVAL b = VTABLE_get_integer(interp, $2);
+ VTABLE_set_integer_native(interp, $1, a & b);
}
inline op band(out INT, in INT, in INT) :base_core {
@@ -75,11 +79,14 @@
}
inline op band(invar PMC, invar PMC, in INT) :base_core {
- $1 = VTABLE_bitwise_and_int(interp, $2, $3, $1);
+ const INTVAL a = VTABLE_get_integer(interp, $2);
+ VTABLE_set_integer_native(interp, $1, a & $3);
}
inline op band(invar PMC, invar PMC, invar PMC) :base_core {
- $1 = VTABLE_bitwise_and(interp, $2, $3, $1);
+ const INTVAL a = VTABLE_get_integer(interp, $2);
+ const INTVAL b = VTABLE_get_integer(interp, $3);
+ VTABLE_set_integer_native(interp, $1, a & b);
}
=item B<bands>(inout STR, in STR)
@@ -107,11 +114,16 @@
}
inline op bands(invar PMC, in STR) :base_core {
- VTABLE_i_bitwise_ands_str(interp, $1, $2);
+ STRING * const a = VTABLE_get_string(interp, $1);
+ STRING * const b = Parrot_str_bitwise_and(interp, a, $2, NULL);
+ VTABLE_set_string_native(interp, $1, b);
}
inline op bands(invar PMC, invar PMC) :base_core {
- VTABLE_i_bitwise_ands(interp, $1, $2);
+ STRING * a = VTABLE_get_string(interp, $1);
+ STRING * b = VTABLE_get_string(interp, $2);
+ a = Parrot_str_bitwise_and(interp, a, b, NULL);
+ VTABLE_set_string_native(interp, $1, a);
}
inline op bands(out STR, in STR, in STR) :base_core {
@@ -119,11 +131,16 @@
}
inline op bands(invar PMC, invar PMC, in STR) :base_core {
- $1 = VTABLE_bitwise_ands_str(interp, $2, $3, $1);
+ STRING * const a = VTABLE_get_string(interp, $2);
+ STRING * const b = Parrot_str_bitwise_and(interp, a, $3, NULL);
+ VTABLE_set_string_native(interp, $1, b);
}
inline op bands(invar PMC, invar PMC, invar PMC) :base_core {
- $1 = VTABLE_bitwise_ands(interp, $2, $3, $1);
+ STRING * const a = VTABLE_get_string(interp, $2);
+ STRING * const b = VTABLE_get_string(interp, $3);
+ STRING * const c = Parrot_str_bitwise_and(interp, a, b, NULL);
+ VTABLE_set_string_native(interp, $1, c);
}
########################################
@@ -149,11 +166,15 @@
}
inline op bnot(invar PMC) :base_core {
- VTABLE_i_bitwise_not(interp, $1);
+ const INTVAL a = VTABLE_get_integer(interp, $1);
+ VTABLE_set_integer_native(interp, $1, ~a);
}
inline op bnot(out PMC, invar PMC) :base_core {
- $1 = VTABLE_bitwise_not(interp, $2, $1);
+ const INTVAL a = VTABLE_get_integer(interp, $2);
+ PMC * const b = Parrot_pmc_new(interp, VTABLE_type(interp, $2));
+ VTABLE_set_integer_native(interp, b, ~a);
+ $1 = b;
}
=item B<bnots>(inout STR)
@@ -175,11 +196,15 @@
}
inline op bnots(invar PMC) :base_core {
- VTABLE_i_bitwise_nots(interp, $1);
+ STRING * a = VTABLE_get_string(interp, $1);
+ STRING * b = Parrot_str_bitwise_not(interp, a, NULL);
+ VTABLE_set_string_native(interp, $1, b);
}
inline op bnots(out PMC, invar PMC) :base_core {
- $1 = VTABLE_bitwise_nots(interp, $2, $1);
+ STRING * a = VTABLE_get_string(interp, $2);
+ STRING * b = Parrot_str_bitwise_not(interp, a, NULL);
+ VTABLE_set_string_native(interp, $1, b);
}
########################################
@@ -209,11 +234,14 @@
}
inline op bor(invar PMC, in INT) :base_core {
- VTABLE_i_bitwise_or_int(interp, $1, $2);
+ const INTVAL a = VTABLE_get_integer(interp, $1);
+ VTABLE_set_integer_native(interp, $1, a | $2);
}
inline op bor(invar PMC, invar PMC) :base_core {
- VTABLE_i_bitwise_or(interp, $1, $2);
+ const INTVAL a = VTABLE_get_integer(interp, $1);
+ const INTVAL b = VTABLE_get_integer(interp, $2);
+ VTABLE_set_integer_native(interp, $1, a | b);
}
inline op bor(out INT, in INT, in INT) :base_core {
@@ -221,11 +249,14 @@
}
inline op bor(invar PMC, invar PMC, in INT) :base_core {
- $1 = VTABLE_bitwise_or_int(interp, $2, $3, $1);
+ const INTVAL a = VTABLE_get_integer(interp, $2);
+ VTABLE_set_integer_native(interp, $1, a | $3);
}
inline op bor(invar PMC, invar PMC, invar PMC) :base_core {
- $1 = VTABLE_bitwise_or(interp, $2, $3, $1);
+ const INTVAL a = VTABLE_get_integer(interp, $2);
+ const INTVAL b = VTABLE_get_integer(interp, $3);
+ VTABLE_set_integer_native(interp, $1, a | b);
}
=item B<bors>(inout STR, in STR)
@@ -253,11 +284,16 @@
}
inline op bors(invar PMC, in STR) :base_core {
- VTABLE_i_bitwise_ors_str(interp, $1, $2);
+ STRING * const a = VTABLE_get_string(interp, $1);
+ STRING * const b = Parrot_str_bitwise_or(interp, a, $2, NULL);
+ VTABLE_set_string_native(interp, $1, b);
}
inline op bors(invar PMC, invar PMC) :base_core {
- VTABLE_i_bitwise_ors(interp, $1, $2);
+ STRING * const a = VTABLE_get_string(interp, $1);
+ STRING * const b = VTABLE_get_string(interp, $2);
+ STRING * const c = Parrot_str_bitwise_or(interp, a, b, NULL);
+ VTABLE_set_string_native(interp, $1, c);
}
inline op bors(out STR, in STR, in STR) :base_core {
@@ -265,11 +301,16 @@
}
inline op bors(invar PMC, invar PMC, in STR) :base_core {
- $1 = VTABLE_bitwise_ors_str(interp, $2, $3, $1);
+ STRING * const b = VTABLE_get_string(interp, $2);
+ STRING * const c = Parrot_str_bitwise_or(interp, b, $3, NULL);
+ VTABLE_set_string_native(interp, $1, c);
}
inline op bors(invar PMC, invar PMC, invar PMC) :base_core {
- $1 = VTABLE_bitwise_ors(interp, $2, $3, $1);
+ STRING * const a = VTABLE_get_string(interp, $2);
+ STRING * const b = VTABLE_get_string(interp, $3);
+ STRING * const c = Parrot_str_bitwise_or(interp, a, b, NULL);
+ VTABLE_set_string_native(interp, $1, c);
}
########################################
@@ -297,11 +338,16 @@
}
inline op shl(invar PMC, in INT) :base_core {
- VTABLE_i_bitwise_shl_int(interp, $1, $2);
+ const INTVAL a = VTABLE_get_integer(interp, $1);
+ const INTVAL b = bit_shift_left(a, $2);
+ VTABLE_set_integer_native(interp, $1, b);
}
inline op shl(invar PMC, invar PMC) :base_core {
- VTABLE_i_bitwise_shl(interp, $1, $2);
+ const INTVAL a = VTABLE_get_integer(interp, $1);
+ const INTVAL b = VTABLE_get_integer(interp, $2);
+ const INTVAL c = bit_shift_left(a, b);
+ VTABLE_set_integer_native(interp, $1, c);
}
inline op shl(out INT, in INT, in INT) :base_core {
@@ -309,11 +355,16 @@
}
inline op shl(invar PMC, invar PMC, in INT) :base_core {
- $1 = VTABLE_bitwise_shl_int(interp, $2, $3, $1);
+ const INTVAL a = VTABLE_get_integer(interp, $2);
+ const INTVAL b = bit_shift_left(a, $3);
+ VTABLE_set_integer_native(interp, $1, b);
}
inline op shl(invar PMC, invar PMC, invar PMC) :base_core {
- $1 = VTABLE_bitwise_shl(interp, $2, $3, $1);
+ const INTVAL a = VTABLE_get_integer(interp, $2);
+ const INTVAL b = VTABLE_get_integer(interp, $3);
+ const INTVAL c = bit_shift_left(a, b);
+ VTABLE_set_integer_native(interp, $1, c);
}
########################################
@@ -342,11 +393,16 @@
}
inline op shr(invar PMC, in INT) :base_core {
- VTABLE_i_bitwise_shr_int(interp, $1, $2);
+ const INTVAL a = VTABLE_get_integer(interp, $1);
+ const INTVAL b = bit_shift_left(a, -$2);
+ VTABLE_set_integer_native(interp, $1, b);
}
inline op shr(invar PMC, invar PMC) :base_core {
- VTABLE_i_bitwise_shr(interp, $1, $2);
+ const INTVAL a = VTABLE_get_integer(interp, $1);
+ const INTVAL b = VTABLE_get_integer(interp, $2);
+ const INTVAL c = bit_shift_left(a, -b);
+ VTABLE_set_integer_native(interp, $1, c);
}
inline op shr(out INT, in INT, in INT) :base_core {
@@ -355,11 +411,16 @@
}
inline op shr(invar PMC, invar PMC, in INT) :base_core {
- $1 = VTABLE_bitwise_shr_int(interp, $2, $3, $1);
+ const INTVAL a = VTABLE_get_integer(interp, $2);
+ const INTVAL c = bit_shift_left(a, -$3);
+ VTABLE_set_integer_native(interp, $1, c);
}
inline op shr(invar PMC, invar PMC, invar PMC) :base_core {
- $1 = VTABLE_bitwise_shr(interp, $2, $3, $1);
+ const INTVAL a = VTABLE_get_integer(interp, $2);
+ const INTVAL b = VTABLE_get_integer(interp, $3);
+ const INTVAL c = bit_shift_left(a, -b);
+ VTABLE_set_integer_native(interp, $1, c);
}
########################################
@@ -383,19 +444,22 @@
=cut
inline op lsr(out INT, in INT) :base_core {
- /*
- * lvalue casts are evil, but this one isn't evil enough to kill.
- * it's just casting a signed integral to the equivalent unsigned.
- */
- LVALUE_CAST(UINTVAL, $1) >>= $2;
+ const UINTVAL a = (UINTVAL)$1;
+ const UINTVAL b = a >> $2;
+ $1 = (INTVAL)b;
}
inline op lsr(invar PMC, in INT) :base_core {
- VTABLE_i_bitwise_lsr_int(interp, $1, $2);
+ const UINTVAL a = (UINTVAL)VTABLE_get_integer(interp, $1);
+ const UINTVAL b = a >> $2;
+ VTABLE_set_integer_native(interp, $1, (INTVAL)b);
}
inline op lsr(invar PMC, invar PMC) :base_core {
- VTABLE_i_bitwise_lsr(interp, $1, $2);
+ const UINTVAL a = (UINTVAL)VTABLE_get_integer(interp, $1);
+ const UINTVAL b = (UINTVAL)VTABLE_get_integer(interp, $2);
+ const UINTVAL c = a >> b;
+ VTABLE_set_integer_native(interp, $1, (INTVAL)c);
}
inline op lsr(out INT, in INT, in INT) :base_core {
@@ -403,11 +467,17 @@
}
inline op lsr(invar PMC, invar PMC, in INT) :base_core {
- $1 = VTABLE_bitwise_lsr_int(interp, $2, $3, $1);
+ const UINTVAL a = (UINTVAL)VTABLE_get_integer(interp, $2);
+ const UINTVAL b = (UINTVAL)$3;
+ const UINTVAL c = a >> b;
+ VTABLE_set_integer_native(interp, $1, (INTVAL)c);
}
inline op lsr(invar PMC, invar PMC, invar PMC) :base_core {
- $1 = VTABLE_bitwise_lsr(interp, $2, $3, $1);
+ const UINTVAL a = (UINTVAL)VTABLE_get_integer(interp, $2);
+ const UINTVAL b = (UINTVAL)VTABLE_get_integer(interp, $3);
+ const UINTVAL c = a >> b;
+ VTABLE_set_integer_native(interp, $3, (INTVAL)c);
}
=item B<rot>(out INT, in INT, in INT, inconst INT)
@@ -433,9 +503,6 @@
$1 = d;
}
-
-}
-
########################################
=item B<bxor>(inout INT, in INT)
@@ -463,11 +530,16 @@
}
inline op bxor(invar PMC, in INT) :base_core {
- VTABLE_i_bitwise_xor_int(interp, $1, $2);
+ const UINTVAL a = (UINTVAL)VTABLE_get_integer(interp, $1);
+ const UINTVAL b = a ^ $2;
+ VTABLE_set_integer_native(interp, $1, (INTVAL)b);
}
inline op bxor(invar PMC, invar PMC) :base_core {
- VTABLE_i_bitwise_xor(interp, $1, $2);
+ const UINTVAL a = (UINTVAL)VTABLE_get_integer(interp, $1);
+ const UINTVAL b = (UINTVAL)VTABLE_get_integer(interp, $2);
+ const UINTVAL c = a ^ b;
+ VTABLE_set_integer_native(interp, $1, (INTVAL)c);
}
inline op bxor(out INT, in INT, in INT) :base_core {
@@ -475,11 +547,16 @@
}
inline op bxor(invar PMC, invar PMC, in INT) :base_core {
- $1 = VTABLE_bitwise_xor_int(interp, $2, $3, $1);
+ const UINTVAL a = (UINTVAL)VTABLE_get_integer(interp, $2);
+ const UINTVAL b = a ^ $3;
+ VTABLE_set_integer_native(interp, $1, (INTVAL)b);
}
inline op bxor(invar PMC, invar PMC, invar PMC) :base_core {
- $1 = VTABLE_bitwise_xor(interp, $2, $3, $1);
+ const UINTVAL a = (UINTVAL)VTABLE_get_integer(interp, $2);
+ const UINTVAL b = (UINTVAL)VTABLE_get_integer(interp, $3);
+ const UINTVAL c = a ^ b;
+ VTABLE_set_integer_native(interp, $1, (INTVAL)c);
}
=item B<bxors>(inout STR, in STR)
@@ -507,11 +584,16 @@
}
inline op bxors(invar PMC, in STR) :base_core {
- VTABLE_i_bitwise_xors_str(interp, $1, $2);
+ STRING *a = VTABLE_get_string(interp, $1);
+ STRING *b = Parrot_str_bitwise_xor(interp, a, $2, NULL);
+ VTABLE_set_string_native(interp, $1, b);
}
inline op bxors(invar PMC, invar PMC) :base_core {
- VTABLE_i_bitwise_xors(interp, $1, $2);
+ STRING *a = VTABLE_get_string(interp, $1);
+ STRING *b = VTABLE_get_string(interp, $2);
+ STRING *c = Parrot_str_bitwise_xor(interp, a, b, NULL);
+ VTABLE_set_string_native(interp, $1, c);
}
inline op bxors(out STR, in STR, in STR) :base_core {
@@ -519,11 +601,16 @@
}
inline op bxors(invar PMC, invar PMC, in STR) :base_core {
- $1 = VTABLE_bitwise_xors_str(interp, $2, $3, $1);
+ STRING *a = VTABLE_get_string(interp, $2);
+ STRING *b = Parrot_str_bitwise_xor(interp, a, $3, NULL);
+ VTABLE_set_string_native(interp, $1, b);
}
inline op bxors(invar PMC, invar PMC, invar PMC) :base_core {
- $1 = VTABLE_bitwise_xors(interp, $2, $3, $1);
+ STRING *a = VTABLE_get_string(interp, $2);
+ STRING *b = VTABLE_get_string(interp, $3);
+ STRING *c = Parrot_str_bitwise_xor(interp, a, b, NULL);
+ VTABLE_set_string_native(interp, $1, c);
}
=back
Modified: branches/boehm_gc_2/src/ops/cmp.ops
==============================================================================
--- branches/boehm_gc_2/src/ops/cmp.ops Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/ops/cmp.ops Mon Feb 22 12:30:02 2010 (r44294)
@@ -87,15 +87,15 @@
}
op eq(invar PMC, in INT, inconst LABEL) :base_core {
- PMC * temp = temporary_pmc_new(interp, enum_class_Integer);
+ PMC * temp = Parrot_pmc_new_temporary(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, temp, $2);
if (VTABLE_is_equal(interp, $1, temp)) {
- temporary_pmc_free(interp, temp);
+ Parrot_pmc_free_temporary(interp, temp);
goto OFFSET($3);
}
- temporary_pmc_free(interp, temp);
+ Parrot_pmc_free_temporary(interp, temp);
}
op eq(invar PMC, in NUM, inconst LABEL) :base_core {
@@ -193,15 +193,15 @@
}
op ne(invar PMC, in INT, inconst LABEL) :base_core {
- PMC * temp = temporary_pmc_new(interp, enum_class_Integer);
+ PMC * temp = Parrot_pmc_new_temporary(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, temp, $2);
if (!VTABLE_is_equal(interp, $1, temp)) {
- temporary_pmc_free(interp, temp);
+ Parrot_pmc_free_temporary(interp, temp);
goto OFFSET($3);
}
- temporary_pmc_free(interp, temp);
+ Parrot_pmc_free_temporary(interp, temp);
}
op ne(invar PMC, in NUM, inconst LABEL) :base_core {
@@ -289,15 +289,15 @@
}
op lt(invar PMC, in INT, inconst LABEL) :base_core {
- PMC * temp = temporary_pmc_new(interp, enum_class_Integer);
+ PMC * temp = Parrot_pmc_new_temporary(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, temp, $2);
if (VTABLE_cmp(interp, $1, temp) < 0) {
- temporary_pmc_free(interp, temp);
+ Parrot_pmc_free_temporary(interp, temp);
goto OFFSET($3);
}
- temporary_pmc_free(interp, temp);
+ Parrot_pmc_free_temporary(interp, temp);
}
op lt(invar PMC, in NUM, inconst LABEL) :base_core {
@@ -373,15 +373,15 @@
}
op le(invar PMC, in INT, inconst LABEL) :base_core {
- PMC * temp = temporary_pmc_new(interp, enum_class_Integer);
+ PMC * temp = Parrot_pmc_new_temporary(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, temp, $2);
if (VTABLE_cmp(interp, $1, temp) <= 0) {
- temporary_pmc_free(interp, temp);
+ Parrot_pmc_free_temporary(interp, temp);
goto OFFSET($3);
}
- temporary_pmc_free(interp, temp);
+ Parrot_pmc_free_temporary(interp, temp);
}
op le(invar PMC, in NUM, inconst LABEL) :base_core {
@@ -433,15 +433,15 @@
}
op gt(invar PMC, in INT, inconst LABEL) :base_core {
- PMC * temp = temporary_pmc_new(interp, enum_class_Integer);
+ PMC * temp = Parrot_pmc_new_temporary(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, temp, $2);
if (VTABLE_cmp(interp, $1, temp) > 0) {
- temporary_pmc_free(interp, temp);
+ Parrot_pmc_free_temporary(interp, temp);
goto OFFSET($3);
}
- temporary_pmc_free(interp, temp);
+ Parrot_pmc_free_temporary(interp, temp);
}
op gt(invar PMC, in NUM, inconst LABEL) :base_core {
@@ -493,15 +493,15 @@
}
op ge(invar PMC, in INT, inconst LABEL) :base_core {
- PMC * temp = temporary_pmc_new(interp, enum_class_Integer);
+ PMC * temp = Parrot_pmc_new_temporary(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, temp, $2);
if (VTABLE_cmp(interp, $1, temp) >= 0) {
- temporary_pmc_free(interp, temp);
+ Parrot_pmc_free_temporary(interp, temp);
goto OFFSET($3);
}
- temporary_pmc_free(interp, temp);
+ Parrot_pmc_free_temporary(interp, temp);
}
op ge(invar PMC, in NUM, inconst LABEL) :base_core {
Modified: branches/boehm_gc_2/src/ops/core.ops
==============================================================================
--- branches/boehm_gc_2/src/ops/core.ops Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/ops/core.ops Mon Feb 22 12:30:02 2010 (r44294)
@@ -606,7 +606,7 @@
/* If no elements, hand back empty array; otherwise PMC. */
if (!sig)
- $1 = pmc_new(interp, enum_class_FixedIntegerArray);
+ $1 = Parrot_pmc_new(interp, enum_class_FixedIntegerArray);
else
$1 = sig;
}
@@ -758,7 +758,7 @@
=cut
inline op push_eh(inconst LABEL) {
- PMC * const eh = pmc_new(interp, enum_class_ExceptionHandler);
+ PMC * const eh = Parrot_pmc_new(interp, enum_class_ExceptionHandler);
VTABLE_set_pointer(interp, eh, CUR_OPCODE + $1);
Parrot_cx_add_handler_local(interp, eh);
}
@@ -874,7 +874,7 @@
}
inline op pushmark(in INT) {
- PMC * const newint = pmc_new(interp, enum_class_Integer);
+ PMC * const newint = Parrot_pmc_new(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, newint, $1);
VTABLE_push_pmc(interp, interp->dynamic_env, newint);
}
@@ -1319,10 +1319,10 @@
const char * err = Parrot_dlerror();
Parrot_warn(interp, PARROT_WARNINGS_UNDEF_FLAG,
"Symbol '%s' not found: %s\n", name, err ? err : "unknown reason");
- $1 = pmc_new(interp, enum_class_Undef);
+ $1 = Parrot_pmc_new(interp, enum_class_Undef);
}
else {
- $1 = pmc_new(interp, enum_class_NCI);
+ $1 = Parrot_pmc_new(interp, enum_class_NCI);
VTABLE_set_pointer_keyed_str(interp, $1, $4, F2DPTR(p));
PObj_get_FLAGS($1) |= PObj_private1_FLAG;
}
@@ -1342,12 +1342,12 @@
const char * const err = Parrot_dlerror();
Parrot_warn(interp, PARROT_WARNINGS_UNDEF_FLAG,
"Symbol '%s' not found: %s\n", name, err ? err : "unknown reason");
- $1 = pmc_new(interp, enum_class_Undef);
+ $1 = Parrot_pmc_new(interp, enum_class_Undef);
}
else {
/* At this point we have the symbol's address. We just need to build
a PMC with it so we can get and set the value */
- $1 = pmc_new(interp, enum_class_UnManagedStruct);
+ $1 = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
VTABLE_set_pointer(interp, $1, p);
}
Parrot_str_free_cstring(name);
@@ -1399,7 +1399,7 @@
cur_pos, NULL);
}
else {
- $1 = pmc_new(interp, enum_class_Hash);
+ $1 = Parrot_pmc_new(interp, enum_class_Hash);
}
goto NEXT();
}
Modified: branches/boehm_gc_2/src/ops/experimental.ops
==============================================================================
--- branches/boehm_gc_2/src/ops/experimental.ops Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/ops/experimental.ops Mon Feb 22 12:30:02 2010 (r44294)
@@ -98,7 +98,7 @@
if (!PMC_IS_NULL(classobj))
$1 = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = pmc_type_p(interp, $4);
+ const INTVAL type = Parrot_pmc_get_type(interp, $4);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
interp, expr NEXT(), EXCEPTION_NO_CLASS,
@@ -106,7 +106,7 @@
goto ADDRESS(dest);
}
- $1 = pmc_new(interp, type);
+ $1 = Parrot_pmc_new(interp, type);
}
}
}
@@ -118,7 +118,7 @@
if (!PMC_IS_NULL(classobj))
$1 = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = pmc_type_p(interp, $4);
+ const INTVAL type = Parrot_pmc_get_type(interp, $4);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
interp, expr NEXT(), EXCEPTION_NO_CLASS,
@@ -126,7 +126,7 @@
goto ADDRESS(dest);
}
- $1 = pmc_new(interp, type);
+ $1 = Parrot_pmc_new(interp, type);
}
}
}
@@ -138,7 +138,7 @@
if (!PMC_IS_NULL(classobj))
$1 = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = pmc_type_p(interp, $4);
+ const INTVAL type = Parrot_pmc_get_type(interp, $4);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
interp, expr NEXT(), EXCEPTION_NO_CLASS,
@@ -146,7 +146,7 @@
goto ADDRESS(dest);
}
- $1 = pmc_new(interp, type);
+ $1 = Parrot_pmc_new(interp, type);
}
}
}
@@ -175,7 +175,7 @@
if (!PMC_IS_NULL(classobj))
$1 = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = pmc_type_p(interp, $4);
+ const INTVAL type = Parrot_pmc_get_type(interp, $4);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
interp, expr NEXT(), EXCEPTION_NO_CLASS,
@@ -183,7 +183,7 @@
goto ADDRESS(dest);
}
- $1 = pmc_new(interp, type);
+ $1 = Parrot_pmc_new(interp, type);
}
VTABLE_set_pmc_keyed(interp, $2, $3, $1);
}
@@ -197,7 +197,7 @@
if (!PMC_IS_NULL(classobj))
$1 = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = pmc_type_p(interp, $4);
+ const INTVAL type = Parrot_pmc_get_type(interp, $4);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
interp, expr NEXT(), EXCEPTION_NO_CLASS,
@@ -205,7 +205,7 @@
goto ADDRESS(dest);
}
- $1 = pmc_new(interp, type);
+ $1 = Parrot_pmc_new(interp, type);
}
VTABLE_set_pmc_keyed_int(interp, $2, $3, $1);
@@ -220,7 +220,7 @@
if (!PMC_IS_NULL(classobj))
$1 = VTABLE_instantiate(interp, classobj, PMCNULL);
else {
- const INTVAL type = pmc_type_p(interp, $4);
+ const INTVAL type = Parrot_pmc_get_type(interp, $4);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(
interp, expr NEXT(), EXCEPTION_NO_CLASS,
@@ -228,7 +228,7 @@
goto ADDRESS(dest);
}
- $1 = pmc_new(interp, type);
+ $1 = Parrot_pmc_new(interp, type);
}
VTABLE_set_pmc_keyed_str(interp, $2, $3, $1);
Modified: branches/boehm_gc_2/src/ops/io.ops
==============================================================================
--- branches/boehm_gc_2/src/ops/io.ops Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/ops/io.ops Mon Feb 22 12:30:02 2010 (r44294)
@@ -54,7 +54,7 @@
inline op fdopen(out PMC, in INT, in STR) :filesys_open {
$1 = Parrot_io_fdopen(interp, PMCNULL, (PIOHANDLE)$2, $3);
if (!$1)
- $1 = pmc_new(interp, enum_class_Undef);
+ $1 = Parrot_pmc_new(interp, enum_class_Undef);
}
=item B<getstdin>(out PMC)
Modified: branches/boehm_gc_2/src/ops/math.ops
==============================================================================
--- branches/boehm_gc_2/src/ops/math.ops Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/ops/math.ops Mon Feb 22 12:30:02 2010 (r44294)
@@ -205,7 +205,7 @@
result = VTABLE_get_integer(interp, $2) % $3;
- $1 = pmc_new(interp, VTABLE_type(interp, $2));
+ $1 = Parrot_pmc_new(interp, VTABLE_type(interp, $2));
VTABLE_set_integer_native(interp, $1, result);
}
@@ -222,7 +222,7 @@
result = VTABLE_get_integer(interp, $2) % value;
- $1 = pmc_new(interp, VTABLE_type(interp, $2));
+ $1 = Parrot_pmc_new(interp, VTABLE_type(interp, $2));
VTABLE_set_integer_native(interp, $1, result);
}
@@ -283,7 +283,7 @@
result = fmod(VTABLE_get_integer(interp, $2), value);
- $1 = pmc_new(interp, VTABLE_type(interp, $2));
+ $1 = Parrot_pmc_new(interp, VTABLE_type(interp, $2));
VTABLE_set_integer_native(interp, $1, (INTVAL) result);
}
@@ -812,15 +812,35 @@
}
inline op pow(invar PMC, invar PMC, invar PMC) :base_core {
- $1 = VTABLE_pow(interp, $2, $3, $1);
+ const FLOATVAL a = VTABLE_get_number(interp, $2);
+ const FLOATVAL b = VTABLE_get_number(interp, $3);
+ const FLOATVAL c = pow(a, b);
+ if (PMC_IS_NULL($1))
+ $1 = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
+ else
+ $1 = Parrot_pmc_new(interp, $1->vtable->base_type);
+ VTABLE_set_number_native(interp, $1, c);
}
inline op pow(invar PMC, invar PMC, in INT) :base_core {
- $1 = VTABLE_pow_int(interp, $2, $3, $1);
+ const FLOATVAL a = VTABLE_get_number(interp, $2);
+ const FLOATVAL b = (FLOATVAL)$3;
+ const FLOATVAL c = pow(a, b);
+ if (PMC_IS_NULL($1))
+ $1 = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
+ else
+ $1 = Parrot_pmc_new(interp, $1->vtable->base_type);
+ VTABLE_set_number_native(interp, $1, c);
}
inline op pow(invar PMC, invar PMC, in NUM) :base_core {
- $1 = VTABLE_pow_float(interp, $2, $3, $1);
+ const FLOATVAL a = VTABLE_get_number(interp, $2);
+ const FLOATVAL c = pow(a, $3);
+ if (PMC_IS_NULL($1))
+ $1 = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
+ else
+ $1 = Parrot_pmc_new(interp, $1->vtable->base_type);
+ VTABLE_set_number_native(interp, $1, c);
}
inline op pow(out NUM, in NUM, in INT) :base_core {
Modified: branches/boehm_gc_2/src/ops/object.ops
==============================================================================
--- branches/boehm_gc_2/src/ops/object.ops Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/ops/object.ops Mon Feb 22 12:30:02 2010 (r44294)
@@ -236,13 +236,13 @@
=cut
inline op newclass(out PMC, in STR) :object_classes {
- PMC * const name = pmc_new(interp, enum_class_String);
+ PMC * const name = Parrot_pmc_new(interp, enum_class_String);
VTABLE_set_string_native(interp, name, $2);
- $1 = pmc_new_init(interp, enum_class_Class, name);
+ $1 = Parrot_pmc_new_init(interp, enum_class_Class, name);
}
inline op newclass(out PMC, in PMC) :object_classes {
- $1 = pmc_new_init(interp, enum_class_Class, $2);
+ $1 = Parrot_pmc_new_init(interp, enum_class_Class, $2);
}
=item B<subclass>(out PMC, in PMC)
@@ -267,7 +267,7 @@
"Class '%Ss' doesn't exist", VTABLE_get_string(interp, $2));
goto ADDRESS(handler);
}
- $1 = pmc_new(interp, enum_class_Class);
+ $1 = Parrot_pmc_new(interp, enum_class_Class);
VTABLE_add_parent(interp, $1, parent_class);
goto ADDRESS(next);
}
@@ -297,7 +297,7 @@
"Class '%Ss' doesn't exist", VTABLE_get_string(interp, $2));
goto ADDRESS(handler);
}
- $1 = pmc_new_init(interp, enum_class_Class, $3);
+ $1 = Parrot_pmc_new_init(interp, enum_class_Class, $3);
VTABLE_add_parent(interp, $1, parent_class);
goto ADDRESS(next);
}
@@ -326,7 +326,7 @@
goto ADDRESS(handler);
}
- $1 = pmc_new(interp, enum_class_Class);
+ $1 = Parrot_pmc_new(interp, enum_class_Class);
VTABLE_add_parent(interp, $1, parent_class);
goto ADDRESS(next);
}
@@ -358,7 +358,7 @@
goto ADDRESS(handler);
}
- $1 = pmc_new_init(interp, enum_class_Class, $3);
+ $1 = Parrot_pmc_new_init(interp, enum_class_Class, $3);
VTABLE_add_parent(interp, $1, parent_class);
goto ADDRESS(next);
}
Modified: branches/boehm_gc_2/src/ops/pmc.ops
==============================================================================
--- branches/boehm_gc_2/src/ops/pmc.ops Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/ops/pmc.ops Mon Feb 22 12:30:02 2010 (r44294)
@@ -58,14 +58,14 @@
if (!PMC_IS_NULL(_class))
$1 = VTABLE_instantiate(interp, _class, PMCNULL);
else {
- const INTVAL type = pmc_type(interp, name);
+ const INTVAL type = Parrot_pmc_get_type_str(interp, name);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(interp, expr NEXT(),
EXCEPTION_NO_CLASS,
"Class '%Ss' not found", name);
goto ADDRESS(dest);
}
- $1 = pmc_new(interp, type);
+ $1 = Parrot_pmc_new(interp, type);
}
}
@@ -78,14 +78,14 @@
if (!PMC_IS_NULL(_class))
$1 = VTABLE_instantiate(interp, _class, $3);
else {
- const INTVAL type = pmc_type(interp, name);
+ const INTVAL type = Parrot_pmc_get_type_str(interp, name);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(interp, expr NEXT(),
EXCEPTION_NO_CLASS,
"Class '%Ss' not found", name);
goto ADDRESS(dest);
}
- $1 = pmc_new_init(interp, type, $3);
+ $1 = Parrot_pmc_new_init(interp, type, $3);
}
}
@@ -96,14 +96,14 @@
if (!PMC_IS_NULL(_class))
$1 = VTABLE_instantiate(interp, _class, PMCNULL);
else {
- const INTVAL type = pmc_type_p(interp, name_key);
+ const INTVAL type = Parrot_pmc_get_type(interp, name_key);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(interp, expr NEXT(),
EXCEPTION_NO_CLASS,
"Class '%Ss' not found", VTABLE_get_repr(interp, name_key));
goto ADDRESS(dest);
}
- $1 = pmc_new(interp, type);
+ $1 = Parrot_pmc_new(interp, type);
}
}
@@ -114,14 +114,14 @@
if (!PMC_IS_NULL(_class))
$1 = VTABLE_instantiate(interp, _class, $3);
else {
- const INTVAL type = pmc_type_p(interp, name_key);
+ const INTVAL type = Parrot_pmc_get_type(interp, name_key);
if (type <= 0) {
opcode_t *dest = Parrot_ex_throw_from_op_args(interp, expr NEXT(),
EXCEPTION_NO_CLASS,
"Class '%Ss' not found", VTABLE_get_repr(interp, name_key));
goto ADDRESS(dest);
}
- $1 = pmc_new_init(interp, type, $3);
+ $1 = Parrot_pmc_new_init(interp, type, $3);
}
}
@@ -627,11 +627,11 @@
=cut
op register(invar PMC) {
- gc_register_pmc(interp, $1);
+ Parrot_pmc_gc_register(interp, $1);
}
op unregister(invar PMC) {
- gc_unregister_pmc(interp, $1);
+ Parrot_pmc_gc_unregister(interp, $1);
}
@@ -648,17 +648,17 @@
=cut
op box(out PMC, in INT) {
- $1 = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Integer));
+ $1 = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Integer));
VTABLE_set_integer_native(interp, $1, $2);
}
op box(out PMC, in NUM) {
- $1 = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
+ $1 = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_Float));
VTABLE_set_number_native(interp, $1, $2);
}
op box(out PMC, in STR) {
- $1 = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_String));
+ $1 = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_String));
VTABLE_set_string_native(interp, $1, $2);
}
Modified: branches/boehm_gc_2/src/ops/sys.ops
==============================================================================
--- branches/boehm_gc_2/src/ops/sys.ops Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/ops/sys.ops Mon Feb 22 12:30:02 2010 (r44294)
@@ -313,7 +313,7 @@
=cut
-inline op sizeof (out INT, in INT) {
+inline op sizeof (out INT, in INT) :deprecated {
if ($2 < enum_first_type || $2 >= enum_last_type)
$1 = -1;
else
Modified: branches/boehm_gc_2/src/packfile.c
==============================================================================
--- branches/boehm_gc_2/src/packfile.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/packfile.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -47,10 +47,11 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
-static PackFile_Segment * byte_code_new(SHIM_INTERP,
+static PackFile_Segment * byte_code_new(PARROT_INTERP,
SHIM(PackFile *pf),
SHIM(STRING *name),
- SHIM(int add));
+ SHIM(int add))
+ __attribute__nonnull__(1);
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
@@ -72,10 +73,11 @@
PARROT_MALLOC
PARROT_CANNOT_RETURN_NULL
-static PackFile_Segment * const_new(SHIM_INTERP,
+static PackFile_Segment * const_new(PARROT_INTERP,
SHIM(PackFile *pf),
SHIM(STRING *name),
- SHIM(int add));
+ SHIM(int add))
+ __attribute__nonnull__(1);
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
@@ -91,8 +93,9 @@
__attribute__nonnull__(5)
FUNC_MODIFIES(*dir);
-static void default_destroy(ARGMOD(PackFile_Segment *self))
+static void default_destroy(PARROT_INTERP, ARGMOD(PackFile_Segment *self))
__attribute__nonnull__(1)
+ __attribute__nonnull__(2)
FUNC_MODIFIES(*self);
static void default_dump(PARROT_INTERP, ARGIN(const PackFile_Segment *self))
@@ -113,11 +116,12 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
-static const opcode_t * default_unpack(
+static const opcode_t * default_unpack(PARROT_INTERP,
ARGMOD(PackFile_Segment *self),
ARGIN(const opcode_t *cursor))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
+ __attribute__nonnull__(3)
FUNC_MODIFIES(*self);
static void directory_destroy(PARROT_INTERP, ARGMOD(PackFile_Segment *self))
@@ -132,10 +136,11 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
-static PackFile_Segment * directory_new(SHIM_INTERP,
+static PackFile_Segment * directory_new(PARROT_INTERP,
SHIM(PackFile *pf),
SHIM(STRING *name),
- SHIM(int add));
+ SHIM(int add))
+ __attribute__nonnull__(1);
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
@@ -210,10 +215,11 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
-static PackFile_Segment * fixup_new(SHIM_INTERP,
+static PackFile_Segment * fixup_new(PARROT_INTERP,
SHIM(PackFile *pf),
SHIM(STRING *name),
- SHIM(int add));
+ SHIM(int add))
+ __attribute__nonnull__(1);
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
@@ -267,7 +273,8 @@
__attribute__nonnull__(1)
FUNC_MODIFIES(*header);
-static void pf_debug_destroy(SHIM_INTERP, ARGMOD(PackFile_Segment *self))
+static void pf_debug_destroy(PARROT_INTERP, ARGMOD(PackFile_Segment *self))
+ __attribute__nonnull__(1)
__attribute__nonnull__(2)
FUNC_MODIFIES(*self);
@@ -278,10 +285,11 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
-static PackFile_Segment * pf_debug_new(SHIM_INTERP,
+static PackFile_Segment * pf_debug_new(PARROT_INTERP,
SHIM(PackFile *pf),
SHIM(STRING *name),
- SHIM(int add));
+ SHIM(int add))
+ __attribute__nonnull__(1);
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
@@ -341,7 +349,8 @@
#define ASSERT_ARGS_byte_code_destroy __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(self))
-#define ASSERT_ARGS_byte_code_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_byte_code_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_clone_constant __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(old_const))
@@ -351,14 +360,16 @@
#define ASSERT_ARGS_const_destroy __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(self))
-#define ASSERT_ARGS_const_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_const_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_create_seg __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(dir) \
, PARROT_ASSERT_ARG(name) \
, PARROT_ASSERT_ARG(file_name))
#define ASSERT_ARGS_default_destroy __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(self))
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(self))
#define ASSERT_ARGS_default_dump __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(self))
@@ -368,7 +379,8 @@
#define ASSERT_ARGS_default_packed_size __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(self))
#define ASSERT_ARGS_default_unpack __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(self) \
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(self) \
, PARROT_ASSERT_ARG(cursor))
#define ASSERT_ARGS_directory_destroy __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
@@ -376,7 +388,8 @@
#define ASSERT_ARGS_directory_dump __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(self))
-#define ASSERT_ARGS_directory_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_directory_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_directory_pack __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(self) \
@@ -407,7 +420,8 @@
#define ASSERT_ARGS_fixup_destroy __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(self))
-#define ASSERT_ARGS_fixup_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_fixup_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_fixup_pack __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(self) \
@@ -432,11 +446,13 @@
#define ASSERT_ARGS_PackFile_set_header __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(header))
#define ASSERT_ARGS_pf_debug_destroy __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(self))
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(self))
#define ASSERT_ARGS_pf_debug_dump __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(self))
-#define ASSERT_ARGS_pf_debug_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_pf_debug_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_pf_debug_pack __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(self) \
, PARROT_ASSERT_ARG(cursor))
@@ -536,9 +552,9 @@
}
#endif
- mem_sys_free(pf->header);
+ mem_gc_free(interp, pf->header);
pf->header = NULL;
- mem_sys_free(pf->dirp);
+ mem_gc_free(interp, pf->dirp);
pf->dirp = NULL;
PackFile_Segment_destroy(interp, &pf->directory.base);
return;
@@ -1062,8 +1078,8 @@
/* Read in the UUID. We'll put it in a NULL-terminated string, just in
* case people use it that way. */
- header->uuid_data = (unsigned char *)
- mem_sys_allocate(header->uuid_size + 1);
+ header->uuid_data = mem_gc_allocate_n_typed(interp,
+ header->uuid_size + 1, unsigned char);
memcpy(header->uuid_data, packed + PACKFILE_HEADER_BYTES,
header->uuid_size);
@@ -1183,11 +1199,12 @@
PARROT_EXPORT
void
-PackFile_add_segment(SHIM_INTERP, ARGMOD(PackFile_Directory *dir),
+PackFile_add_segment(PARROT_INTERP, ARGMOD(PackFile_Directory *dir),
ARGIN(PackFile_Segment *seg))
{
ASSERT_ARGS(PackFile_add_segment)
- mem_realloc_n_typed(dir->segments, dir->num_segments+1, PackFile_Segment *);
+ dir->segments = mem_gc_realloc_n_typed_zeroed(interp, dir->segments,
+ dir->num_segments+1, dir->num_segments, PackFile_Segment *);
dir->segments[dir->num_segments] = seg;
dir->num_segments++;
seg->dir = dir;
@@ -1384,8 +1401,8 @@
PackFile_new(PARROT_INTERP, INTVAL is_mapped)
{
ASSERT_ARGS(PackFile_new)
- PackFile * const pf = mem_allocate_zeroed_typed(PackFile);
- pf->header = mem_allocate_zeroed_typed(PackFile_Header);
+ PackFile * const pf = mem_gc_allocate_zeroed_typed(interp, PackFile);
+ pf->header = mem_gc_allocate_zeroed_typed(interp, PackFile_Header);
pf->is_mmap_ped = is_mapped;
pf->options = PFOPT_NONE;
@@ -1462,8 +1479,8 @@
/*
-=item C<static const opcode_t * default_unpack(PackFile_Segment *self, const
-opcode_t *cursor)>
+=item C<static const opcode_t * default_unpack(PARROT_INTERP, PackFile_Segment
+*self, const opcode_t *cursor)>
Unpacks a PackFile given a cursor into PBC. This is the default unpack.
@@ -1474,7 +1491,7 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
static const opcode_t *
-default_unpack(ARGMOD(PackFile_Segment *self), ARGIN(const opcode_t *cursor))
+default_unpack(PARROT_INTERP, ARGMOD(PackFile_Segment *self), ARGIN(const opcode_t *cursor))
{
ASSERT_ARGS(default_unpack)
DECL_CONST_CAST_OF(opcode_t);
@@ -1503,7 +1520,7 @@
}
/* else allocate mem */
- self->data = mem_allocate_n_typed(self->size, opcode_t);
+ self->data = mem_gc_allocate_n_typed(interp, self->size, opcode_t);
if (!self->data) {
Parrot_io_eprintf(NULL, "PackFile_unpack: Unable to allocate data memory!\n");
@@ -1801,7 +1818,7 @@
(f)(interp, self);
/* destroy self after specific */
- default_destroy(self);
+ default_destroy(interp, self);
}
@@ -1917,7 +1934,7 @@
PackFile * const pf = self->pf;
#endif
- cursor = default_unpack(self, cursor);
+ cursor = default_unpack(interp, self, cursor);
if (!cursor)
return NULL;
@@ -1980,11 +1997,11 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static PackFile_Segment *
-directory_new(SHIM_INTERP, SHIM(PackFile *pf), SHIM(STRING *name), SHIM(int add))
+directory_new(PARROT_INTERP, SHIM(PackFile *pf), SHIM(STRING *name), SHIM(int add))
{
ASSERT_ARGS(directory_new)
- return (PackFile_Segment *)mem_allocate_zeroed_typed(PackFile_Directory);
+ return (PackFile_Segment *)mem_gc_allocate_zeroed_typed(interp, PackFile_Directory);
}
@@ -2055,7 +2072,8 @@
PARROT_ASSERT(pf);
dir->num_segments = PF_fetch_opcode(pf, &cursor);
TRACE_PRINTF(("directory_unpack: %ld num_segments\n", dir->num_segments));
- mem_realloc_n_typed(dir->segments, dir->num_segments, PackFile_Segment *);
+ dir->segments = mem_gc_allocate_n_zeroed_typed(interp,
+ dir->num_segments, PackFile_Segment *);
for (i = 0; i < dir->num_segments; i++) {
PackFile_Segment *seg;
@@ -2071,13 +2089,13 @@
TRACE_PRINTF_VAL(("Segment type %d.\n", type));
/* get name */
- buf = PF_fetch_cstring(pf, &cursor);
+ buf = PF_fetch_cstring(interp, pf, &cursor);
TRACE_PRINTF_VAL(("Segment name \"%s\".\n", name));
/* create it */
name = Parrot_str_new(interp, buf, strlen(buf));
seg = PackFile_Segment_new_seg(interp, dir, type, name, 0);
- mem_sys_free(buf);
+ mem_gc_free(interp, buf);
seg->file_offset = PF_fetch_opcode(pf, &cursor);
TRACE_PRINTF_VAL(("Segment file_offset %ld.\n", seg->file_offset));
@@ -2219,7 +2237,7 @@
}
if (dir->segments) {
- mem_sys_free(dir->segments);
+ mem_gc_free(interp, dir->segments);
dir->segments = NULL;
dir->num_segments = 0;
}
@@ -2458,10 +2476,10 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
PackFile_Segment *
-PackFile_Segment_new(SHIM_INTERP, SHIM(PackFile *pf), SHIM(STRING *name), SHIM(int add))
+PackFile_Segment_new(PARROT_INTERP, SHIM(PackFile *pf), SHIM(STRING *name), SHIM(int add))
{
ASSERT_ARGS(PackFile_Segment_new)
- PackFile_Segment * const seg = mem_allocate_typed(PackFile_Segment);
+ PackFile_Segment * const seg = mem_gc_allocate_zeroed_typed(interp, PackFile_Segment);
return seg;
}
@@ -2478,7 +2496,7 @@
=over 4
-=item C<static void default_destroy(PackFile_Segment *self)>
+=item C<static void default_destroy(PARROT_INTERP, PackFile_Segment *self)>
The default destroy function. Destroys a PackFile_Segment.
@@ -2487,15 +2505,15 @@
*/
static void
-default_destroy(ARGMOD(PackFile_Segment *self))
+default_destroy(PARROT_INTERP, ARGMOD(PackFile_Segment *self))
{
ASSERT_ARGS(default_destroy)
if (!self->pf->is_mmap_ped && self->data) {
- mem_sys_free(self->data);
+ mem_gc_free(interp, self->data);
self->data = NULL;
}
- mem_sys_free(self);
+ mem_gc_free(interp, self);
}
@@ -2576,7 +2594,7 @@
byte_code->prederef.code = NULL;
if (byte_code->prederef.branches) {
- mem_sys_free(byte_code->prederef.branches);
+ mem_gc_free(interp, byte_code->prederef.branches);
byte_code->prederef.branches = NULL;
}
}
@@ -2601,10 +2619,10 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static PackFile_Segment *
-byte_code_new(SHIM_INTERP, SHIM(PackFile *pf), SHIM(STRING *name), SHIM(int add))
+byte_code_new(PARROT_INTERP, SHIM(PackFile *pf), SHIM(STRING *name), SHIM(int add))
{
ASSERT_ARGS(byte_code_new)
- PackFile_ByteCode * const byte_code = mem_allocate_zeroed_typed(PackFile_ByteCode);
+ PackFile_ByteCode * const byte_code = mem_gc_allocate_zeroed_typed(interp, PackFile_ByteCode);
return (PackFile_Segment *) byte_code;
}
@@ -2627,7 +2645,7 @@
*/
static void
-pf_debug_destroy(SHIM_INTERP, ARGMOD(PackFile_Segment *self))
+pf_debug_destroy(PARROT_INTERP, ARGMOD(PackFile_Segment *self))
{
ASSERT_ARGS(pf_debug_destroy)
PackFile_Debug * const debug = (PackFile_Debug *) self;
@@ -2635,10 +2653,10 @@
/* Free each mapping. */
for (i = 0; i < debug->num_mappings; i++)
- mem_sys_free(debug->mappings[i]);
+ mem_gc_free(interp, debug->mappings[i]);
/* Free mappings pointer array. */
- mem_sys_free(debug->mappings);
+ mem_gc_free(interp, debug->mappings);
debug->mappings = NULL;
debug->num_mappings = 0;
}
@@ -2659,12 +2677,13 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static PackFile_Segment *
-pf_debug_new(SHIM_INTERP, SHIM(PackFile *pf), SHIM(STRING *name), SHIM(int add))
+pf_debug_new(PARROT_INTERP, SHIM(PackFile *pf), SHIM(STRING *name), SHIM(int add))
{
ASSERT_ARGS(pf_debug_new)
- PackFile_Debug * const debug = mem_allocate_zeroed_typed(PackFile_Debug);
+ PackFile_Debug * const debug = mem_gc_allocate_zeroed_typed(interp, PackFile_Debug);
- debug->mappings = mem_allocate_typed(PackFile_DebugFilenameMapping *);
+ debug->mappings = mem_gc_allocate_zeroed_typed(interp,
+ PackFile_DebugFilenameMapping *);
debug->mappings[0] = NULL;
return (PackFile_Segment *)debug;
@@ -2760,14 +2779,14 @@
debug->num_mappings = PF_fetch_opcode(self->pf, &cursor);
/* Allocate space for mappings vector. */
- mem_realloc_n_typed(debug->mappings, debug->num_mappings + 1,
- PackFile_DebugFilenameMapping *);
+ debug->mappings = mem_gc_allocate_n_zeroed_typed(interp,
+ debug->num_mappings + 1, PackFile_DebugFilenameMapping *);
/* Read in each mapping. */
for (i = 0; i < debug->num_mappings; i++) {
/* Allocate struct and get offset and filename type. */
debug->mappings[i] =
- mem_allocate_typed(PackFile_DebugFilenameMapping);
+ mem_gc_allocate_zeroed_typed(interp, PackFile_DebugFilenameMapping);
debug->mappings[i]->offset = PF_fetch_opcode(self->pf, &cursor);
debug->mappings[i]->filename = PF_fetch_opcode(self->pf, &cursor);
}
@@ -2849,7 +2868,7 @@
/* it exists already, resize it */
if (cs->debugs) {
debug = cs->debugs;
- mem_realloc_n_typed(debug->base.data, size, opcode_t);
+ debug->base.data = mem_gc_realloc_n_typed(interp, debug->base.data, size, opcode_t);
}
/* create one */
else {
@@ -2865,7 +2884,7 @@
debug = (PackFile_Debug *)PackFile_Segment_new_seg(interp, dir,
PF_DEBUG_SEG, name, add);
- debug->base.data = mem_allocate_n_zeroed_typed(size, opcode_t);
+ debug->base.data = mem_gc_allocate_n_zeroed_typed(interp, size, opcode_t);
debug->code = cs;
cs->debugs = debug;
}
@@ -2910,8 +2929,9 @@
}
/* Allocate space for the extra entry. */
- mem_realloc_n_typed(debug->mappings, debug->num_mappings + 1,
- PackFile_DebugFilenameMapping *);
+ debug->mappings = mem_gc_realloc_n_typed(interp,
+ debug->mappings, debug->num_mappings + 1,
+ PackFile_DebugFilenameMapping *);
/* Can it just go on the end? */
if (debug->num_mappings == 0
@@ -2935,7 +2955,7 @@
{
/* Set up new entry and insert it. */
PackFile_DebugFilenameMapping *mapping =
- mem_allocate_typed(PackFile_DebugFilenameMapping);
+ mem_gc_allocate_zeroed_typed(interp, PackFile_DebugFilenameMapping);
STRING *namestr = Parrot_str_new_init(interp, filename, strlen(filename),
PARROT_DEFAULT_ENCODING, PARROT_DEFAULT_CHARSET, 0);
size_t count = ct->const_count;
@@ -2957,7 +2977,8 @@
/* Not found, create a new one */
PackFile_Constant *fnconst;
ct->const_count = ct->const_count + 1;
- mem_realloc_n_typed(ct->constants, ct->const_count, PackFile_Constant *);
+ ct->constants = mem_gc_realloc_n_typed_zeroed(interp, ct->constants,
+ ct->const_count, ct->const_count - 1, PackFile_Constant *);
fnconst = PackFile_Constant_new(interp);
fnconst->type = PFC_STRING;
@@ -3123,7 +3144,8 @@
&& VTABLE_isa(interp, old_const->u.key, _sub)) {
PMC *old_sub_pmc, *new_sub_pmc;
Parrot_Sub_attributes *old_sub, *new_sub;
- PackFile_Constant * const ret = mem_allocate_typed(PackFile_Constant);
+ PackFile_Constant * const ret = mem_gc_allocate_zeroed_typed(interp,
+ PackFile_Constant);
ret->type = old_const->type;
old_sub_pmc = old_const->u.key;
@@ -3189,7 +3211,8 @@
INTVAL const num_consts = ct->const_count;
INTVAL i;
- new_consts = mem_allocate_n_typed(num_consts, PackFile_Constant *);
+ new_consts = mem_gc_allocate_n_zeroed_typed(interp,
+ num_consts, PackFile_Constant *);
for (i = 0; i < num_consts; ++i)
new_consts[i] = clone_constant(interp, old_consts[i]);
@@ -3241,10 +3264,10 @@
for (j = 0; j < table->const_count; ++j) {
if (consts[j] != orig_consts[j])
- mem_sys_free(consts[j]);
+ mem_gc_free(interp, consts[j]);
}
- mem_sys_free(consts);
+ mem_gc_free(interp, consts);
bucket = bucket->next;
}
}
@@ -3283,15 +3306,15 @@
}
for (i = 0; i < self->fixup_count; i++) {
- mem_sys_free(self->fixups[i]->name);
+ mem_gc_free(interp, self->fixups[i]->name);
self->fixups[i]->name = NULL;
- mem_sys_free(self->fixups[i]);
+ mem_gc_free(interp, self->fixups[i]);
self->fixups[i] = NULL;
}
if (self->fixup_count) {
- mem_sys_free(self->fixups);
+ mem_gc_free(interp, self->fixups);
self->fixups = NULL;
}
@@ -3416,10 +3439,11 @@
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
static PackFile_Segment *
-fixup_new(SHIM_INTERP, SHIM(PackFile *pf), SHIM(STRING *name), SHIM(int add))
+fixup_new(PARROT_INTERP, SHIM(PackFile *pf), SHIM(STRING *name), SHIM(int add))
{
ASSERT_ARGS(fixup_new)
- PackFile_FixupTable * const fixup = mem_allocate_zeroed_typed(PackFile_FixupTable);
+ PackFile_FixupTable * const fixup = mem_gc_allocate_zeroed_typed(interp,
+ PackFile_FixupTable);
return (PackFile_Segment *) fixup;
}
@@ -3463,8 +3487,8 @@
self->fixup_count));
if (self->fixup_count) {
- self->fixups = (PackFile_FixupEntry **)mem_sys_allocate_zeroed(
- self->fixup_count * sizeof (PackFile_FixupEntry *));
+ self->fixups = mem_gc_allocate_n_zeroed_typed(interp,
+ self->fixup_count, PackFile_FixupEntry *);
if (!self->fixups) {
Parrot_io_eprintf(interp,
@@ -3478,14 +3502,14 @@
for (i = 0; i < self->fixup_count; i++) {
PackFile_FixupEntry * const entry =
self->fixups[i] =
- mem_allocate_typed(PackFile_FixupEntry);
+ mem_gc_allocate_zeroed_typed(interp, PackFile_FixupEntry);
entry->type = PF_fetch_opcode(pf, &cursor);
switch (entry->type) {
case enum_fixup_label:
case enum_fixup_sub:
- entry->name = PF_fetch_cstring(pf, &cursor);
+ entry->name = PF_fetch_cstring(interp, pf, &cursor);
entry->offset = PF_fetch_opcode(pf, &cursor);
TRACE_PRINTF_VAL(("PackFile_FixupTable_unpack(): type %d, "
"name %s, offset %ld\n",
@@ -3536,9 +3560,10 @@
}
i = self->fixup_count++;
- mem_realloc_n_typed(self->fixups, self->fixup_count, PackFile_FixupEntry *);
+ self->fixups = mem_gc_realloc_n_typed_zeroed(interp,
+ self->fixups, self->fixup_count, i, PackFile_FixupEntry *);
- self->fixups[i] = mem_allocate_typed(PackFile_FixupEntry);
+ self->fixups[i] = mem_gc_allocate_zeroed_typed(interp, PackFile_FixupEntry);
self->fixups[i]->type = type;
self->fixups[i]->name = mem_sys_strdup(label);
self->fixups[i]->offset = offs;
@@ -3638,7 +3663,7 @@
/* TODO make a hash of all fixups */
PackFile_Directory * const dir = interp->code->base.dir;
- PackFile_FixupEntry * const ep = mem_allocate_typed(PackFile_FixupEntry);
+ PackFile_FixupEntry * const ep = mem_gc_allocate_zeroed_typed(interp, PackFile_FixupEntry);
ep->type = type;
ep->name = name;
@@ -3680,7 +3705,7 @@
}
if (self->constants) {
- mem_sys_free(self->constants);
+ mem_gc_free(interp, self->constants);
self->constants = NULL;
}
@@ -3728,7 +3753,7 @@
if (self->const_count == 0)
return cursor;
- self->constants = mem_allocate_n_zeroed_typed(self->const_count,
+ self->constants = mem_gc_allocate_n_zeroed_typed(interp, self->const_count,
PackFile_Constant *);
if (!self->constants) {
@@ -3765,10 +3790,11 @@
PARROT_MALLOC
PARROT_CANNOT_RETURN_NULL
static PackFile_Segment *
-const_new(SHIM_INTERP, SHIM(PackFile *pf), SHIM(STRING *name), SHIM(int add))
+const_new(PARROT_INTERP, SHIM(PackFile *pf), SHIM(STRING *name), SHIM(int add))
{
ASSERT_ARGS(const_new)
- PackFile_ConstTable * const const_table = mem_allocate_zeroed_typed(PackFile_ConstTable);
+ PackFile_ConstTable * const const_table =
+ mem_gc_allocate_zeroed_typed(interp, PackFile_ConstTable);
return (PackFile_Segment *)const_table;
}
@@ -3815,10 +3841,11 @@
PARROT_MALLOC
PARROT_CANNOT_RETURN_NULL
PackFile_Constant *
-PackFile_Constant_new(SHIM_INTERP)
+PackFile_Constant_new(PARROT_INTERP)
{
ASSERT_ARGS(PackFile_Constant_new)
- PackFile_Constant * const self = mem_allocate_zeroed_typed(PackFile_Constant);
+ PackFile_Constant * const self = mem_gc_allocate_zeroed_typed(interp,
+ PackFile_Constant);
self->type = PFC_NONE;
@@ -3840,10 +3867,10 @@
PARROT_EXPORT
void
-PackFile_Constant_destroy(SHIM_INTERP, ARGMOD_NULLOK(PackFile_Constant *self))
+PackFile_Constant_destroy(PARROT_INTERP, ARGMOD_NULLOK(PackFile_Constant *self))
{
ASSERT_ARGS(PackFile_Constant_destroy)
- mem_sys_free(self);
+ mem_gc_free(interp, self);
}
@@ -3866,7 +3893,6 @@
{
ASSERT_ARGS(PackFile_Constant_pack_size)
PMC *component;
- STRING *image;
size_t packed_size;
switch (self->type) {
@@ -3890,13 +3916,8 @@
case PFC_PMC:
component = self->u.key; /* the pmc (Sub, ...) */
- /*
- * TODO create either
- * a) a frozen_size freeze entry or
- * b) change packout.c so that component size isn't needed
- */
- image = Parrot_freeze(interp, component);
- packed_size = PF_size_string(image);
+ packed_size =
+ PF_size_string(STRINGNULL) + Parrot_freeze_size(interp, component) / sizeof (opcode_t);
break;
default:
@@ -4059,11 +4080,11 @@
opcode_t op;
if (tail) {
- SETATTR_Key_next_key(interp, tail, constant_pmc_new(interp, pmc_enum));
+ SETATTR_Key_next_key(interp, tail, Parrot_pmc_new_constant(interp, pmc_enum));
GETATTR_Key_next_key(interp, tail, tail);
}
else
- head = tail = constant_pmc_new(interp, pmc_enum);
+ head = tail = Parrot_pmc_new_constant(interp, pmc_enum);
op = PF_fetch_opcode(pf, &cursor);
@@ -4115,14 +4136,15 @@
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PackFile_Segment *
-PackFile_Annotations_new(SHIM_INTERP, SHIM(struct PackFile *pf),
+PackFile_Annotations_new(PARROT_INTERP, SHIM(struct PackFile *pf),
SHIM(STRING *name), SHIM(int add))
{
ASSERT_ARGS(PackFile_Annotations_new)
/* Allocate annotations structure; create it all zeroed, and we will
* allocate memory for each of the arrays on demand. */
- PackFile_Annotations * const seg = mem_allocate_zeroed_typed(PackFile_Annotations);
+ PackFile_Annotations * const seg = mem_gc_allocate_zeroed_typed(interp,
+ PackFile_Annotations);
return (PackFile_Segment *) seg;
}
@@ -4138,7 +4160,7 @@
*/
void
-PackFile_Annotations_destroy(SHIM_INTERP, ARGMOD(PackFile_Segment *seg))
+PackFile_Annotations_destroy(PARROT_INTERP, ARGMOD(PackFile_Segment *seg))
{
ASSERT_ARGS(PackFile_Annotations_destroy)
PackFile_Annotations *self = (PackFile_Annotations *)seg;
@@ -4147,23 +4169,23 @@
/* Free any keys. */
if (self->keys) {
for (i = 0; i < self->num_keys; i++)
- mem_sys_free(self->keys[i]);
+ mem_gc_free(interp, self->keys[i]);
- mem_sys_free(self->keys);
+ mem_gc_free(interp, self->keys);
}
/* Free any groups. */
if (self->groups) {
for (i = 0; i < self->num_groups; i++)
- mem_sys_free(self->groups[i]);
- mem_sys_free(self->groups);
+ mem_gc_free(interp, self->groups[i]);
+ mem_gc_free(interp, self->groups);
}
/* Free any entries. */
if (self->entries) {
for (i = 0; i < self->num_entries; i++)
- mem_sys_free(self->entries[i]);
- mem_sys_free(self->entries);
+ mem_gc_free(interp, self->entries[i]);
+ mem_gc_free(interp, self->entries);
}
}
@@ -4277,11 +4299,12 @@
TRACE_PRINTF(("PackFile_Annotations_unpack: Unpacking %ld keys\n",
self->num_keys));
- self->keys = mem_allocate_n_typed(self->num_keys, PackFile_Annotations_Key *);
+ self->keys = mem_gc_allocate_n_zeroed_typed(interp,
+ self->num_keys, PackFile_Annotations_Key *);
for (i = 0; i < self->num_keys; i++) {
- PackFile_Annotations_Key * const key =
- self->keys[i] = mem_allocate_typed(PackFile_Annotations_Key);
+ PackFile_Annotations_Key * const key = self->keys[i] =
+ mem_gc_allocate_zeroed_typed(interp, PackFile_Annotations_Key);
key->name = PF_fetch_opcode(seg->pf, &cursor);
key->type = PF_fetch_opcode(seg->pf, &cursor);
TRACE_PRINTF_VAL(("PackFile_Annotations_unpack: key[%d]/%d name=%s type=%d\n",
@@ -4290,11 +4313,13 @@
/* Unpack groups. */
self->num_groups = PF_fetch_opcode(seg->pf, &cursor);
- self->groups = mem_allocate_n_typed(self->num_groups, PackFile_Annotations_Group *);
+ self->groups = mem_gc_allocate_n_zeroed_typed(interp,
+ self->num_groups, PackFile_Annotations_Group *);
for (i = 0; i < self->num_groups; i++) {
PackFile_Annotations_Group * const group =
- self->groups[i] = mem_allocate_typed(PackFile_Annotations_Group);
+ self->groups[i] = mem_gc_allocate_zeroed_typed(interp,
+ PackFile_Annotations_Group);
group->bytecode_offset = PF_fetch_opcode(seg->pf, &cursor);
group->entries_offset = PF_fetch_opcode(seg->pf, &cursor);
TRACE_PRINTF_VAL((
@@ -4305,10 +4330,12 @@
/* Unpack entries. */
self->num_entries = PF_fetch_opcode(seg->pf, &cursor);
- self->entries = mem_allocate_n_typed(self->num_entries, PackFile_Annotations_Entry *);
+ self->entries = mem_gc_allocate_n_zeroed_typed(interp,
+ self->num_entries, PackFile_Annotations_Entry *);
for (i = 0; i < self->num_entries; i++) {
PackFile_Annotations_Entry * const entry =
- self->entries[i] = mem_allocate_typed(PackFile_Annotations_Entry);
+ self->entries[i] = mem_gc_allocate_zeroed_typed(interp,
+ PackFile_Annotations_Entry);
entry->bytecode_offset = PF_fetch_opcode(seg->pf, &cursor);
entry->key = PF_fetch_opcode(seg->pf, &cursor);
entry->value = PF_fetch_opcode(seg->pf, &cursor);
@@ -4417,7 +4444,7 @@
*/
PARROT_EXPORT
void
-PackFile_Annotations_add_group(SHIM_INTERP, ARGMOD(PackFile_Annotations *self),
+PackFile_Annotations_add_group(PARROT_INTERP, ARGMOD(PackFile_Annotations *self),
opcode_t offset)
{
ASSERT_ARGS(PackFile_Annotations_add_group)
@@ -4425,15 +4452,16 @@
/* Allocate extra space for the group in the groups array. */
if (self->groups)
self->groups =
- (PackFile_Annotations_Group **)mem_sys_realloc(self->groups,
- (1 + self->num_groups) *
- sizeof (PackFile_Annotations_Group *));
+ self->groups = mem_gc_realloc_n_typed_zeroed(interp, self->groups,
+ 1 + self->num_groups, self->num_groups, PackFile_Annotations_Group *);
else
- self->groups = mem_allocate_n_typed(self->num_groups + 1, PackFile_Annotations_Group *);
+ self->groups = mem_gc_allocate_n_typed(interp,
+ 1 + self->num_groups, PackFile_Annotations_Group *);
/* Store details. */
self->groups[self->num_groups] =
- mem_allocate_typed(PackFile_Annotations_Group);
+ mem_gc_allocate_zeroed_typed(interp,
+ PackFile_Annotations_Group);
self->groups[self->num_groups]->bytecode_offset = offset;
self->groups[self->num_groups]->entries_offset = self->num_entries;
@@ -4480,15 +4508,14 @@
if (key_id == -1) {
/* We do have it. Add key entry. */
if (self->keys)
- self->keys =
- (PackFile_Annotations_Key **)mem_sys_realloc(self->keys,
- (1 + self->num_keys) *
- sizeof (PackFile_Annotations_Key *));
+ self->keys = mem_gc_realloc_n_typed_zeroed(interp, self->keys,
+ 1 + self->num_keys, self->num_keys, PackFile_Annotations_Key *);
else
- self->keys = mem_allocate_n_typed(self->num_keys + 1, PackFile_Annotations_Key *);
+ self->keys = mem_gc_allocate_n_typed(interp,
+ 1 + self->num_keys, PackFile_Annotations_Key *);
key_id = self->num_keys;
- self->keys[key_id] = mem_allocate_typed(PackFile_Annotations_Key);
+ self->keys[key_id] = mem_gc_allocate_typed(interp, PackFile_Annotations_Key);
self->num_keys++;
/* Populate it. */
@@ -4506,17 +4533,14 @@
/* Add annotations entry. */
if (self->entries)
- self->entries =
- (PackFile_Annotations_Entry **)mem_sys_realloc(self->entries,
- (1 + self->num_entries) *
- sizeof (PackFile_Annotations_Entry *));
+ self->entries = mem_gc_realloc_n_typed(interp, self->entries,
+ 1 + self->num_entries, PackFile_Annotations_Entry *);
else
- self->entries =
- mem_allocate_n_typed(self->num_entries + 1,
- PackFile_Annotations_Entry *);
+ self->entries = mem_gc_allocate_n_typed(interp,
+ 1 + self->num_entries, PackFile_Annotations_Entry *);
self->entries[self->num_entries] =
- mem_allocate_typed(PackFile_Annotations_Entry);
+ mem_gc_allocate_typed(interp, PackFile_Annotations_Entry);
self->entries[self->num_entries]->bytecode_offset = offset;
self->entries[self->num_entries]->key = key_id;
self->entries[self->num_entries]->value = value;
@@ -4547,16 +4571,16 @@
switch (type) {
case PF_ANNOTATION_KEY_TYPE_INT:
- result = pmc_new(interp, enum_class_Integer);
+ result = Parrot_pmc_new(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, result, value);
break;
case PF_ANNOTATION_KEY_TYPE_NUM:
- result = pmc_new(interp, enum_class_Float);
+ result = Parrot_pmc_new(interp, enum_class_Float);
VTABLE_set_number_native(interp, result,
PF_CONST(self->code, value)->u.number);
break;
default:
- result = pmc_new(interp, enum_class_String);
+ result = Parrot_pmc_new(interp, enum_class_String);
VTABLE_set_string_native(interp, result,
PF_CONST(self->code, value)->u.string);
}
@@ -4616,8 +4640,10 @@
if (key_id == -1) {
/* Look through entries, storing what we find by key and tracking those
* that we have values for. */
- opcode_t *latest_values = mem_allocate_n_zeroed_typed(self->num_keys, opcode_t);
- opcode_t *have_values = mem_allocate_n_zeroed_typed(self->num_keys, opcode_t);
+ opcode_t *latest_values = mem_gc_allocate_n_zeroed_typed(interp,
+ self->num_keys, opcode_t);
+ opcode_t *have_values = mem_gc_allocate_n_zeroed_typed(interp,
+ self->num_keys, opcode_t);
for (i = start_entry; i < self->num_entries; i++) {
if (self->entries[i]->bytecode_offset >= offset)
@@ -4628,7 +4654,7 @@
}
/* Create hash of values we have. */
- result = pmc_new(interp, enum_class_Hash);
+ result = Parrot_pmc_new(interp, enum_class_Hash);
for (i = 0; i < self->num_keys; i++) {
if (have_values[i]) {
@@ -4639,8 +4665,8 @@
}
}
- mem_sys_free(latest_values);
- mem_sys_free(have_values);
+ mem_gc_free(interp, latest_values);
+ mem_gc_free(interp, have_values);
}
else {
/* Look for latest applicable value of the key. */
@@ -4702,9 +4728,9 @@
Parrot_ex_throw_from_c_args(interp, NULL, 1,
"Unable to append PBC to the current directory");
- mem_sys_free(pf->header);
+ mem_gc_free(interp, pf->header);
pf->header = NULL;
- mem_sys_free(pf->dirp);
+ mem_gc_free(interp, pf->dirp);
pf->dirp = NULL;
}
Modified: branches/boehm_gc_2/src/packfile/pf_items.c
==============================================================================
--- branches/boehm_gc_2/src/packfile/pf_items.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/packfile/pf_items.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -1427,7 +1427,8 @@
/*
-=item C<char * PF_fetch_cstring(PackFile *pf, const opcode_t **cursor)>
+=item C<char * PF_fetch_cstring(PARROT_INTERP, PackFile *pf, const opcode_t
+**cursor)>
Fetches a cstring from bytecode and returns an allocated copy
@@ -1438,11 +1439,11 @@
PARROT_MALLOC
PARROT_CANNOT_RETURN_NULL
char *
-PF_fetch_cstring(ARGIN(PackFile *pf), ARGIN(const opcode_t **cursor))
+PF_fetch_cstring(PARROT_INTERP, ARGIN(PackFile *pf), ARGIN(const opcode_t **cursor))
{
ASSERT_ARGS(PF_fetch_cstring)
const size_t str_len = strlen((const char *)(*cursor)) + 1;
- char * const p = (char *)mem_sys_allocate(str_len);
+ char * const p = mem_gc_allocate_n_typed(interp, str_len, char);
const int wordsize = pf->header->wordsize;
TRACE_PRINTF(("PF_fetch_cstring(): size is %ld...\n", str_len));
Modified: branches/boehm_gc_2/src/pbc_dump.c
==============================================================================
--- branches/boehm_gc_2/src/pbc_dump.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pbc_dump.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -290,7 +290,7 @@
size = PackFile_pack_size(interp,
interp->code->base.pf) * sizeof (opcode_t);
- pack = (opcode_t*) mem_sys_allocate(size);
+ pack = (opcode_t*) Parrot_gc_allocate_memory_chunk(interp, size);
if (!pack) {
printf("out of mem\n");
exit(EXIT_FAILURE);
@@ -308,7 +308,7 @@
exit(EXIT_FAILURE);
}
fclose(fp);
- mem_sys_free(pack);
+ Parrot_gc_free_memory_chunk(interp, pack);
Parrot_exit(interp, 0);
}
Modified: branches/boehm_gc_2/src/pbc_merge.c
==============================================================================
--- branches/boehm_gc_2/src/pbc_merge.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pbc_merge.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -257,7 +257,7 @@
/* Read in program. Nabbed from Parrot_pbc_read. */
chunk_size = program_size > 0 ? program_size : 1024;
- program_code = (char *)mem_sys_allocate(chunk_size);
+ program_code = mem_gc_allocate_n_typed(interp, chunk_size, char);
wanted = program_size;
program_size = 0;
cursor = (char *)program_code;
@@ -267,8 +267,8 @@
if (program_size == wanted)
break;
chunk_size = 1024;
- program_code =
- (char *)mem_sys_realloc(program_code, program_size + chunk_size);
+ program_code = mem_gc_realloc_n_typed(interp, program_code,
+ program_size + chunk_size, char);
cursor = (char *)program_code + program_size;
}
@@ -314,7 +314,7 @@
{
ASSERT_ARGS(pbc_merge_bytecode)
int i;
- opcode_t *bc = mem_allocate_typed(opcode_t);
+ opcode_t *bc = mem_gc_allocate_typed(interp, opcode_t);
opcode_t cursor = 0;
/* Add a bytecode segment. */
@@ -340,7 +340,7 @@
}
/* Re-allocate the current buffer. */
- mem_realloc_n_typed(bc, cursor + in_seg->base.size, opcode_t);
+ bc = mem_gc_realloc_n_typed(interp, bc, cursor + in_seg->base.size, opcode_t);
/* Copy data and store cursor. */
memcpy(bc + cursor, in_seg->base.data,
@@ -378,7 +378,7 @@
ARGMOD(PackFile_ByteCode *bc))
{
ASSERT_ARGS(pbc_merge_constants)
- PackFile_Constant **constants = mem_allocate_typed(PackFile_Constant *);
+ PackFile_Constant **constants = mem_gc_allocate_typed(interp, PackFile_Constant *);
opcode_t cursor = 0;
opcode_t output_const_num = 0;
@@ -414,14 +414,15 @@
/* Allocate space for the constant list, provided we have some. */
if (in_seg->const_count > 0)
- constants = (PackFile_Constant **)mem_sys_realloc(constants,
- (cursor + in_seg->const_count) * sizeof (Parrot_Pointer));
+ constants = mem_gc_realloc_n_typed(interp, constants,
+ cursor + in_seg->const_count, PackFile_Constant*);
/* Loop over the constants and copy them to the output PBC. */
for (j = 0; j < in_seg->const_count; j++) {
/* Get the entry and allocate space for copy. */
PackFile_Constant *cur_entry = in_seg->constants[j];
- PackFile_Constant *copy = mem_allocate_typed(PackFile_Constant);
+ PackFile_Constant *copy = mem_gc_allocate_typed(interp,
+ PackFile_Constant);
STRUCT_COPY(copy, cur_entry);
/* If it's a sub PMC, need to deal with offsets. */
@@ -477,7 +478,8 @@
{
ASSERT_ARGS(pbc_merge_fixups)
PackFile_FixupTable *fixup_seg;
- PackFile_FixupEntry **fixups = mem_allocate_typed(PackFile_FixupEntry *);
+ PackFile_FixupEntry **fixups = mem_gc_allocate_typed(interp,
+ PackFile_FixupEntry *);
opcode_t cursor = 0;
int i, j;
@@ -503,8 +505,8 @@
/* Allocate space for these fixups, provided we have some. */
if (in_seg->fixup_count > 0) {
- fixups = (PackFile_FixupEntry **)mem_sys_realloc(fixups,
- (cursor + in_seg->fixup_count) * sizeof (Parrot_Pointer));
+ fixups = mem_gc_realloc_n_typed(interp, fixups,
+ cursor + in_seg->fixup_count, PackFile_FixupEntry*);
}
/* Loop over the fixups and copy them to the output PBC, correcting
@@ -512,10 +514,10 @@
for (j = 0; j < in_seg->fixup_count; j++) {
/* Get the entry and allocate space for copies. */
PackFile_FixupEntry *cur_entry = in_seg->fixups[j];
- PackFile_FixupEntry *copy = mem_allocate_typed(
- PackFile_FixupEntry);
- char *name_copy = (char *)mem_sys_allocate(
- strlen(cur_entry->name) + 1);
+ PackFile_FixupEntry *copy = mem_gc_allocate_typed(interp,
+ PackFile_FixupEntry);
+ char *name_copy = mem_gc_allocate_n_typed(interp,
+ strlen(cur_entry->name) + 1, char);
/* Copy type and name. */
copy->type = cur_entry->type;
@@ -564,9 +566,10 @@
{
ASSERT_ARGS(pbc_merge_debugs)
PackFile_Debug *debug_seg;
- opcode_t *lines = mem_allocate_typed(opcode_t);
+ opcode_t *lines = mem_gc_allocate_typed(interp,
+ opcode_t);
PackFile_DebugFilenameMapping **mappings =
- mem_allocate_typed(PackFile_DebugFilenameMapping *);
+ mem_gc_allocate_typed(interp, PackFile_DebugFilenameMapping *);
opcode_t num_mappings = 0;
opcode_t num_lines = 0;
@@ -580,19 +583,20 @@
PackFile_Debug *in_seg = inputs[i]->pf->cur_cs->debugs;
/* Concatenate line numbers. */
- lines = (opcode_t *)mem_sys_realloc(lines,
- (num_lines + in_seg->base.size) * sizeof (opcode_t));
+ lines = mem_gc_realloc_n_typed(interp, lines,
+ num_lines + in_seg->base.size, opcode_t);
memcpy(lines + num_lines, in_seg->base.data,
in_seg->base.size * sizeof (opcode_t));
/* Concatenate mappings. */
- mappings = (PackFile_DebugFilenameMapping **)mem_sys_realloc(mappings,
- (num_mappings + in_seg->num_mappings) *
- sizeof (Parrot_Pointer));
+ mappings = mem_gc_realloc_n_typed(interp, mappings,
+ num_mappings + in_seg->num_mappings,
+ PackFile_DebugFilenameMapping*);
+
for (j = 0; j < in_seg->num_mappings; j++) {
- PackFile_DebugFilenameMapping *mapping = mem_allocate_typed(
- PackFile_DebugFilenameMapping);
+ PackFile_DebugFilenameMapping *mapping = mem_gc_allocate_typed(
+ interp, PackFile_DebugFilenameMapping);
STRUCT_COPY(mapping, in_seg->mappings[j]);
mapping->offset += num_lines;
mapping->filename += inputs[i]->const_start;
@@ -607,9 +611,9 @@
with merged ones we have created. */
debug_seg = Parrot_new_debug_seg(interp, bc, num_lines);
PackFile_add_segment(interp, &pf->directory, (PackFile_Segment*)debug_seg);
- mem_sys_free(debug_seg->base.data);
+ mem_gc_free(interp, debug_seg->base.data);
debug_seg->base.data = lines;
- mem_sys_free(debug_seg->mappings);
+ mem_gc_free(interp, debug_seg->mappings);
debug_seg->mappings = mappings;
debug_seg->num_mappings = num_mappings;
@@ -738,7 +742,8 @@
PackFile_Segment *seg = (PackFile_Segment *)pf_dir->segments[j];
if (seg->type == PF_CONST_SEG) {
opcode_t const_count = ((PackFile_ConstTable *)seg)->const_count;
- inputs[i]->const_map = mem_allocate_n_typed(const_count, opcode_t);
+ inputs[i]->const_map = mem_gc_allocate_n_typed(interp,
+ const_count, opcode_t);
}
}
}
@@ -755,7 +760,7 @@
pbc_merge_ctpointers(interp, inputs, num_inputs, bc);
for (i = 0; i < num_inputs; i++) {
- mem_sys_free(inputs[i]->const_map);
+ mem_gc_free(interp, inputs[i]->const_map);
}
/* Return merged result. */
@@ -784,7 +789,7 @@
const size_t size = PackFile_pack_size(interp, pf) * sizeof (opcode_t);
/* Allocate memory. */
- opcode_t * const pack = (opcode_t*) mem_sys_allocate(size);
+ opcode_t * const pack = (opcode_t*) Parrot_gc_allocate_memory_chunk(interp, size);
/* Write and clean up. */
PackFile_pack(interp, pf, pack);
@@ -797,7 +802,7 @@
Parrot_exit(interp, 1);
}
fclose(fp);
- mem_sys_free(pack);
+ mem_gc_free(interp, pack);
}
@@ -858,12 +863,11 @@
/* Load each packfile that we are to merge and set up an input
structure for each of them. */
- input_files = (pbc_merge_input **)mem_sys_allocate(
- argc * sizeof (Parrot_Pointer));
+ input_files = mem_gc_allocate_n_typed(interp, argc, pbc_merge_input*);
for (i = 0; i < argc; i++) {
/* Allocate a struct. */
- input_files[i] = mem_allocate_typed(pbc_merge_input);
+ input_files[i] = mem_gc_allocate_typed(interp, pbc_merge_input);
/* Set filename */
input_files[i]->filename = *argv;
Modified: branches/boehm_gc_2/src/pmc.c
==============================================================================
--- branches/boehm_gc_2/src/pmc.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -46,7 +46,7 @@
__attribute__nonnull__(1);
PARROT_CANNOT_RETURN_NULL
-static PMC* pmc_reuse_no_init(PARROT_INTERP,
+static PMC* Parrot_pmc_reuse_noinit(PARROT_INTERP,
ARGIN(PMC *pmc),
INTVAL new_type,
SHIM(UINTVAL flags))
@@ -59,7 +59,7 @@
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_get_new_pmc_header __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_pmc_reuse_no_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+#define ASSERT_ARGS_Parrot_pmc_reuse_noinit __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(pmc))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
@@ -72,7 +72,7 @@
/*
-=item C<INTVAL PMC_is_null(PARROT_INTERP, const PMC *pmc)>
+=item C<INTVAL Parrot_pmc_is_null(PARROT_INTERP, const PMC *pmc)>
Tests if the given pmc is null.
@@ -82,9 +82,9 @@
PARROT_EXPORT
INTVAL
-PMC_is_null(SHIM_INTERP, ARGIN_NULLOK(const PMC *pmc))
+Parrot_pmc_is_null(SHIM_INTERP, ARGIN_NULLOK(const PMC *pmc))
{
- ASSERT_ARGS(PMC_is_null)
+ ASSERT_ARGS(Parrot_pmc_is_null)
#if PARROT_CATCH_NULL
return pmc == PMCNULL || pmc == NULL;
#else
@@ -135,7 +135,7 @@
/*
-=item C<PMC * pmc_new(PARROT_INTERP, INTVAL base_type)>
+=item C<PMC * Parrot_pmc_new(PARROT_INTERP, INTVAL base_type)>
Creates a new PMC of type C<base_type> (which is an index into the list of PMC
types declared in C<vtables> in F<include/parrot/pmc.h>). Once the PMC has been
@@ -150,9 +150,9 @@
PARROT_CANNOT_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
PMC *
-pmc_new(PARROT_INTERP, INTVAL base_type)
+Parrot_pmc_new(PARROT_INTERP, INTVAL base_type)
{
- ASSERT_ARGS(pmc_new)
+ ASSERT_ARGS(Parrot_pmc_new)
PARROT_ASSERT(interp->vtables[base_type]);
{
PMC *const classobj = interp->vtables[base_type]->pmc_class;
@@ -169,7 +169,7 @@
/*
-=item C<PMC * pmc_reuse(PARROT_INTERP, PMC *pmc, INTVAL new_type, UINTVAL
+=item C<PMC * Parrot_pmc_reuse(PARROT_INTERP, PMC *pmc, INTVAL new_type, UINTVAL
flags)>
Reuse an existing PMC, turning it into an empty PMC of the new type. Any
@@ -188,11 +188,11 @@
PARROT_CANNOT_RETURN_NULL
PARROT_IGNORABLE_RESULT
PMC *
-pmc_reuse(PARROT_INTERP, ARGIN(PMC *pmc), INTVAL new_type,
- UINTVAL flags)
+Parrot_pmc_reuse(PARROT_INTERP, ARGIN(PMC *pmc), INTVAL new_type,
+ UINTVAL flags)
{
- ASSERT_ARGS(pmc_reuse)
- pmc = pmc_reuse_no_init(interp, pmc, new_type, flags);
+ ASSERT_ARGS(Parrot_pmc_reuse)
+ pmc = Parrot_pmc_reuse_noinit(interp, pmc, new_type, flags);
/* Call the base init for the redone pmc. Warning, this should not
be called on Object PMCs. */
@@ -203,8 +203,8 @@
/*
-=item C<PMC * pmc_reuse_init(PARROT_INTERP, PMC *pmc, INTVAL new_type, PMC
-*init, UINTVAL flags)>
+=item C<PMC * Parrot_pmc_reuse_init(PARROT_INTERP, PMC *pmc, INTVAL new_type,
+PMC *init, UINTVAL flags)>
Reuse an existing PMC, turning it into an PMC of the new type. Any
required internal structure will be put in place (such as the extension area)
@@ -222,11 +222,11 @@
PARROT_CANNOT_RETURN_NULL
PARROT_IGNORABLE_RESULT
PMC *
-pmc_reuse_init(PARROT_INTERP, ARGIN(PMC *pmc), INTVAL new_type, ARGIN(PMC *init),
+Parrot_pmc_reuse_init(PARROT_INTERP, ARGIN(PMC *pmc), INTVAL new_type, ARGIN(PMC *init),
UINTVAL flags)
{
- ASSERT_ARGS(pmc_reuse_init)
- pmc = pmc_reuse_no_init(interp, pmc, new_type, flags);
+ ASSERT_ARGS(Parrot_pmc_reuse_init)
+ pmc = Parrot_pmc_reuse_noinit(interp, pmc, new_type, flags);
/* Call the base init for the redone pmc. Warning, this should not
be called on Object PMCs. */
@@ -237,8 +237,8 @@
/*
-=item C<static PMC* pmc_reuse_no_init(PARROT_INTERP, PMC *pmc, INTVAL new_type,
-UINTVAL flags)>
+=item C<static PMC* Parrot_pmc_reuse_noinit(PARROT_INTERP, PMC *pmc, INTVAL
+new_type, UINTVAL flags)>
Prepare pmc for reuse. Do all scuffolding except initing.
@@ -247,10 +247,10 @@
*/
PARROT_CANNOT_RETURN_NULL
static PMC*
-pmc_reuse_no_init(PARROT_INTERP, ARGIN(PMC *pmc), INTVAL new_type,
+Parrot_pmc_reuse_noinit(PARROT_INTERP, ARGIN(PMC *pmc), INTVAL new_type,
SHIM(UINTVAL flags)) {
- ASSERT_ARGS(pmc_reuse_no_init)
+ ASSERT_ARGS(Parrot_pmc_reuse_noinit)
VTABLE *new_vtable;
INTVAL has_ext, new_flags = 0;
@@ -281,8 +281,8 @@
/*
-=item C<PMC * pmc_reuse_by_class(PARROT_INTERP, PMC *pmc, PMC *class_, UINTVAL
-flags)>
+=item C<PMC * Parrot_pmc_reuse_by_class(PARROT_INTERP, PMC *pmc, PMC *class_,
+UINTVAL flags)>
Reuse an existing PMC. Convert it to the type specified by the given Class
PMC. At the moment, this means we can only use this function to reuse PMCs
@@ -297,10 +297,10 @@
PARROT_CANNOT_RETURN_NULL
PARROT_IGNORABLE_RESULT
PMC *
-pmc_reuse_by_class(PARROT_INTERP, ARGMOD(PMC *pmc), ARGIN(PMC *class_),
+Parrot_pmc_reuse_by_class(PARROT_INTERP, ARGMOD(PMC *pmc), ARGIN(PMC *class_),
UINTVAL flags)
{
- ASSERT_ARGS(pmc_reuse_by_class)
+ ASSERT_ARGS(Parrot_pmc_reuse_by_class)
const INTVAL new_type = PARROT_CLASS(class_)->id;
VTABLE * const new_vtable = interp->vtables[new_type];
INTVAL new_flags = flags;
@@ -466,11 +466,11 @@
/*
-=item C<PMC * pmc_new_noinit(PARROT_INTERP, INTVAL base_type)>
+=item C<PMC * Parrot_pmc_new_noinit(PARROT_INTERP, INTVAL base_type)>
Creates a new PMC of type C<base_type> (which is an index into the list of PMC
-types declared in C<vtables> in F<include/parrot/pmc.h>). Unlike C<pmc_new()>,
-C<pmc_new_noinit()> does not call its C<init> method. This allows separate
+types declared in C<vtables> in F<include/parrot/pmc.h>). Unlike C<Parrot_pmc_new()>,
+C<Parrot_pmc_new_noinit()> does not call its C<init> method. This allows separate
allocation and initialization for continuations.
=cut
@@ -480,9 +480,9 @@
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PMC *
-pmc_new_noinit(PARROT_INTERP, INTVAL base_type)
+Parrot_pmc_new_noinit(PARROT_INTERP, INTVAL base_type)
{
- ASSERT_ARGS(pmc_new_noinit)
+ ASSERT_ARGS(Parrot_pmc_new_noinit)
PMC *const classobj = interp->vtables[base_type]->pmc_class;
if (!PMC_IS_NULL(classobj) && PObj_is_class_TEST(classobj))
@@ -494,7 +494,7 @@
/*
-=item C<PMC * constant_pmc_new_noinit(PARROT_INTERP, INTVAL base_type)>
+=item C<PMC * Parrot_pmc_new_constant_noinit(PARROT_INTERP, INTVAL base_type)>
Creates a new constant PMC of type C<base_type>.
@@ -505,16 +505,16 @@
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PMC *
-constant_pmc_new_noinit(PARROT_INTERP, INTVAL base_type)
+Parrot_pmc_new_constant_noinit(PARROT_INTERP, INTVAL base_type)
{
- ASSERT_ARGS(constant_pmc_new_noinit)
+ ASSERT_ARGS(Parrot_pmc_new_constant_noinit)
return get_new_pmc_header(interp, base_type, PObj_constant_FLAG);
}
/*
-=item C<PMC * constant_pmc_new(PARROT_INTERP, INTVAL base_type)>
+=item C<PMC * Parrot_pmc_new_constant(PARROT_INTERP, INTVAL base_type)>
Creates a new constant PMC of type C<base_type>, then calls its C<init>.
@@ -525,9 +525,9 @@
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PMC *
-constant_pmc_new(PARROT_INTERP, INTVAL base_type)
+Parrot_pmc_new_constant(PARROT_INTERP, INTVAL base_type)
{
- ASSERT_ARGS(constant_pmc_new)
+ ASSERT_ARGS(Parrot_pmc_new_constant)
PMC * const pmc = get_new_pmc_header(interp, base_type, PObj_constant_FLAG);
VTABLE_init(interp, pmc);
return pmc;
@@ -536,9 +536,9 @@
/*
-=item C<PMC * pmc_new_init(PARROT_INTERP, INTVAL base_type, PMC *init)>
+=item C<PMC * Parrot_pmc_new_init(PARROT_INTERP, INTVAL base_type, PMC *init)>
-As C<pmc_new()>, but passes C<init> to the PMC's C<init_pmc()> vtable entry.
+As C<Parrot_pmc_new()>, but passes C<init> to the PMC's C<init_pmc()> vtable entry.
=cut
@@ -547,9 +547,9 @@
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PMC *
-pmc_new_init(PARROT_INTERP, INTVAL base_type, ARGOUT(PMC *init))
+Parrot_pmc_new_init(PARROT_INTERP, INTVAL base_type, ARGOUT(PMC *init))
{
- ASSERT_ARGS(pmc_new_init)
+ ASSERT_ARGS(Parrot_pmc_new_init)
PMC *const classobj = interp->vtables[base_type]->pmc_class;
if (!PMC_IS_NULL(classobj) && PObj_is_class_TEST(classobj))
@@ -564,9 +564,10 @@
/*
-=item C<PMC * constant_pmc_new_init(PARROT_INTERP, INTVAL base_type, PMC *init)>
+=item C<PMC * Parrot_pmc_new_constant_init(PARROT_INTERP, INTVAL base_type, PMC
+*init)>
-As C<constant_pmc_new>, but passes C<init> to the PMC's C<init_pmc> vtable
+As C<Parrot_pmc_new_constant>, but passes C<init> to the PMC's C<init_pmc> vtable
entry.
=cut
@@ -576,9 +577,9 @@
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PMC *
-constant_pmc_new_init(PARROT_INTERP, INTVAL base_type, ARGIN_NULLOK(PMC *init))
+Parrot_pmc_new_constant_init(PARROT_INTERP, INTVAL base_type, ARGIN_NULLOK(PMC *init))
{
- ASSERT_ARGS(constant_pmc_new_init)
+ ASSERT_ARGS(Parrot_pmc_new_constant_init)
PMC * const pmc = get_new_pmc_header(interp, base_type, PObj_constant_FLAG);
VTABLE_init_pmc(interp, pmc, init);
return pmc;
@@ -587,7 +588,7 @@
/*
-=item C<PMC * temporary_pmc_new(PARROT_INTERP, INTVAL base_type)>
+=item C<PMC * Parrot_pmc_new_temporary(PARROT_INTERP, INTVAL base_type)>
Creates a new temporary PMC of type C<base_type>, then call C<init>. Cannot
be used to create PMC Objects which have been defined from PIR.
@@ -602,11 +603,11 @@
If you don't know what this means means, or you can't tell if either case
will happen as the result of any call you make on or with this PMC,
B<DO NOT> use this function, lest you cause weird crashes and memory errors.
-Use C<pmc_new()> instead.
+Use C<Parrot_pmc_new()> instead.
(Why do these functions even exist? Used judiciously, they can reduce GC
pressure in hotspots tremendously. If you haven't audited the code carefully
--- including profiling and benchmarking -- then use C<pmc_new()> instead, and
+-- including profiling and benchmarking -- then use C<Parrot_pmc_new()> instead, and
never B<ever> add C<PARROT_EXPORT> to either function.)
=cut
@@ -615,9 +616,9 @@
PARROT_CANNOT_RETURN_NULL
PMC *
-temporary_pmc_new(PARROT_INTERP, INTVAL base_type)
+Parrot_pmc_new_temporary(PARROT_INTERP, INTVAL base_type)
{
- ASSERT_ARGS(temporary_pmc_new)
+ ASSERT_ARGS(Parrot_pmc_new_temporary)
PMC * const pmc = get_new_pmc_header(interp, base_type, PObj_constant_FLAG);
VTABLE_init(interp, pmc);
return pmc;
@@ -626,11 +627,11 @@
/*
-=item C<void temporary_pmc_free(PARROT_INTERP, PMC *pmc)>
+=item C<void Parrot_pmc_free_temporary(PARROT_INTERP, PMC *pmc)>
-Frees a new temporary PMC created by C<temporary_pmc_new()>. Do not call
+Frees a new temporary PMC created by C<temporary_Parrot_pmc_new()>. Do not call
this with any other type of PMC. Do not forget to call this (or you'll leak
-PMCs). Read and I<understand> the warnings for C<temporary_pmc_new()> before
+PMCs). Read and I<understand> the warnings for C<temporary_Parrot_pmc_new()> before
you're tempted to use this.
=cut
@@ -638,16 +639,16 @@
*/
void
-temporary_pmc_free(PARROT_INTERP, ARGMOD(PMC *pmc))
+Parrot_pmc_free_temporary(PARROT_INTERP, ARGMOD(PMC *pmc))
{
- ASSERT_ARGS(temporary_pmc_free)
+ ASSERT_ARGS(Parrot_pmc_free_temporary)
Parrot_gc_free_pmc_header(interp, pmc);
}
/*
-=item C<INTVAL get_new_vtable_index(PARROT_INTERP)>
+=item C<INTVAL Parrot_pmc_get_new_vtable_index(PARROT_INTERP)>
Get a new unique identifier number and allocate a new vtable structure for a
new PMC type.
@@ -657,9 +658,9 @@
*/
INTVAL
-get_new_vtable_index(PARROT_INTERP)
+Parrot_pmc_get_new_vtable_index(PARROT_INTERP)
{
- ASSERT_ARGS(get_new_vtable_index)
+ ASSERT_ARGS(Parrot_pmc_get_new_vtable_index)
const INTVAL type_id = interp->n_vtable_max++;
/* Have we overflowed the table? */
@@ -671,7 +672,7 @@
/*
-=item C<INTVAL pmc_register(PARROT_INTERP, STRING *name)>
+=item C<INTVAL Parrot_pmc_register_new_type(PARROT_INTERP, STRING *name)>
Registers the name of a new PMC type with Parrot, returning the INTVAL
representing that type.
@@ -682,12 +683,12 @@
PARROT_EXPORT
INTVAL
-pmc_register(PARROT_INTERP, ARGIN(STRING *name))
+Parrot_pmc_register_new_type(PARROT_INTERP, ARGIN(STRING *name))
{
- ASSERT_ARGS(pmc_register)
+ ASSERT_ARGS(Parrot_pmc_register_new_type)
/* If they're looking to register an existing class, return that
class' type number */
- INTVAL type = pmc_type(interp, name);
+ INTVAL type = Parrot_pmc_get_type_str(interp, name);
if (type > enum_type_undef)
return type;
@@ -696,7 +697,7 @@
Parrot_ex_throw_from_c_args(interp, NULL, 1,
"undefined type already exists - can't register PMC");
- type = get_new_vtable_index(interp);
+ type = Parrot_pmc_get_new_vtable_index(interp);
/* set entry in name->type hash */
VTABLE_set_integer_keyed_str(interp, interp->class_hash, name, type);
@@ -707,7 +708,7 @@
/*
-=item C<INTVAL pmc_type(PARROT_INTERP, STRING *name)>
+=item C<INTVAL Parrot_pmc_get_type_str(PARROT_INTERP, STRING *name)>
Returns the PMC type for C<name>.
@@ -718,9 +719,9 @@
PARROT_EXPORT
PARROT_WARN_UNUSED_RESULT
INTVAL
-pmc_type(PARROT_INTERP, ARGIN_NULLOK(STRING *name))
+Parrot_pmc_get_type_str(PARROT_INTERP, ARGIN_NULLOK(STRING *name))
{
- ASSERT_ARGS(pmc_type)
+ ASSERT_ARGS(Parrot_pmc_get_type_str)
if (!name)
return enum_type_undef;
else {
@@ -743,7 +744,7 @@
/*
-=item C<INTVAL pmc_type_p(PARROT_INTERP, PMC *name)>
+=item C<INTVAL Parrot_pmc_get_type(PARROT_INTERP, PMC *name)>
Returns the PMC type for C<name>.
@@ -753,9 +754,9 @@
PARROT_EXPORT
INTVAL
-pmc_type_p(PARROT_INTERP, ARGIN(PMC *name))
+Parrot_pmc_get_type(PARROT_INTERP, ARGIN(PMC *name))
{
- ASSERT_ARGS(pmc_type_p)
+ ASSERT_ARGS(Parrot_pmc_get_type)
PMC * const classname_hash = interp->class_hash;
PMC * item;
@@ -813,7 +814,7 @@
/*
-=item C<void Parrot_create_mro(PARROT_INTERP, INTVAL type)>
+=item C<void Parrot_pmc_create_mro(PARROT_INTERP, INTVAL type)>
Create the MRO (method resolution order) array for this type.
@@ -823,9 +824,9 @@
PARROT_EXPORT
void
-Parrot_create_mro(PARROT_INTERP, INTVAL type)
+Parrot_pmc_create_mro(PARROT_INTERP, INTVAL type)
{
- ASSERT_ARGS(Parrot_create_mro)
+ ASSERT_ARGS(Parrot_pmc_create_mro)
PMC *_class, *mro;
VTABLE *vtable = interp->vtables[type];
PMC *mro_list = vtable->mro;
@@ -838,7 +839,7 @@
if (mro_list->vtable->base_type != enum_class_ResizableStringArray)
return;
- mro = pmc_new(interp, enum_class_ResizablePMCArray);
+ mro = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
vtable->mro = mro;
if (vtable->ro_variant_vtable)
@@ -848,7 +849,7 @@
for (i = 0; i < count; ++i) {
STRING *class_name = VTABLE_get_string_keyed_int(interp, mro_list, i);
- INTVAL parent_type = pmc_type(interp, class_name);
+ INTVAL parent_type = Parrot_pmc_get_type_str(interp, class_name);
/* abstract classes don't have a vtable */
if (!parent_type)
@@ -858,7 +859,7 @@
if (!vtable->_namespace) {
/* need a namespace Hash, anchor at parent, name it */
- PMC * const ns = pmc_new(interp,
+ PMC * const ns = Parrot_pmc_new(interp,
Parrot_get_ctx_HLL_type(interp, enum_class_NameSpace));
vtable->_namespace = ns;
@@ -884,7 +885,7 @@
=over 4
-=item C<void gc_register_pmc(PARROT_INTERP, PMC *pmc)>
+=item C<void Parrot_pmc_gc_register(PARROT_INTERP, PMC *pmc)>
Registers the PMC with the interpreter's GC registry.
@@ -894,9 +895,9 @@
PARROT_EXPORT
void
-gc_register_pmc(PARROT_INTERP, ARGIN(PMC *pmc))
+Parrot_pmc_gc_register(PARROT_INTERP, ARGIN(PMC *pmc))
{
- ASSERT_ARGS(gc_register_pmc)
+ ASSERT_ARGS(Parrot_pmc_gc_register)
/* Better not trigger a GC run with a potentially unanchored PMC */
Parrot_block_GC_mark(interp);
@@ -906,10 +907,9 @@
Parrot_unblock_GC_mark(interp);
}
-
/*
-=item C<void gc_unregister_pmc(PARROT_INTERP, PMC *pmc)>
+=item C<void Parrot_pmc_gc_unregister(PARROT_INTERP, PMC *pmc)>
Unregisters the PMC from the interpreter's GC registry.
@@ -919,15 +919,14 @@
PARROT_EXPORT
void
-gc_unregister_pmc(PARROT_INTERP, ARGIN(PMC *pmc))
+Parrot_pmc_gc_unregister(PARROT_INTERP, ARGIN(PMC *pmc))
{
- ASSERT_ARGS(gc_unregister_pmc)
+ ASSERT_ARGS(Parrot_pmc_gc_unregister)
PARROT_ASSERT(interp->gc_registry);
VTABLE_delete_keyed(interp, interp->gc_registry, pmc);
}
-
/*
=back
@@ -947,7 +946,6 @@
*/
-
/*
* Local variables:
* c-file-style: "parrot"
Modified: branches/boehm_gc_2/src/pmc/arrayiterator.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/arrayiterator.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/arrayiterator.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -128,7 +128,7 @@
GET_ATTR_pos(interp, SELF, pos);
GET_ATTR_reverse(interp, SELF, reverse);
- clone = pmc_new_init(INTERP, enum_class_ArrayIterator, array);
+ clone = Parrot_pmc_new_init(INTERP, enum_class_ArrayIterator, array);
SET_ATTR_pos(interp, clone, pos);
SET_ATTR_reverse(interp, clone, reverse);
Modified: branches/boehm_gc_2/src/pmc/bigint.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/bigint.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/bigint.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2004-2009, Parrot Foundation.
+Copyright (C) 2004-2010, Parrot Foundation.
$Id$
=head1 NAME
@@ -37,7 +37,7 @@
static void
bigint_init(PARROT_INTERP, PMC *self) {
- BIGINT * const bi = mem_allocate_zeroed_typed(BIGINT);
+ BIGINT * const bi = mem_gc_allocate_zeroed_typed(interp, BIGINT);
SETATTR_BigInt_bi(interp, self, bi);
mpz_init(bi->b);
}
@@ -47,7 +47,7 @@
BIGINT * bi;
GETATTR_BigInt_bi(interp, self, bi);
mpz_clear(bi->b);
- mem_sys_free(bi);
+ mem_gc_free(interp, bi);
}
static void
@@ -123,7 +123,7 @@
GETATTR_BigInt_bi(interp, self, bi);
n = mpz_sizeinbase(bi->b, base) + 2;
- s = (char *)mem_sys_allocate(n);
+ s = mem_gc_allocate_n_typed(interp, n, char);
return mpz_get_str(s, base, bi->b);
}
@@ -323,36 +323,6 @@
mpz_neg(bi_dest->b, bi_self->b);
}
-static void
-bigint_bitwise_shl_bigint_int(PARROT_INTERP, PMC *self,
- INTVAL value, PMC *dest)
-{
- BIGINT *bi_self, *bi_dest;
- GETATTR_BigInt_bi(interp, self, bi_self);
- GETATTR_BigInt_bi(interp, dest, bi_dest);
- /* The third args to mpz_mul_2exp and mpz_tdiv_q_2exp are unsigned, so we
- need to do something sensible with negative values. */
- if (value >= 0)
- mpz_mul_2exp(bi_dest->b, bi_self->b, (unsigned long int)value);
- else
- mpz_tdiv_q_2exp(bi_dest->b, bi_self->b, (unsigned long int)-value);
-}
-
-static void
-bigint_bitwise_shr_bigint_int(PARROT_INTERP, PMC *self,
- INTVAL value, PMC *dest)
-{
- BIGINT *bi_self, *bi_dest;
- GETATTR_BigInt_bi(interp, self, bi_self);
- GETATTR_BigInt_bi(interp, dest, bi_dest);
- /* The third args to mpz_mul_2exp and mpz_tdiv_q_2exp are unsigned, so we
- need to do something sensible with negative values. */
- if (value >= 0)
- mpz_tdiv_q_2exp(bi_dest->b, bi_self->b, (unsigned long int)value);
- else
- mpz_mul_2exp(bi_dest->b, bi_self->b, (unsigned long int)-value);
-}
-
#else /* ifdef PARROT_HAS_GMP */
typedef struct BIGINT {
@@ -533,32 +503,6 @@
"no bigint lib loaded");
}
-static void
-bigint_bitwise_shl_bigint(PARROT_INTERP, PMC *self, PMC *value, PMC *dest) {
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR,
- "no bigint lib loaded");
-}
-
-static void
-bigint_bitwise_shl_bigint_int(PARROT_INTERP, PMC *self, INTVAL value, PMC *dest)
-{
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR,
- "no bigint lib loaded");
-}
-
-static void
-bigint_bitwise_shr_bigint(PARROT_INTERP, PMC *self, PMC *value, PMC *dest) {
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR,
- "no bigint lib loaded");
-}
-
-static void
-bigint_bitwise_shr_bigint_int(PARROT_INTERP, PMC *self, INTVAL value, PMC *dest)
-{
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_LIBRARY_ERROR,
- "no bigint lib loaded");
-}
-
#endif /* ifdef PARROT_HAS_GMP */
pmclass BigInt auto_attrs {
@@ -596,7 +540,7 @@
}
VTABLE PMC *clone() {
- PMC *res = pmc_new(INTERP, SELF->vtable->base_type);
+ PMC *res = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
bigint_set(INTERP, res, SELF);
return res;
}
@@ -701,20 +645,6 @@
/*
-=item C<PMC *get_bignum()>
-
-Returns SELF
-
-=cut
-
-*/
-
- VTABLE PMC *get_bignum() {
- return SELF;
- }
-
-/*
-
=item C<INTVAL get_bool()>
Returns the boolean value of the integer.
@@ -749,14 +679,14 @@
VTABLE STRING *get_string() {
char * const s = bigint_get_string(INTERP, SELF, 10);
STRING * const ps = Parrot_str_new(INTERP, s, 0);
- mem_sys_free(s);
+ mem_gc_free(INTERP, s);
return ps;
}
VTABLE STRING *get_string_keyed_int(INTVAL base) {
char * const s = bigint_get_string(INTERP, SELF, base);
STRING * const ps = Parrot_str_new(INTERP, s, 0);
- mem_sys_free(s);
+ mem_gc_free(INTERP, s);
return ps;
}
@@ -793,14 +723,14 @@
}
MULTI PMC *add(BigInt value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_add_bigint(INTERP, SELF, value, dest);
return dest;
}
MULTI PMC *add(Integer value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_add_bigint_int(INTERP, SELF, VTABLE_get_integer(interp, value), dest);
return dest;
@@ -815,7 +745,7 @@
}
VTABLE PMC *add_int(INTVAL value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_add_bigint_int(INTERP, SELF, value, dest);
return dest;
@@ -849,14 +779,14 @@
MULTI PMC *subtract(BigInt value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_sub_bigint(INTERP, SELF, value, dest);
return dest;
}
MULTI PMC *subtract(Integer value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_sub_bigint_int(INTERP, SELF, VTABLE_get_integer(interp, value), dest);
return dest;
@@ -871,7 +801,7 @@
}
VTABLE PMC *subtract_int(INTVAL value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_sub_bigint_int(INTERP, SELF, value, dest);
return dest;
@@ -905,14 +835,14 @@
MULTI PMC *multiply(BigInt value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_mul_bigint(INTERP, SELF, value, dest);
return dest;
}
MULTI PMC *multiply(Integer value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_mul_bigint_int(INTERP, SELF, VTABLE_get_integer(interp, value), dest);
return dest;
@@ -927,7 +857,7 @@
}
VTABLE PMC *multiply_int(INTVAL value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_mul_bigint_int(INTERP, SELF, value, dest);
return dest;
@@ -957,25 +887,18 @@
"BigInt: no multiple dispatch variant 'i_multiply_float' for FLOATVAL");
}
- VTABLE PMC *pow_int(INTVAL value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-
- bigint_pow_bigint_int(INTERP, SELF, value, dest);
- return dest;
- }
-
- MULTI PMC *pow(PMC *value, PMC *dest) {
+ METHOD PMC *pow(PMC *value) {
/* XXX only Integer RHS currently */
const INTVAL r = VTABLE_get_integer(INTERP, value);
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC *dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_pow_bigint_int(INTERP, SELF, r, dest);
- return dest;
+ RETURN(PMC *dest);
}
MULTI PMC *divide(BigInt value, PMC *dest) {
BIGINT *bi;
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_div_bigint(INTERP, SELF, value, dest);
#if 0
@@ -991,7 +914,7 @@
}
MULTI PMC *divide(Integer value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_div_bigint_int(INTERP, SELF, VTABLE_get_integer(interp, value), dest);
return dest;
@@ -1006,7 +929,7 @@
}
VTABLE PMC *divide_int(INTVAL value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_div_bigint_int(INTERP, SELF, value, dest);
return dest;
@@ -1030,14 +953,14 @@
}
MULTI PMC *floor_divide(BigInt value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_fdiv_bigint(INTERP, SELF, value, dest);
return dest;
}
MULTI PMC *floor_divide(Integer value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_fdiv_bigint_int(INTERP, SELF, VTABLE_get_integer(interp, value), dest);
return dest;
@@ -1052,7 +975,7 @@
}
VTABLE PMC *floor_divide_int(INTVAL value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_fdiv_bigint_int(INTERP, SELF, value, dest);
return dest;
@@ -1078,14 +1001,14 @@
}
MULTI PMC *modulus(BigInt value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_mod_bigint(INTERP, SELF, value, dest);
return dest;
}
MULTI PMC *modulus(Integer value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_mod_bigint_int(INTERP, SELF, VTABLE_get_integer(interp, value), dest);
return dest;
@@ -1155,7 +1078,7 @@
*/
VTABLE PMC *absolute(PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_abs(INTERP, SELF, dest);
return dest;
@@ -1179,7 +1102,7 @@
*/
VTABLE PMC *neg(PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bigint_neg(INTERP, SELF, dest);
return dest;
@@ -1188,151 +1111,6 @@
VTABLE void i_neg() {
bigint_neg(INTERP, SELF, SELF);
}
-
-/*
-
-=item C<PMC *bitwise_shl(PMC *value, PMC *dest)>
-
-=item C<PMC *bitwise_shl_int(INTVAL value, PMC *dest)>
-
-Returns in C<*dest> the shift left of the BigInt by C<*value>.
-
-=item C<void i_bitwise_shl(PMC *value)>
-
-=item C<void i_bitwise_shl_int(INTVAL value)>
-
-Inplace shift left.
-
-=cut
-
-*/
-
- MULTI PMC *bitwise_shl(BigInt value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-
- bigint_bitwise_shl_bigint_int(INTERP, SELF,
- VTABLE_get_integer(INTERP, value),
- dest);
- return dest;
- }
-
- MULTI PMC *bitwise_shl(Integer value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-
- bigint_bitwise_shl_bigint_int(INTERP, SELF,
- VTABLE_get_integer(interp, value), dest);
- return dest;
- }
- MULTI PMC *bitwise_shl(DEFAULT value, PMC *dest) {
- UNUSED(dest)
- Parrot_ex_throw_from_c_args(INTERP, NULL,
- EXCEPTION_INTERNAL_NOT_IMPLEMENTED,
- "BigInt: no multiple dispatch variant 'bitwise_shl' for %Ss",
- VTABLE_name(interp, value));
- }
-
- VTABLE PMC *bitwise_shl_int(INTVAL value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-
- bigint_bitwise_shl_bigint_int(INTERP, SELF, value, dest);
- return dest;
- }
-
-
- MULTI void i_bitwise_shl(BigInt value) {
- bigint_bitwise_shl_bigint_int(INTERP, SELF,
- VTABLE_get_integer(INTERP, value),
- SELF);
- }
-
- MULTI void i_bitwise_shl(Integer value) {
- bigint_bitwise_shl_bigint_int(INTERP, SELF,
- VTABLE_get_integer(interp, value), SELF);
- }
-
- MULTI void i_bitwise_shl(DEFAULT value) {
- Parrot_ex_throw_from_c_args(INTERP, NULL,
- EXCEPTION_INTERNAL_NOT_IMPLEMENTED,
- "BigInt: no multiple dispatch variant 'i_bitwise_shl' for %Ss",
- VTABLE_name(interp, value));
- }
-
- VTABLE void i_bitwise_shl_int(INTVAL value) {
- bigint_bitwise_shl_bigint_int(INTERP, SELF, value, SELF);
- }
-
-/*
-
-=item C<PMC *bitwise_shr(PMC *value, PMC *dest)>
-
-=item C<PMC *bitwise_shr_int(INTVAL value, PMC *dest)>
-
-Returns in C<*dest> the shift right of the BigInt by C<*value>.
-
-=item C<void i_bitwise_shr(PMC *value)>
-
-=item C<void i_bitwise_shr_int(INTVAL value)>
-
-Inplace shift left.
-
-=cut
-
-*/
-
- MULTI PMC *bitwise_shr(BigInt value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-
- bigint_bitwise_shr_bigint_int(INTERP, SELF,
- VTABLE_get_integer(INTERP, value),
- dest);
- return dest;
- }
-
- MULTI PMC *bitwise_shr(Integer value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-
- bigint_bitwise_shr_bigint_int(INTERP, SELF,
- VTABLE_get_integer(interp, value), dest);
- return dest;
- }
-
- MULTI PMC *bitwise_shr(DEFAULT value, PMC *dest) {
- UNUSED(dest)
- Parrot_ex_throw_from_c_args(INTERP, NULL,
- EXCEPTION_INTERNAL_NOT_IMPLEMENTED,
- "BigInt: no multiple dispatch variant 'bitwise_shr' for %Ss",
- VTABLE_name(interp, value));
- }
-
- VTABLE PMC *bitwise_shr_int(INTVAL value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-
- bigint_bitwise_shr_bigint_int(INTERP, SELF, value, dest);
- return dest;
- }
-
-
- MULTI void i_bitwise_shr(BigInt value) {
- bigint_bitwise_shr_bigint_int(INTERP, SELF,
- VTABLE_get_integer(INTERP, value),
- SELF);
- }
-
- MULTI void i_bitwise_shr(Integer value) {
- bigint_bitwise_shr_bigint_int(INTERP, SELF,
- VTABLE_get_integer(interp, value), SELF);
- }
-
- MULTI void i_bitwise_shr(DEFAULT value) {
- Parrot_ex_throw_from_c_args(INTERP, NULL,
- EXCEPTION_INTERNAL_NOT_IMPLEMENTED,
- "BigInt: no multiple dispatch variant 'i_bitwise_shr' for %Ss",
- VTABLE_name(interp, value));
- }
-
- VTABLE void i_bitwise_shr_int(INTVAL value) {
- bigint_bitwise_shr_bigint_int(INTERP, SELF, value, SELF);
- }
}
/*
Modified: branches/boehm_gc_2/src/pmc/bignum.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/bignum.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/bignum.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2004-2009, Parrot Foundation.
+Copyright (C) 2004-2010, Parrot Foundation.
$Id$
=head1 NAME
@@ -154,7 +154,7 @@
static void
bignum_init(PARROT_INTERP, PMC *self) {
#ifdef PARROT_HAS_GMP
- BIGNUM * const bn = mem_allocate_zeroed_typed(BIGNUM);
+ BIGNUM * const bn = mem_gc_allocate_zeroed_typed(interp, BIGNUM);
SETATTR_BigNum_bn(interp, self, bn);
mpf_clear(bn->b);
mpf_init(bn->b);
@@ -170,7 +170,7 @@
BIGNUM *bn;
GETATTR_BigNum_bn(interp, self, bn);
mpf_clear(bn->b);
- mem_sys_free(bn);
+ mem_gc_free(interp, bn);
#endif
}
@@ -282,7 +282,7 @@
GETATTR_BigNum_bn(interp, self, bn);
n = (mpf_get_prec(bn->b)) / log(base) * log(2);
- s = (char *)mem_sys_allocate(n + 5);
+ s = mem_gc_allocate_n_typed(interp, n + 5, char);
return mpf_get_str(s, &exponent, base, 0, bn->b);
}
@@ -294,7 +294,7 @@
mp_exp_t exponent;
GETATTR_BigNum_bn(interp, self, bn);
- s = (char *)mem_sys_allocate(digits + 5);
+ s = mem_gc_allocate_n_typed(interp, digits + 5, char);
return mpf_get_str(s, &exponent, base, digits, bn->b);
}
@@ -810,7 +810,7 @@
}
VTABLE PMC *clone() {
- PMC *res = pmc_new(INTERP, SELF->vtable->base_type);
+ PMC *res = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
bignum_set(INTERP, res, SELF);
return res;
}
@@ -929,20 +929,6 @@
/*
-=item C<PMC *get_bignum()>
-
-Returns SELF, keeping floating point precision.
-
-=cut
-
-*/
-
- VTABLE PMC *get_bignum() {
- return SELF;
- }
-
-/*
-
=item C<FLOATVAL get_bigint()>
Trunc the BigNum to an BigInt.
@@ -1001,21 +987,21 @@
VTABLE STRING *get_string() {
char *s = bignum_get_string(INTERP, SELF, 10);
STRING *ps = Parrot_str_new(INTERP, s, 0);
- mem_sys_free(s);
+ mem_gc_free(interp, s);
return ps;
}
VTABLE STRING *get_string_keyed_int(INTVAL base) {
char *s = bignum_get_string(INTERP, SELF, base);
STRING *ps = Parrot_str_new(INTERP, s, 0);
- mem_sys_free(s);
+ mem_gc_free(interp, s);
return ps;
}
VTABLE STRING *get_string_keyed_int_int(INTVAL base, INTVAL digits) {
char *s = bignum_get_string_size(INTERP, SELF, base, digits);
STRING *ps = Parrot_str_new(INTERP, s, 0);
- mem_sys_free(s);
+ mem_gc_free(interp, s);
return ps;
}
@@ -1060,14 +1046,14 @@
*/
MULTI PMC *add(BigNum value, PMC *dest) {
- dest = pmc_new(INTERP, SELF->vtable->base_type);
+ dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
bignum_add_bignum(INTERP, SELF, value, dest);
return dest;
}
MULTI PMC *add(Integer value, PMC *dest) {
- dest = pmc_new(INTERP, SELF->vtable->base_type);
+ dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
bignum_add_bignum_int(INTERP, SELF, VTABLE_get_integer(interp, value), dest);
return dest;
@@ -1081,7 +1067,7 @@
}
VTABLE PMC *add_int(INTVAL value, PMC *dest) {
- dest = pmc_new(INTERP, SELF->vtable->base_type);
+ dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
bignum_add_bignum_int(INTERP, SELF, value, dest);
return dest;
@@ -1123,14 +1109,14 @@
*/
MULTI PMC *subtract(BigNum value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bignum_sub_bignum(INTERP, SELF, value, dest);
return dest;
}
MULTI PMC *subtract(Integer value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bignum_sub_bignum_int(INTERP, SELF, VTABLE_get_integer(interp, value), dest);
return dest;
@@ -1144,7 +1130,7 @@
}
VTABLE PMC *subtract_int(INTVAL value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bignum_sub_bignum_int(INTERP, SELF, value, dest);
return dest;
@@ -1186,14 +1172,14 @@
*/
MULTI PMC *multiply(BigNum value, PMC *dest) {
- dest = pmc_new(INTERP, SELF->vtable->base_type);
+ dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
bignum_mul_bignum(INTERP, SELF, value, dest);
return dest;
}
MULTI PMC *multiply(Integer value, PMC *dest) {
- dest = pmc_new(INTERP, SELF->vtable->base_type);
+ dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
bignum_mul_bignum_int(INTERP, SELF, VTABLE_get_integer(interp, value), dest);
return dest;
@@ -1207,7 +1193,7 @@
}
VTABLE PMC *multiply_int(INTVAL value, PMC *dest) {
- dest = pmc_new(INTERP, SELF->vtable->base_type);
+ dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
bignum_mul_bignum_int(INTERP, SELF, value, dest);
return dest;
@@ -1242,26 +1228,25 @@
/*
-=item C<void pow()>
+=item C<METHOD PMC *pow()>
-=cut
+Raises self to the power of value. Replacement method added when the pow()
+vtable was removed
-*/
+TODO: Needs testing.
+TODO: Only supports Integer values for now.
- VTABLE PMC *pow_int(INTVAL value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+=cut
- bignum_pow_bignum_int(INTERP, SELF, value, dest);
- return dest;
- }
+*/
- MULTI PMC *pow(PMC *value, PMC *dest) {
+ METHOD PMC *pow(PMC *value) {
/* only Integer RHS currently. TODO: check number and bignum types */
INTVAL r = VTABLE_get_integer(INTERP, value);
- dest = pmc_new(INTERP, SELF->vtable->base_type);
+ PMC *dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
bignum_pow_bignum_int(INTERP, SELF, r, dest);
- return dest;
+ RETURN(PMC *dest);
}
/*
@@ -1274,7 +1259,7 @@
MULTI PMC *divide(BigNum value, PMC *dest) {
BIGNUM *bn;
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bignum_div_bignum(INTERP, SELF, value, dest);
#if 0
@@ -1290,7 +1275,7 @@
}
MULTI PMC *divide(Integer value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bignum_div_bignum_int(INTERP, SELF, VTABLE_get_integer(interp, value), dest);
return dest;
@@ -1304,14 +1289,14 @@
}
VTABLE PMC *divide_int(INTVAL value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bignum_div_bignum_int(INTERP, SELF, value, dest);
return dest;
}
VTABLE PMC *divide_float(FLOATVAL value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bignum_div_bignum_float(INTERP, SELF, value, dest);
return dest;
@@ -1346,14 +1331,14 @@
*/
MULTI PMC *floor_divide(BigNum value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bignum_fdiv_bignum(INTERP, SELF, value, dest);
return dest;
}
MULTI PMC *floor_divide(Integer value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bignum_fdiv_bignum_int(INTERP, SELF, VTABLE_get_integer(interp, value), dest);
return dest;
@@ -1367,7 +1352,7 @@
}
VTABLE PMC *floor_divide_int(INTVAL value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
bignum_fdiv_bignum_int(INTERP, SELF, value, dest);
return dest;
@@ -1451,7 +1436,7 @@
*/
VTABLE PMC *absolute(PMC *dest) {
- dest = pmc_new(INTERP, SELF->vtable->base_type);
+ dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
bignum_abs(INTERP, SELF, dest);
return dest;
@@ -1475,7 +1460,7 @@
*/
VTABLE PMC *neg(PMC *dest) {
- dest = pmc_new(INTERP, SELF->vtable->base_type);
+ dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
bignum_neg(INTERP, SELF, dest);
return dest;
Modified: branches/boehm_gc_2/src/pmc/callcontext.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/callcontext.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/callcontext.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -269,15 +269,15 @@
switch (CELL_TYPE_MASK(cell)) {
case INTCELL:
- result = pmc_new(interp, HLL_TYPE(enum_class_Integer));
+ result = Parrot_pmc_new(interp, HLL_TYPE(enum_class_Integer));
VTABLE_set_integer_native(interp, result, CELL_INT(cell));
break;
case FLOATCELL:
- result = pmc_new(interp, HLL_TYPE(enum_class_Float));
+ result = Parrot_pmc_new(interp, HLL_TYPE(enum_class_Float));
VTABLE_set_number_native(interp, result, CELL_FLOAT(cell));
break;
case STRINGCELL:
- result = pmc_new(interp, HLL_TYPE(enum_class_String));
+ result = Parrot_pmc_new(interp, HLL_TYPE(enum_class_String));
VTABLE_set_string_native(interp, result, CELL_STRING(cell));
break;
case PMCCELL:
@@ -363,7 +363,7 @@
/* yes, this *looks* risky, but it's a Parrot STRING hash internally */
if (hash && hash->entries) {
UINTVAL i, j = 0;
- result = pmc_new(interp, enum_class_FixedStringArray);
+ result = Parrot_pmc_new(interp, enum_class_FixedStringArray);
VTABLE_set_integer_native(interp, result, hash->entries);
for (i = 0; i <= hash->mask; i++) {
@@ -405,7 +405,6 @@
ATTR PMC *current_namespace; /* The namespace we're currently in */
ATTR PMC *results_signature; /* non-const results signature PMC */
ATTR opcode_t *current_pc; /* program counter of Sub invocation */
- ATTR opcode_t *current_results; /* ptr into code with get_results opcode */
ATTR PMC *current_sig; /* temporary CallContext PMC for active call */
/* deref the constants - we need it all the time */
@@ -596,7 +595,7 @@
Parrot_gc_free_fixed_size_storage(INTERP,
8 * sizeof (void *), returns_values);
else
- mem_sys_free(returns_values);
+ mem_gc_free(INTERP, returns_values);
}
Parrot_pcc_free_registers(INTERP, SELF);
@@ -1408,7 +1407,7 @@
Pcc_cell *cell;
STRING *short_sig;
PMC *type_tuple, *arg_flags, *return_flags;
- PMC * const dest = pmc_new(INTERP, SELF->vtable->base_type);
+ PMC * const dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
GET_ATTR_positionals(INTERP, SELF, cell);
@@ -1490,13 +1489,13 @@
*/
METHOD backtrace(PMC *resume :optional, INTVAL has_resume :opt_flag) {
- PMC *result = pmc_new(interp, enum_class_ResizablePMCArray);
+ PMC *result = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
PMC *cur_ctx = SELF;
Parrot_Continuation_attributes *cont = has_resume ? PMC_cont(resume) : NULL;
/* Get starting context, then loop over them. */
while (cur_ctx) {
- PMC *frame = pmc_new(interp, enum_class_Hash);
+ PMC *frame = Parrot_pmc_new(interp, enum_class_Hash);
PMC *annotations = NULL;
Parrot_Sub_attributes *sub;
@@ -1525,7 +1524,7 @@
}
if (!annotations)
- annotations = pmc_new(interp, enum_class_Hash);
+ annotations = Parrot_pmc_new(interp, enum_class_Hash);
VTABLE_set_pmc_keyed_str(interp, frame, CONST_STRING(interp, "annotations"), annotations);
Modified: branches/boehm_gc_2/src/pmc/capture.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/capture.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/capture.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -22,13 +22,13 @@
do { \
GETATTR_Capture_array((i), (obj), array); \
if (!array) \
- SETATTR_Capture_array((i), (obj), pmc_new((i), enum_class_ResizablePMCArray)); \
+ SETATTR_Capture_array((i), (obj), Parrot_pmc_new((i), enum_class_ResizablePMCArray)); \
} while (0)
#define CAPTURE_hash_CREATE(i, obj) \
do { \
GETATTR_Capture_hash((i), (obj), hash); \
if (!hash) \
- SETATTR_Capture_hash((i), (obj), pmc_new((i), enum_class_Hash)); \
+ SETATTR_Capture_hash((i), (obj), Parrot_pmc_new((i), enum_class_Hash)); \
} while (0)
pmclass Capture auto_attrs {
@@ -61,7 +61,7 @@
VTABLE PMC *clone() {
PMC *array, *hash;
- PMC *dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC *dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
GET_ATTR_array(INTERP, SELF, array);
GET_ATTR_hash(INTERP, SELF, hash);
if (array)
Modified: branches/boehm_gc_2/src/pmc/class.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/class.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/class.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -106,7 +106,7 @@
/* Build a string representing the fully qualified class name. */
/* Retrieve the fully qualified class name for the class. */
STRING * const fq_class = VTABLE_get_string(interp, cur_class);
- PMC * const class_cache = pmc_new(interp, enum_class_Hash);
+ PMC * const class_cache = Parrot_pmc_new(interp, enum_class_Hash);
VTABLE_set_pmc_keyed_str(interp, cache, fq_class, class_cache);
/* Iterate over the attributes. */
@@ -138,8 +138,8 @@
{
Parrot_Class_attributes * const _class = PARROT_CLASS(self);
int cur_index = 0;
- PMC * const attrib_index = pmc_new(interp, enum_class_Hash);
- PMC * const cache = pmc_new(interp, enum_class_Hash);
+ PMC * const attrib_index = Parrot_pmc_new(interp, enum_class_Hash);
+ PMC * const cache = Parrot_pmc_new(interp, enum_class_Hash);
const int num_classes = VTABLE_elements(interp, _class->all_parents);
int i;
@@ -344,7 +344,7 @@
if (!PMC_IS_NULL(meth)) {
/* build an empty signature; it has an invocant but no args/retvals */
- PMC * const sig_obj = pmc_new(interp, enum_class_CallContext);
+ PMC * const sig_obj = Parrot_pmc_new(interp, enum_class_CallContext);
/* preserve current_object */
PMC * const old_object = interp->current_object;
VTABLE_set_string_native(interp, sig_obj, CONST_STRING(interp, "Pi->"));
@@ -504,18 +504,18 @@
/* Set up the object. */
_class->name = CONST_STRING(interp, "");
_class->_namespace = PMCNULL;
- _class->parents = pmc_new(interp, enum_class_ResizablePMCArray);
- _class->all_parents = pmc_new(interp, enum_class_ResizablePMCArray);
- _class->roles = pmc_new(interp, enum_class_ResizablePMCArray);
- _class->methods = pmc_new(interp, enum_class_Hash);
- _class->attrib_metadata = pmc_new(interp, enum_class_Hash);
+ _class->parents = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
+ _class->all_parents = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
+ _class->roles = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
+ _class->methods = Parrot_pmc_new(interp, enum_class_Hash);
+ _class->attrib_metadata = Parrot_pmc_new(interp, enum_class_Hash);
_class->attrib_index = PMCNULL;
_class->attrib_cache = PMCNULL;
_class->meth_cache = PMCNULL;
- _class->resolve_method = pmc_new(interp, enum_class_ResizablePMCArray);
+ _class->resolve_method = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
- _class->vtable_overrides = pmc_new(interp, enum_class_Hash);
- _class->parent_overrides = pmc_new(interp, enum_class_Hash);
+ _class->vtable_overrides = Parrot_pmc_new(interp, enum_class_Hash);
+ _class->parent_overrides = Parrot_pmc_new(interp, enum_class_Hash);
/* We put ourself on the all parents list. */
VTABLE_push_pmc(interp, _class->all_parents, SELF);
@@ -542,7 +542,7 @@
case enum_class_ResizableStringArray:
case enum_class_NameSpace:
/* set only the name property */
- arg = pmc_new(interp, enum_class_Hash);
+ arg = Parrot_pmc_new(interp, enum_class_Hash);
VTABLE_set_pmc_keyed_str(interp, arg, name_str, init_data);
break;
@@ -556,7 +556,7 @@
|| VTABLE_isa(interp, init_data, CONST_STRING(interp, "Key"))
|| VTABLE_isa(interp, init_data, CONST_STRING(interp, "ResizableStringArray"))) {
/* set only the name property */
- arg = pmc_new(interp, enum_class_Hash);
+ arg = Parrot_pmc_new(interp, enum_class_Hash);
VTABLE_set_pmc_keyed_str(interp, arg, name_str, init_data);
}
@@ -631,7 +631,7 @@
VTABLE void add_attribute(STRING *name, PMC *type) {
Parrot_Class_attributes * const _class = PARROT_CLASS(SELF);
- PMC * const new_attribute = pmc_new(interp, enum_class_Hash);
+ PMC * const new_attribute = Parrot_pmc_new(interp, enum_class_Hash);
/* If we've been instantiated already, not allowed. */
if (_class->instantiated)
@@ -960,11 +960,11 @@
found = _class->parents;
}
else if (Parrot_str_equal(interp, what, CONST_STRING(interp, "name"))) {
- found = pmc_new(interp, enum_class_String);
+ found = Parrot_pmc_new(interp, enum_class_String);
VTABLE_set_string_native(interp, found, _class->name);
}
else if (Parrot_str_equal(interp, what, CONST_STRING(interp, "id"))) {
- found = pmc_new(interp, enum_class_Integer);
+ found = Parrot_pmc_new(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, found, _class->id);
}
else if (Parrot_str_equal(interp, what, CONST_STRING(interp, "namespace"))) {
@@ -987,7 +987,7 @@
found = _class->roles;
}
else if (Parrot_str_equal(interp, what, CONST_STRING(interp, "flags"))) {
- found = pmc_new(interp, enum_class_Integer);
+ found = Parrot_pmc_new(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, found,
(INTVAL)PObj_get_FLAGS(SELF));
}
@@ -1002,7 +1002,7 @@
if (found->vtable->base_type == enum_class_Hash) {
/* for Hash return values, create and return a shallow
* clone because the VTABLE_clone does a deep clone */
- PMC * const hash = pmc_new(interp, enum_class_Hash);
+ PMC * const hash = Parrot_pmc_new(interp, enum_class_Hash);
PMC * const iter = VTABLE_get_iter(interp, found);
while (VTABLE_get_bool(interp, iter)) {
STRING * const key = VTABLE_shift_string(interp, iter);
@@ -1029,7 +1029,7 @@
VTABLE PMC *inspect() {
/* Create a hash, then use inspect_str to get all of the data to
* fill it up with. */
- PMC * const metadata = pmc_new(interp, enum_class_Hash);
+ PMC * const metadata = Parrot_pmc_new(interp, enum_class_Hash);
STRING * const name_str = CONST_STRING(interp, "name");
STRING * const ns_str = CONST_STRING(interp, "namespace");
STRING * const attrs_str = CONST_STRING(interp, "attributes");
@@ -1191,7 +1191,7 @@
_class->instantiated = 1;
/* Create object. */
- object = pmc_new_noinit(interp, enum_class_Object);
+ object = Parrot_pmc_new_noinit(interp, enum_class_Object);
/* Set custom GC mark and destroy on the object. */
PObj_custom_mark_destroy_SETALL(object);
@@ -1207,7 +1207,7 @@
Parrot_Object_attributes * const objattr =
PMC_data_typed(object, Parrot_Object_attributes *);
objattr->_class = SELF;
- objattr->attrib_store = pmc_new(interp, enum_class_ResizablePMCArray);
+ objattr->attrib_store = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
}
if (!PMC_IS_NULL(init)) {
@@ -1537,7 +1537,7 @@
This is just a temporary hack. Type ID numbers shouldn't be externally
visible to the average PIR user. However, we need this for now to interface
-with functions like pmc_new and pmc_reuse, which take type ID numbers still.
+with functions like Parrot_pmc_new and pmc_reuse, which take type ID numbers still.
=cut
@@ -1563,7 +1563,7 @@
/* Recalculate full MRO from thawed parents */
_class->all_parents = Parrot_ComputeMRO_C3(interp, SELF);
- _class->parent_overrides = pmc_new(interp, enum_class_Hash);
+ _class->parent_overrides = Parrot_pmc_new(interp, enum_class_Hash);
/* Rebuild attribute index from thawed attribute metadata */
build_attrib_index(interp, SELF);
@@ -1591,7 +1591,7 @@
if (has_name) {
/* We'll build a hash just containing the name, then give this to
* init_class_from_hash - saves some code duplication. */
- PMC * const naming_hash = pmc_new(interp, enum_class_Hash);
+ PMC * const naming_hash = Parrot_pmc_new(interp, enum_class_Hash);
STRING * const name_str = CONST_STRING(interp, "name");
VTABLE_set_string_keyed_str(interp, naming_hash, name_str, name);
Modified: branches/boehm_gc_2/src/pmc/codestring.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/codestring.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/codestring.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -189,7 +189,7 @@
INTVAL eos;
INTVAL jpos;
- linepos = pmc_new(INTERP, enum_class_ResizableIntegerArray);
+ linepos = Parrot_pmc_new(INTERP, enum_class_ResizableIntegerArray);
/* get the string itself */
GET_ATTR_str_val(INTERP, SELF, str);
eos = Parrot_str_byte_length(INTERP, str);
Modified: branches/boehm_gc_2/src/pmc/complex.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/complex.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/complex.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -234,7 +234,7 @@
*/
VTABLE opcode_t *invoke(void *next) {
const int argcP = REG_INT(interp, 3);
- PMC * const res = pmc_new(INTERP, enum_class_Complex);
+ PMC * const res = Parrot_pmc_new(INTERP, enum_class_Complex);
if (argcP == 1) {
PMC * const arg = REG_PMC(interp, 5);
@@ -316,7 +316,7 @@
}
VTABLE PMC *clone() {
- PMC * const dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
FLOATVAL re, im;
GET_ATTR_re(INTERP, SELF, re);
@@ -436,7 +436,7 @@
}
VTABLE PMC *get_pmc_keyed_str(STRING *key) {
- PMC * const ret = pmc_new(INTERP, enum_class_Float);
+ PMC * const ret = Parrot_pmc_new(INTERP, enum_class_Float);
const FLOATVAL val = SELF.get_number_keyed_str(key);
VTABLE_set_number_native(INTERP, ret, val);
return ret;
@@ -453,7 +453,7 @@
*/
VTABLE PMC *get_pmc_keyed_int(INTVAL key) {
- PMC * const ret = pmc_new(INTERP, enum_class_Float);
+ PMC * const ret = Parrot_pmc_new(INTERP, enum_class_Float);
const FLOATVAL val = SELF.get_number_keyed_int(key);
VTABLE_set_number_native(INTERP, ret, val);
return ret;
@@ -635,7 +635,7 @@
MULTI PMC *add(Complex value, PMC *dest) {
FLOATVAL self_re, self_im, val_re, val_im;
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
GET_ATTR_re(INTERP, SELF, self_re);
GET_ATTR_im(INTERP, SELF, self_im);
@@ -651,7 +651,7 @@
MULTI PMC *add(DEFAULT value, PMC *dest) {
FLOATVAL re, im;
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
GET_ATTR_re(INTERP, SELF, re);
GET_ATTR_im(INTERP, SELF, im);
@@ -667,7 +667,7 @@
VTABLE PMC *add_float(FLOATVAL value, PMC *dest) {
FLOATVAL re, im;
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
GET_ATTR_re(INTERP, SELF, re);
GET_ATTR_im(INTERP, SELF, im);
@@ -724,7 +724,7 @@
MULTI PMC *subtract(Complex value, PMC *dest) {
FLOATVAL self_re, self_im, val_re, val_im;
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
GET_ATTR_re(INTERP, SELF, self_re);
GET_ATTR_im(INTERP, SELF, self_im);
@@ -740,7 +740,7 @@
MULTI PMC *subtract(DEFAULT value, PMC *dest) {
FLOATVAL re, im;
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
GET_ATTR_re(INTERP, SELF, re);
GET_ATTR_im(INTERP, SELF, im);
@@ -756,7 +756,7 @@
VTABLE PMC *subtract_float(FLOATVAL value, PMC *dest) {
FLOATVAL re, im;
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
GET_ATTR_re(INTERP, SELF, re);
GET_ATTR_im(INTERP, SELF, im);
@@ -827,7 +827,7 @@
MULTI PMC *multiply(Complex value, PMC *dest) {
FLOATVAL a, b, c, d;
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
GET_ATTR_re(INTERP, SELF, a);
GET_ATTR_im(INTERP, SELF, b);
@@ -841,7 +841,7 @@
MULTI PMC *multiply(DEFAULT value, PMC *dest) {
FLOATVAL re, im;
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
GET_ATTR_re(INTERP, SELF, re);
GET_ATTR_im(INTERP, SELF, im);
@@ -857,7 +857,7 @@
VTABLE PMC *multiply_float(FLOATVAL value, PMC *dest) {
FLOATVAL re, im;
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
GET_ATTR_re(INTERP, SELF, re);
GET_ATTR_im(INTERP, SELF, im);
@@ -940,7 +940,7 @@
FLOATVAL self_re, self_im, val_re, val_im;
complex_check_divide_zero(INTERP, value);
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
GET_ATTR_re(INTERP, SELF, self_re);
GET_ATTR_im(INTERP, SELF, self_im);
@@ -970,7 +970,7 @@
FLOATVAL re, im;
const FLOATVAL d = VTABLE_get_number(INTERP, value);
float_check_divide_zero(INTERP, d);
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
GET_ATTR_re(INTERP, SELF, re);
GET_ATTR_im(INTERP, SELF, im);
@@ -984,7 +984,7 @@
VTABLE PMC *divide_int(INTVAL value, PMC *dest) {
FLOATVAL re, im;
int_check_divide_zero(INTERP, value);
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
GET_ATTR_re(INTERP, SELF, re);
GET_ATTR_im(INTERP, SELF, im);
@@ -998,7 +998,7 @@
VTABLE PMC *divide_float(FLOATVAL value, PMC *dest) {
FLOATVAL re, im;
float_check_divide_zero(INTERP, value);
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
GET_ATTR_re(INTERP, SELF, re);
GET_ATTR_im(INTERP, SELF, im);
@@ -1085,7 +1085,7 @@
VTABLE PMC *neg(PMC *dest) {
FLOATVAL re, im;
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
GET_ATTR_re(INTERP, SELF, re);
GET_ATTR_im(INTERP, SELF, im);
@@ -1164,7 +1164,7 @@
GET_ATTR_im(INTERP, SELF, im);
d = sqrt(re*re + im*im);
- dest = pmc_new(INTERP,
+ dest = Parrot_pmc_new(INTERP,
Parrot_get_ctx_HLL_type(INTERP, enum_class_Float));
VTABLE_set_number_native(INTERP, dest, d);
@@ -1176,7 +1176,7 @@
GET_ATTR_re(INTERP, SELF, re);
GET_ATTR_im(INTERP, SELF, im);
d = sqrt(re*re + im*im);
- pmc_reuse(INTERP, SELF, enum_class_Float, 0);
+ Parrot_pmc_reuse(INTERP, SELF, enum_class_Float, 0);
VTABLE_set_number_native(INTERP, SELF, d);
}
@@ -1202,7 +1202,7 @@
*/
METHOD ln() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
FLOATVAL re, im, result_re, result_im;
GET_ATTR_re(INTERP, SELF, re);
GET_ATTR_im(INTERP, SELF, im);
@@ -1236,7 +1236,7 @@
*/
METHOD exp() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
FLOATVAL re, im, f;
GET_ATTR_re(INTERP, SELF, re);
GET_ATTR_im(INTERP, SELF, im);
@@ -1290,7 +1290,7 @@
*/
METHOD sin() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
FLOATVAL re, im, result_re, result_im;
GET_ATTR_re(INTERP, SELF, re);
GET_ATTR_im(INTERP, SELF, im);
@@ -1320,7 +1320,7 @@
}
METHOD cos() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
FLOATVAL re, im, result_re, result_im;
GET_ATTR_re(INTERP, SELF, re);
GET_ATTR_im(INTERP, SELF, im);
@@ -1345,8 +1345,8 @@
}
METHOD tan() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
- PMC * const e = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const e = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
(PMC *d) = PCCINVOKE(INTERP, SELF, "sin");
(PMC *e) = PCCINVOKE(INTERP, SELF, "cos");
@@ -1357,8 +1357,8 @@
}
METHOD cot() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
- PMC * const e = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const e = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
(PMC *d) = PCCINVOKE(INTERP, SELF, "cos");
(PMC *e) = PCCINVOKE(INTERP, SELF, "sin");
@@ -1368,8 +1368,8 @@
}
METHOD sec() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
- PMC * const e = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const e = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
SET_ATTR_re(INTERP, d, 1.0);
SET_ATTR_im(INTERP, d, 0.0);
(PMC *e) = PCCINVOKE(INTERP, SELF, "cos");
@@ -1380,8 +1380,8 @@
}
METHOD csc() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
- PMC * const e = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const e = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
SET_ATTR_re(INTERP, d, 1.0);
SET_ATTR_im(INTERP, d, 0.0);
@@ -1428,8 +1428,8 @@
METHOD asin() {
FLOATVAL d_re, d_im, e_re, e_im, self_re, self_im;
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
- PMC * e = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * e = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
GET_ATTR_re(INTERP, SELF, self_re);
GET_ATTR_im(INTERP, SELF, self_im);
@@ -1456,8 +1456,8 @@
METHOD acos() {
FLOATVAL d_re, d_im, e_re, e_im, self_re, self_im;
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
- PMC * e = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * e = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
GET_ATTR_re(INTERP, SELF, self_re);
GET_ATTR_im(INTERP, SELF, self_im);
@@ -1483,8 +1483,8 @@
}
METHOD atan() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
- PMC * const e = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const e = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
FLOATVAL re, im, d_re, d_im;
GET_ATTR_re(INTERP, SELF, re);
GET_ATTR_im(INTERP, SELF, im);
@@ -1507,7 +1507,7 @@
}
METHOD acot() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
PMC *e;
FLOATVAL re, im;
GET_ATTR_re(INTERP, SELF, re);
@@ -1521,7 +1521,7 @@
}
METHOD acsc() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
PMC *e;
FLOATVAL re, im;
GET_ATTR_re(INTERP, SELF, re);
@@ -1535,7 +1535,7 @@
}
METHOD asec() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
PMC *e;
FLOATVAL re, im;
GET_ATTR_re(INTERP, SELF, re);
@@ -1569,7 +1569,7 @@
*/
METHOD sinh() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
FLOATVAL re, im;
GET_ATTR_re(INTERP, SELF, re);
GET_ATTR_im(INTERP, SELF, im);
@@ -1581,7 +1581,7 @@
}
METHOD cosh() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
FLOATVAL re, im;
GET_ATTR_re(INTERP, SELF, re);
GET_ATTR_im(INTERP, SELF, im);
@@ -1598,8 +1598,8 @@
}
METHOD tanh() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
- PMC * const e = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const e = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
(PMC *d) = PCCINVOKE(INTERP, SELF, "sinh");
(PMC *e) = PCCINVOKE(INTERP, SELF, "cosh");
@@ -1611,7 +1611,7 @@
METHOD coth() {
FLOATVAL re, im;
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
(PMC *d) = PCCINVOKE(INTERP, SELF, "tanh");
GET_ATTR_re(INTERP, d, re);
@@ -1625,7 +1625,7 @@
METHOD csch() {
FLOATVAL re, im;
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
(PMC *d) = PCCINVOKE(INTERP, SELF, "sinh");
GET_ATTR_re(INTERP, d, re);
@@ -1639,7 +1639,7 @@
METHOD sech() {
FLOATVAL re, im;
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
(PMC *d) = PCCINVOKE(INTERP, SELF, "cosh");
GET_ATTR_re(INTERP, d, re);
@@ -1681,8 +1681,8 @@
METHOD asinh() {
FLOATVAL re, im;
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
- PMC * const e = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const e = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
GET_ATTR_re(INTERP, SELF, re);
GET_ATTR_im(INTERP, SELF, im);
@@ -1700,8 +1700,8 @@
METHOD acosh() {
FLOATVAL re, im;
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
- PMC * const e = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const e = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
(PMC *d) = PCCINVOKE(INTERP, SELF, "acos");
GET_ATTR_re(INTERP, d, re);
@@ -1714,8 +1714,8 @@
METHOD atanh() {
FLOATVAL re, im;
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
- PMC * const e = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const e = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
GET_ATTR_re(INTERP, SELF, re);
GET_ATTR_im(INTERP, SELF, im);
@@ -1732,7 +1732,7 @@
}
METHOD acoth() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
PMC *e;
FLOATVAL re, im;
GET_ATTR_re(INTERP, SELF, re);
@@ -1746,7 +1746,7 @@
}
METHOD acsch() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
PMC *e;
FLOATVAL re, im;
GET_ATTR_re(INTERP, SELF, re);
@@ -1760,7 +1760,7 @@
}
METHOD asech() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
PMC *e;
FLOATVAL re, im;
GET_ATTR_re(INTERP, SELF, re);
@@ -1775,9 +1775,12 @@
/*
-=item C<PMC *pow(PMC *value, PMC *dest)>
+=item C<METHOD PMC *pow(PMC *value)>
-Return SELF to the C<value>th power and return result in C<dest>.
+Raise SELF to the power of value. Replacement for the old pow() vtable, which
+was deleted.
+
+TODO: Requires testing
=item C<METHOD PMC *sqrt()>
@@ -1792,42 +1795,23 @@
*/
- MULTI PMC *pow(Complex value, PMC *dest) {
- PMC *l = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ METHOD pow(PMC * value) {
+ PMC *l = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
PMC *log;
-
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-
+ PMC *dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
Parrot_pcc_invoke_method_from_c_args(interp, SELF, CONST_STRING(interp, "ln"),
"->P", &log);
- l = Parrot_Complex_multi_multiply_Complex_PMC(INTERP,
- log, value, l);
+ l = VTABLE_multiply(INTERP, log, value, l);
Parrot_pcc_invoke_method_from_c_args(interp, l, CONST_STRING(interp, "exp"),
"->P", &dest);
-
- return dest;
- }
-
- MULTI PMC *pow(DEFAULT value, PMC *dest) {
- PMC *l = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
- PMC *log;
-
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-
- Parrot_pcc_invoke_method_from_c_args(interp, SELF, CONST_STRING(interp, "ln"),
- "->P", &log);
- l = Parrot_Complex_multi_multiply_DEFAULT_PMC(INTERP, log, value, l);
- Parrot_pcc_invoke_method_from_c_args(interp, l, CONST_STRING(interp, "exp"),
- "->P", &dest);
-
- return dest;
+ RETURN(PMC *dest);
}
METHOD sqrt() {
- PMC * const result = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const result = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
const FLOATVAL absval = SELF.get_number();
FLOATVAL sx, sy, rx, ry;
GET_ATTR_re(INTERP, SELF, sx);
Modified: branches/boehm_gc_2/src/pmc/continuation.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/continuation.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/continuation.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -157,7 +157,7 @@
VTABLE PMC *clone() {
/* Start to prepare for subclassable continuations */
- return pmc_new_init(INTERP, SELF->vtable->base_type, SELF);
+ return Parrot_pmc_new_init(INTERP, SELF->vtable->base_type, SELF);
}
/*
Modified: branches/boehm_gc_2/src/pmc/coroutine.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/coroutine.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/coroutine.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -97,7 +97,7 @@
VTABLE PMC *clone() {
STRING *name;
- PMC * const ret = pmc_new(INTERP, SELF->vtable->base_type);
+ PMC * const ret = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
PObj_custom_mark_destroy_SETALL(ret);
@@ -164,7 +164,7 @@
/* first time set current sub, cont, object */
if (PMC_IS_NULL(ctx))
- ctx = pmc_new(INTERP, enum_class_CallContext);
+ ctx = Parrot_pmc_new(INTERP, enum_class_CallContext);
CURRENT_CONTEXT(INTERP) = ctx;
@@ -189,7 +189,7 @@
/* create pad if needed */
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);
+ PMC * const lexpad = Parrot_pmc_new_init(INTERP, hlltype, lex_info);
Parrot_pcc_set_lex_pad(INTERP, ctx, lexpad);
VTABLE_set_pointer(INTERP, lexpad, ctx);
}
Modified: branches/boehm_gc_2/src/pmc/cpointer.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/cpointer.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/cpointer.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -99,7 +99,7 @@
*/
VTABLE PMC *clone() {
- PMC * const dest = pmc_new_noinit(INTERP, SELF->vtable->base_type);
+ PMC * const dest = Parrot_pmc_new_noinit(INTERP, SELF->vtable->base_type);
void *ptr;
STRING *sig;
Modified: branches/boehm_gc_2/src/pmc/default.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/default.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/default.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -148,7 +148,7 @@
static void
propagate_std_props(PARROT_INTERP, PMC *self, PMC *prop_hash) {
if (self->vtable->flags & (VTABLE_IS_CONST_FLAG | VTABLE_IS_READONLY_FLAG)){
- PMC * const pmc_true = pmc_new(interp, enum_class_Integer);
+ PMC * const pmc_true = Parrot_pmc_new(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, pmc_true, 1);
VTABLE_set_pmc_keyed_str(interp, prop_hash, CONST_STRING(interp, "_ro"), pmc_true);
}
@@ -189,7 +189,7 @@
check_get_std_props(PARROT_INTERP, PMC *self, STRING *key) {
if ((self->vtable->flags & (VTABLE_IS_CONST_FLAG | VTABLE_IS_READONLY_FLAG))
&& Parrot_str_equal(interp, key, CONST_STRING(interp, "_ro"))) {
- PMC * const ret_val = pmc_new(interp, enum_class_Integer);
+ PMC * const ret_val = Parrot_pmc_new(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, ret_val, 1);
return ret_val;
}
@@ -214,7 +214,7 @@
make_prop_hash(PARROT_INTERP, PMC *self) {
PMC *prop;
- PMC_metadata(self) = prop = pmc_new(interp, enum_class_Hash);
+ PMC_metadata(self) = prop = Parrot_pmc_new(interp, enum_class_Hash);
propagate_std_props(interp, self, prop);
return prop;
}
@@ -332,16 +332,16 @@
VTABLE PMC *instantiate(PMC *init) {
const INTVAL type = VTABLE_type(INTERP, SELF);
- /* Ensure no looping, as pmc_new calls the instantiate vtable entry for
+ /* Ensure no looping, as Parrot_pmc_new calls the instantiate vtable entry for
* classes. */
if (PObj_is_class_TEST(SELF))
Parrot_ex_throw_from_c_args(interp, NULL, 1,
"All high-level classes should override instantiate");
if (!PMC_IS_NULL(init))
- return pmc_new_init(INTERP, type, init);
+ return Parrot_pmc_new_init(INTERP, type, init);
- return pmc_new(INTERP, type);
+ return Parrot_pmc_new(INTERP, type);
}
/*
@@ -612,7 +612,7 @@
STRING * const undef = CONST_STRING(INTERP, "Undef");
if (VTABLE_isa(INTERP, value, undef))
- pmc_reuse(INTERP, SELF, value->vtable->base_type, 0);
+ Parrot_pmc_reuse(INTERP, SELF, value->vtable->base_type, 0);
else
SELF.set_pmc(value);
}
@@ -632,7 +632,7 @@
*/
VTABLE void morph(PMC* type) {
- pmc_reuse(INTERP, SELF, VTABLE_get_integer(interp, type), 0);
+ Parrot_pmc_reuse(INTERP, SELF, VTABLE_get_integer(interp, type), 0);
}
/*
@@ -936,7 +936,7 @@
VTABLE PMC *inspect_str(STRING *name) {
if (Parrot_str_equal(interp, name, CONST_STRING(interp, "flags"))) {
- PMC *found = pmc_new(interp, enum_class_Integer);
+ PMC *found = Parrot_pmc_new(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, found,
(INTVAL)PObj_get_FLAGS(SELF));
return found;
@@ -960,7 +960,7 @@
*/
VTABLE PMC *inspect() {
- PMC *metadata = pmc_new(interp, enum_class_Hash);
+ PMC *metadata = Parrot_pmc_new(interp, enum_class_Hash);
STRING * const flags_str = CONST_STRING(interp, "flags");
VTABLE_set_pmc_keyed_str(interp, metadata, flags_str,
@@ -987,9 +987,9 @@
if (PMC_IS_NULL(_class)) {
INTVAL type = VTABLE_type(interp, SELF);
- PMC *type_num = pmc_new(interp, enum_class_Integer);
+ PMC *type_num = Parrot_pmc_new(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, type_num, type);
- return pmc_new_init(interp, enum_class_PMCProxy, type_num);
+ return Parrot_pmc_new_init(interp, enum_class_PMCProxy, type_num);
}
return _class;
@@ -1158,7 +1158,7 @@
*/
VTABLE PMC *add_float(FLOATVAL value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_number_native(INTERP, dest,
SELF.get_number() + value);
@@ -1692,678 +1692,6 @@
/*
-=item C<PMC *pow(PMC *value, PMC *dest)>
-
-Default fallback. Performs a multiple dispatch call for 'pow'.
-
-=cut
-
-*/
-
- VTABLE PMC *pow(PMC *value, PMC *dest) {
- PMC *result = PMCNULL;
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "pow", "PPP->P", SELF, value, dest, &result);
- return result;
- }
-
-/*
-
-=item C<PMC *pow_int(INTVAL value, PMC *dest)>
-
-Default fallback. Performs a multiple dispatch call for 'pow_int'.
-
-=cut
-
-*/
-
- VTABLE PMC *pow_int(INTVAL value, PMC *dest) {
- PMC *result = PMCNULL;
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "pow_int", "PIP->P", SELF, value, dest, &result);
- return result;
- }
-
-/*
-
-=item C<PMC *pow_float(FLOATVAL value, PMC *dest)>
-
-Default fallback. Performs a multiple dispatch call for 'pow_float'.
-
-=cut
-
-*/
-
- VTABLE PMC *pow_float(FLOATVAL value, PMC *dest) {
- PMC *result = PMCNULL;
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "pow_float", "PNP->P", SELF, value, dest, &result);
- return result;
- }
-
-/*
-
-=item C<void i_pow(PMC *value)>
-
-Default fallback. Performs a multiple dispatch call for 'i_pow'.
-
-=cut
-
-*/
-
- VTABLE void i_pow(PMC *value) {
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "i_pow", "PP", SELF, value);
- }
-
-/*
-
-=item C<void i_pow_int(INTVAL value)>
-
-Default fallback. Performs a multiple dispatch call for 'i_pow_int'.
-
-=cut
-
-*/
-
- VTABLE void i_pow_int(INTVAL value) {
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "i_pow_int", "PI", SELF, value);
- }
-
-/*
-
-=item C<void i_pow_float(FLOATVAL value)>
-
-Default fallback. Performs a multiple dispatch call for 'i_pow_float'.
-
-=cut
-
-*/
-
- VTABLE void i_pow_float(FLOATVAL value) {
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "i_pow_float", "PN", SELF, value);
- }
-
-/*
-
-=item C<PMC *bitwise_or(PMC *value, PMC *dest)>
-
-Default fallback. Performs a multiple dispatch call for 'bitwise_or'.
-
-=cut
-
-*/
-
- VTABLE PMC *bitwise_or(PMC *value, PMC *dest) {
- PMC *result = PMCNULL;
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "bitwise_or", "PPP->P", SELF, value, dest, &result);
- return result;
- }
-
-/*
-
-=item C<PMC *bitwise_or_int(INTVAL value, PMC *dest)>
-
-Default fallback. Performs a multiple dispatch call for 'bitwise_or_int'.
-
-=cut
-
-*/
-
- VTABLE PMC *bitwise_or_int(INTVAL value, PMC *dest) {
- PMC *result = PMCNULL;
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "bitwise_or_int", "PIP->P", SELF, value, dest, &result);
- return result;
- }
-
-/*
-
-=item C<void i_bitwise_or(PMC *value)>
-
-Default fallback. Performs a multiple dispatch call for 'i_bitwise_or'.
-
-=cut
-
-*/
-
- VTABLE void i_bitwise_or(PMC *value) {
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "i_bitwise_or", "PP", SELF, value);
- }
-
-/*
-
-=item C<void i_bitwise_or_int(INTVAL value)>
-
-Default fallback. Performs a multiple dispatch call for 'i_bitwise_or_int'.
-
-=cut
-
-*/
-
- VTABLE void i_bitwise_or_int(INTVAL value) {
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "i_bitwise_or_int", "PI", SELF, value);
- }
-
-/*
-
-=item C<PMC *bitwise_and(PMC *value, PMC *dest)>
-
-Default fallback. Performs a multiple dispatch call for 'bitwise_and'.
-
-=cut
-
-*/
-
- VTABLE PMC *bitwise_and(PMC *value, PMC *dest) {
- PMC *result = PMCNULL;
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "bitwise_and", "PPP->P", SELF, value, dest, &result);
- return result;
- }
-
-/*
-
-=item C<PMC *bitwise_and_int(INTVAL value, PMC *dest)>
-
-Default fallback. Performs a multiple dispatch call for 'bitwise_and_int'.
-
-=cut
-
-*/
-
- VTABLE PMC *bitwise_and_int(INTVAL value, PMC *dest) {
- PMC *result = PMCNULL;
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "bitwise_and_int", "PIP->P", SELF, value, dest, &result);
- return result;
- }
-
-/*
-
-=item C<void i_bitwise_and(PMC *value)>
-
-Default fallback. Performs a multiple dispatch call for 'i_bitwise_and'.
-
-=cut
-
-*/
-
- VTABLE void i_bitwise_and(PMC *value) {
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "i_bitwise_and", "PP", SELF, value);
- }
-
-/*
-
-=item C<void i_bitwise_and_int(INTVAL value)>
-
-Default fallback. Performs a multiple dispatch call for 'i_bitwise_and_int'.
-
-=cut
-
-*/
-
- VTABLE void i_bitwise_and_int(INTVAL value) {
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "i_bitwise_and_int", "PI", SELF, value);
- }
-
-/*
-
-=item C<PMC *bitwise_xor(PMC *value, PMC *dest)>
-
-Default fallback. Performs a multiple dispatch call for 'bitwise_xor'.
-
-=cut
-
-*/
-
- VTABLE PMC *bitwise_xor(PMC *value, PMC *dest) {
- PMC *result = PMCNULL;
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "bitwise_xor", "PPP->P", SELF, value, dest, &result);
- return result;
- }
-
-/*
-
-=item C<PMC *bitwise_xor_int(INTVAL value, PMC *dest)>
-
-Default fallback. Performs a multiple dispatch call for 'bitwise_xor_int'.
-
-=cut
-
-*/
-
- VTABLE PMC *bitwise_xor_int(INTVAL value, PMC *dest) {
- PMC *result = PMCNULL;
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "bitwise_xor_int", "PIP->P", SELF, value, dest, &result);
- return result;
- }
-
-/*
-
-=item C<void i_bitwise_xor(PMC *value)>
-
-Default fallback. Performs a multiple dispatch call for 'i_bitwise_xor'.
-
-=cut
-
-*/
-
- VTABLE void i_bitwise_xor(PMC *value) {
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "i_bitwise_xor", "PP", SELF, value);
- }
-
-/*
-
-=item C<void i_bitwise_xor_int(INTVAL value)>
-
-Default fallback. Performs a multiple dispatch call for 'i_bitwise_xor_int'.
-
-=cut
-
-*/
-
- VTABLE void i_bitwise_xor_int(INTVAL value) {
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "i_bitwise_xor_int", "PI", SELF, value);
- }
-
-/*
-
-=item C<PMC *bitwise_ors(PMC *value, PMC *dest)>
-
-Default fallback. Performs a multiple dispatch call for 'bitwise_ors'.
-
-=cut
-
-*/
-
- VTABLE PMC *bitwise_ors(PMC *value, PMC *dest) {
- PMC *result = PMCNULL;
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "bitwise_ors", "PPP->P", SELF, value, dest, &result);
- return result;
- }
-
-/*
-
-=item C<PMC *bitwise_ors_str(STRING *value, PMC *dest)>
-
-Default fallback. Performs a multiple dispatch call for 'bitwise_ors_str'.
-
-=cut
-
-*/
-
- VTABLE PMC *bitwise_ors_str(STRING *value, PMC *dest) {
- PMC *result = PMCNULL;
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "bitwise_ors_str", "PSP->P", SELF, value, dest, &result);
- return result;
- }
-
-/*
-
-=item C<void i_bitwise_ors(PMC *value)>
-
-Default fallback. Performs a multiple dispatch call for 'i_bitwise_ors'.
-
-=cut
-
-*/
-
- VTABLE void i_bitwise_ors(PMC *value) {
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "i_bitwise_ors", "PP", SELF, value);
- }
-
-/*
-
-=item C<void i_bitwise_ors_str(STRING *value)>
-
-Default fallback. Performs a multiple dispatch call for 'i_bitwise_ors_str'.
-
-=cut
-
-*/
-
- VTABLE void i_bitwise_ors_str(STRING *value) {
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "i_bitwise_ors_str", "PS", SELF, value);
- }
-
-/*
-
-=item C<PMC *bitwise_ands(PMC *value, PMC *dest)>
-
-Default fallback. Performs a multiple dispatch call for 'bitwise_ands'.
-
-=cut
-
-*/
-
- VTABLE PMC *bitwise_ands(PMC *value, PMC *dest) {
- PMC *result = PMCNULL;
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "bitwise_ands", "PPP->P", SELF, value, dest, &result);
- return result;
- }
-
-/*
-
-=item C<PMC *bitwise_ands_str(STRING *value, PMC *dest)>
-
-Default fallback. Performs a multiple dispatch call for 'bitwise_ands_str'.
-
-=cut
-
-*/
-
- VTABLE PMC *bitwise_ands_str(STRING *value, PMC *dest) {
- PMC *result = PMCNULL;
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "bitwise_ands_str", "PSP->P", SELF, value, dest, &result);
- return result;
- }
-
-/*
-
-=item C<void i_bitwise_ands(PMC *value)>
-
-Default fallback. Performs a multiple dispatch call for 'i_bitwise_ands'.
-
-=cut
-
-*/
-
- VTABLE void i_bitwise_ands(PMC *value) {
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "i_bitwise_ands", "PP", SELF, value);
- }
-
-/*
-
-=item C<void i_bitwise_ands_str(STRING *value)>
-
-Default fallback. Performs a multiple dispatch call for 'i_bitwise_ands_str'.
-
-=cut
-
-*/
-
- VTABLE void i_bitwise_ands_str(STRING *value) {
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "i_bitwise_ands_str", "PS", SELF, value);
- }
-
-/*
-
-=item C<PMC *bitwise_xors(PMC *value, PMC *dest)>
-
-Default fallback. Performs a multiple dispatch call for 'bitwise_xors'.
-
-=cut
-
-*/
-
- VTABLE PMC *bitwise_xors(PMC *value, PMC *dest) {
- PMC *result = PMCNULL;
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "bitwise_xors", "PPP->P", SELF, value, dest, &result);
- return result;
- }
-
-/*
-
-=item C<PMC *bitwise_xors_str(STRING *value, PMC *dest)>
-
-Default fallback. Performs a multiple dispatch call for 'bitwise_xors_str'.
-
-=cut
-
-*/
-
- VTABLE PMC *bitwise_xors_str(STRING *value, PMC *dest) {
- PMC *result = PMCNULL;
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "bitwise_xors_str", "PSP->P", SELF, value, dest, &result);
- return result;
- }
-
-/*
-
-=item C<void i_bitwise_xors(PMC *value)>
-
-Default fallback. Performs a multiple dispatch call for 'i_bitwise_xors'.
-
-=cut
-
-*/
-
- VTABLE void i_bitwise_xors(PMC *value) {
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "i_bitwise_xors", "PP", SELF, value);
- }
-
-/*
-
-=item C<void i_bitwise_xors_str(STRING *value)>
-
-Default fallback. Performs a multiple dispatch call for 'i_bitwise_xors_str'.
-
-=cut
-
-*/
-
- VTABLE void i_bitwise_xors_str(STRING *value) {
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "i_bitwise_xors_str", "PS", SELF, value);
- }
-
-/*
-
-=item C<PMC *bitwise_shl(PMC *value, PMC *dest)>
-
-Default fallback. Performs a multiple dispatch call for 'bitwise_shl'.
-
-=cut
-
-*/
-
- VTABLE PMC *bitwise_shl(PMC *value, PMC *dest) {
- PMC *result = PMCNULL;
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "bitwise_shl", "PPP->P", SELF, value, dest, &result);
- return result;
- }
-
-/*
-
-=item C<PMC *bitwise_shl_int(INTVAL value, PMC *dest)>
-
-Default fallback. Performs a multiple dispatch call for 'bitwise_shl_int'.
-
-=cut
-
-*/
-
- VTABLE PMC *bitwise_shl_int(INTVAL value, PMC *dest) {
- PMC *result = PMCNULL;
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "bitwise_shl_int", "PIP->P", SELF, value, dest, &result);
- return result;
- }
-
-/*
-
-=item C<void i_bitwise_shl(PMC *value)>
-
-Default fallback. Performs a multiple dispatch call for 'i_bitwise_shl'.
-
-=cut
-
-*/
-
- VTABLE void i_bitwise_shl(PMC *value) {
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "i_bitwise_shl", "PP", SELF, value);
- }
-
-/*
-
-=item C<void i_bitwise_shl_int(INTVAL value)>
-
-Default fallback. Performs a multiple dispatch call for 'i_bitwise_shl_int'.
-
-=cut
-
-*/
-
- VTABLE void i_bitwise_shl_int(INTVAL value) {
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "i_bitwise_shl_int", "PI", SELF, value);
- }
-
-/*
-
-=item C<PMC *bitwise_shr(PMC *value, PMC *dest)>
-
-Default fallback. Performs a multiple dispatch call for 'bitwise_shr'.
-
-=cut
-
-*/
-
- VTABLE PMC *bitwise_shr(PMC *value, PMC *dest) {
- PMC *result = PMCNULL;
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "bitwise_shr", "PPP->P", SELF, value, dest, &result);
- return result;
- }
-
-/*
-
-=item C<PMC *bitwise_shr_int(INTVAL value, PMC *dest)>
-
-Default fallback. Performs a multiple dispatch call for 'bitwise_shr_int'.
-
-=cut
-
-*/
-
- VTABLE PMC *bitwise_shr_int(INTVAL value, PMC *dest) {
- PMC *result = PMCNULL;
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "bitwise_shr_int", "PIP->P", SELF, value, dest, &result);
- return result;
- }
-
-/*
-
-=item C<void i_bitwise_shr(PMC *value)>
-
-Default fallback. Performs a multiple dispatch call for 'i_bitwise_shr'.
-
-=cut
-
-*/
-
- VTABLE void i_bitwise_shr(PMC *value) {
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "i_bitwise_shr", "PP", SELF, value);
- }
-
-/*
-
-=item C<void i_bitwise_shr_int(INTVAL value)>
-
-Default fallback. Performs a multiple dispatch call for 'i_bitwise_shr_int'.
-
-=cut
-
-*/
-
- VTABLE void i_bitwise_shr_int(INTVAL value) {
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "i_bitwise_shr_int", "PI", SELF, value);
- }
-
-/*
-
-=item C<PMC *bitwise_lsr(PMC *value, PMC *dest)>
-
-Default fallback. Performs a multiple dispatch call for 'bitwise_lsr'.
-
-=cut
-
-*/
-
- VTABLE PMC *bitwise_lsr(PMC *value, PMC *dest) {
- PMC *result = PMCNULL;
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "bitwise_lsr", "PPP->P", SELF, value, dest, &result);
- return result;
- }
-
-/*
-
-=item C<PMC *bitwise_lsr_int(INTVAL value, PMC *dest)>
-
-Default fallback. Performs a multiple dispatch call for 'bitwise_lsr_int'.
-
-=cut
-
-*/
-
- VTABLE PMC *bitwise_lsr_int(INTVAL value, PMC *dest) {
- PMC *result = PMCNULL;
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "bitwise_lsr_int", "PIP->P", SELF, value, dest, &result);
- return result;
- }
-
-/*
-
-=item C<void i_bitwise_lsr(PMC *value)>
-
-Default fallback. Performs a multiple dispatch call for 'i_bitwise_lsr'.
-
-=cut
-
-*/
-
- VTABLE void i_bitwise_lsr(PMC *value) {
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "i_bitwise_lsr", "PP", SELF, value);
- }
-
-/*
-
-=item C<void i_bitwise_lsr_int(INTVAL value)>
-
-Default fallback. Performs a multiple dispatch call for 'i_bitwise_lsr_int'.
-
-=cut
-
-*/
-
- VTABLE void i_bitwise_lsr_int(INTVAL value) {
- Parrot_mmd_multi_dispatch_from_c_args(interp,
- "i_bitwise_lsr_int", "PI", SELF, value);
- }
-
-/*
-
=item C<INTVAL cmp(PMC *value)>
Default fallback. Performs a multiple dispatch call for 'cmp'.
Modified: branches/boehm_gc_2/src/pmc/env.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/env.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/env.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -74,7 +74,7 @@
*/
VTABLE PMC *get_iter() {
- return pmc_new_init(INTERP, enum_class_ArrayIterator, SELF);
+ return Parrot_pmc_new_init(INTERP, enum_class_ArrayIterator, SELF);
}
/*
@@ -215,7 +215,7 @@
if (!retval)
retval = string_from_literal(INTERP, "");
- return_pmc = pmc_new(INTERP, enum_class_String);
+ return_pmc = Parrot_pmc_new(INTERP, enum_class_String);
VTABLE_set_string_native(INTERP, return_pmc, retval);
return return_pmc;
Modified: branches/boehm_gc_2/src/pmc/exception.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/exception.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/exception.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -541,30 +541,30 @@
if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "type"))) {
INTVAL type;
GET_ATTR_type(interp, SELF, type);
- value = pmc_new(interp, enum_class_Integer);
+ value = Parrot_pmc_new(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, value, type);
}
else if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "severity"))) {
INTVAL severity;
GET_ATTR_severity(interp, SELF, severity);
- value = pmc_new(interp, enum_class_Integer);
+ value = Parrot_pmc_new(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, value, severity);
}
else if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "exit_code"))) {
INTVAL exit_code;
GET_ATTR_exit_code(interp, SELF, exit_code);
- value = pmc_new(interp, enum_class_Integer);
+ value = Parrot_pmc_new(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, value, exit_code);
}
else if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "handled"))) {
INTVAL handled;
GET_ATTR_handled(interp, SELF, handled);
- value = pmc_new(interp, enum_class_Integer);
+ value = Parrot_pmc_new(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, value, handled);
}
else if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "message"))) {
STRING *message = SELF.get_string();
- value = pmc_new(interp, enum_class_String);
+ value = Parrot_pmc_new(interp, enum_class_String);
VTABLE_set_string_native(interp, value, message);
}
else if (Parrot_str_equal(INTERP, name, CONST_STRING(INTERP, "payload"))) {
@@ -709,7 +709,7 @@
/* If we didn't have a key specified and we found no annotations to
* return, should return an empty hash. */
if (!have_name && PMC_IS_NULL(result))
- result = pmc_new(interp, enum_class_Hash);
+ result = Parrot_pmc_new(interp, enum_class_Hash);
RETURN(PMC *result);
}
Modified: branches/boehm_gc_2/src/pmc/exporter.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/exporter.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/exporter.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -231,7 +231,7 @@
if (got_glb) {
STRING * const s_empty = CONST_STRING(interp, "");
- PMC *temp_globals = pmc_new(interp, enum_class_Hash);
+ PMC *temp_globals = Parrot_pmc_new(interp, enum_class_Hash);
if (PMC_IS_NULL(glb)) {
temp_globals = PMCNULL;
Modified: branches/boehm_gc_2/src/pmc/fixedbooleanarray.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/fixedbooleanarray.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/fixedbooleanarray.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -74,7 +74,7 @@
unsigned char *bit_array;
GET_ATTR_bit_array(INTERP, SELF, bit_array);
if (bit_array)
- mem_sys_free(bit_array);
+ mem_gc_free(INTERP, bit_array);
}
/*
@@ -90,7 +90,7 @@
VTABLE PMC *clone() {
unsigned char * my_bit_array, * clone_bit_array;
UINTVAL resize_threshold, size;
- PMC * const dest = pmc_new(INTERP, SELF->vtable->base_type);
+ PMC * const dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
GET_ATTR_bit_array(INTERP, SELF, my_bit_array);
GET_ATTR_size(INTERP, SELF, size);
@@ -102,7 +102,7 @@
SET_ATTR_size(INTERP, dest, size);
SET_ATTR_resize_threshold(INTERP, dest, resize_threshold);
- clone_bit_array = (unsigned char*)mem_sys_allocate(size_in_bytes);
+ clone_bit_array = mem_gc_allocate_n_typed(INTERP, size_in_bytes, unsigned char);
mem_sys_memcopy(clone_bit_array, my_bit_array, size_in_bytes);
SET_ATTR_bit_array(INTERP, dest, clone_bit_array);
@@ -296,7 +296,7 @@
*/
VTABLE PMC *get_pmc_keyed_int(INTVAL key) {
- PMC * const ret = pmc_new(INTERP, enum_class_Boolean);
+ PMC * const ret = Parrot_pmc_new(INTERP, enum_class_Boolean);
const INTVAL val = SELF.get_integer_keyed_int(key);
VTABLE_set_integer_native(INTERP, ret, val);
return ret;
@@ -330,6 +330,7 @@
VTABLE void set_integer_native(INTVAL size) {
const size_t size_in_bytes = get_size_in_bytes(size);
UINTVAL old_size;
+ unsigned char *bit_array;
GET_ATTR_size(INTERP, SELF, old_size);
@@ -339,8 +340,9 @@
SET_ATTR_size(INTERP, SELF, size);
SET_ATTR_resize_threshold(INTERP, SELF, size_in_bytes * BITS_PER_CHAR);
- SET_ATTR_bit_array(INTERP, SELF,
- (unsigned char*)mem_sys_allocate_zeroed(size_in_bytes));
+ bit_array = mem_gc_allocate_n_typed(INTERP, size_in_bytes, unsigned char);
+ memset(bit_array, 0, size_in_bytes);
+ SET_ATTR_bit_array(INTERP, SELF, bit_array);
}
/*
@@ -427,7 +429,7 @@
VTABLE void set_string_keyed_int(INTVAL key, STRING *value) {
INTVAL tempInt;
- PMC * const tempPMC = pmc_new(INTERP, enum_class_Boolean);
+ PMC * const tempPMC = Parrot_pmc_new(INTERP, enum_class_Boolean);
VTABLE_set_string_native(INTERP, tempPMC, value);
tempInt = VTABLE_get_integer(INTERP, tempPMC);
@@ -493,7 +495,7 @@
*/
VTABLE PMC *get_iter() {
- return pmc_new_init(INTERP, enum_class_ArrayIterator, SELF);
+ return Parrot_pmc_new_init(INTERP, enum_class_ArrayIterator, SELF);
}
Modified: branches/boehm_gc_2/src/pmc/fixedfloatarray.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/fixedfloatarray.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/fixedfloatarray.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -43,7 +43,7 @@
FLOATVAL *float_array;
GET_ATTR_float_array(INTERP, SELF, float_array);
if (float_array)
- mem_sys_free(float_array);
+ mem_gc_free(INTERP, float_array);
}
/*
@@ -60,7 +60,7 @@
INTVAL size;
FLOATVAL *self_float_array, *dest_float_array;
size_t mem_size;
- PMC * const dest = pmc_new(INTERP, SELF->vtable->base_type);
+ PMC * const dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
GET_ATTR_float_array(INTERP, SELF, self_float_array);
if (!self_float_array)
@@ -70,7 +70,7 @@
SET_ATTR_size(INTERP, dest, size);
mem_size = size * sizeof (FLOATVAL);
- dest_float_array = (FLOATVAL*)mem_sys_allocate(mem_size);
+ dest_float_array = (FLOATVAL*)Parrot_gc_allocate_memory_chunk(INTERP, mem_size);
mem_sys_memcopy(dest_float_array, self_float_array, mem_size);
SET_ATTR_float_array(INTERP, dest, dest_float_array);
PObj_custom_destroy_SET(dest);
@@ -89,7 +89,7 @@
*/
VTABLE PMC *get_iter() {
- return pmc_new_init(INTERP, enum_class_ArrayIterator, SELF);
+ return Parrot_pmc_new_init(INTERP, enum_class_ArrayIterator, SELF);
}
/*
@@ -248,7 +248,7 @@
*/
VTABLE PMC *get_pmc_keyed_int(INTVAL key) {
- PMC * const ret = pmc_new(INTERP, enum_class_Float);
+ PMC * const ret = Parrot_pmc_new(INTERP, enum_class_Float);
const FLOATVAL val = SELF.get_number_keyed_int(key);
VTABLE_set_number_native(INTERP, ret, val);
@@ -289,7 +289,7 @@
SET_ATTR_size(INTERP, SELF, new_size);
SET_ATTR_float_array(INTERP, SELF,
- mem_allocate_n_typed(new_size, FLOATVAL));
+ mem_gc_allocate_n_typed(INTERP, new_size, FLOATVAL));
PObj_custom_destroy_SET(SELF);
}
@@ -374,7 +374,7 @@
VTABLE void set_string_keyed_int(INTVAL key, STRING *value) {
FLOATVAL tempNum;
- PMC * const tempPMC = pmc_new(INTERP, enum_class_Float);
+ PMC * const tempPMC = Parrot_pmc_new(INTERP, enum_class_Float);
VTABLE_set_string_native(INTERP, tempPMC, value);
tempNum = VTABLE_get_number(INTERP, tempPMC);
Modified: branches/boehm_gc_2/src/pmc/fixedintegerarray.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/fixedintegerarray.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/fixedintegerarray.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -57,7 +57,7 @@
INTVAL* int_array;
GET_ATTR_int_array(INTERP, SELF, int_array);
if (int_array)
- mem_sys_free(int_array);
+ Parrot_gc_free_memory_chunk(INTERP, int_array);
}
/*
@@ -81,8 +81,8 @@
INTVAL * int_array;
PMC * const dest =
PObj_constant_TEST(SELF)
- ? constant_pmc_new(INTERP, SELF->vtable->base_type)
- : pmc_new(INTERP, SELF->vtable->base_type);
+ ? Parrot_pmc_new_constant(INTERP, SELF->vtable->base_type)
+ : Parrot_pmc_new(INTERP, SELF->vtable->base_type);
GET_ATTR_int_array(INTERP, SELF, int_array);
@@ -92,7 +92,7 @@
GET_ATTR_size(INTERP, SELF, size);
- dest_int_array = mem_allocate_n_typed(size, INTVAL);
+ dest_int_array = mem_gc_allocate_n_typed(INTERP, size, INTVAL);
SET_ATTR_size(INTERP, dest, size);
SET_ATTR_int_array(INTERP, dest, dest_int_array);
@@ -294,7 +294,7 @@
*/
VTABLE PMC *get_pmc_keyed_int(INTVAL key) {
- PMC * const ret = pmc_new(INTERP, enum_class_Integer);
+ PMC * const ret = Parrot_pmc_new(INTERP, enum_class_Integer);
const INTVAL val = SELF.get_integer_keyed_int(key);
VTABLE_set_integer_native(INTERP, ret, val);
return ret;
@@ -338,7 +338,7 @@
SET_ATTR_size(INTERP, SELF, size);
GET_ATTR_int_array(INTERP, SELF, int_array);
SET_ATTR_int_array(INTERP, SELF,
- mem_realloc_n_typed(int_array, size, INTVAL));
+ mem_gc_realloc_n_typed(INTERP, int_array, size, INTVAL));
PObj_custom_destroy_SET(SELF);
}
@@ -422,10 +422,10 @@
VTABLE void set_string_keyed_int(INTVAL key, STRING *value) {
INTVAL tempInt;
- PMC * const tempPMC = temporary_pmc_new(INTERP, enum_class_Integer);
+ PMC * const tempPMC = Parrot_pmc_new_temporary(INTERP, enum_class_Integer);
VTABLE_set_string_native(INTERP, tempPMC, value);
tempInt = VTABLE_get_integer(INTERP, tempPMC);
- temporary_pmc_free(interp, tempPMC);
+ Parrot_pmc_free_temporary(interp, tempPMC);
SELF.set_integer_keyed_int(key, tempInt);
}
@@ -532,7 +532,7 @@
*/
VTABLE PMC *get_iter() {
- return pmc_new_init(INTERP, enum_class_ArrayIterator, SELF);
+ return Parrot_pmc_new_init(INTERP, enum_class_ArrayIterator, SELF);
}
/*
Modified: branches/boehm_gc_2/src/pmc/fixedpmcarray.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/fixedpmcarray.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/fixedpmcarray.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -88,7 +88,7 @@
VTABLE void destroy() {
if (PMC_array(SELF))
- mem_sys_free(PMC_array(SELF));
+ mem_gc_free(INTERP, PMC_array(SELF));
}
/*
@@ -102,12 +102,12 @@
*/
VTABLE PMC *clone() {
- PMC * const dest = pmc_new(INTERP, SELF->vtable->base_type);
+ PMC * const dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
const INTVAL size = PMC_size(SELF);
if (size) {
PMC_size(dest) = size;
- PMC_array(dest) = mem_allocate_n_typed(size, PMC *);
+ PMC_array(dest) = mem_gc_allocate_n_zeroed_typed(INTERP, size, PMC *);
mem_copy_n_typed(PMC_array(dest), PMC_array(SELF), size, PMC *);
PObj_custom_mark_destroy_SETALL(dest);
}
@@ -346,7 +346,7 @@
box = SELF.get_pmc_keyed_int(k);
if (box == NULL)
- box = pmc_new(INTERP, enum_class_Undef);
+ box = Parrot_pmc_new(INTERP, enum_class_Undef);
return VTABLE_get_pmc_keyed(INTERP, box, nextkey);
}
@@ -377,7 +377,7 @@
_("FixedPMCArray: Cannot set array size to a negative number"));
PMC_size(SELF) = size;
- data = mem_allocate_n_typed(size, PMC *);
+ data = mem_gc_allocate_n_zeroed_typed(INTERP, size, PMC *);
for (i = 0; i < size; i++)
data[i] = PMCNULL;
@@ -397,10 +397,10 @@
_("Can't set self from this type"));
if (PMC_array(SELF))
- mem_sys_free(PMC_array(SELF));
+ mem_gc_free(INTERP, PMC_array(SELF));
size = PMC_size(SELF) = VTABLE_elements(INTERP, value);
- PMC_array(SELF) = mem_allocate_n_zeroed_typed(size, PMC *);
+ PMC_array(SELF) = mem_gc_allocate_n_zeroed_typed(INTERP, size, PMC *);
for (i = 0; i < size; i++)
(PMC_array(SELF))[i] = VTABLE_get_pmc_keyed_int(INTERP, value, i);
@@ -418,7 +418,7 @@
*/
VTABLE void set_integer_keyed_int(INTVAL key, INTVAL value) {
- PMC * const val = pmc_new(INTERP, Parrot_get_ctx_HLL_type(INTERP,
+ PMC * const val = Parrot_pmc_new(INTERP, Parrot_get_ctx_HLL_type(INTERP,
enum_class_Integer));
VTABLE_set_integer_native(INTERP, val, value);
@@ -436,7 +436,7 @@
*/
VTABLE void set_integer_keyed(PMC *key, INTVAL value) {
- PMC * const val = pmc_new(INTERP, Parrot_get_ctx_HLL_type(INTERP,
+ PMC * const val = Parrot_pmc_new(INTERP, Parrot_get_ctx_HLL_type(INTERP,
enum_class_Integer));
VTABLE_set_integer_native(INTERP, val, value);
@@ -457,7 +457,7 @@
*/
VTABLE void set_number_keyed_int(INTVAL key, FLOATVAL value) {
- PMC * const val = pmc_new(INTERP, Parrot_get_ctx_HLL_type(INTERP,
+ PMC * const val = Parrot_pmc_new(INTERP, Parrot_get_ctx_HLL_type(INTERP,
enum_class_Float));
VTABLE_set_number_native(INTERP, val, value);
@@ -487,7 +487,7 @@
/* TT #1295: autovivify an Array and insert it in SELF */
if (!box)
- box = pmc_new(INTERP, SELF.type());
+ box = Parrot_pmc_new(INTERP, SELF.type());
VTABLE_set_number_keyed(INTERP, box, nextkey, value);
}
@@ -504,7 +504,7 @@
*/
VTABLE void set_string_keyed_int(INTVAL key, STRING *value) {
- PMC * const val = pmc_new(INTERP, Parrot_get_ctx_HLL_type(INTERP,
+ PMC * const val = Parrot_pmc_new(INTERP, Parrot_get_ctx_HLL_type(INTERP,
enum_class_String));
VTABLE_set_string_native(INTERP, val, value);
@@ -523,7 +523,7 @@
*/
VTABLE void set_string_keyed(PMC *key, STRING *value) {
- PMC * const val = pmc_new(INTERP, Parrot_get_ctx_HLL_type(INTERP,
+ PMC * const val = Parrot_pmc_new(INTERP, Parrot_get_ctx_HLL_type(INTERP,
enum_class_String));
VTABLE_set_string_native(INTERP, val, value);
@@ -575,7 +575,7 @@
/* TT #1295: autovivify an Array and insert it in SELF */
if (!box)
- box = pmc_new(INTERP, SELF.type());
+ box = Parrot_pmc_new(INTERP, SELF.type());
VTABLE_set_pmc_keyed(INTERP, box, nextkey, value);
}
@@ -632,7 +632,7 @@
*/
VTABLE PMC *get_iter() {
- return pmc_new_init(INTERP, enum_class_ArrayIterator, SELF);
+ return Parrot_pmc_new_init(INTERP, enum_class_ArrayIterator, SELF);
}
/*
Modified: branches/boehm_gc_2/src/pmc/fixedstringarray.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/fixedstringarray.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/fixedstringarray.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -60,7 +60,7 @@
GET_ATTR_str_array(INTERP, SELF, str_array);
if (str_array)
- mem_sys_free(str_array);
+ mem_gc_free(INTERP, str_array);
}
/*
@@ -76,7 +76,7 @@
VTABLE PMC *clone() {
STRING **my_str_array, **dest_str_array;
- PMC *const dest = pmc_new(INTERP, SELF->vtable->base_type);
+ PMC *const dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
GET_ATTR_str_array(INTERP, SELF, my_str_array);
@@ -87,7 +87,7 @@
GET_ATTR_size(INTERP, SELF, size);
mem_size = size * sizeof (STRING *);
- dest_str_array = mem_allocate_n_zeroed_typed(size, STRING *);
+ dest_str_array = mem_gc_allocate_n_zeroed_typed(INTERP, size, STRING *);
mem_sys_memcopy(dest_str_array, my_str_array, mem_size);
SET_ATTR_str_array(INTERP, dest, dest_str_array);
SET_ATTR_size(INTERP, dest, size);
@@ -150,7 +150,7 @@
*/
VTABLE PMC *get_iter() {
- return pmc_new_init(INTERP, enum_class_ArrayIterator, SELF);
+ return Parrot_pmc_new_init(INTERP, enum_class_ArrayIterator, SELF);
}
/*
@@ -296,7 +296,7 @@
*/
VTABLE PMC *get_pmc_keyed_int(INTVAL key) {
- PMC * const ret = pmc_new(INTERP, enum_class_String);
+ PMC * const ret = Parrot_pmc_new(INTERP, enum_class_String);
STRING * const val = SELF.get_string_keyed_int(key);
VTABLE_set_string_native(INTERP, ret, val);
@@ -341,7 +341,7 @@
SET_ATTR_size(INTERP, SELF, new_size);
SET_ATTR_str_array(INTERP, SELF,
- (STRING**)mem_sys_allocate_zeroed(new_size * sizeof (STRING*)));
+ mem_gc_allocate_n_zeroed_typed(INTERP, new_size, STRING*));
PObj_custom_mark_destroy_SETALL(SELF);
}
Modified: branches/boehm_gc_2/src/pmc/float.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/float.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/float.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -47,7 +47,7 @@
VTABLE PMC *clone() {
FLOATVAL fv;
- PMC * const dest = pmc_new(INTERP, SELF->vtable->base_type);
+ PMC * const dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
GET_ATTR_fv(INTERP, SELF, fv);
SET_ATTR_fv(INTERP, dest, fv);
return dest;
@@ -134,12 +134,12 @@
*/
VTABLE void set_integer_native(INTVAL value) {
- pmc_reuse(INTERP, SELF, enum_class_Integer, 0);
+ Parrot_pmc_reuse(INTERP, SELF, enum_class_Integer, 0);
SELF.set_integer_native(value);
}
VTABLE void set_bool(INTVAL value) {
- pmc_reuse(INTERP, SELF, enum_class_Boolean, 0);
+ Parrot_pmc_reuse(INTERP, SELF, enum_class_Boolean, 0);
SELF.set_bool(value);
}
@@ -170,7 +170,7 @@
*/
VTABLE void set_string_native(STRING *value) {
- pmc_reuse(INTERP, SELF, enum_class_String, 0);
+ Parrot_pmc_reuse(INTERP, SELF, enum_class_String, 0);
SELF.set_string_native(value);
}
@@ -204,7 +204,7 @@
VTABLE PMC *neg(PMC *dest) {
const FLOATVAL a = -SELF.get_number();
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_number_native(INTERP, dest, a);
return dest;
@@ -331,7 +331,7 @@
VTABLE PMC *absolute(PMC *dest) {
const FLOATVAL a = fabs(SELF.get_number());
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_number_native(INTERP, dest, a);
return dest;
@@ -416,110 +416,110 @@
*/
METHOD acos() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
SET_ATTR_fv(INTERP, d, acos(SELF.get_number()));
RETURN(PMC *d);
}
METHOD cos() {
- PMC * const d = pmc_new(INTERP,
+ PMC * const d = Parrot_pmc_new(INTERP,
Parrot_get_ctx_HLL_type(INTERP, enum_class_Float));
SET_ATTR_fv(INTERP, d, cos(SELF.get_number()));
RETURN(PMC *d);
}
METHOD asec() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
SET_ATTR_fv(INTERP, d, acos(1.0 / SELF.get_number()));
RETURN(PMC *d);
}
METHOD asin() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
SET_ATTR_fv(INTERP, d, asin(SELF.get_number()));
RETURN(PMC *d);
}
METHOD atan() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
SET_ATTR_fv(INTERP, d, atan(SELF.get_number()));
RETURN(PMC *d);
}
METHOD atan2(PMC *val) {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
SET_ATTR_fv(INTERP, d, atan2(SELF.get_number(), VTABLE_get_number(INTERP, val)));
RETURN(PMC *d);
}
METHOD cosh() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
SET_ATTR_fv(INTERP, d, cosh(SELF.get_number()));
RETURN(PMC *d);
}
METHOD exp() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
SET_ATTR_fv(INTERP, d, exp(SELF.get_number()));
RETURN(PMC *d);
}
METHOD ln() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
SET_ATTR_fv(INTERP, d, log(SELF.get_number()));
RETURN(PMC *d);
}
METHOD log10() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
SET_ATTR_fv(INTERP, d, log10(SELF.get_number()));
RETURN(PMC *d);
}
METHOD log2() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
SET_ATTR_fv(INTERP, d, log(SELF.get_number()) / log(2.0));
RETURN(PMC *d);
}
METHOD sec() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
SET_ATTR_fv(INTERP, d, 1.0 / cos(SELF.get_number()));
RETURN(PMC *d);
}
METHOD sech() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
SET_ATTR_fv(INTERP, d, 1.0 / cosh(SELF.get_number()));
RETURN(PMC *d);
}
METHOD sin() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
SET_ATTR_fv(INTERP, d, sin(SELF.get_number()));
RETURN(PMC *d);
}
METHOD sinh() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
SET_ATTR_fv(INTERP, d, sinh(SELF.get_number()));
RETURN(PMC *d);
}
METHOD tan() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
SET_ATTR_fv(INTERP, d, tan(SELF.get_number()));
RETURN(PMC *d);
}
METHOD tanh() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
SET_ATTR_fv(INTERP, d, tanh(SELF.get_number()));
RETURN(PMC *d);
}
METHOD sqrt() {
- PMC * const d = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ PMC * const d = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
SET_ATTR_fv(INTERP, d, sqrt(SELF.get_number()));
RETURN(PMC *d);
}
Modified: branches/boehm_gc_2/src/pmc/hash.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/hash.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/hash.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -106,7 +106,7 @@
*/
VTABLE PMC *clone() {
- PMC * const dest = pmc_new(INTERP, SELF->vtable->base_type);
+ PMC * const dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
parrot_hash_clone(INTERP, (Hash *)SELF.get_pointer(),
(Hash *)VTABLE_get_pointer(INTERP, dest));
@@ -445,7 +445,7 @@
box = hash_value_to_pmc(INTERP, hash, b->value);
else {
/* autovivify an Hash */
- box = pmc_new(INTERP, SELF.type());
+ box = Parrot_pmc_new(INTERP, SELF.type());
parrot_hash_put(INTERP, hash, keystr,
hash_value_from_pmc(INTERP, hash, box));
}
@@ -625,7 +625,7 @@
box = hash_value_to_pmc(INTERP, hash, b->value);
else {
/* autovivify an Hash */
- box = pmc_new(INTERP, SELF.type());
+ box = Parrot_pmc_new(INTERP, SELF.type());
parrot_hash_put(INTERP, hash, keystr,
hash_value_from_pmc(INTERP, hash, box));
}
@@ -753,7 +753,7 @@
/* autovivify an Hash */
if (PMC_IS_NULL(box))
- box = pmc_new(INTERP, SELF.type());
+ box = Parrot_pmc_new(INTERP, SELF.type());
VTABLE_set_number_keyed(INTERP, box, nextkey, value);
}
@@ -799,7 +799,7 @@
box = hash_value_to_pmc(INTERP, hash, b->value);
else {
/* autovivify an Hash */
- box = pmc_new(INTERP, SELF.type());
+ box = Parrot_pmc_new(INTERP, SELF.type());
parrot_hash_put(INTERP, hash, keystr,
hash_value_from_pmc(INTERP, hash, box));
}
@@ -994,7 +994,7 @@
*/
VTABLE PMC *get_iter() {
- return pmc_new_init(INTERP, enum_class_HashIterator, SELF);
+ return Parrot_pmc_new_init(INTERP, enum_class_HashIterator, SELF);
}
/*
Modified: branches/boehm_gc_2/src/pmc/hashiterator.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/hashiterator.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/hashiterator.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -229,7 +229,7 @@
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS,
"StopIteration");
- ret = pmc_new(INTERP, enum_class_HashIteratorKey);
+ ret = Parrot_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, attrs->bucket);
@@ -246,7 +246,7 @@
VTABLE STRING* shift_string() {
PMC * const key = SELF.shift_pmc();
STRING * const ret = VTABLE_get_string(INTERP, key);
- temporary_pmc_free(INTERP, key);
+ Parrot_pmc_free_temporary(INTERP, key);
return ret;
}
Modified: branches/boehm_gc_2/src/pmc/imageio.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/imageio.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/imageio.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -10,6 +10,8 @@
Freezes and thaws other PMCs.
+=cut
+
*/
#define GROW_TO_16_BYTE_BOUNDARY(size) ((size) + ((size) % 16 ? 16 - (size) % 16 : 0))
@@ -123,12 +125,12 @@
PARROT_INLINE
static PMC*
id_list_get(PARROT_INTERP, PMC *io, UINTVAL id) {
- return VTABLE_get_pmc_keyed_int(interp, PARROT_IMAGEIO(io)->id_list, id);
+ return VTABLE_get_pmc_keyed_int(interp, PARROT_IMAGEIO(io)->todo, id - 1);
}
PARROT_INLINE
-static void
-visit_todo_list_thaw(PARROT_INTERP, SHIM(PMC* pmc_not_used), ARGIN(PMC* info))
+static PMC *
+visit_todo_list_thaw(PARROT_INTERP, ARGIN(PMC* info))
{
UINTVAL n = VTABLE_shift_integer(interp, info);
UINTVAL id = PackID_get_PMCID(n);
@@ -148,15 +150,12 @@
if (type <= 0 || type > interp->n_vtable_max)
Parrot_ex_throw_from_c_args(interp, NULL, 1, "Unknown PMC type to thaw %d", type);
- pmc = pmc_new_noinit(interp, type);
+ pmc = Parrot_pmc_new_noinit(interp, type);
VTABLE_thaw(interp, pmc, info);
{
PMC * const todo = PARROT_IMAGEIO(info)->todo;
- PMC * const id_list = PARROT_IMAGEIO(info)->id_list;
- VTABLE_set_pmc_keyed_int(interp, id_list, id, pmc);
- /* remember nested aggregates depth first */
- VTABLE_push_pmc(interp, todo, pmc);
+ VTABLE_set_pmc_keyed_int(interp, todo, id - 1, pmc);
}
}
break;
@@ -165,7 +164,7 @@
break;
}
- *(PARROT_IMAGEIO(info)->thaw_ptr) = pmc;
+ return pmc;
}
static void
@@ -207,65 +206,14 @@
}
}
-static void
-visit_loop_todo_list(PARROT_INTERP, PMC *current, PMC *info)
-{
- PMC * const todo = PARROT_IMAGEIO(info)->todo;
- const int thawing = PARROT_IMAGEIO(info)->what == VISIT_THAW_NORMAL;
-
- (PARROT_IMAGEIO(info)->visit_pmc_now)(interp, current, info);
-
- /* can't cache upper limit, visit may append items */
- while (VTABLE_get_bool(interp, todo)) {
- current = VTABLE_pop_pmc(interp, todo);
- if (!current)
- Parrot_ex_throw_from_c_args(interp, NULL, 1,
- "NULL current PMC in visit_loop_todo_list");
-
- PARROT_ASSERT(current->vtable);
-
- VTABLE_visit(interp, current, info);
-
- VISIT_PMC(interp, info, PMC_metadata(current));
- }
-
- if (thawing)
- /* we're done reading the image */
- PARROT_ASSERT(!INFO_HAS_DATA(info));
-
- if (thawing) {
- /* on thawing call thawfinish for each processed PMC */
- const INTVAL n = VTABLE_elements(interp, PARROT_IMAGEIO(info)->id_list);
- int i;
-
- /*
- * Thaw in reverse order. We have to fully thaw younger PMCs
- * before use them in older.
- *
- * XXX There are no younger or older pmcs in a directed graph
- * that allows cycles. Any code that requires a specific
- * order here is likely broken.
- */
- for (i = n-1; i >= 0; --i) {
- current = VTABLE_get_pmc_keyed_int(interp, PARROT_IMAGEIO(info)->id_list, i);
- if (!PMC_IS_NULL(current))
- VTABLE_thawfinish(interp, current, info);
- }
- }
-}
-
pmclass ImageIO auto_attrs {
- ATTR visit_f visit_pmc_now;
ATTR Buffer *buffer; /* buffer to store the image */
ATTR size_t pos; /* current read/write position in buffer */
ATTR size_t input_length;
ATTR INTVAL what;
- ATTR PMC **thaw_ptr; /* where to thaw a new PMC */
ATTR PMC *seen; /* seen hash */
ATTR PMC *todo; /* todo list */
- ATTR PMC *id_list; /* seen list used by thaw */
ATTR UINTVAL id; /* freze ID of PMC */
- ATTR INTVAL extra_flags; /* concerning to extra */
ATTR struct PackFile *pf;
/*
@@ -288,13 +236,10 @@
*/
VTABLE void init() {
- PARROT_IMAGEIO(SELF)->thaw_ptr = NULL;
PARROT_IMAGEIO(SELF)->buffer = NULL;
- PARROT_IMAGEIO(SELF)->todo = pmc_new(INTERP, enum_class_ResizablePMCArray);
+ PARROT_IMAGEIO(SELF)->todo = Parrot_pmc_new(INTERP, enum_class_ResizablePMCArray);
PARROT_IMAGEIO(SELF)->seen = PMCNULL;
- PARROT_IMAGEIO(SELF)->id_list = PMCNULL;
PARROT_IMAGEIO(SELF)->id = 0;
- PARROT_IMAGEIO(SELF)->extra_flags = EXTRA_IS_NULL;
PARROT_IMAGEIO(SELF)->pf = PackFile_new(INTERP, 0);
PObj_custom_mark_destroy_SETALL(SELF);
@@ -324,10 +269,11 @@
*/
VTABLE void mark() {
- Parrot_gc_mark_PObj_alive(INTERP, (PObj *)(PARROT_IMAGEIO(SELF)->buffer));
+ PObj * const buffer = (PObj *)(PARROT_IMAGEIO(SELF)->buffer);
+ if (buffer)
+ Parrot_gc_mark_PObj_alive(INTERP, (PObj *)(PARROT_IMAGEIO(SELF)->buffer));
Parrot_gc_mark_PMC_alive(INTERP, PARROT_IMAGEIO(SELF)->todo);
Parrot_gc_mark_PMC_alive(INTERP, PARROT_IMAGEIO(SELF)->seen);
- Parrot_gc_mark_PMC_alive(INTERP, PARROT_IMAGEIO(SELF)->id_list);
}
/*
@@ -345,21 +291,34 @@
PARROT_IMAGEIO(SELF)->buffer,
PARROT_IMAGEIO(SELF)->pos);
}
+
/*
+=item C<VTABLE PMC *get_pmc()>
+
+Gets the result PMC after a thaw.
+
+=cut
+
+*/
+
+ VTABLE PMC *get_pmc() {
+ return VTABLE_get_pmc_keyed_int(INTERP, (PARROT_IMAGEIO(SELF))->todo, 0);
+ }
+
/*
-=item C<VTABLE void set_pointer()>
+=item C<VTABLE PMC *get_iter()>
-Sets the location where to thaw a new PMC.
+Get the C<todo> list for this freeze/thaw for iterating over.
=cut
*/
-VTABLE void set_pointer(void* value) {
- PARROT_IMAGEIO(SELF)->thaw_ptr = (PMC**)value;
-}
+ VTABLE PMC *get_iter() {
+ return PARROT_IMAGEIO(SELF)->todo;
+ }
/*
@@ -371,9 +330,9 @@
*/
-VTABLE INTVAL get_integer() {
- return PARROT_IMAGEIO(SELF)->what;
-}
+ VTABLE INTVAL get_integer() {
+ return PARROT_IMAGEIO(SELF)->what;
+ }
/*
@@ -385,11 +344,11 @@
*/
-VTABLE void push_integer(INTVAL v) {
- size_t len = PF_size_integer() * sizeof (opcode_t);
- ensure_buffer_size(interp, SELF, len);
- SET_VISIT_CURSOR(SELF, (char *)PF_store_integer(GET_VISIT_CURSOR(SELF), v));
-}
+ VTABLE void push_integer(INTVAL v) {
+ size_t len = PF_size_integer() * sizeof (opcode_t);
+ ensure_buffer_size(interp, SELF, len);
+ SET_VISIT_CURSOR(SELF, (char *)PF_store_integer(GET_VISIT_CURSOR(SELF), v));
+ }
/*
@@ -402,12 +361,12 @@
*/
-VTABLE void push_float(FLOATVAL v)
-{
- size_t len = PF_size_number() * sizeof (opcode_t);
- ensure_buffer_size(interp, SELF, len);
- SET_VISIT_CURSOR(SELF, (char *)PF_store_number(GET_VISIT_CURSOR(SELF), &v));
-}
+ VTABLE void push_float(FLOATVAL v)
+ {
+ size_t len = PF_size_number() * sizeof (opcode_t);
+ ensure_buffer_size(interp, SELF, len);
+ SET_VISIT_CURSOR(SELF, (char *)PF_store_number(GET_VISIT_CURSOR(SELF), &v));
+ }
/*
@@ -420,12 +379,12 @@
*/
-VTABLE void push_string(STRING *v)
-{
- size_t len = PF_size_string(v) * sizeof (opcode_t);
- ensure_buffer_size(INTERP, SELF, len);
- SET_VISIT_CURSOR(SELF, (char *)PF_store_string(GET_VISIT_CURSOR(SELF), v));
-}
+ VTABLE void push_string(STRING *v)
+ {
+ size_t len = PF_size_string(v) * sizeof (opcode_t);
+ ensure_buffer_size(INTERP, SELF, len);
+ SET_VISIT_CURSOR(SELF, (char *)PF_store_string(GET_VISIT_CURSOR(SELF), v));
+ }
/*
@@ -438,10 +397,9 @@
*/
-VTABLE void push_pmc(PMC *v) {
- VTABLE_set_pointer(interp, SELF, &v);
- (PARROT_IMAGEIO(SELF)->visit_pmc_now)(INTERP, v, SELF);
-}
+ VTABLE void push_pmc(PMC *v) {
+ visit_todo_list_freeze(INTERP, v, SELF);
+ }
/*
@@ -453,14 +411,14 @@
*/
-VTABLE INTVAL shift_integer()
-{
- opcode_t *pos = GET_VISIT_CURSOR(SELF);
- const INTVAL i = PF_fetch_integer(PARROT_IMAGEIO(SELF)->pf, (const opcode_t **)&pos);
- SET_VISIT_CURSOR(SELF, (char *)pos);
- BYTECODE_SHIFT_OK(SELF);
- return i;
-}
+ VTABLE INTVAL shift_integer()
+ {
+ opcode_t *pos = GET_VISIT_CURSOR(SELF);
+ const INTVAL i = PF_fetch_integer(PARROT_IMAGEIO(SELF)->pf, (const opcode_t **)&pos);
+ SET_VISIT_CURSOR(SELF, (char *)pos);
+ BYTECODE_SHIFT_OK(SELF);
+ return i;
+ }
/*
@@ -473,13 +431,13 @@
*/
-VTABLE FLOATVAL shift_float() {
- opcode_t *pos = GET_VISIT_CURSOR(SELF);
- const FLOATVAL f = PF_fetch_number(PARROT_IMAGEIO(SELF)->pf, (const opcode_t **)&pos);
- SET_VISIT_CURSOR(SELF, (char *)pos);
- BYTECODE_SHIFT_OK(SELF);
- return f;
-}
+ VTABLE FLOATVAL shift_float() {
+ opcode_t *pos = GET_VISIT_CURSOR(SELF);
+ const FLOATVAL f = PF_fetch_number(PARROT_IMAGEIO(SELF)->pf, (const opcode_t **)&pos);
+ SET_VISIT_CURSOR(SELF, (char *)pos);
+ BYTECODE_SHIFT_OK(SELF);
+ return f;
+ }
/*
@@ -492,14 +450,15 @@
*/
-VTABLE STRING *shift_string()
-{
- opcode_t *pos = GET_VISIT_CURSOR(SELF);
- STRING * const s = PF_fetch_string(interp, PARROT_IMAGEIO(SELF)->pf, (const opcode_t **)&pos);
- SET_VISIT_CURSOR(SELF, (char *)pos);
- BYTECODE_SHIFT_OK(SELF);
- return s;
-}
+ VTABLE STRING *shift_string()
+ {
+ opcode_t *pos = GET_VISIT_CURSOR(SELF);
+ STRING * const s = PF_fetch_string(interp, PARROT_IMAGEIO(SELF)->pf,
+ (const opcode_t **)&pos);
+ SET_VISIT_CURSOR(SELF, (char *)pos);
+ BYTECODE_SHIFT_OK(SELF);
+ return s;
+ }
/*
@@ -511,40 +470,35 @@
*/
-VTABLE PMC *shift_pmc() {
- PMC *result;
- VTABLE_set_pointer(interp, SELF, &result);
- (PARROT_IMAGEIO(SELF)->visit_pmc_now)(interp, NULL, SELF);
- return result;
-}
+ VTABLE PMC *shift_pmc() {
+ return visit_todo_list_thaw(INTERP, SELF);
+ }
-VTABLE void set_pmc(PMC *p)
-{
+ VTABLE void set_pmc(PMC *p)
+ {
UINTVAL header_length = GROW_TO_16_BYTE_BOUNDARY(PACKFILE_HEADER_BYTES);
PARROT_IMAGEIO(SELF)->what = VISIT_FREEZE_NORMAL;
- PARROT_IMAGEIO(SELF)->visit_pmc_now = visit_todo_list_freeze;
create_buffer(INTERP, p, SELF);
ensure_buffer_size(INTERP, SELF, header_length);
mem_sys_memcopy(GET_VISIT_CURSOR(SELF),
PARROT_IMAGEIO(SELF)->pf->header, PACKFILE_HEADER_BYTES);
INC_VISIT_CURSOR(SELF, header_length);
- PARROT_IMAGEIO(SELF)->seen = pmc_new(INTERP, enum_class_Hash);
+ PARROT_IMAGEIO(SELF)->seen = Parrot_pmc_new(INTERP, enum_class_Hash);
VTABLE_set_pointer(INTERP, PARROT_IMAGEIO(SELF)->seen,
parrot_new_intval_hash(INTERP));
- visit_loop_todo_list(INTERP, p, SELF);
-}
+ visit_todo_list_freeze(INTERP, p, SELF);
+ Parrot_visit_loop_visit(INTERP, SELF);
+ }
-VTABLE void set_string_native(STRING *image) {
+ VTABLE void set_string_native(STRING *image) {
UINTVAL header_length = GROW_TO_16_BYTE_BOUNDARY(PACKFILE_HEADER_BYTES);
int unpacked_length;
PARROT_IMAGEIO(SELF)->what = VISIT_THAW_NORMAL;
- PARROT_IMAGEIO(SELF)->visit_pmc_now = visit_todo_list_thaw;
PARROT_IMAGEIO(SELF)->buffer = (Buffer *)image;
- PARROT_IMAGEIO(SELF)->id_list = pmc_new(INTERP, enum_class_ResizablePMCArray);
PARROT_ASSERT(image->_bufstart == image->strstart);
@@ -564,8 +518,13 @@
INC_VISIT_CURSOR(SELF, header_length);
}
- visit_loop_todo_list(interp, pmc, SELF);
-}
+ visit_todo_list_thaw(INTERP, SELF);
+ Parrot_visit_loop_visit(INTERP, SELF);
+
+ /* we're done reading the image */
+ PARROT_ASSERT(!INFO_HAS_DATA(SELF));
+ Parrot_visit_loop_thawfinish(INTERP, SELF);
+ }
/*
Added: branches/boehm_gc_2/src/pmc/imageiosize.pmc
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/boehm_gc_2/src/pmc/imageiosize.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -0,0 +1,237 @@
+/*
+Copyright (C) 2010, Parrot Foundation.
+$Id$
+
+=head1 NAME
+
+src/pmc/imageiosize.pmc - ImageIOSize PMC
+
+=head1 DESCRIPTION
+
+Gets the size of an ImageIO image without the allocation costs.
+
+=cut
+
+*/
+
+#define GROW_TO_16_BYTE_BOUNDARY(size) ((size) + ((size) % 16 ? 16 - (size) % 16 : 0))
+
+static void
+visit_todo_list_freeze(PARROT_INTERP, PMC* pmc, PMC* info) {
+ int is_new = 0;
+
+ if (!PMC_IS_NULL(pmc)) {
+ Hash *hash = (Hash *)VTABLE_get_pointer(interp, PARROT_IMAGEIOSIZE(info)->seen);
+ HashBucket * const b = parrot_hash_get_bucket(interp, hash, pmc);
+ is_new = !b;
+ }
+
+ VTABLE_push_integer(interp, info, 0);
+
+ if (is_new) {
+ Hash *hash = (Hash *)VTABLE_get_pointer(interp, PARROT_IMAGEIOSIZE(info)->seen);
+ parrot_hash_put(interp, hash, pmc, pmc);
+ VTABLE_push_integer(interp, info, pmc->vtable->base_type);
+ VTABLE_push_pmc(interp, PARROT_IMAGEIOSIZE(info)->todo, pmc);
+ VTABLE_freeze(interp, pmc, info);
+ }
+}
+
+pmclass ImageIOSize auto_attrs {
+ ATTR PMC *seen; /* seen hash */
+ ATTR PMC *todo; /* todo list */
+ ATTR struct PackFile *pf;
+ ATTR INTVAL size;
+
+/*
+
+=head1 VTABLES
+
+=over 4
+
+=cut
+
+*/
+
+/*
+
+=item C<void init()>
+
+Initializes the PMC.
+
+=cut
+
+*/
+ VTABLE void init() {
+ PARROT_IMAGEIOSIZE(SELF)->todo = Parrot_pmc_new(INTERP, enum_class_ResizablePMCArray);
+ PARROT_IMAGEIOSIZE(SELF)->pf = PackFile_new(INTERP, 0);
+ PARROT_IMAGEIOSIZE(SELF)->size = 0;
+
+ PARROT_IMAGEIOSIZE(SELF)->seen = Parrot_pmc_new(INTERP, enum_class_Hash);
+ VTABLE_set_pointer(INTERP, PARROT_IMAGEIOSIZE(SELF)->seen,
+ parrot_new_intval_hash(INTERP));
+
+ PObj_custom_mark_destroy_SETALL(SELF);
+ }
+
+
+/*
+
+=item C<void destroy()>
+
+Destroys the PMC.
+
+=cut
+
+*/
+ VTABLE void destroy() {
+ PackFile_destroy(INTERP, PARROT_IMAGEIOSIZE(SELF)->pf);
+ }
+
+/*
+
+=item C<void mark()>
+
+Marks the PMC as alive.
+
+=cut
+
+*/
+ VTABLE void mark() {
+ Parrot_gc_mark_PMC_alive(INTERP, PARROT_IMAGEIOSIZE(SELF)->todo);
+ Parrot_gc_mark_PMC_alive(INTERP, PARROT_IMAGEIOSIZE(SELF)->seen);
+ }
+
+/*
+
+=item C<VTABLE PMC *get_pmc()>
+
+Gets the result PMC after a thaw.
+
+=cut
+
+*/
+
+ VTABLE PMC *get_pmc() {
+ PMC *ret = Parrot_pmc_new(INTERP, enum_class_Integer);
+ VTABLE_set_integer_native(INTERP, ret, PARROT_IMAGEIOSIZE(SELF)->size);
+ return ret;
+ }
+
+/*
+
+=item C<VTABLE PMC *get_iter()>
+
+Get the C<todo> list for this freeze/thaw for iterating over.
+
+=cut
+
+*/
+
+ VTABLE PMC *get_iter() {
+ return PARROT_IMAGEIOSIZE(SELF)->todo;
+ }
+
+/*
+
+=item C<VTABLE INTVAL get_integer()>
+
+Returns the flags describing the visit action
+
+=cut
+
+*/
+
+ VTABLE INTVAL get_integer() {
+ return VISIT_FREEZE_NORMAL;
+ }
+
+/*
+
+=item C<VTABLE void push_integer(INTVAL v)>
+
+Pushes the integer C<v> onto the end of the image.
+
+=cut
+
+*/
+
+ VTABLE void push_integer(INTVAL v) {
+ size_t len = PF_size_integer() * sizeof (opcode_t);
+ PARROT_IMAGEIOSIZE(SELF)->size += len;
+ }
+
+
+/*
+
+=item C<VTABLE void push_float(FLOATVAL v)>
+
+Pushes the float C<v> onto the end of the image.
+
+=cut
+
+*/
+
+ VTABLE void push_float(FLOATVAL v)
+ {
+ size_t len = PF_size_number() * sizeof (opcode_t);
+ PARROT_IMAGEIOSIZE(SELF)->size += len;
+ }
+
+
+/*
+
+=item C<VTABLE void push_string(STRING *v)>
+
+Pushes the string C<*v> onto the end of the image.
+
+=cut
+
+*/
+
+ VTABLE void push_string(STRING *v)
+ {
+ size_t len = PF_size_string(v) * sizeof (opcode_t);
+ PARROT_IMAGEIOSIZE(SELF)->size += len;
+ }
+
+/*
+
+=item C<VTABLE void push_pmc(PMC *v)>
+
+Pushes a reference to pmc C<*v> onto the end of the image. If C<*v>
+hasn't been seen yet, it is also pushed onto the todo list.
+
+=cut
+
+*/
+
+ VTABLE void push_pmc(PMC *v) {
+ visit_todo_list_freeze(INTERP, v, SELF);
+ }
+
+ VTABLE void set_pmc(PMC *p)
+ {
+ UINTVAL header_length = GROW_TO_16_BYTE_BOUNDARY(PACKFILE_HEADER_BYTES);
+ PARROT_IMAGEIOSIZE(SELF)->size += header_length;
+
+ visit_todo_list_freeze(INTERP, p, SELF);
+ Parrot_visit_loop_visit(INTERP, SELF);
+ }
+
+/*
+
+=back
+
+=cut
+
+*/
+
+}
+
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
Modified: branches/boehm_gc_2/src/pmc/integer.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/integer.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/integer.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -38,7 +38,7 @@
/* Do an in-place upgrade to a Bignum of SELF and return a pointer
to it (which is probably redundant, but whatever). */
const INTVAL a = VTABLE_get_integer(interp, self);
- pmc_reuse(interp, self, enum_class_BigInt, 0);
+ Parrot_pmc_reuse(interp, self, enum_class_BigInt, 0);
VTABLE_set_integer_native(interp, self, a);
return self;
}
@@ -84,7 +84,7 @@
*/
VTABLE PMC *clone() {
- PMC * const clone = pmc_new(INTERP, SELF->vtable->base_type);
+ PMC * const clone = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
VTABLE_set_integer_native(INTERP, clone, SELF.get_integer());
return clone;
}
@@ -179,24 +179,6 @@
/*
-=item C<PMC *get_bignum()>
-
-Return a new BigInt PMC with the value of C<SELF>.
-
-=cut
-
-*/
-
- VTABLE PMC *get_bignum() {
- const INTVAL val = SELF.get_integer();
- PMC * const ret = pmc_new(INTERP, enum_class_BigInt);
- VTABLE_set_integer_native(INTERP, ret, val);
- return ret;
- }
-
-
-/*
-
=item C<STRING *get_string()>
=item C<STRING *get_repr()>
@@ -239,10 +221,6 @@
Morphs the integer to a C<Boolean> and sets the value from C<value>.
-=item C<void set_bigint_int(INTVAL value)>
-
-Morphs the integer to a C<BigInt> and sets the value from C<value>.
-
=item C<void set_string_native(STRING *value)>
Morphs the integer to a C<String> and sets the value from C<value>.
@@ -252,25 +230,20 @@
*/
VTABLE void set_number_native(FLOATVAL value) {
- pmc_reuse(INTERP, SELF, enum_class_Float, 0);
+ Parrot_pmc_reuse(INTERP, SELF, enum_class_Float, 0);
SELF.set_number_native(value);
}
VTABLE void set_bool(INTVAL value) {
- pmc_reuse(INTERP, SELF, enum_class_Boolean, 0);
+ Parrot_pmc_reuse(INTERP, SELF, enum_class_Boolean, 0);
SELF.set_bool(value);
}
- VTABLE void set_bignum_int(INTVAL value) {
- pmc_reuse(INTERP, SELF, enum_class_BigInt, 0);
- SELF.set_integer_native(value);
- }
-
VTABLE void set_string_native(STRING *value) {
- pmc_reuse(INTERP, SELF, enum_class_String, 0);
+ Parrot_pmc_reuse(INTERP, SELF, enum_class_String, 0);
SELF.set_string_native(value);
}
@@ -292,7 +265,7 @@
const INTVAL c = a + b;
if ((c^a) >= 0 || (c^b) >= 0) {
- dest = pmc_new(INTERP, VTABLE_type(interp, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(interp, SELF));
/* need this for e.g. Undef PMC */
VTABLE_set_integer_native(INTERP, dest, c);
@@ -301,7 +274,8 @@
else {
PMC * temp;
maybe_throw_overflow_error(interp);
- temp = VTABLE_get_bignum(interp, SELF);
+ temp = Parrot_pmc_new(interp, enum_class_BigInt);
+ VTABLE_set_integer_native(interp, temp, a);
return VTABLE_add(interp, temp, value, dest);
}
}
@@ -309,7 +283,7 @@
MULTI PMC *add(Complex value, PMC *dest) {
const INTVAL a = SELF.get_integer();
- dest = pmc_new(INTERP, VTABLE_type(INTERP, value));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, value));
VTABLE_set_number_native(INTERP, dest,
a + VTABLE_get_number_keyed_int(INTERP, value, 0));
@@ -323,13 +297,14 @@
MULTI PMC *add(BigInt value, PMC *dest) {
PMC *temp;
maybe_throw_overflow_error(interp);
- temp = VTABLE_get_bignum(interp, SELF);
+ temp = Parrot_pmc_new(interp, enum_class_BigInt);
+ VTABLE_set_integer_native(interp, temp, SELF.get_integer());
return VTABLE_add(interp, temp, value, dest);
}
MULTI PMC *add(DEFAULT value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(interp, value));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(interp, value));
VTABLE_set_number_native(INTERP, dest,
SELF.get_integer() + VTABLE_get_number(INTERP, value));
@@ -342,7 +317,7 @@
const INTVAL c = a + b;
if ((c^a) >= 0 || (c^b) >= 0) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_integer_native(INTERP, dest, c);
return dest;
@@ -350,7 +325,8 @@
else {
PMC *temp;
maybe_throw_overflow_error(interp);
- temp = VTABLE_get_bignum(interp, SELF);
+ temp = Parrot_pmc_new(interp, enum_class_BigInt);
+ VTABLE_set_integer_native(interp, temp, a);
return VTABLE_add_int(interp, temp, b, dest);
}
}
@@ -378,7 +354,7 @@
MULTI void i_add(Complex value) {
const INTVAL a = SELF.get_integer();
- pmc_reuse(INTERP, SELF, enum_class_Complex, 0);
+ Parrot_pmc_reuse(INTERP, SELF, enum_class_Complex, 0);
VTABLE_set_number_native(INTERP, SELF,
SELF.get_integer() + VTABLE_get_number(INTERP, value));
}
@@ -399,8 +375,8 @@
else {
PMC *temp;
maybe_throw_overflow_error(interp);
- temp = VTABLE_get_bignum(interp, SELF);
- VTABLE_i_add_int(interp, temp, b);
+ SELF = upgrade_self_to_bignum(interp, SELF);
+ VTABLE_i_add_int(interp, SELF, b);
}
}
@@ -431,7 +407,7 @@
const INTVAL c = a - b;
if ((c^a) >= 0 || (c^~b) >= 0) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_integer_native(INTERP, dest, c);
return dest;
@@ -439,7 +415,8 @@
else {
PMC *temp;
maybe_throw_overflow_error(interp);
- temp = VTABLE_get_bignum(interp, SELF);
+ temp = Parrot_pmc_new(interp, enum_class_BigInt);
+ VTABLE_set_integer_native(interp, temp, a);
return VTABLE_subtract(interp, temp, value, dest);
}
}
@@ -447,7 +424,7 @@
MULTI PMC *subtract(Complex value, PMC *dest) {
const INTVAL a = SELF.get_integer();
- dest = pmc_new(INTERP, VTABLE_type(INTERP, value));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, value));
VTABLE_set_number_native(INTERP, dest,
a - VTABLE_get_number_keyed_int(INTERP, value, 0));
@@ -461,13 +438,14 @@
MULTI PMC *subtract(BigInt value, PMC *dest) {
PMC *temp;
maybe_throw_overflow_error(interp);
- temp = VTABLE_get_bignum(interp, SELF);
+ temp = Parrot_pmc_new(interp, enum_class_BigInt);
+ VTABLE_set_integer_native(interp, temp, SELF.get_integer());
return VTABLE_subtract(interp, temp, value, dest);
}
MULTI PMC *subtract(DEFAULT value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, value));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, value));
VTABLE_set_number_native(INTERP, dest,
SELF.get_integer() - VTABLE_get_number(INTERP, value));
@@ -490,7 +468,7 @@
const INTVAL c = a - b;
if ((c^a) >= 0 || (c^~b) >= 0) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_integer_native(INTERP, dest, c);
return dest;
@@ -498,7 +476,8 @@
else {
PMC *temp;
maybe_throw_overflow_error(interp);
- temp = VTABLE_get_bignum(interp, SELF);
+ temp = Parrot_pmc_new(interp, enum_class_BigInt);
+ VTABLE_set_integer_native(interp, temp, a);
return VTABLE_subtract_int(interp, temp, b, dest);
}
}
@@ -536,7 +515,7 @@
MULTI void i_subtract(Complex value) {
const INTVAL a = SELF.get_integer();
- pmc_reuse(INTERP, SELF, enum_class_Complex, 0);
+ Parrot_pmc_reuse(INTERP, SELF, enum_class_Complex, 0);
VTABLE_set_number_native(INTERP, SELF,
(FLOATVAL)a - VTABLE_get_number_keyed_int(INTERP, value, 0));
VTABLE_set_number_keyed_int(INTERP, SELF, 1,
@@ -589,7 +568,7 @@
const double cf = (double)a * (double)b;
if ((double) c == cf) {
- dest = pmc_new(INTERP, VTABLE_type(interp, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(interp, SELF));
VTABLE_set_integer_native(INTERP, dest, c);
return dest;
@@ -597,7 +576,8 @@
else {
PMC *temp;
maybe_throw_overflow_error(INTERP);
- temp = VTABLE_get_bignum(INTERP, SELF);
+ temp = Parrot_pmc_new(interp, enum_class_BigInt);
+ VTABLE_set_integer_native(interp, temp, a);
return VTABLE_multiply(INTERP, temp, value, dest);
}
}
@@ -620,7 +600,7 @@
MULTI PMC *multiply(DEFAULT value, PMC *dest) {
const FLOATVAL valf = VTABLE_get_number(INTERP, value);
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_number_native(INTERP, dest, SELF.get_number() * valf);
return dest;
@@ -633,7 +613,7 @@
const double cf = (double)a * (double)b;
if ((double) c == cf) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_integer_native(INTERP, dest, c);
return dest;
@@ -641,7 +621,8 @@
else {
PMC *temp;
maybe_throw_overflow_error(INTERP);
- temp = VTABLE_get_bignum(INTERP, SELF);
+ temp = Parrot_pmc_new(interp, enum_class_BigInt);
+ VTABLE_set_integer_native(interp, temp, a);
return VTABLE_multiply_int(INTERP, temp, b, dest);
}
}
@@ -727,7 +708,8 @@
MULTI PMC *divide(BigInt value, PMC *dest) {
PMC *temp;
maybe_throw_overflow_error(INTERP);
- temp = VTABLE_get_bignum(INTERP, SELF);
+ temp = Parrot_pmc_new(interp, enum_class_BigInt);
+ VTABLE_set_integer_native(interp, temp, SELF.get_integer());
return VTABLE_divide(INTERP, temp, value, dest);
}
@@ -738,7 +720,7 @@
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO,
"float division by zero");
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_number_native(INTERP, dest, SELF.get_number() / d);
return dest;
}
@@ -787,7 +769,8 @@
MULTI PMC *floor_divide(BigInt value, PMC *dest) {
PMC *temp;
maybe_throw_overflow_error(INTERP);
- temp = VTABLE_get_bignum(INTERP, SELF);
+ temp = Parrot_pmc_new(interp, enum_class_BigInt);
+ VTABLE_set_integer_native(interp, temp, SELF.get_integer());
return VTABLE_floor_divide(INTERP, temp, value, dest);
}
@@ -800,7 +783,7 @@
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO,
"float division by zero");
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
f = floor(SELF.get_number() / d);
VTABLE_set_integer_native(INTERP, dest, (INTVAL)f);
@@ -815,7 +798,7 @@
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO,
"float division by zero");
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
f = floor(SELF.get_number() / value);
VTABLE_set_integer_native(INTERP, dest, (INTVAL)f);
@@ -830,7 +813,7 @@
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO,
"float division by zero");
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
f = floor(SELF.get_number() / value);
VTABLE_set_integer_native(INTERP, dest, (INTVAL)f);
@@ -909,7 +892,8 @@
MULTI PMC *modulus(BigInt value, PMC *dest) {
PMC *temp;
maybe_throw_overflow_error(INTERP);
- temp = VTABLE_get_bignum(INTERP, SELF);
+ temp = Parrot_pmc_new(interp, enum_class_BigInt);
+ VTABLE_set_integer_native(interp, temp, SELF.get_integer());
return VTABLE_modulus(INTERP, temp, value, dest);
}
@@ -921,7 +905,7 @@
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO,
"int modulus by zero");
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_integer_native(INTERP, dest,
intval_mod(SELF.get_integer(), d));
@@ -934,7 +918,7 @@
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO,
"int modulus by zero");
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_integer_native(INTERP, dest,
intval_mod(SELF.get_integer(), value));
@@ -947,7 +931,7 @@
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO,
"int modulus by zero");
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_integer_native(INTERP, dest,
intval_mod(SELF.get_integer(), (INTVAL)value));
@@ -993,97 +977,6 @@
intval_mod(SELF.get_integer() , (INTVAL)value));
}
-
-/*
-
-=item C<PMC *pow(PMC *value, PMC *dest)>
-
-=item C<PMC *pow_int(INTVAL value, PMC *dest)>
-
-Returns SELF to the C<value>th power in C<dest>.
-
-=item C<void i_pow(PMC *value)>
-
-=item C<void i_pow_int(INTVAL value)>
-
-Raises SELF to the C<value>th power.
-
-TODO: TT #1228: Implement Complex and BigInt RHS values for the pow() functions
-
-=cut
-
-*/
-
- MULTI PMC *pow(Integer value, PMC *dest) {
- const INTVAL v = VTABLE_get_integer(INTERP, value);
- return STATICSELF.pow_int(v, dest);
- }
-
-
- MULTI PMC *pow(DEFAULT value, PMC *dest) {
- PMC * const auxval = pmc_new(INTERP, VTABLE_type(INTERP, value));
- FLOATVAL selfval = SELF.get_integer();
- VTABLE_set_number_native(INTERP, auxval, selfval);
- return VTABLE_pow(INTERP, auxval, value, dest);
- }
-
-
- VTABLE PMC *pow_int(INTVAL b, PMC *dest) {
- const INTVAL a = SELF.get_integer();
- const INTVAL orig_b = b;
- INTVAL r = 1;
-
- if (b < 0)
- return SUPER(b, dest);
-
- if (a) {
- INTVAL temp = a;
- while (b > 0) {
- INTVAL prev = r;
- if (b & 1) {
- r *= temp;
- if (r / temp != prev) {
- PMC *temp;
- maybe_throw_overflow_error(INTERP);
- temp = VTABLE_get_bignum(INTERP, SELF);
- return VTABLE_pow_int(INTERP, temp, orig_b, dest);
- }
- }
-
- b >>= 1;
- if (!b)
- break;
-
- prev = temp;
- temp *= temp;
-
- if (prev != 0 && temp / prev != prev) {
- PMC *temp;
- maybe_throw_overflow_error(INTERP);
- temp = VTABLE_get_bignum(INTERP, SELF);
- return VTABLE_pow_int(INTERP, temp, orig_b, dest);
- }
- }
- }
-
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-
- VTABLE_set_integer_native(INTERP, dest, r);
- return dest;
-
- }
-
-
- VTABLE void i_pow(PMC *value) {
- SELF.pow(value, SELF);
- }
-
-
- VTABLE void i_pow_int(INTVAL value) {
- STATICSELF.pow_int(value, SELF);
- }
-
-
/*
=item C<INTVAL is_equal(PMC *value)>
@@ -1100,7 +993,7 @@
switch (value->vtable->base_type) {
case enum_class_BigInt:
- temp = pmc_new(INTERP, enum_class_BigInt);
+ temp = Parrot_pmc_new(INTERP, enum_class_BigInt);
VTABLE_set_integer_native(INTERP, temp, SELF.get_integer());
Parrot_mmd_multi_dispatch_from_c_args(interp,
"is_equal", "PP->I", temp, value, &retval);
@@ -1214,7 +1107,7 @@
if ((c^a) >= 0 || (c^1) >= 0)
SET_ATTR_iv(interp, SELF, c);
else {
- pmc_reuse(interp, SELF, enum_class_BigInt, 0);
+ Parrot_pmc_reuse(interp, SELF, enum_class_BigInt, 0);
VTABLE_set_integer_native(interp, SELF, a);
VTABLE_increment(interp, SELF);
}
@@ -1238,7 +1131,7 @@
if ((c^a) >= 0 || (c^~1) >= 0)
VTABLE_set_integer_native(interp, SELF, c);
else {
- pmc_reuse(INTERP, SELF, enum_class_BigInt, 0);
+ Parrot_pmc_reuse(INTERP, SELF, enum_class_BigInt, 0);
VTABLE_set_integer_native(interp, SELF, a);
VTABLE_decrement(interp, SELF);
}
@@ -1261,7 +1154,7 @@
const INTVAL a = abs(SELF.get_integer());
/* TT # 1245 overflow for -maxint */
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_integer_native(INTERP, dest, a);
return dest;
Modified: branches/boehm_gc_2/src/pmc/key.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/key.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/key.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -54,7 +54,7 @@
*/
VTABLE PMC *clone() {
- PMC * const dest = pmc_new(INTERP, SELF->vtable->base_type);
+ PMC * const dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
PMC *dkey = dest;
PMC *key = SELF;
Modified: branches/boehm_gc_2/src/pmc/lexinfo.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/lexinfo.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/lexinfo.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -95,7 +95,7 @@
VTABLE PMC *inspect_str(STRING *what) {
if (Parrot_str_equal(interp, what, CONST_STRING(interp, "symbols"))) {
- PMC *result = pmc_new(interp, enum_class_ResizableStringArray);
+ PMC *result = Parrot_pmc_new(interp, enum_class_ResizableStringArray);
Hash *hash = (Hash *)SELF.get_pointer();
UINTVAL entries = hash->entries;
UINTVAL found = 0;
Modified: branches/boehm_gc_2/src/pmc/managedstruct.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/managedstruct.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/managedstruct.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -71,7 +71,7 @@
Destroys the struct, freeing the allocated memory.
If the "custom_free_func" attribute is set, it is called to free the pointer.
-Otherwise, mem_sys_free() is used.
+Otherwise, mem_gc_free() is used.
=cut
@@ -83,9 +83,9 @@
custom_free_func_t free_func = PARROT_MANAGEDSTRUCT(SELF)->custom_free_func;
if (free_func) {
void *free_data = PARROT_MANAGEDSTRUCT(SELF)->custom_free_priv;
- free_func(interp, ptr, free_data);
+ free_func(INTERP, ptr, free_data);
} else
- mem_sys_free(ptr);
+ mem_gc_free(INTERP, ptr);
}
}
@@ -100,20 +100,24 @@
*/
VTABLE void set_integer_native(INTVAL value) {
- if (PARROT_MANAGEDSTRUCT(SELF)->ptr && !value) {
- mem_sys_free(PARROT_MANAGEDSTRUCT(SELF)->ptr);
- PARROT_MANAGEDSTRUCT(SELF)->ptr = NULL;
- PARROT_MANAGEDSTRUCT(SELF)->size = 0;
+ Parrot_ManagedStruct_attributes * attrs = PARROT_MANAGEDSTRUCT(SELF);
+
+ if (attrs->ptr && !value) {
+ mem_gc_free(INTERP, attrs->ptr);
+ attrs->ptr = NULL;
+ attrs->size = 0;
}
- else if (value && !PARROT_MANAGEDSTRUCT(SELF)->ptr) {
- PARROT_MANAGEDSTRUCT(SELF)->ptr = mem_sys_allocate_zeroed((size_t)value);
- PARROT_MANAGEDSTRUCT(SELF)->size = value;
+ else if (value && !attrs->ptr) {
+ attrs->ptr = Parrot_gc_allocate_memory_chunk_with_interior_pointers(
+ INTERP, (size_t)value);
+ attrs->size = value;
}
- else if (value && PARROT_MANAGEDSTRUCT(SELF)->ptr) {
- if (PARROT_MANAGEDSTRUCT(SELF)->size != value) {
- PARROT_MANAGEDSTRUCT(SELF)->ptr =
- mem_sys_realloc(PARROT_MANAGEDSTRUCT(SELF)->ptr, (size_t)value);
- PARROT_MANAGEDSTRUCT(SELF)->size = value;
+ else if (value && attrs->ptr) {
+ if (attrs->size != value) {
+ attrs->ptr =
+ Parrot_gc_reallocate_memory_chunk_with_interior_pointers(INTERP,
+ attrs->ptr, (size_t)value, attrs->size);
+ attrs->size = value;
}
}
@@ -142,7 +146,7 @@
void *clone_data = PARROT_MANAGEDSTRUCT(SELF)->custom_clone_priv;
return clone_func(interp, SELF, clone_data);
}
- dest = pmc_new_init(interp, SELF->vtable->base_type,
+ dest = Parrot_pmc_new_init(interp, SELF->vtable->base_type,
PARROT_MANAGEDSTRUCT(SELF)->init);
if (PARROT_MANAGEDSTRUCT(SELF)->ptr)
Modified: branches/boehm_gc_2/src/pmc/namespace.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/namespace.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/namespace.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -36,7 +36,7 @@
else {
/* If we don't have a place to hang methods, make one. */
if (PMC_IS_NULL(nsinfo->methods))
- nsinfo->methods = pmc_new(interp, enum_class_Hash);
+ nsinfo->methods = Parrot_pmc_new(interp, enum_class_Hash);
/* Insert it. */
VTABLE_set_pmc_keyed_str(interp, nsinfo->methods, key, value);
@@ -70,7 +70,7 @@
else {
/* If we don't have a place to hang vtable methods, make one. */
if (PMC_IS_NULL(vtable))
- nsinfo->vtable = vtable = pmc_new(interp, enum_class_Hash);
+ nsinfo->vtable = vtable = Parrot_pmc_new(interp, enum_class_Hash);
/* Insert it. */
VTABLE_set_pmc_keyed_int(interp, vtable, sub->vtable_index, value);
@@ -312,7 +312,7 @@
}
else {
/* create new tuple */
- new_tuple = pmc_new(INTERP, enum_class_FixedPMCArray);
+ new_tuple = Parrot_pmc_new(INTERP, enum_class_FixedPMCArray);
/* flag it as special */
PObj_get_FLAGS(new_tuple) |= FPA_is_ns_ext;
@@ -387,7 +387,8 @@
}
VTABLE PMC *get_pmc_keyed_str(STRING *key) {
- PMC *ns = (PMC *)parrot_hash_get(INTERP, (Hash *)SELF.get_pointer(), key);
+ Hash * const hash = (Hash *)SELF.get_pointer();
+ PMC *ns = (PMC *)parrot_hash_get(INTERP, hash, key);
if (!ns)
return PMCNULL;
@@ -400,8 +401,10 @@
}
VTABLE PMC *get_pmc_keyed(PMC *key) {
- /* PMC *ns = SUPER(key); */
+ PMC *ns = SUPER(key);
+ /* Is this equivalent?
PMC *ns = INTERP->vtables[enum_class_Hash]->get_pmc_keyed(INTERP, SELF, key);
+ */
if (!PMC_IS_NULL(ns))
return ns;
@@ -422,9 +425,29 @@
return VTABLE_get_pmc_keyed(INTERP, ns, key);
}
-
+ else if (VTABLE_does(INTERP, key, CONST_STRING(INTERP, "array"))) {
+ INTVAL i = 0;
+ while (!PMC_IS_NULL(ns) && VTABLE_elements(INTERP, key)) {
+ STRING * const name = VTABLE_get_string_keyed_int(INTERP, key, i);
+ if (name == NULL || name == STRINGNULL) {
+ ns = PMCNULL;
+ /* What to do here? Throw an exception or something? */
+ break;
+ }
+ ns = Parrot_get_namespace_keyed_str(INTERP, ns, name);
+ i++;
+ }
+ return ns;
+ }
+ else {
+ STRING * const name = VTABLE_get_string(INTERP, key);
+ ns = Parrot_get_namespace_keyed_str(INTERP, ns, name);
+ return ns;
+ }
+ /* If we get the wrong type, should we throw an exception?
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_GLOBAL_NOT_FOUND,
"Invalid namespace key in get_pmc_keyed_str");
+ */
}
VTABLE PMC *get_pmc_keyed_int(INTVAL key) {
@@ -446,6 +469,7 @@
Return the given namespace item or PMCNULL. If the named item is either
a NameSpace or a var, the var is returned.
+TT #1472
TOTAL KLUDGE. ON THE CHOPPING BLOCK.
=cut
@@ -634,7 +658,7 @@
*/
METHOD get_name() {
- PMC * const ar = pmc_new(INTERP, enum_class_ResizableStringArray);
+ PMC * const ar = Parrot_pmc_new(INTERP, enum_class_ResizableStringArray);
INTVAL elements = 0;
PMC *ns = SELF;
Modified: branches/boehm_gc_2/src/pmc/nci.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/nci.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/nci.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -28,7 +28,7 @@
char param_buf[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
char *param_sig = sig_length <= 7
? param_buf
- : mem_allocate_n_typed(sig_length, char);
+ : mem_gc_allocate_n_typed(interp, sig_length, char);
size_t j = 0;
size_t i;
@@ -254,7 +254,7 @@
Parrot_NCI_attributes *nci_info_ret;
void *orig_func;
- PMC * const ret = pmc_new(INTERP, SELF->vtable->base_type);
+ PMC * const ret = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
nci_info_ret = PARROT_NCI(ret);
/* FIXME if data is malloced (JIT/i386!) then we need
Modified: branches/boehm_gc_2/src/pmc/object.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/object.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/object.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -126,7 +126,7 @@
GETATTR_Class_meth_cache(interp, _class, cache);
if (PMC_IS_NULL(cache)) {
- cache = pmc_new(interp, enum_class_Hash);
+ cache = Parrot_pmc_new(interp, enum_class_Hash);
SETATTR_Class_meth_cache(interp, _class, cache);
}
@@ -812,7 +812,7 @@
UNLOCK_INTERPRETER(master);
ret = SELF;
- _true = pmc_new(INTERP, enum_class_Integer);
+ _true = Parrot_pmc_new(INTERP, enum_class_Integer);
/* Setting the '_ro' property switches to the read-only vtable */
VTABLE_set_integer_native(INTERP, _true, 1);
Added: branches/boehm_gc_2/src/pmc/opcode.pmc
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/boehm_gc_2/src/pmc/opcode.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -0,0 +1,104 @@
+/*
+Copyright (C) 2010, Parrot Foundation.
+$Id$
+
+=head1 NAME
+
+src/pmc/opcode.pmc
+
+=head1 DESCRIPTION
+
+Implements opcode VTABLEs.
+
+=cut
+
+*/
+
+#include "parrot/parrot.h"
+
+pmclass Opcode auto_attrs {
+ ATTR op_info_t *info;
+ ATTR INTVAL op_number;
+ ATTR STRING *full_name_cache;
+
+ VTABLE void init() {
+ Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
+ "Opcode must be created from OpLib.");
+ }
+
+ VTABLE void mark() {
+ Parrot_Opcode_attributes * const attrs = PARROT_OPCODE(SELF);
+ if (attrs->full_name_cache)
+ Parrot_gc_mark_STRING_alive(INTERP, attrs->full_name_cache);
+ }
+
+ VTABLE void set_pointer(void *i) {
+ Parrot_Opcode_attributes * const attrs = PARROT_OPCODE(SELF);
+ if (attrs->info)
+ Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
+ "Opcode has already been initialized");
+ attrs->info = (op_info_t *)i;
+ }
+
+ VTABLE void set_string_native(STRING *name) {
+ char * cstr = Parrot_str_to_cstring(INTERP, name);
+ const INTVAL num = INTERP->op_lib->op_code(INTERP, cstr, 1);
+ Parrot_str_free_cstring(cstr);
+ if (num == -1)
+ Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS,
+ "Opcode: Opcode %S not found", name);
+ VTABLE_set_integer_native(INTERP, SELF, num);
+ }
+
+ VTABLE INTVAL get_integer() {
+ Parrot_Opcode_attributes * const attrs = PARROT_OPCODE(SELF);
+ if (!attrs->info)
+ return -1;
+ return attrs->op_number;
+ }
+
+ VTABLE void set_integer_native(INTVAL value) {
+ const INTVAL opcount = INTERP->op_lib->op_count;
+ Parrot_Opcode_attributes * const attrs = PARROT_OPCODE(SELF);
+ if (attrs->info)
+ Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INVALID_OPERATION,
+ "Opcode has already been initialized");
+ if (value >= opcount || value < 0)
+ Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS,
+ "Opcode: Opcode index %d out of bounds", value);
+ attrs->info = &(INTERP->op_info_table[value]);
+ attrs->op_number = value;
+ }
+
+ VTABLE STRING* get_string() {
+ Parrot_Opcode_attributes * const attrs = PARROT_OPCODE(SELF);
+ if (attrs->full_name_cache == NULL) {
+ const char * const name = attrs->info->full_name;
+ const INTVAL len = strlen(name);
+ STRING * const newstr = Parrot_str_new(INTERP, name, len);
+ attrs->full_name_cache = newstr;
+ }
+ return attrs->full_name_cache;
+ }
+
+ VTABLE INTVAL elements() {
+ Parrot_Opcode_attributes * const attrs = PARROT_OPCODE(SELF);
+ if (!attrs->info)
+ return -1;
+ return attrs->info->op_count - 1;
+ }
+
+ VTABLE INTVAL get_integer_keyed_int(INTVAL i) {
+ Parrot_Opcode_attributes * const attrs = PARROT_OPCODE(SELF);
+ return i < attrs->info->op_count - 1
+ ? (INTVAL)attrs->info->types[i]
+ : -1;
+ }
+}
+
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
Added: branches/boehm_gc_2/src/pmc/oplib.pmc
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/boehm_gc_2/src/pmc/oplib.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -0,0 +1,106 @@
+/*
+Copyright (C) 2010, Parrot Foundation.
+$Id$
+
+=head1 NAME
+
+src/pmc/oplib.pmc
+
+=head1 DESCRIPTION
+
+Implements oplib VTABLEs.
+
+=cut
+
+*/
+
+#include "parrot/parrot.h"
+
+/* TODO: Since Opcode PMCs are essentially read-only after initialization
+ here, we should cache them. A FixedPMCArray would be okay, an
+ INTVAL->PMC HASH might be better, since it's unlikely that we will
+ need to cache even a majority of the ~1300 ops. */
+static PMC *OPLIB_PMC_INSTANCE;
+static PMC *OPLIB_OPCODE_CACHE;
+pmclass OpLib singleton {
+ void class_init() {
+ OPLIB_PMC_INSTANCE = NULL;
+ OPLIB_OPCODE_CACHE = NULL;
+ }
+
+ VTABLE void *get_pointer() {
+ return OPLIB_PMC_INSTANCE;
+ }
+
+ VTABLE void set_pointer(void *ptr) {
+ OPLIB_PMC_INSTANCE = (PMC *)ptr;
+ }
+
+ VTABLE void init() {
+ if (OPLIB_OPCODE_CACHE == NULL)
+ OPLIB_OPCODE_CACHE = Parrot_pmc_new(INTERP, enum_class_Hash);
+ }
+
+ VTABLE void mark() {
+ if (OPLIB_OPCODE_CACHE != NULL)
+ Parrot_gc_mark_PMC_alive(INTERP, OPLIB_OPCODE_CACHE);
+ }
+
+ /* Look up an opnumber given the name of the op. First we look for the
+ specific name, then the more general short name. */
+ VTABLE INTVAL get_integer_keyed_str(STRING *name) {
+ char * cstr = Parrot_str_to_cstring(INTERP, name);
+ INTVAL num = INTERP->op_lib->op_code(INTERP, cstr, 1);
+ if (num == -1)
+ num = INTERP->op_lib->op_code(INTERP, cstr, 0);
+ Parrot_str_free_cstring(cstr);
+ return num;
+ }
+
+ VTABLE INTVAL get_integer_keyed(PMC *key) {
+ STRING *str_key = key_string(INTERP, key);
+ return SELF.get_integer_keyed_str(str_key);
+ }
+
+ VTABLE PMC* get_pmc_keyed_str(STRING *name) {
+ if (VTABLE_defined_keyed_str(INTERP, OPLIB_OPCODE_CACHE, name)) {
+ PMC * const op = VTABLE_get_pmc_keyed_str(INTERP, OPLIB_OPCODE_CACHE, name);
+ return op;
+ }
+ else {
+ PMC * const op = Parrot_pmc_new_noinit(INTERP, enum_class_Opcode);
+ VTABLE_set_string_native(INTERP, op, name);
+ PObj_custom_mark_SET(op);
+ VTABLE_set_pmc_keyed_str(INTERP, OPLIB_OPCODE_CACHE, name, op);
+ return op;
+ }
+ }
+
+ VTABLE PMC* get_pmc_keyed(PMC *key) {
+ STRING * const strkey = VTABLE_get_string(INTERP, key);
+ return VTABLE_get_pmc_keyed_str(INTERP, SELF, strkey);
+ }
+
+ VTABLE PMC* get_pmc_keyed_int(INTVAL value) {
+ if (value > interp->op_lib->op_count)
+ Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS,
+ "OpLib: Opcode index %d out of bounds", value);
+ else {
+ const char * const name = interp->op_info_table[value].full_name;
+ const INTVAL len = strlen(name);
+ STRING * const newstr = Parrot_str_new(INTERP, name, len);
+ return VTABLE_get_pmc_keyed_str(INTERP, SELF, newstr);
+ }
+ }
+
+ VTABLE INTVAL get_integer() {
+ return INTERP->op_lib->op_count;
+ }
+}
+
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
Modified: branches/boehm_gc_2/src/pmc/orderedhash.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/orderedhash.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/orderedhash.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -80,7 +80,7 @@
/* 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);
+ PMC *ret = Parrot_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);
@@ -130,7 +130,7 @@
/* Helpers for boxing values */
static PMC*
box_string(PARROT_INTERP, STRING *str) {
- PMC * const ret = pmc_new(interp, Parrot_get_ctx_HLL_type(interp,
+ PMC * const ret = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp,
enum_class_String));
VTABLE_set_string_native(interp, ret, str);
return ret;
@@ -138,7 +138,7 @@
static PMC*
box_integer(PARROT_INTERP, INTVAL val) {
- PMC * const ret = pmc_new(interp, Parrot_get_ctx_HLL_type(interp,
+ PMC * const ret = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp,
enum_class_Integer));
VTABLE_set_integer_native(interp, ret, val);
return ret;
@@ -146,14 +146,14 @@
static PMC*
box_number(PARROT_INTERP, FLOATVAL val) {
- PMC * const ret = pmc_new(interp, Parrot_get_ctx_HLL_type(interp,
+ PMC * const ret = Parrot_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 {
+pmclass OrderedHash need_ext provides array provides hash auto_attrs {
ATTR PMC *hash; /* key to item tuple */
ATTR PMC *first; /* Pointer to first inserted value */
ATTR PMC *last; /* Pointer to last inserted value */
@@ -170,10 +170,9 @@
VTABLE void init() {
Parrot_OrderedHash_attributes * const attrs =
- mem_allocate_zeroed_typed(Parrot_OrderedHash_attributes);
+ (Parrot_OrderedHash_attributes*) PMC_data(SELF);
- PMC_data(SELF) = attrs;
- attrs->hash = pmc_new(INTERP, enum_class_Hash);
+ attrs->hash = Parrot_pmc_new(INTERP, enum_class_Hash);
attrs->first = PMCNULL;
attrs->last = PMCNULL;
@@ -211,7 +210,7 @@
*/
VTABLE PMC *get_iter() {
- return pmc_new_init(INTERP, enum_class_OrderedHashIterator, SELF);
+ return Parrot_pmc_new_init(INTERP, enum_class_OrderedHashIterator, SELF);
}
/*
@@ -269,7 +268,7 @@
}
/* Create new entry */
- list_entry = pmc_new(INTERP, enum_class_FixedPMCArray);
+ list_entry = Parrot_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);
@@ -337,7 +336,7 @@
/* 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);
+ PMC *pkey = Parrot_pmc_new(INTERP, enum_class_String);
VTABLE_set_string_native(INTERP, pkey, key);
VTABLE_set_pmc_keyed(INTERP, SELF, pkey, value);
}
@@ -392,7 +391,7 @@
}
VTABLE PMC *get_pmc_keyed_str(STRING *key) {
- PMC *pkey = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_String));
+ PMC *pkey = Parrot_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);
}
@@ -506,21 +505,21 @@
}
VTABLE void set_integer_keyed_int(INTVAL idx, INTVAL value) {
- PMC * const v = pmc_new(INTERP, Parrot_get_ctx_HLL_type(INTERP,
+ PMC * const v = Parrot_pmc_new(INTERP, Parrot_get_ctx_HLL_type(INTERP,
enum_class_Integer));
VTABLE_set_integer_native(INTERP, v, value);
SELF.set_pmc_keyed_int(idx, v);
}
VTABLE void set_number_keyed_int(INTVAL idx, FLOATVAL value) {
- PMC * const v = pmc_new(INTERP, Parrot_get_ctx_HLL_type(INTERP,
+ PMC * const v = Parrot_pmc_new(INTERP, Parrot_get_ctx_HLL_type(INTERP,
enum_class_Float));
VTABLE_set_number_native(INTERP, v, value);
SELF.set_pmc_keyed_int(idx, v);
}
VTABLE void set_string_keyed_int(INTVAL idx, STRING *value) {
- PMC * const v = pmc_new(INTERP, Parrot_get_ctx_HLL_type(INTERP,
+ PMC * const v = Parrot_pmc_new(INTERP, Parrot_get_ctx_HLL_type(INTERP,
enum_class_String));
VTABLE_set_string_native(INTERP, v, value);
SELF.set_pmc_keyed_int(idx, v);
@@ -715,7 +714,7 @@
*/
VTABLE PMC *clone() {
- PMC * const dest = pmc_new(INTERP, SELF->vtable->base_type);
+ PMC * const dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
Parrot_OrderedHash_attributes *clone_attrs =
PARROT_ORDEREDHASH(dest);
Modified: branches/boehm_gc_2/src/pmc/os.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/os.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/os.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -86,7 +86,7 @@
#endif
if (cwd) {
STRING * const scwd = Parrot_str_new(INTERP, cwd, strlen(cwd));
- mem_sys_free(cwd);
+ free(cwd);
RETURN(STRING *scwd);
}
else {
@@ -237,7 +237,7 @@
errmsg);
}
else {
- PMC * const array = pmc_new(INTERP, enum_class_FixedPMCArray);
+ PMC * const array = Parrot_pmc_new(INTERP, enum_class_FixedPMCArray);
VTABLE_set_integer_native(INTERP, array, 13);
VTABLE_set_integer_keyed_int(INTERP, array, 0,
@@ -315,7 +315,7 @@
errmsg);
}
else {
- PMC * const array = pmc_new(INTERP, enum_class_FixedPMCArray);
+ PMC * const array = Parrot_pmc_new(INTERP, enum_class_FixedPMCArray);
VTABLE_set_integer_native(INTERP, array, 13);
VTABLE_set_integer_keyed_int(INTERP, array, 0,
@@ -490,7 +490,7 @@
errmsg);
}
- array = pmc_new(INTERP, enum_class_ResizableStringArray);
+ array = Parrot_pmc_new(INTERP, enum_class_ResizableStringArray);
while ((dirent = readdir(dir)) != NULL) {
retval = Parrot_str_new(INTERP, dirent->d_name, 0) ;
Modified: branches/boehm_gc_2/src/pmc/packfile.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/packfile.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/packfile.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -71,7 +71,7 @@
PackFile *pf;
attrs->uuid = Parrot_str_new_noinit(INTERP, enum_stringrep_one, 0);
- attrs->directory = pmc_new(INTERP, enum_class_PackfileDirectory);
+ attrs->directory = Parrot_pmc_new(INTERP, enum_class_PackfileDirectory);
/* Create dummy PackFile and copy default attributes to self */
pf = PackFile_new(interp, 0);
@@ -120,7 +120,7 @@
/* Calculate required memory */
length = PackFile_pack_size(interp, pf) * sizeof (opcode_t);
- ptr = (opcode_t*)mem_sys_allocate(length);
+ ptr = (opcode_t*)Parrot_gc_allocate_memory_chunk(INTERP, length);
/* Copy related attributes to header */
pf->header->major = attrs->version_major;
@@ -133,7 +133,7 @@
str = Parrot_str_new_init(interp, (const char*)ptr, length,
PARROT_FIXED_8_ENCODING, PARROT_BINARY_CHARSET, 0);
- mem_sys_free(ptr);
+ Parrot_gc_free_memory_chunk(INTERP, ptr);
PackFile_destroy(interp, pf);
return str;
Modified: branches/boehm_gc_2/src/pmc/packfileannotations.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/packfileannotations.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/packfileannotations.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -49,7 +49,7 @@
Parrot_PackfileAnnotations_attributes * attrs =
PMC_data_typed(SELF, Parrot_PackfileAnnotations_attributes*);
- attrs->annotations = pmc_new(interp, enum_class_ResizablePMCArray);
+ attrs->annotations = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
/*
Don't initialize C<const_table>. It will be set to NULL bu auto_attrs
handling. And should be set to proper PMC in set_directory.
@@ -220,7 +220,7 @@
for (i = 0; i < a->num_entries; ++i) {
PackFile_Annotations_Entry *entry = a->entries[i];
PackFile_Annotations_Key *key = a->keys[entry->key];
- annotation = pmc_new(interp, enum_class_PackfileAnnotation);
+ annotation = Parrot_pmc_new(interp, enum_class_PackfileAnnotation);
/* Poke directly to annotation attributes. */
annotation_attrs = PARROT_PACKFILEANNOTATION(annotation);
@@ -260,7 +260,8 @@
VTABLE void *get_pointer() {
Parrot_PackfileAnnotations_attributes *attrs =
PARROT_PACKFILEANNOTATIONS(SELF);
- PackFile_Annotations *res = mem_allocate_zeroed_typed(PackFile_Annotations);
+ PackFile_Annotations *res = mem_gc_allocate_zeroed_typed(INTERP,
+ PackFile_Annotations);
INTVAL i, num;
INTVAL key_type;
PMC *keys; /* Temporary representation of Keys */
@@ -289,15 +290,15 @@
...
]
*/
- keys = pmc_new(interp, enum_class_Hash);
- names = pmc_new(interp, enum_class_ResizableIntegerArray);
- types = pmc_new(interp, enum_class_ResizableIntegerArray);
+ keys = Parrot_pmc_new(interp, enum_class_Hash);
+ names = Parrot_pmc_new(interp, enum_class_ResizableIntegerArray);
+ types = Parrot_pmc_new(interp, enum_class_ResizableIntegerArray);
last_key_id = -1;
/* Iterate over stored annotations and create Key if required. */
num = VTABLE_elements(interp, attrs->annotations);
res->num_entries = num;
- res->entries = mem_allocate_n_typed(num, PackFile_Annotations_Entry*);
+ res->entries = mem_gc_allocate_n_typed(INTERP, num, PackFile_Annotations_Entry*);
for (i = 0; i < num; ++i) {
PMC *entity = VTABLE_get_pmc_keyed_int(interp, attrs->annotations, i);
Parrot_PackfileAnnotation_attributes *entity_attrs = PARROT_PACKFILEANNOTATION(entity);
@@ -306,7 +307,7 @@
PMC * key_array = VTABLE_get_pmc_keyed_str(interp, keys, entity_attrs->name);
if (PMC_IS_NULL(key_array)) {
/* Never see this name before. Create new FIA and add to keys. */
- key_array = pmc_new(interp, enum_class_FixedIntegerArray);
+ key_array = Parrot_pmc_new(interp, enum_class_FixedIntegerArray);
VTABLE_set_integer_native(interp, key_array, 3);
VTABLE_set_integer_keyed_int(interp, key_array, 0, -1);
VTABLE_set_integer_keyed_int(interp, key_array, 1, -1);
@@ -336,7 +337,8 @@
/* At this point we have create (if nesassary) key and name constant. */
/* Start storing real entity */
- res->entries[i] = mem_allocate_zeroed_typed(PackFile_Annotations_Entry);
+ res->entries[i] = mem_gc_allocate_zeroed_typed(INTERP,
+ PackFile_Annotations_Entry);
res->entries[i]->bytecode_offset = entity_attrs->offset;
res->entries[i]->key = key_id;
@@ -365,9 +367,10 @@
/* Time to pack keys */
num = VTABLE_elements(interp, types);
res->num_keys = num;
- res->keys = mem_allocate_n_typed(num, PackFile_Annotations_Key*);
+ res->keys = mem_gc_allocate_n_zeroed_typed(INTERP, num,
+ PackFile_Annotations_Key*);
for (i = 0; i < num; ++i) {
- res->keys[i] = mem_allocate_typed(PackFile_Annotations_Key);
+ res->keys[i] = mem_gc_allocate_typed(INTERP, PackFile_Annotations_Key);
res->keys[i]->name = VTABLE_get_integer_keyed_int(interp, names, i);
res->keys[i]->type = VTABLE_get_integer_keyed_int(interp, types, i);
}
Modified: branches/boehm_gc_2/src/pmc/packfileconstanttable.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/packfileconstanttable.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/packfileconstanttable.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -45,8 +45,8 @@
Parrot_PackfileConstantTable_attributes * attrs =
PMC_data_typed(SELF, Parrot_PackfileConstantTable_attributes*);
- attrs->constants = pmc_new(interp, enum_class_ResizablePMCArray);
- attrs->types = pmc_new(interp, enum_class_ResizableIntegerArray);
+ attrs->constants = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
+ attrs->types = Parrot_pmc_new(interp, enum_class_ResizableIntegerArray);
PObj_custom_mark_SET(SELF);
PMC_data(SELF) = attrs;
@@ -129,7 +129,7 @@
Parrot_PackfileConstantTable_attributes * attrs =
PARROT_PACKFILECONSTANTTABLE(SELF);
PackFile_ConstTable * pftable =
- mem_allocate_zeroed_typed(PackFile_ConstTable);
+ mem_gc_allocate_zeroed_typed(INTERP, PackFile_ConstTable);
PackFile_Constant * value;
opcode_t i;
@@ -137,8 +137,8 @@
/* Copy all constanst with respect of type */
pftable->const_count = VTABLE_get_integer(interp, attrs->constants);
- pftable->constants = mem_allocate_n_typed(pftable->const_count,
- PackFile_Constant*);
+ pftable->constants = mem_gc_allocate_n_typed(INTERP,
+ pftable->const_count, PackFile_Constant*);
for (i = 0; i < pftable->const_count; ++i) {
value = PackFile_Constant_new(interp);
@@ -323,6 +323,29 @@
/*
+=item C<void set_main(INTVAL index)>
+
+Set the :main flag in a Sub in the constant table.
+
+Experimental. Use with care. There is no way to set the
+private flags from PIR, so we need something like this.
+
+If something goes wrong, blame NotFound.
+
+=cut
+
+*/
+ METHOD set_main(INTVAL index) {
+ PMC *mainsub = SELF.get_pmc_keyed_int(index);
+ if (mainsub->vtable->base_type != enum_class_Sub)
+ Parrot_ex_throw_from_c_args(interp, NULL,
+ EXCEPTION_INVALID_OPERATION,
+ "Attempt to set main flag in a non Sub");
+ SUB_FLAG_flag_SET(PF_MAIN, mainsub);
+ }
+
+/*
+
=item C<INTVAL get_or_create_constant()>
Get or create constant for passed value.
Modified: branches/boehm_gc_2/src/pmc/packfiledirectory.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/packfiledirectory.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/packfiledirectory.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -42,7 +42,7 @@
Parrot_PackfileDirectory_attributes * attrs =
PMC_data_typed(SELF, Parrot_PackfileDirectory_attributes*);
- attrs->hash = pmc_new(interp, enum_class_Hash);
+ attrs->hash = Parrot_pmc_new(interp, enum_class_Hash);
PObj_custom_mark_SET(SELF);
}
@@ -110,7 +110,7 @@
break;
}
- segment = pmc_new(interp, pmc_type);
+ segment = Parrot_pmc_new(interp, pmc_type);
name = pfseg->name;
VTABLE_set_pmc_keyed_str(interp, SELF, name, segment);
Modified: branches/boehm_gc_2/src/pmc/packfilefixupentry.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/packfilefixupentry.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/packfilefixupentry.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -95,7 +95,7 @@
Parrot_PackfileFixupEntry_attributes * attrs =
PARROT_PACKFILEFIXUPENTRY(SELF);
PackFile_FixupEntry * entry =
- mem_allocate_zeroed_typed(PackFile_FixupEntry);
+ mem_gc_allocate_zeroed_typed(INTERP, PackFile_FixupEntry);
entry->type = attrs->type;
entry->name = strdup(Parrot_string_cstring(interp, attrs->name));
Modified: branches/boehm_gc_2/src/pmc/packfilefixuptable.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/packfilefixuptable.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/packfilefixuptable.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -42,7 +42,7 @@
Parrot_PackfileFixupTable_attributes * attrs =
PMC_data_typed(SELF, Parrot_PackfileFixupTable_attributes*);
- attrs->entries = pmc_new(interp, enum_class_ResizablePMCArray);
+ attrs->entries = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
PObj_custom_mark_SET(SELF);
}
@@ -89,7 +89,7 @@
for (i = 0; i < table->fixup_count; ++i) {
val = table->fixups[i];
- entry = pmc_new(interp, enum_class_PackfileFixupEntry);
+ entry = Parrot_pmc_new(interp, enum_class_PackfileFixupEntry);
VTABLE_set_pointer(interp, entry, (void*)val);
VTABLE_set_pmc_keyed_int(interp, attrs->entries, i, entry);
}
@@ -108,15 +108,15 @@
Parrot_PackfileFixupTable_attributes * attrs =
PARROT_PACKFILEFIXUPTABLE(SELF);
PackFile_FixupTable * pftable =
- mem_allocate_zeroed_typed(PackFile_FixupTable);
+ mem_gc_allocate_zeroed_typed(INTERP, PackFile_FixupTable);
PMC * entry;
PackFile_FixupEntry * val;
opcode_t i;
pftable->base.type = PF_FIXUP_SEG;
pftable->fixup_count = VTABLE_elements(interp, attrs->entries);
- pftable->fixups = mem_allocate_n_typed(pftable->fixup_count,
- PackFile_FixupEntry*);
+ pftable->fixups = mem_gc_allocate_n_typed(INTERP,
+ pftable->fixup_count, PackFile_FixupEntry*);
/* Copy all entries */
for (i = 0; i < pftable->fixup_count; ++i) {
Modified: branches/boehm_gc_2/src/pmc/packfilerawsegment.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/packfilerawsegment.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/packfilerawsegment.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -44,7 +44,7 @@
Parrot_PackfileRawSegment_attributes * attrs =
PMC_data_typed(SELF, Parrot_PackfileRawSegment_attributes*);
- attrs->opcodes = pmc_new(interp, enum_class_ResizableIntegerArray);
+ attrs->opcodes = Parrot_pmc_new(interp, enum_class_ResizableIntegerArray);
attrs->type = PF_BYTEC_SEG;
PObj_custom_mark_SET(SELF);
@@ -111,7 +111,7 @@
VTABLE void *get_pointer() {
PackFile_Segment * pfseg =
- (PackFile_Segment*)mem_allocate_zeroed_typed(PackFile_ByteCode);
+ (PackFile_Segment*)mem_gc_allocate_zeroed_typed(INTERP, PackFile_ByteCode);
Parrot_PackfileRawSegment_attributes * attrs =
PARROT_PACKFILERAWSEGMENT(SELF);
PMC * opcodes = attrs->opcodes;
@@ -119,7 +119,7 @@
pfseg->type = attrs->type;
pfseg->size = VTABLE_get_integer(interp, opcodes);
- pfseg->data = mem_allocate_n_typed(pfseg->size, opcode_t);
+ pfseg->data = mem_gc_allocate_n_typed(INTERP, pfseg->size, opcode_t);
/* Not very efficient... */
for (i = 0; i < pfseg->size; ++i) {
Modified: branches/boehm_gc_2/src/pmc/parrotinterpreter.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/parrotinterpreter.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/parrotinterpreter.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2001-2009, Parrot Foundation.
+Copyright (C) 2001-2010, Parrot Foundation.
$Id$
=head1 NAME
@@ -53,7 +53,7 @@
/* we block GC runs while cloning since C<d> is not yet running */
Parrot_block_GC_mark(d);
- d->scheduler = pmc_new(d, enum_class_Scheduler);
+ d->scheduler = Parrot_pmc_new(d, enum_class_Scheduler);
d->scheduler = VTABLE_share_ro(d, d->scheduler);
/* can't copy directly, unless you want double-frees */
@@ -176,16 +176,6 @@
new_interp->current_cont = NEED_CONTINUATION;
}
-static int
-recursion_limit(PARROT_INTERP, PMC *self, int l)
-{
- const int ret = interp->recursion_limit;
- UNUSED(self)
-
- interp->recursion_limit = l;
- return ret;
-}
-
pmclass ParrotInterpreter no_ro {
ATTR struct parrot_interp_t *interp; /* this PMC's interpreter */
ATTR INTVAL tid; /* thread id */
@@ -200,24 +190,28 @@
=over 4
-=item C<void class_init()>
+=item C<yield>
-Class initialization.
+Yield the current thread
+
+=item C<recursion_limit(INTVAL l :optional, INTVAL has_l :opt_flag )>
+
+Gets the recursion limit of the interpreter, optionally setting it to something
+new.
=cut
*/
- void class_init() {
- const int typ = enum_class_ParrotInterpreter;
-
- /* TODO unify and fix signatures */
- register_nci_method(INTERP, typ,
- F2DPTR(pt_thread_yield), "yield", "v");
+ METHOD yield() {
+ pt_thread_yield();
+ }
- /* misc functions */
- register_nci_method(INTERP, typ,
- F2DPTR(recursion_limit), "recursion_limit", "iJOi");
+ METHOD recursion_limit(INTVAL l :optional, INTVAL has_l :opt_flag) {
+ const INTVAL ret = INTERP->recursion_limit;
+ if (has_l)
+ INTERP->recursion_limit = l;
+ RETURN(INTVAL ret);
}
/*
@@ -238,7 +232,7 @@
*/
if (!PMC_data(SELF)) {
Parrot_ParrotInterpreter_attributes *attrs =
- mem_allocate_zeroed_typed(Parrot_ParrotInterpreter_attributes);
+ mem_gc_allocate_zeroed_typed(INTERP, Parrot_ParrotInterpreter_attributes);
PMC_data(SELF) = attrs;
}
if (!PMC_interp(SELF)) {
@@ -264,7 +258,7 @@
if (!PMC_data(SELF)) {
Parrot_ParrotInterpreter_attributes *attrs =
- mem_allocate_zeroed_typed(Parrot_ParrotInterpreter_attributes);
+ mem_gc_allocate_zeroed_typed(INTERP, Parrot_ParrotInterpreter_attributes);
PMC_data(SELF) = attrs;
}
if (!PMC_interp(SELF)) {
@@ -286,7 +280,7 @@
VTABLE void destroy() {
if (PMC_data(SELF)) {
- mem_sys_free(PMC_data(SELF));
+ mem_gc_free(INTERP, PMC_data(SELF));
PMC_data(SELF) = NULL;
}
}
@@ -305,11 +299,11 @@
VTABLE void set_pointer(void *value) {
/* XXX: init_world in src/global_setup.c needs to create a
- * ParrotInterpreter through pmc_new_noinit. If this PMC hasn't been
+ * ParrotInterpreter through Parrot_pmc_new_noinit. If this PMC hasn't been
* initialized, cheat by initializing instead. */
if (!PMC_data(SELF)) {
Parrot_ParrotInterpreter_attributes *attrs =
- mem_allocate_zeroed_typed(Parrot_ParrotInterpreter_attributes);
+ mem_gc_allocate_zeroed_typed(INTERP, Parrot_ParrotInterpreter_attributes);
PMC_data(SELF) = attrs;
PObj_custom_destroy_SET(SELF);
}
@@ -559,7 +553,7 @@
pc - seg->base.data, NULL);
}
- return pmc_new(interp, enum_class_Hash);
+ return Parrot_pmc_new(interp, enum_class_Hash);
}
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_ATTRIB_NOT_FOUND,
@@ -621,7 +615,7 @@
*/
VTABLE PMC *clone() {
- PMC * const dest = pmc_new(INTERP, SELF->vtable->base_type);
+ PMC * const dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
clone_interpreter(PMC_interp(dest),
PMC_interp(SELF), PARROT_CLONE_DEFAULT);
@@ -719,7 +713,7 @@
VTABLE void thaw(PMC *info) {
if (!PMC_data(SELF)) {
Parrot_ParrotInterpreter_attributes *attrs =
- mem_allocate_zeroed_typed(Parrot_ParrotInterpreter_attributes);
+ mem_gc_allocate_zeroed_typed(INTERP, Parrot_ParrotInterpreter_attributes);
PMC_data(SELF) = attrs;
PObj_custom_destroy_SET(SELF);
}
Modified: branches/boehm_gc_2/src/pmc/parrotlibrary.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/parrotlibrary.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/parrotlibrary.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -77,7 +77,7 @@
*/
VTABLE PMC *clone() {
- PMC * const dest = pmc_new(INTERP, SELF->vtable->base_type);
+ PMC * const dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
PMC_oplib_init(dest) = PMC_oplib_init(SELF);
PMC_dlhandle(dest) = PMC_dlhandle(SELF);
Modified: branches/boehm_gc_2/src/pmc/parrotthread.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/parrotthread.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/parrotthread.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -71,7 +71,7 @@
interp->flags &= ~PARROT_THR_COPY_INTERP; /* XXX */
pt_thread_run(interp, thread, sub, args);
- pmc_reuse(interp, thread, enum_class_ParrotRunningThread, 0);
+ Parrot_pmc_reuse(interp, thread, enum_class_ParrotRunningThread, 0);
PObj_custom_mark_CLEAR(thread);
VTABLE_set_integer_native(interp, thread, tid);
@@ -79,12 +79,6 @@
return tid;
}
-static INTVAL do_thread_run_clone_default(PARROT_INTERP,
- PMC *thread, PMC *sub, PMC *args) {
- return do_thread_run(interp, thread, PARROT_CLONE_DEFAULT, sub, args);
-}
-
-
pmclass ParrotThread extends ParrotInterpreter no_ro {
/*
@@ -103,17 +97,17 @@
*/
- void class_init() {
- const int typ = enum_class_ParrotThread;
-
- register_nci_method(INTERP, typ,
- F2DPTR(do_thread_run), "run", "IJOIP@");
+ METHOD run(INTVAL clone_flags, PMC *sub, PMC *args :slurpy) {
+ const INTVAL retval = do_thread_run(INTERP, SELF, clone_flags, sub, args);
+ RETURN(INTVAL retval);
+ }
- /* XXX appropriate name given that this won't clone globals? */
- register_nci_method(INTERP, typ,
- F2DPTR(do_thread_run_clone_default), "run_clone", "IJOP@");
+ METHOD run_clone(PMC *sub, PMC *args :slurpy) {
+ const INTVAL retval = do_thread_run(INTERP, SELF, PARROT_CLONE_DEFAULT, sub, args);
+ RETURN(INTVAL retval)
}
+
/*
=item C<void init()>
Modified: branches/boehm_gc_2/src/pmc/pmc.num
==============================================================================
--- branches/boehm_gc_2/src/pmc/pmc.num Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/pmc.num Mon Feb 22 12:30:02 2010 (r44294)
@@ -79,3 +79,6 @@
os.pmc 51
file.pmc 52
+
+oplib.pmc 53
+opcode.pmc 54
Modified: branches/boehm_gc_2/src/pmc/pmcproxy.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/pmcproxy.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/pmcproxy.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -79,7 +79,7 @@
VTABLE void init() {
Parrot_Class_attributes * const _pmc =
(Parrot_Class_attributes *) PMC_data(SELF);
- PMC * const new_attribute = pmc_new(interp, enum_class_Hash);
+ PMC * const new_attribute = Parrot_pmc_new(interp, enum_class_Hash);
STRING * const name = CONST_STRING(interp, "proxy");
/* Set flag for custom GC mark. */
@@ -89,16 +89,16 @@
_pmc->id = 0;
_pmc->name = CONST_STRING(interp, "");
_pmc->_namespace = PMCNULL;
- _pmc->parents = pmc_new(interp, enum_class_ResizablePMCArray);
- _pmc->all_parents = pmc_new(interp, enum_class_ResizablePMCArray);
- _pmc->roles = pmc_new(interp, enum_class_ResizablePMCArray);
- _pmc->methods = pmc_new(interp, enum_class_Hash);
- _pmc->vtable_overrides = pmc_new(interp, enum_class_Hash);
- _pmc->parent_overrides = pmc_new(interp, enum_class_Hash);
- _pmc->attrib_metadata = pmc_new(interp, enum_class_Hash);
+ _pmc->parents = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
+ _pmc->all_parents = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
+ _pmc->roles = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
+ _pmc->methods = Parrot_pmc_new(interp, enum_class_Hash);
+ _pmc->vtable_overrides = Parrot_pmc_new(interp, enum_class_Hash);
+ _pmc->parent_overrides = Parrot_pmc_new(interp, enum_class_Hash);
+ _pmc->attrib_metadata = Parrot_pmc_new(interp, enum_class_Hash);
_pmc->attrib_index = PMCNULL;
_pmc->attrib_cache = PMCNULL;
- _pmc->resolve_method = pmc_new(interp, enum_class_ResizablePMCArray);
+ _pmc->resolve_method = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
/* Set up the attribute storage for the proxy instance */
VTABLE_set_string_keyed_str(interp, new_attribute, CONST_STRING(interp, "name"), name);
@@ -194,9 +194,9 @@
Parrot_Class_attributes * const _pmc = PARROT_CLASS(SELF);
if (!PMC_IS_NULL(init))
- return pmc_new_init(interp, _pmc->id, init);
+ return Parrot_pmc_new_init(interp, _pmc->id, init);
- return pmc_new(interp, _pmc->id);
+ return Parrot_pmc_new(interp, _pmc->id);
}
/*
@@ -266,6 +266,7 @@
return 0;
}
+
/*
=item C<INTVAL isa(STRING *classname)>
@@ -315,7 +316,7 @@
VTABLE INTVAL does(STRING *role_name) {
Parrot_Class_attributes *_class = PARROT_CLASS(SELF);
INTVAL id = _class->id;
- PMC *proxied = pmc_new(interp, id);
+ PMC *proxied = Parrot_pmc_new(interp, id);
if (VTABLE_does(interp, proxied, role_name))
return 1;
@@ -359,7 +360,7 @@
STRING * const meth_str = CONST_STRING(interp, "methods");
STRING * const parents_str = CONST_STRING(interp, "parents");
- PMC * const metadata = pmc_new(interp, enum_class_Hash);
+ PMC * const metadata = Parrot_pmc_new(interp, enum_class_Hash);
VTABLE_set_pmc_keyed_str(interp, metadata, name_str,
VTABLE_inspect_str(interp, SELF, name_str));
@@ -382,6 +383,7 @@
=cut
*/
+
METHOD name() {
Parrot_Class_attributes * const _pmc = PARROT_CLASS(SELF);
STRING * const ret_name = _pmc->name;
@@ -397,6 +399,7 @@
=cut
*/
+
METHOD get_namespace() {
Parrot_Class_attributes * const _pmc = PARROT_CLASS(SELF);
PMC * const ret_namespace = _pmc->_namespace;
@@ -412,6 +415,7 @@
=cut
*/
+
METHOD new(PMC *args :optional, int got_args :opt_flag) {
PMC * const obj = VTABLE_instantiate(interp, SELF, args);
UNUSED(got_args);
@@ -427,6 +431,7 @@
=cut
*/
+
METHOD methods() {
PMC * const ret_methods = VTABLE_inspect_str(interp, SELF, CONST_STRING(interp, "methods"));
RETURN(PMC *ret_methods);
@@ -441,6 +446,7 @@
=cut
*/
+
METHOD parents() {
PMC * const ret_parents = VTABLE_inspect_str(interp, SELF, CONST_STRING(interp, "parents"));
RETURN(PMC *ret_parents);
@@ -456,6 +462,7 @@
=cut
*/
+
METHOD inspect(STRING *what :optional, int got_what :opt_flag) {
/* Just delegate to the appropriate vtable method. */
PMC * const found =
Modified: branches/boehm_gc_2/src/pmc/pointer.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/pointer.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/pointer.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -67,7 +67,7 @@
*/
VTABLE PMC *clone() {
- PMC * const dest = pmc_new_noinit(INTERP, SELF->vtable->base_type);
+ PMC * const dest = Parrot_pmc_new_noinit(INTERP, SELF->vtable->base_type);
PObj_custom_mark_SET(dest);
PMC_data(dest) = PMC_data(SELF);
return dest;
Modified: branches/boehm_gc_2/src/pmc/resizablebooleanarray.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/resizablebooleanarray.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/resizablebooleanarray.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -148,8 +148,9 @@
/* Nothing allocated yet */
GET_ATTR_bit_array(INTERP, SELF, bit_array);
if (!bit_array) {
- SET_ATTR_bit_array(INTERP, SELF,
- (unsigned char *)mem_sys_allocate_zeroed(new_size_in_bytes));
+ void *new_bit_array = Parrot_gc_allocate_memory_chunk(INTERP, new_size_in_bytes);
+ memset(new_bit_array, 0, new_size_in_bytes);
+ SET_ATTR_bit_array(INTERP, SELF, (unsigned char *)new_bit_array);
/* The size is different, and doesn't fit within the current
* allocation */
@@ -157,15 +158,16 @@
else if (new_size_in_bytes != old_size_in_bytes) {
unsigned char * old_store = bit_array;
unsigned char * new_store =
- (unsigned char *)mem_sys_allocate_zeroed(new_tail_pos);
+ (unsigned char *)Parrot_gc_allocate_memory_chunk(INTERP, new_tail_pos);
size_t copy_size =
new_size_in_bytes < old_size_in_bytes ? new_size_in_bytes : old_size_in_bytes;
+ memset(new_store, 0, new_tail_pos);
/* Replace old array with new array, and free old array */
SET_ATTR_bit_array(INTERP, SELF,
(unsigned char *)mem_sys_memmove(
new_store, old_store, copy_size));
- mem_sys_free(old_store);
+ mem_gc_free(INTERP, old_store);
}
}
@@ -249,7 +251,8 @@
/* Allocate an extra allocation unit of space in new array */
new_mem_size = ROUND_BYTES(tail_pos+ MIN_ALLOC);
- new_bit_array = (unsigned char *)mem_sys_allocate_zeroed(new_mem_size);
+ new_bit_array = (unsigned char *)Parrot_gc_allocate_memory_chunk(INTERP, new_mem_size);
+ memset(new_bit_array, 0, new_mem_size);
/* Copy contents of old array to new array, moving the head
* position forward by one allocation unit (in bytes). */
@@ -259,7 +262,7 @@
/* Replace old array with new array, and free old array */
SET_ATTR_bit_array(INTERP, SELF, new_bit_array);
- mem_sys_free(old_bit_array);
+ mem_gc_free(INTERP, old_bit_array);
/* Added one allocation unit to the head position offset */
SET_ATTR_size(INTERP, SELF, tail_pos + MIN_ALLOC);
@@ -309,7 +312,8 @@
GET_ATTR_size(INTERP, SELF, tail_pos);
new_mem_size = ROUND_BYTES(tail_pos - MIN_ALLOC);
new_bit_array =
- (unsigned char *)mem_sys_allocate_zeroed(new_mem_size);
+ (unsigned char *)Parrot_gc_allocate_memory_chunk(INTERP, new_mem_size);
+ memset(new_bit_array, 0, new_mem_size);
/* Copy contents of old array to new array, move the head position
* offset back by one allocation unit (in bytes) */
@@ -319,7 +323,7 @@
/* Replace old array with new array, and free old array */
SET_ATTR_bit_array(INTERP, SELF, new_bit_array);
- mem_sys_free(old_bit_array);
+ mem_gc_free(INTERP, old_bit_array);
/* Removed one allocation unit from the head position offset */
SET_ATTR_size(INTERP, SELF, tail_pos - MIN_ALLOC);
@@ -373,7 +377,7 @@
UINTVAL tail_pos, head_pos;
unsigned char * my_bit_array, * dest_bit_array;
- PMC * const dest = pmc_new(INTERP, SELF->vtable->base_type);
+ PMC * const dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
GET_ATTR_bit_array(INTERP, SELF, my_bit_array);
GET_ATTR_size(INTERP, SELF, tail_pos);
@@ -384,7 +388,7 @@
if (my_bit_array) {
size_t size_in_bits = tail_pos / BITS_PER_CHAR + 1;
- dest_bit_array = (unsigned char *)mem_sys_allocate(size_in_bits);
+ dest_bit_array = (unsigned char *)Parrot_gc_allocate_memory_chunk(INTERP, size_in_bits);
mem_sys_memcopy(dest_bit_array, my_bit_array, size_in_bits);
}
else
Modified: branches/boehm_gc_2/src/pmc/resizablefloatarray.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/resizablefloatarray.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/resizablefloatarray.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -130,8 +130,7 @@
cur &= ~0xfff;
}
SET_ATTR_float_array(INTERP, SELF,
- (FLOATVAL*)mem_sys_realloc(float_array,
- cur * sizeof (FLOATVAL)));
+ mem_gc_realloc_n_typed(INTERP, float_array, cur, FLOATVAL));
SET_ATTR_size(INTERP, SELF, size);
SET_ATTR_resize_threshold(INTERP, SELF, cur);
}
Modified: branches/boehm_gc_2/src/pmc/resizableintegerarray.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/resizableintegerarray.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/resizableintegerarray.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -124,7 +124,7 @@
}
GET_ATTR_int_array(INTERP, SELF, int_array);
- mem_realloc_n_typed(int_array, cur, INTVAL);
+ int_array = mem_gc_realloc_n_typed(INTERP, int_array, cur, INTVAL);
SET_ATTR_int_array(INTERP, SELF, int_array);
SET_ATTR_size(INTERP, SELF, size);
SET_ATTR_resize_threshold(INTERP, SELF, cur);
Modified: branches/boehm_gc_2/src/pmc/resizablepmcarray.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/resizablepmcarray.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/resizablepmcarray.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -92,7 +92,8 @@
if (cur < 8)
cur = 8;
- PMC_array(SELF) = mem_realloc_n_typed(PMC_array(SELF), cur, PMC *);
+ PMC_array(SELF) = mem_gc_realloc_n_typed_zeroed(INTERP,
+ PMC_array(SELF), cur, i, PMC *);
for (; i < cur; i++) {
(PMC_array(SELF))[i] = PMCNULL;
@@ -366,7 +367,7 @@
VTABLE void push_float(FLOATVAL value) {
INTVAL size = PMC_size(SELF);
- PMC *val = pmc_new(INTERP, enum_class_Float);
+ PMC *val = Parrot_pmc_new(INTERP, enum_class_Float);
VTABLE_set_number_native(INTERP, val, value);
SELF.set_pmc_keyed_int(size, val);
@@ -377,7 +378,7 @@
VTABLE void push_integer(INTVAL value) {
INTVAL size = PMC_size(SELF);
- PMC *val = pmc_new(INTERP, enum_class_Integer);
+ PMC *val = Parrot_pmc_new(INTERP, enum_class_Integer);
VTABLE_set_integer_native(INTERP, val, value);
SELF.set_pmc_keyed_int(size, val);
@@ -397,7 +398,7 @@
VTABLE void push_string(STRING *value) {
INTVAL size = PMC_size(SELF);
- PMC *val = pmc_new(INTERP, enum_class_String);
+ PMC *val = Parrot_pmc_new(INTERP, enum_class_String);
VTABLE_assign_string_native(INTERP, val, value);
SELF.set_pmc_keyed_int(size, val);
@@ -501,7 +502,7 @@
VTABLE void unshift_float(FLOATVAL value) {
INTVAL size = PMC_size(SELF);
- PMC *val = pmc_new(INTERP, enum_class_Float);
+ PMC *val = Parrot_pmc_new(INTERP, enum_class_Float);
PMC **data;
INTVAL i;
@@ -521,7 +522,7 @@
VTABLE void unshift_integer(INTVAL value) {
INTVAL size = PMC_size(SELF);
- PMC *val = pmc_new(INTERP, enum_class_Integer);
+ PMC *val = Parrot_pmc_new(INTERP, enum_class_Integer);
PMC **data;
INTVAL i;
@@ -559,7 +560,7 @@
VTABLE void unshift_string(STRING *value) {
INTVAL size = PMC_size(SELF);
- PMC *val = pmc_new(INTERP, enum_class_String);
+ PMC *val = Parrot_pmc_new(INTERP, enum_class_String);
PMC **data;
INTVAL i;
Modified: branches/boehm_gc_2/src/pmc/resizablestringarray.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/resizablestringarray.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/resizablestringarray.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -144,7 +144,7 @@
VTABLE PMC *pop_pmc() {
STRING *strval = SELF.pop_string();
- PMC *value = pmc_new(INTERP, enum_class_String);
+ PMC *value = Parrot_pmc_new(INTERP, enum_class_String);
VTABLE_set_string_native(INTERP, value, strval);
@@ -241,8 +241,8 @@
}
SET_ATTR_str_array(INTERP, SELF,
- (STRING **)mem_sys_realloc(
- str_array, cur * sizeof (STRING*)));
+ mem_gc_realloc_n_typed_zeroed(INTERP, str_array,
+ cur, resize_threshold, STRING*));
GET_ATTR_str_array(INTERP, SELF, str_array);
for (; i < cur; i++)
@@ -308,7 +308,7 @@
VTABLE PMC *shift_pmc() {
STRING *strval = SELF.shift_string();
- PMC *value = pmc_new(INTERP, enum_class_String);
+ PMC *value = Parrot_pmc_new(INTERP, enum_class_String);
VTABLE_set_string_native(INTERP, value, strval);
@@ -374,7 +374,7 @@
*/
VTABLE void push_integer(INTVAL value) {
- PMC *ret = pmc_new(INTERP, enum_class_String);
+ PMC *ret = Parrot_pmc_new(INTERP, enum_class_String);
STRING *val;
VTABLE_set_integer_native(INTERP, ret, value);
@@ -394,7 +394,7 @@
*/
VTABLE void push_float(FLOATVAL value) {
- PMC *ret = pmc_new(INTERP, enum_class_String);
+ PMC *ret = Parrot_pmc_new(INTERP, enum_class_String);
STRING *val;
VTABLE_set_number_native(INTERP, ret, value);
@@ -424,7 +424,7 @@
"ResizableStringArray: Can't shift from an empty array!");
value = SELF.get_string_keyed_int(0);
- ret = pmc_new(INTERP, enum_class_String);
+ ret = Parrot_pmc_new(INTERP, enum_class_String);
VTABLE_set_string_native(INTERP, ret, value);
SELF.delete_keyed_int(0);
@@ -486,7 +486,7 @@
*/
VTABLE void unshift_integer(INTVAL value) {
- PMC *ret = pmc_new(INTERP, enum_class_String);
+ PMC *ret = Parrot_pmc_new(INTERP, enum_class_String);
STRING *val;
VTABLE_set_integer_native(INTERP, ret, value);
@@ -506,7 +506,7 @@
*/
VTABLE void unshift_float(FLOATVAL value) {
- PMC *ret = pmc_new(INTERP, enum_class_String);
+ PMC *ret = Parrot_pmc_new(INTERP, enum_class_String);
STRING *val;
VTABLE_set_number_native(INTERP, ret, value);
Modified: branches/boehm_gc_2/src/pmc/role.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/role.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/role.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -230,9 +230,9 @@
/* Set up the object. */
role->name = CONST_STRING(interp, "");
role->_namespace = PMCNULL;
- role->roles = pmc_new(interp, enum_class_ResizablePMCArray);
- role->methods = pmc_new(interp, enum_class_Hash);
- role->attrib_metadata = pmc_new(interp, enum_class_Hash);
+ role->roles = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
+ role->methods = Parrot_pmc_new(interp, enum_class_Hash);
+ role->attrib_metadata = Parrot_pmc_new(interp, enum_class_Hash);
}
VTABLE void init_pmc(PMC *init_data) {
@@ -276,7 +276,7 @@
VTABLE void add_attribute(STRING *name, PMC *type) {
Parrot_Role_attributes * const role = PARROT_ROLE(SELF);
- PMC * const new_attribute = pmc_new(interp, enum_class_Hash);
+ PMC * const new_attribute = Parrot_pmc_new(interp, enum_class_Hash);
/* Set name and type. */
VTABLE_set_string_keyed_str(interp, new_attribute, CONST_STRING(interp, "name"), name);
@@ -388,7 +388,7 @@
PMC *found;
if (Parrot_str_equal(interp, what, CONST_STRING(interp, "name"))) {
- found = pmc_new(interp, enum_class_String);
+ found = Parrot_pmc_new(interp, enum_class_String);
VTABLE_set_string_native(interp, found, role->name);
}
else if (Parrot_str_equal(interp, what, CONST_STRING(interp, "namespace"))) {
@@ -414,7 +414,7 @@
if (found->vtable->base_type == enum_class_Hash) {
/* for Hash return values, create and return a shallow
* clone because the VTABLE_clone does a deep clone */
- PMC * const hash = pmc_new(interp, enum_class_Hash);
+ PMC * const hash = Parrot_pmc_new(interp, enum_class_Hash);
PMC * const iter = VTABLE_get_iter(interp, found);
while (VTABLE_get_bool(interp, iter)) {
STRING * key = VTABLE_shift_string(interp, iter);
@@ -441,7 +441,7 @@
VTABLE PMC *inspect() {
/* Create a hash, then use inspect_str to get all of the data to
* fill it up with. */
- PMC * const metadata = pmc_new(interp, enum_class_Hash);
+ PMC * const metadata = Parrot_pmc_new(interp, enum_class_Hash);
STRING * const name = CONST_STRING(interp, "name");
STRING * const _namespace = CONST_STRING(interp, "namespace");
@@ -583,7 +583,7 @@
if (got_name) {
/* We'll build a hash just containing the name, then give this to
* init_role_from_hash - saves some code duplication. */
- PMC *naming_hash = pmc_new(interp, enum_class_Hash);
+ PMC *naming_hash = Parrot_pmc_new(interp, enum_class_Hash);
VTABLE_set_string_keyed_str(interp, naming_hash, CONST_STRING(interp, "name"), name);
init_role_from_hash(interp, SELF, naming_hash);
}
Modified: branches/boehm_gc_2/src/pmc/scalar.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/scalar.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/scalar.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -20,68 +20,6 @@
#include "pmc/pmc_bigint.h"
-static PMC *
-bitwise_left_shift_internal(PARROT_INTERP, PMC *self,
- PMC *dest, INTVAL shift_amount)
-{
- /* This handles both left and right shifts; the sign of shift_amount
- controls the direction, shifting left if positive and right if negative.
- If we get an error (which can only happen for left shifts) and
- PARROT_ERRORS_OVERFLOW_FLAG is set, then we throw an error, else the
- destination is promoted to a BigInt before shifting. If dest == self,
- then the shift is done in place. */
- const INTVAL base = VTABLE_get_integer(interp, self);
- INTVAL result = 0;
- int overflow_p = 0;
-
- /* Compute the shift. */
- if (shift_amount >= 8*INTVAL_SIZE) {
- /* Extreme left shift; no need to do an integer shift first. */
- overflow_p = 1;
- }
- else if (shift_amount >= 0) {
- /* Left shift. */
- result = base << shift_amount;
- overflow_p = (result >> shift_amount) != base;
- }
- else if (shift_amount > -8*INTVAL_SIZE) {
- /* Right shift. By definition, this can never overflow. */
- result = base >> -shift_amount;
- }
- else {
- /* Extreme right shift. */
- result = 0;
- }
-
- /* Store the result. */
- if (! overflow_p) {
- /* If SELF is the destination, we won't want to create a
- new PMC, because then we won't have the result in SELF.
- Only create a new PMC if we aren't saving the result
- to SELF, or if they are both NULL */
- if (dest != self || dest == NULL)
- dest = pmc_new(interp, VTABLE_type(interp, self));
-
- VTABLE_set_integer_native(interp, dest, result);
- }
- else if (PARROT_ERRORS_test(interp, PARROT_ERRORS_OVERFLOW_FLAG)) {
- Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_ERR_OVERFLOW,
- "Integer overflow");
- }
- else {
- /* Overflow; must promote dest to BigInt, and do a BigInt shift. */
- if (self == dest)
- pmc_reuse(interp, self, enum_class_BigInt, 0);
- else
- dest = pmc_new(interp, enum_class_BigInt);
-
- VTABLE_set_integer_native(interp, dest, base);
- VTABLE_i_bitwise_shl_int(interp, dest, shift_amount);
- }
-
- return dest;
-}
-
pmclass scalar {
/*
@@ -101,15 +39,15 @@
if (self_type == enum_class_Boolean)
/* doesn't morph */
- pmc_reuse(INTERP, SELF, val_type, 0);
+ Parrot_pmc_reuse(INTERP, SELF, val_type, 0);
if (val_type == enum_class_Undef) {
- pmc_reuse(INTERP, SELF, val_type, 0);
+ Parrot_pmc_reuse(INTERP, SELF, val_type, 0);
return;
}
if (VTABLE_isa(INTERP, value, CONST_STRING(INTERP, "Undef"))) {
- pmc_reuse(INTERP, SELF, enum_class_Undef, 0);
+ Parrot_pmc_reuse(INTERP, SELF, enum_class_Undef, 0);
return;
}
@@ -130,7 +68,7 @@
SELF.set_string_native(v);
return;
}
- pmc_reuse(INTERP, SELF, val_type, 0);
+ Parrot_pmc_reuse(INTERP, SELF, val_type, 0);
SELF.set_pmc(value);
}
@@ -174,7 +112,7 @@
MULTI PMC *add(Complex value, PMC *dest) {
const FLOATVAL a = SELF.get_number();
- dest = pmc_new(INTERP, VTABLE_type(INTERP, value));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, value));
VTABLE_set_number_native(INTERP, dest,
a + VTABLE_get_number_keyed_int(INTERP, value, 0));
@@ -184,7 +122,7 @@
}
MULTI PMC *add(DEFAULT value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_number_native(INTERP, dest,
SELF.get_number() + VTABLE_get_number(INTERP, value));
@@ -192,7 +130,7 @@
}
VTABLE PMC *add_int(INTVAL value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_number_native(INTERP, dest,
SELF.get_number() + (FLOATVAL)value);
@@ -200,7 +138,7 @@
}
VTABLE PMC *add_float(FLOATVAL value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_number_native(INTERP, dest,
SELF.get_number() + value);
@@ -210,7 +148,7 @@
MULTI void i_add(Complex value) {
const FLOATVAL a = SELF.get_number();
- pmc_reuse(INTERP, SELF, enum_class_Complex, 0);
+ Parrot_pmc_reuse(INTERP, SELF, enum_class_Complex, 0);
VTABLE_set_number_native(INTERP, SELF,
a + VTABLE_get_number_keyed_int(INTERP, value, 0));
VTABLE_set_number_keyed_int(INTERP, SELF, 1,
@@ -257,7 +195,7 @@
MULTI PMC *subtract(Complex value, PMC *dest) {
const FLOATVAL a = SELF.get_number();
- dest = pmc_new(INTERP, VTABLE_type(INTERP, value));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, value));
VTABLE_set_number_native(INTERP, dest,
a - VTABLE_get_number_keyed_int(INTERP, value, 0));
@@ -267,14 +205,14 @@
}
MULTI PMC *subtract(DEFAULT value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_number_native(INTERP, dest,
SELF.get_number() - VTABLE_get_number(INTERP, value));
return dest;
}
VTABLE PMC *subtract_int(INTVAL value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_number_native(INTERP, dest,
SELF.get_number() - (FLOATVAL)value);
@@ -282,7 +220,7 @@
}
VTABLE PMC *subtract_float(FLOATVAL value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_number_native(INTERP, dest,
SELF.get_number() - value);
@@ -292,7 +230,7 @@
MULTI void i_subtract(Complex value) {
const FLOATVAL a = SELF.get_number();
- pmc_reuse(INTERP, SELF, enum_class_Complex, 0);
+ Parrot_pmc_reuse(INTERP, SELF, enum_class_Complex, 0);
VTABLE_set_number_native(INTERP, SELF,
a - VTABLE_get_number_keyed_int(INTERP, value, 0));
VTABLE_set_number_keyed_int(INTERP, SELF, 1,
@@ -334,7 +272,7 @@
}
MULTI PMC *multiply(DEFAULT value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_number_native(INTERP, dest,
SELF.get_number() * VTABLE_get_number(INTERP, value));
@@ -342,7 +280,7 @@
}
VTABLE PMC *multiply_int(INTVAL value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_number_native(INTERP, dest,
SELF.get_number() * value);
@@ -350,7 +288,7 @@
}
VTABLE PMC *multiply_float(FLOATVAL value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_number_native(INTERP, dest,
SELF.get_number() * value);
@@ -406,7 +344,7 @@
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO,
"float division by zero");
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_number_native(INTERP, dest, SELF.get_number() / d);
return dest;
@@ -417,7 +355,7 @@
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO,
"float division by zero");
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_number_native(INTERP, dest, SELF.get_number() / value);
return dest;
@@ -428,7 +366,7 @@
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO,
"float division by zero");
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_number_native(INTERP, dest, SELF.get_number() / value);
return dest;
@@ -489,7 +427,7 @@
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO,
"float division by zero");
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
d = floor(SELF.get_number() / d);
VTABLE_set_integer_native(INTERP, dest, (INTVAL)d);
@@ -501,7 +439,7 @@
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO,
"float division by zero");
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_number_native(INTERP, dest,
floor(SELF.get_number() / value));
@@ -513,7 +451,7 @@
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO,
"float division by zero");
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_number_native(INTERP, dest,
floor(SELF.get_number() / value));
@@ -579,7 +517,7 @@
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO,
"float modulus by zero");
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_number_native(INTERP, dest,
floatval_mod(SELF.get_number(), d));
@@ -591,7 +529,7 @@
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO,
"float modulus by zero");
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_number_native(INTERP, dest,
floatval_mod(SELF.get_number(), (FLOATVAL)value));
@@ -603,7 +541,7 @@
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_DIV_BY_ZERO,
"float modulus by zero");
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_number_native(INTERP, dest,
floatval_mod(SELF.get_number(), value));
@@ -641,72 +579,6 @@
/*
-=item C<PMC *pow(PMC *value, PMC *dest)>
-
-=item C<PMC *pow_int(INTVAL value, PMC *dest)>
-
-=item C<PMC *pow_float(FLOATVAL value, PMC *dest)>
-
-Calculates C<SELF pow value> and returns
-the result in C<dest>. See also ops/math.ops.
-
-=item C<void i_pow(PMC *value)>
-
-=item C<void i_pow_int(INTVAL value)>
-
-=item C<void i_pow_float(FLOATVAL value)>
-
-Calculates pow inplace
-
-=cut
-
-*/
-
- MULTI PMC *pow(PMC *value, PMC *dest) {
- const FLOATVAL d = VTABLE_get_number(INTERP, value);
-
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-
- VTABLE_set_number_native(INTERP, dest, pow(SELF.get_number(), d));
- return dest;
- }
-
- VTABLE PMC *pow_int(INTVAL value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-
- VTABLE_set_number_native(INTERP, dest,
- pow(SELF.get_number(), (double)value));
-
- return dest;
- }
-
- VTABLE PMC *pow_float(FLOATVAL value, PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-
- VTABLE_set_number_native(INTERP, dest,
- pow(SELF.get_number(), value));
- return dest;
- }
-
- VTABLE void i_pow(PMC *value) {
- const FLOATVAL d = VTABLE_get_number(INTERP, value);
-
- VTABLE_set_number_native(INTERP, SELF,
- pow(SELF.get_number(), d));
- }
-
- VTABLE void i_pow_int(INTVAL value) {
- VTABLE_set_number_native(INTERP, SELF,
- pow(SELF.get_number(), (float)value));
- }
-
- VTABLE void i_pow_float(FLOATVAL value) {
- VTABLE_set_number_native(INTERP, SELF,
- pow(SELF.get_number(), value));
- }
-
-/*
-
=item C<PMC *neg(PMC *dest)>
=item C<void i_neg()>
@@ -720,7 +592,7 @@
VTABLE PMC *neg(PMC *dest) {
const INTVAL a = -SELF.get_integer();
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_integer_native(INTERP, dest, a);
return dest;
@@ -734,311 +606,6 @@
=back
-=head2 Bitwise Methods
-
-=over 4
-
-=item C<PMC *bitwise_or(PMC *value, PMC *dest)>
-
-=item C<PMC *bitwise_or_int(INTVAL value, PMC *dest)>
-
-Returns in C<*dest> the bitwise C<OR> of the scalar and C<value>.
-
-=item C<void i_bitwise_or(PMC *value)>
-
-=item C<void i_bitwise_or_int(INTVAL value)>
-
-Inplace bitwise or.
-
-=cut
-
-*/
-
- VTABLE PMC *bitwise_or(PMC *value, PMC *dest) {
- const INTVAL result = SELF.get_integer() | VTABLE_get_integer(INTERP, value);
-
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-
- VTABLE_set_integer_native(INTERP, dest, result);
- return dest;
- }
-
-
- VTABLE PMC *bitwise_or_int(INTVAL value, PMC *dest) {
- const INTVAL result = SELF.get_integer() | value;
-
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-
- VTABLE_set_integer_native(INTERP, dest, result);
- return dest;
- }
-
- VTABLE void i_bitwise_or(PMC *value) {
- const INTVAL result =
- SELF.get_integer() | VTABLE_get_integer(INTERP, value);
-
- SELF.set_integer_native(result);
- }
-
-
- VTABLE void i_bitwise_or_int(INTVAL value) {
- const INTVAL result = SELF.get_integer() | value;
- SELF.set_integer_native(result);
- }
-
-/*
-
-=item C<PMC *bitwise_and(PMC *value, PMC *dest)>
-
-=item C<PMC *bitwise_and_int(INTVAL value, PMC *dest)>
-
-Returns in C<*dest> the bitwise C<AND> of the scalar and C<value>.
-
-=item C<void i_bitwise_and(PMC *value)>
-
-=item C<void i_bitwise_and_int(INTVAL value)>
-
-Inplace bitwise and.
-
-=cut
-
-*/
-
- VTABLE PMC *bitwise_and(PMC *value, PMC *dest) {
- const INTVAL result =
- SELF.get_integer() & VTABLE_get_integer(INTERP, value);
-
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-
- VTABLE_set_integer_native(INTERP, dest, result);
- return dest;
- }
-
- VTABLE PMC *bitwise_and_int(INTVAL value, PMC *dest) {
- const INTVAL result = SELF.get_integer() & value;
-
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-
- VTABLE_set_integer_native(INTERP, dest, result);
- return dest;
- }
-
- VTABLE void i_bitwise_and(PMC *value) {
- const INTVAL result =
- SELF.get_integer() & VTABLE_get_integer(INTERP, value);
- SELF.set_integer_native(result);
- }
-
-
- VTABLE void i_bitwise_and_int(INTVAL value) {
- const INTVAL result = SELF.get_integer() & value;
- SELF.set_integer_native(result);
- }
-
-/*
-
-=item C<void bitwise_xor(PMC *value, PMC *dest)>
-
-=item C<void bitwise_xor_int(INTVAL value, PMC *dest)>
-
-Returns in C<*dest> the bitwise C<XOR> of the scalar and C<*value>.
-
-=item C<void i_bitwise_xor(PMC *value)>
-
-=item C<void i_bitwise_xor_int(INTVAL value)>
-
-Inplace bitwise and.
-
-=cut
-
-*/
-
- MULTI PMC *bitwise_xor(PMC *value, PMC *dest) {
- const INTVAL result =
- SELF.get_integer() ^ VTABLE_get_integer(INTERP, value);
-
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-
- VTABLE_set_integer_native(INTERP, dest, result);
- return dest;
- }
-
- VTABLE PMC *bitwise_xor_int(INTVAL value, PMC *dest) {
- const INTVAL result = SELF.get_integer() ^ value;
-
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-
- VTABLE_set_integer_native(INTERP, dest, result);
- return dest;
- }
-
- VTABLE void i_bitwise_xor(PMC *value) {
- const INTVAL result =
- SELF.get_integer() ^ VTABLE_get_integer(INTERP, value);
- SELF.set_integer_native(result);
- }
-
- VTABLE void i_bitwise_xor_int(INTVAL value) {
- const INTVAL result = SELF.get_integer() ^ value;
- SELF.set_integer_native(result);
- }
-
-/*
-
-=item C<PMC *bitwise_not(PMC *dest)>
-
-=item C<void i_bitwise_not()>
-
-Returns in C<*dest> the bitwise negation of the scalar and C<value>.
-
-=cut
-
-*/
-
- VTABLE PMC *bitwise_not(PMC *dest) {
- const INTVAL a = ~SELF.get_integer();
-
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-
- VTABLE_set_integer_native(INTERP, dest, a);
- return dest;
- }
-
- VTABLE void i_bitwise_not() {
- VTABLE_set_integer_native(INTERP, SELF, ~SELF.get_integer());
- }
-
-/*
-
-=item C<PMC *bitwise_shr(PMC *value, PMC *dest)>
-
-=item C<PMC *bitwise_shr_int(INTVAL value, PMC *dest)>
-
-Returns in C<*dest> the arithmetic shift right of the scalar by C<value>.
-A negative C<value> shifts left.
-The destination may become a C<BigInt> as a result (but only if the shift amount
-is less than zero).
-
-=item C<void i_bitwise_shr(PMC *value)>
-
-=item C<void i_bitwise_shr_int(INTVAL value)>
-
-Inplace shift right. A negative C<value> shifts left.
-SELF may become a C<BigInt> as a result (but only if the shift amount is less
-than zero).
-
-=cut
-
-*/
-
- VTABLE PMC *bitwise_shr(PMC *value, PMC *dest) {
- return bitwise_left_shift_internal(INTERP, SELF, dest,
- -VTABLE_get_integer(INTERP, value));
- }
-
- VTABLE PMC *bitwise_shr_int(INTVAL value, PMC *dest) {
- return bitwise_left_shift_internal(INTERP, SELF, dest, -value);
- }
-
- VTABLE void i_bitwise_shr(PMC *value) {
- bitwise_left_shift_internal(INTERP, SELF, SELF,
- -VTABLE_get_integer(INTERP, value));
- }
-
- VTABLE void i_bitwise_shr_int(INTVAL value) {
- bitwise_left_shift_internal(INTERP, SELF, SELF, -value);
- }
-
-/*
-
-=item C<PMC *bitwise_lsr(PMC *value, PMC *dest)>
-
-=item C<PMC *bitwise_lsr_int(INTVAL value, PMC *dest)>
-
-Returns in C<*dest> the logical shift right of the scalar by C<*value>.
-
-=item C<void i_bitwise_lsr(PMC *value)>
-
-=item C<void i_bitwise_lsr_int(INTVAL value)>
-
-Inplace shift right.
-
-=cut
-
-*/
-
- VTABLE PMC *bitwise_lsr(PMC *value, PMC *dest) {
- const INTVAL result = (UINTVAL)SELF.get_integer() >>
- VTABLE_get_integer(INTERP, value);
-
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-
- VTABLE_set_integer_native(INTERP, dest, result);
- return dest;
- }
-
- VTABLE PMC *bitwise_lsr_int(INTVAL value, PMC *dest) {
- const INTVAL result = (UINTVAL)SELF.get_integer() >> value;
-
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
-
- VTABLE_set_integer_native(INTERP, dest, result);
- return dest;
- }
-
- VTABLE void i_bitwise_lsr(PMC *value) {
- const INTVAL result = (UINTVAL)SELF.get_integer() >>
- VTABLE_get_integer(INTERP, value);
- SELF.set_integer_native(result);
- }
-
- VTABLE void i_bitwise_lsr_int(INTVAL value) {
- const INTVAL result = (UINTVAL)SELF.get_integer() >> value;
- SELF.set_integer_native(result);
- }
-
-/*
-
-=item C<PMC *bitwise_shl(PMC *value, PMC *dest)>
-
-=item C<PMC *bitwise_shl_int(INTVAL value, PMC *dest)>
-
-Returns in C<*dest> the shift left of the scalar by C<*value>. A negative
-C<value> shifts right. The destination may become a C<BigInt> as a result.
-
-=item C<void i_bitwise_shl(PMC *value)>
-
-=item C<void i_bitwise_shl_int(INTVAL value)>
-
-Inplace shift left. A negative C<value> shifts right. SELF may become a
-C<BigInt> as a result.
-
-=cut
-
-*/
-
- VTABLE PMC *bitwise_shl(PMC *value, PMC *dest) {
- return bitwise_left_shift_internal(INTERP, SELF, dest,
- VTABLE_get_integer(INTERP, value));
- }
-
- VTABLE PMC *bitwise_shl_int(INTVAL value, PMC *dest) {
- return bitwise_left_shift_internal(INTERP, SELF, dest, value);
- }
-
- VTABLE void i_bitwise_shl(PMC *value) {
- bitwise_left_shift_internal(INTERP, SELF, SELF,
- VTABLE_get_integer(INTERP, value));
- }
-
- VTABLE void i_bitwise_shl_int(INTVAL value) {
- bitwise_left_shift_internal(INTERP, SELF, SELF, value);
- }
-
-/*
-
-=back
-
=head2 String Methods
=over 4
@@ -1063,7 +630,7 @@
STRING * const s = Parrot_str_concat(INTERP, SELF.get_string(),
VTABLE_get_string(INTERP, value), 0);
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_string_native(INTERP, dest, s);
return dest;
@@ -1073,7 +640,7 @@
STRING * const s = Parrot_str_concat(INTERP,
SELF.get_string(), value, 0);
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_string_native(INTERP, dest, s);
return dest;
@@ -1112,7 +679,7 @@
STRING * const s = SELF.get_string();
const UINTVAL n = (UINTVAL)VTABLE_get_integer(INTERP, value);
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_string_native(INTERP, dest,
Parrot_str_repeat(INTERP, s, n));
@@ -1123,7 +690,7 @@
STRING * const s = SELF.get_string();
const UINTVAL n = value;
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_string_native(INTERP, dest,
Parrot_str_repeat(INTERP, s, n));
@@ -1295,7 +862,7 @@
else if (value_bool && ! my_bool)
return value;
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_bool(INTERP, dest, 0);
return dest;
}
@@ -1316,7 +883,7 @@
VTABLE PMC *logical_not(PMC *dest) {
const INTVAL a = ! SELF.get_bool();
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_bool(INTERP, dest, a);
return dest;
@@ -1367,7 +934,7 @@
*/
VTABLE PMC *share_ro() {
PMC *ret = pt_shared_fixup(INTERP, SELF);
- PMC * const _true = pmc_new(INTERP, enum_class_Integer);
+ PMC * const _true = Parrot_pmc_new(INTERP, enum_class_Integer);
VTABLE_set_integer_native(INTERP, _true, 1);
Modified: branches/boehm_gc_2/src/pmc/scheduler.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/scheduler.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/scheduler.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -57,11 +57,11 @@
/* Set up the core struct. */
core_struct->id = 0;
core_struct->max_tid = 0;
- core_struct->task_list = pmc_new(interp, enum_class_Hash);
- core_struct->task_index = pmc_new(interp, enum_class_ResizableIntegerArray);
- core_struct->wait_index = pmc_new(interp, enum_class_ResizablePMCArray);
- core_struct->handlers = pmc_new(interp, enum_class_ResizablePMCArray);
- core_struct->messages = pmc_new(interp, enum_class_ResizablePMCArray);
+ core_struct->task_list = Parrot_pmc_new(interp, enum_class_Hash);
+ core_struct->task_index = Parrot_pmc_new(interp, enum_class_ResizableIntegerArray);
+ core_struct->wait_index = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
+ core_struct->handlers = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
+ core_struct->messages = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
core_struct->interp = INTERP;
MUTEX_INIT(core_struct->msg_lock);
}
Modified: branches/boehm_gc_2/src/pmc/sockaddr.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/sockaddr.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/sockaddr.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -46,7 +46,8 @@
Parrot_Sockaddr_attributes * const pdata_struct =
(Parrot_Sockaddr_attributes *) PMC_data(SELF);
- pdata_struct->pointer = mem_allocate_zeroed_typed(struct sockaddr_in);
+ pdata_struct->pointer = mem_gc_allocate_zeroed_typed(INTERP,
+ struct sockaddr_in);
PObj_custom_destroy_SET(SELF);
}
@@ -80,7 +81,7 @@
*/
VTABLE PMC *clone() {
- PMC * const dest = pmc_new(INTERP, SELF->vtable->base_type);
+ PMC * const dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
memcpy(PARROT_SOCKADDR(dest)->pointer, PARROT_SOCKADDR(SELF)->pointer,
sizeof (struct sockaddr_in));
return dest;
Modified: branches/boehm_gc_2/src/pmc/string.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/string.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/string.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2003-2009, Parrot Foundation.
+Copyright (C) 2003-2010, Parrot Foundation.
$Id$
=head1 NAME
@@ -71,8 +71,8 @@
*/
VTABLE PMC *clone() {
- PMC * const dest = pmc_new(INTERP, SELF->vtable->base_type);
- VTABLE_set_string_native(INTERP, dest, Parrot_str_copy(INTERP, SELF.get_string()));
+ PMC * const dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
+ VTABLE_set_string_native(INTERP, dest, SELF.get_string());
return dest;
}
@@ -87,8 +87,9 @@
*/
VTABLE INTVAL get_integer() {
- STRING * const s = SELF.get_string();
- return Parrot_str_to_int(INTERP, s);
+ STRING *str_val;
+ GET_ATTR_str_val(INTERP, SELF, str_val);
+ return Parrot_str_to_int(INTERP, str_val);
}
/*
@@ -102,25 +103,9 @@
*/
VTABLE FLOATVAL get_number() {
- STRING * const s = SELF.get_string();
- return Parrot_str_to_num(INTERP, s);
- }
-
-/*
-
-=item C<PMC *get_bignum()>
-
-Returns the big numbers representation of the string.
-
-=cut
-
-*/
-
- VTABLE PMC *get_bignum() {
- STRING * const s = SELF.get_string();
- PMC * const ret = pmc_new(INTERP, enum_class_BigInt);
- VTABLE_set_string_native(INTERP, ret, s);
- return ret;
+ STRING *str_val;
+ GET_ATTR_str_val(interp, SELF, str_val);
+ return Parrot_str_to_num(INTERP, str_val);
}
/*
@@ -136,6 +121,7 @@
VTABLE STRING *get_string() {
STRING *str_val;
GET_ATTR_str_val(INTERP, SELF, str_val);
+
return str_val ? Parrot_str_copy(INTERP, str_val) : NULL;
}
@@ -150,8 +136,9 @@
*/
VTABLE INTVAL get_bool() {
- STRING * const s = SELF.get_string();
- return Parrot_str_boolean(INTERP, s);
+ STRING *str_val;
+ GET_ATTR_str_val(INTERP, SELF, str_val);
+ return Parrot_str_boolean(INTERP, str_val);
}
/*
@@ -200,9 +187,8 @@
*/
VTABLE void set_string_native(STRING *value) {
- /* in lieu of a STRINGNULL, promote any NULL STRINGs to empty ones */
if (!value)
- value = Parrot_str_new(INTERP, NULL, 0);
+ value = STRINGNULL;
/* Only allow constant PMCs to embed constant strings */
if (PObj_constant_TEST(SELF) && !PObj_constant_TEST(value)) {
@@ -227,9 +213,10 @@
*/
VTABLE void assign_string_native(STRING *value) {
- if (!STRING_IS_NULL(value))
+ if (!STRING_IS_NULL(value)) {
SET_ATTR_str_val(INTERP, SELF,
- Parrot_str_set(INTERP, SELF.get_string(), value));
+ Parrot_str_set(INTERP, SELF.get_string(), value));
+ }
else
SET_ATTR_str_val(INTERP, SELF, NULL);
}
@@ -250,172 +237,6 @@
/*
-=item C<PMC *bitwise_ors(PMC *value, PMC *dest)>
-
-=item C<PMC *bitwise_ors_str(PMC *value, PMC *dest)>
-
-=item C<PMC *bitwise_ands(PMC *value, PMC *dest)>
-
-=item C<PMC *bitwise_ands_str(PMC *value, PMC *dest)>
-
-=item C<PMC *bitwise_xors(PMC *value, PMC *dest)>
-
-=item C<PMC *bitwise_xors_str(PMC *value, PMC *dest)>
-
-=item C<void bitwise_nots(PMC *value)>
-
-These functions perform bitwise operations on entire
-strings, and place the result in C<dest>.
-
-=item C<void i_bitwise_ors(PMC *value)>
-
-=item C<void i_bitwise_ors_str(PMC *value)>
-
-=item C<void i_bitwise_ands(PMC *value)>
-
-=item C<void i_bitwise_ands_str(PMC *value)>
-
-=item C<void i_bitwise_xors(PMC *value)>
-
-=item C<void i_bitwise_xors_str(PMC *value)>
-
-=item C<void i_bitwise_nots(PMC *value)>
-
-These functions perform bitwise operations on entire
-strings in place.
-
-=cut
-
-*/
- VTABLE PMC *bitwise_ors(PMC *value, PMC *dest) {
- STRING * const s = VTABLE_get_string(INTERP, SELF);
- STRING * const v = VTABLE_get_string(INTERP, value);
-
- if (!dest)
- dest = pmc_new(INTERP, SELF->vtable->base_type);
-
- VTABLE_set_string_native(INTERP, dest,
- Parrot_str_bitwise_or(INTERP, s, v, NULL));
-
- return dest;
- }
-
- VTABLE PMC *bitwise_ors_str(STRING *value, PMC *dest) {
- STRING * const s = VTABLE_get_string(INTERP, SELF);
-
- if (!dest)
- dest = pmc_new(INTERP, SELF->vtable->base_type);
-
- VTABLE_set_string_native(INTERP, dest,
- Parrot_str_bitwise_or(INTERP, s, value, NULL));
-
- return dest;
- }
-
- VTABLE void i_bitwise_ors(PMC *value) {
- STRING *s = VTABLE_get_string(INTERP, SELF);
- STRING * const v = VTABLE_get_string(INTERP, value);
- SELF.set_string_native(Parrot_str_bitwise_or(INTERP, s, v, &s));
- }
-
- VTABLE void i_bitwise_ors_str(STRING *value) {
- STRING *s = VTABLE_get_string(INTERP, SELF);
- SELF.set_string_native(Parrot_str_bitwise_or(INTERP, s, value, &s));
- }
-
- VTABLE PMC *bitwise_ands(PMC *value, PMC *dest) {
- STRING * const s = VTABLE_get_string(INTERP, SELF);
- STRING * const v = VTABLE_get_string(INTERP, value);
-
- if (!dest)
- dest = pmc_new(INTERP, SELF->vtable->base_type);
-
- VTABLE_set_string_native(INTERP, dest,
- Parrot_str_bitwise_and(INTERP, s, v, NULL));
-
- return dest;
- }
-
- VTABLE PMC *bitwise_ands_str(STRING *value, PMC *dest) {
- STRING * const s = VTABLE_get_string(INTERP, SELF);
-
- if (!dest)
- dest = pmc_new(INTERP, SELF->vtable->base_type);
-
- VTABLE_set_string_native(INTERP, dest,
- Parrot_str_bitwise_and(INTERP, s, value, NULL));
-
- return dest;
- }
-
-
- VTABLE void i_bitwise_ands(PMC *value) {
- STRING *s = VTABLE_get_string(INTERP, SELF);
- STRING * const v = VTABLE_get_string(INTERP, value);
- SELF.set_string_native(Parrot_str_bitwise_and(INTERP, s, v, &s));
- }
-
- VTABLE void i_bitwise_ands_str(STRING *value) {
- STRING *s = VTABLE_get_string(INTERP, SELF);
- SELF.set_string_native(Parrot_str_bitwise_and(INTERP, s, value, &s));
- }
-
- VTABLE PMC *bitwise_xors(PMC *value, PMC *dest) {
- STRING * const s = VTABLE_get_string(INTERP, SELF);
- STRING * const v = VTABLE_get_string(INTERP, value);
-
- if (!dest)
- dest = pmc_new(INTERP, SELF->vtable->base_type);
-
- VTABLE_set_string_native(INTERP, dest,
- Parrot_str_bitwise_xor(INTERP, s, v, NULL));
-
- return dest;
- }
-
- VTABLE PMC *bitwise_xors_str(STRING *value, PMC *dest) {
- STRING * const s = VTABLE_get_string(INTERP, SELF);
-
- if (!dest)
- dest = pmc_new(INTERP, SELF->vtable->base_type);
-
- VTABLE_set_string_native(INTERP, dest,
- Parrot_str_bitwise_xor(INTERP, s, value, NULL));
-
- return dest;
- }
-
- VTABLE void i_bitwise_xors(PMC *value) {
- STRING *s = VTABLE_get_string(INTERP, SELF);
- STRING * const v = VTABLE_get_string(INTERP, value);
- SELF.set_string_native(Parrot_str_bitwise_xor(INTERP, s, v, &s));
- }
-
- VTABLE void i_bitwise_xors_str(STRING *value) {
- STRING *s = VTABLE_get_string(INTERP, SELF);
- SELF.set_string_native(Parrot_str_bitwise_xor(INTERP, s, value, &s));
- }
-
- VTABLE PMC *bitwise_nots(PMC *dest) {
- STRING * const s = VTABLE_get_string(INTERP, SELF);
-
- if (!dest)
- dest = pmc_new(INTERP, SELF->vtable->base_type);
-
- VTABLE_set_string_native(INTERP, dest,
- Parrot_str_bitwise_not(INTERP, s, NULL));
-
- return dest;
- }
-
- VTABLE void i_bitwise_nots() {
- STRING *s = VTABLE_get_string(INTERP, SELF);
- VTABLE_set_string_native(
- INTERP, SELF, Parrot_str_bitwise_not(INTERP, s, &s));
- }
-
-/*
-
=item C<INTVAL is_equal(PMC *value)>
Compares the string with C<value>; returns true if
@@ -425,9 +246,10 @@
*/
VTABLE INTVAL is_equal(PMC *value) {
- STRING * const s = VTABLE_get_string(INTERP, SELF);
+ STRING *str_val;
STRING * const v = VTABLE_get_string(INTERP, value);
- return (INTVAL)(Parrot_str_equal(INTERP, s, v));
+ GET_ATTR_str_val(INTERP, SELF, str_val);
+ return (INTVAL)(Parrot_str_equal(INTERP, str_val, v));
}
MULTI INTVAL is_equal(PMC *value) {
@@ -446,8 +268,13 @@
*/
VTABLE INTVAL is_equal_num(PMC *value) {
- const FLOATVAL sf = Parrot_str_to_num(INTERP, VTABLE_get_string(INTERP, SELF));
+ STRING *str_val;
+ FLOATVAL sf;
const FLOATVAL vf = VTABLE_get_number(INTERP, value);
+
+ GET_ATTR_str_val(INTERP, SELF, str_val);
+ sf = Parrot_str_to_num(INTERP, str_val);
+
return (INTVAL)(sf == vf);
}
@@ -462,9 +289,10 @@
*/
VTABLE INTVAL is_equal_string(PMC *value) {
- STRING * const s = VTABLE_get_string(INTERP, SELF);
+ STRING *str_val;
STRING * const v = VTABLE_get_string(INTERP, value);
- return Parrot_str_equal(INTERP, s, v);
+ GET_ATTR_str_val(INTERP, SELF, str_val);
+ return Parrot_str_equal(INTERP, str_val, v);
}
/*
@@ -479,9 +307,10 @@
*/
VTABLE INTVAL cmp(PMC *value) {
- STRING * const s = VTABLE_get_string(INTERP, SELF);
+ STRING *str_val;
STRING * const v = VTABLE_get_string(INTERP, value);
- return Parrot_str_compare(INTERP, s, v);
+ GET_ATTR_str_val(INTERP, SELF, str_val);
+ return Parrot_str_compare(INTERP, str_val, v);
}
/*
@@ -496,8 +325,11 @@
*/
VTABLE INTVAL cmp_num(PMC *value) {
- const FLOATVAL sf = Parrot_str_to_num(INTERP, VTABLE_get_string(INTERP, SELF));
+ STRING *str_val;
+ FLOATVAL sf;
const FLOATVAL vf = VTABLE_get_number(INTERP, value);
+ GET_ATTR_str_val(INTERP, SELF, str_val);
+ sf = Parrot_str_to_num(INTERP, str_val);
if (sf < vf)
return (INTVAL)(-1);
@@ -520,9 +352,10 @@
*/
VTABLE INTVAL cmp_string(PMC *value) {
- STRING * const s = VTABLE_get_string(INTERP, SELF);
+ STRING *str_val;
STRING * const v = VTABLE_get_string(INTERP, value);
- return Parrot_str_compare(INTERP, s, v);
+ GET_ATTR_str_val(INTERP, SELF, str_val);
+ return Parrot_str_compare(INTERP, str_val, v);
}
/*
@@ -536,8 +369,9 @@
*/
VTABLE void substr(INTVAL offset, INTVAL length, PMC *dest) {
- STRING * const s = VTABLE_get_string(INTERP, SELF);
- STRING * const s2 = Parrot_str_substr(INTERP, s, offset, length, NULL, 0);
+ STRING *str_val, *s2;
+ GET_ATTR_str_val(INTERP, SELF, str_val);
+ s2 = Parrot_str_substr(INTERP, str_val, offset, length, NULL, 0);
VTABLE_set_string_native(INTERP, dest, s2);
}
@@ -552,8 +386,9 @@
*/
VTABLE STRING *substr_str(INTVAL offset, INTVAL length) {
- STRING * const s = VTABLE_get_string(INTERP, SELF);
- return Parrot_str_substr(INTERP, s, offset, length, NULL, 0);
+ STRING *str_val;
+ GET_ATTR_str_val(INTERP, SELF, str_val);
+ return Parrot_str_substr(INTERP, str_val, offset, length, NULL, 0);
}
/*
@@ -568,9 +403,14 @@
*/
VTABLE INTVAL exists_keyed(PMC *key) {
- const INTVAL n = Parrot_str_byte_length(INTERP, VTABLE_get_string(INTERP, SELF));
+ STRING *str_val;
+ INTVAL n;
const INTVAL k = VTABLE_get_integer(INTERP, key);
- return (INTVAL)((k>=0 && k<=n) || (k<0 && -k<=n));
+
+ GET_ATTR_str_val(INTERP, SELF, str_val);
+ n = Parrot_str_byte_length(INTERP, str_val);
+
+ return (INTVAL)((k >= 0 && k <= n) || (k < 0 && -k <= n));
}
/*
@@ -601,8 +441,9 @@
}
VTABLE STRING *get_string_keyed_int(INTVAL pos) {
- STRING * const s = SELF.get_string();
- return Parrot_str_substr(INTERP, s, pos, 1, NULL, 0);
+ STRING *str_val;
+ GET_ATTR_str_val(INTERP, SELF, str_val);
+ return Parrot_str_substr(INTERP, str_val, pos, 1, NULL, 0);
}
VTABLE INTVAL get_integer_keyed(PMC *key) {
@@ -610,8 +451,9 @@
}
VTABLE INTVAL get_integer_keyed_int(INTVAL pos) {
- STRING * const s = SELF.get_string();
- return string_ord(INTERP, s, pos);
+ STRING *str_val;
+ GET_ATTR_str_val(INTERP, SELF, str_val);
+ return string_ord(INTERP, str_val, pos);
}
VTABLE PMC *get_pmc_keyed(PMC *key) {
@@ -619,7 +461,7 @@
}
VTABLE PMC *get_pmc_keyed_int(INTVAL pos) {
- PMC * const dest = pmc_new(INTERP, SELF->vtable->base_type);
+ PMC * const dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
VTABLE_set_string_native(INTERP, dest, SELF.get_string_keyed_int(pos));
return dest;
}
@@ -629,10 +471,10 @@
}
VTABLE void set_string_keyed_int(INTVAL pos, STRING * const value) {
- STRING * const s = SELF.get_string();
- const INTVAL len = Parrot_str_byte_length(INTERP, value);
- Parrot_str_replace(INTERP, s, pos, len, value, NULL);
- VTABLE_set_string_native(INTERP, SELF, s);
+ STRING *str_val;
+ const INTVAL len = Parrot_str_byte_length(INTERP, value);
+ GET_ATTR_str_val(INTERP, SELF, str_val);
+ Parrot_str_replace(INTERP, str_val, pos, len, value, &str_val);
}
VTABLE void set_integer_keyed(PMC *key, INTVAL value) {
@@ -640,10 +482,10 @@
}
VTABLE void set_integer_keyed_int(INTVAL pos, INTVAL value) {
- STRING * const s = SELF.get_string();
+ STRING *str_val;
STRING * const c = string_chr(INTERP, (UINTVAL) value);
- Parrot_str_replace(INTERP, s, pos, 1, c, NULL);
- VTABLE_set_string_native(INTERP, SELF, s);
+ GET_ATTR_str_val(INTERP, SELF, str_val);
+ Parrot_str_replace(INTERP, str_val, pos, 1, c, &str_val);
}
VTABLE void set_pmc_keyed(PMC *key, PMC *value) {
@@ -694,7 +536,7 @@
*/
METHOD to_int(INTVAL base) {
- PMC *result = pmc_new(INTERP, Parrot_get_ctx_HLL_type(interp,
+ PMC *result = Parrot_pmc_new(INTERP, Parrot_get_ctx_HLL_type(interp,
enum_class_Integer));
/* TODO verify encoding */
@@ -763,11 +605,13 @@
*/
VTABLE INTVAL elements() {
- return Parrot_str_byte_length(INTERP, VTABLE_get_string(INTERP, SELF));
+ STRING *str_val;
+ GET_ATTR_str_val(INTERP, SELF, str_val);
+ return Parrot_str_byte_length(INTERP, str_val);
}
VTABLE PMC *get_iter() {
- return pmc_new_init(INTERP, enum_class_StringIterator, SELF);
+ return Parrot_pmc_new_init(INTERP, enum_class_StringIterator, SELF);
}
/*
@@ -786,8 +630,10 @@
*/
VTABLE void freeze(PMC *info) {
+ STRING *str_val;
SUPER(info);
- VTABLE_push_string(INTERP, info, VTABLE_get_string(INTERP, SELF));
+ GET_ATTR_str_val(INTERP, SELF, str_val);
+ VTABLE_push_string(INTERP, info, str_val);
}
/*
@@ -820,8 +666,11 @@
*/
METHOD lower() {
- STRING * const s = Parrot_str_downcase(INTERP,
- VTABLE_get_string(INTERP, SELF));
+ STRING *str_val;
+ STRING *s;
+
+ GET_ATTR_str_val(INTERP, SELF, str_val);
+ s = Parrot_str_downcase(INTERP, str_val);
RETURN(STRING *s);
}
Modified: branches/boehm_gc_2/src/pmc/stringhandle.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/stringhandle.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/stringhandle.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -94,7 +94,7 @@
VTABLE PMC *clone() {
Parrot_StringHandle_attributes * const old_struct = PARROT_STRINGHANDLE(SELF);
- PMC * const copy = pmc_new(INTERP, enum_class_StringHandle);
+ PMC * const copy = Parrot_pmc_new(INTERP, enum_class_StringHandle);
Parrot_StringHandle_attributes * const data_struct = PARROT_STRINGHANDLE(copy);
if (old_struct->stringhandle != NULL)
Modified: branches/boehm_gc_2/src/pmc/stringiterator.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/stringiterator.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/stringiterator.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -73,7 +73,7 @@
Parrot_StringIterator_attributes * const attrs =
PARROT_STRINGITERATOR(SELF);
PMC * const clone =
- pmc_new_init(INTERP, enum_class_StringIterator, attrs->string);
+ Parrot_pmc_new_init(INTERP, enum_class_StringIterator, attrs->string);
Parrot_StringIterator_attributes * const clone_attrs =
PARROT_STRINGITERATOR(clone);
@@ -184,7 +184,7 @@
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS,
"StopIteration");
- ret = pmc_new(INTERP, Parrot_get_ctx_HLL_type(interp, enum_class_String));
+ ret = Parrot_pmc_new(INTERP, Parrot_get_ctx_HLL_type(interp, enum_class_String));
VTABLE_set_string_native(INTERP, ret,
VTABLE_get_string_keyed_int(INTERP, attrs->string, attrs->pos++));
return ret;
@@ -248,7 +248,7 @@
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS,
"StopIteration");
- ret = pmc_new(INTERP, Parrot_get_ctx_HLL_type(interp, enum_class_String));
+ ret = Parrot_pmc_new(INTERP, Parrot_get_ctx_HLL_type(interp, enum_class_String));
VTABLE_set_string_native(INTERP, ret,
VTABLE_get_string_keyed_int(INTERP, attrs->string, --attrs->pos));
return ret;
Modified: branches/boehm_gc_2/src/pmc/sub.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/sub.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/sub.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -184,7 +184,8 @@
if (VTABLE_exists_keyed_str(INTERP, init, field)) {
PMC *tmp = VTABLE_get_pmc_keyed_str(INTERP, init, field);
/* Allocate structure to store argument information in. */
- attrs->arg_info = mem_allocate_zeroed_typed(Parrot_sub_arginfo);
+ attrs->arg_info = mem_gc_allocate_zeroed_typed(INTERP,
+ Parrot_sub_arginfo);
/*
Hash.get_integer_keyed_str return 0 if key doesn't exists.
So, don't check existence of key, just use it.
@@ -222,7 +223,7 @@
if (sub) {
if (sub->arg_info)
- mem_sys_free(sub->arg_info);
+ mem_gc_free(INTERP, sub->arg_info);
}
}
@@ -388,7 +389,7 @@
* create new context, place it in interpreter */
context = Parrot_pcc_get_signature(INTERP, caller_ctx);
if (PMC_IS_NULL(context))
- context = pmc_new(INTERP, enum_class_CallContext);
+ context = Parrot_pmc_new(INTERP, enum_class_CallContext);
CURRENT_CONTEXT(INTERP) = context;
Parrot_pcc_set_caller_ctx(INTERP, context, caller_ctx);
Parrot_pcc_allocate_registers(INTERP, context, sub->n_regs_used);
@@ -425,7 +426,7 @@
* and factor out common code with coroutine pmc
*/
if (!PMC_IS_NULL(sub->lex_info)) {
- Parrot_pcc_set_lex_pad(interp, context, pmc_new_init(INTERP,
+ Parrot_pcc_set_lex_pad(interp, context, Parrot_pmc_new_init(INTERP,
Parrot_get_ctx_HLL_type(interp, enum_class_LexPad),
sub->lex_info));
VTABLE_set_pointer(INTERP, Parrot_pcc_get_lex_pad(interp, context), context);
@@ -458,7 +459,7 @@
Parrot_pcc_set_sub(interp, dummy, outer_pmc);
if (!PMC_IS_NULL(outer_sub->lex_info)) {
- Parrot_pcc_set_lex_pad(interp, dummy, pmc_new_init(INTERP,
+ Parrot_pcc_set_lex_pad(interp, dummy, Parrot_pmc_new_init(INTERP,
Parrot_get_ctx_HLL_type(interp, enum_class_LexPad),
outer_sub->lex_info));
VTABLE_set_pointer(INTERP, Parrot_pcc_get_lex_pad(interp, dummy), dummy);
@@ -506,7 +507,7 @@
*/
VTABLE PMC *clone() {
- PMC * const ret = pmc_new(INTERP, SELF->vtable->base_type);
+ PMC * const ret = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
Parrot_Sub_attributes *dest_sub;
Parrot_Sub_attributes *sub;
@@ -761,7 +762,7 @@
{
/* Create a hash, then use inspect_str to get all of the data to
* fill it up with. */
- PMC * const metadata = pmc_new(interp, enum_class_Hash);
+ PMC * const metadata = Parrot_pmc_new(interp, enum_class_Hash);
STRING * const pos_required_str = CONST_STRING(interp, "pos_required");
STRING * const pos_optional_str = CONST_STRING(interp, "pos_optional");
STRING * const named_required_str = CONST_STRING(interp, "named_required");
@@ -843,7 +844,8 @@
const opcode_t *pc = sub->seg->base.data + sub->start_offs;
/* Allocate structure to store argument information in. */
- sub->arg_info = mem_allocate_zeroed_typed(Parrot_sub_arginfo);
+ sub->arg_info = mem_gc_allocate_zeroed_typed(INTERP,
+ Parrot_sub_arginfo);
/* If the first instruction is a get_params... */
if (*pc == PARROT_OP_get_params_pc) {
@@ -908,7 +910,7 @@
"Unknown introspection value '%S'", what);
}
- retval = pmc_new(INTERP, enum_class_Integer);
+ retval = Parrot_pmc_new(INTERP, enum_class_Integer);
VTABLE_set_integer_native(INTERP, retval, count_found);
return retval;
}
@@ -1064,7 +1066,7 @@
if (PMC_IS_NULL(sub->lex_info)) {
const INTVAL lex_info_id = Parrot_get_ctx_HLL_type(interp,
enum_class_LexInfo);
- sub->lex_info = pmc_new_init(interp, lex_info_id, SELF);
+ sub->lex_info = Parrot_pmc_new_init(interp, lex_info_id, SELF);
}
/* If we've got a context around for the outer sub, set it as the
Modified: branches/boehm_gc_2/src/pmc/task.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/task.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/task.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -180,7 +180,7 @@
VTABLE PMC *clone() {
/* Create the new task PMC, of the same type of this one (we may
* have been subclassed). */
- PMC * const copy = pmc_new(interp, SELF->vtable->base_type);
+ PMC * const copy = Parrot_pmc_new(interp, SELF->vtable->base_type);
Parrot_Task_attributes * const new_struct = PARROT_TASK(copy);
Parrot_Task_attributes * const old_struct = PARROT_TASK(SELF);
@@ -206,27 +206,27 @@
PMC *value;
if (Parrot_str_equal(interp, name, CONST_STRING(interp, "id"))) {
- value = pmc_new(interp, enum_class_Integer);
+ value = Parrot_pmc_new(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, value, core_struct->id);
}
else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "type"))) {
- value = pmc_new(interp, enum_class_String);
+ value = Parrot_pmc_new(interp, enum_class_String);
VTABLE_set_string_native(interp, value, core_struct->type);
}
else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "subtype"))) {
- value = pmc_new(interp, enum_class_String);
+ value = Parrot_pmc_new(interp, enum_class_String);
VTABLE_set_string_native(interp, value, core_struct->subtype);
}
else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "priority"))) {
- value = pmc_new(interp, enum_class_Integer);
+ value = Parrot_pmc_new(interp, enum_class_Integer);
VTABLE_set_integer_native(interp, value, core_struct->priority);
}
else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "status"))) {
- value = pmc_new(interp, enum_class_String);
+ value = Parrot_pmc_new(interp, enum_class_String);
VTABLE_set_string_native(interp, value, core_struct->status);
}
else if (Parrot_str_equal(interp, name, CONST_STRING(interp, "birthtime"))) {
- value = pmc_new(interp, enum_class_Float);
+ value = Parrot_pmc_new(interp, enum_class_Float);
VTABLE_set_number_native(interp, value, core_struct->birthtime);
}
else {
Modified: branches/boehm_gc_2/src/pmc/undef.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/undef.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/undef.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -41,7 +41,7 @@
VTABLE void set_pmc(PMC *other) {
if (!PObj_is_object_TEST(other)) {
- pmc_reuse(INTERP, SELF, other->vtable->base_type, 0);
+ Parrot_pmc_reuse(INTERP, SELF, other->vtable->base_type, 0);
VTABLE_set_pmc(INTERP, SELF, other);
}
else {
@@ -127,7 +127,7 @@
*/
VTABLE void set_integer_native(INTVAL value) {
- pmc_reuse(INTERP, SELF, enum_class_Integer, 0);
+ Parrot_pmc_reuse(INTERP, SELF, enum_class_Integer, 0);
VTABLE_set_integer_native(INTERP, SELF, value);
}
@@ -156,7 +156,7 @@
*/
VTABLE void set_number_native(FLOATVAL value) {
- pmc_reuse(INTERP, SELF, enum_class_Float, 0);
+ Parrot_pmc_reuse(INTERP, SELF, enum_class_Float, 0);
VTABLE_set_number_native(INTERP, SELF, value);
}
@@ -188,7 +188,7 @@
*/
VTABLE void set_string_native(STRING *value) {
- pmc_reuse(interp, SELF, enum_class_String, 0);
+ Parrot_pmc_reuse(interp, SELF, enum_class_String, 0);
VTABLE_set_string_native(INTERP, SELF, value);
}
@@ -217,7 +217,7 @@
*/
VTABLE PMC *logical_not(PMC *dest) {
- dest = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ dest = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_bool(INTERP, dest, 1);
return dest;
}
@@ -264,7 +264,7 @@
*/
VTABLE PMC *clone() {
- return pmc_new(INTERP, SELF->vtable->base_type);
+ return Parrot_pmc_new(INTERP, SELF->vtable->base_type);
}
/*
Modified: branches/boehm_gc_2/src/pmc/unmanagedstruct.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/unmanagedstruct.pmc Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc/unmanagedstruct.pmc Mon Feb 22 12:30:02 2010 (r44294)
@@ -386,7 +386,7 @@
PMC *sig = VTABLE_getprop(interp, ptr, signature_str);
if (VTABLE_defined(interp, sig)) {
STRING *sig_str = VTABLE_get_string(interp, sig);
- ret = pmc_new(interp, enum_class_NCI);
+ ret = Parrot_pmc_new(interp, enum_class_NCI);
VTABLE_set_pointer_keyed_str(interp, ret, sig_str,
*(PMC **)p);
}
@@ -703,7 +703,7 @@
*/
VTABLE PMC *clone() {
- PMC *clone = pmc_new(INTERP, enum_class_UnManagedStruct);
+ PMC *clone = Parrot_pmc_new(INTERP, enum_class_UnManagedStruct);
mem_sys_memmove(PMC_data(clone), PMC_data(SELF),
sizeof (Parrot_UnManagedStruct_attributes));
PARROT_UNMANAGEDSTRUCT(clone)->init =
Modified: branches/boehm_gc_2/src/pmc_freeze.c
==============================================================================
--- branches/boehm_gc_2/src/pmc_freeze.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/pmc_freeze.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -31,6 +31,8 @@
#define THAW_BLOCK_GC_SIZE 100000
+/* HEADERIZER HFILE: include/parrot/pmc_freeze.h */
+
/*
=head2 Public Interface
@@ -52,11 +54,37 @@
Parrot_freeze(PARROT_INTERP, ARGIN(PMC *pmc))
{
ASSERT_ARGS(Parrot_freeze)
- PMC *image = pmc_new(interp, enum_class_ImageIO);
+ PMC *image = Parrot_pmc_new(interp, enum_class_ImageIO);
VTABLE_set_pmc(interp, image, pmc);
return VTABLE_get_string(interp, image);
}
+/*
+
+=item C<INTVAL Parrot_freeze_size(PARROT_INTERP, PMC *pmc)>
+
+Get the size of an image to be frozen without allocating a large buffer.
+
+Used in C<Packfile_Constant_pack_size>.
+
+=cut
+
+*/
+
+PARROT_EXPORT
+PARROT_WARN_UNUSED_RESULT
+PARROT_CAN_RETURN_NULL
+INTVAL
+Parrot_freeze_size(PARROT_INTERP, ARGIN(PMC *pmc))
+{
+ ASSERT_ARGS(Parrot_freeze_size)
+ PMC *result;
+ PMC *visitor = Parrot_pmc_new(interp, enum_class_ImageIOSize);
+ VTABLE_set_pmc(interp, visitor, pmc);
+ result = VTABLE_get_pmc(interp, visitor);
+ return VTABLE_get_integer(interp, result);
+}
+
/*
@@ -82,7 +110,7 @@
{
ASSERT_ARGS(Parrot_thaw)
- PMC *info = pmc_new(interp, enum_class_ImageIO);
+ PMC *info = Parrot_pmc_new(interp, enum_class_ImageIO);
int gc_block = 0;
PMC *result;
@@ -103,8 +131,8 @@
gc_block = 1;
}
- VTABLE_set_pointer(interp, info, &result);
VTABLE_set_string_native(interp, info, image);
+ result = VTABLE_get_pmc(interp, info);
if (gc_block) {
Parrot_unblock_GC_mark(interp);
@@ -158,6 +186,72 @@
return VTABLE_clone(interp, pmc);
}
+/*
+
+=item C<void Parrot_visit_loop_visit(PARROT_INTERP, PMC *info)>
+
+Iterate a visitor PMC visiting each encountered target PMC.
+
+=cut
+
+*/
+
+void
+Parrot_visit_loop_visit(PARROT_INTERP, ARGIN(PMC *info)) {
+ ASSERT_ARGS(Parrot_visit_loop_visit)
+
+ INTVAL i;
+ PMC * const todo = VTABLE_get_iter(interp, info);
+
+ /* can't cache upper limit, visit may append items */
+ for (i = 0; i < VTABLE_elements(interp, todo); i++) {
+ PMC *current = VTABLE_get_pmc_keyed_int(interp, todo, i);
+ if (!current)
+ Parrot_ex_throw_from_c_args(interp, NULL, 1,
+ "NULL current PMC in visit_loop_todo_list");
+
+ PARROT_ASSERT(current->vtable);
+
+ VTABLE_visit(interp, current, info);
+
+ VISIT_PMC(interp, info, PMC_metadata(current));
+ }
+}
+
+/*
+
+=item C<void Parrot_visit_loop_thawfinish(PARROT_INTERP, PMC *info)>
+
+Iterate a visitor PMC thawfinishing each encountered target PMC.
+
+=cut
+
+*/
+
+void
+Parrot_visit_loop_thawfinish(PARROT_INTERP, ARGIN(PMC *info)) {
+ ASSERT_ARGS(Parrot_visit_loop_thawfinish)
+
+ /* call thawfinish for each processed PMC */
+ /*
+ * Thaw in reverse order. We have to fully thaw younger PMCs
+ * before use them in older.
+ *
+ * XXX There are no younger or older pmcs in a directed graph
+ * that allows cycles. Any code that requires a specific
+ * order here is likely broken.
+ */
+
+ PMC * const todo = VTABLE_get_iter(interp, info);
+ const INTVAL n = VTABLE_elements(interp, todo);
+ int i;
+
+ for (i = n-1; i >= 0; --i) {
+ PMC *current = VTABLE_get_pmc_keyed_int(interp, todo, i);
+ if (!PMC_IS_NULL(current))
+ VTABLE_thawfinish(interp, current, info);
+ }
+}
/*
Modified: branches/boehm_gc_2/src/runcore/cores.c
==============================================================================
--- branches/boehm_gc_2/src/runcore/cores.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/runcore/cores.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -405,7 +405,7 @@
{
ASSERT_ARGS(Parrot_runcore_slow_init)
- Parrot_runcore_t *coredata = mem_allocate_typed(Parrot_runcore_t);
+ Parrot_runcore_t *coredata = mem_gc_allocate_zeroed_typed(interp, Parrot_runcore_t);
coredata->name = CONST_STRING(interp, "slow");
coredata->id = PARROT_SLOW_CORE;
coredata->opinit = PARROT_CORE_OPLIB_INIT;
@@ -435,7 +435,7 @@
{
ASSERT_ARGS(Parrot_runcore_fast_init)
- Parrot_runcore_t *coredata = mem_allocate_typed(Parrot_runcore_t);
+ Parrot_runcore_t *coredata = mem_gc_allocate_zeroed_typed(interp, Parrot_runcore_t);
coredata->name = CONST_STRING(interp, "fast");
coredata->id = PARROT_FAST_CORE;
coredata->opinit = PARROT_CORE_OPLIB_INIT;
@@ -465,7 +465,7 @@
{
ASSERT_ARGS(Parrot_runcore_switch_init)
- Parrot_runcore_t *coredata = mem_allocate_typed(Parrot_runcore_t);
+ Parrot_runcore_t *coredata = mem_gc_allocate_zeroed_typed(interp, Parrot_runcore_t);
coredata->name = CONST_STRING(interp, "switch");
coredata->id = PARROT_SWITCH_CORE;
coredata->opinit = PARROT_CORE_SWITCH_OPLIB_INIT;
@@ -495,7 +495,7 @@
{
ASSERT_ARGS(Parrot_runcore_exec_init)
- Parrot_runcore_t *coredata = mem_allocate_typed(Parrot_runcore_t);
+ Parrot_runcore_t *coredata = mem_gc_allocate_zeroed_typed(interp, Parrot_runcore_t);
coredata->name = CONST_STRING(interp, "exec");
coredata->id = PARROT_EXEC_CORE;
coredata->opinit = PARROT_CORE_OPLIB_INIT;
@@ -523,7 +523,7 @@
{
ASSERT_ARGS(Parrot_runcore_gc_debug_init)
- Parrot_runcore_t *coredata = mem_allocate_typed(Parrot_runcore_t);
+ Parrot_runcore_t *coredata = mem_gc_allocate_zeroed_typed(interp, Parrot_runcore_t);
coredata->name = CONST_STRING(interp, "gc_debug");
coredata->id = PARROT_GC_DEBUG_CORE;
coredata->opinit = PARROT_CORE_OPLIB_INIT;
@@ -553,7 +553,7 @@
{
ASSERT_ARGS(Parrot_runcore_debugger_init)
- Parrot_runcore_t *coredata = mem_allocate_typed(Parrot_runcore_t);
+ Parrot_runcore_t *coredata = mem_gc_allocate_zeroed_typed(interp, Parrot_runcore_t);
coredata->name = CONST_STRING(interp, "debugger");
coredata->id = PARROT_DEBUGGER_CORE;
coredata->opinit = PARROT_CORE_OPLIB_INIT;
@@ -585,7 +585,7 @@
{
ASSERT_ARGS(Parrot_runcore_cgp_init)
- Parrot_runcore_t *coredata = mem_allocate_typed(Parrot_runcore_t);
+ Parrot_runcore_t *coredata = mem_gc_allocate_zeroed_typed(interp, Parrot_runcore_t);
coredata->name = CONST_STRING(interp, "cgp");
coredata->id = PARROT_CGP_CORE;
coredata->opinit = PARROT_CORE_CGP_OPLIB_INIT;
@@ -618,7 +618,7 @@
{
ASSERT_ARGS(Parrot_runcore_cgoto_init)
- Parrot_runcore_t *coredata = mem_allocate_typed(Parrot_runcore_t);
+ Parrot_runcore_t *coredata = mem_gc_allocate_zeroed_typed(interp, Parrot_runcore_t);
coredata->name = CONST_STRING(interp, "cgoto");
coredata->id = PARROT_CGOTO_CORE;
coredata->opinit = PARROT_CORE_CG_OPLIB_INIT;
@@ -999,16 +999,8 @@
const size_t N = interp->code->base.size;
size_t i, n_pics;
-/* Parrot_memalign_if_possible in OpenBSD allocates 256 if you ask for 312
- -- Need to verify this, it may have been a bug elsewhere. If it works now,
- we can remove the mem_sys_allocate_zeroed line below. */
-
-#if 0
- void **temp = (void **)mem_sys_allocate_zeroed(N * sizeof (void *));
-#else
void **temp = (void **)Parrot_memalign_if_possible(256,
N * sizeof (void *));
-#endif
/* calc and remember pred_offset */
CONTEXT(interp)->pred_offset = pc - (opcode_t *)temp;
@@ -1057,7 +1049,7 @@
ASSERT_ARGS(load_prederef)
const oplib_init_f init_func = get_core_op_lib_init(interp, runcore);
- int (*get_op)(const char * name, int full);
+ int (*get_op)(PARROT_INTERP, const char * name, int full);
get_op = interp->op_lib->op_code;
interp->op_lib = init_func(1);
Modified: branches/boehm_gc_2/src/runcore/main.c
==============================================================================
--- branches/boehm_gc_2/src/runcore/main.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/runcore/main.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -166,11 +166,12 @@
Parrot_runcore_register(PARROT_INTERP, ARGIN(Parrot_runcore_t *coredata))
{
ASSERT_ARGS(Parrot_runcore_register)
- size_t num_cores = ++interp->num_cores;
+ size_t i = interp->num_cores++;
- mem_realloc_n_typed(interp->cores, num_cores, Parrot_runcore_t *);
+ interp->cores = mem_gc_realloc_n_typed_zeroed(interp, interp->cores,
+ interp->num_cores, i, Parrot_runcore_t *);
- interp->cores[num_cores - 1] = coredata;
+ interp->cores[i] = coredata;
return 1;
}
@@ -383,13 +384,15 @@
if (nb < 8)
nb = (size_t)8;
- pi->branches = mem_allocate_n_typed(nb, Prederef_branch);
+ pi->branches = mem_gc_allocate_n_zeroed_typed(interp, nb, Prederef_branch);
pi->n_allocated = nb;
pi->n_branches = 0;
}
else if (pi->n_branches >= pi->n_allocated) {
+ size_t old = pi->n_allocated;
pi->n_allocated = (size_t) (pi->n_allocated * 1.5);
- mem_realloc_n_typed(pi->branches, pi->n_allocated, Prederef_branch);
+ pi->branches = mem_gc_realloc_n_typed_zeroed(interp,
+ pi->branches, pi->n_allocated, old, Prederef_branch);
}
pi->branches[pi->n_branches].offs = offset;
@@ -481,7 +484,7 @@
interp->op_func_table = PARROT_CORE_OPLIB_INIT(1)->op_func_table;
if (interp->evc_func_table) {
- mem_sys_free(interp->evc_func_table);
+ mem_gc_free(interp, interp->evc_func_table);
interp->evc_func_table = NULL;
}
@@ -589,7 +592,7 @@
if (!interp->evc_func_table) {
size_t i;
- interp->evc_func_table = mem_allocate_n_typed(n, op_func_t);
+ interp->evc_func_table = mem_gc_allocate_n_zeroed_typed(interp, n, op_func_t);
for (i = 0; i < n; ++i)
interp->evc_func_table[i] = (op_func_t)
@@ -623,11 +626,11 @@
if (destroy)
(*destroy)(interp, core);
- mem_sys_free(core);
+ mem_gc_free(interp, core);
}
if (interp->cores)
- mem_sys_free(interp->cores);
+ mem_gc_free(interp, interp->cores);
interp->cores = NULL;
interp->run_core = NULL;
@@ -640,17 +643,17 @@
cg_lib = PARROT_CORE_CGP_OPLIB_INIT(1);
if (cg_lib->op_func_table)
- mem_sys_free(cg_lib->op_func_table);
+ mem_gc_free(interp, cg_lib->op_func_table);
cg_lib->op_func_table = NULL;
cg_lib = PARROT_CORE_CG_OPLIB_INIT(1);
if (cg_lib->op_func_table)
- mem_sys_free(cg_lib->op_func_table);
+ mem_gc_free(interp, cg_lib->op_func_table);
cg_lib->op_func_table = NULL;
#endif
- mem_sys_free(interp->op_info_table);
- mem_sys_free(interp->op_func_table);
+ mem_gc_free(interp, interp->op_info_table);
+ mem_gc_free(interp, interp->op_func_table);
interp->op_info_table = NULL;
interp->op_func_table = NULL;
}
@@ -697,11 +700,11 @@
}
if (!interp->all_op_libs)
- interp->all_op_libs = (op_lib_t **)mem_sys_allocate(
- sizeof (op_lib_t *) * (interp->n_libs + 1));
+ interp->all_op_libs = mem_gc_allocate_n_zeroed_typed(interp,
+ interp->n_libs + 1, op_lib_t*);
else
- mem_realloc_n_typed(interp->all_op_libs, interp->n_libs + 1,
- op_lib_t *);
+ mem_gc_realloc_n_typed_zeroed(interp, interp->all_op_libs,
+ interp->n_libs + 1, interp->n_libs, op_lib_t *);
init_func = get_dynamic_op_lib_init(interp, lib_pmc);
lib = init_func(1);
@@ -726,18 +729,18 @@
PARROT_ASSERT(interp->op_count == core->op_count);
- new_evc_func_table = (op_func_t *)mem_sys_realloc(interp->evc_func_table,
- sizeof (op_func_t) * n_tot);
+ new_evc_func_table = mem_gc_realloc_n_typed_zeroed(interp,
+ interp->evc_func_table, n_tot, n_old, op_func_t);
if (core->flags & OP_FUNC_IS_ALLOCATED) {
- new_func_table = (op_func_t *)mem_sys_realloc(core->op_func_table,
- sizeof (op_func_t) * n_tot);
- new_info_table = (op_info_t *)mem_sys_realloc(core->op_info_table,
- sizeof (op_info_t) * n_tot);
+ new_func_table = mem_gc_realloc_n_typed_zeroed(interp,
+ core->op_func_table, n_tot, n_old, op_func_t);
+ new_info_table = mem_gc_realloc_n_typed_zeroed(interp,
+ core->op_info_table, n_tot, n_old, op_info_t);
}
else {
/* allocate new op_func and info tables */
- new_func_table = mem_allocate_n_typed(n_tot, op_func_t);
- new_info_table = mem_allocate_n_typed(n_tot, op_info_t);
+ new_func_table = mem_gc_allocate_n_zeroed_typed(interp, n_tot, op_func_t);
+ new_info_table = mem_gc_allocate_n_zeroed_typed(interp, n_tot, op_info_t);
/* copy old */
for (i = 0; i < n_old; ++i) {
@@ -811,13 +814,13 @@
PMC *lib_variant;
if (cg_lib->flags & OP_FUNC_IS_ALLOCATED) {
- ops_addr = (op_func_t *)mem_sys_realloc(cg_lib->op_func_table,
- n_tot * sizeof (op_func_t));
+ ops_addr = mem_gc_realloc_n_typed_zeroed(interp,
+ cg_lib->op_func_table, n_tot, n_old, op_func_t);
}
else {
size_t i;
- ops_addr = mem_allocate_n_typed(n_tot, op_func_t);
+ ops_addr = mem_gc_allocate_n_zeroed_typed(interp, n_tot, op_func_t);
cg_lib->flags = OP_FUNC_IS_ALLOCATED;
for (i = 0; i < n_old; ++i)
Modified: branches/boehm_gc_2/src/runcore/profiling.c
==============================================================================
--- branches/boehm_gc_2/src/runcore/profiling.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/runcore/profiling.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -34,7 +34,7 @@
#endif
#define PPROF_VERSION 2
-#define MAX_NAMESPACE_DEPTH 32
+#define MAX_NS_DEPTH 32
#define code_start interp->code->base.data
#define code_end (interp->code->base.data + interp->code->base.size)
@@ -44,6 +44,10 @@
/* HEADERIZER BEGIN: static */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+static void add_bogus_parent_runloop(
+ ARGIN(Parrot_profiling_runcore_t * runcore))
+ __attribute__nonnull__(1);
+
PARROT_CAN_RETURN_NULL
static void * init_profiling_core(PARROT_INTERP,
ARGIN(Parrot_profiling_runcore_t *runcore),
@@ -54,13 +58,17 @@
static void record_values_ascii_pprof(
ARGIN(Parrot_profiling_runcore_t * runcore),
+ ARGIN(PPROF_DATA *pprof_data),
ARGIN_NULLOK(Parrot_profiling_line type))
- __attribute__nonnull__(1);
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
static void record_values_none(
ARGIN(Parrot_profiling_runcore_t * runcore),
+ ARGIN(PPROF_DATA *pprof_data),
ARGIN_NULLOK(Parrot_profiling_line type))
- __attribute__nonnull__(1);
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
@@ -71,14 +79,18 @@
__attribute__nonnull__(2)
__attribute__nonnull__(3);
+#define ASSERT_ARGS_add_bogus_parent_runloop __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(runcore))
#define ASSERT_ARGS_init_profiling_core __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(runcore) \
, PARROT_ASSERT_ARG(pc))
#define ASSERT_ARGS_record_values_ascii_pprof __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(runcore))
+ PARROT_ASSERT_ARG(runcore) \
+ , PARROT_ASSERT_ARG(pprof_data))
#define ASSERT_ARGS_record_values_none __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(runcore))
+ PARROT_ASSERT_ARG(runcore) \
+ , PARROT_ASSERT_ARG(pprof_data))
#define ASSERT_ARGS_runops_profiling_core __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(runcore) \
@@ -103,7 +115,7 @@
ASSERT_ARGS(Parrot_runcore_profiling_init)
Parrot_profiling_runcore_t *coredata =
- mem_allocate_typed(Parrot_profiling_runcore_t);
+ mem_gc_allocate_zeroed_typed(interp, Parrot_profiling_runcore_t);
coredata->name = CONST_STRING(interp, "profiling");
coredata->id = PARROT_PROFILING_CORE;
@@ -148,7 +160,7 @@
runcore->level = 0;
runcore->time_size = 32;
runcore->line_cache = parrot_new_pointer_hash(interp);
- runcore->time = mem_allocate_n_typed(runcore->time_size,
+ runcore->time = mem_gc_allocate_n_typed(interp, runcore->time_size,
UHUGEINTVAL);
/* figure out what format the output should be in */
@@ -222,7 +234,7 @@
}
/* put profile_filename in the gc root set so it won't get collected */
- gc_register_pmc(interp, (PMC *) runcore->profile_filename);
+ Parrot_pmc_gc_register(interp, (PMC *) runcore->profile_filename);
Profiling_first_loop_SET(runcore);
@@ -250,10 +262,10 @@
{
ASSERT_ARGS(runops_profiling_core)
- PMC *preop_sub, *argv;
- opcode_t *preop_pc;
- STRING *unknown_file = CONST_STRING(interp, "<unknown file>");
- UHUGEINTVAL op_time;
+ PMC *argv;
+ opcode_t *preop_pc;
+ UHUGEINTVAL op_time;
+ PPROF_DATA pprof_data[PPROF_DATA_MAX + 1];
runcore->runcore_start = Parrot_hires_get_time();
@@ -262,9 +274,8 @@
if (runcore->level >= runcore->time_size) {
runcore->time_size *= 2;
- runcore->time =
- mem_realloc_n_typed(runcore->time, runcore->time_size + 1,
- UHUGEINTVAL);
+ runcore->time = mem_gc_realloc_n_typed(interp,
+ runcore->time, runcore->time_size + 1, UHUGEINTVAL);
}
/* store the time between DO_OP and the start of this runcore in this
@@ -278,22 +289,19 @@
/* argv isn't initialized until after :init (etc) subs are executed */
if (argv && !Profiling_have_printed_cli_TEST(runcore)) {
- PMC *iglobals = interp->iglobals;
- PMC *executable = VTABLE_get_pmc_keyed_int(interp, iglobals,
- IGLOBALS_EXECUTABLE);
- STRING *space = CONST_STRING(interp, " ");
- STRING *cli_args = Parrot_str_join(interp, space, argv);
- STRING *cli_str;
char *cli_cstr;
+ STRING *space, *cli_args, *cli_exe, *cli_str;
+ PMC *exe_name = VTABLE_get_pmc_keyed_int(interp, interp->iglobals, IGLOBALS_EXECUTABLE);
- cli_str = Parrot_str_concat(interp, VTABLE_get_string(interp,
- executable), space, 0);
- cli_str = Parrot_str_concat(interp, cli_str, cli_args, 0);
+ space = CONST_STRING(interp, " ");
+ cli_args = Parrot_str_join(interp, space, argv);
+ cli_exe = VTABLE_get_string(interp, exe_name);
+ cli_str = Parrot_sprintf_c(interp, "%Ss %Ss", cli_exe, cli_args);
cli_cstr = Parrot_str_to_cstring(interp, cli_str);
/* CLI line won't reflect any options passed to the parrot binary. */
- runcore->pprof_data[PPROF_DATA_CLI] = (PPROF_DATA) cli_cstr;
- runcore->output_fn(runcore, PPROF_LINE_CLI);
+ pprof_data[PPROF_DATA_CLI] = (PPROF_DATA) cli_cstr;
+ runcore->output_fn(runcore, pprof_data, PPROF_LINE_CLI);
Parrot_str_free_cstring(cli_cstr);
@@ -302,23 +310,12 @@
if (Profiling_first_loop_TEST(runcore)) {
- runcore->pprof_data[PPROF_DATA_VERSION] = (PPROF_DATA) PPROF_VERSION;
- runcore->output_fn(runcore, PPROF_LINE_VERSION);
+ Profiling_first_loop_CLEAR(runcore);
- /* make all separate runloops appear to come from a single source */
- runcore->pprof_data[PPROF_DATA_NAMESPACE] = (PPROF_DATA) "main";
- runcore->pprof_data[PPROF_DATA_FILENAME] = (PPROF_DATA) "no_file";
- runcore->pprof_data[PPROF_DATA_SUB_ADDR] = 1;
- runcore->pprof_data[PPROF_DATA_CTX_ADDR] = 1;
- runcore->output_fn(runcore, PPROF_LINE_CONTEXT_SWITCH);
-
- runcore->pprof_data[PPROF_DATA_LINE] = runcore->runloop_count;
- runcore->pprof_data[PPROF_DATA_TIME] = 0;
- runcore->pprof_data[PPROF_DATA_OPNAME] = (PPROF_DATA) "noop";
- runcore->output_fn(runcore, PPROF_LINE_OP);
+ pprof_data[PPROF_DATA_VERSION] = (PPROF_DATA) PPROF_VERSION;
+ runcore->output_fn(runcore, pprof_data, PPROF_LINE_VERSION);
- runcore->runloop_count++;
- Profiling_first_loop_CLEAR(runcore);
+ add_bogus_parent_runloop(runcore);
}
while (pc) {
@@ -333,7 +330,6 @@
preop_ctx_pmc = CURRENT_CONTEXT(interp);
preop_ctx = PMC_data_typed(preop_ctx_pmc, Parrot_Context*);
preop_ctx->current_pc = pc;
- preop_sub = preop_ctx->current_sub;
preop_pc = pc;
runcore->level++;
@@ -363,7 +359,7 @@
if (preop_ctx->current_sub) {
STRING *sub_name, *full_ns, *ns_separator, *preop_filename;
char *full_ns_cstr, *filename_cstr;
- STRING *ns_names[MAX_NAMESPACE_DEPTH];
+ STRING *ns_names[MAX_NS_DEPTH];
PMC *ns = preop_ctx->current_namespace;
INTVAL i;
@@ -376,7 +372,7 @@
full_ns = Parrot_str_new(interp, "", 0);
ns_separator = Parrot_str_new(interp, ";", 1);
- i = MAX_NAMESPACE_DEPTH - 1;
+ i = MAX_NS_DEPTH - 1;
for (;ns ; i--) {
if (i < 0) {
/* should probably warn about truncated namespace here */
@@ -388,7 +384,7 @@
i++;
i++; /* the root namespace has an empty name, so ignore it */
- for (;i < MAX_NAMESPACE_DEPTH; i++) {
+ for (;i < MAX_NS_DEPTH; i++) {
full_ns = Parrot_str_concat(interp, full_ns, ns_names[i], 0);
full_ns = Parrot_str_concat(interp, full_ns, ns_separator, 0);
}
@@ -397,11 +393,11 @@
full_ns = Parrot_str_concat(interp, full_ns, sub_name, 0);
full_ns_cstr = Parrot_str_to_cstring(interp, full_ns);
- runcore->pprof_data[PPROF_DATA_NAMESPACE] = (PPROF_DATA) full_ns_cstr;
- runcore->pprof_data[PPROF_DATA_FILENAME] = (PPROF_DATA) filename_cstr;
- runcore->pprof_data[PPROF_DATA_SUB_ADDR] = (PPROF_DATA) preop_ctx->current_sub;
- runcore->pprof_data[PPROF_DATA_CTX_ADDR] = (PPROF_DATA) preop_ctx;
- runcore->output_fn(runcore, PPROF_LINE_CONTEXT_SWITCH);
+ pprof_data[PPROF_DATA_NAMESPACE] = (PPROF_DATA) full_ns_cstr;
+ pprof_data[PPROF_DATA_FILENAME] = (PPROF_DATA) filename_cstr;
+ pprof_data[PPROF_DATA_SUB_ADDR] = (PPROF_DATA) preop_ctx->current_sub;
+ pprof_data[PPROF_DATA_CTX_ADDR] = (PPROF_DATA) preop_ctx;
+ runcore->output_fn(runcore, pprof_data, PPROF_LINE_CONTEXT_SWITCH);
Parrot_str_free_cstring(full_ns_cstr);
Parrot_str_free_cstring(filename_cstr);
@@ -429,7 +425,6 @@
if (!PMC_IS_NULL(annot)) {
- /* this is probably pessimal but it's just a poc at this point */
PMC *iter = VTABLE_get_iter(interp, annot);
while (VTABLE_get_bool(interp, iter)) {
@@ -438,9 +433,9 @@
char *key_cstr = Parrot_str_to_cstring(interp, key);
char *val_cstr = Parrot_str_to_cstring(interp, val);
- runcore->pprof_data[PPROF_DATA_ANNOTATION_NAME] = (PPROF_DATA) key_cstr;
- runcore->pprof_data[PPROF_DATA_ANNOTATION_VALUE] = (PPROF_DATA) val_cstr;
- runcore->output_fn(runcore, PPROF_LINE_ANNOTATION);
+ pprof_data[PPROF_DATA_ANNOTATION_NAME] = (PPROF_DATA) key_cstr;
+ pprof_data[PPROF_DATA_ANNOTATION_VALUE] = (PPROF_DATA) val_cstr;
+ runcore->output_fn(runcore, pprof_data, PPROF_LINE_ANNOTATION);
Parrot_str_free_cstring(key_cstr);
Parrot_str_free_cstring(val_cstr);
@@ -448,30 +443,18 @@
}
}
- runcore->pprof_data[PPROF_DATA_LINE] = preop_line;
- runcore->pprof_data[PPROF_DATA_TIME] = op_time;
- runcore->pprof_data[PPROF_DATA_OPNAME] =
- (PPROF_DATA)(interp->op_info_table)[*preop_pc].name;
- runcore->output_fn(runcore, PPROF_LINE_OP);
+ pprof_data[PPROF_DATA_LINE] = preop_line;
+ pprof_data[PPROF_DATA_TIME] = op_time;
+ pprof_data[PPROF_DATA_OPNAME] = (PPROF_DATA)(interp->op_info_table)[*preop_pc].name;
+ runcore->output_fn(runcore, pprof_data, PPROF_LINE_OP);
}
/* make it easy to tell separate runloops apart */
if (runcore->level == 0) {
- runcore->output_fn(runcore, PPROF_LINE_END_OF_RUNLOOP);
- /* make all separate runloops appear to come from a single source */
- runcore->pprof_data[PPROF_DATA_NAMESPACE] = (PPROF_DATA) "main";
- runcore->pprof_data[PPROF_DATA_FILENAME] = (PPROF_DATA) "no_file";
- runcore->pprof_data[PPROF_DATA_SUB_ADDR] = 1;
- runcore->pprof_data[PPROF_DATA_CTX_ADDR] = 1;
- runcore->output_fn(runcore, PPROF_LINE_CONTEXT_SWITCH);
-
- runcore->pprof_data[PPROF_DATA_LINE] = runcore->runloop_count;
- runcore->pprof_data[PPROF_DATA_TIME] = 0;
- runcore->pprof_data[PPROF_DATA_OPNAME] = (PPROF_DATA) "noop";
- runcore->output_fn(runcore, PPROF_LINE_OP);
+ runcore->output_fn(runcore, pprof_data, PPROF_LINE_END_OF_RUNLOOP);
- runcore->runloop_count++;
+ add_bogus_parent_runloop(runcore);
}
Profiling_exit_check_SET(runcore);
@@ -481,8 +464,45 @@
/*
+=item C<static void add_bogus_parent_runloop(Parrot_profiling_runcore_t *
+runcore)>
+
+Record profiling information for a bogus parent runloop. Parrot program
+generally have several runloops, so a little trickery is needed to profile them
+all as a single program. This is accomplished by having a fake sub named
+'main' which has no cost in itself but which appears to call all top-level
+runloops as children.
+
+=cut
+
+*/
+
+static void
+add_bogus_parent_runloop(ARGIN(Parrot_profiling_runcore_t * runcore))
+{
+ ASSERT_ARGS(add_bogus_parent_runloop)
+
+ PPROF_DATA pprof_data[PPROF_DATA_MAX+1];
+
+ /* make all separate runloops appear to come from a single source */
+ pprof_data[PPROF_DATA_NAMESPACE] = (PPROF_DATA) "main";
+ pprof_data[PPROF_DATA_FILENAME] = (PPROF_DATA) "no_file";
+ pprof_data[PPROF_DATA_SUB_ADDR] = 1;
+ pprof_data[PPROF_DATA_CTX_ADDR] = 1;
+ runcore->output_fn(runcore, pprof_data, PPROF_LINE_CONTEXT_SWITCH);
+
+ pprof_data[PPROF_DATA_LINE] = runcore->runloop_count;
+ pprof_data[PPROF_DATA_TIME] = 0;
+ pprof_data[PPROF_DATA_OPNAME] = (PPROF_DATA) "noop";
+ runcore->output_fn(runcore, pprof_data, PPROF_LINE_OP);
+
+ runcore->runloop_count++;
+}
+
+/*
+
=item C<static void record_values_ascii_pprof(Parrot_profiling_runcore_t *
-runcore, Parrot_profiling_line type)>
+runcore, PPROF_DATA *pprof_data, Parrot_profiling_line type)>
Record profiling data to a filehandle in a human-readable format.
@@ -492,17 +512,17 @@
static void
record_values_ascii_pprof(ARGIN(Parrot_profiling_runcore_t * runcore),
-ARGIN_NULLOK(Parrot_profiling_line type))
+ARGIN(PPROF_DATA *pprof_data), ARGIN_NULLOK(Parrot_profiling_line type))
{
ASSERT_ARGS(record_values_ascii_pprof)
switch (type) {
case PPROF_LINE_CONTEXT_SWITCH:
{
- char *pd_namespace = (char *) runcore->pprof_data[PPROF_DATA_NAMESPACE];
- char *pd_filename = (char *) runcore->pprof_data[PPROF_DATA_FILENAME];
- void *sub_addr = (void *) runcore->pprof_data[PPROF_DATA_SUB_ADDR];
- void *ctx_addr = (void *) runcore->pprof_data[PPROF_DATA_CTX_ADDR];
+ char *pd_namespace = (char *) pprof_data[PPROF_DATA_NAMESPACE];
+ char *pd_filename = (char *) pprof_data[PPROF_DATA_FILENAME];
+ void *sub_addr = (void *) pprof_data[PPROF_DATA_SUB_ADDR];
+ void *ctx_addr = (void *) pprof_data[PPROF_DATA_CTX_ADDR];
fprintf(runcore->profile_fd,
"CS:{x{ns:%s}x}{x{file:%s}x}{x{sub:%p}x}{x{ctx:%p}x}\n",
pd_namespace, pd_filename, sub_addr, ctx_addr);
@@ -511,9 +531,9 @@
case PPROF_LINE_OP:
{
- PPROF_DATA line = (PPROF_DATA) runcore->pprof_data[PPROF_DATA_LINE];
- PPROF_DATA time = (PPROF_DATA) runcore->pprof_data[PPROF_DATA_TIME];
- char *opname = (char *) runcore->pprof_data[PPROF_DATA_OPNAME];
+ PPROF_DATA line = (PPROF_DATA) pprof_data[PPROF_DATA_LINE];
+ PPROF_DATA time = (PPROF_DATA) pprof_data[PPROF_DATA_TIME];
+ char *opname = (char *) pprof_data[PPROF_DATA_OPNAME];
fprintf(runcore->profile_fd, "OP:{x{line:%d}x}{x{time:%d}x}{x{op:%s}x}\n",
(int) line, (int) time, opname);
}
@@ -521,21 +541,17 @@
case PPROF_LINE_ANNOTATION:
{
- char *name = (char *) runcore->pprof_data[PPROF_DATA_ANNOTATION_NAME];
- char *value = (char *) runcore->pprof_data[PPROF_DATA_ANNOTATION_VALUE];
+ char *name = (char *) pprof_data[PPROF_DATA_ANNOTATION_NAME];
+ char *value = (char *) pprof_data[PPROF_DATA_ANNOTATION_VALUE];
fprintf(runcore->profile_fd, "AN:{x{name:%s}x}{x{value:%s}x}\n", name, value);
}
case PPROF_LINE_CLI:
- {
- char *cli = (char *) runcore->pprof_data[PPROF_DATA_CLI];
- fprintf(runcore->profile_fd, "CLI: %s\n", cli);
- }
+ fprintf(runcore->profile_fd, "CLI: %s\n", (char *) pprof_data[PPROF_DATA_CLI]);
break;
case PPROF_LINE_VERSION:
- fprintf(runcore->profile_fd, "VERSION:%d\n",
- (int) runcore->pprof_data[PPROF_DATA_VERSION]);
+ fprintf(runcore->profile_fd, "VERSION:%d\n", (int) pprof_data[PPROF_DATA_VERSION]);
break;
case PPROF_LINE_END_OF_RUNLOOP:
@@ -550,7 +566,7 @@
/*
=item C<static void record_values_none(Parrot_profiling_runcore_t * runcore,
-Parrot_profiling_line type)>
+PPROF_DATA *pprof_data, Parrot_profiling_line type)>
Accept data but don't actually write it anywhere.
@@ -560,10 +576,11 @@
static void
record_values_none(ARGIN(Parrot_profiling_runcore_t * runcore),
-ARGIN_NULLOK(Parrot_profiling_line type))
+ARGIN(PPROF_DATA *pprof_data), ARGIN_NULLOK(Parrot_profiling_line type))
{
ASSERT_ARGS(record_values_none)
UNUSED(runcore);
+ UNUSED(pprof_data);
UNUSED(type);
}
Modified: branches/boehm_gc_2/src/scheduler.c
==============================================================================
--- branches/boehm_gc_2/src/scheduler.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/scheduler.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -79,7 +79,7 @@
/* Add the very first interpreter to the list of interps. */
pt_add_to_interpreters(interp, NULL);
- scheduler = pmc_new(interp, enum_class_Scheduler);
+ scheduler = Parrot_pmc_new(interp, enum_class_Scheduler);
scheduler = VTABLE_share_ro(interp, scheduler);
interp->scheduler = scheduler;
@@ -290,7 +290,7 @@
INTVAL repeat, ARGIN_NULLOK(PMC *sub))
{
ASSERT_ARGS(Parrot_cx_schedule_timer)
- PMC * const timer = pmc_new(interp, enum_class_Timer);
+ PMC * const timer = Parrot_pmc_new(interp, enum_class_Timer);
VTABLE_set_number_keyed_int(interp, timer, PARROT_TIMER_NSEC, duration);
VTABLE_set_number_keyed_int(interp, timer, PARROT_TIMER_INTERVAL, interval);
@@ -356,7 +356,7 @@
ARGIN(PMC *user_data), ARGIN(char *ext_data))
{
ASSERT_ARGS(Parrot_cx_schedule_callback)
- PMC *callback = pmc_new(interp, enum_class_Task);
+ PMC *callback = Parrot_pmc_new(interp, enum_class_Task);
Parrot_Task_attributes * const task_struct = PARROT_TASK(callback);
task_struct->type = CONST_STRING(interp, "callback");
@@ -483,7 +483,8 @@
{
ASSERT_ARGS(Parrot_cx_add_handler_local)
if (PMC_IS_NULL(Parrot_pcc_get_handlers(interp, interp->ctx)))
- Parrot_pcc_set_handlers(interp, interp->ctx, pmc_new(interp, enum_class_ResizablePMCArray));
+ Parrot_pcc_set_handlers(interp, interp->ctx, Parrot_pmc_new(interp,
+ enum_class_ResizablePMCArray));
VTABLE_unshift_pmc(interp, Parrot_pcc_get_handlers(interp, interp->ctx), handler);
@@ -730,7 +731,7 @@
ASSERT_ARGS(Parrot_cx_send_message)
if (interp->scheduler) {
Parrot_Scheduler_attributes * sched_struct = PARROT_SCHEDULER(interp->scheduler);
- PMC *message = pmc_new(interp, enum_class_SchedulerMessage);
+ PMC *message = Parrot_pmc_new(interp, enum_class_SchedulerMessage);
VTABLE_set_string_native(interp, message, messagetype);
message = VTABLE_share_ro(interp, message);
Modified: branches/boehm_gc_2/src/string/api.c
==============================================================================
--- branches/boehm_gc_2/src/string/api.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/string/api.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -276,7 +276,8 @@
if (interp->parent_interpreter) {
interp->hash_seed = interp->parent_interpreter->hash_seed;
}
- else {
+ /* interp is initialized from zeroed memory, so this is fine */
+ else if (interp->hash_seed == 0) {
/* TT #64 - use an entropy source once available */
Parrot_srand(Parrot_intval_time());
interp->hash_seed = Parrot_uint_rand(0);
@@ -301,7 +302,7 @@
PObj_constant_FLAG);
interp->const_cstring_table =
- mem_allocate_n_zeroed_typed(n_parrot_cstrings, STRING *);
+ mem_gc_allocate_n_zeroed_typed(interp, n_parrot_cstrings, STRING *);
for (i = 0; i < n_parrot_cstrings; ++i) {
DECL_CONST_CAST;
@@ -334,7 +335,7 @@
ASSERT_ARGS(Parrot_str_finish)
/* all are shared between interpreters */
if (!interp->parent_interpreter) {
- mem_sys_free(interp->const_cstring_table);
+ mem_internal_free(interp->const_cstring_table);
interp->const_cstring_table = NULL;
Parrot_charsets_encodings_deinit(interp);
parrot_hash_destroy(interp, interp->const_cstring_hash);
@@ -495,21 +496,9 @@
ASSERT_ARGS(Parrot_str_concat)
if (a && a->strlen) {
if (b && b->strlen) {
- const ENCODING *enc;
- const CHARSET *cs = string_rep_compatible(interp, a, b, &enc);
- STRING *result;
-
- if (!cs) {
- cs = a->charset;
- enc = a->encoding;
- }
- result = Parrot_str_new_init(interp, NULL, a->bufused + b->bufused,
- enc, cs, 0);
-
- result = Parrot_str_append(interp, result, a);
- result = Parrot_str_append(interp, result, b);
-
- return result;
+ STRING *result = Parrot_str_copy(interp, a);
+ Parrot_str_write_COW(interp, result);
+ return Parrot_str_append(interp, result, b);
}
return Parrot_str_copy(interp, a);
@@ -572,10 +561,10 @@
}
else {
/* upgrade strings for concatenation */
- enc = (a->encoding == Parrot_utf16_encoding_ptr ||
- b->encoding == Parrot_utf16_encoding_ptr ||
- a->encoding == Parrot_ucs2_encoding_ptr ||
- b->encoding == Parrot_ucs2_encoding_ptr)
+ enc = (a->encoding == Parrot_utf16_encoding_ptr
+ || b->encoding == Parrot_utf16_encoding_ptr
+ || a->encoding == Parrot_ucs2_encoding_ptr
+ || b->encoding == Parrot_ucs2_encoding_ptr)
? Parrot_utf16_encoding_ptr
: Parrot_utf8_encoding_ptr;
@@ -2494,7 +2483,7 @@
if (!s)
return NULL;
else {
- char * const p = (char *)mem_sys_allocate(s->bufused + 1);
+ char * const p = (char*)mem_internal_allocate(s->bufused + 1);
memcpy(p, s->strstart, s->bufused);
p[s->bufused] = '\0';
return p;
@@ -2520,7 +2509,7 @@
Parrot_str_free_cstring(ARGIN_NULLOK(char *p))
{
ASSERT_ARGS(Parrot_str_free_cstring)
- mem_sys_free((void *)p);
+ mem_internal_free((void *)p);
}
@@ -2549,7 +2538,7 @@
Parrot_str_write_COW(interp, s);
size = Buffer_buflen(s);
- memory = (char *)mem_sys_allocate(size);
+ memory = (char *)mem_internal_allocate(size);
mem_sys_memcopy(memory, Buffer_bufstart(s), size);
Buffer_bufstart(s) = memory;
@@ -2605,7 +2594,7 @@
PObj_sysmem_CLEAR(s);
/* Free up the memory */
- mem_sys_free(memory);
+ mem_internal_free(memory);
}
@@ -3442,7 +3431,7 @@
if (STRING_IS_NULL(delim) || STRING_IS_NULL(str))
return PMCNULL;
- res = pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_ResizableStringArray));
+ res = Parrot_pmc_new(interp, Parrot_get_ctx_HLL_type(interp, enum_class_ResizableStringArray));
slen = Parrot_str_byte_length(interp, str);
if (!slen)
Modified: branches/boehm_gc_2/src/string/charset.c
==============================================================================
--- branches/boehm_gc_2/src/string/charset.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/string/charset.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -64,11 +64,12 @@
static void Parrot_str_internal_register_charset_names(PARROT_INTERP)
__attribute__nonnull__(1);
-static INTVAL register_charset(
+static INTVAL register_charset(PARROT_INTERP,
ARGIN(const char *charsetname),
ARGIN(CHARSET *charset))
__attribute__nonnull__(1)
- __attribute__nonnull__(2);
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3);
static void register_static_converters(PARROT_INTERP)
__attribute__nonnull__(1);
@@ -77,7 +78,8 @@
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_register_charset __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(charsetname) \
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(charsetname) \
, PARROT_ASSERT_ARG(charset))
#define ASSERT_ARGS_register_static_converters __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
@@ -98,10 +100,10 @@
PARROT_CAN_RETURN_NULL
PARROT_MALLOC
CHARSET *
-Parrot_new_charset(SHIM_INTERP)
+Parrot_new_charset(PARROT_INTERP)
{
ASSERT_ARGS(Parrot_new_charset)
- return mem_allocate_typed(CHARSET);
+ return mem_gc_allocate_zeroed_typed(interp, CHARSET);
}
/*
@@ -117,7 +119,7 @@
PARROT_EXPORT
void
-Parrot_charsets_encodings_deinit(SHIM_INTERP)
+Parrot_charsets_encodings_deinit(PARROT_INTERP)
{
ASSERT_ARGS(Parrot_charsets_encodings_deinit)
int i;
@@ -125,13 +127,13 @@
for (i = 0; i < n; ++i) {
if (all_charsets->set[i].n_converters)
- mem_sys_free(all_charsets->set[i].to_converters);
- mem_sys_free(all_charsets->set[i].charset);
+ mem_gc_free(interp, all_charsets->set[i].to_converters);
+ mem_gc_free(interp, all_charsets->set[i].charset);
}
- mem_sys_free(all_charsets->set);
- mem_sys_free(all_charsets);
+ mem_gc_free(interp, all_charsets->set);
+ mem_gc_free(interp, all_charsets);
all_charsets = NULL;
- parrot_deinit_encodings();
+ parrot_deinit_encodings(interp);
}
/*
@@ -311,8 +313,8 @@
/*
-=item C<static INTVAL register_charset(const char *charsetname, CHARSET
-*charset)>
+=item C<static INTVAL register_charset(PARROT_INTERP, const char *charsetname,
+CHARSET *charset)>
Adds a new charset C<charset> with name <charsetname> to the list of
all charsets. Returns 0 and does nothing if a charset with that name
@@ -323,7 +325,8 @@
*/
static INTVAL
-register_charset(ARGIN(const char *charsetname), ARGIN(CHARSET *charset))
+register_charset(PARROT_INTERP, ARGIN(const char *charsetname),
+ ARGIN(CHARSET *charset))
{
ASSERT_ARGS(register_charset)
int i;
@@ -339,10 +342,10 @@
* loading of charsets from inside threads
*/
if (!n)
- all_charsets->set = mem_allocate_typed(One_charset);
+ all_charsets->set = mem_gc_allocate_zeroed_typed(interp, One_charset);
else
- all_charsets->set = (One_charset *)mem_sys_realloc(all_charsets->set,
- (n + 1) * sizeof (One_charset));
+ all_charsets->set = mem_gc_realloc_n_typed_zeroed(interp,
+ all_charsets->set, n + 1, n, One_charset);
all_charsets->n_charsets++;
all_charsets->set[n].charset = charset;
@@ -429,29 +432,29 @@
PARROT_EXPORT
INTVAL
-Parrot_register_charset(SHIM_INTERP, ARGIN(const char *charsetname),
+Parrot_register_charset(PARROT_INTERP, ARGIN(const char *charsetname),
ARGIN(CHARSET *charset))
{
ASSERT_ARGS(Parrot_register_charset)
if (!all_charsets) {
- all_charsets = mem_allocate_typed(All_charsets);
+ all_charsets = mem_gc_allocate_zeroed_typed(interp, All_charsets);
all_charsets->set = NULL;
all_charsets->n_charsets = 0;
}
if (STREQ("binary", charsetname)) {
Parrot_binary_charset_ptr = charset;
- return register_charset(charsetname, charset);
+ return register_charset(interp, charsetname, charset);
}
if (STREQ("iso-8859-1", charsetname)) {
Parrot_iso_8859_1_charset_ptr = charset;
- return register_charset(charsetname, charset);
+ return register_charset(interp, charsetname, charset);
}
if (STREQ("unicode", charsetname)) {
Parrot_unicode_charset_ptr = charset;
- return register_charset(charsetname, charset);
+ return register_charset(interp, charsetname, charset);
}
if (STREQ("ascii", charsetname)) {
@@ -459,7 +462,7 @@
Parrot_default_charset_ptr = charset;
Parrot_ascii_charset_ptr = charset;
- return register_charset(charsetname, charset);
+ return register_charset(interp, charsetname, charset);
}
return 0;
@@ -594,7 +597,7 @@
PARROT_EXPORT
void
-Parrot_register_charset_converter(SHIM_INTERP,
+Parrot_register_charset_converter(PARROT_INTERP,
ARGIN(const CHARSET *lhs), ARGIN(CHARSET *rhs),
ARGIN(charset_converter_t func))
{
@@ -608,11 +611,11 @@
const int nc = left->n_converters++;
if (nc) {
- left->to_converters = (To_converter *)mem_sys_realloc(
- left->to_converters, sizeof (To_converter) * (nc + 1));
+ left->to_converters = mem_gc_realloc_n_typed_zeroed(interp,
+ left->to_converters, nc + 1, nc, To_converter);
}
else
- left->to_converters = (To_converter *)mem_sys_allocate(sizeof (To_converter));
+ left->to_converters = mem_gc_allocate_zeroed_typed(interp, To_converter);
left->to_converters[nc].to = rhs;
left->to_converters[nc].func = func;
}
Modified: branches/boehm_gc_2/src/string/encoding.c
==============================================================================
--- branches/boehm_gc_2/src/string/encoding.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/string/encoding.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -24,14 +24,16 @@
/* HEADERIZER BEGIN: static */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-static INTVAL register_encoding(SHIM_INTERP,
+static INTVAL register_encoding(PARROT_INTERP,
ARGIN(const char *encodingname),
ARGIN(ENCODING *encoding))
+ __attribute__nonnull__(1)
__attribute__nonnull__(2)
__attribute__nonnull__(3);
#define ASSERT_ARGS_register_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(encodingname) \
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(encodingname) \
, PARROT_ASSERT_ARG(encoding))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: static */
@@ -56,7 +58,7 @@
/*
-=item C<void parrot_deinit_encodings(void)>
+=item C<void parrot_deinit_encodings(PARROT_INTERP)>
Deinitialize encodings and free all memory used by them.
@@ -65,17 +67,17 @@
*/
void
-parrot_deinit_encodings(void)
+parrot_deinit_encodings(PARROT_INTERP)
{
ASSERT_ARGS(parrot_deinit_encodings)
const int n = all_encodings->n_encodings;
int i;
for (i = 0; i < n; ++i) {
- mem_sys_free(all_encodings->enc[i].encoding);
+ mem_gc_free(interp, all_encodings->enc[i].encoding);
}
- mem_sys_free(all_encodings->enc);
- mem_sys_free(all_encodings);
+ mem_gc_free(interp, all_encodings->enc);
+ mem_gc_free(interp, all_encodings);
all_encodings = NULL;
}
@@ -93,10 +95,10 @@
PARROT_MALLOC
PARROT_CANNOT_RETURN_NULL
ENCODING *
-Parrot_new_encoding(SHIM_INTERP)
+Parrot_new_encoding(PARROT_INTERP)
{
ASSERT_ARGS(Parrot_new_encoding)
- return mem_allocate_typed(ENCODING);
+ return mem_gc_allocate_typed(interp, ENCODING);
}
/*
@@ -298,7 +300,7 @@
*/
static INTVAL
-register_encoding(SHIM_INTERP, ARGIN(const char *encodingname),
+register_encoding(PARROT_INTERP, ARGIN(const char *encodingname),
ARGIN(ENCODING *encoding))
{
ASSERT_ARGS(register_encoding)
@@ -315,10 +317,10 @@
* loading of encodings from inside threads
*/
if (!n)
- all_encodings->enc = mem_allocate_typed(One_encoding);
+ all_encodings->enc = mem_gc_allocate_zeroed_typed(interp, One_encoding);
else
- all_encodings->enc = (One_encoding*)mem_sys_realloc(all_encodings->enc,
- (n + 1) * sizeof (One_encoding));
+ all_encodings->enc = mem_gc_realloc_n_typed_zeroed(interp,
+ all_encodings->enc, n + 1, n, One_encoding);
all_encodings->n_encodings++;
all_encodings->enc[n].encoding = encoding;
@@ -367,7 +369,7 @@
{
ASSERT_ARGS(Parrot_register_encoding)
if (!all_encodings) {
- all_encodings = mem_allocate_typed(All_encodings);
+ all_encodings = mem_gc_allocate_zeroed_typed(interp, All_encodings);
all_encodings->n_encodings = 0;
all_encodings->enc = NULL;
}
Modified: branches/boehm_gc_2/src/string/encoding/utf16.c
==============================================================================
--- branches/boehm_gc_2/src/string/encoding/utf16.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/string/encoding/utf16.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -298,7 +298,7 @@
#if PARROT_HAS_ICU
if (in_place) {
/* need intermediate memory */
- p = (UChar *)mem_sys_allocate(src_len * sizeof (UChar));
+ p = mem_gc_allocate_n_typed(interp, src_len, UChar);
}
else {
Parrot_gc_reallocate_string_storage(interp, dest, sizeof (UChar) * src_len);
@@ -319,7 +319,7 @@
* have to resize - required len in UChars is in dest_len
*/
if (in_place)
- p = (UChar *)mem_sys_realloc(p, dest_len * sizeof (UChar));
+ p = mem_gc_realloc_n_typed(interp, p, dest_len, UChar);
else {
result->bufused = dest_len * sizeof (UChar);
Parrot_gc_reallocate_string_storage(interp, dest,
@@ -335,7 +335,7 @@
if (in_place) {
Parrot_gc_reallocate_string_storage(interp, src, src->bufused);
memcpy(src->strstart, p, src->bufused);
- mem_sys_free(p);
+ mem_gc_free(interp, p);
}
result->charset = Parrot_unicode_charset_ptr;
result->encoding = Parrot_utf16_encoding_ptr;
Modified: branches/boehm_gc_2/src/string/encoding/utf8.c
==============================================================================
--- branches/boehm_gc_2/src/string/encoding/utf8.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/string/encoding/utf8.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -608,7 +608,7 @@
if (in_place) {
/* need intermediate memory */
- p = (unsigned char *)mem_sys_allocate(src_len);
+ p = mem_gc_allocate_n_typed(interp, src_len, unsigned char);
}
else {
Parrot_gc_reallocate_string_storage(interp, dest, src_len);
@@ -631,7 +631,7 @@
need = 16;
dest_len += need;
if (in_place)
- p = (unsigned char *)mem_sys_realloc(p, dest_len);
+ p = mem_gc_realloc_n_typed(interp, p, dest_len, unsigned char);
else {
result->bufused = dest_pos;
Parrot_gc_reallocate_string_storage(interp, dest, dest_len);
@@ -648,7 +648,7 @@
if (in_place) {
Parrot_gc_reallocate_string_storage(interp, src, src->bufused);
memcpy(src->strstart, p, src->bufused);
- mem_sys_free(p);
+ mem_gc_free(interp, p);
}
return result;
}
Modified: branches/boehm_gc_2/src/string/primitives.c
==============================================================================
--- branches/boehm_gc_2/src/string/primitives.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/string/primitives.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -357,7 +357,7 @@
/* 2 for the beginning and ending quote chars */
const size_t newlen = oldlen - 2;
- char * const copy = (char *)mem_sys_allocate(newlen);
+ char * const copy = (char *)mem_internal_allocate(newlen);
memcpy(copy, old + 1, newlen);
copy[newlen - 1] = 0;
Modified: branches/boehm_gc_2/src/sub.c
==============================================================================
--- branches/boehm_gc_2/src/sub.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/sub.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -64,7 +64,7 @@
new_ret_continuation_pmc(PARROT_INTERP, ARGIN_NULLOK(opcode_t *address))
{
ASSERT_ARGS(new_ret_continuation_pmc)
- PMC* const continuation = pmc_new(interp, enum_class_RetContinuation);
+ PMC* const continuation = Parrot_pmc_new(interp, enum_class_RetContinuation);
VTABLE_set_pointer(interp, continuation, address);
return continuation;
}
@@ -612,7 +612,7 @@
}
/* Get the Sub PMC itself. */
- key = pmc_new(interp, enum_class_String);
+ key = Parrot_pmc_new(interp, enum_class_String);
VTABLE_set_string_native(interp, key, CONST_STRING(interp, "Sub"));
sub_pmc = VTABLE_get_attr_keyed(interp, subclass, key, CONST_STRING(interp, "proxy"));
if (sub_pmc->vtable->base_type == enum_class_Sub) {
Modified: branches/boehm_gc_2/src/thread.c
==============================================================================
--- branches/boehm_gc_2/src/thread.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/thread.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -188,7 +188,7 @@
else if (VTABLE_isa(from, arg, _multi_sub)) {
INTVAL i = 0;
const INTVAL n = VTABLE_elements(from, arg);
- ret_val = pmc_new(interp, enum_class_MultiSub);
+ ret_val = Parrot_pmc_new(interp, enum_class_MultiSub);
for (i = 0; i < n; ++i) {
PMC *const orig = VTABLE_get_pmc_keyed_int(from, arg, i);
@@ -257,7 +257,7 @@
if (shared_gc_info) {
COND_DESTROY(shared_gc_info->gc_cond);
PARROT_ATOMIC_INT_DESTROY(shared_gc_info->gc_block_level);
- mem_sys_free(shared_gc_info);
+ mem_internal_free(shared_gc_info);
shared_gc_info = NULL;
}
}
@@ -288,7 +288,7 @@
old_size = VTABLE_get_integer(old_interp, args);
/* XXX should this be a different type? */
- ret_val = pmc_new(interp, enum_class_FixedPMCArray);
+ ret_val = Parrot_pmc_new(interp, enum_class_FixedPMCArray);
VTABLE_set_integer_native(interp, ret_val, old_size);
for (i = 0; i < old_size; ++i) {
@@ -620,7 +620,7 @@
PMC *sub_ns = VTABLE_get_pmc_keyed_str(d, dest_ns, key);
if (PMC_IS_NULL(sub_ns) || sub_ns->vtable->base_type !=
enum_class_NameSpace) {
- sub_ns = pmc_new(d, enum_class_NameSpace);
+ sub_ns = Parrot_pmc_new(d, enum_class_NameSpace);
VTABLE_set_pmc_keyed_str(d, dest_ns, key, sub_ns);
}
pt_ns_clone(s, d, sub_ns, s, val);
@@ -752,7 +752,7 @@
* XXX FIXME move this elsewhere? at least the set_pmc_keyed_int
*/
old_dest_interp = dest_interp;
- dest_interp = pmc_new_noinit(interpreter, enum_class_ParrotThread);
+ dest_interp = Parrot_pmc_new_noinit(interpreter, enum_class_ParrotThread);
/* so it's not accidentally deleted */
VTABLE_set_pointer(interp, old_dest_interp, NULL);
@@ -1007,8 +1007,8 @@
if (cur == queue->head)
queue->head = cur->next;
- mem_sys_free(ev);
- mem_sys_free(cur);
+ mem_internal_free(ev);
+ mem_internal_free(cur);
cur = NULL;
DEBUG_ONLY(fprintf(stderr, "%p: remove_queued_suspend_gc: got one\n", interp));
}
@@ -1364,7 +1364,7 @@
* dying interpreter, so register it in parent's GC registry
* XXX is this still needed?
*/
- gc_register_pmc(parent, parent_ret);
+ Parrot_pmc_gc_register(parent, parent_ret);
Parrot_unblock_GC_mark(parent);
retval = parent_ret;
}
@@ -1388,7 +1388,7 @@
* value, caller gets it now
*/
if (retval)
- gc_unregister_pmc(parent, retval);
+ Parrot_pmc_gc_unregister(parent, retval);
return retval;
}
@@ -1560,18 +1560,18 @@
PARROT_ASSERT(!interpreter_array);
PARROT_ASSERT(n_interpreters == 0);
- interpreter_array = mem_allocate_typed(Interp *);
+ interpreter_array = mem_internal_allocate_typed(Interp *);
interpreter_array[0] = interp;
n_interpreters = 1;
- shared_gc_info = (Shared_gc_info *)mem_sys_allocate_zeroed(sizeof (*shared_gc_info));
+ shared_gc_info = (Shared_gc_info *)mem_internal_allocate_zeroed(sizeof (*shared_gc_info));
COND_INIT(shared_gc_info->gc_cond);
PARROT_ATOMIC_INT_INIT(shared_gc_info->gc_block_level);
PARROT_ATOMIC_INT_SET(shared_gc_info->gc_block_level, 0);
/* XXX try to defer this until later */
PARROT_ASSERT(interp == interpreter_array[0]);
- interp->thread_data = mem_allocate_zeroed_typed(Thread_data);
+ interp->thread_data = mem_internal_allocate_zeroed_typed(Thread_data);
INTERPRETER_LOCK_INIT(interp);
interp->thread_data->tid = 0;
@@ -1579,7 +1579,7 @@
}
- new_interp->thread_data = mem_allocate_zeroed_typed(Thread_data);
+ new_interp->thread_data = mem_internal_allocate_zeroed_typed(Thread_data);
INTERPRETER_LOCK_INIT(new_interp);
running_threads++;
if (Interp_debug_TEST(interp, PARROT_THREAD_DEBUG_FLAG))
@@ -1596,7 +1596,7 @@
}
/* need to resize */
- interpreter_array = (Interp **)mem_sys_realloc(interpreter_array,
+ interpreter_array = (Interp **)mem_internal_realloc(interpreter_array,
(n_interpreters + 1) * sizeof (Interp *));
interpreter_array[n_interpreters] = new_interp;
Modified: branches/boehm_gc_2/src/tsq.c
==============================================================================
--- branches/boehm_gc_2/src/tsq.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/tsq.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -374,7 +374,7 @@
queue_init(UINTVAL prio)
{
ASSERT_ARGS(queue_init)
- QUEUE * const queue = mem_allocate_typed(QUEUE);
+ QUEUE * const queue = mem_internal_allocate_typed(QUEUE);
queue->head = queue->tail = NULL;
queue->max_prio = prio;
Modified: branches/boehm_gc_2/src/utils.c
==============================================================================
--- branches/boehm_gc_2/src/utils.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/utils.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -545,7 +545,7 @@
{
ASSERT_ARGS(tm_to_array)
- PMC * const Array = pmc_new(interp,
+ PMC * const Array = Parrot_pmc_new(interp,
Parrot_get_ctx_HLL_type(interp, enum_class_FixedIntegerArray));
VTABLE_set_integer_native(interp, Array, 9);
@@ -845,9 +845,9 @@
/* allocate space for data structures */
/* NOTA: data structures could be kept allocated somewhere waiting to get reused...*/
- c.nb_succ = nb_succ = mem_allocate_n_zeroed_typed(n_regs, int);
- c.backup = backup = mem_allocate_n_zeroed_typed(n_regs, int);
- c.reg_to_index = reg_to_index = mem_allocate_n_zeroed_typed(max_reg, int);
+ c.nb_succ = nb_succ = mem_gc_allocate_n_zeroed_typed(interp, n_regs, int);
+ c.backup = backup = mem_gc_allocate_n_zeroed_typed(interp, n_regs, int);
+ c.reg_to_index = reg_to_index = mem_gc_allocate_n_zeroed_typed(interp, max_reg, int);
/* init backup array */
for (i = 0; i < n_regs; i++)
@@ -883,9 +883,9 @@
}
}
- mem_sys_free(nb_succ);
- mem_sys_free(reg_to_index);
- mem_sys_free(backup);
+ mem_gc_free(interp, nb_succ);
+ mem_gc_free(interp, reg_to_index);
+ mem_gc_free(interp, backup);
}
typedef INTVAL (*sort_func_t)(PARROT_INTERP, void *, void *);
Modified: branches/boehm_gc_2/src/vtable.tbl
==============================================================================
--- branches/boehm_gc_2/src/vtable.tbl Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/vtable.tbl Mon Feb 22 12:30:02 2010 (r44294)
@@ -41,8 +41,6 @@
FLOATVAL get_number_keyed_int(INTVAL key)
FLOATVAL get_number_keyed_str(STRING* key)
-PMC* get_bignum()
-
STRING* get_string()
STRING* get_repr()
STRING* get_string_keyed(PMC* key)
@@ -72,10 +70,6 @@
void set_number_keyed_int(INTVAL key, FLOATVAL value)
void set_number_keyed_str(STRING* key, FLOATVAL value)
-void set_bignum_int(INTVAL value)
-void set_bignum_num(FLOATVAL value)
-void set_bignum_str(STRING* value)
-
void set_string_native(STRING* value)
void assign_string_native(STRING* value)
void set_string_keyed(PMC* key, STRING* value)
@@ -177,14 +171,6 @@
void i_modulus_int(INTVAL value) :write
void i_modulus_float(FLOATVAL value) :write
-PMC* pow(PMC* value, PMC* dest)
-PMC* pow_int(INTVAL value, PMC* dest)
-PMC* pow_float(FLOATVAL value, PMC* dest)
-
-void i_pow(PMC* value) :write
-void i_pow_int(INTVAL value) :write
-void i_pow_float(FLOATVAL value) :write
-
void increment() :write
void decrement() :write
@@ -194,67 +180,6 @@
PMC* neg(PMC* dest)
void i_neg() :write
-[BITWISE]
-PMC* bitwise_or(PMC* value, PMC* dest)
-PMC* bitwise_or_int(INTVAL value, PMC* dest)
-
-void i_bitwise_or(PMC* value) :write
-void i_bitwise_or_int(INTVAL value) :write
-
-PMC* bitwise_and(PMC* value, PMC* dest)
-PMC* bitwise_and_int(INTVAL value, PMC* dest)
-
-void i_bitwise_and(PMC* value) :write
-void i_bitwise_and_int(INTVAL value) :write
-
-PMC* bitwise_xor(PMC* value, PMC* dest)
-PMC* bitwise_xor_int(INTVAL value, PMC* dest)
-
-void i_bitwise_xor(PMC* value) :write
-void i_bitwise_xor_int(INTVAL value) :write
-
-PMC* bitwise_ors(PMC* value, PMC* dest)
-PMC* bitwise_ors_str(STRING* value, PMC* dest)
-
-void i_bitwise_ors(PMC* value) :write
-void i_bitwise_ors_str(STRING* value) :write
-
-PMC* bitwise_ands(PMC* value, PMC* dest)
-PMC* bitwise_ands_str(STRING* value, PMC* dest)
-
-void i_bitwise_ands(PMC* value) :write
-void i_bitwise_ands_str(STRING* value) :write
-
-PMC* bitwise_xors(PMC* value, PMC* dest)
-PMC* bitwise_xors_str(STRING* value, PMC* dest)
-
-void i_bitwise_xors(PMC* value) :write
-void i_bitwise_xors_str(STRING* value) :write
-
-PMC* bitwise_not(PMC* dest)
-void i_bitwise_not() :write
-
-PMC* bitwise_nots(PMC* dest)
-void i_bitwise_nots() :write
-
-PMC* bitwise_shl(PMC* value, PMC* dest)
-PMC* bitwise_shl_int(INTVAL value, PMC* dest)
-
-void i_bitwise_shl(PMC* value) :write
-void i_bitwise_shl_int(INTVAL value) :write
-
-PMC* bitwise_shr(PMC* value, PMC* dest)
-PMC* bitwise_shr_int(INTVAL value, PMC* dest)
-
-void i_bitwise_shr(PMC* value) :write
-void i_bitwise_shr_int(INTVAL value) :write
-
-PMC* bitwise_lsr(PMC* value, PMC* dest)
-PMC* bitwise_lsr_int(INTVAL value, PMC* dest)
-
-void i_bitwise_lsr(PMC* value) :write
-void i_bitwise_lsr_int(INTVAL value) :write
-
[CMP]
INTVAL is_equal(PMC* value)
INTVAL is_equal_num(PMC* value)
Modified: branches/boehm_gc_2/src/vtables.c
==============================================================================
--- branches/boehm_gc_2/src/vtables.c Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/src/vtables.c Mon Feb 22 12:30:02 2010 (r44294)
@@ -43,7 +43,7 @@
Parrot_new_vtable(SHIM_INTERP)
{
ASSERT_ARGS(Parrot_new_vtable)
- return mem_allocate_zeroed_typed(VTABLE);
+ return mem_internal_allocate_zeroed_typed(VTABLE);
}
/*
@@ -63,7 +63,7 @@
Parrot_clone_vtable(PARROT_INTERP, ARGIN(const VTABLE *base_vtable))
{
ASSERT_ARGS(Parrot_clone_vtable)
- VTABLE * const new_vtable = mem_allocate_typed(VTABLE);
+ VTABLE * const new_vtable = mem_internal_allocate_typed(VTABLE);
STRUCT_COPY(new_vtable, base_vtable);
@@ -108,7 +108,7 @@
ro_vtable->isa_hash = NULL;
}
- mem_sys_free(ro_vtable);
+ mem_internal_free(ro_vtable);
vtable->ro_variant_vtable = NULL;
}
@@ -117,7 +117,7 @@
vtable->isa_hash = NULL;
}
- mem_sys_free(vtable);
+ mem_internal_free(vtable);
}
/*
@@ -134,7 +134,7 @@
parrot_alloc_vtables(PARROT_INTERP)
{
ASSERT_ARGS(parrot_alloc_vtables)
- interp->vtables = mem_allocate_n_zeroed_typed(PARROT_MAX_CLASSES, VTABLE *);
+ interp->vtables = mem_internal_allocate_n_zeroed_typed(PARROT_MAX_CLASSES, VTABLE *);
interp->n_vtable_max = enum_class_core_max;
interp->n_vtable_alloced = PARROT_MAX_CLASSES - 1;
}
@@ -162,7 +162,7 @@
/* arrays start at zero, but we compare type numbers starting at 1 */
interp->n_vtable_alloced = new_max - 1;
- interp->vtables = (VTABLE **)mem_sys_realloc_zeroed(
+ interp->vtables = (VTABLE **)mem_internal_realloc_zeroed(
interp->vtables, new_size, old_size);
}
@@ -187,7 +187,7 @@
for (i = 0; i < interp->n_vtable_max; i++)
Parrot_destroy_vtable(interp, interp->vtables[i]);
- mem_sys_free(interp->vtables);
+ mem_internal_free(interp->vtables);
}
/*
Modified: branches/boehm_gc_2/t/codingstd/c_function_docs.t
==============================================================================
--- branches/boehm_gc_2/t/codingstd/c_function_docs.t Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/t/codingstd/c_function_docs.t Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 2006-2009, Parrot Foundation.
+# Copyright (C) 2006-2010, Parrot Foundation.
# $Id$
use strict;
@@ -99,35 +99,22 @@
compilers/imcc/reg_alloc.c
compilers/imcc/symreg.c
compilers/pirc/src/pircapi.c
-compilers/pirc/src/pircompiler.c
-compilers/pirc/src/piremit.c
-compilers/pirc/src/pirmacro.c
-compilers/pirc/src/pirpcc.c
-compilers/pirc/src/pirregalloc.c
-compilers/pirc/src/pirsymbol.c
config/gen/platform/ansi/dl.c
config/gen/platform/ansi/exec.c
config/gen/platform/ansi/time.c
config/gen/platform/darwin/dl.c
config/gen/platform/darwin/memalign.c
config/gen/platform/generic/dl.c
-config/gen/platform/generic/env.c
config/gen/platform/generic/exec.c
config/gen/platform/generic/math.c
config/gen/platform/generic/memalign.c
-config/gen/platform/generic/memexec.c
config/gen/platform/generic/stat.c
config/gen/platform/generic/time.c
config/gen/platform/netbsd/math.c
config/gen/platform/openbsd/math.c
-config/gen/platform/openbsd/memexec.c
config/gen/platform/solaris/math.c
config/gen/platform/solaris/time.c
-examples/c/nanoparrot.c
-examples/c/pbc_info.c
examples/compilers/japhc.c
-src/atomic/gcc_x86.c
-src/debug.c
src/gc/generational_ms.c
src/io/io_string.c
src/string/charset/ascii.c
@@ -135,7 +122,6 @@
src/string/charset/iso-8859-1.c
src/string/charset/unicode.c
src/tsq.c
-include/parrot/atomic/gcc_pcc.h
# Local Variables:
# mode: cperl
Modified: branches/boehm_gc_2/t/codingstd/c_parens.t
==============================================================================
--- branches/boehm_gc_2/t/codingstd/c_parens.t Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/t/codingstd/c_parens.t Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 2006-2009, Parrot Foundation.
+# Copyright (C) 2006-2010, Parrot Foundation.
# $Id$
use strict;
@@ -92,7 +92,7 @@
for my $line (@lines) {
# skip #defines and typedefs
next if $line =~ m{(?:(#\s*define|^\s*typedef))};
- if ( $line =~ m{ ( (?<!\w) (?:$keywords) (?: \( | \ \s+ \( ) ) }xo ) {
+ if ( $line =~ m{ ( (?<!\w) (?:$keywords) (?: \( ) ) }xo ) {
my $paren = $1;
# ops use the same names as some C keywords, so skip
Modified: branches/boehm_gc_2/t/codingstd/copyright.t
==============================================================================
--- branches/boehm_gc_2/t/codingstd/copyright.t Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/t/codingstd/copyright.t Mon Feb 22 12:30:02 2010 (r44294)
@@ -135,10 +135,6 @@
reason => 'sample code used in testing',
},
{
- file => 'tools/build/nativecall.pl',
- reason => 'heredoc text for generated file',
- },
- {
file => 'tools/build/vtable_extend.pl',
reason => 'heredoc text for generated file',
},
Modified: branches/boehm_gc_2/t/codingstd/linelength.t
==============================================================================
--- branches/boehm_gc_2/t/codingstd/linelength.t Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/t/codingstd/linelength.t Mon Feb 22 12:30:02 2010 (r44294)
@@ -125,5 +125,8 @@
compilers/pirc/macro/macroparser.h
compilers/pirc/src/hdocprep.l
compilers/pirc/src/hdocprep.c
+# generated by tools/dev/nci_thunk_gen.pir
+src/nci/core_thunks.c
+src/nci/extra_thunks.c
# these ones include long POD
docs/embed.pod
Modified: branches/boehm_gc_2/t/codingstd/trailing_space.t
==============================================================================
--- branches/boehm_gc_2/t/codingstd/trailing_space.t Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/t/codingstd/trailing_space.t Mon Feb 22 12:30:02 2010 (r44294)
@@ -9,6 +9,8 @@
use Parrot::Distribution;
use Test::More tests => 1;
use Parrot::Test::Util::Runloop;
+use Parrot::Config qw/ %PConfig /;
+use File::Spec;
=head1 NAME
@@ -42,9 +44,20 @@
$DIST->get_pir_language_files(),
);
+# skip files listed in the __DATA__ section
+my $build_dir = $PConfig{build_dir};
+my %skip_files;
+while (<DATA>) {
+ next if m{^#};
+ next if m{^\s*$};
+ chomp;
+ $_ = File::Spec->catfile($build_dir, $_);
+ $skip_files{$_}++;
+}
+
Parrot::Test::Util::Runloop->testloop(
name => 'no trailing whitespace',
- files => [@files],
+ files => [grep {not $skip_files{$_->path}} @files],
per_line => sub { $_[0] !~ m{[ \t]$}m },
diag_prefix => 'Trailing space or tab char found'
);
@@ -55,3 +68,9 @@
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4:
+
+__DATA__
+# generated by tools/dev/nci_thunk_gen.pir
+src/nci/core_thunks.c
+src/nci/extra_thunks.c
+
Deleted: branches/boehm_gc_2/t/library/mt19937ar.t
==============================================================================
--- branches/boehm_gc_2/t/library/mt19937ar.t Mon Feb 22 12:30:02 2010 (r44293)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,129 +0,0 @@
-#!parrot
-# Copyright (C) 2009, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-t/library/mt19937ar.t
-
-=head1 DESCRIPTION
-
-Math::Random::MT tests
-
-=head1 SYNOPSIS
-
- % parrot t/library/mt19937ar.t
-
-=cut
-
-.sub 'main' :main
- load_bytecode 'Math/Random/mt19937ar.pbc'
-
- .include 'test_more.pir'
-
- plan(10)
-
- test_interfaces()
- test_output()
-.end
-
-.sub 'test_interfaces'
- .local pmc mt
- mt = new [ 'Math'; 'Random'; 'MT' ]
-
- $S0 = typeof mt
- is($S0, 'Math;Random;MT', "MT typeof")
-
- $I0 = can mt, 'init_genrand'
- ok($I0, "MT can init_genrand")
-
- $I0 = can mt, 'init_by_array'
- ok($I0, "MT can init_by_array")
-
- $I0 = can mt, 'genrand_int32'
- ok($I0, "MT can genrand_int32")
-
- $I0 = can mt, 'genrand_int31'
- ok($I0, "MT can genrand_int31")
-
- $I0 = can mt, 'genrand_real1'
- ok($I0, "MT can genrand_real1")
-
- $I0 = can mt, 'genrand_real2'
- ok($I0, "MT can genrand_real2")
-
- $I0 = can mt, 'genrand_real3'
- ok($I0, "MT can genrand_real3")
-
- $I0 = can mt, 'genrand_res53'
- ok($I0, "MT can genrand_res53")
-.end
-
-.sub 'generate_output' :anon
- .param pmc fh
- .local pmc mt
- mt = new [ 'Math'; 'Random'; 'MT' ]
- .local pmc init
- new init, 'FixedIntegerArray'
- set init, 4
- set init[0], 0x123
- set init[1], 0x234
- set init[2], 0x345
- set init[3], 0x456
- mt.'init_by_array'(init)
- fh.'puts'( "1000 outputs of genrand_int32()\n" )
- .local int i
- i = 0
- new $P0, 'FixedPMCArray'
- set $P0, 1
- L1:
- unless i < 1000 goto L2
- $I0 = mt.'genrand_int32'()
- $P0[0] = $I0
- $S0 = sprintf "%10lu ", $P0
- fh.'puts'( $S0 )
- $I0 = i % 5
- unless $I0 == 4 goto L3
- fh.'puts'( "\n" )
- L3:
- inc i
- goto L1
- L2:
- fh.'puts'( "\n1000 outputs of genrand_real2()\n" )
- i = 0
- L4:
- unless i < 1000 goto L5
- $N0 = mt.'genrand_real2'()
- $P0[0] = $N0
- $S0 = sprintf "%10.8f ", $P0
- fh.'puts'( $S0 )
- $I0 = i % 5
- unless $I0 == 4 goto L6
- fh.'puts'( "\n" )
- L6:
- inc i
- goto L4
- L5:
-.end
-
-.sub 'test_output'
- .local pmc fh
- fh = new 'FileHandle'
- .local string ref
- ref = fh.'readall'('t/library/mt19937ar.txt')
- $P0 = split "\r\n", ref # hack for Windows
- ref = join "\n", $P0
- fh = new 'StringHandle'
- fh.'open'('output', 'w')
- generate_output(fh)
- $S0 = fh.'readall'()
- fh.'close'()
- is($S0, ref, "mt19937ar output")
-.end
-
-
-# Local Variables:
-# mode: pir
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4 ft=pir:
Deleted: branches/boehm_gc_2/t/library/mt19937ar.txt
==============================================================================
--- branches/boehm_gc_2/t/library/mt19937ar.txt Mon Feb 22 12:30:02 2010 (r44293)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,403 +0,0 @@
-1000 outputs of genrand_int32()
-1067595299 955945823 477289528 4107218783 4228976476
-3344332714 3355579695 227628506 810200273 2591290167
-2560260675 3242736208 646746669 1479517882 4245472273
-1143372638 3863670494 3221021970 1773610557 1138697238
-1421897700 1269916527 2859934041 1764463362 3874892047
-3965319921 72549643 2383988930 2600218693 3237492380
-2792901476 725331109 605841842 271258942 715137098
-3297999536 1322965544 4229579109 1395091102 3735697720
-2101727825 3730287744 2950434330 1661921839 2895579582
-2370511479 1004092106 2247096681 2111242379 3237345263
-4082424759 219785033 2454039889 3709582971 835606218
-2411949883 2735205030 756421180 2175209704 1873865952
-2762534237 4161807854 3351099340 181129879 3269891896
- 776029799 2218161979 3001745796 1866825872 2133627728
- 34862734 1191934573 3102311354 2916517763 1012402762
-2184831317 4257399449 2899497138 3818095062 3030756734
-1282161629 420003642 2326421477 2741455717 1278020671
-3744179621 271777016 2626330018 2560563991 3055977700
-4233527566 1228397661 3595579322 1077915006 2395931898
-1851927286 3013683506 1999971931 3006888962 1049781534
-1488758959 3491776230 104418065 2448267297 3075614115
-3872332600 891912190 3936547759 2269180963 2633455084
-1047636807 2604612377 2709305729 1952216715 207593580
-2849898034 670771757 2210471108 467711165 263046873
-3569667915 1042291111 3863517079 1464270005 2758321352
-3790799816 2301278724 3106281430 7974801 2792461636
- 555991332 621766759 1322453093 853629228 686962251
-1455120532 957753161 1802033300 1021534190 3486047311
-1902128914 3701138056 4176424663 1795608698 560858864
-3737752754 3141170998 1553553385 3367807274 711546358
-2475125503 262969859 251416325 2980076994 1806565895
- 969527843 3529327173 2736343040 2987196734 1649016367
-2206175811 3048174801 3662503553 3138851612 2660143804
-1663017612 1816683231 411916003 3887461314 2347044079
-1015311755 1203592432 2170947766 2569420716 813872093
-1105387678 1431142475 220570551 4243632715 4179591855
-2607469131 3090613241 282341803 1734241730 1391822177
-1001254810 827927915 1886687171 3935097347 2631788714
-3905163266 110554195 2447955646 3717202975 3304793075
-3739614479 3059127468 953919171 2590123714 1132511021
-3795593679 2788030429 982155079 3472349556 859942552
-2681007391 2299624053 647443547 233600422 608168955
-3689327453 1849778220 1608438222 3968158357 2692977776
-2851872572 246750393 3582818628 3329652309 4036366910
-1012970930 950780808 3959768744 2538550045 191422718
-2658142375 3276369011 2927737484 1234200027 1920815603
-3536074689 1535612501 2184142071 3276955054 428488088
-2378411984 4059769550 3913744741 2732139246 64369859
-3755670074 842839565 2819894466 2414718973 1010060670
-1839715346 2410311136 152774329 3485009480 4102101512
-2852724304 879944024 1785007662 2748284463 1354768064
-3267784736 2269127717 3001240761 3179796763 895723219
- 865924942 4291570937 89355264 1471026971 4114180745
-3201939751 2867476999 2460866060 3603874571 2238880432
-3308416168 2072246611 2755653839 3773737248 1709066580
-4282731467 2746170170 2832568330 433439009 3175778732
- 26248366 2551382801 183214346 3893339516 1928168445
-1337157619 3429096554 3275170900 1782047316 4264403756
-1876594403 4289659572 3223834894 1728705513 4068244734
-2867840287 1147798696 302879820 1730407747 1923824407
-1180597908 1569786639 198796327 560793173 2107345620
-2705990316 3448772106 3678374155 758635715 884524671
- 486356516 1774865603 3881226226 2635213607 1181121587
-1508809820 3178988241 1594193633 1235154121 326117244
-2304031425 937054774 2687415945 3192389340 2003740439
-1823766188 2759543402 10067710 1533252662 4132494984
- 82378136 420615890 3467563163 541562091 3535949864
-2277319197 3330822853 3215654174 4113831979 4204996991
-2162248333 3255093522 2219088909 2978279037 255818579
-2859348628 3097280311 2569721123 1861951120 2907080079
-2719467166 998319094 2521935127 2404125338 259456032
-2086860995 1839848496 1893547357 2527997525 1489393124
-2860855349 76448234 2264934035 744914583 2586791259
-1385380501 66529922 1819103258 1899300332 2098173828
-1793831094 276463159 360132945 4178212058 595015228
- 177071838 2800080290 1573557746 1548998935 378454223
-1460534296 1116274283 3112385063 3709761796 827999348
-3580042847 1913901014 614021289 4278528023 1905177404
- 45407939 3298183234 1184848810 3644926330 3923635459
-1627046213 3677876759 969772772 1160524753 1522441192
- 452369933 1527502551 832490847 1003299676 1071381111
-2891255476 973747308 4086897108 1847554542 3895651598
-2227820339 1621250941 2881344691 3583565821 3510404498
- 849362119 862871471 797858058 2867774932 2821282612
-3272403146 3997979905 209178708 1805135652 6783381
-2823361423 792580494 4263749770 776439581 3798193823
-2853444094 2729507474 1071873341 1329010206 1289336450
-3327680758 2011491779 80157208 922428856 1158943220
-1667230961 2461022820 2608845159 387516115 3345351910
-1495629111 4098154157 3156649613 3525698599 4134908037
- 446713264 2137537399 3617403512 813966752 1157943946
-3734692965 1680301658 3180398473 3509854711 2228114612
-1008102291 486805123 863791847 3189125290 1050308116
-3777341526 4291726501 844061465 1347461791 2826481581
- 745465012 2055805750 4260209475 2386693097 2980646741
- 447229436 2077782664 1232942813 4023002732 1399011509
-3140569849 2579909222 3794857471 900758066 2887199683
-1720257997 3367494931 2668921229 955539029 3818726432
-1105704962 3889207255 2277369307 2746484505 1761846513
-2413916784 2685127085 4240257943 1166726899 4215215715
-3082092067 3960461946 1663304043 2087473241 4162589986
-2507310778 1579665506 767234210 970676017 492207530
-1441679602 1314785090 3262202570 3417091742 1561989210
-3011406780 1146609202 3262321040 1374872171 1634688712
-1280458888 2230023982 419323804 3262899800 39783310
-1641619040 1700368658 2207946628 2571300939 2424079766
- 780290914 2715195096 3390957695 163151474 2309534542
-1860018424 555755123 280320104 1604831083 2713022383
-1728987441 3639955502 623065489 3828630947 4275479050
-3516347383 2343951195 2430677756 635534992 3868699749
- 808442435 3070644069 4282166003 2093181383 2023555632
-1568662086 3422372620 4134522350 3016979543 3259320234
-2888030729 3185253876 4258779643 1267304371 1022517473
- 815943045 929020012 2995251018 3371283296 3608029049
-2018485115 122123397 2810669150 1411365618 1238391329
-1186786476 3155969091 2242941310 1765554882 279121160
-4279838515 1641578514 3796324015 13351065 103516986
-1609694427 551411743 2493771609 1316337047 3932650856
-4189700203 463397996 2937735066 1855616529 2626847990
- 55091862 3823351211 753448970 4045045500 1274127772
-1124182256 92039808 2126345552 425973257 386287896
-2589870191 1987762798 4084826973 2172456685 3366583455
-3602966653 2378803535 2901764433 3716929006 3710159000
-2653449155 3469742630 3096444476 3932564653 2595257433
- 318974657 3146202484 853571438 144400272 3768408841
- 782634401 2161109003 570039522 1886241521 14249488
-2230804228 1604941699 3928713335 3921942509 2155806892
- 134366254 430507376 1924011722 276713377 196481886
-3614810992 1610021185 1785757066 851346168 3761148643
-2918835642 3364422385 3012284466 3735958851 2643153892
-3778608231 1164289832 205853021 2876112231 3503398282
-3078397001 3472037921 1748894853 2740861475 316056182
-1660426908 168885906 956005527 3984354789 566521563
-1001109523 1216710575 2952284757 3834433081 3842608301
-2467352408 3974441264 3256601745 1409353924 1329904859
-2307560293 3125217879 3622920184 3832785684 3882365951
-2308537115 2659155028 1450441945 3532257603 3186324194
-1225603425 1124246549 175808705 3009142319 2796710159
-3651990107 160762750 1902254979 1698648476 1134980669
- 497144426 3302689335 4057485630 3603530763 4087252587
- 427812652 286876201 823134128 1627554964 3745564327
-2589226092 4202024494 62878473 3275585894 3987124064
-2791777159 1916869511 2585861905 1375038919 1403421920
- 60249114 3811870450 3021498009 2612993202 528933105
-2757361321 3341402964 2621861700 273128190 4015252178
-3094781002 1621621288 2337611177 1796718448 1258965619
-4241913140 2138560392 3022190223 4174180924 450094611
-3274724580 617150026 2704660665 1469700689 1341616587
- 356715071 1188789960 2278869135 1766569160 2795896635
- 57824704 2893496380 1235723989 1630694347 3927960522
- 428891364 1814070806 2287999787 4125941184 3968103889
-3548724050 1025597707 1404281500 2002212197 92429143
-2313943944 2403086080 3006180634 3561981764 1671860914
-1768520622 1803542985 844848113 3006139921 1410888995
-1157749833 2125704913 1789979528 1799263423 741157179
-2405862309 767040434 2655241390 3663420179 2172009096
-2511931187 1680542666 231857466 1154981000 157168255
-1454112128 3505872099 1929775046 2309422350 2143329496
-2960716902 407610648 2938108129 2581749599 538837155
-2342628867 430543915 740188568 1937713272 3315215132
-2085587024 4030765687 766054429 3517641839 689721775
-1294158986 1753287754 4202601348 1974852792 33459103
-3568087535 3144677435 1686130825 4134943013 3005738435
-3599293386 426570142 754104406 3660892564 1964545167
- 829466833 821587464 1746693036 1006492428 1595312919
-1256599985 1024482560 1897312280 2902903201 691790057
-1037515867 3176831208 1968401055 2173506824 1089055278
-1748401123 2941380082 968412354 1818753861 2973200866
-3875951774 1119354008 3988604139 1647155589 2232450826
-3486058011 3655784043 3759258462 847163678 1082052057
- 989516446 2871541755 3196311070 3929963078 658187585
-3664944641 2175149170 2203709147 2756014689 2456473919
-3890267390 1293787864 2830347984 3059280931 4158802520
-1561677400 2586570938 783570352 1355506163 31495586
-3789437343 3340549429 2092501630 896419368 671715824
-3530450081 3603554138 1055991716 3442308219 1499434728
-3130288473 3639507000 17769680 2259741420 487032199
-4227143402 3693771256 1880482820 3924810796 381462353
-4017855991 2452034943 2736680833 2209866385 2128986379
- 437874044 595759426 641721026 1636065708 3899136933
- 629879088 3591174506 351984326 2638783544 2348444281
-2341604660 2123933692 143443325 1525942256 364660499
- 599149312 939093251 1523003209 106601097 376589484
-1346282236 1297387043 764598052 3741218111 933457002
-1886424424 3219631016 525405256 3014235619 323149677
-2038881721 4100129043 2851715101 2984028078 1888574695
-2014194741 3515193880 4180573530 3461824363 2641995497
-3179230245 2902294983 2217320456 4040852155 1784656905
-3311906931 87498458 2752971818 2635474297 2831215366
-3682231106 2920043893 3772929704 2816374944 309949752
-2383758854 154870719 385111597 1191604312 1840700563
- 872191186 2925548701 1310412747 2102066999 1504727249
-3574298750 1191230036 3330575266 3180292097 3539347721
- 681369118 3305125752 3648233597 950049240 4173257693
-1760124957 512151405 681175196 580563018 1169662867
-4015033554 2687781101 699691603 2673494188 1137221356
- 123599888 472658308 1053598179 1012713758 3481064843
-3759461013 3981457956 3830587662 1877191791 3650996736
- 988064871 3515461600 4089077232 2225147448 1249609188
-2643151863 3896204135 2416995901 1397735321 3460025646
-
-1000 outputs of genrand_real2()
-0.76275443 0.99000644 0.98670464 0.10143112 0.27933125
-0.69867227 0.94218740 0.03427201 0.78842173 0.28180608
-0.92179002 0.20785655 0.54534773 0.69644020 0.38107718
-0.23978165 0.65286910 0.07514568 0.22765211 0.94872929
-0.74557914 0.62664415 0.54708246 0.90959343 0.42043116
-0.86334511 0.19189126 0.14718544 0.70259889 0.63426346
-0.77408121 0.04531601 0.04605807 0.88595519 0.69398270
-0.05377184 0.61711170 0.05565708 0.10133577 0.41500776
-0.91810699 0.22320679 0.23353705 0.92871862 0.98897234
-0.19786706 0.80558809 0.06961067 0.55840445 0.90479405
-0.63288060 0.95009721 0.54948447 0.20645042 0.45000959
-0.87050869 0.70806991 0.19406895 0.79286390 0.49332866
-0.78483914 0.75145146 0.12341941 0.42030252 0.16728160
-0.59906494 0.37575460 0.97815160 0.39815952 0.43595080
-0.04952478 0.33917805 0.76509902 0.61034321 0.90654701
-0.92915732 0.85365931 0.18812377 0.65913428 0.28814566
-0.59476081 0.27835931 0.60722542 0.68310435 0.69387186
-0.03699800 0.65897714 0.17527003 0.02889304 0.86777366
-0.12352068 0.91439461 0.32022990 0.44445731 0.34903686
-0.74639273 0.65918367 0.92492794 0.31872642 0.77749724
-0.85413832 0.76385624 0.32744211 0.91326300 0.27458185
-0.22190155 0.19865383 0.31227402 0.85321225 0.84243342
-0.78544200 0.71854080 0.92503892 0.82703064 0.88306297
-0.47284073 0.70059042 0.48003761 0.38671694 0.60465770
-0.41747204 0.47163243 0.72750808 0.65830223 0.10955369
-0.64215401 0.23456345 0.95944940 0.72822249 0.40888451
-0.69980355 0.26677428 0.57333635 0.39791582 0.85377858
-0.76962816 0.72004885 0.90903087 0.51376506 0.37732665
-0.12691640 0.71249738 0.81217908 0.37037313 0.32772374
-0.14238259 0.05614811 0.74363008 0.39773267 0.94859135
-0.31452454 0.11730313 0.62962618 0.33334237 0.45547255
-0.10089665 0.56550662 0.60539371 0.16027624 0.13245301
-0.60959939 0.04671662 0.99356286 0.57660859 0.40269560
-0.45274629 0.06699735 0.85064246 0.87742744 0.54508392
-0.87242982 0.29321385 0.67660627 0.68230715 0.79052073
-0.48592054 0.25186266 0.93769755 0.28565487 0.47219067
-0.99054882 0.13155240 0.47110470 0.98556600 0.84397623
-0.12875246 0.90953202 0.49129015 0.23792727 0.79481194
-0.44337770 0.96564297 0.67749118 0.55684872 0.27286897
-0.79538393 0.61965356 0.22487929 0.02226018 0.49248200
-0.42247006 0.91797788 0.99250134 0.23449967 0.52531508
-0.10246337 0.78685622 0.34310922 0.89892996 0.40454552
-0.68608407 0.30752487 0.83601319 0.54956031 0.63777550
-0.82199797 0.24890696 0.48801123 0.48661910 0.51223987
-0.32969635 0.31075073 0.21393155 0.73453207 0.15565705
-0.58584522 0.28976728 0.97621478 0.61498701 0.23891470
-0.28518540 0.46809591 0.18371914 0.37597910 0.13492176
-0.66849449 0.82811466 0.56240330 0.37548956 0.27562998
-0.27521910 0.74096121 0.77176757 0.13748143 0.99747138
-0.92504502 0.09175241 0.21389176 0.21766512 0.31183245
-0.23271221 0.21207367 0.57903312 0.77523344 0.13242613
-0.31037988 0.01204835 0.71652949 0.84487594 0.14982178
-0.57423142 0.45677888 0.48420169 0.53465428 0.52667473
-0.46880526 0.49849733 0.05670710 0.79022476 0.03872047
-0.21697212 0.20443086 0.28949326 0.81678186 0.87629474
-0.92297064 0.27373097 0.84625273 0.51505586 0.00582792
-0.33295971 0.91848412 0.92537226 0.91760033 0.07541125
-0.71745848 0.61158698 0.00941650 0.03135554 0.71527471
-0.24821915 0.63636652 0.86159918 0.26450229 0.60160194
-0.35557725 0.24477500 0.07186456 0.51757096 0.62120362
-0.97981062 0.69954667 0.21065616 0.13382753 0.27693186
-0.59644095 0.71500764 0.04110751 0.95730081 0.91600724
-0.47704678 0.26183479 0.34706971 0.07545431 0.29398385
-0.93236070 0.60486023 0.48015011 0.08870451 0.45548581
-0.91872718 0.38142712 0.10668643 0.01397541 0.04520355
-0.93822273 0.18011940 0.57577277 0.91427606 0.30911399
-0.95853475 0.23611214 0.69619891 0.69601980 0.76765372
-0.58515930 0.49479057 0.11288752 0.97187699 0.32095365
-0.57563608 0.40760618 0.78703383 0.43261152 0.90877651
-0.84686346 0.10599030 0.72872803 0.19315490 0.66152912
-0.10210518 0.06257876 0.47950688 0.47062066 0.72701157
-0.48915116 0.66110261 0.60170685 0.24516994 0.12726050
-0.03451185 0.90864994 0.83494878 0.94800035 0.91035206
-0.14480751 0.88458997 0.53498312 0.15963215 0.55378627
-0.35171349 0.28719791 0.09097957 0.00667896 0.32309622
-0.87561479 0.42534520 0.91748977 0.73908457 0.41793223
-0.99279792 0.87908370 0.28458072 0.59132853 0.98672190
-0.28547393 0.09452165 0.89910674 0.53681109 0.37931425
-0.62683489 0.56609740 0.24801549 0.52948179 0.98328855
-0.66403523 0.55523786 0.75886666 0.84784685 0.86829981
-0.71448906 0.84670080 0.43922919 0.20771016 0.64157936
-0.25664246 0.73055695 0.86395782 0.65852932 0.99061803
-0.40280575 0.39146298 0.07291005 0.97200603 0.20555729
-0.59616495 0.08138254 0.45796388 0.33681125 0.33989127
-0.18717090 0.53545811 0.60550838 0.86520709 0.34290701
-0.72743276 0.73023855 0.34195926 0.65019733 0.02765254
-0.72575740 0.32709576 0.03420866 0.26061893 0.56997511
-0.28439072 0.84422744 0.77637570 0.55982168 0.06720327
-0.58449067 0.71657369 0.15819609 0.58042821 0.07947911
-0.40193792 0.11376012 0.88762938 0.67532159 0.71223735
-0.27829114 0.04806073 0.21144026 0.58830274 0.04140071
-0.43215628 0.12952729 0.94668759 0.87391019 0.98382450
-0.27750768 0.90849647 0.90962737 0.59269720 0.96102026
-0.49544979 0.32007095 0.62585546 0.03119821 0.85953001
-0.22017528 0.05834068 0.80731217 0.53799961 0.74166948
-0.77426600 0.43938444 0.54862081 0.58575513 0.15886492
-0.73214332 0.11649057 0.77463977 0.85788827 0.17061997
-0.66838056 0.96076133 0.07949296 0.68521946 0.89986254
-0.05667410 0.12741385 0.83470977 0.63969104 0.46612929
-0.10200126 0.01194925 0.10476340 0.90285217 0.31221221
-0.32980614 0.46041971 0.52024973 0.05425470 0.28330912
-0.60426543 0.00598243 0.97244013 0.21135841 0.78561597
-0.78428734 0.63422849 0.32909934 0.44771136 0.27380750
-0.14966697 0.18156268 0.65686758 0.28726350 0.97074787
-0.63676171 0.96649494 0.24526295 0.08297372 0.54257548
-0.03166785 0.33735355 0.15946671 0.02102971 0.46228045
-0.11892296 0.33408336 0.29875681 0.29847692 0.73767569
-0.02080745 0.62980060 0.08082293 0.22993106 0.25031439
-0.87787525 0.45150053 0.13673441 0.63407612 0.97907688
-0.52241942 0.50580158 0.06273902 0.05270283 0.77031811
-0.05113352 0.24393329 0.75036441 0.37436336 0.22877652
-0.59975358 0.85707591 0.88691457 0.85547165 0.36641027
-0.58720133 0.45462835 0.09243817 0.32981586 0.07820411
-0.25421519 0.36004706 0.60092307 0.46192412 0.36758683
-0.98424170 0.08019934 0.68594024 0.45826386 0.29962317
-0.79365413 0.89231296 0.49478547 0.87645944 0.23590734
-0.28106737 0.75026285 0.08136314 0.79582424 0.76010628
-0.82792971 0.27947652 0.72482861 0.82191216 0.46171689
-0.79189752 0.96043686 0.51609668 0.88995725 0.28998963
-0.55191845 0.03934737 0.83033700 0.49553013 0.98009549
-0.19017594 0.98347750 0.33452066 0.87144372 0.72106301
-0.71272114 0.71465963 0.88361677 0.85571283 0.73782329
-0.20920458 0.34855153 0.46766817 0.02780062 0.74898344
-0.03680650 0.44866557 0.77426312 0.91025891 0.25195236
-0.87319953 0.63265037 0.25552148 0.27422476 0.95217406
-0.39281839 0.66441573 0.09158900 0.94515992 0.07800798
-0.02507888 0.39901462 0.17382573 0.12141278 0.85502334
-0.19902911 0.02160210 0.44460522 0.14688742 0.68020336
-0.71323733 0.60922473 0.95400380 0.99611159 0.90897777
-0.41073520 0.66206647 0.32064685 0.62805003 0.50677209
-0.52690101 0.87473387 0.73918362 0.39826974 0.43683919
-0.80459118 0.32422684 0.01958019 0.95319576 0.98326137
-0.83931735 0.69060863 0.33671416 0.68062550 0.65152380
-0.33392969 0.03451730 0.95227244 0.68200635 0.85074171
-0.64721009 0.51234433 0.73402047 0.00969637 0.93835057
-0.80803854 0.31485260 0.20089527 0.01323282 0.59933780
-0.31584602 0.20209563 0.33754800 0.68604181 0.24443049
-0.19952227 0.78162632 0.10336988 0.11360736 0.23536740
-0.23262256 0.67803776 0.48749791 0.74658435 0.92156640
-0.56706407 0.36683221 0.99157136 0.23421374 0.45183767
-0.91609720 0.85573315 0.37706276 0.77042618 0.30891908
-0.40709595 0.06944866 0.61342849 0.88817388 0.58734506
-0.98711323 0.14744128 0.63242656 0.87704136 0.68347125
-0.84446569 0.43265239 0.25146321 0.04130111 0.34259839
-0.92697368 0.40878778 0.56990338 0.76204273 0.19820348
-0.66314909 0.02482844 0.06669207 0.50205581 0.26084093
-0.65139159 0.41650223 0.09733904 0.56344203 0.62651696
-0.67332139 0.58037374 0.47258086 0.21010758 0.05713135
-0.89390629 0.10781246 0.32037450 0.07628388 0.34227964
-0.42190597 0.58201860 0.77363549 0.49595133 0.86031236
-0.83906769 0.81098161 0.26694195 0.14215941 0.88210306
-0.53634237 0.12090720 0.82480459 0.75930318 0.31847147
-0.92768077 0.01037616 0.56201727 0.88107122 0.35925856
-0.85860762 0.61109408 0.70408301 0.58434977 0.92192494
-0.62667915 0.75988365 0.06858761 0.36156496 0.58057195
-0.13636150 0.57719713 0.59340255 0.63530602 0.22976282
-0.71915530 0.41162531 0.63979565 0.09931342 0.79344045
-0.10893790 0.84450224 0.23122236 0.99485593 0.73637397
-0.17276368 0.13357764 0.74965804 0.64991737 0.61990341
-0.41523170 0.05878239 0.05687301 0.05497131 0.42868366
-0.42571090 0.25810502 0.89642955 0.30439758 0.39310223
-0.11357431 0.04288255 0.23397550 0.11200634 0.85621396
-0.89733974 0.37508865 0.42077265 0.68597384 0.72781399
-0.19296476 0.61699087 0.31667128 0.67756410 0.00177323
-0.05725176 0.79474693 0.18885238 0.06724856 0.68193156
-0.42202167 0.22082041 0.28554673 0.64995708 0.87851940
-0.29124547 0.61009521 0.87374537 0.05743712 0.69902994
-0.81925115 0.45653873 0.37236821 0.31118709 0.52734307
-0.39672836 0.38185294 0.30163915 0.17374510 0.04913278
-0.90404879 0.25742801 0.58266467 0.97663209 0.79823377
-0.36437958 0.15206043 0.26529938 0.22690047 0.05839021
-0.84721160 0.18622435 0.37809403 0.55706977 0.49828704
-0.47659049 0.24289680 0.88477595 0.07807463 0.56245739
-0.73490635 0.21099431 0.13164942 0.75840044 0.66877037
-0.28988183 0.44046090 0.24967434 0.80048356 0.26029740
-0.30416821 0.64151867 0.52067892 0.12880774 0.85465381
-0.02690525 0.19149288 0.49630295 0.79682619 0.43566145
-0.00288078 0.81484193 0.03763639 0.68529083 0.01339574
-0.38405386 0.30537067 0.22994703 0.44000045 0.27217985
-0.53831243 0.02870435 0.86282045 0.61831306 0.09164956
-0.25609707 0.07445781 0.72185784 0.90058883 0.30070608
-0.94476583 0.56822213 0.21933909 0.96772793 0.80063440
-0.26307906 0.31183306 0.16501252 0.55436179 0.68562285
-0.23829083 0.86511559 0.57868991 0.81888344 0.20126869
-0.93172350 0.66028129 0.21786948 0.78515828 0.10262106
-0.35390326 0.79303876 0.63427924 0.90479631 0.31024934
-0.60635447 0.56198079 0.63573813 0.91854197 0.99701497
-0.83085849 0.31692291 0.01925964 0.97446405 0.98751283
-0.60944293 0.13751018 0.69519957 0.68956636 0.56969015
-0.46440193 0.88341765 0.36754434 0.89223647 0.39786427
-0.85055280 0.12749961 0.79452122 0.89449784 0.14567830
-0.45716830 0.74822309 0.28200437 0.42546044 0.17464886
-0.68308746 0.65496587 0.52935411 0.12736159 0.61523955
-0.81590528 0.63107864 0.39786553 0.20102294 0.53292914
-0.75485590 0.59847044 0.32861691 0.12125866 0.58917183
-0.07638293 0.86845380 0.29192617 0.03989733 0.52180460
-0.32503407 0.64071852 0.69516575 0.74254998 0.54587026
-0.48713246 0.32920155 0.08719954 0.63497059 0.54328459
-0.64178757 0.45583809 0.70694291 0.85212760 0.86074305
-0.33163422 0.85739792 0.59908488 0.74566046 0.72157152
Modified: branches/boehm_gc_2/t/library/test_more.t
==============================================================================
--- branches/boehm_gc_2/t/library/test_more.t Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/t/library/test_more.t Mon Feb 22 12:30:02 2010 (r44294)
@@ -15,14 +15,14 @@
.local pmc exports, curr_namespace, test_namespace
curr_namespace = get_namespace
test_namespace = get_namespace [ 'Test'; 'More' ]
- exports = split " ", "ok nok is diag like skip todo is_deeply isa_ok isnt throws_like lives_ok dies_ok"
+ exports = split " ", "ok nok is diag like skip todo is_deeply is_null isa_ok isnt throws_like lives_ok dies_ok"
test_namespace.'export_to'(curr_namespace, exports)
test_namespace = get_namespace [ 'Test'; 'Builder'; 'Tester' ]
exports = split " ", "plan test_out test_diag test_fail test_pass test_test"
test_namespace.'export_to'(curr_namespace, exports)
- plan( 108 )
+ plan( 117 )
test_skip()
test_todo()
@@ -32,6 +32,7 @@
test_isnt()
test_like()
test_is_deeply()
+ test_is_null()
test_diagnostics()
test_lives_ok()
test_dies_ok()
@@ -369,7 +370,62 @@
test_diag( 'Have: 1' )
test_diag( expected )
is( left, right, 'comparing two pmcs' )
- test_test( 'failing test is() for pmcs with description')
+ test_test( 'failing test is() for pmcs with description' )
+
+ test_pass( 'comparing two nulls' )
+ null left
+ null right
+ is( left, right, 'comparing two nulls' )
+ test_test( 'passing test is() for nulls')
+
+ test_fail('comparing null with Int')
+ null left
+ right = box 1
+ is( left, right, 'comparing null with Int')
+ test_diag( 'Have: null' )
+ test_diag( 'Want: 1' )
+ test_test('failing test is() for null vs. pmc 1')
+
+ test_fail('comparing Int with null')
+ left = box 10
+ null right
+ is( left, right, 'comparing Int with null')
+ test_diag( 'Have: 10' )
+ test_diag( 'Want: null' )
+ test_test('failing test is() for pmc 10 vs. null')
+
+ test_fail('comparing null with Float')
+ null left
+ right = box 1.01
+ is( left, right, 'comparing null with Float')
+ test_diag( 'Have: null' )
+ test_diag( 'Want: 1.01' )
+ test_test('failing test is() for null vs. pmc 1.01')
+
+ test_fail('comparing Float with null')
+ left = box 2.787
+ null right
+ is( left, right, 'comparing Float with null')
+ test_diag( 'Have: 2.787' )
+ test_diag( 'Want: null' )
+ test_test('failing test is() for pmc 2.787 vs. null')
+
+ test_fail('comparing null with String')
+ null left
+ right = box 'September, when it comes'
+ is( left, right, 'comparing null with String')
+ test_diag( 'Have: null' )
+ test_diag( 'Want: September, when it comes' )
+ test_test('failing test is() for null vs. String pmc')
+
+ test_fail('comparing String with null')
+ left = box 'I cannot move a mountain now'
+ null right
+ is( left, right, 'comparing String with null')
+ test_diag( 'Have: I cannot move a mountain now' )
+ test_diag( 'Want: null' )
+ test_test('failing test is() for String pmc vs. null')
+
.end
.sub test_isnt
@@ -803,6 +859,20 @@
test_test( 'failing test isnt() for PMC/string')
.end
+
+.sub test_is_null
+ test_pass( 'null is_null')
+ null $P0
+ is_null($P0, 'null is_null')
+ test_test( 'passing is_null with null')
+
+ test_fail( 'String is not null' )
+ $P0 = box 'Concerto'
+ is_null($P0, 'String is not null')
+ test_diag( "Have: Concerto" )
+ test_diag( "Want: null" )
+ test_test( 'failing test is_null for String pmc')
+.end
# Local Variables:
# mode: pir
# fill-column: 100
Modified: branches/boehm_gc_2/t/native_pbc/annotations.pbc
==============================================================================
Binary file (source and/or target). No diff available.
Modified: branches/boehm_gc_2/t/native_pbc/integer_1.pbc
==============================================================================
Binary file (source and/or target). No diff available.
Modified: branches/boehm_gc_2/t/native_pbc/number_1.pbc
==============================================================================
Binary file (source and/or target). No diff available.
Modified: branches/boehm_gc_2/t/native_pbc/string_1.pbc
==============================================================================
Binary file (source and/or target). No diff available.
Modified: branches/boehm_gc_2/t/op/arithmetics.t
==============================================================================
--- branches/boehm_gc_2/t/op/arithmetics.t Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/t/op/arithmetics.t Mon Feb 22 12:30:02 2010 (r44294)
@@ -20,7 +20,7 @@
.sub main :main
.include 'test_more.pir'
- plan(129)
+ plan(130)
take_the_negative_of_a_native_integer()
take_the_absolute_of_a_native_integer()
@@ -44,6 +44,7 @@
lcm_test()
gcd_test()
integer_overflow_with_pow()
+ bnot_p_p_creates_destination()
# END_OF_TESTS
.end
@@ -558,6 +559,12 @@
end:
.end
+.sub 'bnot_p_p_creates_destination'
+ $P0 = box 3
+ $P1 = bnot $P0
+ is( $P1, -4, 'bnot_p_p_creates_destination')
+.end
+
# Local Variables:
# mode: pir
# cperl-indent-level: 4
Modified: branches/boehm_gc_2/t/op/arithmetics_pmc.t
==============================================================================
--- branches/boehm_gc_2/t/op/arithmetics_pmc.t Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/t/op/arithmetics_pmc.t Mon Feb 22 12:30:02 2010 (r44294)
@@ -20,7 +20,7 @@
.include 'test_more.pir'
.include "iglobals.pasm"
- plan(68)
+ plan(44)
# Don't check BigInt or BigNum without gmp
.local pmc interp # a handle to our interpreter object.
@@ -34,8 +34,8 @@
run_tests_for('Float')
if gmp goto do_big_ones
- skip( 34, "will not test BigInt or BigNum without gmp" )
- goto end
+ skip( 22, "will not test BigInt or BigNum without gmp" )
+ goto end
do_big_ones:
run_tests_for('BigInt')
@@ -54,15 +54,9 @@
test_concatenate(type)
test_logical_xor(type)
test_logical_or(type)
- test_bitwise_shr(type)
- test_bitwise_or(type)
- test_bitwise_shl(type)
- test_bitwise_xor(type)
test_modulus(type)
test_pow(type)
test_subtract(type)
- test_bitwise_lsr(type)
- test_bitwise_and(type)
.end
.sub test_add
@@ -86,7 +80,7 @@
add $P2, $P0, $P1
$I0 = cmp $P99, 115200
-
+
is( $I0, 0, $S0 )
goto end
@@ -116,7 +110,7 @@
div $P2, $P0, $P1
$I0 = cmp $P99, 115200
-
+
is( $I0, 0, $S0 )
goto end
@@ -146,7 +140,7 @@
mul $P2, $P0, $P1
$I0 = cmp $P99, 115200
-
+
is( $I0, 0, $S0 )
goto end
@@ -176,7 +170,7 @@
fdiv $P2, $P0, $P1
$I0 = cmp $P99, 115200
-
+
is( $I0, 0, $S0 )
goto end
@@ -206,7 +200,7 @@
and $P2, $P0, $P1
$I0 = cmp $P99, 115200
-
+
is( $I0, 0, $S0 )
goto end
@@ -236,7 +230,7 @@
concat $P2, $P0, $P1
$I0 = cmp $P99, 115200
-
+
is( $I0, 0, $S0 )
goto end
@@ -266,7 +260,7 @@
xor $P2, $P0, $P1
$I0 = cmp $P99, 115200
-
+
is( $I0, 0, $S0 )
goto end
@@ -296,127 +290,7 @@
or $P2, $P0, $P1
$I0 = cmp $P99, 115200
-
- is( $I0, 0, $S0 )
- goto end
-
- done:
- ok(1, 'ignoring exceptions')
- end:
-.end
-
-.sub test_bitwise_shr
- .param pmc type
-
- $P0 = new type
- $P0 = 40
- $P1 = new type
- $P1 = 2
- $P2 = new type
- $P2 = 115200
-
- $P99 = $P2
-
- $S0 = "original dest is untouched in bitwise_shr for "
- $S1 = type
- concat $S0, $S1
-
- # ignore exceptions
- push_eh done
- shr $P2, $P0, $P1
-
- $I0 = cmp $P99, 115200
-
- is( $I0, 0, $S0 )
- goto end
-
- done:
- ok(1, 'ignoring exceptions')
- end:
-.end
-
-.sub test_bitwise_or
- .param pmc type
- $P0 = new type
- $P0 = 40
- $P1 = new type
- $P1 = 2
- $P2 = new type
- $P2 = 115200
-
- $P99 = $P2
-
- $S0 = "original dest is untouched in bitwise_or for "
- $S1 = type
- concat $S0, $S1
-
- # ignore exceptions
- push_eh done
- bor $P2, $P0, $P1
-
- $I0 = cmp $P99, 115200
-
- is( $I0, 0, $S0 )
- goto end
-
- done:
- ok(1, 'ignoring exceptions')
- end:
-.end
-
-.sub test_bitwise_shl
- .param pmc type
-
- $P0 = new type
- $P0 = 40
- $P1 = new type
- $P1 = 2
- $P2 = new type
- $P2 = 115200
-
- $P99 = $P2
-
- $S0 = "original dest is untouched in bitwise_shl for "
- $S1 = type
- concat $S0, $S1
-
- # ignore exceptions
- push_eh done
- shl $P2, $P0, $P1
-
- $I0 = cmp $P99, 115200
-
- is( $I0, 0, $S0 )
- goto end
-
- done:
- ok(1, 'ignoring exceptions')
- end:
-.end
-
-.sub test_bitwise_xor
- .param pmc type
-
- $P0 = new type
- $P0 = 40
- $P1 = new type
- $P1 = 2
- $P2 = new type
- $P2 = 115200
-
- $P99 = $P2
-
- $S0 = "original dest is untouched in bitwise_xor for "
- $S1 = type
- concat $S0, $S1
-
- # ignore exceptions
- push_eh done
- bxor $P2, $P0, $P1
-
- $I0 = cmp $P99, 115200
-
is( $I0, 0, $S0 )
goto end
@@ -446,7 +320,7 @@
mod $P2, $P0, $P1
$I0 = cmp $P99, 115200
-
+
is( $I0, 0, $S0 )
goto end
@@ -476,7 +350,7 @@
pow $P2, $P0, $P1
$I0 = cmp $P99, 115200
-
+
is( $I0, 0, $S0 )
goto end
@@ -506,67 +380,7 @@
sub $P2, $P0, $P1
$I0 = cmp $P99, 115200
-
- is( $I0, 0, $S0 )
- goto end
-
- done:
- ok(1, 'ignoring exceptions')
- end:
-.end
-
-.sub test_bitwise_lsr
- .param pmc type
- $P0 = new type
- $P0 = 40
- $P1 = new type
- $P1 = 2
- $P2 = new type
- $P2 = 115200
-
- $P99 = $P2
-
- $S0 = "original dest is untouched in bitwise_lsr for "
- $S1 = type
- concat $S0, $S1
-
- # ignore exceptions
- push_eh done
- lsr $P2, $P0, $P1
-
- $I0 = cmp $P99, 115200
-
- is( $I0, 0, $S0 )
- goto end
-
- done:
- ok(1, 'ignoring exceptions')
- end:
-.end
-
-.sub test_bitwise_and
- .param pmc type
-
- $P0 = new type
- $P0 = 40
- $P1 = new type
- $P1 = 2
- $P2 = new type
- $P2 = 115200
-
- $P99 = $P2
-
- $S0 = "original dest is untouched in bitwise_and for "
- $S1 = type
- concat $S0, $S1
-
- # ignore exceptions
- push_eh done
- band $P2, $P0, $P1
-
- $I0 = cmp $P99, 115200
-
is( $I0, 0, $S0 )
goto end
Deleted: branches/boehm_gc_2/t/op/bitwise.t
==============================================================================
--- branches/boehm_gc_2/t/op/bitwise.t Mon Feb 22 12:30:02 2010 (r44293)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,474 +0,0 @@
-#!parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-t/op/bitwise.t - Bitwise Ops
-
-=head1 SYNOPSIS
-
- % prove t/op/bitwise.t
-
-=head1 DESCRIPTION
-
-Tests various bitwise logical operations.
-
-=cut
-
-.sub main :main
- .include 'test_more.pir'
-
- plan(68)
-
- test_shr_i_i_i_shift_rt_()
- test_shr_i_i_shift_rt_()
- test_shr_i_i_ic_shift_rt_()
- test_shr_i_ic_i_shift_rt_()
- test_shr_i_ic_ic_shift_rt_()
- test_lsr_i_ic_ic_shift_rt_()
- test_lsr_i_ic_shift_rt()
- test_lsr_i_i_i_shift_rt()
- test_lsr_i_i_ic_shift_rt()
- test_shr_i_i_ic_shift_rt_negative()
- test_shl_i_i_i_shift_lt()
- test_shl_i_i_ic_shift_lt()
- test_shl_i_ic_i_shift_lt()
- test_shl_i_ic_ic_shift_lt()
- test_shl_i_i_shift_lt()
- test_bxor_i_i_i_xor()
- test_bxor_i_i_ic_xor()
- test_bxor_i_ic_xor()
- test_band_i_i_i_and()
- test_band_i_i_ic_and()
- test_band_i_i_ic_and_2()
- test_bor_i_i_i()
- test_bor_i_i_ic()
- test_bor_i_i_ic_2()
- test_bnot_i_i_2()
- test_rot_i_i_ic_ic()
- test_i_reg_shl_and_pmc_shl_are_consistent()
- # END_OF_TESTS
-.end
-
-.macro exception_is ( M )
- .local pmc exception
- .local string message
- .get_results (exception)
-
- message = exception['message']
- is( message, .M, .M )
-.endm
-
-.sub test_shr_i_i_i_shift_rt_
- set $I0, 0b001100
- set $I1, 0b010100
- set $I2, 1
- set $I3, 2
- shr $I4, $I0, $I2
- shr $I2, $I0, $I2
- shr $I1, $I1, $I3
- is( $I4, "6", 'shr_i_i_i (>>)' )
- is( $I2, "6", 'shr_i_i_i (>>)' )
- is( $I1, "5", 'shr_i_i_i (>>)' )
- is( $I0, "12", 'shr_i_i_i (>>)' )
-.end
-
-.sub test_shr_i_i_shift_rt_
- set $I0, 0b001100
- set $I1, 0b010100
- set $I2, 1
- set $I3, 2
- shr $I0, $I2
- shr $I1, $I3
- is( $I0, "6", 'shr_i_i (>>)' )
- is( $I1, "5", 'shr_i_i (>>)' )
-.end
-
-.sub test_shr_i_i_ic_shift_rt_
- set $I0, 0b001100
- set $I1, 0b010100
- shr $I2, $I0, 1
- shr $I1, $I1, 2
- is( $I2, "6", 'shr_i_i_ic (>>)' )
- is( $I1, "5", 'shr_i_i_ic (>>)' )
- is( $I0, "12", 'shr_i_i_ic (>>)' )
-.end
-
-.sub test_shr_i_ic_i_shift_rt_
- set $I0, 1
- set $I1, 2
- shr $I2, 0b001100, $I0
- shr $I1, 0b010100, $I1
- is( $I2, "6", 'shr_i_ic_i (>>)' )
- is( $I1, "5", 'shr_i_ic_i (>>)' )
-.end
-
-.sub test_shr_i_ic_ic_shift_rt_
- shr $I2, 0b001100, 1
- shr $I1, 0b010100, 2
- is( $I2, "6", 'shr_i_ic_ic (>>)' )
- is( $I1, "5", 'shr_i_ic_ic (>>)' )
-.end
-
-# The crux of this test is that a proper logical right shift
-# will clear the most significant bit, so the shifted value
-# will be a positive value on any 2's or 1's complement CPU
-.sub test_lsr_i_ic_ic_shift_rt_
- lsr $I2, -40, 1
- lt $I2, 0, BAD
- ok( 1, 'lsr_i_ic_ic (>>)' )
- goto END
- BAD:
- ok( 0, 'lsr_i_ic_ic (>>)' )
- END:
-.end
-
-.sub test_lsr_i_ic_shift_rt
- set $I2, -100
- lsr $I2, 1
- lt $I2, 0, BAD
- ok( 1, 'lsr_i_ic (>>) OK')
- goto END
- BAD:
- ok( 0, 'lsr_i_ic (>>)')
- END:
-.end
-
-.sub test_lsr_i_i_i_shift_rt
- set $I0, -40
- set $I1, 1
- lsr $I2, $I0, $I1
- lt $I2, 0, BAD
- ok( 1, 'lsr_i_i_i (>>) OK')
- goto END
- BAD:
- ok( 0, 'lsr_i_i_i (>>)')
- END:
-.end
-
-# ... and the missing op signature was untested and wrong in JIT/i386
-.sub test_lsr_i_i_ic_shift_rt
- set $I0, -40
- lsr $I2, $I0, 1
- lt $I2, 0, BAD
- ok( 1, 'lsr_i_i_ic (>>) OK')
- goto END
- BAD:
- ok( 0, 'lsr_i_i_ic (>>)')
- END:
-.end
-
-.sub test_shr_i_i_ic_shift_rt_negative
- set $I0, -40
- shr $I2, $I0, 1
- ge $I2, 0, BAD
- ok( 1, 'shr_i_i_ic (>>) negative OK')
- goto END
- BAD:
- ok( 0, 'shr_i_i_ic (>>) negative')
- END:
-.end
-
-.sub test_shl_i_i_i_shift_lt
- set $I0, 0b001100
- set $I1, 0b010100
- set $I2, 2
- set $I3, 1
- shl $I4, $I0, $I2
- shl $I2, $I0, $I2
- shl $I1, $I1, $I3
- is( $I4, "48", 'shl_i_i_i (<<)' )
- is( $I2, "48", 'shl_i_i_i (<<)' )
- is( $I1, "40", 'shl_i_i_i (<<)' )
- is( $I0, "12", 'shl_i_i_i (<<)' )
-.end
-
-.sub test_shl_i_i_ic_shift_lt
- set $I0, 0b001100
- set $I1, 0b010100
- shl $I2, $I0, 2
- shl $I1, $I1, 1
- is( $I2, "48", 'shl_i_i_ic (<<)' )
- is( $I1, "40", 'shl_i_i_ic (<<)' )
- is( $I0, "12", 'shl_i_i_ic (<<)' )
-.end
-
-.sub test_shl_i_ic_i_shift_lt
- set $I0, 2
- set $I1, 1
- shl $I2, 0b001100, $I0
- shl $I1, 0b010100, $I1
- is( $I2, "48", 'shl_i_ic_i (<<)' )
- is( $I1, "40", 'shl_i_ic_i (<<)' )
-.end
-
-.sub test_shl_i_ic_ic_shift_lt
- shl $I2, 0b001100, 2
- shl $I1, 0b010100, 1
- is( $I2, "48", 'shl_i_ic_ic (<<)' )
- is( $I1, "40", 'shl_i_ic_ic (<<)' )
-.end
-
-.sub test_shl_i_i_shift_lt
- set $I0, 0b001100
- set $I1, 0b010100
- set $I2, 1
- set $I3, 2
- shl $I0, $I2
- shl $I1, $I3
- is( $I0, "24", 'shl_i_i (<<)' )
- is( $I1, "80", 'shl_i_i (<<)' )
-.end
-
-.sub test_bxor_i_i_i_xor
- set $I0, 0b001100
- set $I1, 0b100110
- bxor $I2, $I0, $I1
- is( $I2, "42", 'bxor_i_i_i (^)' )
- bxor $I1, $I0, $I1
- is( $I1, "42", 'bxor_i_i_i (^)' )
- is( $I0, "12", 'bxor_i_i_i (^)' )
-.end
-
-.sub test_bxor_i_i_ic_xor
- set $I0, 0b001100
- bxor $I2, $I0, 0b100110
- is( $I2, "42", 'bxor_i_i_ic (^)' )
- is( $I0, "12", 'bxor_i_i_ic (^)' )
- bxor $I0, $I0, 0b100110
- is( $I0, "42", 'bxor_i_i_ic (^)' )
-.end
-
-.sub test_bxor_i_ic_xor
- set $I0, 0b001100
- set $I2, 0b000011
- bxor $I2, $I0
- is( $I2, "15", 'bxor_i|ic (^)' )
- set $I2, 0b001100
- bxor $I2, $I0
- is( $I2, "0", 'bxor_i|ic (^)' )
- set $I2, 0b101010
- bxor $I2, $I2
- is( $I2, "0", 'bxor_i|ic (^)' )
- set $I2, 0b010101
- bxor $I2, 0b000011
- is( $I2, "22", 'bxor_i|ic (^)' )
-.end
-
-.sub test_band_i_i_i_and
- set $I0, 0b001100
- set $I1, 0b010110
- band $I2, $I0,$I1
- is( $I2, "4", 'band_i_i_i (&)' )
- band $I1,$I0,$I1
- is( $I1, "4", 'band_i_i_i (&)' )
- is( $I0, "12", 'band_i_i_i (&)' )
-.end
-
-.sub test_band_i_i_ic_and
- set $I0, 0b001100
- band $I2, $I0,0b010110
- is( $I2, "4", 'band_i_i_ic (&)' )
- is( $I0, "12", 'band_i_i_ic (&)' )
- band $I0,$I0,0b010110
- is( $I0, "4", 'band_i_i_ic (&)' )
-.end
-
-.sub test_band_i_i_ic_and_2
- set $I0, 0b001100
- set $I2, 0b000011
- band $I2, $I0
- is( $I2, "0", 'band_i_i|ic (&)' )
-
- set $I2, 0b001100
- band $I2, $I0
- is( $I2, "12", 'band_i_i|ic (&)' )
-
- set $I2, 0b101010
- band $I2, $I2
- is( $I2, "42", 'band_i_i|ic (&)' )
-
- set $I2, 0b010101
- band $I2, 0b000011
- is( $I2, "1", 'band_i_i|ic (&)' )
-.end
-
-.sub test_bor_i_i_i
- set $I0, 0b001100
- set $I1, 0b010110
- bor $I2, $I0,$I1
- is( $I2, "30", 'bor_i_i_i (|)' )
- bor $I1,$I0,$I1
- is( $I1, "30", 'bor_i_i_i (|)' )
- is( $I0, "12", 'bor_i_i_i (|)' )
-.end
-
-.sub test_bor_i_i_ic
- set $I0, 0b001100
- bor $I2, $I0,0b010110
- is( $I2, "30", 'bor_i_i_ic (|)' )
- is( $I0, "12", 'bor_i_i_ic (|)' )
- bor $I0,$I0,0b010110
- is( $I0, "30", 'bor_i_i_ic (|)' )
-.end
-
-.sub test_bor_i_i_ic_2
- set $I0, 0b001100
- set $I2, 0b000011
- bor $I2, $I0
- is( $I2, "15", 'bor_i_i|ic (|) 2' )
- set $I2, 0b001100
- bor $I2, $I0
- is( $I2, "12", 'bor_i_i|ic (|) 2' )
- set $I2, 0b101010
- bor $I2, $I2
- is( $I2, "42", 'bor_i_i|ic (|) 2' )
- set $I2, 0b010101
- bor $I2, 0b000011
- is( $I2, "23", 'bor_i_i|ic (|) 2' )
-.end
-
-.sub test_bnot_i_i_2
- set $I0, 0b001100
- set $I1, 0b001100
- set $I31, 0b111111
- bnot $I2, $I0
- band $I2, $I2, $I31
- is( $I2, "51", 'bnot_i_i (~) 2' )
- bnot $I1, $I1
- band $I1, $I1, $I31
- is( $I1, "51", 'bnot_i_i (~) 2' )
- is( $I0, "12", 'bnot_i_i (~) 2' )
-.end
-
-.sub test_rot_i_i_ic_ic
- .include "iglobals.pasm"
- .local pmc interp # a handle to our interpreter object.
- interp = getinterp
- .local pmc config
- config = interp[.IGLOBALS_CONFIG_HASH]
- .local int intvalsize
- intvalsize = config['intvalsize']
-
- .local int int_bits
- int_bits = intvalsize * 8
-
- set $I0, 0b001100
-
- gt intvalsize, 4, do64bit
-
- rot $I1, $I0, 1, 32 # 1 left
- is( $I1, "24", 'rot_i_i_ic_ic' )
- rot $I1, $I0, -1, 32 # 1 right
- is( $I1, "6", 'rot_i_i_ic_ic' )
- goto END
-
- do64bit:
- rot $I1, $I0, 1, 64 # 1 left
- is( $I1, "24", 'rot_i_i_ic_ic' )
- rot $I1, $I0, -1, 64 # 1 right
- is( $I1, "6", 'rot_i_i_ic_ic' )
-
- END:
-.end
-
-## The PMC shl op will promote Integer to Bigint when needed. We can't stuff a
-## BigInt in an I register, but we can produce the same result modulo wordsize.
-## [Only we cheat by using the word size minus one, so that we don't have to
-## deal with negative numbers. -- rgr, 2-Jun-07.]
-.sub test_i_reg_shl_and_pmc_shl_are_consistent
-
- .include "iglobals.pasm"
- .local pmc interp # a handle to our interpreter object.
- interp = getinterp
- .local pmc config
- config = interp[.IGLOBALS_CONFIG_HASH]
- .local int gmp
- gmp = config['gmp']
-
- if gmp, runtest
- skip( 2, 'no BigInt lib found' )
- goto END
-
- runtest:
-
- ## Figure out the wordsize. We need integer_modulus because assigning a
- ## too-big BigInt throws an error otherwise.
- .include 'sysinfo.pasm'
- .local int i_bytes_per_word, i_bits_per_word_minus_one
- .local pmc bits_per_word_minus_one, integer_modulus
- i_bytes_per_word = sysinfo .SYSINFO_PARROT_INTSIZE
- i_bits_per_word_minus_one = 8 * i_bytes_per_word
- dec i_bits_per_word_minus_one
- bits_per_word_minus_one = new 'Integer'
- bits_per_word_minus_one = i_bits_per_word_minus_one
- integer_modulus = new 'BigInt'
- integer_modulus = 1
- integer_modulus <<= bits_per_word_minus_one
-
- ## Test shifting a positive number.
- new $P0, 'Integer'
- set $P0, 1000001
- test_shift($P0, integer_modulus)
-
- ## Test shifting a negative number.
- set $P0, -1000001
- test_shift($P0, integer_modulus)
- END:
-.end
-
-.sub test_shift
- .param pmc number
- .param pmc integer_modulus
- new $P1, 'Integer'
- set $P1, 1
- .local int i_number
- i_number = number
-
- ## Start the loop.
- loop:
- if $P1 > 100 goto done
- ## shift number and i_number into $P2 and $I2.
- shl $P2, number, $P1
- $I1 = $P1
- shl $I2, i_number, $I1
- ## compare in I registers.
- $P3 = mod $P2, integer_modulus
- $I3 = $P3
- if $I2 >= 0 goto pos_check
- ## The register op gave a negative result, but the modulus will always be
- ## positive. If the truncated result is correct, then the difference will
- ## be the most negative INTVAL, which is the only number for which -x==x.
- $I4 = $I3 - $I2
- $I5 = - $I4
- if $I4 == $I5 goto ok
- goto bad
- pos_check:
- if $I2 == $I3 goto ok
- bad:
- ok( 0, "oops; not ok: " )
- diag( i_number )
- diag( ' << ' )
- diag( $I1 )
- diag( ' gives I ' )
- diag( $I2 )
- diag( ' vs. P ' )
- diag( $P3 )
- diag( ".\n" )
- diag( $I5 )
- diag( "\n" )
- ok:
- ## set up for the next one
- inc $P1
- goto loop
- done:
- ok( 1, 'finished ok' )
-.end
-
-# Local Variables:
-# mode: pir
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4 ft=pir:
Added: branches/boehm_gc_2/t/op/errorson.t
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/boehm_gc_2/t/op/errorson.t Mon Feb 22 12:30:02 2010 (r44294)
@@ -0,0 +1,48 @@
+#!parrot
+# Copyright (C) 2010, Parrot Foundation.
+# $Id$
+
+=head1 NAME
+
+t/op/errorson.t - Test the errorson opcode
+
+=head1 SYNOPSIS
+
+% prove t/op/errorson.t
+
+=head1 DESCRIPTION
+
+Tests that the errorson opcode turns exception-throwing on and off correctly.
+
+=cut
+
+.sub test_main :main
+ .include 'test_more.pir'
+ .include 'errors.pasm'
+
+ plan(1)
+ test_find_name()
+.end
+
+.sub test_find_name
+ errorson .PARROT_ERRORS_GLOBALS_FLAG
+ push_eh myhandler
+ $P0 = find_name "i_better_not_exist_or_this_thing_is_crazy"
+ pop_eh
+ if null $P0 goto wasnull
+ ok(0, "variable not null, must have existed somehow. inconceivable!")
+ .return()
+wasnull:
+ todo(0,'errorson did not throw an exception for calling find_name on an unbound variable with PARROT_ERRORS_GLOBALS_FLAG')
+ .return()
+myhandler:
+ pop_eh
+ ok(1,'errorson threw an exception for calling find_name on an unbound variable with PARROT_ERRORS_GLOBALS_FLAG')
+.end
+
+# Local Variables:
+# mode: pir
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir:
Added: branches/boehm_gc_2/t/op/gc-leaky.t
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/boehm_gc_2/t/op/gc-leaky.t Mon Feb 22 12:30:02 2010 (r44294)
@@ -0,0 +1,73 @@
+#!./parrot
+# Copyright (C) 2010, Parrot Foundation.
+# $Id$
+
+=head1 NAME
+
+t/op/gc-leaky.t - test for memory leaks in the Garbage Collector
+
+=head1 SYNOPSIS
+
+ % prove t/op/gc-leaky.t
+
+=head1 DESCRIPTION
+
+Tests that we actually do a GC mark and sweep after a large number of PMC's have
+been created. Test suggested by chromatic++ . More tests are needed to close
+TT1465 - http://trac.parrot.org/parrot/ticket/1465 .
+
+=cut
+
+# 20:57 <chromatic> For every million PMCs allocated, see that the GC has performed a mark/sweep.
+
+.include 'interpinfo.pasm'
+
+.sub _main :main
+ .include 'test_more.pir'
+
+ plan(2)
+
+ $S0 = interpinfo .INTERPINFO_GC_SYS_NAME
+ if $S0 == "inf" goto dont_run_hanging_tests
+
+ test_gc_mark_sweep()
+
+ goto test_end
+ dont_run_hanging_tests:
+ ok(1, "#TODO - Test disabled on gc_inf")
+ ok(1, "#TODO - Test disabled on gc_inf")
+ test_end:
+.end
+
+.sub test_gc_mark_sweep
+ .local int counter
+ counter = 0
+ loop:
+ $P0 = box 0
+ inc counter
+ if counter > 1e6 goto done
+ goto loop
+ done:
+ say ""
+ $I1 = interpinfo.INTERPINFO_GC_COLLECT_RUNS
+ $I2 = interpinfo.INTERPINFO_GC_MARK_RUNS
+
+ $I3 = isge $I1, 1
+ $I4 = isge $I2, 1
+
+ $S1 = $I1
+ $S0 = "performed " . $S1
+ $S0 .= " (which should be >=1) GC collect runs"
+ ok($I2,$S0)
+
+ $S1 = $I2
+ $S0 = "performed " . $S1
+ $S0 .= " (which should be >=1) GC mark runs"
+ ok($I2,$S0)
+.end
+
+# Local Variables:
+# mode: pir
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
Modified: branches/boehm_gc_2/t/op/string_mem.t
==============================================================================
--- branches/boehm_gc_2/t/op/string_mem.t Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/t/op/string_mem.t Mon Feb 22 12:30:02 2010 (r44294)
@@ -37,7 +37,6 @@
.sub _main :main
.include 'test_more.pir'
- .local pmc _
plan(TESTS)
test_stringinfo()
@@ -52,7 +51,6 @@
.end
.sub test_stringinfo
- .local pmc _
$S1 = "Hello, world"
$S0 = $S1
Modified: branches/boehm_gc_2/t/op/trans.t
==============================================================================
--- branches/boehm_gc_2/t/op/trans.t Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/t/op/trans.t Mon Feb 22 12:30:02 2010 (r44294)
@@ -4,7 +4,7 @@
=head1 NAME
-t/op/bitwise.t - Bitwise Ops
+t/op/trans.t - Bitwise Ops
=head1 SYNOPSIS
@@ -12,7 +12,7 @@
=head1 DESCRIPTION
-Tests various bitwise logical operations.
+Tests various transcendental operations
=cut
@@ -20,7 +20,7 @@
.include 'test_more.pir'
plan(16)
-
+
test_sin_n()
test_sin_i()
test_cos_n()
@@ -44,17 +44,17 @@
.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
@@ -64,10 +64,10 @@
.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
@@ -75,17 +75,17 @@
.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
@@ -95,10 +95,10 @@
.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
@@ -106,22 +106,22 @@
.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
+.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
+.end
Modified: branches/boehm_gc_2/t/pmc/bigint.t
==============================================================================
--- branches/boehm_gc_2/t/pmc/bigint.t Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/t/pmc/bigint.t Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -20,7 +20,7 @@
.include 'test_more.pir'
- plan(45)
+ plan(34)
check_libgmp_good()
set_and_get()
@@ -35,8 +35,6 @@
interface()
boolean()
pi()
- left_shift()
- right_shift()
bugfixes()
.end
@@ -79,14 +77,14 @@
NoLibGMP:
say 'No BigInt Lib configured'
- skip(45)
+ skip(34)
exit 0
OldLibGMP:
print 'Buggy GMP version ['
print $S3
say '] with huge digit multiply - please upgrade'
- skip(45)
+ skip(34)
exit 0
ret:
@@ -935,348 +933,6 @@
ret:
.end
-.sub left_shift
- $I1 = 1
-
- $P0 = new ['BigInt']
- $P1 = new ['BigInt']
-
-# shl with a positive shift
- $P0 = 2
- $P1 = 2
- $P2 = new ['Integer']
- $P2 = shl $P0, $P1
- $S0 = $P2
- eq $S0, '8', OK1
- $I1 = 0
- say 'shl(bigint 2,bigint 2) did not return 8'
-OK1:
- $P0 = '100000000000'
- $P1 = 10
- $P2 = new ['Integer']
- $P2 = shl $P0, $P1
- $S0 = $P2
- eq $S0, '102400000000000', OK2
- $I1 = 0
- say 'shl(bigint 100000000000,bigint 10) did not return 102400000000000'
-OK2:
-
-# shl with a negative shift
- $P0 = 8
- $P1 = -2
- $P2 = new ['Integer']
- $P2 = shl $P0, $P1
- $S0 = $P2
- is($S0, '2', 'shl(bigint, -bigint)')
- $P0 = '102400000000000'
- $P1 = -10
- $P2 = new ['Integer']
- $P2 = shl $P0, $P1
- $S0 = $P2
- eq $S0, '100000000000', OK3
- $I1 = 0
- say 'shl(bigint 102400000000000,bigint -10) did not return 100000000000'
-OK3:
-
- ok($I1, 'shl(bigint, +bigint)')
- $I1 = 1
-
-# shl_int with a positive shift
- $P0 = 2
- $P1 = 1
- $P2 = new ['Integer']
- $P2 = shl $P0, $P1
- $S0 = $P2
- eq $S0, '4', OK4
- $I1 = 0
- say 'shl(bigint 2,integer 1) did not return 4'
-OK4:
- $P0 = '100000000000'
- $P1 = 1
- $P2 = new ['Integer']
- $P2 = shl $P0, $P1
- $S0 = $P2
- eq $S0, '200000000000', OK5
- $I1 = 0
- say 'shl(bigint 100000000000,integer 1) did not return 200000000000'
-OK5:
- $P0 = '100000000000'
- $P1 = 10
- $P2 = new ['Integer']
- $P2 = shl $P0, $P1
- $S0 = $P2
- eq $S0, '102400000000000', OK6
- $I1 = 0
- say 'shl(bigint 100000000000,integer 10) did not return 102400000000000'
-OK6:
-
-# shl_int with a negative shift
-
- $P0 = 4
- $P1 = -1
- $P2 = new ['Integer']
- $P2 = shl $P0, $P1
- $S0 = $P2
- eq $S0, '2', OK7
- $I1 = 0
- say 'shl(bigint 4,integer -1) did not return 2'
-OK7:
- $P0 = '200000000000'
- $P1 = -1
- $P2 = new ['Integer']
- $P2 = shl $P0, $P1
- $S0 = $P2
- eq $S0, '100000000000', OK8
- $I1 = 0
- say 'shl(bigint 200000000000,integer -1) did not return 100000000000'
-OK8:
- $P0 = '102400000000000'
- $P1 = -10
- $P2 = new ['Integer']
- $P2 = shl $P0, $P1
- $S0 = $P2
- eq $S0, '100000000000', OK9
- $I1 = 0
- say 'shl(bigint 102400000000000,integer -10) did not return 100000000000'
-OK9:
- ok($I1, 'shl(bigint,integer)')
- $I1 = 1
-
-# shl_int throws an error when promotion is disabled
-
- errorson .PARROT_ERRORS_OVERFLOW_FLAG
- $P0 = new ['Integer']
- $P0 = 1000001
- $P1 = new ['Integer']
- $P1 = 10
-
- ## shift by 10 bits . . .
- $P2 = new ['Integer']
- $P2 = shl $P0, $P1
- $S1 = $P2
- $S2 = typeof $P2
- eq $S2, 'Integer', OK11
- $I1 = 0
- print 'shl(integer 1000001,integer 10) did not return an Integer PMC; got a '
- print $S2
- say ' instead.'
-
-OK11:
- eq $S1,'1024001024', OK12
- $I1 = 0
- print 'shl(integer 1000001,integer 10) did not return 1024001024; got '
- print $S1
- say ' instead.'
-OK12:
-
- ## then by 60 bits.
- $P0 = 1000001
- $P1 = 60
- push_eh E1
- $I1 = 1
- $P2 = new ['Integer']
- $P2 = shl $P0, $P1
- $I1 = 0
- $S1 = $P2
- $S2 = typeof $P2
- print 'Failed to throw exception; return type '
- print $S2
- print ', return value '
- say $P1
-E1:
- pop_eh
- get_results '0', $P2
- $S0 = $P2
- eq $S0, 'Integer overflow', OK13
- $I1 = 0
- say 'shl(integer 1000001, integer 60) throws exception, but wrong type'
-OK13:
- ok($I1, 'shl(integer 1000001, integer 60) throws "Integer overflow" exception')
- $I1 = 1
-
-# shl_int and i_shl_int promote Integer to Bigint
-
- errorsoff .PARROT_ERRORS_OVERFLOW_FLAG
- ## shift left by 20 bits ...
- $P0 = new ['Integer']
- $P0 = 1000001
- $P1 = new ['Integer']
- $P1 = 20
- $P2 = new ['Integer']
- $P2 = shl $P0, $P1
- ## ... then by another 40 bits (total 60) in place.
- $P1 = 40
- $P2 = shl $P2, $P1
- $S1 = $P2
- $S2 = typeof $P2
- eq $S2, 'BigInt', OK14
- $S1 = ''
-OK14:
- is($S1, '1152922657528351582846976', 'shl(shl(integer 1000001, 20), 40) => bigint 1152922657528351582846976')
-
-# shl_int by 64 bits also promotes to Bigint
-## The C << and >> ops take the right arg modulo the word size in bits (at least
-## on all the systems I have available), so both 32- and 64-bit systems treat
-## shifting by 64 bits as shifting by zero.
- $P0 = new ['Integer']
- $P0 = 1000001
- $P1 = new ['Integer']
- $P1 = 64
- $P2 = new ['Integer']
- $P2 = shl $P0, $P1
- $S1 = $P2
- $S2 = typeof $P2
- eq $S2, 'BigInt', OK15
- $S1 = ''
-OK15:
- is($S1, '18446762520453625325551616', 'shl(integer 1000001, 64) => bigint 18446762520453625325551616')
-.end
-
-.sub right_shift
- $I1 = 1
-#shr_int and i_shr_int with a neg shift promote Integer to Bigint
-
- $P0 = new ['Integer']
- $P0 = 1000001
- $P1 = new ['Integer']
- $P1 = -10
- $P2 = new ['Integer']
- ## shift by 10 bits . . .
- $P2 = shr $P0, $P1
-# $S2 = typeof $P2
-# ne $S2, 'Integer', OK2
-
- ## then by another 50 bits (total 60) in place.
- $P1 = -50
- $P2 = shr $P1
- $S1 = $P2
- $S2 = typeof $P2
- eq $S2, 'BigInt', OK2
- $S1 = ''
-OK2:
- is($S1, '1152922657528351582846976', 'shr(shr(integer 1000001, integer -10), -50) => bigint 1152922657528351582846976')
-
-# shr_bigint
- $P0 = new ['BigInt']
- $P0 = 8
- $P1 = new ['BigInt']
- $P1 = 2
- $P2 = new ['BigInt']
- $P2 = shr $P0, $P1
- $S0 = $P2
- eq $S0, '2', OK3
- $I1 = 0
- say 'shr(bigint 8, bigint 2) did not return 2'
-OK3:
-
- $P0 = '102400000000000'
- $P1 = 10
- $P2 = shr $P0, $P1
- $S0 = $P2
- eq $S0, '100000000000', OK4
- $I1 = 0
- say 'shr(bigint 102400000000000, bigint 10) did not return 100000000000'
-OK4:
- ok($I1, 'shr(bigint, +bigint)')
- $I1 = 1
-
-# shr_bigint with a negative shift
-## cf the shl_bigint case.
-
- $P0 = new ['BigInt']
- $P0 = 2
- $P1 = new['BigInt']
- $P1 = -2
- $P2 = new ['BigInt']
- $P2 = shr $P0, $P1
- $S0 = $P2
- eq $S0, '8', OK5
- $I1 = 0
- say 'shr(bigint 2, bigint -2) did not return 8'
-OK5:
-
- $P0 = '100000000000'
- $P1 = -10
- $P2 = shr $P0, $P1
- $S0 = $P2
- eq $S0, '102400000000000', OK6
- $I1 = 0
- say 'shr(bigint 100000000000, bigint -10) did not return 102400000000000'
-OK6:
- ok($I1, 'shr(bigint, -bigint)')
- $I1 = 1
-
-# shr_int
- $P0 = new ['BigInt']
- $P0 = 4
- $P1 = new ['Integer']
- $P1 = 1
- $P2 = new ['BigInt']
- $P2 = shr $P0, $P1
- $S0 = $P2
- eq $S0, '2', OK7
- $I1 = 0
- say 'shr(bigint 4, integer 1) did not return 2'
-OK7:
-
- $P0 = '200000000000'
- $P1 = 1
- $P2 = shr $P0, $P1
- $S0 = $P2
- eq $S0, '100000000000', OK8
- $I1 = 0
- say 'shr(bigint 200000000000, integer 1) did not return 100000000000'
-OK8:
-
- $P0 = '102400000000000'
- $P1 = 10
- $P2 = shr $P0, $P1
- $S0 = $P2
- eq $S0, '100000000000', OK9
- $I1 = 0
- say 'shr(bigint 102400000000000, integer 10) did not return 100000000000'
-OK9:
-
- ok($I1,'shr(bigint, +integer)')
- $I1 = 1
-
-# shr_int with a negative shift
-## cf the shl_int case.
-
- $P0 = new ['BigInt']
- $P0 = 2
- $P1 = new ['Integer']
- $P1 = -1
- $P2 = new ['BigInt']
- $P2 = shr $P0, $P1
- $S0 = $P2
- eq $S0, '4', OK10
- $I1 = 0
- say 'shr(bigint 2, int -1) did not return 4'
-OK10:
-
- $P0 = '100000000000'
- $P1 = -1
- $P2 = new ['BigInt']
- $P2 = shr $P0, $P1
- $S0 = $P2
- eq $S0, '200000000000', OK11
- $I1 = 0
- say 'shr(bigint 100000000000, int -1) did not return 200000000000'
-OK11:
-
- $P1 = -10
- $P2 = new ['BigInt']
- $P2 = shr $P0, $P1
- $S0 = $P2
- eq $S0, '102400000000000', OK12
- $I1 = 0
- say 'shr(bigint 100000000000,int -10) did not return 102400000000000'
-OK12:
-
- ok($I1,'shr(bigint, -integer)')
-.end
-
.sub bugfixes
$P0 = new ['BigInt']
Modified: branches/boehm_gc_2/t/pmc/complex.t
==============================================================================
--- branches/boehm_gc_2/t/pmc/complex.t Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/t/pmc/complex.t Mon Feb 22 12:30:02 2010 (r44294)
@@ -21,7 +21,7 @@
.include 'fp_equality.pasm'
.include "iglobals.pasm"
- plan(467)
+ plan(458)
string_parsing()
exception_malformed_string__real_part()
@@ -53,7 +53,6 @@
test_sub()
test_i_sub()
sprintf_with_a_complex()
- pow_with_complex_numbers()
e_raised_pi_time_i__plus_1_equal_0()
ln_of_complex_numbers()
exp_of_complex_numbers()
@@ -641,33 +640,6 @@
.sprintf_is( "%.3f%+.3fi", "0+i", "0.000+1.000i" )
.end
-.macro pow_test_is(base, power, message)
- c = .base
- c2 = .power
- c3 = pow c, c2
- $S0 = sprintf "%.6f%+.6fi", c3
- $S1 = .message
- is( $S0, $S1, $S1 )
-.endm
-
-.sub pow_with_complex_numbers
- .local pmc c, c2, c3
- c = new ['Complex']
- c2 = new ['Complex']
- c3 = new ['Complex']
- .pow_test_is( "i", "i", "0.207880+0.000000i" )
- .pow_test_is( "i", "2", "-1.000000+0.000000i" )
- .pow_test_is( "2i", "2", "-4.000000+0.000000i" )
- .pow_test_is( "2+2i", "2+2i", "-1.452505-0.809890i" )
- .pow_test_is( "i", "0.5i", "0.455938+0.000000i" )
- .pow_test_is( 2, "2i", "0.183457+0.983028i" )
- c2 = new ['Integer']
- .pow_test_is( "2i", 2, "-4.000000+0.000000i" )
- .pow_test_is( "2", 4, "16.000000+0.000000i" )
- c2 = new ['Float']
- .pow_test_is( "2i", 0.5, "1.000000+1.000000i" )
-.end
-
.sub e_raised_pi_time_i__plus_1_equal_0
.local pmc c, c2, c3
c = new ['Complex']
Modified: branches/boehm_gc_2/t/pmc/fixedbooleanarray.t
==============================================================================
--- branches/boehm_gc_2/t/pmc/fixedbooleanarray.t Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/t/pmc/fixedbooleanarray.t Mon Feb 22 12:30:02 2010 (r44294)
@@ -17,7 +17,7 @@
=cut
-.const int TESTS = 36
+.const int TESTS = 37
.sub 'test' :main
.include 'test_more.pir'
@@ -292,18 +292,17 @@
size = 1564
$P0 = size
- $P0.'fill'(0)
+ # Fresh array is empty.
i = 0
result = 0
- $I1 = 0
- fill_false_loop:
- unless i < size goto fill_false_end
+ initial_false_loop:
+ unless i < size goto initial_false_end
$I0 = $P0[i]
result = or result, $I0
inc i
- goto fill_false_loop
- fill_false_end:
- nok(result, "Fill with 0")
+ goto initial_false_loop
+ initial_false_end:
+ nok(result, "Fresh array filled with 0")
$P0.'fill'(1)
i = 0
@@ -317,6 +316,20 @@
goto fill_true_loop
fill_true_end:
ok(result, "Fill with 1")
+
+ $P0.'fill'(0)
+ i = 0
+ result = 0
+ $I1 = 0
+ fill_false_loop:
+ unless i < size goto fill_false_end
+ $I0 = $P0[i]
+ result = or result, $I0
+ inc i
+ goto fill_false_loop
+ fill_false_end:
+ nok(result, "Fill with 0")
+
.end
Added: branches/boehm_gc_2/t/pmc/imageio.t
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/boehm_gc_2/t/pmc/imageio.t Mon Feb 22 12:30:02 2010 (r44294)
@@ -0,0 +1,79 @@
+#! parrot
+# Copyright (C) 2010, Parrot Foundation.
+# $Id$
+
+=head1 NAME
+
+t/pmc/imageio.t - test ImageIO PMC
+
+=head1 SYNOPSIS
+
+ % prove t/pmc/imagio.t
+
+=head1 DESCRIPTION
+
+Tests the ImageIO PMC.
+
+=cut
+
+.sub main :main
+ .include 'test_more.pir'
+
+ plan(11)
+
+ .local pmc imageio
+ imageio = new ['ImageIO']
+ ok(1, 'instantiated ImageIO')
+
+ .local pmc test_pmc
+ test_pmc = 'get_test_simple'()
+ setref imageio, test_pmc
+ $S0 = imageio
+ ok($S0, 'frozen PMC is true (simple)')
+ $S1 = freeze test_pmc
+ is($S0, $S1, 'freeze gives same image as ImageIO (simple)')
+
+ imageio = new ['ImageIO']
+ imageio = $S0
+ $P0 = deref imageio
+ ok($P0, 'thawed PMC is true (simple)')
+ $P1 = thaw $S1
+ is($P0, $P1, 'thaw gives same PMC as ImageIO (simple)')
+ is($P0, test_pmc, 'round trip gives same PMC (simple)')
+
+ imageio = new ['ImageIO']
+ test_pmc = 'get_test_aggregate'()
+ setref imageio, test_pmc
+ $S0 = imageio
+ ok($S0, 'frozen PMC is true (aggregate)')
+ $S1 = freeze test_pmc
+ is($S0, $S1, 'freeze gives same image as ImageIO (aggregate)')
+
+ imageio = new ['ImageIO']
+ imageio = $S0
+ $P0 = deref imageio
+ ok($P0, 'thawed PMC is true (aggregate)')
+ $P1 = thaw $S1
+ is_deeply($P0, $P1, 'thaw gives same PMC as ImageIO (aggregate)')
+ is_deeply($P0, test_pmc, 'round trip gives same PMC (aggregate)')
+.end
+
+.sub get_test_simple
+ $P0 = new ['Integer']
+ $P0 = -99
+ .return ($P0)
+.end
+
+.sub get_test_aggregate
+ $P0 = new ['ResizableStringArray']
+ $P0[0] = 'parrot'
+ $P0[1] = '???'
+ $P0[2] = 'profit'
+ .return ($P0)
+.end
+
+# Local Variables:
+# mode: pir
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir
Added: branches/boehm_gc_2/t/pmc/imageiosize.t
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/boehm_gc_2/t/pmc/imageiosize.t Mon Feb 22 12:30:02 2010 (r44294)
@@ -0,0 +1,74 @@
+#! parrot
+# Copyright (C) 2010, Parrot Foundation.
+# $Id$
+
+=head1 NAME
+
+t/pmc/imageiosize.t - test ImageIOSize PMC
+
+=head1 SYNOPSIS
+
+ % prove t/pmc/imagiosize.t
+
+=head1 DESCRIPTION
+
+Tests the ImageIOSize PMC.
+
+=cut
+
+.sub main :main
+ .include 'test_more.pir'
+
+ plan(4)
+
+ .local pmc iios
+ iios = new ['ImageIOSize']
+ ok(1, 'instantiated ImageIOSize')
+
+ .local pmc test_pmc
+ test_pmc = null
+ setref iios, test_pmc
+ $P0 = deref iios
+ $S0 = freeze test_pmc
+ $I0 = $P0
+ $I1 = length $S0
+ is($I0, $I1, 'gets the same size as freeze (null)')
+
+ iios = new ['ImageIOSize']
+ test_pmc = 'get_test_simple'()
+ setref iios, test_pmc
+ $P0 = deref iios
+ $S0 = freeze test_pmc
+ $I0 = $P0
+ $I1 = length $S0
+ is($I0, $I1, 'gets the same size as freeze (simple)')
+
+ iios = new ['ImageIOSize']
+ test_pmc = 'get_test_aggregate'()
+ setref iios, test_pmc
+ $P0 = deref iios
+ $S0 = freeze test_pmc
+ $I0 = $P0
+ $I1 = length $S0
+ is($I0, $I1, 'gets the same size as freeze (aggregate)')
+.end
+
+.sub get_test_simple
+ $P0 = new ['Integer']
+ $P0 = -99
+ .return ($P0)
+.end
+
+.sub get_test_aggregate
+ $P0 = new ['ResizableStringArray']
+ $P0[0] = 'parrot'
+ $P0[1] = '???'
+ $P0[2] = 'profit'
+ .return ($P0)
+.end
+
+# Local Variables:
+# mode: pir
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir
Modified: branches/boehm_gc_2/t/pmc/multidispatch.t
==============================================================================
--- branches/boehm_gc_2/t/pmc/multidispatch.t Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/t/pmc/multidispatch.t Mon Feb 22 12:30:02 2010 (r44294)
@@ -9,7 +9,7 @@
use Test::More;
use Parrot::Test::Util 'create_tempfile';
-use Parrot::Test tests => 48;
+use Parrot::Test tests => 45;
=head1 NAME
@@ -239,88 +239,6 @@
42
OUTPUT
-pasm_output_is( <<'CODE', <<'OUTPUT', "PASM INTVAL - new result", todo => 'TT #452' );
-.include "datatypes.pasm"
- get_global P10, "Integer_bxor_Intval"
- add_multi "bitwise_xor_int", "Integer,INTVAL,PMC", P10
-
- new P1, ['Integer']
- set P1, 3
- bxor P9, P1, 2
- print P9
- print "\n"
- end
-.pcc_sub Integer_bxor_Intval:
- get_params "0,0,0", P5, I5, P6
- print "ok\n"
- set I10, P5
- bxor I11, I10, I5
- new P6, ['Integer']
- set P6, I11
- set_returns "0", P6
- returncc
-CODE
-ok
-1
-OUTPUT
-
-pasm_output_is( <<'CODE', <<'OUTPUT', "PASM INTVAL - existing result", todo => 'TT #452' );
-.include "datatypes.pasm"
- get_global P10, "Integer_bxor_Intval"
- add_multi "bitwise_xor_int", "Integer,INTVAL,PMC", P10
-
- new P0, ['Integer']
- new P1, ['Integer']
- set P1, 3
- bxor P0, P1, 2
- print P0
- print "\n"
- end
-.pcc_sub Integer_bxor_Intval:
- get_params "0,0,0", P5, I5, P6
- print "ok\n"
- set I10, P5
- bxor I11, I10, I5
- set P6, I11
- set_returns "0", P6
- returncc
-CODE
-ok
-1
-OUTPUT
-
-pasm_output_is( <<'CODE', <<'OUTPUT', "PASM INTVAL - mixed", todo => 'TT #452' );
-.include "datatypes.pasm"
- get_global P10, "Integer_bxor_Intval"
- add_multi "bitwise_xor_int", "Integer,INTVAL,PMC", P10
-
- new P0, ['Integer']
- new P1, ['Integer']
- set P1, 3
- bxor P0, P1, 2
- print P0
- print "\n"
- bxor P9, P1, 2
- print P9
- print "\n"
- end
-.pcc_sub Integer_bxor_Intval:
- get_params "0,0,0", P5, I5, P6
- print "ok\n"
- set I10, P5
- bxor I11, I10, I5
- new P6, ['Integer']
- set P6, I11
- set_returns "0", P6
- returncc
-
-CODE
-ok
-1
-ok
-1
-OUTPUT
-
pir_output_is( <<'CODE', <<'OUT', "first dynamic MMD call" );
.sub main :main
Modified: branches/boehm_gc_2/t/pmc/namespace.t
==============================================================================
--- branches/boehm_gc_2/t/pmc/namespace.t Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/t/pmc/namespace.t Mon Feb 22 12:30:02 2010 (r44294)
@@ -56,11 +56,12 @@
.sub main :main
.include 'test_more.pir'
- plan(70)
+ plan(74)
create_namespace_pmc()
verify_namespace_type()
get_namespace_class()
+ keyed_namespace_lookup()
get_global_opcode()
get_sub_from_namespace_hash()
access_sub_in_namespace()
@@ -167,6 +168,40 @@
.end
+.sub keyed_namespace_lookup
+ # Tests to verify behavior of TT #1449
+ $P0 = get_root_namespace
+
+ # Keyed lookup
+ $P1 = $P0["parrot";"Foo";"Bar"]
+ $I0 = isnull $P1
+ is($I0, 0, "can lookup nested namespace by Key")
+ # TODO: Get the function from this namespace and call it to verify we have
+ # the correct one.
+
+ # Array lookup
+ $P1 = new ['ResizableStringArray']
+ $P1[0] = "parrot"
+ $P1[1] = "Foo"
+ $P1[2] = "Bar"
+ $P1[3] = "Baz"
+ $P2 = $P0[$P1]
+ $I0 = isnull $P1
+ is($I0, 0, "can lookup nested namespace by RSA")
+ # TODO: Get the function from this namespace and call it to verify we have
+ # the correct one.
+
+ # String lookup
+ $P1 = $P0["parrot"]
+ $P2 = $P1["Foo"]
+ $I0 = isnull $P1
+ is($I0, 0, "can lookup namespace by string")
+ $I0 = isnull $P2
+ is($I0, 0, "can lookup namespace by string")
+ # TODO: Get the function from this namespace and call it to verify we have
+ # the correct one.
+.end
+
# L<PDD21//>
.sub 'get_global_opcode'
test1:
@@ -486,7 +521,7 @@
# ...now we do!
$P1 = $P0.'make_namespace'("NewNamespace1")
- $P2 = $P1["baz"]
+ $P2 = $P1["baz"]
$I0 = isnull $P2
is($I0, 1, "make_namespace also creates new namespaces")
@@ -632,6 +667,12 @@
.return("Foo::Bar")
.end
+# Namespace "Foo";"Bar";"Baz". Nested namespace
+.namespace ["Foo";"Bar";"Baz"]
+.sub 'widget'
+ .return("Foo::Bar::Baz")
+.end
+
# Namespace specified in ISO-8859-1
.namespace [ iso-8859-1:"Fran\x{E7}ois" ]
.sub 'baz'
Added: branches/boehm_gc_2/t/pmc/opcode.t
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/boehm_gc_2/t/pmc/opcode.t Mon Feb 22 12:30:02 2010 (r44294)
@@ -0,0 +1,29 @@
+#! parrot
+# Copyright (C) 2001-2009, Parrot Foundation.
+# $Id$
+
+=head1 NAME
+
+t/pmc/opcode.t - Opcode PMC
+
+=head1 SYNOPSIS
+
+ % prove t/pmc/opcode.t
+
+=cut
+
+.sub main :main
+ .include 'test_more.pir'
+ plan(1)
+ cannot_create_directly()
+.end
+
+.sub cannot_create_directly
+ push_eh cannot_create
+ $P0 = new ['Opcode']
+ ok(0, "shouldn't be able to create new opcode")
+ goto create_end
+ cannot_create:
+ ok(1)
+ create_end:
+.end
Added: branches/boehm_gc_2/t/pmc/oplib.t
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/boehm_gc_2/t/pmc/oplib.t Mon Feb 22 12:30:02 2010 (r44294)
@@ -0,0 +1,34 @@
+#! parrot
+# Copyright (C) 2001-2009, Parrot Foundation.
+# $Id$
+
+=head1 NAME
+
+t/pmc/oplib.t - OpLib PMC
+
+=head1 SYNOPSIS
+
+ % prove t/pmc/oplib.t
+
+=cut
+
+.sub main :main
+ .include 'test_more.pir'
+ plan(2)
+ get_singleton()
+.end
+
+.sub get_singleton
+ $P0 = new ['OpLib']
+ $I0 = isnull $P0
+ is($I0, 0)
+
+ $P1 = new ['OpLib']
+ eq_addr $P0, $P1, ok
+ ok(0, "all OpLibs aren't identical")
+ goto end
+ok:
+ ok(1, "all OpLibs are identical")
+end:
+.end
+
Modified: branches/boehm_gc_2/t/pmc/pmc.t
==============================================================================
--- branches/boehm_gc_2/t/pmc/pmc.t Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/t/pmc/pmc.t Mon Feb 22 12:30:02 2010 (r44294)
@@ -51,7 +51,7 @@
my $checkTypes;
my %types_we_cant_test
= map { $_ => 1; } ( # These require initializers.
- qw(default Null Iterator ArrayIterator HashIterator StringIterator OrderedHashIterator Enumerate ParrotObject ParrotThread BigInt LexInfo LexPad Object Handle),
+ qw(default Null Iterator ArrayIterator HashIterator StringIterator OrderedHashIterator Enumerate ParrotObject ParrotThread BigInt LexInfo LexPad Object Handle Opcode),
# Instances of these appear to have other types.
qw(PMCProxy Class) );
Modified: branches/boehm_gc_2/t/pmc/string.t
==============================================================================
--- branches/boehm_gc_2/t/pmc/string.t Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/t/pmc/string.t Mon Feb 22 12:30:02 2010 (r44294)
@@ -230,7 +230,7 @@
new $P1, ['Float']
set $P1, 6.5
repeat $P2, $P0, $P1
- is( $P2, 'yyyyyy', 'Float arg to repeat' )
+ is( $P2, 'yyyyyy', 'Float arg to repeat' )
set $P0, "z"
new $P1, ['String']
@@ -256,7 +256,7 @@
new $P1, ['Float']
set $P1, 6.5
repeat $P3, $P0, $P1
- is( $P3, 'yyyyyy', 'Float arg to repeat' )
+ is( $P3, 'yyyyyy', 'Float arg to repeat' )
set $P0, "z"
new $P1, ['String']
@@ -1026,11 +1026,11 @@
# Get
$S0 = s[0]
is($S0, 'B', 'Get string by index')
-
+
$I0 = s[1]
$I1 = ord 'A'
is($I0, $I1, 'Get integer by index')
-
+
$P0 = s[2]
is($P0, 'R', 'Get PMC by index')
Modified: branches/boehm_gc_2/t/run/options.t
==============================================================================
--- branches/boehm_gc_2/t/run/options.t Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/t/run/options.t Mon Feb 22 12:30:02 2010 (r44294)
@@ -1,5 +1,5 @@
#!perl
-# Copyright (C) 2005-2007, Parrot Foundation.
+# Copyright (C) 2005-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -20,7 +20,7 @@
use warnings;
use lib qw( lib . ../lib ../../lib );
-use Test::More tests => 26;
+use Test::More tests => 27;
use Parrot::Config;
use File::Temp 0.13 qw/tempfile/;
use File::Spec;
@@ -80,7 +80,7 @@
for my $val (qw/ slow fast bounds trace /) {
for my $opt ( '-R ', '--runcore ', '--runcore=' ) {
$cmd = qq{"$PARROT" $opt$val "$second_pir_file" $redir};
- is( qx{$cmd}, "second\n", "<$opt$val> option" );
+ is( qx{$cmd}, "second\n", "<$opt$val> option)" ) or diag $cmd;
}
}
@@ -93,6 +93,9 @@
## TT #1150 test remaining options
+# Test --runtime-prefix
+like( qx{$PARROT --runtime-prefix}, qr/^.+$/, "--runtime-prefix" );
+
# clean up temporary files
unlink $first_pir_file;
unlink $second_pir_file;
Modified: branches/boehm_gc_2/t/src/embed.t
==============================================================================
--- branches/boehm_gc_2/t/src/embed.t Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/t/src/embed.t Mon Feb 22 12:30:02 2010 (r44294)
@@ -93,7 +93,7 @@
"\n",
&errstr
);
- Parrot_call_sub(interp, code, "v");
+ Parrot_ext_call(interp, code, "->");
Parrot_destroy(interp);
return 0;
@@ -160,7 +160,7 @@
subname = Parrot_new_string(interp, "hello", 5, (const char *)NULL, 0);
sub = Parrot_PMC_get_pmc_strkey(interp, parrotns, subname);
/* Execute it */
- Parrot_call_sub(interp, sub, "v");
+ Parrot_ext_call(interp, sub, "->");
Parrot_destroy(interp);
return 0;
@@ -216,7 +216,7 @@
&errstr
);
hellosub = Parrot_sub_new_from_c_func(interp, (void (*)())& hello, "vJ");
- Parrot_call_sub(interp, code, "vP", hellosub);
+ Parrot_ext_call(interp, code, "P->", hellosub);
Parrot_destroy(interp);
return 0;
@@ -285,7 +285,7 @@
Parrot_PMC_set_pmc_strkey(interp, parrotns, helloname, hellosub);
/* Call it */
- discard = Parrot_call_sub(interp, code, "v");
+ Parrot_ext_call(interp, code, "->");
Parrot_destroy(interp);
return 0;
Modified: branches/boehm_gc_2/t/src/extend.t
==============================================================================
--- branches/boehm_gc_2/t/src/extend.t Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/t/src/extend.t Mon Feb 22 12:30:02 2010 (r44294)
@@ -446,7 +446,7 @@
Parrot_pbc_load(interp, pf);
sub = Parrot_find_global_cur(interp, name);
- Parrot_call_sub(interp, sub, "v");
+ Parrot_ext_call(interp, sub, "->");
Parrot_eprintf(interp, "back\\n");
/* win32 seems to buffer stderr ? */
@@ -454,12 +454,12 @@
name = Parrot_str_new_constant(interp, "_sub2");
sub = Parrot_find_global_cur(interp, name);
- arg = pmc_new(interp, enum_class_String);
+ arg = Parrot_pmc_new(interp, enum_class_String);
Parrot_PMC_set_string_native(interp, arg,
Parrot_str_new(interp, "hello ", 0));
- Parrot_call_sub(interp, sub, "vP", arg);
+ Parrot_ext_call(interp, sub, "P->", arg);
Parrot_eprintf(interp, "back\\n");
return NULL;
@@ -512,7 +512,7 @@
name = Parrot_str_new_constant(interp, "_sub2");
sub = Parrot_find_global_cur(interp, name);
- arg = pmc_new(interp, enum_class_String);
+ arg = Parrot_pmc_new(interp, enum_class_String);
Parrot_PMC_set_string_native(interp, arg,
Parrot_str_new(interp, "hello ", 0));
@@ -581,7 +581,7 @@
Parrot_pbc_load(interp, pf);
sub = Parrot_find_global_cur(interp, name);
- arg = pmc_new(interp, enum_class_String);
+ arg = Parrot_pmc_new(interp, enum_class_String);
Parrot_PMC_set_string_native(interp, arg,
Parrot_str_new(interp, "hello ", 0));
@@ -657,7 +657,7 @@
interp->current_runloop_id++;
Parrot_ex_add_c_handler(interp, &jump_point);
- Parrot_call_sub(interp, sub, "v");
+ Parrot_ext_call(interp, sub, "->");
}
Parrot_eprintf(interp, "back\\n");
@@ -781,7 +781,7 @@
foo_name = Parrot_str_new_constant( interp, "foo" );
sub = Parrot_find_global_cur( interp, foo_name );
- retval = (PMC *) Parrot_call_sub( interp, sub, "V", "" );
+ Parrot_ext_call(interp, sub, "->");
Parrot_exit(interp, 0);
return 0;
@@ -812,7 +812,7 @@
Parrot_pbc_load( interp, pf );
sub = Parrot_find_global_cur( interp, Parrot_str_new_constant( interp, "add" ) );
- result = Parrot_call_sub_ret_int( interp, sub, "III", 100, 200 );
+ Parrot_ext_call(interp, sub, "II->I", 100, 200, &result);
printf( "Result is %d.\\n", result );
Parrot_exit(interp, 0);
Deleted: branches/boehm_gc_2/t/steps/gen/call_list-01.t
==============================================================================
--- branches/boehm_gc_2/t/steps/gen/call_list-01.t Mon Feb 22 12:30:02 2010 (r44293)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,73 +0,0 @@
-#! perl
-# Copyright (C) 2007-2008, Parrot Foundation.
-# $Id$
-# gen/call_list-01.t
-
-use strict;
-use warnings;
-use Test::More tests => 6;
-use Carp;
-use lib qw( lib );
-use_ok('config::gen::call_list');
-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::call_list};
-$conf->add_steps($pkg);
-$conf->options->set( %{$args} );
-my $step = test_step_constructor_and_description($conf);
-my $missing_files = 0;
-foreach my $f ( @{ $step->{fragment_files} } ) {
- $missing_files++ unless (-f $f);
-}
-is($missing_files, 0, "No needed source files are missing");
-
-pass("Completed all tests in $0");
-
-################### DOCUMENTATION ###################
-
-=head1 NAME
-
- gen/call_list-01.t - test gen::call_list
-
-=head1 SYNOPSIS
-
- % prove t/steps/gen/call_list-01.t
-
-=head1 DESCRIPTION
-
-The files in this directory test functionality used by F<Configure.pl>.
-
-The tests in this file test gen::call_list.
-
-=head1 AUTHOR
-
-Geoffrey Broadwell; modified from a similar file by James E Keenan.
-
-=head1 SEE ALSO
-
-config::gen::call_list, F<Configure.pl>.
-
-=cut
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Deleted: branches/boehm_gc_2/tools/build/nativecall.pir
==============================================================================
--- branches/boehm_gc_2/tools/build/nativecall.pir Mon Feb 22 12:30:02 2010 (r44293)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,983 +0,0 @@
-# Copyright (C) 2010, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-tools/build/nativecall.pir - Build up the native call routines
-
-=head1 SYNOPSIS
-
- % ./parrot tools/build/nativecall.pir <src/call_list.txt >src/nci.c
-
-=head1 DESCRIPTION
-
-This script creates the Native Call Interface file F<src/nci.c>. It
-parses a file of function signatures of the form:
-
- <return-type-specifier><ws><parameter-type-specifiers>[<ws>][#<comment>]
- ...
-Empty lines and lines containing only whitespace or comment are ignored.
-The types specifiers are documented in F<src/call_list.txt>.
-
-=head1 SEE ALSO
-
-F<src/call_list.txt>.
-F<docs/pdds/pdd16_native_call.pod>.
-
-=cut
-
-.macro_const VERSION 0.01
-
-.macro_const SIG_TABLE_GLOBAL_NAME 'signature_table'
-.macro_const OPTS_GLOBAL_NAME 'options'
-
-.sub 'main' :main
- .param pmc argv
-
- # initialize global variables
- 'gen_sigtable'()
- 'get_options'(argv)
-
- .local string targ
- targ = 'read_from_opts'('target')
-
- .local pmc sigs
- sigs = 'read_sigs'()
-
- if targ == 'head' goto get_targ
- if targ == 'thunks' goto get_targ
- if targ == 'loader' goto get_targ
- if targ == 'coda' goto get_targ
- if targ == 'all' goto all
- if targ == 'names' goto names
- if targ == 'signatures' goto signatures
-
- # unknown target
- $S0 = 'sprintf'("Unknown target type '%s'", targ)
- die $S0
-
- all:
- $S0 = 'get_head'(sigs)
- say $S0
- $S0 = 'get_thunks'(sigs)
- say $S0
- $S0 = 'get_loader'(sigs)
- say $S0
- $S0 = 'get_coda'(sigs)
- say $S0
- exit 0
-
- get_targ:
- $S0 = concat 'get_', targ
- $P0 = get_global $S0
- $S1 = $P0(sigs)
- say $S1
- exit 0
-
- names:
- die "names not yet implemented"
- signatures:
- die "signatures not yet implemented"
-.end
-
-# getopt stuff {{{
-
-.macro_const THUNK_STORAGE_CLASS 'thunk-storage-class'
-.macro_const THUNK_NAME_PROTO 'thunk-name-proto'
-.macro_const LOADER_STORAGE_CLASS 'loader-storage-class'
-.macro_const LOADER_NAME 'loader-name'
-
-
-.sub 'get_options'
- .param pmc argv
-
- load_bytecode 'Getopt/Obj.pbc'
-
- .local pmc getopt
- getopt = new ['Getopt';'Obj']
- push getopt, 'help|h'
- push getopt, 'version|v'
- push getopt, 'target=s'
- push getopt, 'thunk-storage-class=s'
- push getopt, 'thunk-name-proto=s'
- push getopt, 'loader-storage-class=s'
- push getopt, 'loader-name=s'
-
- .local string prog_name
- prog_name = shift argv
-
- .local pmc opt
- opt = getopt.'get_options'(argv)
-
- $I0 = opt['help']
- if $I0 goto print_help
-
- $I0 = opt['version']
- if $I0 goto print_version
-
- 'fixup_opts'(opt)
-
- set_global .OPTS_GLOBAL_NAME, opt
- .return()
-
- print_help:
- 'usage'(prog_name)
- print_version:
- 'version'(prog_name)
-.end
-
-.sub 'usage'
- .param string prog_name
- print prog_name
- say ' - Parrot NCI thunk library creation utility'
- say <<'USAGE'
-
-Creates a C file of routines suitable for use as Parrot NCI thunks.
-
-Usage ./parrot nativecall.pir [options] <input_signature_list.nci >output_c_file.c
-
-Options
- --help print this message and exit
- --version print the version number of this utility
- --target <target> select what to output (valid options are 'head', 'thunks',
- 'loader', 'coda', 'all', 'names', and 'signatures'). Default value is 'all'
- --thunk-storage-class <storage class>
- set the storage class used for the thunks. Default value is 'static'.
- --thunk-name-proto <printf prototype>
- set the prototype used for the thunk function names. Must be a printf
- format with arity 1. Default value is 'pcf_%s'
- --loader-storage-class
- set the storage class used for the loader function. Default value is none.
- --loader-name set the name used for the loader function. Default value is 'Parrot_load_nci_thunks'.
-USAGE
- exit 0
-.end
-
-.sub 'version'
- .param string prog_name
- print prog_name
- print ' version '
- say .VERSION
- exit 0
-.end
-
-.sub 'fixup_opts'
- .param pmc opts
-
- $I0 = defined opts['target']
- if $I0 goto end_target
- opts['target'] = 'all'
- end_target:
-
- $I0 = defined opts['thunk-storage-class']
- if $I0 goto end_thunk_storage_class
- opts['thunk-storage-class'] = 'static'
- end_thunk_storage_class:
-
- $I0 = defined opts['thunk-name-proto']
- if $I0 goto end_thunk_name_proto
- opts['thunk-name-proto'] = 'pcf_%s'
- end_thunk_name_proto:
-
- $S0 = opts['thunk-name-proto']
- $I0 = 'printf_arity'($S0)
- if $I0 == 1 goto end_thunk_name_proto_printf_arity
- 'sprintf'("Provided proto for 'thunk-name-proto' is of incorrect arity %i (expected 1)", $I0)
- die $S0
- end_thunk_name_proto_printf_arity:
-
- $I0 = defined opts['loader-storage-class']
- if $I0 goto end_loader_storage_class
- opts['loader-storage-class'] = ''
- end_loader_storage_class:
-
- $I0 = defined opts['loader-name']
- if $I0 goto end_loader_name
- opts['loader-name'] = 'Parrot_load_nci_thunks'
- end_loader_name:
-.end
-
-.sub 'read_from_opts'
- .param string key
-
- .local pmc opts
- opts = get_global .OPTS_GLOBAL_NAME
-
- $I0 = defined opts[key]
- unless $I0 goto not_present
-
- $S0 = opts[key]
- .return ($S0)
-
- not_present:
- $S0 = 'sprintf'("Parameter '%s' required but not provided", key)
- die $S0
-.end
-
-# }}}
-
-# get_{head,thunks,loader,coda} {{{
-
-.sub 'get_head'
- .param pmc ignored :slurpy
- .return (<<'HEAD')
-/* ex: set ro ft=c:
- * !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
- *
- * This file is generated automatically by tools/build/nativecall.pir
- *
- * Any changes made here will be lost!
- *
- */
-
-/* nci.c
- * Copyright (C) 2001-2009, Parrot Foundation.
- * SVN Info
- * $Id$
- * Overview:
- * Native Call Interface routines. The code needed to build a
- * parrot to C call frame is in here
- * Data Structure and Algorithms:
- * History:
- * Notes:
- * References:
- */
-#include "parrot/parrot.h"
-#include "parrot/hash.h"
-#include "parrot/oplib/ops.h"
-#include "pmc/pmc_managedstruct.h"
-#include "pmc/pmc_nci.h"
-#include "pmc/pmc_pointer.h"
-#include "pmc/pmc_callcontext.h"
-
-#ifdef PARROT_IN_CORE
-/* external libraries don't have to care about string subsystem */
-# include "nci.str"
-#endif
-
-/* HEADERIZER HFILE: none */
-/* HEADERIZER STOP */
-
-/*
- * if the architecture can build some or all of these signatures
- * enable the define below
- * - the JITed function will be called first
- * - if it returns NULL, the hardcoded version will do the job
- */
-
-#include "frame_builder.h"
-
-/* All our static functions that call in various ways. Yes, terribly
- hackish, but that is just fine */
-
-HEAD
-.end
-
-.sub 'get_thunks'
- .param pmc sigs
- .local string code
- .local int i, n
- code = ''
- i = 0
- n = sigs
- loop:
- if i >= n goto end_loop
-
- .local pmc sig
- sig = sigs[i]
- $S0 = 'sig_to_fn_code'(sig :flat)
- code = concat code, $S0
-
- inc i
- goto loop
- end_loop:
- .return (code)
-.end
-
-.sub 'get_loader'
- .param pmc sigs
-
- $S0 = 'read_from_opts'(.LOADER_STORAGE_CLASS)
- $S1 = 'read_from_opts'(.LOADER_NAME)
- .local string code
- code = 'sprintf'(<<'FN_HEADER', $S0, $S1)
-
-%s void
-%s(PARROT_INTERP)
-{
- PMC *iglobals;
- PMC *temp_pmc;
-
- PMC *HashPointer = NULL;
-
- iglobals = interp->iglobals;
- if (PMC_IS_NULL(iglobals))
- PANIC(interp, "iglobals isn't created yet");
-
- HashPointer = VTABLE_get_pmc_keyed_int(interp, iglobals,
- IGLOBALS_NCI_FUNCS);
- if (PMC_IS_NULL(HashPointer))
- PANIC(interp, "iglobals.nci_funcs isn't created yet");
-
-FN_HEADER
-
- .local int i, n
- i = 0
- n = sigs
- loop:
- if i >= n goto end_loop
-
- .local pmc sig
- sig = shift sigs
-
- .local string fn_name
- fn_name = 'sig_to_fn_name'(sig :flat)
-
- .local string key
- key = join '', sig
-
- $S0 = 'sprintf'(<<'TEMPLATE', fn_name, key)
- temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
- VTABLE_set_pointer(interp, temp_pmc, (void *)%s);
- VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "%s"), temp_pmc);
-
-TEMPLATE
- code = concat code, $S0
-
- inc i
- goto loop
- end_loop:
-
- code = concat code, <<'FN_FOOTER'
-}
-FN_FOOTER
-
- .return (code)
-.end
-
-.sub 'get_coda'
- .param pmc ignored :slurpy
- .return (<<'CODA')
-
-/*
- * Local variables:
- * c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */
-CODA
-.end
-
-# }}}
-
-# sig_to_* {{{
-
-.sub 'sig_to_fn_code'
- .param pmc args :slurpy
-
- .local string fn_decl
- fn_decl = 'sig_to_fn_decl'(args :flat)
-
- .local string var_decls
- var_decls = 'sig_to_var_decls'(args :flat)
-
- .local string preamble
- preamble = 'sig_to_preamble'(args :flat)
-
- .local string call
- call = 'sig_to_call'(args :flat)
-
- .local string postamble
- postamble = 'sig_to_postamble'(args :flat)
-
- .local string fn_code
- fn_code = 'sprintf'("%s{\n%s%s%s%s}\n", fn_decl, var_decls, preamble, call, postamble)
-
- .return (fn_code)
-.end
-
-.sub 'sig_to_postamble'
- .param string ret
- .param string params
-
- .local string final_assign
- $P0 = 'map_from_sig_table'(ret, 'ret_assign')
- final_assign = $P0[0]
-
- .local string extra_postamble
- $P0 = 'map_from_sig_table'(params, 'postamble_tmpl')
- 'fill_tmpls_ascending_ints'($P0)
- extra_postamble = join "\n", $P0
-
- .local string postamble
- postamble = 'sprintf'(<<'TEMPLATE', final_assign, extra_postamble)
- %s
- %s
-TEMPLATE
- .return (postamble)
-.end
-
-.sub 'sig_to_call'
- .param string ret
- .param string params
-
- .local string return_assign
- $P0 = 'map_from_sig_table'(ret, 'func_call_assign')
- return_assign = $P0[0]
-
- .local string ret_cast
- $P0 = 'map_from_sig_table'(ret, 'as_return')
- ret_cast = $P0[0]
- if ret_cast == 'void' goto void_fn
- ret_cast = 'sprintf'('(%s)', ret_cast)
- goto end_ret_cast
- void_fn:
- ret_cast = ''
- end_ret_cast:
-
- .local string call_params
- $P0 = 'map_from_sig_table'(params, 'call_param_tmpl')
- 'fill_tmpls_ascending_ints'($P0)
- call_params = join ', ', $P0
-
- .local string call
- call = 'sprintf'(<<'TEMPLATE', return_assign, ret_cast, call_params)
- GETATTR_NCI_orig_func(interp, self, orig_func);
- fn_pointer = (func_t)D2FPTR(orig_func);
- %s %s(*fn_pointer)(%s);
-TEMPLATE
- .return (call)
-.end
-
-.sub 'sig_to_preamble'
- .param string ret
- .param string params
-
- unless params goto return
-
- .local string sig
- $P0 = 'map_from_sig_table'(params, 'sig_char')
- sig = join "", $P0
-
- .local string fill_params
- $P0 = 'map_from_sig_table'(params, 'fill_params_tmpl')
- 'fill_tmpls_ascending_ints'($P0)
- fill_params = join "", $P0
-
- .local string extra_preamble
- $P0 = 'map_from_sig_table'(params, 'preamble_tmpl')
- 'fill_tmpls_ascending_ints'($P0)
- extra_preamble = join "", $P0
-
- .local string preamble
- preamble = 'sprintf'(<<'TEMPLATE', sig, fill_params, extra_preamble)
- Parrot_pcc_fill_params_from_c_args(interp, call_object, "%s" %s);
- %s
-TEMPLATE
-
- return:
- .return (preamble)
-.end
-
-.sub 'sig_to_var_decls'
- .param string ret
- .param string params
-
- .local string ret_csig
- $P0 = 'map_from_sig_table'(ret, 'as_return')
- ret_csig = $P0[0]
-
- .local string params_csig
- $P0 = 'map_from_sig_table'(params, 'as_proto')
- params_csig = join ', ', $P0
-
- .local string ret_tdecl
- ret_tdecl = ""
- $P0 = 'map_from_sig_table'(ret, 'return_type')
- $S0 = $P0[0]
- unless $S0 goto end_ret_type
- if $S0 == 'void' goto end_ret_type
- $S0 = 'sprintf'("%s return_data;\n", $S0)
- ret_tdecl = concat ret_tdecl, $S0
- end_ret_type:
- $P0 = 'map_from_sig_table'(ret, 'final_dest')
- $S0 = $P0[0]
- unless $S0 goto end_final_dest
- $S0 = concat $S0, "\n"
- ret_tdecl = concat ret_tdecl, $S0
- end_final_dest:
-
- .local string params_tdecl
- $P0 = 'map_from_sig_table'(params, 'temp_tmpl')
- 'fill_tmpls_ascending_ints'($P0)
- $P0 = 'grep_for_true'($P0)
- params_tdecl = join ";\n ", $P0
-
- .local string var_decls
- var_decls = 'sprintf'(<<'TEMPLATE', ret_csig, params_csig, ret_tdecl, params_tdecl)
- typedef %s(* func_t)(%s);
- func_t fn_pointer;
- void *orig_func;
- PMC *ctx = CURRENT_CONTEXT(interp);
- PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
- %s
- %s;
-TEMPLATE
-
- .return (var_decls)
-.end
-
-.sub 'sig_to_fn_decl'
- .param pmc sig :slurpy
- .local string storage_class, fn_name, fn_decl
- storage_class = 'read_from_opts'(.THUNK_STORAGE_CLASS)
- fn_name = 'sig_to_fn_name'(sig :flat)
- fn_decl = 'sprintf'(<<'TEMPLATE', storage_class, fn_name)
-%s void
-%s(PARROT_INTERP, PMC *self)
-TEMPLATE
- .return (fn_decl)
-.end
-
-.sub 'sig_to_fn_name'
- .param string ret
- .param string params
-
- .local string fix_params
- $P0 = 'map_from_sig_table'(params, 'cname')
- fix_params = join '', $P0
-
-
- $S0 = 'sprintf'('%s_%s', ret, fix_params)
- $S1 = 'read_from_opts'(.THUNK_NAME_PROTO)
- $S2 = 'sprintf'($S1, $S0)
- .return ($S2)
-.end
-
-.sub 'map_from_sig_table'
- .param string sig
- .param string field_name
-
- .local pmc sig_table
- sig_table = get_global .SIG_TABLE_GLOBAL_NAME
-
- $P0 = split '', sig
-
- .local pmc result
- result = new ['ResizableStringArray']
- $I0 = $P0
- result = $I0
-
- $I0 = $P0
- $I1 = 0
- loop:
- if $I1 >= $I0 goto end_loop
- $S0 = $P0[$I1]
- $S1 = sig_table[$S0; field_name]
- result[$I1] = $S1
- inc $I1
- goto loop
- end_loop:
-
- .return (result)
-.end
-
-# }}}
-
-# read_sigs {{{
-
-.sub 'read_sigs'
- .local pmc stdin, seen, sigs
- stdin = getstdin
- seen = new ['Hash']
- sigs = new ['ResizablePMCArray']
-
- .local int lineno
- lineno = 0
- read_loop:
- unless stdin goto end_read_loop
-
- .local string ret_sig, param_sig, full_sig
- (ret_sig, param_sig) = 'read_one_sig'(stdin)
- inc lineno
- full_sig = concat ret_sig, param_sig
-
- # filter out empty sigs (and empty lines)
- unless full_sig goto read_loop
-
- # de-dup sigs
- $I0 = seen[full_sig]
- unless $I0 goto unseen
- $S0 = 'sprintf'("Ignored signature '%s' on line %d (previously seen on line %d)\n", full_sig, lineno, $I0)
- printerr $S0
- goto read_loop
- unseen:
- seen[full_sig] = lineno
-
- .local pmc sig
- sig = new ['ResizableStringArray']
- sig = 2
- sig[0] = ret_sig
- sig[1] = param_sig
- push sigs, sig
-
- goto read_loop
- end_read_loop:
-
- .return (sigs)
-.end
-
-.sub 'read_one_sig'
- .param pmc fh
-
- .local string line
- line = readline fh
-
- # handle comments
- $I0 = index line, '#'
- if $I0 < 0 goto end_comment
- line = substr line, 0, $I0
- end_comment:
-
- # convert whitespace into spaces
- $S0 = '\t'
- whitespace_loop:
- $I0 = index line, $S0
- if $I0 < 0 goto end_whitespace_loop
- substr line, $I0, 1, ' '
- goto whitespace_loop
- end_whitespace_loop:
-
- if $S0 == "\n" goto end_whitespace
- $S0 = "\n"
- goto whitespace_loop
- end_whitespace:
-
- # turn multiple spaces into a single space
- multispace_loop:
- $I0 = index line, ' '
- if $I0 < 0 goto end_multispace_loop
- $S0 = substr line, $I0, 2, ' '
- goto multispace_loop
- end_multispace_loop:
-
- # remove leading whitespace
- $S0 = substr line, 0, 1
- unless $S0 == ' ' goto end_leading
- $S0 = substr line, 0, 1, ''
- end_leading:
-
- # handle empty (or whitespace only) lines
- if line == '' goto ret
- if line == ' ' goto ret
-
- # remove trailing whitespace
- $S0 = substr line, -1, 1
- unless $S0 == ' ' goto end_trailing
- $S0 = substr line, -1, 1, ''
- end_trailing:
-
- # read the signature
- .local string ret_sig, param_sig
- $P0 = split ' ', line
- ret_sig = $P0[0]
- param_sig = $P0[1]
-
- ret:
- .return (ret_sig, param_sig)
-.end
-
-#}}}
-
-# gen_sigtable {{{
-
-.sub 'gen_sigtable'
- $S0 = 'sigtable_json'()
- $P0 = 'decode_table'($S0)
- 'fixup_table'($P0)
- set_global .SIG_TABLE_GLOBAL_NAME, $P0
-.end
-
-.sub 'decode_table'
- .param string json
-
- .local pmc compiler
- load_bytecode 'data_json.pbc'
- compiler = compreg 'data_json'
-
- .local pmc table
- $P0 = compiler.'compile'(json)
- table = $P0()
-
- .return (table)
-.end
-
-.sub 'fixup_table'
- .param pmc table
-
- .local pmc table_iter
- table_iter = iter table
- iter_loop:
- unless table_iter goto iter_end
-
- .local string k
- .local pmc v
- k = shift table_iter
- v = table[k]
-
- $I0 = exists v['cname']
- if $I0 goto has_cname
- v['cname'] = k
- has_cname:
-
- $I0 = exists v['as_return']
- if $I0 goto has_as_return
- $S0 = v['as_proto']
- v['as_return'] = $S0
- has_as_return:
-
- $I0 = exists v['return_type']
- if $I0 goto has_return_type
- $S0 = v['as_proto']
- v['return_type'] = $S0
- has_return_type:
-
- $I0 = exists v['ret_assign']
- $I1 = exists v['sig_char']
- $I1 = !$I1
- $I0 = $I0 || $I1 # not (not exists v[ret_assign] and exists v[sig_char])
- if $I0 goto has_ret_assign
- $S0 = 'Parrot_pcc_fill_returns_from_c_args(interp, call_object, "'
- $S1 = v['sig_char']
- $S0 = concat $S0, $S1
- $S0 = concat $S0, '", return_data);'
- v['ret_assign'] = $S0
- has_ret_assign:
-
- $I0 = exists v['func_call_assign']
- if $I0 goto has_func_call_assign
- v['func_call_assign'] = 'return_data = '
- has_func_call_assign:
-
- $I0 = exists v['temp_tmpl']
- if $I0 goto has_temp_tmpl
- $S0 = v['return_type']
- $S0 = concat $S0, " t_%i"
- v['temp_tmpl'] = $S0
- has_temp_tmpl:
-
- $I0 = exists v['fill_params_tmpl']
- if $I0 goto has_fill_params_tmpl
- v['fill_params_tmpl'] = ', &t_%i'
- has_fill_params_tmpl:
-
- $I0 = exists v['call_param_tmpl']
- if $I0 goto has_call_param_tmpl
- v['call_param_tmpl'] = 't_%i'
- has_call_param_tmpl:
-
- goto iter_loop
- iter_end:
-
- .return ()
-.end
-
-.sub 'sigtable_json'
- .const string retv = <<'JSON'
-{
- "p": { "as_proto": "void *",
- "final_dest": "PMC * final_destination = PMCNULL;",
- "temp_tmpl": "PMC *t_%i",
- "sig_char": "P",
- "call_param_tmpl": "PMC_IS_NULL((PMC*)t_%i) ? (void *)NULL : VTABLE_get_pointer(interp, t_%i)",
- "ret_assign": "if (return_data != NULL) {
- final_destination = pmc_new(interp, enum_class_UnManagedStruct);
- VTABLE_set_pointer(interp, final_destination, return_data);
- }
- Parrot_pcc_fill_returns_from_c_args(interp, call_object, \"P\", final_destination);" },
- "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 *",
- "final_dest": "STRING *final_destination;",
- "ret_assign": "final_destination = Parrot_str_new(interp, return_data, 0);
- Parrot_pcc_fill_returns_from_c_args(interp, call_object, \"S\", final_destination);",
- "sig_char": "S",
- "temp_tmpl": "char *t_%i; STRING *ts_%i",
- "fill_params_tmpl": ", &ts_%i",
- "preamble_tmpl": "t_%i = ts_%i ? Parrot_str_to_cstring(interp, ts_%i) : (char *)NULL;",
- "postamble_tmpl": "if (t_%i) Parrot_str_free_cstring(t_%i);" },
- "v": { "as_proto": "void",
- "return_type": "void *",
- "sig_char": "v",
- "ret_assign": "",
- "func_call_assign": "" },
- "P": { "as_proto": "PMC *", "sig_char": "P" },
- "O": { "as_proto": "PMC *", "returns": "", "sig_char": "Pi" },
- "J": { "as_proto": "PARROT_INTERP",
- "returns": "",
- "fill_params_tmpl": "",
- "call_param_tmpl": "interp",
- "temp_tmpl": "",
- "sig_char": "" },
- "S": { "as_proto": "STRING *", "sig_char": "S" },
- "I": { "as_proto": "INTVAL", "sig_char": "I" },
- "N": { "as_proto": "FLOATVAL", "sig_char": "N" },
- "b": { "as_proto": "void *",
- "as_return": "",
- "sig_char": "S",
- "temp_tmpl":"STRING *t_%i",
- "call_param_tmpl": "Buffer_bufstart(t_%i)" },
- "B": { "as_proto": "char **",
- "as_return": "",
- "sig_char": "S",
- "fill_params_tmpl": ", &ts_%i",
- "temp_tmpl": "char *t_%i; STRING *ts_%i",
- "preamble_tmpl": "t_%i = ts_%i ? Parrot_str_to_cstring(interp, ts_%i) : (char *) NULL;",
- "call_param_tmpl": "&t_%i",
- "postamble_tmpl": "if (t_%i) Parrot_str_free_cstring(t_%i);" },
- "2": { "as_proto": "short *",
- "sig_char": "P",
- "return_type": "short",
- "ret_assign": "Parrot_pcc_fill_returns_from_c_args(interp, call_object, \"I\", return_data);",
- "temp_tmpl": "PMC *t_%i; short i_%i",
- "preamble_tmpl": "i_%i = VTABLE_get_integer(interp, t_%i);",
- "call_param_tmpl": "&i_%i",
- "postamble_tmpl": "VTABLE_set_integer_native(interp, t_%i, i_%i);" },
- "3": { "as_proto": "int *",
- "sig_char": "P",
- "return_type": "int",
- "ret_assign": "Parrot_pcc_fill_returns_from_c_args(interp, call_object, \"I\", return_data);",
- "temp_tmpl": "PMC *t_%i; int i_%i",
- "preamble_tmpl": "i_%i = VTABLE_get_integer(interp, t_%i);",
- "call_param_tmpl": "&i_%i",
- "postamble_tmpl": "VTABLE_set_integer_native(interp, t_%i, i_%i);" },
- "4": { "as_proto": "long *",
- "sig_char": "P",
- "return_type": "long",
- "ret_assign": "Parrot_pcc_fill_returns_from_c_args(interp, call_object, \"I\", return_data);",
- "temp_tmpl": "PMC *t_%i; long i_%i",
- "preamble_tmpl": "i_%i = VTABLE_get_integer(interp, t_%i);",
- "call_param_tmpl": "&i_%i",
- "postamble_tmpl": "VTABLE_set_integer_native(interp, t_%i, i_%i);" },
- "L": { "as_proto": "long *", "as_return": "" },
- "T": { "as_proto": "char **", "as_return": "" },
- "V": { "as_proto": "void **",
- "as_return": "",
- "sig_char": "P",
- "temp_tmpl": "PMC *t_%i; void *v_%i",
- "preamble_tmpl": "v_%i = VTABLE_get_pointer(interp, t_%i);",
- "call_param_tmpl": "&v_%i",
- "postamble_tmpl": "VTABLE_set_pointer(interp, t_%i, v_%i);" },
- "@": { "as_proto": "PMC *", "as_return": "", "cname": "xAT_", "sig_char": "Ps" }
-}
-JSON
- .return (retv)
-.end
-
-# }}}
-
-# utility fn's {{{
-
-.sub 'sprintf'
- .param string tmpl
- .param pmc args :slurpy
- $S0 = sprintf tmpl, args
- .return ($S0)
-.end
-
-.sub 'fill_tmpls_ascending_ints'
- .param pmc tmpls
- .local int idx, n
-
- idx = 0
- n = tmpls
- loop:
- if idx >= n goto end_loop
- $S0 = tmpls[idx]
- $I0 = 'printf_arity'($S0)
- $P0 = 'xtimes'(idx, $I0)
- $S1 = sprintf $S0, $P0
- tmpls[idx] = $S1
- inc idx
- goto loop
- end_loop:
-.end
-
-.sub 'printf_arity'
- .param string tmpl
-
- .local int count, idx
- idx = 0
- count = 0
-
- loop:
- idx = index tmpl, '%', idx
- if idx < 0 goto end_loop
-
- # check against '%%' escapes
- $I0 = idx + 1
- $S0 = substr tmpl, $I0, 1
- unless $S0 == '%' goto is_valid_placeholder
- idx = idx + 2 # skip both '%'s
- goto loop
- is_valid_placeholder:
-
- inc idx
- inc count
- goto loop
- end_loop:
-
- .return (count)
-.end
-
-.sub 'xtimes'
- .param pmc what
- .param int times
-
- .local pmc retv
- retv = new ['ResizablePMCArray']
- retv = times
-
- $I0 = 0
- loop:
- if $I0 >= times goto end_loop
- retv[$I0] = what
- inc $I0
- goto loop
- end_loop:
-
- .return (retv)
-.end
-
-.sub 'grep_for_true'
- .param pmc input
- .local pmc output
- .local int i, n
- output = new ['ResizableStringArray']
- i = 0
- n = input
- loop:
- if i >= n goto end_loop
- $S0 = input[i]
- unless $S0 goto end_cond
- push output, $S0
- end_cond:
- inc i
- goto loop
- end_loop:
- .return (output)
-.end
-
-# }}}
-
-# Local Variables:
-# mode: pir
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4 ft=pir:
-
Deleted: branches/boehm_gc_2/tools/build/nativecall.pl
==============================================================================
--- branches/boehm_gc_2/tools/build/nativecall.pl Mon Feb 22 12:30:02 2010 (r44293)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,560 +0,0 @@
-#! perl
-# Copyright (C) 2001-2008, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-tools/build/nativecall.pl - Build up the native call routines
-
-=head1 SYNOPSIS
-
- % perl tools/build/nativecall.pl src/call_list.txt
-
-=head1 DESCRIPTION
-
-This script creates the Native Call Interface file F<src/nci.c>. It
-parses a file of function signatures of the form:
-
- <return-type-specifier><ws><parameter-type-specifiers>[<ws>][#<comment>]
- ...
-Empty lines and lines containing only whitespace or comment are ignored.
-The types specifiers are documented in F<src/call_list.txt>.
-
-=head1 SEE ALSO
-
-F<src/call_list.txt>.
-F<docs/pdds/pdd16_native_call.pod>.
-
-=cut
-
-use strict;
-use warnings;
-
-my $opt_warndups = 0;
-
-# This file will eventually be compiled
-open my $NCI, '>', 'src/nci.c' or die "Can't create nci.c: $!";
-
-print_head( \@ARGV );
-
-
-my %sig_table = (
- p => {
- as_proto => "void *",
- 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" .
- " VTABLE_set_pointer(interp, final_destination, return_data);\n" .
- " }\n" .
- " Parrot_pcc_fill_returns_from_c_args(interp, call_object, \"P\", final_destination);",
- },
- 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 *",
- 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",
- return_type => "void *",
- sig_char => "v",
- ret_assign => "",
- func_call_assign => ""
- },
- P => { as_proto => "PMC *", sig_char => "P" },
- O => { as_proto => "PMC *", returns => "", sig_char => "Pi" },
- J => { as_proto => "PARROT_INTERP", returns => "", sig_char => "" },
- S => { as_proto => "STRING *", sig_char => "S" },
- I => { as_proto => "INTVAL", sig_char => "I" },
- N => { as_proto => "FLOATVAL", sig_char => "N" },
- b => { as_proto => "void *", as_return => "", sig_char => "S" },
- B => { as_proto => "char **", as_return => "", sig_char => "S" },
- # These should be replaced by modifiers in the future
- 2 => { as_proto => "short *", sig_char => "P", return_type => "short",
- ret_assign => 'Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);' },
- 3 => { as_proto => "int *", sig_char => "P", return_type => "int",
- ret_assign => 'Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);' },
- 4 => { as_proto => "long *", sig_char => "P", return_type => "long",
- ret_assign => 'Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);' },
- L => { as_proto => "long *", as_return => "" },
- T => { as_proto => "char **", as_return => "" },
- V => { as_proto => "void **", as_return => "", sig_char => "P" },
- '@' => { as_proto => "PMC *", as_return => "", cname => "xAT_", sig_char => 'Ps' },
-);
-
-for (values %sig_table) {
- if (not exists $_->{as_return}) { $_->{as_return} = $_->{as_proto} }
- if (not exists $_->{return_type}) { $_->{return_type} = $_->{as_proto} }
- if (not exists $_->{ret_assign} and exists $_->{sig_char}) {
- $_->{ret_assign} = 'Parrot_pcc_fill_returns_from_c_args(interp, call_object, "'
- . $_->{sig_char} . '", return_data);';
- }
- if (not exists $_->{func_call_assign}) {
- $_->{func_call_assign} = "return_data = "
- }
-}
-
-
-my $temp_cnt = 0;
-my (@put_pointer, @put_pointer_nci_too, @nci_defs);
-my %seen;
-
-while (<>) {
- chomp;
- s/#.*$//; # comment till end of line
- s/^\s*//;
- s/\s*$//;
- next unless $_;
-
- my ( $ret, $args ) = split m/\s+/, $_;
-
- $args = '' if not defined $args;
-
- die "Invalid return signature char '$ret' on line $. of $ARGV\n"
- unless exists $sig_table{$ret}{ret_assign};
-
- if ( ( $seen{"$ret$args"} ||= $. ) != $. ) {
- warn sprintf "Ignored signature '%s' on line %d (previously seen on line %d) of $ARGV",
- "$ret$args", $., $seen{"$ret$args"}
- if $opt_warndups;
- next;
- }
-
- my @fill_params;
- my @extra_preamble;
- my @extra_postamble;
- my @temps;
- my @arg;
- my $reg_num = 0;
- my $sig = '';
-
- if ( defined $args and not $args =~ m/^\s*$/ ) {
- foreach ( split m//, $args ) {
- die "Invalid argument signature char '$_' on line $. of $ARGV"
- unless exists $sig_table{$_}{sig_char};
- push @arg,
- make_arg( $_, $reg_num++, \$temp_cnt, \@temps, \@fill_params,
- \@extra_preamble, \@extra_postamble );
- $sig .= $sig_table{$_}{sig_char};
- $_ eq 'J' && $reg_num--;
- }
- }
-
- my $ret_sig = $sig_table{$ret};
-
- if ($args =~ /[234V]/) {
- push @nci_defs, create_function(
- $sig, $ret,
- $args, [@arg],
- $ret_sig->{as_return}, $ret_sig->{return_type},
- $ret_sig->{func_call_assign}, $ret_sig->{final_dest},
- $ret_sig->{ret_assign}, \@temps,
- \@fill_params, \@extra_preamble, \@extra_postamble,
- \@put_pointer_nci_too,
- );
- }
- else {
- print {$NCI} create_function(
- $sig, $ret,
- $args, [@arg],
- $ret_sig->{as_return}, $ret_sig->{return_type},
- $ret_sig->{func_call_assign}, $ret_sig->{final_dest},
- $ret_sig->{ret_assign}, \@temps,
- \@fill_params, \@extra_preamble, \@extra_postamble,
- \@put_pointer,
- );
- }
-}
-
-print {$NCI} <<"END_FUNCS";
-
-#endif
- at nci_defs
-
-END_FUNCS
-
-print_tail( \@put_pointer, \@put_pointer_nci_too );
-
-# append the C code coda
-print $NCI <<"EOC";
-
-/*
- * Local variables:
- * c-file-style: "parrot"
- * End:
- * vim: expandtab shiftwidth=4:
- */
-EOC
-
-close $NCI;
-
-sub print_head {
- my ($definitions) = @_;
- print $NCI <<"HEAD";
-/* ex: set ro ft=c:
- * !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
- *
- * This file is generated automatically by tools/build/nativecall.pl
- * from definitions in @$definitions
- *
- * Any changes made here will be lost!
- *
- */
-
-/* nci.c
- * Copyright (C) 2001-2009, Parrot Foundation.
- * SVN Info
- * \$Id\$
- * Overview:
- * Native Call Interface routines. The code needed to build a
- * parrot to C call frame is in here
- * Data Structure and Algorithms:
- * History:
- * Notes:
- * References:
- */
-#include "parrot/parrot.h"
-#include "parrot/hash.h"
-#include "parrot/oplib/ops.h"
-#include "pmc/pmc_managedstruct.h"
-#include "pmc/pmc_nci.h"
-#include "pmc/pmc_pointer.h"
-#include "pmc/pmc_callcontext.h"
-#include "nci.str"
-
-/* HEADERIZER HFILE: none */
-/* HEADERIZER STOP */
-
-/*
- * if the architecture can build some or all of these signatures
- * enable the define below
- * - the JITed function will be called first
- * - if it returns NULL, the hardcoded version will do the job
- */
-
-#include "frame_builder.h"
-
-#ifndef CAN_BUILD_CALL_FRAMES
-/* All our static functions that call in various ways. Yes, terribly
- hackish, but that is just fine */
-
-HEAD
- return;
-}
-
-sub make_arg {
-
- #
- # we have to fetch all to temps, so that the call code
- # can operate in sequence
- #
- my ( $argtype, $reg_num, $temp_cnt_ref, $temps_ref, $fill_params_ref, $extra_preamble_ref, $extra_postamble_ref )
- = @_;
-
- 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";
- return "PMC_IS_NULL((PMC*)t_$temp_num)? (void*)NULL:VTABLE_get_pointer(interp, t_$temp_num)";
- };
- /V/ && do {
- push @{$temps_ref}, "PMC *t_$temp_num;";
- push @{$temps_ref}, "void *v_$temp_num;";
- push @{$fill_params_ref}, "&t_$temp_num";
- push @{$extra_preamble_ref}, "v_$temp_num = VTABLE_get_pointer(interp, t_$temp_num);";
- push @{$extra_postamble_ref}, "VTABLE_set_pointer(interp, t_$temp_num, v_$temp_num);";
- return "&v_$temp_num";
- };
- /[234]/ && do {
- my $ret_type = $sig_table{$_}{return_type};
- push @{$temps_ref}, "PMC *t_$temp_num;";
- push @{$temps_ref}, "$ret_type i_$temp_num;";
- push @{$fill_params_ref}, "&t_$temp_num";
- push @{$extra_preamble_ref}, "i_$temp_num = ($ret_type) VTABLE_get_integer(interp, t_$temp_num);";
- push @{$extra_postamble_ref}, "VTABLE_set_integer_native(interp, t_$temp_num, i_$temp_num);";
- return "&i_$temp_num";
- };
- /t/ && do {
- push @{$temps_ref}, "char *t_$temp_num;";
- push @{$temps_ref}, "STRING *ts_$temp_num;";
- push @{$fill_params_ref}, "&ts_$temp_num";
- push @{$extra_preamble_ref},
- "t_$temp_num = ts_$temp_num ? Parrot_str_to_cstring(interp, ts_$temp_num) : (char *) NULL;";
- push @{$extra_postamble_ref}, "do { if (t_$temp_num) Parrot_str_free_cstring(t_$temp_num); } while (0);";
- return "t_$temp_num";
- };
- /b/ && do {
- push @{$temps_ref}, "STRING *t_$temp_num;";
- push @{$fill_params_ref}, "&t_$temp_num";
- return "Buffer_bufstart(t_$temp_num)";
- };
- /B/ && do {
- push @{$temps_ref}, "char *t_$temp_num;";
- push @{$temps_ref}, "char** v_$temp_num = &t_$temp_num;";
- push @{$temps_ref}, "STRING *ts_$temp_num;";
- push @{$fill_params_ref}, "&ts_$temp_num";
- push @{$extra_preamble_ref},
- "t_$temp_num = ts_$temp_num ? Parrot_str_to_cstring(interp, ts_$temp_num) : (char *) NULL;";
- push @{$extra_postamble_ref}, "do { if (t_$temp_num) Parrot_str_free_cstring(t_$temp_num); } while (0);";
- return "v_$temp_num";
- };
- /J/ && do {
- return "interp";
- };
- return;
-}
-
-sub create_function {
- my (
- $sig, $return, $params, $args,
- $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 = '';
-
- $final_dest ||= "";
-
- 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);
-CALLOBJECT
- my $extra_preamble = join( "\n ", @{$extra_preamble_ref} );
- my $extra_postamble = join( "\n ", @{$extra_postamble_ref} );
- my $return_data_decl =
- "$return_assign $final_assign" =~ /return_data/
- ? qq{$ret_type_decl return_data;}
- : q{};
- my $fix_params = join '', map { $sig_table{$_}{cname} || $_ } split m//, $params;
-
- if ( length $params ) {
- my $proto = join ', ', map { $sig_table{$_}{as_proto} } split( m//, $params );
-
- my $call_params = join( ",", @$args );
- my $fill_params = join( ", ", @$fill_params_ref );
- $fill_params = ", " . $fill_params if($fill_params);
-
- $func = <<"HEADER";
-static void
-pcf_${return}_$fix_params(PARROT_INTERP, PMC *self)
-{
- typedef $ret_type (*func_t)($proto);
- func_t pointer;
- void *orig_func;
- $call_object_decl
- $return_data_decl
- $other_decl
- Parrot_pcc_fill_params_from_c_args(interp, call_object, \"$sig\"$fill_params);
- $extra_preamble
-
- GETATTR_NCI_orig_func(interp, self, orig_func);
- pointer = (func_t)D2FPTR(orig_func);
- $return_assign ($ret_type)(*pointer)($call_params);
- $final_assign
- $extra_postamble
-}
-HEADER
- }
- else {
-
- # Things are more simple, when there are no params
- $func = <<"HEADER";
-static void
-pcf_${return}_(PARROT_INTERP, PMC *self)
-{
- $ret_type (*pointer)(void);
- void *orig_func;
- $return_data_decl
- $other_decl
- $call_object_decl
- $extra_preamble
-
- GETATTR_NCI_orig_func(interp, self, orig_func);
- pointer = ($ret_type (*)(void))D2FPTR(orig_func);
- $return_assign ($ret_type)(*pointer)();
- $final_assign
- $extra_postamble
-}
-HEADER
- }
-
- my ( $key, $value ) = (
- defined $params
- ? ( "$return$params", "pcf_${return}_$fix_params" )
- : ( "$return", "pcf_${return}" )
- );
-
- push @{$put_pointer_ref}, <<"PUT_POINTER";
- temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
- VTABLE_set_pointer(interp, temp_pmc, (void *)$value);
- VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "$key"), temp_pmc);
-PUT_POINTER
-
- # qq| parrot_hash_put( interp, known_frames, const_cast("$key"), $value );|;
-
- return $func;
-}
-
-sub print_tail {
- my ($put_pointer_ref, $put_pointer_nci_ref) = @_;
-
- my $put_pointer = join( "\n", @{$put_pointer_ref} );
- my $put_pointer_nci = join( "\n", @{$put_pointer_nci_ref} );
- print $NCI <<"TAIL";
-
-
-/* This function serves a single purpose. It takes the function
- signature for a C function we want to call and returns a pointer
- to a function that can call it. */
-void *
-build_call_func(PARROT_INTERP,
-#if defined(CAN_BUILD_CALL_FRAMES)
-PMC *pmc_nci, NOTNULL(STRING *signature), NOTNULL(int *jitted))
-#else
-SHIM(PMC *pmc_nci), NOTNULL(STRING *signature), SHIM(int *jitted))
-#endif
-{
- char *c;
- STRING *ns, *message;
- PMC *b;
- PMC *iglobals;
- PMC *temp_pmc;
-
- PMC *HashPointer = NULL;
-
- /* And in here is the platform-independent way. Which is to say
- "here there be hacks" */
-
- /* fixup empty signatures */
- if (STRING_IS_EMPTY(signature))
- signature = CONST_STRING(interp, "v");
-
- iglobals = interp->iglobals;
-
- if (PMC_IS_NULL(iglobals))
- PANIC(interp, "iglobals isn't created yet");
- HashPointer = VTABLE_get_pmc_keyed_int(interp, iglobals,
- IGLOBALS_NCI_FUNCS);
-
- if (!HashPointer) {
- HashPointer = pmc_new(interp, enum_class_Hash);
- VTABLE_set_pmc_keyed_int(interp, iglobals, IGLOBALS_NCI_FUNCS,
- HashPointer);
- }
-
-#if defined(CAN_BUILD_CALL_FRAMES)
- /* Try if JIT code can build that signature. If yes, we are done */
- b = VTABLE_get_pmc_keyed_str(interp, HashPointer, signature);
-
- PARROT_ASSERT(PMC_IS_NULL(b) || b->vtable);
-
- if ((!PMC_IS_NULL(b)) && b->vtable->base_type == enum_class_ManagedStruct) {
- *jitted = 1;
- return F2DPTR(VTABLE_get_pointer(interp, b));
- }
- else {
- int jit_size;
- void * const result = Parrot_jit_build_call_func(interp, pmc_nci, signature, &jit_size);
- if (result) {
- struct jit_buffer_private_data *priv;
- *jitted = 1;
- temp_pmc = pmc_new(interp, enum_class_ManagedStruct);
- VTABLE_set_pointer(interp, temp_pmc, (void *)result);
-#ifdef PARROT_HAS_EXEC_PROTECT
- priv = (struct jit_buffer_private_data *)
- mem_sys_allocate(sizeof(struct jit_buffer_private_data));
- priv->size = jit_size;
- SETATTR_ManagedStruct_custom_free_func(interp, temp_pmc, Parrot_jit_free_buffer);
- SETATTR_ManagedStruct_custom_free_priv(interp, temp_pmc, priv);
- SETATTR_ManagedStruct_custom_clone_func(interp, temp_pmc, Parrot_jit_clone_buffer);
- SETATTR_ManagedStruct_custom_clone_priv(interp, temp_pmc, priv);
-#endif /* PARROT_HAS_EXEC_PROTECT */
- VTABLE_set_pmc_keyed_str(interp, HashPointer, signature, temp_pmc);
- return result;
- }
- }
-
-#endif
-
- b = VTABLE_get_pmc_keyed_str(interp, HashPointer, signature);
-
- if (PMC_IS_NULL(b)) {
-$put_pointer_nci
-#ifndef CAN_BUILD_CALL_FRAMES
-$put_pointer
-#endif
-
- b = VTABLE_get_pmc_keyed_str(interp, HashPointer, signature);
- }
-
- PARROT_ASSERT(PMC_IS_NULL(b) || b->vtable);
-
- if ((!PMC_IS_NULL(b)) && b->vtable->base_type == enum_class_UnManagedStruct)
- return F2DPTR(VTABLE_get_pointer(interp, b));
-
- /*
- These three lines have been added to aid debugging. I want to be able to
- see which signature has an unknown type. I am sure someone can come up
- with a neater way to do this.
- */
- ns = string_make(interp, " is an unknown signature type", 29, "ascii", 0);
- message = Parrot_str_concat(interp, signature, ns, 0);
-
-#if defined(CAN_BUILD_CALL_FRAMES)
- ns = string_make(interp, ".\\nCAN_BUILD_CALL_FRAMES is enabled, this should not happen", 58, "ascii", 0);
-#else
- ns = string_make(interp, ".\\nCAN_BUILD_CALL_FRAMES is disabled, add the signature to src/call_list.txt", 75, "ascii", 0);
-#endif
- message = Parrot_str_concat(interp, message, ns, 0);
-
- /*
- * I think there may be memory issues with this but if we get to here we are
- * aborting.
- */
- c = Parrot_str_to_cstring(interp, message);
- PANIC(interp, c);
-}
-
-TAIL
- return;
-}
-
-=begin example
-
-This is the template thing
-
-static void pcf_$funcname(PARROT_INTERP, PMC *self) {
- $ret_type (*pointer)();
- $ret_type return_data;
-
- return_data = ($ret_type)(*pointer)($params);
- $ret_reg = return_data;
- REG_INT(interp, 0) = $stack_returns;
- REG_INT(interp, 1) = $int_returns;
- REG_INT(interp, 2) = $string_returns;
- REG_INT(interp, 3) = $pmc_returns;
- REG_INT(interp, 4) = $num_returns;
- return;
-}
-
-=cut
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Modified: branches/boehm_gc_2/tools/dev/mk_language_shell.pl
==============================================================================
--- branches/boehm_gc_2/tools/dev/mk_language_shell.pl Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/tools/dev/mk_language_shell.pl Mon Feb 22 12:30:02 2010 (r44294)
@@ -665,10 +665,10 @@
* specify it?
*/
/*
- array_t = pmc_type(INTERP,
+ array_t = Parrot_pmc_get_type_str(INTERP,
string_from_literal(INTERP, "@lang@"));
*/
- property = pmc_new(INTERP, VTABLE_type(INTERP, SELF));
+ property = Parrot_pmc_new(INTERP, VTABLE_type(INTERP, SELF));
VTABLE_set_integer_native(INTERP, property, 1);
VTABLE_set_integer_keyed_int(INTERP, property, 0,
Added: branches/boehm_gc_2/tools/dev/mk_nci_thunks.pl
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/boehm_gc_2/tools/dev/mk_nci_thunks.pl Mon Feb 22 12:30:02 2010 (r44294)
@@ -0,0 +1,41 @@
+#! perl
+# Copyright (C) 2010, Parrot Foundation.
+# $Id$
+
+=head1 NAME
+
+tools/dev/mk_nci_thunks.pl - (re)generate core NCI thunk files
+
+=head1 SYNOPSIS
+
+ > perl tools/dev/mk_nci_thunks.pl
+
+=head1 DESCRIPTION
+
+This script generates the core NCI thunk C files from lists of signatures
+provided in accompanying C<.nci> files.
+
+=cut
+
+use strict;
+use warnings;
+
+foreach (qw( core_thunks extra_thunks )) {
+ my $c_file = "src/nci/$_.c";
+ my $nci_file = "src/nci/$_.nci";
+ my $loader_name = "Parrot_nci_load_$_";
+ print "$nci_file > $c_file\n";
+ system("./parrot tools/dev/nci_thunk_gen.pir " .
+ "--core " .
+ "--loader-name=$loader_name " .
+ "--output=$c_file " .
+ "<$nci_file "
+ );
+}
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
Copied and modified: branches/boehm_gc_2/tools/dev/nci_thunk_gen.pir (from r44275, branches/boehm_gc_2/tools/build/nativecall.pir)
==============================================================================
--- branches/boehm_gc_2/tools/build/nativecall.pir Sun Feb 21 06:45:35 2010 (r44275, copy source)
+++ branches/boehm_gc_2/tools/dev/nci_thunk_gen.pir Mon Feb 22 12:30:02 2010 (r44294)
@@ -3,39 +3,37 @@
=head1 NAME
-tools/build/nativecall.pir - Build up the native call routines
+tools/dev/nci_thunk_gen.pir - Build up native call thunk routines
=head1 SYNOPSIS
- % ./parrot tools/build/nativecall.pir <src/call_list.txt >src/nci.c
+ % ./parrot tools/dev/nci_thunk_gen.pir -o src/nci/extra_thunks.c <src/nci/extra_thunks.nci
=head1 DESCRIPTION
-This script creates the Native Call Interface file F<src/nci.c>. It
-parses a file of function signatures of the form:
+This script creates Native Call Interface files. It parses a file of function
+signatures of the form:
<return-type-specifier><ws><parameter-type-specifiers>[<ws>][#<comment>]
...
Empty lines and lines containing only whitespace or comment are ignored.
-The types specifiers are documented in F<src/call_list.txt>.
+The types specifiers are documented in F<src/nci/extra_thunks.nci>.
=head1 SEE ALSO
-F<src/call_list.txt>.
+F<src/nci/extra_thunks.nci>.
F<docs/pdds/pdd16_native_call.pod>.
=cut
.macro_const VERSION 0.01
-.macro_const SIG_TABLE_GLOBAL_NAME 'signature_table'
.macro_const OPTS_GLOBAL_NAME 'options'
.sub 'main' :main
.param pmc argv
# initialize global variables
- 'gen_sigtable'()
'get_options'(argv)
.local string targ
@@ -44,13 +42,19 @@
.local pmc sigs
sigs = 'read_sigs'()
- if targ == 'head' goto get_targ
- if targ == 'thunks' goto get_targ
- if targ == 'loader' goto get_targ
- if targ == 'coda' goto get_targ
- if targ == 'all' goto all
- if targ == 'names' goto names
- if targ == 'signatures' goto signatures
+ $S0 = 'read_from_opts'('output')
+ $P0 = open $S0, 'w'
+ setstdout $P0
+
+ if targ == 'head' goto get_targ
+ if targ == 'thunks' goto get_targ
+ if targ == 'loader' goto get_targ
+ if targ == 'loader-dynext' goto get_dynext_loader
+ if targ == 'coda' goto get_targ
+ if targ == 'all' goto all
+ if targ == 'all-dynext' goto all_dynext
+ if targ == 'names' goto names
+ if targ == 'signatures' goto signatures
# unknown target
$S0 = 'sprintf'("Unknown target type '%s'", targ)
@@ -67,6 +71,22 @@
say $S0
exit 0
+ all_dynext:
+ $S0 = 'get_head'(sigs)
+ say $S0
+ $S0 = 'get_thunks'(sigs)
+ say $S0
+ $S0 = 'get_dynext_loader'(sigs)
+ say $S0
+ $S0 = 'get_coda'(sigs)
+ say $S0
+ exit 0
+
+ get_dynext_loader:
+ $S0 = 'get_dynext_loader'(sigs)
+ say $S0
+ exit 0
+
get_targ:
$S0 = concat 'get_', targ
$P0 = get_global $S0
@@ -82,11 +102,12 @@
# getopt stuff {{{
+.macro_const OUTPUT 'output'
.macro_const THUNK_STORAGE_CLASS 'thunk-storage-class'
.macro_const THUNK_NAME_PROTO 'thunk-name-proto'
.macro_const LOADER_STORAGE_CLASS 'loader-storage-class'
.macro_const LOADER_NAME 'loader-name'
-
+.macro_const CORE 'core'
.sub 'get_options'
.param pmc argv
@@ -97,6 +118,9 @@
getopt = new ['Getopt';'Obj']
push getopt, 'help|h'
push getopt, 'version|v'
+ push getopt, 'core'
+ push getopt, 'dynext'
+ push getopt, 'output|o=s'
push getopt, 'target=s'
push getopt, 'thunk-storage-class=s'
push getopt, 'thunk-name-proto=s'
@@ -134,11 +158,13 @@
Creates a C file of routines suitable for use as Parrot NCI thunks.
-Usage ./parrot nativecall.pir [options] <input_signature_list.nci >output_c_file.c
+Usage ./parrot nci_thunk_gen.pir [options] -o output_c_file.c <input_signature_list.nci
Options
--help print this message and exit
--version print the version number of this utility
+ --core output a thunks file suitable for inclusion in Parrot core. Default is no.
+ -o --output <file> specify output file to use.
--target <target> select what to output (valid options are 'head', 'thunks',
'loader', 'coda', 'all', 'names', and 'signatures'). Default value is 'all'
--thunk-storage-class <storage class>
@@ -164,6 +190,38 @@
.sub 'fixup_opts'
.param pmc opts
+ $I0 = defined opts['core']
+ if $I0 goto in_core
+ opts['core'] = ''
+ goto end_core
+ in_core:
+ opts['core'] = 'true'
+ end_core:
+
+ $I0 = defined opts['dynext']
+ if $I0 goto is_dynext
+ opts['dynext'] = ''
+ goto end_dynext
+ is_dynext:
+ $I0 = defined opts['target']
+ if $I0 goto end_dynext_target
+ opts['target'] = 'all-dynext'
+ end_dynext_target:
+
+ $I0 = defined opts['loader-storage-class']
+ if $I0 goto end_dynext_loader_storage_class
+ opts['loader-storage-class'] = 'PARROT_DYNEXT_EXPORT'
+ end_dynext_loader_storage_class:
+
+ $I0 = defined opts['loader-name']
+ if $I0 goto end_dynext_loader_name
+ $S0 = opts['output']
+ ($S0, $S1, $S0) = 'file_basename'($S0, '.c')
+ $S0 = 'sprintf'('Parrot_lib_%s_init', $S1)
+ opts['loader-name'] = $S0
+ end_dynext_loader_name:
+ end_dynext:
+
$I0 = defined opts['target']
if $I0 goto end_target
opts['target'] = 'all'
@@ -216,22 +274,40 @@
# }}}
-# get_{head,thunks,loader,coda} {{{
+# get_{head,thunks,loader,dynext_loader,coda} {{{
.sub 'get_head'
.param pmc ignored :slurpy
- .return (<<'HEAD')
+
+ .local string in_core
+ in_core = 'read_from_opts'(.CORE)
+
+ .local string ext_defn
+ ext_defn = ''
+ if in_core goto end_ext_defn
+ ext_defn = '#define PARROT_IN_EXTENSION'
+ end_ext_defn:
+
+ .local string c_file
+ c_file = 'read_from_opts'(.OUTPUT)
+
+ .local string str_file
+ ($S0, str_file, $S0) = 'file_basename'(c_file, '.c')
+ str_file = concat str_file, '.str'
+
+ .local string head
+ head = 'sprintf'(<<'HEAD', c_file, ext_defn, str_file)
/* ex: set ro ft=c:
* !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
*
- * This file is generated automatically by tools/build/nativecall.pir
+ * This file is generated automatically by tools/dev/nci_thunk_gen.pir
*
* Any changes made here will be lost!
*
*/
-/* nci.c
- * Copyright (C) 2001-2009, Parrot Foundation.
+/* %s
+ * Copyright (C) 2010, Parrot Foundation.
* SVN Info
* $Id$
* Overview:
@@ -242,35 +318,29 @@
* Notes:
* References:
*/
+
+%s
#include "parrot/parrot.h"
-#include "parrot/hash.h"
-#include "parrot/oplib/ops.h"
-#include "pmc/pmc_managedstruct.h"
#include "pmc/pmc_nci.h"
-#include "pmc/pmc_pointer.h"
-#include "pmc/pmc_callcontext.h"
-#ifdef PARROT_IN_CORE
-/* external libraries don't have to care about string subsystem */
-# include "nci.str"
+
+#ifdef PARROT_IN_EXTENSION
+/* external libraries can't have strings statically compiled into parrot */
+# define CONST_STRING(i, s) Parrot_str_new_constant((i), (s))
+#else
+# include "%s"
#endif
/* HEADERIZER HFILE: none */
/* HEADERIZER STOP */
-/*
- * if the architecture can build some or all of these signatures
- * enable the define below
- * - the JITed function will be called first
- * - if it returns NULL, the hardcoded version will do the job
- */
-
-#include "frame_builder.h"
-
/* All our static functions that call in various ways. Yes, terribly
hackish, but that is just fine */
+PARROT_DYNEXT_EXPORT void Parrot_glut_nci_loader(PARROT_INTERP);
+
HEAD
+ .return (head)
.end
.sub 'get_thunks'
@@ -305,19 +375,74 @@
%s void
%s(PARROT_INTERP)
{
- PMC *iglobals;
- PMC *temp_pmc;
+ PMC *iglobals;
+ PMC *nci_funcs;
+ PMC *temp_pmc;
+
+ iglobals = interp->iglobals;
+ PARROT_ASSERT(!(PMC_IS_NULL(iglobals)));
+
+ nci_funcs = VTABLE_get_pmc_keyed_int(interp, iglobals,
+ IGLOBALS_NCI_FUNCS);
+ PARROT_ASSERT(!(PMC_IS_NULL(nci_funcs)));
+
+FN_HEADER
+
+ .local int i, n
+ i = 0
+ n = sigs
+ loop:
+ if i >= n goto end_loop
- PMC *HashPointer = NULL;
+ .local pmc sig
+ sig = shift sigs
+
+ .local string fn_name
+ fn_name = 'sig_to_fn_name'(sig :flat)
+
+ .local string key
+ key = join '', sig
+
+ $S0 = 'sprintf'(<<'TEMPLATE', fn_name, key)
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)%s);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "%s"), temp_pmc);
+
+TEMPLATE
+ code = concat code, $S0
+
+ inc i
+ goto loop
+ end_loop:
+
+ code = concat code, <<'FN_FOOTER'
+}
+FN_FOOTER
+
+ .return (code)
+.end
+
+.sub 'get_dynext_loader'
+ .param pmc sigs
+
+ $S0 = 'read_from_opts'(.LOADER_STORAGE_CLASS)
+ $S1 = 'read_from_opts'(.LOADER_NAME)
+ .local string code
+ code = 'sprintf'(<<'FN_HEADER', $S0, $S1)
+
+%s void
+%s(PARROT_INTERP, SHIM(PMC *lib))
+{
+ PMC *iglobals;
+ PMC *nci_funcs;
+ PMC *temp_pmc;
iglobals = interp->iglobals;
- if (PMC_IS_NULL(iglobals))
- PANIC(interp, "iglobals isn't created yet");
+ PARROT_ASSERT(!(PMC_IS_NULL(iglobals)));
- HashPointer = VTABLE_get_pmc_keyed_int(interp, iglobals,
+ nci_funcs = VTABLE_get_pmc_keyed_int(interp, iglobals,
IGLOBALS_NCI_FUNCS);
- if (PMC_IS_NULL(HashPointer))
- PANIC(interp, "iglobals.nci_funcs isn't created yet");
+ PARROT_ASSERT(!(PMC_IS_NULL(nci_funcs)));
FN_HEADER
@@ -337,9 +462,9 @@
key = join '', sig
$S0 = 'sprintf'(<<'TEMPLATE', fn_name, key)
- temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
VTABLE_set_pointer(interp, temp_pmc, (void *)%s);
- VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "%s"), temp_pmc);
+ VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "%s"), temp_pmc);
TEMPLATE
code = concat code, $S0
@@ -471,7 +596,7 @@
.local string preamble
preamble = 'sprintf'(<<'TEMPLATE', sig, fill_params, extra_preamble)
- Parrot_pcc_fill_params_from_c_args(interp, call_object, "%s" %s);
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "%s"%s);
%s
TEMPLATE
@@ -559,7 +684,7 @@
.param string field_name
.local pmc sig_table
- sig_table = get_global .SIG_TABLE_GLOBAL_NAME
+ .const 'Sub' sig_table = 'get_sigtable'
$P0 = split '', sig
@@ -689,101 +814,10 @@
#}}}
-# gen_sigtable {{{
-
-.sub 'gen_sigtable'
- $S0 = 'sigtable_json'()
- $P0 = 'decode_table'($S0)
- 'fixup_table'($P0)
- set_global .SIG_TABLE_GLOBAL_NAME, $P0
-.end
-
-.sub 'decode_table'
- .param string json
-
- .local pmc compiler
- load_bytecode 'data_json.pbc'
- compiler = compreg 'data_json'
-
- .local pmc table
- $P0 = compiler.'compile'(json)
- table = $P0()
-
- .return (table)
-.end
-
-.sub 'fixup_table'
- .param pmc table
-
- .local pmc table_iter
- table_iter = iter table
- iter_loop:
- unless table_iter goto iter_end
-
- .local string k
- .local pmc v
- k = shift table_iter
- v = table[k]
-
- $I0 = exists v['cname']
- if $I0 goto has_cname
- v['cname'] = k
- has_cname:
-
- $I0 = exists v['as_return']
- if $I0 goto has_as_return
- $S0 = v['as_proto']
- v['as_return'] = $S0
- has_as_return:
-
- $I0 = exists v['return_type']
- if $I0 goto has_return_type
- $S0 = v['as_proto']
- v['return_type'] = $S0
- has_return_type:
-
- $I0 = exists v['ret_assign']
- $I1 = exists v['sig_char']
- $I1 = !$I1
- $I0 = $I0 || $I1 # not (not exists v[ret_assign] and exists v[sig_char])
- if $I0 goto has_ret_assign
- $S0 = 'Parrot_pcc_fill_returns_from_c_args(interp, call_object, "'
- $S1 = v['sig_char']
- $S0 = concat $S0, $S1
- $S0 = concat $S0, '", return_data);'
- v['ret_assign'] = $S0
- has_ret_assign:
-
- $I0 = exists v['func_call_assign']
- if $I0 goto has_func_call_assign
- v['func_call_assign'] = 'return_data = '
- has_func_call_assign:
-
- $I0 = exists v['temp_tmpl']
- if $I0 goto has_temp_tmpl
- $S0 = v['return_type']
- $S0 = concat $S0, " t_%i"
- v['temp_tmpl'] = $S0
- has_temp_tmpl:
-
- $I0 = exists v['fill_params_tmpl']
- if $I0 goto has_fill_params_tmpl
- v['fill_params_tmpl'] = ', &t_%i'
- has_fill_params_tmpl:
-
- $I0 = exists v['call_param_tmpl']
- if $I0 goto has_call_param_tmpl
- v['call_param_tmpl'] = 't_%i'
- has_call_param_tmpl:
-
- goto iter_loop
- iter_end:
-
- .return ()
-.end
+# get_sigtable {{{
-.sub 'sigtable_json'
- .const string retv = <<'JSON'
+.sub 'get_sigtable' :anon :immediate
+ .const string json_table = <<'JSON'
{
"p": { "as_proto": "void *",
"final_dest": "PMC * final_destination = PMCNULL;",
@@ -791,7 +825,7 @@
"sig_char": "P",
"call_param_tmpl": "PMC_IS_NULL((PMC*)t_%i) ? (void *)NULL : VTABLE_get_pointer(interp, t_%i)",
"ret_assign": "if (return_data != NULL) {
- final_destination = pmc_new(interp, enum_class_UnManagedStruct);
+ final_destination = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
VTABLE_set_pointer(interp, final_destination, return_data);
}
Parrot_pcc_fill_returns_from_c_args(interp, call_object, \"P\", final_destination);" },
@@ -876,7 +910,82 @@
"@": { "as_proto": "PMC *", "as_return": "", "cname": "xAT_", "sig_char": "Ps" }
}
JSON
- .return (retv)
+
+ # decode table
+ .local pmc compiler
+ load_bytecode 'data_json.pbc'
+ compiler = compreg 'data_json'
+
+ .local pmc table
+ $P0 = compiler.'compile'(json_table)
+ table = $P0()
+
+ # fixup table
+ .local pmc table_iter
+ table_iter = iter table
+ iter_loop:
+ unless table_iter goto iter_end
+
+ .local string k
+ .local pmc v
+ k = shift table_iter
+ v = table[k]
+
+ $I0 = exists v['cname']
+ if $I0 goto has_cname
+ v['cname'] = k
+ has_cname:
+
+ $I0 = exists v['as_return']
+ if $I0 goto has_as_return
+ $S0 = v['as_proto']
+ v['as_return'] = $S0
+ has_as_return:
+
+ $I0 = exists v['return_type']
+ if $I0 goto has_return_type
+ $S0 = v['as_proto']
+ v['return_type'] = $S0
+ has_return_type:
+
+ $I0 = exists v['ret_assign']
+ $I1 = exists v['sig_char']
+ $I1 = !$I1
+ $I0 = $I0 || $I1 # not (not exists v[ret_assign] and exists v[sig_char])
+ if $I0 goto has_ret_assign
+ $S0 = 'Parrot_pcc_fill_returns_from_c_args(interp, call_object, "'
+ $S1 = v['sig_char']
+ $S0 = concat $S0, $S1
+ $S0 = concat $S0, '", return_data);'
+ v['ret_assign'] = $S0
+ has_ret_assign:
+
+ $I0 = exists v['func_call_assign']
+ if $I0 goto has_func_call_assign
+ v['func_call_assign'] = 'return_data = '
+ has_func_call_assign:
+
+ $I0 = exists v['temp_tmpl']
+ if $I0 goto has_temp_tmpl
+ $S0 = v['return_type']
+ $S0 = concat $S0, " t_%i"
+ v['temp_tmpl'] = $S0
+ has_temp_tmpl:
+
+ $I0 = exists v['fill_params_tmpl']
+ if $I0 goto has_fill_params_tmpl
+ v['fill_params_tmpl'] = ', &t_%i'
+ has_fill_params_tmpl:
+
+ $I0 = exists v['call_param_tmpl']
+ if $I0 goto has_call_param_tmpl
+ v['call_param_tmpl'] = 't_%i'
+ has_call_param_tmpl:
+
+ goto iter_loop
+ iter_end:
+
+ .return (table)
.end
# }}}
@@ -970,9 +1079,44 @@
inc i
goto loop
end_loop:
+
.return (output)
.end
+.sub 'file_basename'
+ .param string full_path
+ .param pmc extns :slurpy
+
+ .local string dir, file, extn
+ file = clone full_path
+
+ extn_loop:
+ unless extns goto end_extn_loop
+ $S0 = shift extns
+ $I0 = length $S0
+ $I1 = -$I0
+ $S1 = substr file, $I1, $I0
+ unless $S1 == $S0 goto extn_loop
+ extn = $S1
+ substr file, $I1, $I0, ''
+ end_extn_loop:
+
+ # TODO: make this portable
+ .const string file_sep = '/'
+
+ strip_dir_loop:
+ $I0 = index file, file_sep
+ if $I0 < 0 goto end_strip_dir_loop
+ inc $I0
+ $S0 = substr file, 0, $I0
+ dir = concat dir, $S0
+ file = substr file, $I0
+ goto strip_dir_loop
+ end_strip_dir_loop:
+
+ .return (dir, file, extn)
+.end
+
# }}}
# Local Variables:
Modified: branches/boehm_gc_2/tools/dev/vtablize.pl
==============================================================================
--- branches/boehm_gc_2/tools/dev/vtablize.pl Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/tools/dev/vtablize.pl Mon Feb 22 12:30:02 2010 (r44294)
@@ -63,7 +63,6 @@
s/^(\s*)(PMC\s+\*get_pmc_keyed\(PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
s/^(\s*)(PMC\s+\*get_pmc_keyed_int\(INTVAL\s+\w*\)\s+{)/$1VTABLE $2/;
s/^(\s*)(PMC\s+\*get_pmc_keyed_str\(STRING\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(PMC\s+\*get_bignum\(\)\s+{)/$1VTABLE $2/;
s/^(\s*)(PMC\s+\*slice\(PMC\s+\*\w*,\s+INTVAL\s+\w*\)\s+{)/$1VTABLE $2/;
s/^(\s*)(void\s+\*get_pointer\(\)\s+{)/$1VTABLE $2/;
s/^(\s*)(void\s+\*get_pointer_keyed\(PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
@@ -157,58 +156,12 @@
s/^(\s*)(void\s+i_cmodulus\(PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
s/^(\s*)(void\s+i_cmodulus_int\(INTVAL\s+\w*\)\s+{)/$1VTABLE $2/;
s/^(\s*)(void\s+i_cmodulus_float\(FLOATVAL\s+\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(PMC\s+\*pow\(PMC\s+\*\w*,\s+PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(PMC\s+\*pow_int\(INTVAL\s+\w*,\s+PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(PMC\s+\*pow_float\(FLOATVAL\s+\w*,\s+PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(void\s+i_pow\(PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(void\s+i_pow_int\(INTVAL\s+\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(void\s+i_pow_float\(FLOATVAL\s+\w*\)\s+{)/$1VTABLE $2/;
s/^(\s*)(void\s+increment\(\)\s+{)/$1VTABLE $2/;
s/^(\s*)(void\s+decrement\(\)\s+{)/$1VTABLE $2/;
s/^(\s*)(PMC\s+\*absolute\(PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
s/^(\s*)(void\s+i_absolute\(\)\s+{)/$1VTABLE $2/;
s/^(\s*)(PMC\s+\*neg\(PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
s/^(\s*)(void\s+i_neg\(\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(PMC\s+\*bitwise_or\(PMC\s+\*\w*,\s+PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(PMC\s+\*bitwise_or_int\(INTVAL\s+\w*,\s+PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(void\s+i_bitwise_or\(PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(void\s+i_bitwise_or_int\(INTVAL\s+\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(PMC\s+\*bitwise_xor\(PMC\s+\*\w*,\s+PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(PMC\s+\*bitwise_xor_int\(INTVAL\s+\w*,\s+PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(void\s+i_bitwise_xor\(PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(void\s+i_bitwise_xor_int\(INTVAL\s+\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(PMC\s+\*bitwise_ors\(PMC\s+\*\w*,\s+PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(PMC\s+\*bitwise_ors_str\(STRING\s+\*\w*,\s+PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(void\s+i_bitwise_ors\(PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(void\s+i_bitwise_ors_str\(STRING\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(PMC\s+\*bitwise_xors\(PMC\s+\*\w*,\s+PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(PMC\s+\*bitwise_xors_str\(STRING\s+\*\w*,\s+PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(void\s+i_bitwise_xors\(PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(void\s+i_bitwise_xors_str\(STRING\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(PMC\s+\*bitwise_and\(PMC\s+\*\w*,\s+PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(PMC\s+\*bitwise_and_int\(INTVAL\s+\w*,\s+PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(void\s+i_bitwise_and\(PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(void\s+i_bitwise_and_int\(INTVAL\s+\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(PMC\s+\*bitwise_ands\(PMC\s+\*\w*,\s+PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(PMC\s+\*bitwise_ands_str\(STRING\s+\*\w*,\s+PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(void\s+i_bitwise_ands\(PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(void\s+i_bitwise_ands_str\(STRING\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(PMC\s+\*bitwise_not\(PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(void\s+i_bitwise_not\(\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(PMC\s+\*bitwise_nots\(PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(void\s+i_bitwise_nots\(\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(PMC\s+\*bitwise_shl\(PMC\s+\*\w*,\s+PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(PMC\s+\*bitwise_shl_int\(INTVAL\s+\w*,\s+PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(void\s+i_bitwise_shl\(PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(void\s+i_bitwise_shl_int\(INTVAL\s+\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(PMC\s+\*bitwise_shr\(PMC\s+\*\w*,\s+PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(PMC\s+\*bitwise_shr_int\(INTVAL\s+\w*,\s+PMC\s+\*\w*\)\s\s+{)/$1VTABLE $2/;
-s/^(\s*)(void\s+i_bitwise_shr\(PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(void\s+i_bitwise_shr_int\(INTVAL\s+\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(PMC\s+\*bitwise_lsr\(PMC\s+\*\w*,\s+PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(PMC\s+\*bitwise_lsr_int\(INTVAL\s+\w*,\s+PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(void\s+i_bitwise_lsr\(PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
-s/^(\s*)(void\s+i_bitwise_lsr_int\(INTVAL\s+\w*\)\s+{)/$1VTABLE $2/;
s/^(\s*)(INTVAL\s+is_equal\(PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
s/^(\s*)(INTVAL\s+is_equal_num\(PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
s/^(\s*)(INTVAL\s+is_equal_string\(PMC\s+\*\w*\)\s+{)/$1VTABLE $2/;
Modified: branches/boehm_gc_2/tools/util/release.json
==============================================================================
--- branches/boehm_gc_2/tools/util/release.json Mon Feb 22 10:17:08 2010 (r44293)
+++ branches/boehm_gc_2/tools/util/release.json Mon Feb 22 12:30:02 2010 (r44294)
@@ -2,8 +2,8 @@
"release.version" : "2.0.0",
"release.name" : "Inevitable",
"release.day" : "Tuesday",
- "release.date" : "19 January 2010",
- "release.nextdate" : "16 Februuary 2010",
+ "release.date" : "16 Februuary 2010",
+ "release.nextdate" : "16 March 2010",
"web.root" : "http://parrot.org/",
"web.source" : "download",
@@ -11,13 +11,13 @@
"web.repository" : "https://svn.parrot.org/parrot/trunk/",
"bugday.day" : "Saturday",
- "bugday.date" : "14 February 2010",
+ "bugday.date" : "13 March 2010",
"wiki.root" : "https://trac.parrot.org/parrot/wiki/",
- "wiki.bugday" : "bug_day_2010_02_14",
+ "wiki.bugday" : "bug_day_2010_03_13",
"cpan.search" : "http://search.cpan.org/dist/parrot",
- "ftp.path" : "ftp://ftp.parrot.org/pub/parrot/releases/stable/2.0.0/",
+ "ftp.path" : "ftp://ftp.parrot.org/pub/parrot/devel/stable/2.1.0/",
"subversion.root" : "http://subversion.tigris.org/",
"svk.root" : "http://svk.bestpractical.com/"
}
More information about the parrot-commits
mailing list