[svn:parrot] r46471 - in branches/codestring: . compilers/imcc config/auto/zlib docs/book/pct examples/nci examples/sdl/lcd include/parrot lib/Parrot ports/fedora/2.3.0 ports/suse/2.2.0 runtime/parrot/library src src/call src/gc src/interp src/ops src/runcore src/string src/string/charset t/compilers/imcc/imcpasm t/compilers/imcc/syn t/oo t/op t/pmc t/src tools/dev
coke at svn.parrot.org
coke at svn.parrot.org
Mon May 10 13:15:54 UTC 2010
Author: coke
Date: Mon May 10 13:15:51 2010
New Revision: 46471
URL: https://trac.parrot.org/parrot/changeset/46471
Log:
merge latest changes from trunk
Modified:
branches/codestring/ (props changed)
branches/codestring/.gitignore
branches/codestring/DEPRECATED.pod
branches/codestring/compilers/imcc/cfg.c
branches/codestring/compilers/imcc/cfg.h
branches/codestring/compilers/imcc/debug.c
branches/codestring/compilers/imcc/debug.h
branches/codestring/compilers/imcc/imc.h
branches/codestring/compilers/imcc/imcc.l
branches/codestring/compilers/imcc/imcc.y
branches/codestring/compilers/imcc/imclexer.c
branches/codestring/compilers/imcc/imcparser.c
branches/codestring/compilers/imcc/imcparser.h
branches/codestring/compilers/imcc/instructions.c
branches/codestring/compilers/imcc/instructions.h
branches/codestring/compilers/imcc/main.c
branches/codestring/compilers/imcc/parser.h
branches/codestring/compilers/imcc/parser_util.c
branches/codestring/compilers/imcc/pbc.c
branches/codestring/compilers/imcc/pcc.c
branches/codestring/compilers/imcc/reg_alloc.c
branches/codestring/compilers/imcc/symreg.c
branches/codestring/compilers/imcc/symreg.h
branches/codestring/compilers/imcc/unit.h
branches/codestring/config/auto/zlib/ (props changed)
branches/codestring/docs/book/pct/ch03_compiler_tools.pod
branches/codestring/examples/nci/sdl_blue_rectangle.pir
branches/codestring/examples/sdl/lcd/clock.pir
branches/codestring/include/parrot/context.h
branches/codestring/include/parrot/dynext.h
branches/codestring/include/parrot/embed.h
branches/codestring/include/parrot/hash.h
branches/codestring/include/parrot/packfile.h
branches/codestring/include/parrot/runcore_trace.h (props changed)
branches/codestring/lib/Parrot/Headerizer.pm
branches/codestring/lib/Parrot/Test.pm
branches/codestring/ports/fedora/2.3.0/ (props changed)
branches/codestring/ports/suse/2.2.0/ (props changed)
branches/codestring/runtime/parrot/library/libpcre.pir
branches/codestring/src/call/args.c
branches/codestring/src/call/context.c
branches/codestring/src/call/context_accessors.c
branches/codestring/src/dynext.c
branches/codestring/src/embed.c
branches/codestring/src/gc/alloc_resources.c
branches/codestring/src/hash.c
branches/codestring/src/interp/inter_create.c (props changed)
branches/codestring/src/ops/core.ops
branches/codestring/src/packfile.c
branches/codestring/src/runcore/cores.c (props changed)
branches/codestring/src/runcore/trace.c (props changed)
branches/codestring/src/string/api.c
branches/codestring/src/string/charset/ascii.c
branches/codestring/src/string/charset/iso-8859-1.c
branches/codestring/src/string/charset/unicode.c
branches/codestring/t/compilers/imcc/imcpasm/opt0.t
branches/codestring/t/compilers/imcc/imcpasm/optc.t
branches/codestring/t/compilers/imcc/syn/clash.t
branches/codestring/t/compilers/imcc/syn/pcc.t
branches/codestring/t/compilers/imcc/syn/regressions.t
branches/codestring/t/oo/metamodel.t
branches/codestring/t/op/calling.t
branches/codestring/t/op/lexicals.t
branches/codestring/t/pmc/class.t
branches/codestring/t/pmc/eval.t
branches/codestring/t/pmc/resizablepmcarray.t
branches/codestring/t/src/embed.t (props changed)
branches/codestring/tools/dev/mk_gitignore.pl (contents, props changed)
Modified: branches/codestring/.gitignore
==============================================================================
--- branches/codestring/.gitignore Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/.gitignore Mon May 10 13:15:51 2010 (r46471)
@@ -1,584 +1,589 @@
# ex: set ro:
-# $Id$
-# generated by tools/dev/mk_gitignore.pl Sat May 8 12:30:31 2010 UT
+# $Id
+# generated by tools/dev/mk_manifest_and_skip.pl Tue May 4 14:32:03 2010 UT
#
# This file should contain a transcript of the svn:ignore properties
-# of the directories in the Parrot subversion repository.
-# The .gitignore file is a convenience for developers working with git-svn.
-# See http://www.kernel.org/pub/software/scm/git/docs/gitignore.html for the
-# format of this file.
+# of the directories in the Parrot subversion repository. (Needed for
+# distributions or in general when svn is not available).
+# See docs/submissions.pod on how to recreate this file after SVN
+# has been told about new generated files.
#
+# Ignore the SVN directories
+\B.svn\b
+
+# ports/ should not go into release tarballs
+ports
# generated from svn:ignore of './'
-/*.core
-/*.def
-/*.exe
-/*.exp
-/*.ilk
-/*.lib
-/*.manifest
-/*.ncb
-/*.o
-/*.obj
-/*.patch
-/*.pdb
-/*.sln
-/*.sto
-/*.suo
-/*.tmp
-/*.vcproj*
-/.git
-/.parrot_current_rev
-/CFLAGS
-/MANIFEST.configure.generated
-/Makefile
-/TAGS
-/all_cstring.str
-/blib
-/config_lib.pir
-/cover_db
-/install_config.fpmc
-/installable*
-/libparrot.def
-/libparrot.dll
-/miniparrot
-/myconfig
-/parrot
-/parrot-nqp
-/parrot-nqp.c
-/parrot-nqp.pbc
-/parrot.ilk
-/parrot.iss
-/parrot.pc
-/parrot.pdb
-/parrot_config
-/parrot_config.c
-/parrot_config.pbc
-/parrot_debugger
-/parrot_nci_thunk_gen
-/parrot_nci_thunk_gen.c
-/parrot_nci_thunk_gen.pbc
-/parrot_test_run.tar.gz
-/pbc_disassemble
-/pbc_dump
-/pbc_info
-/pbc_merge
-/pbc_to_exe
-/pbc_to_exe.*
-/perl6
-/pirc
-/tags
-/tapir
-/tapir.*
-/temp.file
-/test
-/test.c
-/test.cco
-/test.err
-/test.ilk
-/test.ldo
-/test.out
-/test.pdb
-/vc60.pdb
-/vc70.pdb
-/vtable.dump
+*.core
+*.def
+*.exe
+*.exp
+*.ilk
+*.lib
+*.manifest
+*.ncb
+*.o
+*.obj
+*.patch
+*.pdb
+*.sln
+*.sto
+*.suo
+*.tmp
+*.vcproj*
+.git
+.parrot_current_rev
+CFLAGS
+MANIFEST.configure.generated
+Makefile
+TAGS
+all_cstring.str
+blib
+config_lib.pir
+cover_db
+install_config.fpmc
+installable*
+libparrot.def
+libparrot.dll
+miniparrot
+myconfig
+parrot
+parrot-nqp
+parrot-nqp.c
+parrot-nqp.pbc
+parrot.ilk
+parrot.iss
+parrot.pc
+parrot.pdb
+parrot_config
+parrot_config.c
+parrot_config.pbc
+parrot_debugger
+parrot_nci_thunk_gen
+parrot_nci_thunk_gen.c
+parrot_nci_thunk_gen.pbc
+parrot_test_run.tar.gz
+pbc_disassemble
+pbc_dump
+pbc_info
+pbc_merge
+pbc_to_exe
+pbc_to_exe.*
+perl6
+pirc
+tags
+tapir
+tapir.*
+temp.file
+test
+test.c
+test.cco
+test.err
+test.ilk
+test.ldo
+test.out
+test.pdb
+vc60.pdb
+vc70.pdb
+vtable.dump
# generated from svn:ignore of 'compilers/data_json/'
-/compilers/data_json/data_json.pbc
+compilers/data_json/data_json.pbc
# generated from svn:ignore of 'compilers/data_json/data_json/'
-/compilers/data_json/data_json/*.pbc
-/compilers/data_json/data_json/*.pir
+compilers/data_json/data_json/*.pbc
+compilers/data_json/data_json/*.pir
# generated from svn:ignore of 'compilers/imcc/'
-/compilers/imcc/*.flag
-/compilers/imcc/*.o
-/compilers/imcc/*.obj
-/compilers/imcc/*.tmp
-/compilers/imcc/Rules.mak
-/compilers/imcc/imcc
-/compilers/imcc/imclexer.c
-/compilers/imcc/imcparser.c
-/compilers/imcc/imcparser.h
-/compilers/imcc/imcparser.output
+compilers/imcc/*.flag
+compilers/imcc/*.o
+compilers/imcc/*.obj
+compilers/imcc/*.tmp
+compilers/imcc/Rules.mak
+compilers/imcc/imcc
+compilers/imcc/imclexer.c
+compilers/imcc/imcparser.c
+compilers/imcc/imcparser.h
+compilers/imcc/imcparser.output
# generated from svn:ignore of 'compilers/pct/src/PAST/'
-/compilers/pct/src/PAST/*.pbc
+compilers/pct/src/PAST/*.pbc
# generated from svn:ignore of 'compilers/pct/src/PCT/'
-/compilers/pct/src/PCT/*.pbc
+compilers/pct/src/PCT/*.pbc
# generated from svn:ignore of 'compilers/pct/src/POST/'
-/compilers/pct/src/POST/*.pbc
-/compilers/pct/src/POST/Grammar_gen.pir
+compilers/pct/src/POST/*.pbc
+compilers/pct/src/POST/Grammar_gen.pir
# generated from svn:ignore of 'compilers/pge/'
-/compilers/pge/PGE.pbc
+compilers/pge/PGE.pbc
# generated from svn:ignore of 'compilers/pge/PGE/'
-/compilers/pge/PGE/*.dll
-/compilers/pge/PGE/builtins_gen.pir
+compilers/pge/PGE/*.dll
+compilers/pge/PGE/builtins_gen.pir
# generated from svn:ignore of 'compilers/pirc/'
-/compilers/pirc/*.o
-/compilers/pirc/*.obj
-/compilers/pirc/*.pbd
-/compilers/pirc/pirc
-/compilers/pirc/pirc.exe
+compilers/pirc/*.o
+compilers/pirc/*.obj
+compilers/pirc/*.pbd
+compilers/pirc/pirc
+compilers/pirc/pirc.exe
# generated from svn:ignore of 'compilers/pirc/t/'
-/compilers/pirc/t/basic_?.pir
-/compilers/pirc/t/basic_??.pir
-/compilers/pirc/t/heredoc_?.pir
-/compilers/pirc/t/macro_?.pir
-/compilers/pirc/t/stmts_?.pir
-/compilers/pirc/t/subflags_?.pir
+compilers/pirc/t/basic_?.pir
+compilers/pirc/t/basic_??.pir
+compilers/pirc/t/heredoc_?.pir
+compilers/pirc/t/macro_?.pir
+compilers/pirc/t/stmts_?.pir
+compilers/pirc/t/subflags_?.pir
# generated from svn:ignore of 'compilers/tge/'
-/compilers/tge/tgc.pbc
+compilers/tge/tgc.pbc
# generated from svn:ignore of 'compilers/tge/TGE/'
-/compilers/tge/TGE/Parser.pir
+compilers/tge/TGE/Parser.pir
# generated from svn:ignore of 'docs/'
-/docs/*.tmp
-/docs/Makefile
-/docs/build
-/docs/doc-prep
-/docs/html
-/docs/packfile-c.pod
-/docs/packfile-perl.pod
+docs/*.tmp
+docs/Makefile
+docs/build
+docs/doc-prep
+docs/html
+docs/packfile-c.pod
+docs/packfile-perl.pod
# generated from svn:ignore of 'docs/book/'
-/docs/book/*.html
+docs/book/*.html
# generated from svn:ignore of 'docs/ops/'
-/docs/ops/*.pod
+docs/ops/*.pod
# generated from svn:ignore of 'editor/'
-/editor/Makefile
-/editor/imc.vim
-/editor/imcc.xml
-/editor/pir.vim
+editor/Makefile
+editor/imc.vim
+editor/imcc.xml
+editor/pir.vim
# generated from svn:ignore of 'examples/languages/abc/'
-/examples/languages/abc/*.c
-/examples/languages/abc/*.exe
-/examples/languages/abc/*.iss
-/examples/languages/abc/*.o
-/examples/languages/abc/*.obj
-/examples/languages/abc/*.pbc
-/examples/languages/abc/MANIFEST
-/examples/languages/abc/abc
-/examples/languages/abc/installable_abc
-/examples/languages/abc/man
+examples/languages/abc/*.c
+examples/languages/abc/*.exe
+examples/languages/abc/*.iss
+examples/languages/abc/*.o
+examples/languages/abc/*.obj
+examples/languages/abc/*.pbc
+examples/languages/abc/MANIFEST
+examples/languages/abc/abc
+examples/languages/abc/installable_abc
+examples/languages/abc/man
# generated from svn:ignore of 'examples/languages/abc/src/'
-/examples/languages/abc/src/gen_actions.pir
-/examples/languages/abc/src/gen_builtins.pir
-/examples/languages/abc/src/gen_grammar.pir
+examples/languages/abc/src/gen_actions.pir
+examples/languages/abc/src/gen_builtins.pir
+examples/languages/abc/src/gen_grammar.pir
# generated from svn:ignore of 'examples/languages/abc/t/'
-/examples/languages/abc/t/*_*.out
-/examples/languages/abc/t/*_*.pir
+examples/languages/abc/t/*_*.out
+examples/languages/abc/t/*_*.pir
# generated from svn:ignore of 'examples/languages/squaak/'
-/examples/languages/squaak/*.c
-/examples/languages/squaak/*.exe
-/examples/languages/squaak/*.iss
-/examples/languages/squaak/*.o
-/examples/languages/squaak/*.obj
-/examples/languages/squaak/*.pbc
-/examples/languages/squaak/MANIFEST
-/examples/languages/squaak/installable_squaak
-/examples/languages/squaak/squaak
+examples/languages/squaak/*.c
+examples/languages/squaak/*.exe
+examples/languages/squaak/*.iss
+examples/languages/squaak/*.o
+examples/languages/squaak/*.obj
+examples/languages/squaak/*.pbc
+examples/languages/squaak/MANIFEST
+examples/languages/squaak/installable_squaak
+examples/languages/squaak/squaak
# generated from svn:ignore of 'examples/languages/squaak/src/'
-/examples/languages/squaak/src/gen_*.pir
+examples/languages/squaak/src/gen_*.pir
# generated from svn:ignore of 'examples/mops/'
-/examples/mops/*.o
-/examples/mops/mops
+examples/mops/*.o
+examples/mops/mops
# generated from svn:ignore of 'examples/nci/'
-/examples/nci/*.pbc
+examples/nci/*.pbc
# generated from svn:ignore of 'examples/pasm/'
-/examples/pasm/hello
-/examples/pasm/hello.o
-/examples/pasm/hello.pbc
+examples/pasm/hello
+examples/pasm/hello.o
+examples/pasm/hello.pbc
# generated from svn:ignore of 'examples/pir/befunge/'
-/examples/pir/befunge/*.c
-/examples/pir/befunge/*.exe
-/examples/pir/befunge/*.iss
-/examples/pir/befunge/*.o
-/examples/pir/befunge/*.obj
-/examples/pir/befunge/*.pbc
-/examples/pir/befunge/MANIFEST
-/examples/pir/befunge/befunge
-/examples/pir/befunge/installable_befunge
+examples/pir/befunge/*.c
+examples/pir/befunge/*.exe
+examples/pir/befunge/*.iss
+examples/pir/befunge/*.o
+examples/pir/befunge/*.obj
+examples/pir/befunge/*.pbc
+examples/pir/befunge/MANIFEST
+examples/pir/befunge/befunge
+examples/pir/befunge/installable_befunge
# generated from svn:ignore of 'ext/'
-/ext/Makefile
+ext/Makefile
# generated from svn:ignore of 'ext/Parrot-Embed/'
-/ext/Parrot-Embed/*.bs
-/ext/Parrot-Embed/*.bundle
-/ext/Parrot-Embed/*.c
-/ext/Parrot-Embed/*.def
-/ext/Parrot-Embed/*.dll
-/ext/Parrot-Embed/*.dump
-/ext/Parrot-Embed/*.dylib
-/ext/Parrot-Embed/*.exe
-/ext/Parrot-Embed/*.exp
-/ext/Parrot-Embed/*.h
-/ext/Parrot-Embed/*.ilk
-/ext/Parrot-Embed/*.lib
-/ext/Parrot-Embed/*.manifest
-/ext/Parrot-Embed/*.o
-/ext/Parrot-Embed/*.obj
-/ext/Parrot-Embed/*.old
-/ext/Parrot-Embed/*.pdb
-/ext/Parrot-Embed/*.pdb
-/ext/Parrot-Embed/*.so
-/ext/Parrot-Embed/*.tmp
-/ext/Parrot-Embed/*.xs
-/ext/Parrot-Embed/Build
-/ext/Parrot-Embed/Build.bat
-/ext/Parrot-Embed/Makefile
-/ext/Parrot-Embed/Makefile.PL
-/ext/Parrot-Embed/_build
-/ext/Parrot-Embed/blib
-/ext/Parrot-Embed/dll.base
-/ext/Parrot-Embed/pm_to_blib
+ext/Parrot-Embed/*.bs
+ext/Parrot-Embed/*.bundle
+ext/Parrot-Embed/*.c
+ext/Parrot-Embed/*.def
+ext/Parrot-Embed/*.dll
+ext/Parrot-Embed/*.dump
+ext/Parrot-Embed/*.dylib
+ext/Parrot-Embed/*.exe
+ext/Parrot-Embed/*.exp
+ext/Parrot-Embed/*.h
+ext/Parrot-Embed/*.ilk
+ext/Parrot-Embed/*.lib
+ext/Parrot-Embed/*.manifest
+ext/Parrot-Embed/*.o
+ext/Parrot-Embed/*.obj
+ext/Parrot-Embed/*.old
+ext/Parrot-Embed/*.pdb
+ext/Parrot-Embed/*.pdb
+ext/Parrot-Embed/*.so
+ext/Parrot-Embed/*.tmp
+ext/Parrot-Embed/*.xs
+ext/Parrot-Embed/Build
+ext/Parrot-Embed/Build.bat
+ext/Parrot-Embed/Makefile
+ext/Parrot-Embed/Makefile.PL
+ext/Parrot-Embed/_build
+ext/Parrot-Embed/blib
+ext/Parrot-Embed/dll.base
+ext/Parrot-Embed/pm_to_blib
# generated from svn:ignore of 'ext/Parrot-Embed/lib/Parrot/'
-/ext/Parrot-Embed/lib/Parrot/*.c
-/ext/Parrot-Embed/lib/Parrot/*.obj
+ext/Parrot-Embed/lib/Parrot/*.c
+ext/Parrot-Embed/lib/Parrot/*.obj
# generated from svn:ignore of 'ext/Parrot-Embed/t/'
-/ext/Parrot-Embed/t/*.pbc
+ext/Parrot-Embed/t/*.pbc
# generated from svn:ignore of 'include/parrot/'
-/include/parrot/*.tmp
-/include/parrot/config.h
-/include/parrot/core_pmcs.h
-/include/parrot/extend_vtable.h
-/include/parrot/feature.h
-/include/parrot/has_header.h
-/include/parrot/opsenum.h
-/include/parrot/pbcversion.h
-/include/parrot/platform.h
-/include/parrot/platform_interface.h
-/include/parrot/platform_limits.h
-/include/parrot/vtable.h
+include/parrot/*.tmp
+include/parrot/config.h
+include/parrot/core_pmcs.h
+include/parrot/extend_vtable.h
+include/parrot/feature.h
+include/parrot/has_header.h
+include/parrot/opsenum.h
+include/parrot/pbcversion.h
+include/parrot/platform.h
+include/parrot/platform_interface.h
+include/parrot/platform_limits.h
+include/parrot/vtable.h
# generated from svn:ignore of 'include/parrot/oplib/'
-/include/parrot/oplib/*_ops.h
-/include/parrot/oplib/*_ops_cg*.h
-/include/parrot/oplib/*_ops_switch.h
-/include/parrot/oplib/ops.h
+include/parrot/oplib/*_ops.h
+include/parrot/oplib/*_ops_cg*.h
+include/parrot/oplib/*_ops_switch.h
+include/parrot/oplib/ops.h
# generated from svn:ignore of 'include/pmc/'
-/include/pmc/*.h
+include/pmc/*.h
# generated from svn:ignore of 'lib/'
-/lib/DumbLink.pm
+lib/DumbLink.pm
# generated from svn:ignore of 'lib/Parrot/'
-/lib/Parrot/*.tmp
-/lib/Parrot/Jit.pm
-/lib/Parrot/Makefile
-/lib/Parrot/OpLib
-/lib/Parrot/PMC.pm
-/lib/Parrot/PakFile2.bs
-/lib/Parrot/PakFile2.c
-/lib/Parrot/blib
-/lib/Parrot/pm_to_blib
+lib/Parrot/*.tmp
+lib/Parrot/Jit.pm
+lib/Parrot/Makefile
+lib/Parrot/OpLib
+lib/Parrot/PMC.pm
+lib/Parrot/PakFile2.bs
+lib/Parrot/PakFile2.c
+lib/Parrot/blib
+lib/Parrot/pm_to_blib
# generated from svn:ignore of 'lib/Parrot/Config/'
-/lib/Parrot/Config/Generated.pm
+lib/Parrot/Config/Generated.pm
# generated from svn:ignore of 'lib/Parrot/Pmc2c/'
-/lib/Parrot/Pmc2c/PCCMETHOD_BITS.pm
+lib/Parrot/Pmc2c/PCCMETHOD_BITS.pm
# generated from svn:ignore of 'runtime/parrot/dynext/'
-/runtime/parrot/dynext/*.bundle
-/runtime/parrot/dynext/*.def
-/runtime/parrot/dynext/*.dll
-/runtime/parrot/dynext/*.dylib
-/runtime/parrot/dynext/*.exe
-/runtime/parrot/dynext/*.exp
-/runtime/parrot/dynext/*.ilk
-/runtime/parrot/dynext/*.lib
-/runtime/parrot/dynext/*.manifest
-/runtime/parrot/dynext/*.obj
-/runtime/parrot/dynext/*.pdb
-/runtime/parrot/dynext/*.so
-/runtime/parrot/dynext/libnci.*
+runtime/parrot/dynext/*.bundle
+runtime/parrot/dynext/*.def
+runtime/parrot/dynext/*.dll
+runtime/parrot/dynext/*.dylib
+runtime/parrot/dynext/*.exe
+runtime/parrot/dynext/*.exp
+runtime/parrot/dynext/*.ilk
+runtime/parrot/dynext/*.lib
+runtime/parrot/dynext/*.manifest
+runtime/parrot/dynext/*.obj
+runtime/parrot/dynext/*.pdb
+runtime/parrot/dynext/*.so
+runtime/parrot/dynext/libnci.*
# generated from svn:ignore of 'runtime/parrot/include/'
-/runtime/parrot/include/*.fpmc
-/runtime/parrot/include/*.pasm
-/runtime/parrot/include/*.pbc
+runtime/parrot/include/*.fpmc
+runtime/parrot/include/*.pasm
+runtime/parrot/include/*.pbc
# generated from svn:ignore of 'runtime/parrot/languages/'
-/runtime/parrot/languages/data_json
+runtime/parrot/languages/data_json
# generated from svn:ignore of 'runtime/parrot/library/'
-/runtime/parrot/library/*.pbc
-/runtime/parrot/library/OpenGL_funcs.pir
-/runtime/parrot/library/PAST
-/runtime/parrot/library/config.pir
+runtime/parrot/library/*.pbc
+runtime/parrot/library/OpenGL_funcs.pir
+runtime/parrot/library/PAST
+runtime/parrot/library/config.pir
# generated from svn:ignore of 'runtime/parrot/library/Archive/'
-/runtime/parrot/library/Archive/*.pbc
+runtime/parrot/library/Archive/*.pbc
# generated from svn:ignore of 'runtime/parrot/library/CGI/'
-/runtime/parrot/library/CGI/*.pbc
+runtime/parrot/library/CGI/*.pbc
# generated from svn:ignore of 'runtime/parrot/library/Config/'
-/runtime/parrot/library/Config/*.pbc
+runtime/parrot/library/Config/*.pbc
# generated from svn:ignore of 'runtime/parrot/library/Configure/'
-/runtime/parrot/library/Configure/*.pbc
+runtime/parrot/library/Configure/*.pbc
# generated from svn:ignore of 'runtime/parrot/library/Data/'
-/runtime/parrot/library/Data/*.pbc
+runtime/parrot/library/Data/*.pbc
# generated from svn:ignore of 'runtime/parrot/library/Data/Dumper/'
-/runtime/parrot/library/Data/Dumper/*.pbc
+runtime/parrot/library/Data/Dumper/*.pbc
# generated from svn:ignore of 'runtime/parrot/library/Digest/'
-/runtime/parrot/library/Digest/*.pbc
+runtime/parrot/library/Digest/*.pbc
# generated from svn:ignore of 'runtime/parrot/library/Getopt/'
-/runtime/parrot/library/Getopt/Obj.pbc
+runtime/parrot/library/Getopt/Obj.pbc
# generated from svn:ignore of 'runtime/parrot/library/MIME/'
-/runtime/parrot/library/MIME/*.pbc
+runtime/parrot/library/MIME/*.pbc
# 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/NCI/'
-/runtime/parrot/library/NCI/*.pbc
+runtime/parrot/library/NCI/*.pbc
# generated from svn:ignore of 'runtime/parrot/library/OpenGL/'
-/runtime/parrot/library/OpenGL/*.pbc
+runtime/parrot/library/OpenGL/*.pbc
# generated from svn:ignore of 'runtime/parrot/library/PCT/'
-/runtime/parrot/library/PCT/*.pbc
+runtime/parrot/library/PCT/*.pbc
# generated from svn:ignore of 'runtime/parrot/library/PGE/'
-/runtime/parrot/library/PGE/*.pbc
+runtime/parrot/library/PGE/*.pbc
# generated from svn:ignore of 'runtime/parrot/library/Parrot/'
-/runtime/parrot/library/Parrot/*.pbc
+runtime/parrot/library/Parrot/*.pbc
# generated from svn:ignore of 'runtime/parrot/library/ProfTest/'
-/runtime/parrot/library/ProfTest/*.pbc
-/runtime/parrot/library/ProfTest/*.pir
+runtime/parrot/library/ProfTest/*.pbc
+runtime/parrot/library/ProfTest/*.pir
# generated from svn:ignore of 'runtime/parrot/library/Stream/'
-/runtime/parrot/library/Stream/*.pbc
+runtime/parrot/library/Stream/*.pbc
# generated from svn:ignore of 'runtime/parrot/library/String/'
-/runtime/parrot/library/String/Utils.pbc
+runtime/parrot/library/String/Utils.pbc
# generated from svn:ignore of 'runtime/parrot/library/TAP/'
-/runtime/parrot/library/TAP/*.pbc
+runtime/parrot/library/TAP/*.pbc
# generated from svn:ignore of 'runtime/parrot/library/Tcl/'
-/runtime/parrot/library/Tcl/*.pbc
+runtime/parrot/library/Tcl/*.pbc
# generated from svn:ignore of 'runtime/parrot/library/Test/'
-/runtime/parrot/library/Test/*.pbc
+runtime/parrot/library/Test/*.pbc
# generated from svn:ignore of 'runtime/parrot/library/Test/Builder/'
-/runtime/parrot/library/Test/Builder/*.pbc
+runtime/parrot/library/Test/Builder/*.pbc
# generated from svn:ignore of 'runtime/parrot/library/YAML/'
-/runtime/parrot/library/YAML/*.pbc
+runtime/parrot/library/YAML/*.pbc
# generated from svn:ignore of 'runtime/parrot/library/YAML/Dumper/'
-/runtime/parrot/library/YAML/Dumper/*.pbc
+runtime/parrot/library/YAML/Dumper/*.pbc
# generated from svn:ignore of 'runtime/parrot/library/YAML/Parser/'
-/runtime/parrot/library/YAML/Parser/*.pbc
+runtime/parrot/library/YAML/Parser/*.pbc
# generated from svn:ignore of 'src/'
-/src/*.o
-/src/*.obj
-/src/*.str
-/src/asmfun.*
-/src/core_pmcs.c
-/src/exec_cpu.c
-/src/exec_dep.c
-/src/exec_dep.h
-/src/extend_vtable.c
-/src/extra_nci_thunks.c
-/src/fingerprint.c
-/src/glut_callbacks.c
-/src/glut_nci_thunks.c
-/src/glut_nci_thunks.nci
-/src/install_config.c
-/src/jit_cpu.c
-/src/jit_defs.c
-/src/jit_emit.h
-/src/null_config.c
-/src/parrot_config.c
-/src/parrot_config.h
-/src/platform.c
-/src/platform_asm.s
-/src/revision.c
+src/*.o
+src/*.obj
+src/*.str
+src/asmfun.*
+src/core_pmcs.c
+src/exec_cpu.c
+src/exec_dep.c
+src/exec_dep.h
+src/extend_vtable.c
+src/extra_nci_thunks.c
+src/fingerprint.c
+src/glut_callbacks.c
+src/glut_nci_thunks.c
+src/glut_nci_thunks.nci
+src/install_config.c
+src/jit_cpu.c
+src/jit_defs.c
+src/jit_emit.h
+src/null_config.c
+src/parrot_config.c
+src/parrot_config.h
+src/platform.c
+src/platform_asm.s
+src/revision.c
# generated from svn:ignore of 'src/atomic/'
-/src/atomic/*.gcda
-/src/atomic/*.o
+src/atomic/*.gcda
+src/atomic/*.o
# generated from svn:ignore of 'src/call/'
-/src/call/*.o
-/src/call/*.obj
-/src/call/*.str
+src/call/*.o
+src/call/*.obj
+src/call/*.str
# generated from svn:ignore of 'src/dynoplibs/'
-/src/dynoplibs/*.bundle
-/src/dynoplibs/*.c
-/src/dynoplibs/*.dll
-/src/dynoplibs/*.exp
-/src/dynoplibs/*.h
-/src/dynoplibs/*.ilk
-/src/dynoplibs/*.lib
-/src/dynoplibs/*.manifest
-/src/dynoplibs/*.o
-/src/dynoplibs/*.obj
-/src/dynoplibs/*.pdb
-/src/dynoplibs/*.so
-/src/dynoplibs/Defines.mak
-/src/dynoplibs/Rules.mak
+src/dynoplibs/*.bundle
+src/dynoplibs/*.c
+src/dynoplibs/*.dll
+src/dynoplibs/*.exp
+src/dynoplibs/*.h
+src/dynoplibs/*.ilk
+src/dynoplibs/*.lib
+src/dynoplibs/*.manifest
+src/dynoplibs/*.o
+src/dynoplibs/*.obj
+src/dynoplibs/*.pdb
+src/dynoplibs/*.so
+src/dynoplibs/Defines.mak
+src/dynoplibs/Rules.mak
# generated from svn:ignore of 'src/dynpmc/'
-/src/dynpmc/*.bundle
-/src/dynpmc/*.c
-/src/dynpmc/*.def
-/src/dynpmc/*.dll
-/src/dynpmc/*.dump
-/src/dynpmc/*.dylib
-/src/dynpmc/*.exe
-/src/dynpmc/*.exp
-/src/dynpmc/*.h
-/src/dynpmc/*.ilk
-/src/dynpmc/*.lib
-/src/dynpmc/*.mak
-/src/dynpmc/*.manifest
-/src/dynpmc/*.o
-/src/dynpmc/*.obj
-/src/dynpmc/*.pdb
-/src/dynpmc/*.so
-/src/dynpmc/Makefile
-/src/dynpmc/md2.pmc
-/src/dynpmc/md4.pmc
-/src/dynpmc/md5.pmc
-/src/dynpmc/ripemd160.pmc
-/src/dynpmc/sha.pmc
-/src/dynpmc/sha1.pmc
-/src/dynpmc/sha256.pmc
-/src/dynpmc/sha512.pmc
+src/dynpmc/*.bundle
+src/dynpmc/*.c
+src/dynpmc/*.def
+src/dynpmc/*.dll
+src/dynpmc/*.dump
+src/dynpmc/*.dylib
+src/dynpmc/*.exe
+src/dynpmc/*.exp
+src/dynpmc/*.h
+src/dynpmc/*.ilk
+src/dynpmc/*.lib
+src/dynpmc/*.mak
+src/dynpmc/*.manifest
+src/dynpmc/*.o
+src/dynpmc/*.obj
+src/dynpmc/*.pdb
+src/dynpmc/*.so
+src/dynpmc/Makefile
+src/dynpmc/md2.pmc
+src/dynpmc/md4.pmc
+src/dynpmc/md5.pmc
+src/dynpmc/ripemd160.pmc
+src/dynpmc/sha.pmc
+src/dynpmc/sha1.pmc
+src/dynpmc/sha256.pmc
+src/dynpmc/sha512.pmc
# generated from svn:ignore of 'src/gc/'
-/src/gc/*.bundle
-/src/gc/*.def
-/src/gc/*.dll
-/src/gc/*.dump
-/src/gc/*.dylib
-/src/gc/*.exe
-/src/gc/*.exp
-/src/gc/*.h
-/src/gc/*.ilk
-/src/gc/*.lib
-/src/gc/*.manifest
-/src/gc/*.o
-/src/gc/*.obj
-/src/gc/*.pdb
-/src/gc/*.so
-/src/gc/Makefile
+src/gc/*.bundle
+src/gc/*.def
+src/gc/*.dll
+src/gc/*.dump
+src/gc/*.dylib
+src/gc/*.exe
+src/gc/*.exp
+src/gc/*.h
+src/gc/*.ilk
+src/gc/*.lib
+src/gc/*.manifest
+src/gc/*.o
+src/gc/*.obj
+src/gc/*.pdb
+src/gc/*.so
+src/gc/Makefile
# generated from svn:ignore of 'src/interp/'
-/src/interp/*.o
-/src/interp/*.str
+src/interp/*.o
+src/interp/*.str
# generated from svn:ignore of 'src/io/'
-/src/io/*.o
-/src/io/*.obj
-/src/io/*.str
+src/io/*.o
+src/io/*.obj
+src/io/*.str
# generated from svn:ignore of 'src/nci/'
-/src/nci/*.o
-/src/nci/*.obj
-/src/nci/*.str
+src/nci/*.o
+src/nci/*.obj
+src/nci/*.str
# generated from svn:ignore of 'src/ops/'
-/src/ops/*.c
-/src/ops/*.o
-/src/ops/*.obj
+src/ops/*.c
+src/ops/*.o
+src/ops/*.obj
# generated from svn:ignore of 'src/packfile/'
-/src/packfile/*.o
-/src/packfile/*.obj
+src/packfile/*.o
+src/packfile/*.obj
# generated from svn:ignore of 'src/pmc/'
-/src/pmc/*.c
-/src/pmc/*.dump
-/src/pmc/*.h
-/src/pmc/*.o
-/src/pmc/*.obj
-/src/pmc/*.str
-/src/pmc/*.tmp
-/src/pmc/Makefile
+src/pmc/*.c
+src/pmc/*.dump
+src/pmc/*.h
+src/pmc/*.o
+src/pmc/*.obj
+src/pmc/*.str
+src/pmc/*.tmp
+src/pmc/Makefile
# generated from svn:ignore of 'src/runcore/'
-/src/runcore/*.o
-/src/runcore/*.obj
-/src/runcore/*.str
+src/runcore/*.o
+src/runcore/*.obj
+src/runcore/*.str
# generated from svn:ignore of 'src/string/'
-/src/string/*.o
-/src/string/*.obj
-/src/string/*.str
-/src/string/private_cstring.h
+src/string/*.o
+src/string/*.obj
+src/string/*.str
+src/string/private_cstring.h
# generated from svn:ignore of 'src/string/charset/'
-/src/string/charset/*.o
-/src/string/charset/*.obj
+src/string/charset/*.o
+src/string/charset/*.obj
# generated from svn:ignore of 'src/string/encoding/'
-/src/string/encoding/*.o
-/src/string/encoding/*.obj
+src/string/encoding/*.o
+src/string/encoding/*.obj
# generated from svn:ignore of 't/benchmark/'
-/t/benchmark/*.pasm
-/t/benchmark/*.pir
+t/benchmark/*.pasm
+t/benchmark/*.pir
# generated from svn:ignore of 't/compilers/data_json/'
-/t/compilers/data_json/*.pbc
-/t/compilers/data_json/*.pir
-/t/compilers/data_json/*_pbcexe
+t/compilers/data_json/*.pbc
+t/compilers/data_json/*.pir
+t/compilers/data_json/*_pbcexe
# generated from svn:ignore of 't/compilers/imcc/'
-/t/compilers/imcc/*.pbc
+t/compilers/imcc/*.pbc
# generated from svn:ignore of 't/compilers/imcc/imcpasm/'
-/t/compilers/imcc/imcpasm/*.pasm
-/t/compilers/imcc/imcpasm/*.pbc
-/t/compilers/imcc/imcpasm/*.pir
-/t/compilers/imcc/imcpasm/*_pbcexe
+t/compilers/imcc/imcpasm/*.pasm
+t/compilers/imcc/imcpasm/*.pbc
+t/compilers/imcc/imcpasm/*.pir
+t/compilers/imcc/imcpasm/*_pbcexe
# generated from svn:ignore of 't/compilers/imcc/reg/'
-/t/compilers/imcc/reg/*.pasm
-/t/compilers/imcc/reg/*.pbc
-/t/compilers/imcc/reg/*.pir
-/t/compilers/imcc/reg/*_pbcexe*
+t/compilers/imcc/reg/*.pasm
+t/compilers/imcc/reg/*.pbc
+t/compilers/imcc/reg/*.pir
+t/compilers/imcc/reg/*_pbcexe*
# generated from svn:ignore of 't/compilers/imcc/syn/'
-/t/compilers/imcc/syn/*.pasm
-/t/compilers/imcc/syn/*.pbc
-/t/compilers/imcc/syn/*.pir
-/t/compilers/imcc/syn/*_pbcexe*
+t/compilers/imcc/syn/*.pasm
+t/compilers/imcc/syn/*.pbc
+t/compilers/imcc/syn/*.pir
+t/compilers/imcc/syn/*_pbcexe*
# generated from svn:ignore of 't/compilers/pct/'
-/t/compilers/pct/*.pbc
-/t/compilers/pct/*.pir
+t/compilers/pct/*.pbc
+t/compilers/pct/*.pir
# generated from svn:ignore of 't/compilers/pge/'
-/t/compilers/pge/*.pasm
-/t/compilers/pge/*.pbc
-/t/compilers/pge/*.pir
-/t/compilers/pge/*_pbcexe
+t/compilers/pge/*.pasm
+t/compilers/pge/*.pbc
+t/compilers/pge/*.pir
+t/compilers/pge/*_pbcexe
# generated from svn:ignore of 't/compilers/pge/p5regex/'
-/t/compilers/pge/p5regex/*.pir
+t/compilers/pge/p5regex/*.pir
# generated from svn:ignore of 't/compilers/pge/perl6regex/'
-/t/compilers/pge/perl6regex/*.pbc
-/t/compilers/pge/perl6regex/*.pir
+t/compilers/pge/perl6regex/*.pbc
+t/compilers/pge/perl6regex/*.pir
# generated from svn:ignore of 't/compilers/tge/'
-/t/compilers/tge/*.pbc
-/t/compilers/tge/*.pir
-/t/compilers/tge/*_pbcexe
+t/compilers/tge/*.pbc
+t/compilers/tge/*.pir
+t/compilers/tge/*_pbcexe
# generated from svn:ignore of 't/dynoplibs/'
-/t/dynoplibs/*.pasm
-/t/dynoplibs/*.pbc
-/t/dynoplibs/*.pir
+t/dynoplibs/*.pasm
+t/dynoplibs/*.pbc
+t/dynoplibs/*.pir
# generated from svn:ignore of 't/dynpmc/'
-/t/dynpmc/*.pasm
-/t/dynpmc/*.pbc
-/t/dynpmc/*.pir
-/t/dynpmc/*_pbcexe*
-/t/dynpmc/md2.t
-/t/dynpmc/md4.t
-/t/dynpmc/md5.t
-/t/dynpmc/ripemd160.t
-/t/dynpmc/sha.t
-/t/dynpmc/sha1.t
-/t/dynpmc/sha256.t
-/t/dynpmc/sha512.t
+t/dynpmc/*.pasm
+t/dynpmc/*.pbc
+t/dynpmc/*.pir
+t/dynpmc/*_pbcexe*
+t/dynpmc/md2.t
+t/dynpmc/md4.t
+t/dynpmc/md5.t
+t/dynpmc/ripemd160.t
+t/dynpmc/sha.t
+t/dynpmc/sha1.t
+t/dynpmc/sha256.t
+t/dynpmc/sha512.t
# generated from svn:ignore of 't/examples/'
-/t/examples/*.pasm
-/t/examples/*.pbc
-/t/examples/*.pir
-/t/examples/*_pbcexe*
+t/examples/*.pasm
+t/examples/*.pbc
+t/examples/*.pir
+t/examples/*_pbcexe*
# generated from svn:ignore of 't/library/'
-/t/library/*.out
-/t/library/*.pasm
-/t/library/*.pbc
-/t/library/*.pir
-/t/library/*_pbcexe*
+t/library/*.out
+t/library/*.pasm
+t/library/*.pbc
+t/library/*.pir
+t/library/*_pbcexe*
# generated from svn:ignore of 't/native_pbc/'
-/t/native_pbc/*_pbcexe*
+t/native_pbc/*_pbcexe*
# generated from svn:ignore of 't/oo/'
-/t/oo/*.pbc
-/t/oo/*.pir
+t/oo/*.pbc
+t/oo/*.pir
# generated from svn:ignore of 't/op/'
-/t/op/*.out
-/t/op/*.pasm
-/t/op/*.pbc
-/t/op/*.pir
-/t/op/*_pbcexe*
+t/op/*.out
+t/op/*.pasm
+t/op/*.pbc
+t/op/*.pir
+t/op/*_pbcexe*
# generated from svn:ignore of 't/perl/'
-/t/perl/Parrot_Test_1.pasm
-/t/perl/Parrot_Test_1.pir
+t/perl/Parrot_Test_1.pasm
+t/perl/Parrot_Test_1.pir
# generated from svn:ignore of 't/pmc/'
-/t/pmc/*.out
-/t/pmc/*.pasm
-/t/pmc/*.pbc
-/t/pmc/*.pir
-/t/pmc/*_pbcexe*
+t/pmc/*.out
+t/pmc/*.pasm
+t/pmc/*.pbc
+t/pmc/*.pir
+t/pmc/*_pbcexe*
# generated from svn:ignore of 't/src/'
-/t/src/*_*
+t/src/*_*
# generated from svn:ignore of 't/stress/'
-/t/stress/*.out
-/t/stress/*.pasm
-/t/stress/*.pbc
-/t/stress/*.pir
-/t/stress/*_pbcexe*
+t/stress/*.out
+t/stress/*.pasm
+t/stress/*.pbc
+t/stress/*.pir
+t/stress/*_pbcexe*
# generated from svn:ignore of 't/tools/'
-/t/tools/*.pbc
-/t/tools/*.pir
-/t/tools/pdb.t.*
-/t/tools/pmc2c.*.c
-/t/tools/pmc2c.*.dump
-/t/tools/pmc2c.*.h
-/t/tools/pmc2c.*.pmc
+t/tools/*.pbc
+t/tools/*.pir
+t/tools/pdb.t.*
+t/tools/pmc2c.*.c
+t/tools/pmc2c.*.dump
+t/tools/pmc2c.*.h
+t/tools/pmc2c.*.pmc
# Local variables:
# mode: text
# buffer-read-only: t
Modified: branches/codestring/DEPRECATED.pod
==============================================================================
--- branches/codestring/DEPRECATED.pod Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/DEPRECATED.pod Mon May 10 13:15:51 2010 (r46471)
@@ -252,6 +252,22 @@
L<https://trac.parrot.org/parrot/ticket/1103>
+=item :unique_reg flag [eligible in 3.1]
+
+L<https://trac.parrot.org/parrot/ticket/1622>
+
+=item .nci_call [eligible in 3.1]
+
+As of the latest PCC changes, there is nothing special about calling an NCI sub.
+
+L<https://trac.parrot.org/parrot/ticket/1623>
+
+=item .meth_call [eligible in 3.1]
+
+As of the latest PCC changes, this does nothing different from '.call'.
+
+L<https://trac.parrot.org/parrot/ticket/1624>
+
=back
=head1 Functions
Modified: branches/codestring/compilers/imcc/cfg.c
==============================================================================
--- branches/codestring/compilers/imcc/cfg.c Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/compilers/imcc/cfg.c Mon May 10 13:15:51 2010 (r46471)
@@ -35,22 +35,6 @@
/* HEADERIZER BEGIN: static */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-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(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(PARROT_INTERP,
ARGMOD(IMC_Unit *unit),
ARGIN(Basic_block *from),
@@ -137,26 +121,10 @@
__attribute__nonnull__(3)
FUNC_MODIFIES(*unit);
-static void propagate_need(
- ARGMOD(Basic_block *bb),
- ARGIN(const SymReg *r),
- int i)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- FUNC_MODIFIES(*bb);
-
static void sort_loops(PARROT_INTERP, ARGIN(IMC_Unit *unit))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
-#define ASSERT_ARGS_analyse_life_block __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- 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(interp) \
- , PARROT_ASSERT_ARG(unit) \
- , PARROT_ASSERT_ARG(r))
#define ASSERT_ARGS_bb_add_edge __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(unit) \
@@ -198,9 +166,6 @@
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(unit) \
, PARROT_ASSERT_ARG(e))
-#define ASSERT_ARGS_propagate_need __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(bb) \
- , PARROT_ASSERT_ARG(r))
#define ASSERT_ARGS_sort_loops __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(unit))
@@ -701,263 +666,6 @@
/*
-=item C<void life_analysis(PARROT_INTERP, const IMC_Unit *unit)>
-
-This driver routine calls analyse_life_symbol for each reglist in the specified
-IMC_Unit.
-
-=cut
-
-*/
-
-void
-life_analysis(PARROT_INTERP, ARGIN(const IMC_Unit *unit))
-{
- ASSERT_ARGS(life_analysis)
- SymReg ** const reglist = unit->reglist;
- unsigned int i;
-
- IMCC_info(interp, 2, "life_analysis\n");
-
- for (i = 0; i < unit->n_symbols; i++)
- analyse_life_symbol(interp, unit, reglist[i]);
-}
-
-
-/*
-
-=item C<static void analyse_life_symbol(PARROT_INTERP, const IMC_Unit *unit,
-SymReg* r)>
-
-Analyzes the lifetime for a given symbol.
-
-=cut
-
-*/
-
-static void
-analyse_life_symbol(PARROT_INTERP,
- ARGIN(const IMC_Unit *unit), ARGMOD(SymReg* r))
-{
- ASSERT_ARGS(analyse_life_symbol)
- unsigned int i;
-
-#if IMC_TRACE_HIGH
- fprintf(stderr, "cfg.c: analyse_life_symbol(%s)\n", r->name);
-#endif
-
- if (r->life_info)
- free_life_info(unit, r);
-
- 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(interp, unit->bb_list[i], r);
- }
-
- /* Now we need to consider the relations between blocks */
- for (i = 0; i < unit->n_basic_blocks; i++) {
- if (r->life_info[i]->flags & LF_use) {
- const Instruction * const ins = unit->bb_list[i]->start;
-
- /* if the previous instruction (the last of the previous block) was
- * a sub call, and the symbol is live/use here, it needs allocation
- * in the non-volatile register range */
- if (ins->prev) {
- const Instruction * const prev = ins->prev;
-
- if ((prev->type & (ITPCCSUB|ITPCCYIELD))
- && prev->opnum != PARROT_OP_tailcall_p)
- r->usage |= U_NON_VOLATILE;
- else if (prev->opnum == PARROT_OP_invoke_p_p
- || prev->opnum == PARROT_OP_invokecc_p)
- r->usage |= U_NON_VOLATILE;
- else if (ins->type & ITADDR)
- r->usage |= U_NON_VOLATILE;
- }
-
- /* This block uses r, so it must be live at the beginning */
- r->life_info[i]->flags |= LF_lv_in;
-
- /* propagate this info to every predecessor */
- propagate_need(unit->bb_list[i], r, i);
- }
- }
-}
-
-
-/*
-
-=item C<void free_life_info(const IMC_Unit *unit, SymReg *r)>
-
-Frees memory of the life analysis info structures.
-
-=cut
-
-*/
-
-void
-free_life_info(ARGIN(const IMC_Unit *unit), ARGMOD(SymReg *r))
-{
- ASSERT_ARGS(free_life_info)
-#if IMC_TRACE_HIGH
- fprintf(stderr, "free_life_into(%s)\n", r->name);
-#endif
- if (r->life_info) {
- unsigned int i;
-
- for (i = 0; i < unit->n_basic_blocks; i++) {
- mem_sys_free(r->life_info[i]);
- }
-
- mem_sys_free(r->life_info);
- r->life_info = NULL;
- }
-}
-
-
-/*
-
-=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.
-
-Its job is to set the flags LF_use, or LF_read, and record the intervals inside
-the block where the var is alive.
-
-=cut
-
-*/
-
-static void
-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(interp, r, bb->index);
- Instruction *special = NULL;
- Instruction *ins;
-
- for (ins = bb->start; ins; ins = ins->next) {
- int is_alias;
-
- /* if we have a setp_ind opcode, it may write all PMC registers */
- if (ins->opnum == PARROT_OP_setp_ind_i_p && r->set == 'P')
- r->usage |= U_NON_VOLATILE;
-
- /* restoreall and such */
- if (ins_writes2(ins, r->set))
- special = ins;
-
- /*
- * set p, p is basically a read - both are LF_use
- *
- * TODO live range coalescing
- */
- is_alias = (ins->type & ITALIAS) && ins->symregs[0] == r;
-
- if (instruction_reads(ins, r) || is_alias) {
- /* if instruction gets read after a special, consider the first
- * read of this instruction, like if a write had happened at
- * special, so that the reg doesn't pop into life */
- if (! (l->flags & LF_def)) {
- if (special) {
- l->first_ins = special;
- l->flags |= LF_def;
- special = NULL;
- }
- else {
- /* we read before having written before, so the var was
- * live at the beginning of the block */
- l->first_ins = bb->start;
- l->flags |= LF_use;
- }
- }
-
- l->last_ins = ins;
- }
-
- if (!is_alias && instruction_writes(ins, r)) {
- l->flags |= LF_def;
-
- if (!l->first_ins)
- l->first_ins = ins;
-
- l->last_ins = ins;
- }
-
- if (ins == bb->end)
- break;
- }
-
- if (!l->last_ins)
- l->last_ins = l->first_ins;
-
- /* l->last can later be extended if it turns out that another block needs
- * the value resulting from this computation */
-}
-
-
-/*
-
-=item C<static void propagate_need(Basic_block *bb, const SymReg *r, int i)>
-
-Follows the uses of the given symbol through all of the basic blocks of the
-unit.
-
-=cut
-
-*/
-
-static void
-propagate_need(ARGMOD(Basic_block *bb), ARGIN(const SymReg *r), int i)
-{
- ASSERT_ARGS(propagate_need)
- Edge *edge;
- Life_range *l;
- Basic_block *pred;
-
- /* every predecessor of a LF_lv_in block must be in LF_lv_out
- * and, unless itself is LV_def, this should be propagated to its
- * predecessors themselves */
-
- for (edge = bb->pred_list; edge; edge = edge->pred_next) {
- pred = edge->from;
- l = r->life_info[pred->index];
-
- if (l->flags & LF_lv_out) {
- /* this node has already been visited. Ignore it */
- }
- else {
- l->flags |= LF_lv_out;
- l->last_ins = pred->end;
-
- if (! (l->flags & LF_def)) {
- l->flags |= LF_lv_in;
- l->first_ins = pred->start;
- l->last_ins = pred->end;
-
- /* we arrived at block 0
- *
- * emit a warning if -w looking at some Perl 6 examples where
- * this warning is emitted, there seems always to be a code
- * path where the var is not initialized, so this might even be
- * correct :)
- *
- * TT #1244: emit warning in propagate_need()
- */
- propagate_need(pred, r, i);
- }
- }
- }
-}
-
-
-/*
-
=item C<void compute_dominators(PARROT_INTERP, IMC_Unit *unit)>
Computes the dominators tree of the CFG. Basic block A dominates B if each
@@ -1625,28 +1333,6 @@
/*
-=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.
-
-=cut
-
-*/
-
-PARROT_MALLOC
-PARROT_CANNOT_RETURN_NULL
-Life_range *
-make_life_range(PARROT_INTERP, ARGMOD(SymReg *r), int idx)
-{
- ASSERT_ARGS(make_life_range)
- Life_range * const l = mem_gc_allocate_zeroed_typed(interp, Life_range);
- r->life_info[idx] = l;
-
- return l;
-}
-
-/*
-
=back
=cut
Modified: branches/codestring/compilers/imcc/cfg.h
==============================================================================
--- branches/codestring/compilers/imcc/cfg.h Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/compilers/imcc/cfg.h Mon May 10 13:15:51 2010 (r46471)
@@ -89,22 +89,6 @@
__attribute__nonnull__(2)
FUNC_MODIFIES(*unit);
-void free_life_info(ARGIN(const IMC_Unit *unit), ARGMOD(SymReg *r))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- FUNC_MODIFIES(*r);
-
-void life_analysis(PARROT_INTERP, ARGIN(const IMC_Unit *unit))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_MALLOC
-PARROT_CANNOT_RETURN_NULL
-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
int natural_preheader(
ARGIN(const IMC_Unit *unit),
@@ -141,15 +125,6 @@
#define ASSERT_ARGS_find_loops __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(unit))
-#define ASSERT_ARGS_free_life_info __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(unit) \
- , PARROT_ASSERT_ARG(r))
-#define ASSERT_ARGS_life_analysis __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(unit))
-#define ASSERT_ARGS_make_life_range __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- 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/codestring/compilers/imcc/debug.c
==============================================================================
--- branches/codestring/compilers/imcc/debug.c Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/compilers/imcc/debug.c Mon May 10 13:15:51 2010 (r46471)
@@ -406,9 +406,8 @@
continue;
if (!r->first_ins)
continue;
- fprintf(stderr, "%s %c\t%d\t%d\t%d\t%d\t%c %2d %2d\t%d\t%d\t%s\t%lx\n",
+ fprintf(stderr, "%s \t%d\t%d\t%d\t%d\t%c %2d %2d\t%d\t%d\t%s\t%lx\n",
r->name,
- r->usage & U_NON_VOLATILE ? 'P' : ' ',
r->first_ins->index, r->last_ins->index,
r->first_ins->bbindex, r->last_ins->bbindex,
r->set,
@@ -418,126 +417,6 @@
(UINTVAL)r->usage);
}
fprintf(stderr, "\n");
- dump_liveness_status(unit);
-}
-
-/*
-
-=item C<void dump_liveness_status(const IMC_Unit *unit)>
-
-Dumps the list of registers in the current IMC_Unit that need to be
-allocated.
-
-=cut
-
-*/
-
-void
-dump_liveness_status(ARGIN(const IMC_Unit *unit))
-{
- ASSERT_ARGS(dump_liveness_status)
- unsigned int i;
- SymReg ** const reglist = unit->reglist;
-
- fprintf(stderr, "\nSymbols:\n--------------------------------------\n");
-
- for (i = 0; i < unit->n_symbols; i++) {
- const SymReg * const r = reglist[i];
- if (REG_NEEDS_ALLOC(r))
- dump_liveness_status_var(unit, r);
- }
-
- fprintf(stderr, "\n");
-}
-
-
-/*
-
-=item C<void dump_liveness_status_var(const IMC_Unit *unit, const SymReg* r)>
-
-Dumps the state of SymReg C<r> in IMC_Unit C<unit>.
-
-=cut
-
-*/
-
-void
-dump_liveness_status_var(ARGIN(const IMC_Unit *unit), ARGIN(const SymReg* r))
-{
- ASSERT_ARGS(dump_liveness_status_var)
- fprintf(stderr, "\nSymbol %s:", r->name);
- if (r->life_info) {
- unsigned int i;
-
- for (i = 0; i<unit->n_basic_blocks; i++) {
- const Life_range * const l = r->life_info[i];
-
- if (l->flags & LF_lv_all)
- fprintf(stderr, "\n\t%i:ALL\t", i);
- else if (l->flags & LF_lv_inside)
- fprintf(stderr, "\n\t%i:INSIDE", i);
-
- if (l->flags & LF_lv_in)
- fprintf(stderr, "\n\t%i: IN\t", i);
- else if (l->flags & LF_lv_out)
- fprintf(stderr, "\n\t%i: OUT\t", i);
- else if (l->first_ins)
- fprintf(stderr, "\n\t%i: INS\t", i);
-
- if (l->flags & LF_use)
- fprintf(stderr, "u ");
- else if (l->flags & LF_def)
- fprintf(stderr, "d ");
- else
- fprintf(stderr, " ");
-
- if (l->first_ins)
- fprintf(stderr, "[%d, %d]\t", l->first_ins->index,
- l->last_ins->index);
- }
- }
-
- fprintf(stderr, "\n");
-}
-
-/*
-
-=item C<void dump_interference_graph(const IMC_Unit *unit)>
-
-Dumps the interference graph for the current IMC_Unit C<unit>
-
-=cut
-
-*/
-
-void
-dump_interference_graph(ARGIN(const IMC_Unit *unit))
-{
- ASSERT_ARGS(dump_interference_graph)
- int x;
- SymReg** const reglist = unit->reglist;
- const int n_symbols = unit->n_symbols;
-
- fprintf(stderr, "\nDumping the Interf. graph:"
- "\n-------------------------------\n");
- for (x = 0; x < n_symbols; x++) {
- if (reglist[x]->first_ins) {
- int cnt = 0;
- int y;
-
- fprintf(stderr, "%s\t -> ", reglist[x]->name);
- for (y = 0; y < n_symbols; y++) {
- if (ig_test(x, y, n_symbols, unit->interference_graph)) {
- const SymReg * const r = unit->reglist[y];
-
- fprintf(stderr, "%s ", r->name);
- cnt++;
- }
- }
- fprintf(stderr, "(%d)\n", cnt);
- }
- }
- fprintf(stderr, "\n");
}
/*
Modified: branches/codestring/compilers/imcc/debug.h
==============================================================================
--- branches/codestring/compilers/imcc/debug.h Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/compilers/imcc/debug.h Mon May 10 13:15:51 2010 (r46471)
@@ -91,21 +91,9 @@
__attribute__nonnull__(1)
__attribute__nonnull__(2);
-void dump_interference_graph(ARGIN(const IMC_Unit *unit))
- __attribute__nonnull__(1);
-
void dump_labels(ARGIN(const IMC_Unit *unit))
__attribute__nonnull__(1);
-void dump_liveness_status(ARGIN(const IMC_Unit *unit))
- __attribute__nonnull__(1);
-
-void dump_liveness_status_var(
- ARGIN(const IMC_Unit *unit),
- ARGIN(const SymReg* r))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
void dump_loops(ARGIN(const IMC_Unit *unit))
__attribute__nonnull__(1);
@@ -142,15 +130,8 @@
#define ASSERT_ARGS_dump_instructions __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(unit))
-#define ASSERT_ARGS_dump_interference_graph __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(unit))
#define ASSERT_ARGS_dump_labels __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(unit))
-#define ASSERT_ARGS_dump_liveness_status __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(unit))
-#define ASSERT_ARGS_dump_liveness_status_var __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(unit) \
- , PARROT_ASSERT_ARG(r))
#define ASSERT_ARGS_dump_loops __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(unit))
#define ASSERT_ARGS_dump_symreg __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
Modified: branches/codestring/compilers/imcc/imc.h
==============================================================================
--- branches/codestring/compilers/imcc/imc.h Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/compilers/imcc/imc.h Mon May 10 13:15:51 2010 (r46471)
@@ -145,25 +145,11 @@
__attribute__nonnull__(1)
FUNC_MODIFIES(*unit);
-void graph_coloring_reg_alloc(PARROT_INTERP, ARGMOD(IMC_Unit *unit))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- FUNC_MODIFIES(*unit);
-
-PARROT_WARN_UNUSED_RESULT
-unsigned int ig_test(int i, int j, int N, ARGIN(unsigned int *graph))
- __attribute__nonnull__(4);
-
void imc_reg_alloc(PARROT_INTERP, ARGIN_NULLOK(IMC_Unit *unit))
__attribute__nonnull__(1);
#define ASSERT_ARGS_free_reglist __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(unit))
-#define ASSERT_ARGS_graph_coloring_reg_alloc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(unit))
-#define ASSERT_ARGS_ig_test __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(graph))
#define ASSERT_ARGS_imc_reg_alloc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
@@ -307,22 +293,6 @@
__attribute__nonnull__(3)
FUNC_MODIFIES(*io);
-PARROT_WARN_UNUSED_RESULT
-PARROT_CAN_RETURN_NULL
-Instruction * iNEW(PARROT_INTERP,
- ARGMOD(IMC_Unit *unit),
- ARGMOD(SymReg *r0),
- ARGMOD(char *type),
- ARGIN_NULLOK(SymReg *init),
- int emit)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3)
- __attribute__nonnull__(4)
- FUNC_MODIFIES(*unit)
- FUNC_MODIFIES(*r0)
- FUNC_MODIFIES(*type);
-
PARROT_IGNORABLE_RESULT
PARROT_CAN_RETURN_NULL
Instruction * INS(PARROT_INTERP,
@@ -420,11 +390,6 @@
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(io) \
, PARROT_ASSERT_ARG(format))
-#define ASSERT_ARGS_iNEW __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(unit) \
- , PARROT_ASSERT_ARG(r0) \
- , PARROT_ASSERT_ARG(type))
#define ASSERT_ARGS_INS __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(unit) \
@@ -544,11 +509,6 @@
AsmInYield
} AsmState;
-typedef enum _imcc_reg_allocator_t {
- IMCC_VANILLA_ALLOCATOR = 0,
- IMCC_GRAPH_ALLOCATOR
-} imcc_reg_allocator;
-
PARROT_EXPORT void IMCC_push_parser_state(PARROT_INTERP);
PARROT_EXPORT void IMCC_pop_parser_state(PARROT_INTERP, void *yyscanner);
@@ -622,9 +582,7 @@
jmp_buf jump_buf; /* The jump for error handling */
int IMCC_DEBUG;
int allocated;
- int allocator;
int cnr;
- int cur_pmc_type;
int debug;
int dont_optimize;
int emitter;
Modified: branches/codestring/compilers/imcc/imcc.l
==============================================================================
--- branches/codestring/compilers/imcc/imcc.l Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/compilers/imcc/imcc.l Mon May 10 13:15:51 2010 (r46471)
@@ -769,6 +769,7 @@
static macro_frame_t *
new_frame(PARROT_INTERP) {
+ /* XXX non-reentrant */
static int label = 0;
macro_frame_t * const tmp = mem_gc_allocate_zeroed_typed(interp, macro_frame_t);
Modified: branches/codestring/compilers/imcc/imcc.y
==============================================================================
--- branches/codestring/compilers/imcc/imcc.y Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/compilers/imcc/imcc.y Mon May 10 13:15:51 2010 (r46471)
@@ -842,12 +842,6 @@
IMCC_INFO(interp)->cur_obj;
IMCC_INFO(interp)->cur_obj = NULL;
}
-
- if (IMCC_INFO(interp)->cur_call->pcc_sub->sub->pmc_type == enum_class_NCI)
- IMCC_INFO(interp)->cur_call->pcc_sub->flags |= isNCI;
-
- if (IMCC_INFO(interp)->cur_unit->type == IMC_PCCSUB)
- IMCC_INFO(interp)->cur_unit->instructions->symregs[0]->pcc_sub->calls_a_sub |= 1;
}
@@ -870,8 +864,7 @@
if (!ins || !ins->symregs[0] || !(ins->symregs[0]->type & VT_PCC_SUB))
IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
"yield or return directive outside pcc subroutine\n");
- if (yield)
- ins->symregs[0]->pcc_sub->calls_a_sub = 1 | ITPCCYIELD;
+ ins->symregs[0]->pcc_sub->yield = yield;
snprintf(name, sizeof (name), yield ? "%cpcc_sub_yield_%d" : "%cpcc_sub_ret_%d",
IMCC_INTERNAL_CHAR, IMCC_INFO(interp)->cnr++);
interp->imc_info->sr_return = mk_pcc_sub(interp, name, 0);
@@ -1088,10 +1081,10 @@
%token <t> SOL HLL TK_LINE TK_FILE
%token <t> GOTO ARG IF UNLESS PNULL SET_RETURN SET_YIELD
%token <t> ADV_FLAT ADV_SLURPY ADV_OPTIONAL ADV_OPT_FLAG ADV_NAMED ADV_ARROW
-%token <t> NEW ADV_INVOCANT ADV_CALL_SIG
+%token <t> ADV_INVOCANT ADV_CALL_SIG
%token <t> NAMESPACE DOT_METHOD
%token <t> SUB SYM LOCAL LEXICAL CONST ANNOTATE
-%token <t> INC DEC GLOBAL_CONST
+%token <t> GLOBAL_CONST
%token <t> PLUS_ASSIGN MINUS_ASSIGN MUL_ASSIGN DIV_ASSIGN CONCAT_ASSIGN
%token <t> BAND_ASSIGN BOR_ASSIGN BXOR_ASSIGN FDIV FDIV_ASSIGN MOD_ASSIGN
%token <t> SHR_ASSIGN SHL_ASSIGN SHR_U_ASSIGN
@@ -1116,7 +1109,7 @@
%type <i> class_namespace
%type <i> constdef sub emit pcc_ret pcc_yield
%type <i> compilation_units compilation_unit pmc_const pragma
-%type <s> classname relop any_string assign_op bin_op un_op
+%type <s> relop any_string assign_op bin_op un_op
%type <i> labels _labels label statement sub_call
%type <i> pcc_sub_call
%type <sr> sub_param sub_params pcc_arg pcc_result pcc_args pcc_results sub_param_type_def
@@ -1419,9 +1412,7 @@
sub_param_type_def:
type IDENTIFIER paramtype_list
{
- if ($3 & VT_UNIQUE_REG)
- $$ = mk_ident_ur(interp, $2, $1);
- else if ($3 & VT_OPT_FLAG && $1 != 'I') {
+ if ($3 & VT_OPT_FLAG && $1 != 'I') {
const char *type;
switch ($1) {
case 'N': type = "num"; break;
@@ -1431,10 +1422,11 @@
}
IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
- ":opt_flag parameter must be of type 'I', not '%s'", type);
+ ":opt_flag parameter must be of type 'int', not '%s'", type);
}
- else
- $$ = mk_ident(interp, $2, $1);
+ if ($3 & VT_NAMED && !($3 & VT_FLAT) && !IMCC_INFO(interp)->adv_named_id)
+ adv_named_set(interp, $2);
+ $$ = mk_ident(interp, $2, $1);
$$->type |= $3;
mem_sys_free($2);
}
@@ -1603,8 +1595,6 @@
* sub call; the sub is in r[0] of the first ins
*/
r1 = IMCC_INFO(interp)->cur_unit->instructions->symregs[0];
- if (r1 && r1->pcc_sub)
- r1->pcc_sub->calls_a_sub |= 1;
}
pcc_args
opt_invocant
@@ -1664,7 +1654,6 @@
| NCI_CALL var '\n'
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, $2);
- IMCC_INFO(interp)->cur_call->pcc_sub->flags |= isNCI;
}
| METH_CALL target '\n'
{
@@ -1689,7 +1678,15 @@
pcc_args:
/* empty */ { $$ = 0; }
- | pcc_args pcc_arg '\n' { add_pcc_arg(interp, IMCC_INFO(interp)->cur_call, $2); }
+ | pcc_args pcc_arg '\n' {
+ if (IMCC_INFO(interp)->adv_named_id) {
+ 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(interp, IMCC_INFO(interp)->cur_call, $2);
+ }
;
pcc_arg:
@@ -1712,10 +1709,7 @@
{
IdList * const l = $4;
SymReg *ignored;
- if (l->unique_reg)
- ignored = mk_ident_ur(interp, l->id, $3);
- else
- ignored = mk_ident(interp, l->id, $3);
+ ignored = mk_ident(interp, l->id, $3);
UNUSED(ignored);
IMCC_INFO(interp)->is_def = 0;
$$ = 0;
@@ -1732,9 +1726,9 @@
| ADV_OPTIONAL { $$ = VT_OPTIONAL; }
| ADV_OPT_FLAG { $$ = VT_OPT_FLAG; }
| ADV_NAMED { $$ = VT_NAMED; }
- | ADV_NAMED '(' STRINGC ')' { adv_named_set(interp, $3); $$ = 0; mem_sys_free($3); }
- | ADV_NAMED '(' USTRINGC ')' { adv_named_set_u(interp, $3); $$ = 0; mem_sys_free($3); }
- | UNIQUE_REG { $$ = VT_UNIQUE_REG; }
+ | ADV_NAMED '(' STRINGC ')' { adv_named_set(interp, $3); $$ = VT_NAMED; mem_sys_free($3); }
+ | ADV_NAMED '(' USTRINGC ')' { adv_named_set_u(interp, $3); $$ = VT_NAMED; mem_sys_free($3); }
+ | UNIQUE_REG { $$ = 0; }
| ADV_CALL_SIG { $$ = VT_CALL_SIG; }
;
@@ -1926,14 +1920,13 @@
{
IdList* const l = mem_gc_allocate_n_zeroed_typed(interp, 1, IdList);
l->id = $1;
- l->unique_reg = $2;
$$ = l;
}
;
opt_unique_reg:
- /* empty */ { $$ = 0; }
- | UNIQUE_REG { $$ = 1; }
+ /* empty */
+ | UNIQUE_REG
;
@@ -1945,10 +1938,7 @@
IdList *l = $4;
while (l) {
IdList *l1;
- if (l->unique_reg)
- mk_ident_ur(interp, l->id, $3);
- else
- mk_ident(interp, l->id, $3);
+ mk_ident(interp, l->id, $3);
l1 = l;
l = l->next;
mem_sys_free(l1->id);
@@ -2003,7 +1993,7 @@
| TAILCALL sub_call
{
$$ = NULL;
- IMCC_INFO(interp)->cur_call->pcc_sub->flags |= isTAIL_CALL;
+ IMCC_INFO(interp)->cur_call->pcc_sub->tailcall = 1;
IMCC_INFO(interp)->cur_call = NULL;
}
| GOTO label_op
@@ -2037,19 +2027,6 @@
| PMCV { $$ = 'P'; }
;
-classname:
- IDENTIFIER
- {
- /* 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 = 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);
- }
- }
- ;
-
assignment:
target '=' var
{ $$ = MK_I(interp, IMCC_INFO(interp)->cur_unit, "set", 2, $1, $3); }
@@ -2061,11 +2038,6 @@
{ $$ = iINDEXFETCH(interp, IMCC_INFO(interp)->cur_unit, $1, $3, $5); }
| target '[' keylist ']' '=' var
{ $$ = iINDEXSET(interp, IMCC_INFO(interp)->cur_unit, $1, $3, $6); }
- /* Removing this line causes test failures in t/compilers/tge/* for
- some reason. Eventually it should be removed and the normal handling
- of ops should be used for all forms of "new". */
- | target '=' 'new' classname '[' keylist ']'
- { $$ = iNEW(interp, IMCC_INFO(interp)->cur_unit, $1, $4, $6, 1); }
/* Subroutine call the short way */
| target '=' sub_call
{
Modified: branches/codestring/compilers/imcc/imclexer.c
==============================================================================
--- branches/codestring/compilers/imcc/imclexer.c Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/compilers/imcc/imclexer.c Mon May 10 13:15:51 2010 (r46471)
@@ -75,6 +75,7 @@
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
+#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -105,8 +106,6 @@
#define UINT32_MAX (4294967295U)
#endif
-#endif /* ! C99 */
-
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -180,15 +179,7 @@
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k.
- * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
- * Ditto for the __ia64__ case accordingly.
- */
-#define YY_BUF_SIZE 32768
-#else
#define YY_BUF_SIZE 16384
-#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -2554,7 +2545,7 @@
-#line 2558 "compilers/imcc/imclexer.c"
+#line 2549 "compilers/imcc/imclexer.c"
#define INITIAL 0
#define emit 1
@@ -2689,12 +2680,7 @@
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
-#ifdef __ia64__
-/* On IA-64, the buffer size is 16k, not 8k */
-#define YY_READ_BUF_SIZE 16384
-#else
#define YY_READ_BUF_SIZE 8192
-#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -2702,7 +2688,7 @@
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
+#define ECHO fwrite( yytext, yyleng, 1, yyout )
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -2713,7 +2699,7 @@
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- size_t n; \
+ int n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -2818,7 +2804,7 @@
return 0;
}
-#line 2822 "compilers/imcc/imclexer.c"
+#line 2808 "compilers/imcc/imclexer.c"
if ( !yyg->yy_init )
{
@@ -4027,7 +4013,7 @@
#line 740 "compilers/imcc/imcc.l"
ECHO;
YY_BREAK
-#line 4031 "compilers/imcc/imclexer.c"
+#line 4017 "compilers/imcc/imclexer.c"
case YY_STATE_EOF(pod):
case YY_STATE_EOF(cmt1):
case YY_STATE_EOF(cmt2):
@@ -4816,8 +4802,8 @@
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
- * @param yybytes the byte buffer to scan
- * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
+ * @param bytes the byte buffer to scan
+ * @param len the number of bytes in the buffer pointed to by @a bytes.
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
@@ -5273,6 +5259,7 @@
static macro_frame_t *
new_frame(PARROT_INTERP) {
+ /* XXX non-reentrant */
static int label = 0;
macro_frame_t * const tmp = mem_gc_allocate_zeroed_typed(interp, macro_frame_t);
Modified: branches/codestring/compilers/imcc/imcparser.c
==============================================================================
--- branches/codestring/compilers/imcc/imcparser.c Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/compilers/imcc/imcparser.c Mon May 10 13:15:51 2010 (r46471)
@@ -9,12 +9,13 @@
*/
/* HEADERIZER HFILE: none */
/* HEADERIZER STOP */
-/* A Bison parser, made by GNU Bison 2.4.2. */
+
+/* A Bison parser, made by GNU Bison 2.4.1. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
- Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software
- Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -56,7 +57,7 @@
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.4.2"
+#define YYBISON_VERSION "2.4.1"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -923,12 +924,6 @@
IMCC_INFO(interp)->cur_obj;
IMCC_INFO(interp)->cur_obj = NULL;
}
-
- if (IMCC_INFO(interp)->cur_call->pcc_sub->sub->pmc_type == enum_class_NCI)
- IMCC_INFO(interp)->cur_call->pcc_sub->flags |= isNCI;
-
- if (IMCC_INFO(interp)->cur_unit->type == IMC_PCCSUB)
- IMCC_INFO(interp)->cur_unit->instructions->symregs[0]->pcc_sub->calls_a_sub |= 1;
}
@@ -951,8 +946,7 @@
if (!ins || !ins->symregs[0] || !(ins->symregs[0]->type & VT_PCC_SUB))
IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
"yield or return directive outside pcc subroutine\n");
- if (yield)
- ins->symregs[0]->pcc_sub->calls_a_sub = 1 | ITPCCYIELD;
+ ins->symregs[0]->pcc_sub->yield = yield;
snprintf(name, sizeof (name), yield ? "%cpcc_sub_yield_%d" : "%cpcc_sub_ret_%d",
IMCC_INTERNAL_CHAR, IMCC_INFO(interp)->cnr++);
interp->imc_info->sr_return = mk_pcc_sub(interp, name, 0);
@@ -1154,7 +1148,7 @@
/* Line 189 of yacc.c */
-#line 1147 "compilers/imcc/imcparser.c"
+#line 1141 "compilers/imcc/imcparser.c"
/* Enabling traces. */
#ifndef YYDEBUG
@@ -1200,107 +1194,104 @@
ADV_OPT_FLAG = 274,
ADV_NAMED = 275,
ADV_ARROW = 276,
- NEW = 277,
- ADV_INVOCANT = 278,
- ADV_CALL_SIG = 279,
- NAMESPACE = 280,
- DOT_METHOD = 281,
- SUB = 282,
- SYM = 283,
- LOCAL = 284,
- LEXICAL = 285,
- CONST = 286,
- ANNOTATE = 287,
- INC = 288,
- DEC = 289,
- GLOBAL_CONST = 290,
- PLUS_ASSIGN = 291,
- MINUS_ASSIGN = 292,
- MUL_ASSIGN = 293,
- DIV_ASSIGN = 294,
- CONCAT_ASSIGN = 295,
- BAND_ASSIGN = 296,
- BOR_ASSIGN = 297,
- BXOR_ASSIGN = 298,
- FDIV = 299,
- FDIV_ASSIGN = 300,
- MOD_ASSIGN = 301,
- SHR_ASSIGN = 302,
- SHL_ASSIGN = 303,
- SHR_U_ASSIGN = 304,
- SHIFT_LEFT = 305,
- SHIFT_RIGHT = 306,
- INTV = 307,
- FLOATV = 308,
- STRINGV = 309,
- PMCV = 310,
- LOG_XOR = 311,
- RELOP_EQ = 312,
- RELOP_NE = 313,
- RELOP_GT = 314,
- RELOP_GTE = 315,
- RELOP_LT = 316,
- RELOP_LTE = 317,
- RESULT = 318,
- RETURN = 319,
- TAILCALL = 320,
- YIELDT = 321,
- GET_RESULTS = 322,
- POW = 323,
- SHIFT_RIGHT_U = 324,
- LOG_AND = 325,
- LOG_OR = 326,
- COMMA = 327,
- ESUB = 328,
- DOTDOT = 329,
- PCC_BEGIN = 330,
- PCC_END = 331,
- PCC_CALL = 332,
- PCC_SUB = 333,
- PCC_BEGIN_RETURN = 334,
- PCC_END_RETURN = 335,
- PCC_BEGIN_YIELD = 336,
- PCC_END_YIELD = 337,
- NCI_CALL = 338,
- METH_CALL = 339,
- INVOCANT = 340,
- MAIN = 341,
- LOAD = 342,
- INIT = 343,
- IMMEDIATE = 344,
- POSTCOMP = 345,
- METHOD = 346,
- ANON = 347,
- OUTER = 348,
- NEED_LEX = 349,
- MULTI = 350,
- VTABLE_METHOD = 351,
- LOADLIB = 352,
- SUB_INSTANCE_OF = 353,
- SUBID = 354,
- NS_ENTRY = 355,
- UNIQUE_REG = 356,
- LABEL = 357,
- EMIT = 358,
- EOM = 359,
- IREG = 360,
- NREG = 361,
- SREG = 362,
- PREG = 363,
- IDENTIFIER = 364,
- REG = 365,
- MACRO = 366,
- ENDM = 367,
- STRINGC = 368,
- INTC = 369,
- FLOATC = 370,
- USTRINGC = 371,
- PARROT_OP = 372,
- VAR = 373,
- LINECOMMENT = 374,
- FILECOMMENT = 375,
- DOT = 376,
- CONCAT = 377
+ ADV_INVOCANT = 277,
+ ADV_CALL_SIG = 278,
+ NAMESPACE = 279,
+ DOT_METHOD = 280,
+ SUB = 281,
+ SYM = 282,
+ LOCAL = 283,
+ LEXICAL = 284,
+ CONST = 285,
+ ANNOTATE = 286,
+ GLOBAL_CONST = 287,
+ PLUS_ASSIGN = 288,
+ MINUS_ASSIGN = 289,
+ MUL_ASSIGN = 290,
+ DIV_ASSIGN = 291,
+ CONCAT_ASSIGN = 292,
+ BAND_ASSIGN = 293,
+ BOR_ASSIGN = 294,
+ BXOR_ASSIGN = 295,
+ FDIV = 296,
+ FDIV_ASSIGN = 297,
+ MOD_ASSIGN = 298,
+ SHR_ASSIGN = 299,
+ SHL_ASSIGN = 300,
+ SHR_U_ASSIGN = 301,
+ SHIFT_LEFT = 302,
+ SHIFT_RIGHT = 303,
+ INTV = 304,
+ FLOATV = 305,
+ STRINGV = 306,
+ PMCV = 307,
+ LOG_XOR = 308,
+ RELOP_EQ = 309,
+ RELOP_NE = 310,
+ RELOP_GT = 311,
+ RELOP_GTE = 312,
+ RELOP_LT = 313,
+ RELOP_LTE = 314,
+ RESULT = 315,
+ RETURN = 316,
+ TAILCALL = 317,
+ YIELDT = 318,
+ GET_RESULTS = 319,
+ POW = 320,
+ SHIFT_RIGHT_U = 321,
+ LOG_AND = 322,
+ LOG_OR = 323,
+ COMMA = 324,
+ ESUB = 325,
+ DOTDOT = 326,
+ PCC_BEGIN = 327,
+ PCC_END = 328,
+ PCC_CALL = 329,
+ PCC_SUB = 330,
+ PCC_BEGIN_RETURN = 331,
+ PCC_END_RETURN = 332,
+ PCC_BEGIN_YIELD = 333,
+ PCC_END_YIELD = 334,
+ NCI_CALL = 335,
+ METH_CALL = 336,
+ INVOCANT = 337,
+ MAIN = 338,
+ LOAD = 339,
+ INIT = 340,
+ IMMEDIATE = 341,
+ POSTCOMP = 342,
+ METHOD = 343,
+ ANON = 344,
+ OUTER = 345,
+ NEED_LEX = 346,
+ MULTI = 347,
+ VTABLE_METHOD = 348,
+ LOADLIB = 349,
+ SUB_INSTANCE_OF = 350,
+ SUBID = 351,
+ NS_ENTRY = 352,
+ UNIQUE_REG = 353,
+ LABEL = 354,
+ EMIT = 355,
+ EOM = 356,
+ IREG = 357,
+ NREG = 358,
+ SREG = 359,
+ PREG = 360,
+ IDENTIFIER = 361,
+ REG = 362,
+ MACRO = 363,
+ ENDM = 364,
+ STRINGC = 365,
+ INTC = 366,
+ FLOATC = 367,
+ USTRINGC = 368,
+ PARROT_OP = 369,
+ VAR = 370,
+ LINECOMMENT = 371,
+ FILECOMMENT = 372,
+ DOT = 373,
+ CONCAT = 374
};
#endif
/* Tokens. */
@@ -1323,107 +1314,104 @@
#define ADV_OPT_FLAG 274
#define ADV_NAMED 275
#define ADV_ARROW 276
-#define NEW 277
-#define ADV_INVOCANT 278
-#define ADV_CALL_SIG 279
-#define NAMESPACE 280
-#define DOT_METHOD 281
-#define SUB 282
-#define SYM 283
-#define LOCAL 284
-#define LEXICAL 285
-#define CONST 286
-#define ANNOTATE 287
-#define INC 288
-#define DEC 289
-#define GLOBAL_CONST 290
-#define PLUS_ASSIGN 291
-#define MINUS_ASSIGN 292
-#define MUL_ASSIGN 293
-#define DIV_ASSIGN 294
-#define CONCAT_ASSIGN 295
-#define BAND_ASSIGN 296
-#define BOR_ASSIGN 297
-#define BXOR_ASSIGN 298
-#define FDIV 299
-#define FDIV_ASSIGN 300
-#define MOD_ASSIGN 301
-#define SHR_ASSIGN 302
-#define SHL_ASSIGN 303
-#define SHR_U_ASSIGN 304
-#define SHIFT_LEFT 305
-#define SHIFT_RIGHT 306
-#define INTV 307
-#define FLOATV 308
-#define STRINGV 309
-#define PMCV 310
-#define LOG_XOR 311
-#define RELOP_EQ 312
-#define RELOP_NE 313
-#define RELOP_GT 314
-#define RELOP_GTE 315
-#define RELOP_LT 316
-#define RELOP_LTE 317
-#define RESULT 318
-#define RETURN 319
-#define TAILCALL 320
-#define YIELDT 321
-#define GET_RESULTS 322
-#define POW 323
-#define SHIFT_RIGHT_U 324
-#define LOG_AND 325
-#define LOG_OR 326
-#define COMMA 327
-#define ESUB 328
-#define DOTDOT 329
-#define PCC_BEGIN 330
-#define PCC_END 331
-#define PCC_CALL 332
-#define PCC_SUB 333
-#define PCC_BEGIN_RETURN 334
-#define PCC_END_RETURN 335
-#define PCC_BEGIN_YIELD 336
-#define PCC_END_YIELD 337
-#define NCI_CALL 338
-#define METH_CALL 339
-#define INVOCANT 340
-#define MAIN 341
-#define LOAD 342
-#define INIT 343
-#define IMMEDIATE 344
-#define POSTCOMP 345
-#define METHOD 346
-#define ANON 347
-#define OUTER 348
-#define NEED_LEX 349
-#define MULTI 350
-#define VTABLE_METHOD 351
-#define LOADLIB 352
-#define SUB_INSTANCE_OF 353
-#define SUBID 354
-#define NS_ENTRY 355
-#define UNIQUE_REG 356
-#define LABEL 357
-#define EMIT 358
-#define EOM 359
-#define IREG 360
-#define NREG 361
-#define SREG 362
-#define PREG 363
-#define IDENTIFIER 364
-#define REG 365
-#define MACRO 366
-#define ENDM 367
-#define STRINGC 368
-#define INTC 369
-#define FLOATC 370
-#define USTRINGC 371
-#define PARROT_OP 372
-#define VAR 373
-#define LINECOMMENT 374
-#define FILECOMMENT 375
-#define DOT 376
-#define CONCAT 377
+#define ADV_INVOCANT 277
+#define ADV_CALL_SIG 278
+#define NAMESPACE 279
+#define DOT_METHOD 280
+#define SUB 281
+#define SYM 282
+#define LOCAL 283
+#define LEXICAL 284
+#define CONST 285
+#define ANNOTATE 286
+#define GLOBAL_CONST 287
+#define PLUS_ASSIGN 288
+#define MINUS_ASSIGN 289
+#define MUL_ASSIGN 290
+#define DIV_ASSIGN 291
+#define CONCAT_ASSIGN 292
+#define BAND_ASSIGN 293
+#define BOR_ASSIGN 294
+#define BXOR_ASSIGN 295
+#define FDIV 296
+#define FDIV_ASSIGN 297
+#define MOD_ASSIGN 298
+#define SHR_ASSIGN 299
+#define SHL_ASSIGN 300
+#define SHR_U_ASSIGN 301
+#define SHIFT_LEFT 302
+#define SHIFT_RIGHT 303
+#define INTV 304
+#define FLOATV 305
+#define STRINGV 306
+#define PMCV 307
+#define LOG_XOR 308
+#define RELOP_EQ 309
+#define RELOP_NE 310
+#define RELOP_GT 311
+#define RELOP_GTE 312
+#define RELOP_LT 313
+#define RELOP_LTE 314
+#define RESULT 315
+#define RETURN 316
+#define TAILCALL 317
+#define YIELDT 318
+#define GET_RESULTS 319
+#define POW 320
+#define SHIFT_RIGHT_U 321
+#define LOG_AND 322
+#define LOG_OR 323
+#define COMMA 324
+#define ESUB 325
+#define DOTDOT 326
+#define PCC_BEGIN 327
+#define PCC_END 328
+#define PCC_CALL 329
+#define PCC_SUB 330
+#define PCC_BEGIN_RETURN 331
+#define PCC_END_RETURN 332
+#define PCC_BEGIN_YIELD 333
+#define PCC_END_YIELD 334
+#define NCI_CALL 335
+#define METH_CALL 336
+#define INVOCANT 337
+#define MAIN 338
+#define LOAD 339
+#define INIT 340
+#define IMMEDIATE 341
+#define POSTCOMP 342
+#define METHOD 343
+#define ANON 344
+#define OUTER 345
+#define NEED_LEX 346
+#define MULTI 347
+#define VTABLE_METHOD 348
+#define LOADLIB 349
+#define SUB_INSTANCE_OF 350
+#define SUBID 351
+#define NS_ENTRY 352
+#define UNIQUE_REG 353
+#define LABEL 354
+#define EMIT 355
+#define EOM 356
+#define IREG 357
+#define NREG 358
+#define SREG 359
+#define PREG 360
+#define IDENTIFIER 361
+#define REG 362
+#define MACRO 363
+#define ENDM 364
+#define STRINGC 365
+#define INTC 366
+#define FLOATC 367
+#define USTRINGC 368
+#define PARROT_OP 369
+#define VAR 370
+#define LINECOMMENT 371
+#define FILECOMMENT 372
+#define DOT 373
+#define CONCAT 374
@@ -1433,7 +1421,7 @@
{
/* Line 214 of yacc.c */
-#line 1075 "compilers/imcc/imcc.y"
+#line 1068 "compilers/imcc/imcc.y"
IdList * idlist;
int t;
@@ -1444,7 +1432,7 @@
/* Line 214 of yacc.c */
-#line 1437 "compilers/imcc/imcparser.c"
+#line 1425 "compilers/imcc/imcparser.c"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -1456,7 +1444,7 @@
/* Line 264 of yacc.c */
-#line 1449 "compilers/imcc/imcparser.c"
+#line 1437 "compilers/imcc/imcparser.c"
#ifdef short
# undef short
@@ -1506,7 +1494,7 @@
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
-# if defined YYENABLE_NLS && YYENABLE_NLS
+# if YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -1671,20 +1659,20 @@
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 31
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 686
+#define YYLAST 642
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 140
+#define YYNTOKENS 136
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 126
+#define YYNNTS 125
/* YYNRULES -- Number of rules. */
-#define YYNRULES 339
+#define YYNRULES 337
/* YYNRULES -- Number of states. */
-#define YYNSTATES 545
+#define YYNSTATES 539
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 377
+#define YYMAXUTOK 374
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -1695,16 +1683,16 @@
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
4, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 130, 2, 2, 2, 136, 137, 2,
- 127, 128, 134, 133, 2, 132, 2, 135, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 139,
- 2, 124, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 126, 2, 2, 2, 132, 133, 2,
+ 124, 125, 130, 129, 2, 128, 2, 131, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 135,
+ 2, 121, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 122, 2, 123, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 125, 2, 126, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 129, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 138, 2, 131, 2, 2, 2,
+ 2, 2, 2, 2, 134, 2, 127, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
@@ -1729,7 +1717,7 @@
86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
106, 107, 108, 109, 110, 111, 112, 113, 114, 115,
- 116, 117, 118, 119, 120, 121, 122, 123
+ 116, 117, 118, 119, 120
};
#if YYDEBUG
@@ -1757,161 +1745,160 @@
486, 490, 493, 495, 499, 502, 503, 505, 507, 509,
510, 515, 520, 525, 526, 533, 535, 536, 543, 546,
549, 552, 555, 557, 559, 561, 563, 564, 566, 568,
- 570, 572, 574, 578, 583, 589, 596, 603, 611, 615,
- 616, 626, 628, 630, 632, 636, 638, 640, 642, 644,
- 646, 648, 650, 652, 654, 656, 658, 660, 662, 664,
- 666, 668, 670, 672, 674, 676, 678, 680, 682, 684,
- 686, 688, 689, 695, 699, 701, 703, 705, 707, 709,
- 711, 713, 715, 717, 719, 721, 723, 725, 730, 732,
- 734, 736, 738, 742, 746, 750, 754, 755, 761, 762,
- 766, 768, 774, 778, 782, 785, 786, 789, 791, 793,
- 795, 800, 805, 808, 812, 818, 820, 824, 825, 827,
- 829, 836, 842, 847, 852, 859, 865, 867, 869, 871,
- 873, 875, 877, 879, 881, 883, 885, 886, 888, 892,
- 894, 896, 901, 905, 907, 909, 911, 913, 915, 917,
- 919, 921, 923, 925, 927, 928, 931, 932, 935, 937,
- 941, 943, 945, 947, 949, 951, 953, 955, 957, 959
+ 570, 572, 576, 581, 587, 594, 601, 605, 606, 616,
+ 618, 620, 622, 626, 628, 630, 632, 634, 636, 638,
+ 640, 642, 644, 646, 648, 650, 652, 654, 656, 658,
+ 660, 662, 664, 666, 668, 670, 672, 674, 676, 678,
+ 679, 685, 689, 691, 693, 695, 697, 699, 701, 703,
+ 705, 707, 709, 711, 713, 715, 720, 722, 724, 726,
+ 728, 732, 736, 740, 744, 745, 751, 752, 756, 758,
+ 764, 768, 772, 775, 776, 779, 781, 783, 785, 790,
+ 795, 798, 802, 808, 810, 814, 815, 817, 819, 826,
+ 832, 837, 842, 849, 855, 857, 859, 861, 863, 865,
+ 867, 869, 871, 873, 875, 876, 878, 882, 884, 886,
+ 891, 895, 897, 899, 901, 903, 905, 907, 909, 911,
+ 913, 915, 917, 918, 921, 922, 925, 927, 931, 933,
+ 935, 937, 939, 941, 943, 945, 947, 949
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int16 yyrhs[] =
{
- 141, 0, -1, 142, -1, 143, -1, 142, 143, -1,
- 163, -1, 148, -1, 165, -1, 160, -1, 112, 4,
- -1, 144, -1, 145, -1, 4, -1, 147, 4, -1,
- 98, 114, 4, -1, 8, 115, 73, 114, 4, -1,
- 9, 114, 4, -1, 33, 114, 73, 265, -1, 7,
- 114, -1, -1, 32, 149, 224, 110, 124, 265, -1,
- -1, 32, 151, 115, 256, 124, 153, -1, -1, 32,
- 152, 114, 256, 124, 153, -1, 114, -1, 117, -1,
- 155, -1, 154, 155, -1, 213, 156, 4, -1, 112,
- 4, -1, 121, -1, 120, -1, 163, -1, 150, -1,
- 144, -1, -1, 157, 118, 159, -1, -1, 79, 158,
- 187, 103, -1, 14, 257, -1, 31, 114, 73, 111,
- -1, -1, 250, -1, -1, 104, 161, 162, 105, -1,
- -1, 154, -1, 26, 164, 4, -1, 125, 258, 126,
- -1, 125, 126, -1, -1, -1, -1, 28, 166, 253,
- 167, 187, 4, 168, 169, 182, 74, -1, -1, 169,
- 4, -1, 169, 170, 4, -1, -1, 5, 171, 172,
- -1, 224, 110, 196, -1, 96, 127, 180, 128, -1,
- 94, 127, 114, 128, -1, 94, 127, 110, 128, -1,
- 97, -1, 97, 127, 114, 128, -1, 92, -1, 92,
- 127, 153, 128, -1, 101, -1, 101, 127, 153, 128,
- -1, 99, 127, 114, 128, -1, 100, -1, 100, 127,
- 153, 128, -1, -1, 180, 73, 181, -1, 181, -1,
- 53, -1, 54, -1, 56, -1, 55, -1, 110, -1,
- 114, -1, 125, 258, 126, -1, -1, 210, -1, -1,
- 76, 4, 184, 191, 186, 190, 185, 193, 77, -1,
- -1, 215, 4, -1, -1, 86, 257, 4, -1, -1,
- 188, -1, 189, -1, 188, 189, -1, 88, -1, 89,
- -1, 87, -1, 90, -1, 91, -1, 93, -1, 95,
- -1, 173, -1, 174, -1, 175, -1, 176, -1, 177,
- -1, 178, -1, 179, -1, 78, 257, 73, 257, 4,
- -1, 78, 257, 4, -1, 84, 257, 4, -1, 85,
- 249, 4, -1, 85, 114, 4, -1, 85, 249, 73,
- 257, 4, -1, 85, 114, 73, 257, 4, -1, -1,
- 191, 192, 4, -1, 11, 239, -1, -1, 193, 194,
- 4, -1, 64, 249, 196, -1, -1, 30, 195, 224,
- 218, -1, -1, 196, 197, -1, 18, -1, 19, -1,
- 20, -1, 21, -1, 21, 127, 114, 128, -1, 21,
- 127, 117, 128, -1, 102, -1, 25, -1, -1, 80,
- 4, 199, 202, 81, -1, 206, -1, -1, 82, 4,
- 201, 203, 83, -1, -1, 202, 4, -1, 202, 204,
- 4, -1, -1, 203, 4, -1, 203, 205, 4, -1,
- 15, 257, 240, -1, 16, 257, 240, -1, -1, 208,
- 127, 207, 209, 128, -1, 65, -1, 67, -1, -1,
- 239, -1, 114, 22, 257, -1, 209, 73, 239, -1,
- 209, 73, 114, 22, 257, -1, 212, -1, 210, 212,
- -1, -1, 211, 216, -1, 112, 4, -1, 121, -1,
- 120, -1, 145, -1, 146, -1, -1, 214, -1, 214,
- 215, -1, 215, -1, 103, -1, 213, 220, 4, -1,
- 1, 4, -1, 218, -1, 217, 73, 218, -1, 110,
- 219, -1, -1, 102, -1, 226, -1, 244, -1, -1,
- 30, 221, 224, 217, -1, 31, 114, 73, 249, -1,
- 31, 117, 73, 249, -1, -1, 32, 222, 224, 110,
- 124, 265, -1, 150, -1, -1, 36, 223, 224, 110,
- 124, 265, -1, 66, 236, -1, 10, 255, -1, 118,
- 250, -1, 14, 257, -1, 236, -1, 183, -1, 198,
- -1, 200, -1, -1, 53, -1, 54, -1, 55, -1,
- 56, -1, 110, -1, 249, 124, 257, -1, 249, 124,
- 228, 257, -1, 249, 124, 257, 229, 257, -1, 249,
- 124, 257, 125, 258, 126, -1, 249, 125, 258, 126,
- 124, 257, -1, 249, 124, 129, 225, 125, 258, 126,
- -1, 249, 124, 236, -1, -1, 127, 227, 243, 128,
- 124, 235, 127, 238, 128, -1, 230, -1, 232, -1,
- 234, -1, 249, 124, 14, -1, 130, -1, 131, -1,
- 132, -1, 132, -1, 133, -1, 134, -1, 135, -1,
- 136, -1, 45, -1, 69, -1, 123, -1, 58, -1,
- 59, -1, 60, -1, 61, -1, 62, -1, 63, -1,
- 51, -1, 52, -1, 70, -1, 71, -1, 72, -1,
- 57, -1, 137, -1, 138, -1, 131, -1, -1, 68,
- 231, 127, 243, 128, -1, 249, 233, 257, -1, 37,
- -1, 38, -1, 39, -1, 40, -1, 47, -1, 46,
- -1, 41, -1, 42, -1, 43, -1, 44, -1, 48,
- -1, 49, -1, 50, -1, 249, 124, 118, 159, -1,
- 110, -1, 114, -1, 117, -1, 249, -1, 249, 122,
- 254, -1, 249, 122, 117, -1, 249, 122, 114, -1,
- 249, 122, 249, -1, -1, 235, 237, 127, 238, 128,
- -1, -1, 238, 73, 239, -1, 239, -1, 238, 73,
- 114, 22, 257, -1, 257, 22, 257, -1, 114, 22,
- 257, -1, 257, 240, -1, -1, 240, 241, -1, 17,
- -1, 21, -1, 25, -1, 21, 127, 117, 128, -1,
- 21, 127, 114, 128, -1, 249, 196, -1, 243, 73,
- 242, -1, 243, 73, 114, 22, 249, -1, 242, -1,
- 114, 22, 249, -1, -1, 246, -1, 245, -1, 13,
- 257, 248, 257, 10, 255, -1, 13, 14, 257, 10,
- 255, -1, 13, 257, 247, 255, -1, 12, 257, 247,
- 255, -1, 12, 257, 248, 257, 10, 255, -1, 12,
- 14, 257, 10, 255, -1, 73, -1, 10, -1, 58,
- -1, 59, -1, 60, -1, 61, -1, 62, -1, 63,
- -1, 119, -1, 264, -1, -1, 251, -1, 251, 73,
- 252, -1, 252, -1, 256, -1, 249, 125, 258, 126,
- -1, 125, 260, 126, -1, 254, -1, 114, -1, 117,
- -1, 110, -1, 118, -1, 110, -1, 118, -1, 255,
- -1, 257, -1, 249, -1, 265, -1, -1, 259, 262,
- -1, -1, 261, 262, -1, 263, -1, 262, 139, 263,
- -1, 257, -1, 106, -1, 107, -1, 108, -1, 109,
- -1, 111, -1, 115, -1, 116, -1, 114, -1, 117,
+ 137, 0, -1, 138, -1, 139, -1, 138, 139, -1,
+ 159, -1, 144, -1, 161, -1, 156, -1, 109, 4,
+ -1, 140, -1, 141, -1, 4, -1, 143, 4, -1,
+ 95, 111, 4, -1, 8, 112, 70, 111, 4, -1,
+ 9, 111, 4, -1, 32, 111, 70, 260, -1, 7,
+ 111, -1, -1, 31, 145, 220, 107, 121, 260, -1,
+ -1, 31, 147, 112, 251, 121, 149, -1, -1, 31,
+ 148, 111, 251, 121, 149, -1, 111, -1, 114, -1,
+ 151, -1, 150, 151, -1, 209, 152, 4, -1, 109,
+ 4, -1, 118, -1, 117, -1, 159, -1, 146, -1,
+ 140, -1, -1, 153, 115, 155, -1, -1, 76, 154,
+ 183, 100, -1, 14, 252, -1, 30, 111, 70, 108,
+ -1, -1, 245, -1, -1, 101, 157, 158, 102, -1,
+ -1, 150, -1, 25, 160, 4, -1, 122, 253, 123,
+ -1, 122, 123, -1, -1, -1, -1, 27, 162, 248,
+ 163, 183, 4, 164, 165, 178, 71, -1, -1, 165,
+ 4, -1, 165, 166, 4, -1, -1, 5, 167, 168,
+ -1, 220, 107, 192, -1, 93, 124, 176, 125, -1,
+ 91, 124, 111, 125, -1, 91, 124, 107, 125, -1,
+ 94, -1, 94, 124, 111, 125, -1, 89, -1, 89,
+ 124, 149, 125, -1, 98, -1, 98, 124, 149, 125,
+ -1, 96, 124, 111, 125, -1, 97, -1, 97, 124,
+ 149, 125, -1, -1, 176, 70, 177, -1, 177, -1,
+ 50, -1, 51, -1, 53, -1, 52, -1, 107, -1,
+ 111, -1, 122, 253, 123, -1, -1, 206, -1, -1,
+ 73, 4, 180, 187, 182, 186, 181, 189, 74, -1,
+ -1, 211, 4, -1, -1, 83, 252, 4, -1, -1,
+ 184, -1, 185, -1, 184, 185, -1, 85, -1, 86,
+ -1, 84, -1, 87, -1, 88, -1, 90, -1, 92,
+ -1, 169, -1, 170, -1, 171, -1, 172, -1, 173,
+ -1, 174, -1, 175, -1, 75, 252, 70, 252, 4,
+ -1, 75, 252, 4, -1, 81, 252, 4, -1, 82,
+ 244, 4, -1, 82, 111, 4, -1, 82, 244, 70,
+ 252, 4, -1, 82, 111, 70, 252, 4, -1, -1,
+ 187, 188, 4, -1, 11, 234, -1, -1, 189, 190,
+ 4, -1, 61, 244, 192, -1, -1, 29, 191, 220,
+ 214, -1, -1, 192, 193, -1, 18, -1, 19, -1,
+ 20, -1, 21, -1, 21, 124, 111, 125, -1, 21,
+ 124, 114, 125, -1, 99, -1, 24, -1, -1, 77,
+ 4, 195, 198, 78, -1, 202, -1, -1, 79, 4,
+ 197, 199, 80, -1, -1, 198, 4, -1, 198, 200,
+ 4, -1, -1, 199, 4, -1, 199, 201, 4, -1,
+ 15, 252, 235, -1, 16, 252, 235, -1, -1, 204,
+ 124, 203, 205, 125, -1, 62, -1, 64, -1, -1,
+ 234, -1, 111, 22, 252, -1, 205, 70, 234, -1,
+ 205, 70, 111, 22, 252, -1, 208, -1, 206, 208,
+ -1, -1, 207, 212, -1, 109, 4, -1, 118, -1,
+ 117, -1, 141, -1, 142, -1, -1, 210, -1, 210,
+ 211, -1, 211, -1, 100, -1, 209, 216, 4, -1,
+ 1, 4, -1, 214, -1, 213, 70, 214, -1, 107,
+ 215, -1, -1, 99, -1, 221, -1, 239, -1, -1,
+ 29, 217, 220, 213, -1, 30, 111, 70, 244, -1,
+ 30, 114, 70, 244, -1, -1, 31, 218, 220, 107,
+ 121, 260, -1, 146, -1, -1, 33, 219, 220, 107,
+ 121, 260, -1, 63, 231, -1, 10, 250, -1, 115,
+ 245, -1, 14, 252, -1, 231, -1, 179, -1, 194,
+ -1, 196, -1, -1, 50, -1, 51, -1, 52, -1,
+ 53, -1, 244, 121, 252, -1, 244, 121, 223, 252,
+ -1, 244, 121, 252, 224, 252, -1, 244, 121, 252,
+ 122, 253, 123, -1, 244, 122, 253, 123, 121, 252,
+ -1, 244, 121, 231, -1, -1, 124, 222, 238, 125,
+ 121, 230, 124, 233, 125, -1, 225, -1, 227, -1,
+ 229, -1, 244, 121, 14, -1, 126, -1, 127, -1,
+ 128, -1, 128, -1, 129, -1, 130, -1, 131, -1,
+ 132, -1, 42, -1, 66, -1, 120, -1, 55, -1,
+ 56, -1, 57, -1, 58, -1, 59, -1, 60, -1,
+ 48, -1, 49, -1, 67, -1, 68, -1, 69, -1,
+ 54, -1, 133, -1, 134, -1, 127, -1, -1, 65,
+ 226, 124, 238, 125, -1, 244, 228, 252, -1, 34,
+ -1, 35, -1, 36, -1, 37, -1, 44, -1, 43,
+ -1, 38, -1, 39, -1, 40, -1, 41, -1, 45,
+ -1, 46, -1, 47, -1, 244, 121, 115, 155, -1,
+ 107, -1, 111, -1, 114, -1, 244, -1, 244, 119,
+ 249, -1, 244, 119, 114, -1, 244, 119, 111, -1,
+ 244, 119, 244, -1, -1, 230, 232, 124, 233, 125,
+ -1, -1, 233, 70, 234, -1, 234, -1, 233, 70,
+ 111, 22, 252, -1, 252, 22, 252, -1, 111, 22,
+ 252, -1, 252, 235, -1, -1, 235, 236, -1, 17,
+ -1, 21, -1, 24, -1, 21, 124, 114, 125, -1,
+ 21, 124, 111, 125, -1, 244, 192, -1, 238, 70,
+ 237, -1, 238, 70, 111, 22, 244, -1, 237, -1,
+ 111, 22, 244, -1, -1, 241, -1, 240, -1, 13,
+ 252, 243, 252, 10, 250, -1, 13, 14, 252, 10,
+ 250, -1, 13, 252, 242, 250, -1, 12, 252, 242,
+ 250, -1, 12, 252, 243, 252, 10, 250, -1, 12,
+ 14, 252, 10, 250, -1, 70, -1, 10, -1, 55,
+ -1, 56, -1, 57, -1, 58, -1, 59, -1, 60,
+ -1, 116, -1, 259, -1, -1, 246, -1, 246, 70,
+ 247, -1, 247, -1, 251, -1, 244, 122, 253, 123,
+ -1, 122, 255, 123, -1, 249, -1, 111, -1, 114,
+ -1, 107, -1, 115, -1, 107, -1, 115, -1, 250,
+ -1, 252, -1, 244, -1, 260, -1, -1, 254, 257,
+ -1, -1, 256, 257, -1, 258, -1, 257, 135, 258,
+ -1, 252, -1, 103, -1, 104, -1, 105, -1, 106,
+ -1, 108, -1, 112, -1, 113, -1, 111, -1, 114,
-1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 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
+ 0, 1163, 1163, 1167, 1168, 1172, 1173, 1174, 1180, 1186,
+ 1187, 1188, 1189, 1193, 1194, 1203, 1209, 1217, 1229, 1242,
+ 1242, 1251, 1251, 1258, 1258, 1267, 1268, 1272, 1273, 1277,
+ 1278, 1279, 1280, 1281, 1282, 1283, 1286, 1286, 1295, 1294,
+ 1307, 1311, 1324, 1328, 1332, 1332, 1344, 1346, 1350, 1365,
+ 1369, 1374, 1378, 1382, 1373, 1394, 1395, 1396, 1409, 1409,
+ 1413, 1438, 1442, 1448, 1457, 1463, 1472, 1478, 1487, 1493,
+ 1502, 1510, 1515, 1526, 1529, 1534, 1542, 1543, 1544, 1545,
+ 1546, 1557, 1568, 1571, 1573, 1578, 1577, 1608, 1609, 1613,
+ 1614, 1618, 1619, 1623, 1624, 1628, 1629, 1630, 1631, 1632,
+ 1633, 1634, 1635, 1636, 1637, 1638, 1639, 1640, 1641, 1645,
+ 1650, 1654, 1658, 1662, 1666, 1671, 1680, 1681, 1693, 1698,
+ 1699, 1707, 1708, 1708, 1720, 1721, 1725, 1726, 1727, 1728,
+ 1729, 1730, 1731, 1732, 1737, 1737, 1740, 1748, 1748, 1754,
+ 1755, 1760, 1768, 1769, 1774, 1782, 1786, 1791, 1790, 1803,
+ 1804, 1808, 1809, 1819, 1824, 1834, 1843, 1844, 1856, 1860,
+ 1862, 1863, 1864, 1865, 1866, 1870, 1871, 1875, 1876, 1880,
+ 1891, 1892, 1903, 1910, 1919, 1927, 1929, 1934, 1935, 1936,
+ 1936, 1949, 1966, 1979, 1979, 1986, 1987, 1987, 1993, 1999,
+ 2003, 2015, 2016, 2017, 2018, 2019, 2020, 2024, 2025, 2026,
+ 2027, 2031, 2033, 2035, 2037, 2039, 2042, 2049, 2048, 2057,
+ 2058, 2059, 2060, 2068, 2069, 2070, 2074, 2075, 2076, 2077,
+ 2078, 2079, 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2087,
+ 2088, 2089, 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2102,
+ 2101, 2113, 2118, 2119, 2120, 2121, 2122, 2123, 2124, 2125,
+ 2126, 2127, 2128, 2129, 2130, 2135, 2146, 2147, 2148, 2149,
+ 2155, 2169, 2175, 2181, 2187, 2186, 2195, 2196, 2206, 2216,
+ 2223, 2228, 2238, 2242, 2243, 2247, 2248, 2249, 2252, 2253,
+ 2257, 2261, 2271, 2277, 2287, 2292, 2296, 2297, 2301, 2305,
+ 2309, 2316, 2320, 2324, 2331, 2332, 2336, 2337, 2338, 2339,
+ 2340, 2341, 2345, 2346, 2350, 2351, 2355, 2356, 2360, 2361,
+ 2368, 2375, 2376, 2377, 2381, 2382, 2386, 2387, 2391, 2392,
+ 2396, 2397, 2401, 2401, 2413, 2413, 2425, 2426, 2434, 2441,
+ 2442, 2443, 2444, 2445, 2449, 2450, 2451, 2452
};
#endif
@@ -1923,42 +1910,41 @@
"$end", "error", "$undefined", "LOW_PREC", "'\\n'", "PARAM", "SOL",
"HLL", "TK_LINE", "TK_FILE", "GOTO", "ARG", "IF", "UNLESS", "PNULL",
"SET_RETURN", "SET_YIELD", "ADV_FLAT", "ADV_SLURPY", "ADV_OPTIONAL",
- "ADV_OPT_FLAG", "ADV_NAMED", "ADV_ARROW", "NEW", "ADV_INVOCANT",
- "ADV_CALL_SIG", "NAMESPACE", "DOT_METHOD", "SUB", "SYM", "LOCAL",
- "LEXICAL", "CONST", "ANNOTATE", "INC", "DEC", "GLOBAL_CONST",
- "PLUS_ASSIGN", "MINUS_ASSIGN", "MUL_ASSIGN", "DIV_ASSIGN",
- "CONCAT_ASSIGN", "BAND_ASSIGN", "BOR_ASSIGN", "BXOR_ASSIGN", "FDIV",
- "FDIV_ASSIGN", "MOD_ASSIGN", "SHR_ASSIGN", "SHL_ASSIGN", "SHR_U_ASSIGN",
- "SHIFT_LEFT", "SHIFT_RIGHT", "INTV", "FLOATV", "STRINGV", "PMCV",
- "LOG_XOR", "RELOP_EQ", "RELOP_NE", "RELOP_GT", "RELOP_GTE", "RELOP_LT",
- "RELOP_LTE", "RESULT", "RETURN", "TAILCALL", "YIELDT", "GET_RESULTS",
- "POW", "SHIFT_RIGHT_U", "LOG_AND", "LOG_OR", "COMMA", "ESUB", "DOTDOT",
- "PCC_BEGIN", "PCC_END", "PCC_CALL", "PCC_SUB", "PCC_BEGIN_RETURN",
- "PCC_END_RETURN", "PCC_BEGIN_YIELD", "PCC_END_YIELD", "NCI_CALL",
- "METH_CALL", "INVOCANT", "MAIN", "LOAD", "INIT", "IMMEDIATE", "POSTCOMP",
- "METHOD", "ANON", "OUTER", "NEED_LEX", "MULTI", "VTABLE_METHOD",
- "LOADLIB", "SUB_INSTANCE_OF", "SUBID", "NS_ENTRY", "UNIQUE_REG", "LABEL",
- "EMIT", "EOM", "IREG", "NREG", "SREG", "PREG", "IDENTIFIER", "REG",
- "MACRO", "ENDM", "STRINGC", "INTC", "FLOATC", "USTRINGC", "PARROT_OP",
- "VAR", "LINECOMMENT", "FILECOMMENT", "DOT", "CONCAT", "'='", "'['",
- "']'", "'('", "')'", "'n'", "'!'", "'~'", "'-'", "'+'", "'*'", "'/'",
- "'%'", "'&'", "'|'", "';'", "$accept", "program", "compilation_units",
- "compilation_unit", "pragma", "location_directive", "annotate_directive",
- "hll_def", "constdef", "$@1", "pmc_const", "$@2", "$@3", "any_string",
- "pasmcode", "pasmline", "pasm_inst", "$@4", "$@5", "pasm_args", "emit",
- "$@6", "opt_pasmcode", "class_namespace", "maybe_ns", "sub", "$@7",
- "$@8", "$@9", "sub_params", "sub_param", "$@10", "sub_param_type_def",
- "multi", "outer", "vtable", "method", "ns_entry_name", "instanceof",
- "subid", "multi_types", "multi_type", "sub_body", "pcc_sub_call", "@11",
- "opt_label", "opt_invocant", "sub_proto", "sub_proto_list", "proto",
- "pcc_call", "pcc_args", "pcc_arg", "pcc_results", "pcc_result", "$@12",
- "paramtype_list", "paramtype", "pcc_ret", "$@13", "pcc_yield", "$@14",
- "pcc_returns", "pcc_yields", "pcc_return", "pcc_set_yield",
- "pcc_return_many", "$@15", "return_or_yield", "var_returns",
- "statements", "helper_clear_state", "statement", "labels", "_labels",
- "label", "instruction", "id_list", "id_list_id", "opt_unique_reg",
- "labeled_inst", "$@16", "$@17", "$@18", "type", "classname",
- "assignment", "@19", "un_op", "bin_op", "get_results", "@20",
+ "ADV_OPT_FLAG", "ADV_NAMED", "ADV_ARROW", "ADV_INVOCANT", "ADV_CALL_SIG",
+ "NAMESPACE", "DOT_METHOD", "SUB", "SYM", "LOCAL", "LEXICAL", "CONST",
+ "ANNOTATE", "GLOBAL_CONST", "PLUS_ASSIGN", "MINUS_ASSIGN", "MUL_ASSIGN",
+ "DIV_ASSIGN", "CONCAT_ASSIGN", "BAND_ASSIGN", "BOR_ASSIGN",
+ "BXOR_ASSIGN", "FDIV", "FDIV_ASSIGN", "MOD_ASSIGN", "SHR_ASSIGN",
+ "SHL_ASSIGN", "SHR_U_ASSIGN", "SHIFT_LEFT", "SHIFT_RIGHT", "INTV",
+ "FLOATV", "STRINGV", "PMCV", "LOG_XOR", "RELOP_EQ", "RELOP_NE",
+ "RELOP_GT", "RELOP_GTE", "RELOP_LT", "RELOP_LTE", "RESULT", "RETURN",
+ "TAILCALL", "YIELDT", "GET_RESULTS", "POW", "SHIFT_RIGHT_U", "LOG_AND",
+ "LOG_OR", "COMMA", "ESUB", "DOTDOT", "PCC_BEGIN", "PCC_END", "PCC_CALL",
+ "PCC_SUB", "PCC_BEGIN_RETURN", "PCC_END_RETURN", "PCC_BEGIN_YIELD",
+ "PCC_END_YIELD", "NCI_CALL", "METH_CALL", "INVOCANT", "MAIN", "LOAD",
+ "INIT", "IMMEDIATE", "POSTCOMP", "METHOD", "ANON", "OUTER", "NEED_LEX",
+ "MULTI", "VTABLE_METHOD", "LOADLIB", "SUB_INSTANCE_OF", "SUBID",
+ "NS_ENTRY", "UNIQUE_REG", "LABEL", "EMIT", "EOM", "IREG", "NREG", "SREG",
+ "PREG", "IDENTIFIER", "REG", "MACRO", "ENDM", "STRINGC", "INTC",
+ "FLOATC", "USTRINGC", "PARROT_OP", "VAR", "LINECOMMENT", "FILECOMMENT",
+ "DOT", "CONCAT", "'='", "'['", "']'", "'('", "')'", "'!'", "'~'", "'-'",
+ "'+'", "'*'", "'/'", "'%'", "'&'", "'|'", "';'", "$accept", "program",
+ "compilation_units", "compilation_unit", "pragma", "location_directive",
+ "annotate_directive", "hll_def", "constdef", "$@1", "pmc_const", "$@2",
+ "$@3", "any_string", "pasmcode", "pasmline", "pasm_inst", "$@4", "$@5",
+ "pasm_args", "emit", "$@6", "opt_pasmcode", "class_namespace",
+ "maybe_ns", "sub", "$@7", "$@8", "$@9", "sub_params", "sub_param",
+ "$@10", "sub_param_type_def", "multi", "outer", "vtable", "method",
+ "ns_entry_name", "instanceof", "subid", "multi_types", "multi_type",
+ "sub_body", "pcc_sub_call", "@11", "opt_label", "opt_invocant",
+ "sub_proto", "sub_proto_list", "proto", "pcc_call", "pcc_args",
+ "pcc_arg", "pcc_results", "pcc_result", "$@12", "paramtype_list",
+ "paramtype", "pcc_ret", "$@13", "pcc_yield", "$@14", "pcc_returns",
+ "pcc_yields", "pcc_return", "pcc_set_yield", "pcc_return_many", "$@15",
+ "return_or_yield", "var_returns", "statements", "helper_clear_state",
+ "statement", "labels", "_labels", "label", "instruction", "id_list",
+ "id_list_id", "opt_unique_reg", "labeled_inst", "$@16", "$@17", "$@18",
+ "type", "assignment", "@19", "un_op", "bin_op", "get_results", "@20",
"op_assign", "assign_op", "func_assign", "the_sub", "sub_call", "@21",
"arglist", "arg", "argtype_list", "argtype", "result", "targetlist",
"conditional_statement", "unless_statement", "if_statement",
@@ -1986,48 +1972,48 @@
344, 345, 346, 347, 348, 349, 350, 351, 352, 353,
354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
364, 365, 366, 367, 368, 369, 370, 371, 372, 373,
- 374, 375, 376, 377, 61, 91, 93, 40, 41, 110,
- 33, 126, 45, 43, 42, 47, 37, 38, 124, 59
+ 374, 61, 91, 93, 40, 41, 33, 126, 45, 43,
+ 42, 47, 37, 38, 124, 59
};
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint16 yyr1[] =
{
- 0, 140, 141, 142, 142, 143, 143, 143, 143, 143,
- 143, 143, 143, 144, 144, 145, 145, 146, 147, 149,
- 148, 151, 150, 152, 150, 153, 153, 154, 154, 155,
- 155, 155, 155, 155, 155, 155, 157, 156, 158, 156,
- 156, 156, 156, 159, 161, 160, 162, 162, 163, 164,
- 164, 166, 167, 168, 165, 169, 169, 169, 171, 170,
- 172, 173, 174, 174, 175, 175, 176, 176, 177, 177,
- 178, 179, 179, 180, 180, 180, 181, 181, 181, 181,
- 181, 181, 181, 182, 182, 184, 183, 185, 185, 186,
- 186, 187, 187, 188, 188, 189, 189, 189, 189, 189,
- 189, 189, 189, 189, 189, 189, 189, 189, 189, 190,
- 190, 190, 190, 190, 190, 190, 191, 191, 192, 193,
- 193, 194, 195, 194, 196, 196, 197, 197, 197, 197,
- 197, 197, 197, 197, 199, 198, 198, 201, 200, 202,
- 202, 202, 203, 203, 203, 204, 205, 207, 206, 208,
- 208, 209, 209, 209, 209, 209, 210, 210, 211, 212,
- 212, 212, 212, 212, 212, 213, 213, 214, 214, 215,
- 216, 216, 217, 217, 218, 219, 219, 220, 220, 221,
- 220, 220, 220, 222, 220, 220, 223, 220, 220, 220,
- 220, 220, 220, 220, 220, 220, 220, 224, 224, 224,
- 224, 225, 226, 226, 226, 226, 226, 226, 226, 227,
- 226, 226, 226, 226, 226, 228, 228, 228, 229, 229,
- 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
- 229, 229, 229, 229, 229, 229, 229, 229, 229, 229,
- 229, 231, 230, 232, 233, 233, 233, 233, 233, 233,
- 233, 233, 233, 233, 233, 233, 233, 234, 235, 235,
- 235, 235, 235, 235, 235, 235, 237, 236, 238, 238,
- 238, 238, 238, 238, 239, 240, 240, 241, 241, 241,
- 241, 241, 242, 243, 243, 243, 243, 243, 244, 244,
- 245, 245, 245, 246, 246, 246, 247, 247, 248, 248,
- 248, 248, 248, 248, 249, 249, 250, 250, 251, 251,
- 252, 252, 252, 253, 253, 253, 254, 254, 255, 255,
- 256, 256, 257, 257, 259, 258, 261, 260, 262, 262,
- 263, 264, 264, 264, 264, 264, 265, 265, 265, 265
+ 0, 136, 137, 138, 138, 139, 139, 139, 139, 139,
+ 139, 139, 139, 140, 140, 141, 141, 142, 143, 145,
+ 144, 147, 146, 148, 146, 149, 149, 150, 150, 151,
+ 151, 151, 151, 151, 151, 151, 153, 152, 154, 152,
+ 152, 152, 152, 155, 157, 156, 158, 158, 159, 160,
+ 160, 162, 163, 164, 161, 165, 165, 165, 167, 166,
+ 168, 169, 170, 170, 171, 171, 172, 172, 173, 173,
+ 174, 175, 175, 176, 176, 176, 177, 177, 177, 177,
+ 177, 177, 177, 178, 178, 180, 179, 181, 181, 182,
+ 182, 183, 183, 184, 184, 185, 185, 185, 185, 185,
+ 185, 185, 185, 185, 185, 185, 185, 185, 185, 186,
+ 186, 186, 186, 186, 186, 186, 187, 187, 188, 189,
+ 189, 190, 191, 190, 192, 192, 193, 193, 193, 193,
+ 193, 193, 193, 193, 195, 194, 194, 197, 196, 198,
+ 198, 198, 199, 199, 199, 200, 201, 203, 202, 204,
+ 204, 205, 205, 205, 205, 205, 206, 206, 207, 208,
+ 208, 208, 208, 208, 208, 209, 209, 210, 210, 211,
+ 212, 212, 213, 213, 214, 215, 215, 216, 216, 217,
+ 216, 216, 216, 218, 216, 216, 219, 216, 216, 216,
+ 216, 216, 216, 216, 216, 216, 216, 220, 220, 220,
+ 220, 221, 221, 221, 221, 221, 221, 222, 221, 221,
+ 221, 221, 221, 223, 223, 223, 224, 224, 224, 224,
+ 224, 224, 224, 224, 224, 224, 224, 224, 224, 224,
+ 224, 224, 224, 224, 224, 224, 224, 224, 224, 226,
+ 225, 227, 228, 228, 228, 228, 228, 228, 228, 228,
+ 228, 228, 228, 228, 228, 229, 230, 230, 230, 230,
+ 230, 230, 230, 230, 232, 231, 233, 233, 233, 233,
+ 233, 233, 234, 235, 235, 236, 236, 236, 236, 236,
+ 237, 238, 238, 238, 238, 238, 239, 239, 240, 240,
+ 240, 241, 241, 241, 242, 242, 243, 243, 243, 243,
+ 243, 243, 244, 244, 245, 245, 246, 246, 247, 247,
+ 247, 248, 248, 248, 249, 249, 250, 250, 251, 251,
+ 252, 252, 254, 253, 256, 255, 257, 257, 258, 259,
+ 259, 259, 259, 259, 260, 260, 260, 260
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
@@ -2053,20 +2039,20 @@
3, 2, 1, 3, 2, 0, 1, 1, 1, 0,
4, 4, 4, 0, 6, 1, 0, 6, 2, 2,
2, 2, 1, 1, 1, 1, 0, 1, 1, 1,
- 1, 1, 3, 4, 5, 6, 6, 7, 3, 0,
- 9, 1, 1, 1, 3, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 3, 4, 5, 6, 6, 3, 0, 9, 1,
+ 1, 1, 3, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 0, 5, 3, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 4, 1, 1,
- 1, 1, 3, 3, 3, 3, 0, 5, 0, 3,
- 1, 5, 3, 3, 2, 0, 2, 1, 1, 1,
- 4, 4, 2, 3, 5, 1, 3, 0, 1, 1,
- 6, 5, 4, 4, 6, 5, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 0, 1, 3, 1,
- 1, 4, 3, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 0, 2, 0, 2, 1, 3,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 0,
+ 5, 3, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 4, 1, 1, 1, 1,
+ 3, 3, 3, 3, 0, 5, 0, 3, 1, 5,
+ 3, 3, 2, 0, 2, 1, 1, 1, 4, 4,
+ 2, 3, 5, 1, 3, 0, 1, 1, 6, 5,
+ 4, 4, 6, 5, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 0, 1, 3, 1, 1, 4,
+ 3, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 0, 2, 0, 2, 1, 3, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1
};
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -2076,59 +2062,58 @@
{
0, 12, 0, 0, 0, 0, 51, 19, 0, 44,
0, 0, 2, 3, 10, 11, 0, 6, 8, 5,
- 7, 18, 0, 0, 324, 0, 0, 0, 0, 165,
+ 7, 18, 0, 0, 322, 0, 0, 0, 0, 165,
9, 1, 4, 13, 0, 16, 50, 0, 0, 48,
- 316, 314, 315, 317, 52, 313, 197, 198, 199, 200,
+ 314, 312, 313, 315, 52, 311, 197, 198, 199, 200,
0, 14, 21, 169, 0, 32, 31, 35, 34, 165,
- 27, 0, 33, 36, 166, 168, 0, 49, 331, 332,
- 333, 334, 335, 338, 336, 337, 339, 304, 322, 330,
- 325, 328, 305, 323, 91, 0, 0, 0, 30, 28,
+ 27, 0, 33, 36, 166, 168, 0, 49, 329, 330,
+ 331, 332, 333, 336, 334, 335, 337, 302, 320, 328,
+ 323, 326, 303, 321, 91, 0, 0, 0, 30, 28,
45, 0, 0, 38, 0, 0, 167, 15, 0, 97,
95, 96, 98, 99, 66, 100, 0, 101, 0, 64,
0, 71, 68, 102, 103, 104, 105, 106, 107, 108,
0, 92, 93, 0, 0, 0, 40, 0, 91, 29,
- 306, 329, 0, 0, 73, 0, 0, 0, 0, 53,
- 94, 20, 318, 319, 320, 0, 321, 0, 0, 0,
- 326, 37, 322, 43, 307, 309, 310, 25, 26, 0,
- 0, 0, 76, 77, 79, 78, 80, 81, 324, 0,
+ 304, 327, 0, 0, 73, 0, 0, 0, 0, 53,
+ 94, 20, 316, 317, 318, 0, 319, 0, 0, 0,
+ 324, 37, 320, 43, 305, 307, 308, 25, 26, 0,
+ 0, 0, 76, 77, 79, 78, 80, 81, 322, 0,
75, 0, 0, 0, 0, 55, 0, 0, 41, 39,
- 0, 0, 324, 0, 67, 63, 62, 0, 0, 61,
- 65, 70, 72, 69, 158, 22, 24, 312, 327, 0,
- 308, 82, 74, 56, 58, 0, 0, 162, 161, 163,
- 164, 0, 0, 158, 0, 156, 311, 0, 0, 160,
+ 0, 0, 322, 0, 67, 63, 62, 0, 0, 61,
+ 65, 70, 72, 69, 158, 22, 24, 310, 325, 0,
+ 306, 82, 74, 56, 58, 0, 0, 162, 161, 163,
+ 164, 0, 0, 158, 0, 156, 309, 0, 0, 160,
57, 54, 157, 0, 196, 159, 59, 0, 0, 171,
0, 0, 0, 0, 179, 0, 183, 186, 149, 0,
- 150, 241, 0, 0, 0, 258, 259, 260, 306, 209,
- 185, 193, 194, 195, 136, 0, 0, 177, 211, 212,
- 213, 266, 192, 178, 289, 288, 261, 124, 17, 189,
+ 150, 239, 0, 0, 0, 256, 257, 258, 304, 207,
+ 185, 193, 194, 195, 136, 0, 0, 177, 209, 210,
+ 211, 264, 192, 178, 287, 286, 259, 124, 17, 189,
0, 0, 0, 0, 191, 0, 0, 0, 0, 0,
- 188, 261, 0, 85, 134, 137, 190, 287, 147, 170,
- 0, 244, 245, 246, 247, 250, 251, 252, 253, 249,
- 248, 254, 255, 256, 0, 0, 324, 0, 60, 0,
- 297, 298, 299, 300, 301, 302, 303, 296, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 287, 116,
- 139, 142, 0, 285, 0, 124, 151, 268, 264, 263,
- 265, 262, 214, 338, 339, 306, 0, 215, 216, 217,
- 0, 208, 322, 202, 0, 243, 126, 127, 128, 129,
- 133, 132, 125, 0, 293, 0, 0, 292, 0, 175,
- 180, 172, 181, 182, 0, 0, 0, 89, 0, 0,
- 0, 0, 0, 282, 338, 0, 152, 275, 338, 0,
- 270, 275, 257, 201, 0, 203, 223, 232, 233, 237,
- 226, 227, 228, 229, 230, 231, 224, 234, 235, 236,
- 225, 324, 240, 218, 219, 220, 221, 222, 238, 239,
- 0, 0, 0, 295, 0, 291, 0, 176, 174, 0,
- 0, 0, 242, 0, 0, 0, 0, 140, 0, 135,
- 0, 143, 0, 138, 0, 286, 0, 283, 0, 0,
- 0, 148, 274, 0, 0, 267, 0, 324, 0, 204,
- 0, 0, 0, 294, 290, 173, 184, 187, 118, 0,
- 0, 0, 0, 87, 117, 275, 141, 275, 144, 0,
- 0, 153, 338, 154, 277, 278, 279, 276, 273, 338,
- 269, 272, 0, 205, 206, 130, 131, 90, 0, 0,
- 0, 0, 119, 0, 145, 146, 284, 268, 0, 0,
- 0, 207, 110, 0, 111, 113, 0, 112, 0, 0,
- 88, 0, 155, 0, 0, 271, 0, 0, 0, 122,
- 0, 86, 0, 210, 281, 280, 109, 115, 114, 0,
- 124, 120, 0, 121, 123
+ 188, 259, 0, 85, 134, 137, 190, 285, 147, 170,
+ 0, 242, 243, 244, 245, 248, 249, 250, 251, 247,
+ 246, 252, 253, 254, 0, 0, 322, 0, 60, 0,
+ 295, 296, 297, 298, 299, 300, 301, 294, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 285, 116,
+ 139, 142, 0, 283, 0, 124, 151, 266, 262, 261,
+ 263, 260, 212, 336, 337, 304, 213, 214, 215, 0,
+ 206, 320, 201, 0, 241, 126, 127, 128, 129, 133,
+ 132, 125, 0, 291, 0, 0, 290, 0, 175, 180,
+ 172, 181, 182, 0, 0, 0, 89, 0, 0, 0,
+ 0, 0, 280, 336, 0, 152, 273, 336, 0, 268,
+ 273, 255, 202, 221, 230, 231, 235, 224, 225, 226,
+ 227, 228, 229, 222, 232, 233, 234, 223, 322, 238,
+ 216, 217, 218, 219, 220, 236, 237, 0, 0, 0,
+ 293, 0, 289, 0, 176, 174, 0, 0, 0, 240,
+ 0, 0, 0, 0, 140, 0, 135, 0, 143, 0,
+ 138, 0, 284, 0, 281, 0, 0, 0, 148, 272,
+ 0, 0, 265, 0, 0, 203, 0, 0, 0, 292,
+ 288, 173, 184, 187, 118, 0, 0, 0, 0, 87,
+ 117, 273, 141, 273, 144, 0, 0, 153, 336, 154,
+ 275, 276, 277, 274, 271, 336, 267, 270, 204, 205,
+ 130, 131, 90, 0, 0, 0, 0, 119, 0, 145,
+ 146, 282, 266, 0, 0, 0, 110, 0, 111, 113,
+ 0, 112, 0, 0, 88, 0, 155, 0, 0, 269,
+ 0, 0, 0, 122, 0, 86, 0, 208, 279, 278,
+ 109, 115, 114, 0, 124, 120, 0, 121, 123
};
/* YYDEFGOTO[NTERM-NUM]. */
@@ -2138,15 +2123,15 @@
58, 86, 87, 159, 59, 60, 94, 95, 128, 151,
18, 29, 61, 19, 25, 20, 26, 84, 175, 194,
211, 217, 226, 113, 114, 115, 116, 117, 118, 119,
- 169, 170, 212, 251, 329, 502, 435, 120, 121, 122,
- 473, 377, 436, 519, 532, 539, 308, 362, 252, 330,
- 253, 331, 378, 379, 440, 444, 254, 336, 255, 385,
- 213, 214, 215, 63, 64, 65, 225, 370, 371, 428,
- 256, 275, 278, 279, 50, 394, 257, 287, 350, 420,
- 258, 282, 259, 307, 260, 261, 262, 290, 389, 390,
- 452, 487, 333, 334, 263, 264, 265, 318, 319, 78,
- 153, 154, 155, 44, 45, 144, 156, 146, 37, 38,
- 180, 181, 80, 81, 82, 83
+ 169, 170, 212, 251, 329, 497, 432, 120, 121, 122,
+ 469, 376, 433, 513, 526, 533, 308, 361, 252, 330,
+ 253, 331, 377, 378, 437, 441, 254, 336, 255, 384,
+ 213, 214, 215, 63, 64, 65, 225, 369, 370, 425,
+ 256, 275, 278, 279, 50, 257, 287, 349, 417, 258,
+ 282, 259, 307, 260, 261, 262, 290, 388, 389, 449,
+ 483, 333, 334, 263, 264, 265, 318, 319, 78, 153,
+ 154, 155, 44, 45, 144, 156, 146, 37, 38, 180,
+ 181, 80, 81, 82, 83
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
@@ -2154,291 +2139,281 @@
#define YYPACT_NINF -424
static const yytype_int16 yypact[] =
{
- 212, -424, -89, -80, -21, -28, -424, -424, -4, -424,
- 112, 138, 212, -424, -424, -424, 135, -424, -424, -424,
- -424, -424, 80, 162, 49, 163, 154, 125, 178, 180,
- -424, -424, -424, -424, 78, -424, -424, 77, 441, -424,
+ 27, -424, -90, -80, -54, -47, -424, -424, -29, -424,
+ 80, 134, 27, -424, -424, -424, 131, -424, -424, -424,
+ -424, -424, 71, 142, 28, 154, -41, 197, 164, 12,
+ -424, -424, -424, -424, 60, -424, -424, 51, 210, -424,
-424, -424, -424, -424, -424, -424, -424, -424, -424, -424,
- 94, -424, 95, -424, 204, -424, -424, -424, -424, 247,
- -424, 106, -424, 13, 110, -424, 210, -424, -424, -424,
+ 77, -424, 81, -424, 194, -424, -424, -424, -424, 55,
+ -424, 100, -424, 37, 127, -424, 231, -424, -424, -424,
-424, -424, -424, -424, -424, -424, -424, -424, -424, -424,
- 76, -424, -424, -424, 483, 104, 103, 115, -424, -424,
- -424, 441, 116, -424, 227, 117, -424, -424, 441, -424,
- -424, -424, -424, -424, 109, -424, 118, -424, 119, 121,
- 122, 123, 124, -424, -424, -424, -424, -424, -424, -424,
- 251, 483, -424, 74, 255, 255, -424, 160, 483, -424,
- 426, -424, -40, -69, 387, 142, 143, -40, -40, -424,
- -424, -424, -424, -424, -424, 134, -424, 139, 151, 167,
- -424, -424, 141, -424, 201, -424, -424, -424, -424, 147,
- 148, 149, -424, -424, -424, -424, -424, -424, -424, -58,
- -424, 152, 159, 161, 174, -424, -40, -40, -424, -424,
- 156, 441, -424, 426, -424, -424, -424, 165, 387, -424,
- -424, -424, -424, -424, 29, -424, -424, -424, 76, 177,
- -424, -424, -424, -424, -424, 176, 284, -424, -424, -424,
- -424, 300, 232, 34, 18, -424, -424, 125, 234, -424,
- -424, -424, -424, 304, 229, -424, -424, 203, 74, -424,
- -1, 272, 320, 441, -424, -10, -42, -424, -424, 535,
- -424, -424, 313, 314, 315, -424, -424, -424, 426, -424,
- -424, -424, -424, -424, -424, 194, 318, -424, -424, -424,
- -424, -424, -424, -424, -424, -424, 444, -424, -424, -424,
- 441, 164, 441, 164, -424, 125, 250, 253, 125, 125,
- -424, 205, 215, -424, -424, -424, -424, 549, -424, -424,
- 226, -424, -424, -424, -424, -424, -424, -424, -424, -424,
- -424, -424, -424, -424, 396, 54, -424, 441, 38, 322,
- -424, -424, -424, -424, -424, -424, -424, -424, -1, 441,
- 339, -1, 441, 244, 222, 222, 245, 248, 549, -424,
- -424, -424, 335, -424, -47, -424, 479, 493, -424, -424,
- -424, -424, -424, 233, 249, 426, 265, -424, -424, -424,
- 441, -424, -98, 393, 258, -424, -424, -424, -424, 263,
- -424, -424, -424, -1, -424, 367, -1, -424, 375, 290,
- 321, -424, -424, -424, 269, 273, -37, 2, 8, 4,
- 222, 558, 274, 38, 377, -33, -424, -424, 379, -27,
- -424, 381, -424, -424, 280, -424, -424, -424, -424, -424,
+ 103, -424, -424, -424, 479, 133, 141, 144, -424, -424,
+ -424, 210, 148, -424, 257, 150, -424, -424, 210, -424,
+ -424, -424, -424, -424, 158, -424, 162, -424, 163, 173,
+ 177, 178, 179, -424, -424, -424, -424, -424, -424, -424,
+ 262, 479, -424, 182, 415, 415, -424, 208, 479, -424,
+ 395, -424, -55, 58, 157, 196, 199, -55, -55, -424,
+ -424, -424, -424, -424, -424, 167, -424, 184, 204, 220,
+ -424, -424, 203, -424, 258, -424, -424, -424, -424, 202,
+ 211, 212, -424, -424, -424, -424, -424, -424, -424, -57,
+ -424, 214, 221, 223, 224, -424, -55, -55, -424, -424,
+ 206, 210, -424, 395, -424, -424, -424, 222, 157, -424,
+ -424, -424, -424, -424, 7, -424, -424, -424, 103, 235,
+ -424, -424, -424, -424, -424, 239, 355, -424, -424, -424,
+ -424, 362, 300, 153, 75, -424, -424, 197, 303, -424,
+ -424, -424, -424, 370, 227, -424, -424, 271, 182, -424,
+ -69, 117, 330, 210, -424, -42, 76, -424, -424, 169,
+ -424, -424, 381, 383, 384, -424, -424, -424, 395, -424,
+ -424, -424, -424, -424, -424, 266, 387, -424, -424, -424,
+ -424, -424, -424, -424, -424, -424, 413, -424, -424, -424,
+ 210, 156, 210, 156, -424, 197, 325, 328, 197, 197,
+ -424, 280, 276, -424, -424, -424, -424, 278, -424, -424,
+ 279, -424, -424, -424, -424, -424, -424, -424, -424, -424,
+ -424, -424, -424, -424, 316, 249, -424, 210, 4, 392,
+ -424, -424, -424, -424, -424, -424, -424, -424, -69, 210,
+ 394, -69, 210, 298, 264, 264, 304, 307, 278, -424,
+ -424, -424, 385, -424, -30, -424, 433, 475, -424, -424,
+ -424, -424, -424, 286, 292, 395, -424, -424, -424, 210,
+ -424, 8, 428, 294, -424, -424, -424, -424, 301, -424,
+ -424, -424, -69, -424, 416, -69, -424, 427, 340, 375,
+ -424, -424, -424, 319, 334, -28, -2, 14, 10, 264,
+ 517, 341, 4, 439, -25, -424, -424, 441, -7, -424,
+ 444, -424, -424, -424, -424, -424, -424, -424, -424, -424,
-424, -424, -424, -424, -424, -424, -424, -424, -424, -424,
- -424, -424, -424, -424, -424, -424, -424, -424, -424, -424,
- 441, 282, 84, -424, -1, -424, -1, -424, -424, 244,
- 74, 74, -424, 441, 441, 73, 403, -424, 441, -424,
- 404, -424, 441, -424, 405, -424, 391, -424, 535, 441,
- 507, -424, 131, 441, 521, -424, 441, -424, 288, -424,
- 441, 289, 291, -424, -424, -424, -424, -424, -424, 416,
- 441, 441, 567, 110, -424, -424, -424, -424, -424, 222,
- 294, -424, 401, -424, -424, 297, -424, -424, -424, 408,
- -424, -424, 299, -424, -424, -424, -424, -424, 5, 442,
- 6, 17, -424, 443, 131, 131, -424, 493, 441, 85,
- 441, -424, -424, 441, -424, -424, 441, -424, 441, 41,
- -424, -22, -424, 329, 330, -424, 445, 455, 456, -424,
- 222, -424, 457, -424, -424, -424, -424, -424, -424, 125,
- -424, -424, 244, 38, -424
+ -424, -424, -424, -424, -424, -424, -424, 210, 347, -20,
+ -424, -69, -424, -69, -424, -424, 298, 182, 182, -424,
+ 210, 210, 161, 467, -424, 210, -424, 469, -424, 210,
+ -424, 471, -424, 456, -424, 169, 210, 489, -424, 132,
+ 210, 503, -424, 210, 356, -424, 210, 364, 365, -424,
+ -424, -424, -424, -424, -424, 476, 210, 210, 526, 127,
+ -424, -424, -424, -424, -424, 264, 357, -424, 470, -424,
+ -424, 367, -424, -424, -424, 482, -424, -424, -424, -424,
+ -424, -424, -424, 13, 501, 23, 29, -424, 508, 132,
+ 132, -424, 475, 210, 56, 210, -424, 210, -424, -424,
+ 210, -424, 210, 86, -424, 1, -424, 368, 388, -424,
+ 510, 511, 512, -424, 264, -424, 520, -424, -424, -424,
+ -424, -424, -424, 197, -424, -424, 298, 4, -424
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -424, -424, -424, 436, 10, -147, -424, -424, -424, -424,
- 242, -424, -424, -62, -424, 409, -424, -424, -424, 126,
- -424, -424, -424, 23, -424, -424, -424, -424, -424, -424,
+ -424, -424, -424, 513, 18, -164, -424, -424, -424, -424,
+ 309, -424, -424, 68, -424, 481, -424, -424, -424, 198,
+ -424, -424, -424, 104, -424, -424, -424, -424, -424, -424,
-424, -424, -424, -424, -424, -424, -424, -424, -424, -424,
- -424, 279, -424, -424, -424, -424, -424, 345, -424, 353,
+ -424, 354, -424, -424, -424, -424, -424, 423, -424, 431,
-424, -424, -424, -424, -424, -424, -330, -424, -424, -424,
-424, -424, -424, -424, -424, -424, -424, -424, -424, -424,
- -424, -424, 264, 262, -424, -63, -424, -424, -423, -424,
+ -424, -424, 361, 339, -424, -63, -424, -424, -419, -424,
-424, -424, -424, -424, -214, -424, -424, -424, -424, -424,
- -424, -424, -424, -424, -424, 31, -225, -424, -18, -320,
- -344, -424, 114, 168, -424, -424, -424, 225, 235, -128,
- 252, -424, 316, -424, 207, -219, -2, -38, -164, -424,
- -424, -424, 328, 419, -424, -116
+ -424, -424, -424, -424, 109, -195, -424, 82, -328, -423,
+ -424, 205, 254, -424, -424, -424, 317, 323, -128, 350,
+ -424, 421, -424, 295, -220, 94, -38, -162, -424, -424,
+ -424, 429, 514, -424, -119
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
number is the opposite. If zero, do what YYDEFACT says.
If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -262
+#define YYTABLE_NINF -260
static const yytype_int16 yytable[] =
{
- 79, 96, 152, 227, 187, 383, 465, 141, 441, 512,
- 515, 269, 437, 433, 280, 188, 386, -42, 199, 223,
- 442, 517, -165, 438, 304, 21, 381, 91, -165, -261,
- -165, -165, -165, 203, 204, 22, 381, 3, 4, 57,
- 450, 160, 3, 4, 92, 161, 454, 209, -165, -165,
- -165, 454, 62, 126, -165, 152, 356, 357, 358, 359,
- 79, 323, 205, 360, 326, 327, 209, 205, 342, 57,
- 189, 529, -23, -21, 157, 173, 174, 158, 513, 516,
- 351, 382, 62, -165, -165, -165, -165, 443, 434, 439,
- 518, 432, 93, 23, -165, 451, 266, 24, -165, 364,
- -165, 455, 367, -83, 276, 530, 533, 277, -84, 142,
- 28, 281, 268, 468, 195, 196, 30, 143, 531, 544,
- 152, 53, 145, 147, -165, -165, -165, -165, -165, -165,
- 483, 504, -165, 505, 490, -165, -165, -165, 31, 33,
- 361, 206, 354, 79, 423, -165, 206, 425, 484, 207,
- 208, 470, 485, 34, 207, 208, 486, 471, 472, 335,
- 68, 69, 70, 71, 245, 72, 35, 39, 343, 74,
- 75, 344, 345, 77, 310, 36, 340, 352, 46, 47,
- 48, 49, 51, 346, 347, 348, 349, 2, 73, 74,
- 75, 76, 66, 271, 273, 274, 372, 373, 461, 523,
- 335, 462, 524, 67, 85, 463, 5, 464, 88, -23,
- 543, 90, 52, 53, 97, 98, 1, 152, 124, 2,
- 3, 4, 311, 312, 313, 314, 315, 316, 123, 125,
- 127, 129, 309, 148, 320, 130, 132, 317, 5, 230,
- 6, 231, 232, 233, 7, 133, 134, 458, 135, 136,
- 137, 138, 445, 335, 2, 139, 171, 172, 176, 234,
- 235, 236, 178, 177, 40, 237, 182, 353, 41, 355,
- 179, 42, 43, 5, 183, 184, 185, 186, 8, 52,
- 190, 365, 197, 53, 368, -46, 270, 191, 219, 192,
- 218, 201, 54, 492, 238, 239, 240, 241, 387, 391,
- 55, 56, 193, 216, 220, 242, 221, 228, 229, 243,
- 8, 244, 395, 267, 466, 467, 9, 283, 284, 285,
- 281, 288, 289, 324, 10, 542, 325, 304, 68, 69,
- 70, 71, 363, 72, 272, 68, 69, 70, 71, 245,
- 72, 77, 328, 246, 501, 8, 247, 248, 77, 366,
- 53, 506, -47, 337, 369, 374, 249, 380, 375, 54,
- -259, 68, 69, 70, 71, 142, 72, 55, 56, 73,
- 74, 75, 76, 143, 77, 393, -260, 424, 68, 69,
- 70, 71, 459, 72, 421, 426, 73, 74, 75, 76,
- 422, 77, 427, 430, 429, 387, 469, 431, 448, 449,
- 475, 453, 540, 456, 477, 457, 460, 474, 476, 478,
- 503, 481, 387, 479, 493, 488, 387, 495, 491, 496,
- 497, 507, 494, 508, 509, 511, 68, 69, 70, 71,
- 510, 72, 498, 499, 73, 74, 75, 76, 396, 77,
- 162, 163, 164, 165, 397, 398, 514, 520, 32, 536,
- 399, 400, 401, 402, 403, 404, 405, 534, 535, 537,
- 538, 541, 406, 407, 408, 409, 250, 202, 89, 391,
- 522, 392, 525, 149, 140, 526, 224, 222, 527, 480,
- 528, 291, 292, 293, 294, 295, 296, 297, 298, 521,
- 299, 300, 301, 302, 303, 447, 376, 166, 321, 200,
- 286, 167, 68, 69, 70, 71, 40, 72, 322, 198,
- 338, 341, 168, 339, 43, 77, 410, 131, 411, 0,
- 0, 0, 0, 0, 412, 413, 414, 415, 416, 417,
- 418, 419, 68, 69, 70, 71, 142, 72, 0, 0,
- 73, 74, 75, 76, 143, 77, 0, 68, 69, 70,
- 71, 150, 72, 0, 0, 73, 74, 75, 76, 0,
- 77, 0, 0, 0, 0, 0, 304, 0, 305, 306,
- 99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
- 109, 0, 110, 111, 112, 68, 69, 70, 71, 0,
- 72, 0, 0, 384, 74, 75, 76, 0, 77, 68,
- 69, 70, 71, 0, 72, 0, 0, 388, 74, 75,
- 76, 0, 77, 68, 69, 70, 71, 0, 72, 0,
- 0, 482, 74, 75, 76, 0, 77, 68, 69, 70,
- 71, 0, 72, 0, 0, 489, 74, 75, 76, 0,
- 77, 68, 69, 70, 71, 245, 72, 0, 0, 246,
- 0, 0, 247, 0, 77, 68, 69, 70, 71, 0,
- 72, 0, 0, 332, 68, 69, 70, 71, 77, 72,
- 0, 0, 446, 68, 69, 70, 71, 77, 72, 0,
- 0, 500, 0, 0, 0, 0, 77
+ 79, 96, 152, 227, 141, 382, 187, 461, 385, 430,
+ 269, 203, 204, 188, 438, 3, 4, 506, 434, 2,
+ 199, 21, 355, 356, 357, 358, 439, 509, 359, 435,
+ 209, 1, 22, 511, 2, 3, 4, 5, 142, 205,
+ 380, -42, 380, 52, 280, 447, 143, 57, 499, 209,
+ 500, 91, 5, 126, 6, 152, 157, 23, 7, 158,
+ 79, 323, 2, 451, 326, 327, 40, 92, 189, 276,
+ 41, 451, 277, 42, 43, 24, 223, 57, -83, -165,
+ 5, 431, 28, 507, 30, -165, 52, -165, -165, -165,
+ 440, 457, 436, 510, 458, 381, 266, 429, 363, 512,
+ 448, 366, 464, 360, -165, -165, -165, 8, -165, 268,
+ 350, 281, 53, 93, -46, 523, 206, 538, 452, 479,
+ 152, 54, 8, 486, 207, 208, 527, 304, 9, 55,
+ 56, 270, -259, 62, 31, 33, 10, -165, -165, -165,
+ -165, 34, 420, 79, 353, 422, 35, 524, -165, 480,
+ 8, 36, -165, 481, -165, 53, 482, -47, 39, 335,
+ 525, 3, 4, 62, 54, 160, 310, 517, 51, 161,
+ 518, 66, 55, 56, 67, 53, 340, 351, -165, -165,
+ -165, -165, -165, -165, 85, 205, -165, -23, -21, -165,
+ -165, -165, -23, 271, 273, 274, 371, 372, 88, -165,
+ 335, 459, 90, 460, 537, 173, 174, 162, 163, 164,
+ 165, 311, 312, 313, 314, 315, 316, 152, 145, 147,
+ 68, 69, 70, 71, -84, 72, 317, 53, 73, 74,
+ 75, 76, 309, 77, 320, 97, 466, 230, 98, 231,
+ 232, 233, 467, 468, 195, 196, 454, 46, 47, 48,
+ 49, 442, 335, 124, 123, 125, 234, 235, 236, 127,
+ 237, 129, 206, 342, 166, 130, 139, 352, 167, 354,
+ 207, 208, 68, 69, 70, 71, 245, 72, 148, 168,
+ 246, 364, 132, 247, 367, 77, 133, 134, 176, 238,
+ 239, 240, 241, 73, 74, 75, 76, 135, 386, 390,
+ 242, 136, 137, 138, 243, 177, 244, 171, 462, 463,
+ 172, 392, 178, 68, 69, 70, 71, 281, 72, 536,
+ 179, 73, 74, 75, 76, 182, 77, 184, 183, 197,
+ 68, 69, 70, 71, 245, 72, 185, 186, 246, 190,
+ 496, 247, 248, 77, 272, 201, 191, 501, 192, 193,
+ 218, 249, 68, 69, 70, 71, 245, 72, 216, 219,
+ 343, 74, 75, 344, 345, 77, 220, 68, 69, 70,
+ 71, 221, 72, 228, 229, 346, 347, 348, 267, 455,
+ 77, 68, 69, 70, 71, 283, 72, 284, 285, 332,
+ 288, 289, 386, 465, 77, 324, 534, 471, 325, 304,
+ 328, 473, 362, 337, 365, 368, 498, 379, 477, 386,
+ -257, 373, 484, 386, 374, 487, -258, 418, 489, 68,
+ 69, 70, 71, 40, 72, 419, 421, 338, 493, 494,
+ 339, 43, 77, 68, 69, 70, 71, 423, 72, 424,
+ 427, 73, 74, 75, 76, 426, 77, 291, 292, 293,
+ 294, 295, 296, 297, 298, 428, 299, 300, 301, 302,
+ 303, 446, 445, 450, 390, 516, 453, 519, 456, 520,
+ 393, 470, 521, 472, 522, 474, 394, 395, 475, 488,
+ 492, 502, 396, 397, 398, 399, 400, 401, 402, 490,
+ 491, 504, 503, 528, 403, 404, 405, 406, 68, 69,
+ 70, 71, 142, 72, 505, 508, 73, 74, 75, 76,
+ 143, 77, 514, 529, 530, 531, 532, 150, 68, 69,
+ 70, 71, 142, 72, 535, 32, 73, 74, 75, 76,
+ 143, 77, 304, 250, 305, 306, 68, 69, 70, 71,
+ 89, 72, 202, 391, 383, 74, 75, 76, 407, 77,
+ 408, 149, 140, 224, 476, 409, 410, 411, 412, 413,
+ 414, 415, 416, 99, 100, 101, 102, 103, 104, 105,
+ 106, 107, 108, 109, 222, 110, 111, 112, 68, 69,
+ 70, 71, 375, 72, 515, 444, 387, 74, 75, 76,
+ 321, 77, 68, 69, 70, 71, 322, 72, 286, 341,
+ 478, 74, 75, 76, 200, 77, 68, 69, 70, 71,
+ 198, 72, 131, 0, 485, 74, 75, 76, 0, 77,
+ 68, 69, 70, 71, 0, 72, 0, 0, 443, 68,
+ 69, 70, 71, 77, 72, 0, 0, 495, 0, 0,
+ 0, 0, 77
};
static const yytype_int16 yycheck[] =
{
- 38, 64, 130, 217, 168, 335, 429, 123, 4, 4,
- 4, 230, 4, 11, 239, 73, 336, 4, 182, 1,
- 16, 4, 4, 15, 122, 114, 73, 14, 10, 127,
- 12, 13, 14, 4, 5, 115, 73, 8, 9, 29,
- 73, 110, 8, 9, 31, 114, 73, 194, 30, 31,
- 32, 73, 29, 91, 36, 183, 18, 19, 20, 21,
- 98, 275, 33, 25, 278, 279, 213, 33, 14, 59,
- 128, 30, 114, 115, 114, 137, 138, 117, 73, 73,
- 305, 128, 59, 65, 66, 67, 68, 83, 86, 81,
- 73, 128, 79, 114, 76, 128, 224, 125, 80, 318,
- 82, 128, 321, 74, 114, 64, 128, 117, 74, 110,
- 114, 239, 228, 433, 176, 177, 4, 118, 77, 542,
- 248, 103, 124, 125, 106, 107, 108, 109, 110, 111,
- 450, 475, 114, 477, 454, 117, 118, 119, 0, 4,
- 102, 112, 306, 181, 363, 127, 112, 366, 17, 120,
- 121, 78, 21, 73, 120, 121, 25, 84, 85, 287,
- 106, 107, 108, 109, 110, 111, 4, 4, 114, 115,
- 116, 117, 118, 119, 10, 126, 304, 305, 53, 54,
- 55, 56, 4, 129, 130, 131, 132, 7, 114, 115,
- 116, 117, 114, 231, 232, 233, 324, 325, 114, 114,
- 328, 117, 117, 126, 110, 424, 26, 426, 4, 114,
- 540, 105, 32, 103, 4, 139, 4, 345, 115, 7,
- 8, 9, 58, 59, 60, 61, 62, 63, 124, 114,
- 114, 4, 270, 73, 272, 118, 127, 73, 26, 10,
- 28, 12, 13, 14, 32, 127, 127, 411, 127, 127,
- 127, 127, 380, 381, 7, 4, 114, 114, 124, 30,
- 31, 32, 111, 124, 110, 36, 125, 305, 114, 307,
- 103, 117, 118, 26, 73, 128, 128, 128, 98, 32,
- 128, 319, 126, 103, 322, 105, 14, 128, 4, 128,
- 114, 126, 112, 457, 65, 66, 67, 68, 336, 337,
- 120, 121, 128, 126, 4, 76, 74, 73, 4, 80,
- 98, 82, 350, 110, 430, 431, 104, 4, 4, 4,
- 448, 127, 4, 73, 112, 539, 73, 122, 106, 107,
- 108, 109, 10, 111, 14, 106, 107, 108, 109, 110,
- 111, 119, 127, 114, 472, 98, 117, 118, 119, 10,
- 103, 479, 105, 127, 110, 110, 127, 22, 110, 112,
- 127, 106, 107, 108, 109, 110, 111, 120, 121, 114,
- 115, 116, 117, 118, 119, 110, 127, 10, 106, 107,
- 108, 109, 420, 111, 126, 10, 114, 115, 116, 117,
- 127, 119, 102, 124, 73, 433, 434, 124, 124, 22,
- 438, 22, 530, 22, 442, 125, 124, 4, 4, 4,
- 473, 449, 450, 22, 126, 453, 454, 128, 456, 128,
- 4, 127, 460, 22, 127, 126, 106, 107, 108, 109,
- 22, 111, 470, 471, 114, 115, 116, 117, 45, 119,
- 53, 54, 55, 56, 51, 52, 4, 4, 12, 4,
- 57, 58, 59, 60, 61, 62, 63, 128, 128, 4,
- 4, 4, 69, 70, 71, 72, 224, 188, 59, 507,
- 508, 345, 510, 128, 121, 513, 214, 213, 516, 448,
- 518, 37, 38, 39, 40, 41, 42, 43, 44, 507,
- 46, 47, 48, 49, 50, 381, 328, 110, 273, 183,
- 248, 114, 106, 107, 108, 109, 110, 111, 273, 181,
- 114, 304, 125, 117, 118, 119, 123, 98, 125, -1,
- -1, -1, -1, -1, 131, 132, 133, 134, 135, 136,
- 137, 138, 106, 107, 108, 109, 110, 111, -1, -1,
- 114, 115, 116, 117, 118, 119, -1, 106, 107, 108,
- 109, 125, 111, -1, -1, 114, 115, 116, 117, -1,
- 119, -1, -1, -1, -1, -1, 122, -1, 124, 125,
- 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
- 97, -1, 99, 100, 101, 106, 107, 108, 109, -1,
- 111, -1, -1, 114, 115, 116, 117, -1, 119, 106,
- 107, 108, 109, -1, 111, -1, -1, 114, 115, 116,
- 117, -1, 119, 106, 107, 108, 109, -1, 111, -1,
- -1, 114, 115, 116, 117, -1, 119, 106, 107, 108,
- 109, -1, 111, -1, -1, 114, 115, 116, 117, -1,
- 119, 106, 107, 108, 109, 110, 111, -1, -1, 114,
- -1, -1, 117, -1, 119, 106, 107, 108, 109, -1,
- 111, -1, -1, 114, 106, 107, 108, 109, 119, 111,
- -1, -1, 114, 106, 107, 108, 109, 119, 111, -1,
- -1, 114, -1, -1, -1, -1, 119
+ 38, 64, 130, 217, 123, 335, 168, 426, 336, 11,
+ 230, 4, 5, 70, 4, 8, 9, 4, 4, 7,
+ 182, 111, 18, 19, 20, 21, 16, 4, 24, 15,
+ 194, 4, 112, 4, 7, 8, 9, 25, 107, 32,
+ 70, 4, 70, 31, 239, 70, 115, 29, 471, 213,
+ 473, 14, 25, 91, 27, 183, 111, 111, 31, 114,
+ 98, 275, 7, 70, 278, 279, 107, 30, 125, 111,
+ 111, 70, 114, 114, 115, 122, 1, 59, 71, 4,
+ 25, 83, 111, 70, 4, 10, 31, 12, 13, 14,
+ 80, 111, 78, 70, 114, 125, 224, 125, 318, 70,
+ 125, 321, 430, 99, 29, 30, 31, 95, 33, 228,
+ 305, 239, 100, 76, 102, 29, 109, 536, 125, 447,
+ 248, 109, 95, 451, 117, 118, 125, 119, 101, 117,
+ 118, 14, 124, 29, 0, 4, 109, 62, 63, 64,
+ 65, 70, 362, 181, 306, 365, 4, 61, 73, 17,
+ 95, 123, 77, 21, 79, 100, 24, 102, 4, 287,
+ 74, 8, 9, 59, 109, 107, 10, 111, 4, 111,
+ 114, 111, 117, 118, 123, 100, 304, 305, 103, 104,
+ 105, 106, 107, 108, 107, 32, 111, 111, 112, 114,
+ 115, 116, 111, 231, 232, 233, 324, 325, 4, 124,
+ 328, 421, 102, 423, 534, 137, 138, 50, 51, 52,
+ 53, 55, 56, 57, 58, 59, 60, 345, 124, 125,
+ 103, 104, 105, 106, 71, 108, 70, 100, 111, 112,
+ 113, 114, 270, 116, 272, 4, 75, 10, 135, 12,
+ 13, 14, 81, 82, 176, 177, 408, 50, 51, 52,
+ 53, 379, 380, 112, 121, 111, 29, 30, 31, 111,
+ 33, 4, 109, 14, 107, 115, 4, 305, 111, 307,
+ 117, 118, 103, 104, 105, 106, 107, 108, 70, 122,
+ 111, 319, 124, 114, 322, 116, 124, 124, 121, 62,
+ 63, 64, 65, 111, 112, 113, 114, 124, 336, 337,
+ 73, 124, 124, 124, 77, 121, 79, 111, 427, 428,
+ 111, 349, 108, 103, 104, 105, 106, 445, 108, 533,
+ 100, 111, 112, 113, 114, 122, 116, 125, 70, 123,
+ 103, 104, 105, 106, 107, 108, 125, 125, 111, 125,
+ 468, 114, 115, 116, 14, 123, 125, 475, 125, 125,
+ 111, 124, 103, 104, 105, 106, 107, 108, 123, 4,
+ 111, 112, 113, 114, 115, 116, 4, 103, 104, 105,
+ 106, 71, 108, 70, 4, 126, 127, 128, 107, 417,
+ 116, 103, 104, 105, 106, 4, 108, 4, 4, 111,
+ 124, 4, 430, 431, 116, 70, 524, 435, 70, 119,
+ 124, 439, 10, 124, 10, 107, 469, 22, 446, 447,
+ 124, 107, 450, 451, 107, 453, 124, 123, 456, 103,
+ 104, 105, 106, 107, 108, 124, 10, 111, 466, 467,
+ 114, 115, 116, 103, 104, 105, 106, 10, 108, 99,
+ 121, 111, 112, 113, 114, 70, 116, 34, 35, 36,
+ 37, 38, 39, 40, 41, 121, 43, 44, 45, 46,
+ 47, 22, 121, 22, 502, 503, 22, 505, 121, 507,
+ 42, 4, 510, 4, 512, 4, 48, 49, 22, 123,
+ 4, 124, 54, 55, 56, 57, 58, 59, 60, 125,
+ 125, 124, 22, 125, 66, 67, 68, 69, 103, 104,
+ 105, 106, 107, 108, 22, 4, 111, 112, 113, 114,
+ 115, 116, 4, 125, 4, 4, 4, 122, 103, 104,
+ 105, 106, 107, 108, 4, 12, 111, 112, 113, 114,
+ 115, 116, 119, 224, 121, 122, 103, 104, 105, 106,
+ 59, 108, 188, 345, 111, 112, 113, 114, 120, 116,
+ 122, 128, 121, 214, 445, 127, 128, 129, 130, 131,
+ 132, 133, 134, 84, 85, 86, 87, 88, 89, 90,
+ 91, 92, 93, 94, 213, 96, 97, 98, 103, 104,
+ 105, 106, 328, 108, 502, 380, 111, 112, 113, 114,
+ 273, 116, 103, 104, 105, 106, 273, 108, 248, 304,
+ 111, 112, 113, 114, 183, 116, 103, 104, 105, 106,
+ 181, 108, 98, -1, 111, 112, 113, 114, -1, 116,
+ 103, 104, 105, 106, -1, 108, -1, -1, 111, 103,
+ 104, 105, 106, 116, 108, -1, -1, 111, -1, -1,
+ -1, -1, 116
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
static const yytype_uint16 yystos[] =
{
- 0, 4, 7, 8, 9, 26, 28, 32, 98, 104,
- 112, 141, 142, 143, 144, 145, 147, 148, 160, 163,
- 165, 114, 115, 114, 125, 164, 166, 149, 114, 161,
- 4, 0, 143, 4, 73, 4, 126, 258, 259, 4,
- 110, 114, 117, 118, 253, 254, 53, 54, 55, 56,
- 224, 4, 32, 103, 112, 120, 121, 144, 150, 154,
- 155, 162, 163, 213, 214, 215, 114, 126, 106, 107,
- 108, 109, 111, 114, 115, 116, 117, 119, 249, 257,
- 262, 263, 264, 265, 167, 110, 151, 152, 4, 155,
- 105, 14, 31, 79, 156, 157, 215, 4, 139, 87,
- 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
- 99, 100, 101, 173, 174, 175, 176, 177, 178, 179,
- 187, 188, 189, 124, 115, 114, 257, 114, 158, 4,
- 118, 263, 127, 127, 127, 127, 127, 127, 127, 4,
- 189, 265, 110, 118, 255, 256, 257, 256, 73, 187,
- 125, 159, 249, 250, 251, 252, 256, 114, 117, 153,
- 110, 114, 53, 54, 55, 56, 110, 114, 125, 180,
- 181, 114, 114, 153, 153, 168, 124, 124, 111, 103,
- 260, 261, 125, 73, 128, 128, 128, 258, 73, 128,
- 128, 128, 128, 128, 169, 153, 153, 126, 262, 258,
- 252, 126, 181, 4, 5, 33, 112, 120, 121, 145,
- 146, 170, 182, 210, 211, 212, 126, 171, 114, 4,
- 4, 74, 212, 1, 213, 216, 172, 224, 73, 4,
- 10, 12, 13, 14, 30, 31, 32, 36, 65, 66,
- 67, 68, 76, 80, 82, 110, 114, 117, 118, 127,
- 150, 183, 198, 200, 206, 208, 220, 226, 230, 232,
- 234, 235, 236, 244, 245, 246, 249, 110, 265, 255,
- 14, 257, 14, 257, 257, 221, 114, 117, 222, 223,
- 236, 249, 231, 4, 4, 4, 250, 227, 127, 4,
- 237, 37, 38, 39, 40, 41, 42, 43, 44, 46,
- 47, 48, 49, 50, 122, 124, 125, 233, 196, 257,
- 10, 58, 59, 60, 61, 62, 63, 73, 247, 248,
- 257, 247, 248, 224, 73, 73, 224, 224, 127, 184,
- 199, 201, 114, 242, 243, 249, 207, 127, 114, 117,
- 249, 254, 14, 114, 117, 118, 129, 130, 131, 132,
- 228, 236, 249, 257, 258, 257, 18, 19, 20, 21,
- 25, 102, 197, 10, 255, 257, 10, 255, 257, 110,
- 217, 218, 249, 249, 110, 110, 243, 191, 202, 203,
- 22, 73, 128, 196, 114, 209, 239, 257, 114, 238,
- 239, 257, 159, 110, 225, 257, 45, 51, 52, 57,
- 58, 59, 60, 61, 62, 63, 69, 70, 71, 72,
- 123, 125, 131, 132, 133, 134, 135, 136, 137, 138,
- 229, 126, 127, 255, 10, 255, 10, 102, 219, 73,
- 124, 124, 128, 11, 86, 186, 192, 4, 15, 81,
- 204, 4, 16, 83, 205, 249, 114, 242, 124, 22,
- 73, 128, 240, 22, 73, 128, 22, 125, 258, 257,
- 124, 114, 117, 255, 255, 218, 265, 265, 239, 257,
- 78, 84, 85, 190, 4, 257, 4, 257, 4, 22,
- 235, 257, 114, 239, 17, 21, 25, 241, 257, 114,
- 239, 257, 258, 126, 257, 128, 128, 4, 257, 257,
- 114, 249, 185, 215, 240, 240, 249, 127, 22, 127,
- 22, 126, 4, 73, 4, 4, 73, 4, 73, 193,
- 4, 238, 257, 114, 117, 257, 257, 257, 257, 30,
- 64, 77, 194, 128, 128, 128, 4, 4, 4, 195,
- 249, 4, 224, 196, 218
+ 0, 4, 7, 8, 9, 25, 27, 31, 95, 101,
+ 109, 137, 138, 139, 140, 141, 143, 144, 156, 159,
+ 161, 111, 112, 111, 122, 160, 162, 145, 111, 157,
+ 4, 0, 139, 4, 70, 4, 123, 253, 254, 4,
+ 107, 111, 114, 115, 248, 249, 50, 51, 52, 53,
+ 220, 4, 31, 100, 109, 117, 118, 140, 146, 150,
+ 151, 158, 159, 209, 210, 211, 111, 123, 103, 104,
+ 105, 106, 108, 111, 112, 113, 114, 116, 244, 252,
+ 257, 258, 259, 260, 163, 107, 147, 148, 4, 151,
+ 102, 14, 30, 76, 152, 153, 211, 4, 135, 84,
+ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
+ 96, 97, 98, 169, 170, 171, 172, 173, 174, 175,
+ 183, 184, 185, 121, 112, 111, 252, 111, 154, 4,
+ 115, 258, 124, 124, 124, 124, 124, 124, 124, 4,
+ 185, 260, 107, 115, 250, 251, 252, 251, 70, 183,
+ 122, 155, 244, 245, 246, 247, 251, 111, 114, 149,
+ 107, 111, 50, 51, 52, 53, 107, 111, 122, 176,
+ 177, 111, 111, 149, 149, 164, 121, 121, 108, 100,
+ 255, 256, 122, 70, 125, 125, 125, 253, 70, 125,
+ 125, 125, 125, 125, 165, 149, 149, 123, 257, 253,
+ 247, 123, 177, 4, 5, 32, 109, 117, 118, 141,
+ 142, 166, 178, 206, 207, 208, 123, 167, 111, 4,
+ 4, 71, 208, 1, 209, 212, 168, 220, 70, 4,
+ 10, 12, 13, 14, 29, 30, 31, 33, 62, 63,
+ 64, 65, 73, 77, 79, 107, 111, 114, 115, 124,
+ 146, 179, 194, 196, 202, 204, 216, 221, 225, 227,
+ 229, 230, 231, 239, 240, 241, 244, 107, 260, 250,
+ 14, 252, 14, 252, 252, 217, 111, 114, 218, 219,
+ 231, 244, 226, 4, 4, 4, 245, 222, 124, 4,
+ 232, 34, 35, 36, 37, 38, 39, 40, 41, 43,
+ 44, 45, 46, 47, 119, 121, 122, 228, 192, 252,
+ 10, 55, 56, 57, 58, 59, 60, 70, 242, 243,
+ 252, 242, 243, 220, 70, 70, 220, 220, 124, 180,
+ 195, 197, 111, 237, 238, 244, 203, 124, 111, 114,
+ 244, 249, 14, 111, 114, 115, 126, 127, 128, 223,
+ 231, 244, 252, 253, 252, 18, 19, 20, 21, 24,
+ 99, 193, 10, 250, 252, 10, 250, 252, 107, 213,
+ 214, 244, 244, 107, 107, 238, 187, 198, 199, 22,
+ 70, 125, 192, 111, 205, 234, 252, 111, 233, 234,
+ 252, 155, 252, 42, 48, 49, 54, 55, 56, 57,
+ 58, 59, 60, 66, 67, 68, 69, 120, 122, 127,
+ 128, 129, 130, 131, 132, 133, 134, 224, 123, 124,
+ 250, 10, 250, 10, 99, 215, 70, 121, 121, 125,
+ 11, 83, 182, 188, 4, 15, 78, 200, 4, 16,
+ 80, 201, 244, 111, 237, 121, 22, 70, 125, 235,
+ 22, 70, 125, 22, 253, 252, 121, 111, 114, 250,
+ 250, 214, 260, 260, 234, 252, 75, 81, 82, 186,
+ 4, 252, 4, 252, 4, 22, 230, 252, 111, 234,
+ 17, 21, 24, 236, 252, 111, 234, 252, 123, 252,
+ 125, 125, 4, 252, 252, 111, 244, 181, 211, 235,
+ 235, 244, 124, 22, 124, 22, 4, 70, 4, 4,
+ 70, 4, 70, 189, 4, 233, 252, 111, 114, 252,
+ 252, 252, 252, 29, 61, 74, 190, 125, 125, 125,
+ 4, 4, 4, 191, 244, 4, 220, 192, 214
};
#define yyerrok (yyerrstatus = 0)
@@ -2453,18 +2428,9 @@
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. However,
- YYFAIL appears to be in use. Nevertheless, it is formally deprecated
- in Bison 2.4.2's NEWS entry, where a plan to phase it out is
- discussed. */
+ Once GCC version 2 has supplanted version 1, this can go. */
#define YYFAIL goto yyerrlab
-#if defined YYFAIL
- /* This is here to suppress warnings from the GCC cpp's
- -Wunused-macros. Normally we don't worry about that warning, but
- some users do, and we want to make it easy for users to remove
- YYFAIL uses, which will produce warnings from Bison 2.5. */
-#endif
#define YYRECOVERING() (!!yyerrstatus)
@@ -2521,7 +2487,7 @@
we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT
-# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+# if YYLTYPE_IS_TRIVIAL
# define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
@@ -3272,29 +3238,29 @@
{
case 2:
-/* Line 1464 of yacc.c */
-#line 1170 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1163 "compilers/imcc/imcc.y"
{ if (yynerrs) YYABORT; (yyval.i) = 0; }
break;
case 5:
-/* Line 1464 of yacc.c */
-#line 1179 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1172 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
case 6:
-/* Line 1464 of yacc.c */
-#line 1180 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1173 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
case 7:
-/* Line 1464 of yacc.c */
-#line 1182 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1175 "compilers/imcc/imcc.y"
{
(yyval.i) = (yyvsp[(1) - (1)].i);
imc_close_unit(interp, IMCC_INFO(interp)->cur_unit);
@@ -3304,8 +3270,8 @@
case 8:
-/* Line 1464 of yacc.c */
-#line 1188 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1181 "compilers/imcc/imcc.y"
{
(yyval.i) = (yyvsp[(1) - (1)].i);
imc_close_unit(interp, IMCC_INFO(interp)->cur_unit);
@@ -3315,43 +3281,43 @@
case 9:
-/* Line 1464 of yacc.c */
-#line 1193 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1186 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 10:
-/* Line 1464 of yacc.c */
-#line 1194 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1187 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 11:
-/* Line 1464 of yacc.c */
-#line 1195 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1188 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 12:
-/* Line 1464 of yacc.c */
-#line 1196 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1189 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 13:
-/* Line 1464 of yacc.c */
-#line 1200 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1193 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 14:
-/* Line 1464 of yacc.c */
-#line 1202 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1195 "compilers/imcc/imcc.y"
{
(yyval.i) = 0;
do_loadlib(interp, (yyvsp[(2) - (3)].s));
@@ -3361,8 +3327,8 @@
case 15:
-/* Line 1464 of yacc.c */
-#line 1211 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1204 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->line = atoi((yyvsp[(2) - (5)].s));
/* set_filename() frees the STRINGC */
@@ -3372,8 +3338,8 @@
case 16:
-/* Line 1464 of yacc.c */
-#line 1217 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1210 "compilers/imcc/imcc.y"
{
/* set_filename() frees the STRINGC */
set_filename(interp, (yyvsp[(2) - (3)].s));
@@ -3382,8 +3348,8 @@
case 17:
-/* Line 1464 of yacc.c */
-#line 1225 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1218 "compilers/imcc/imcc.y"
{
/* We'll want to store an entry while emitting instructions, so just
* store annotation like it's an instruction. */
@@ -3395,8 +3361,8 @@
case 18:
-/* Line 1464 of yacc.c */
-#line 1237 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1230 "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),
@@ -3410,15 +3376,15 @@
case 19:
-/* Line 1464 of yacc.c */
-#line 1249 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1242 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 20:
-/* Line 1464 of yacc.c */
-#line 1250 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1243 "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));
@@ -3428,15 +3394,15 @@
case 21:
-/* Line 1464 of yacc.c */
-#line 1258 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1251 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 22:
-/* Line 1464 of yacc.c */
-#line 1259 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1252 "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));
@@ -3446,15 +3412,15 @@
case 23:
-/* Line 1464 of yacc.c */
-#line 1265 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1258 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 24:
-/* Line 1464 of yacc.c */
-#line 1266 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1259 "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));
@@ -3465,50 +3431,50 @@
case 29:
-/* Line 1464 of yacc.c */
-#line 1284 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1277 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 30:
-/* Line 1464 of yacc.c */
-#line 1285 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1278 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 31:
-/* Line 1464 of yacc.c */
-#line 1286 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1279 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 32:
-/* Line 1464 of yacc.c */
-#line 1287 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1280 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 33:
-/* Line 1464 of yacc.c */
-#line 1288 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1281 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
case 36:
-/* Line 1464 of yacc.c */
-#line 1293 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1286 "compilers/imcc/imcc.y"
{ clear_state(interp); }
break;
case 37:
-/* Line 1464 of yacc.c */
-#line 1295 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1288 "compilers/imcc/imcc.y"
{
(yyval.i) = INS(interp, IMCC_INFO(interp)->cur_unit,
(yyvsp[(2) - (3)].s), 0, IMCC_INFO(interp)->regs,
@@ -3519,8 +3485,8 @@
case 38:
-/* Line 1464 of yacc.c */
-#line 1302 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1295 "compilers/imcc/imcc.y"
{
imc_close_unit(interp, IMCC_INFO(interp)->cur_unit);
IMCC_INFO(interp)->cur_unit = imc_open_unit(interp, IMC_PASM);
@@ -3529,8 +3495,8 @@
case 39:
-/* Line 1464 of yacc.c */
-#line 1307 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1300 "compilers/imcc/imcc.y"
{
(yyval.i) = iSUBROUTINE(interp,
IMCC_INFO(interp)->cur_unit,
@@ -3542,8 +3508,8 @@
case 40:
-/* Line 1464 of yacc.c */
-#line 1315 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1308 "compilers/imcc/imcc.y"
{
(yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(2) - (2)].sr));
}
@@ -3551,8 +3517,8 @@
case 41:
-/* Line 1464 of yacc.c */
-#line 1319 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1312 "compilers/imcc/imcc.y"
{
char *name = mem_sys_strdup((yyvsp[(2) - (4)].s) + 1);
SymReg *r = mk_pasm_reg(interp, (yyvsp[(4) - (4)].s));
@@ -3569,22 +3535,22 @@
case 42:
-/* Line 1464 of yacc.c */
-#line 1331 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1324 "compilers/imcc/imcc.y"
{ (yyval.i) = 0;}
break;
case 44:
-/* Line 1464 of yacc.c */
-#line 1339 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1332 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->cur_unit = imc_open_unit(interp, IMC_PASM); }
break;
case 45:
-/* Line 1464 of yacc.c */
-#line 1342 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1335 "compilers/imcc/imcc.y"
{
/* if (optimizer_level & OPT_PASM)
imc_compile_unit(interp, IMCC_INFO(interp)->cur_unit);
@@ -3596,8 +3562,8 @@
case 48:
-/* Line 1464 of yacc.c */
-#line 1358 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1351 "compilers/imcc/imcc.y"
{
int re_open = 0;
(yyval.i) = 0;
@@ -3613,8 +3579,8 @@
case 49:
-/* Line 1464 of yacc.c */
-#line 1373 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1366 "compilers/imcc/imcc.y"
{
(yyval.sr) = (yyvsp[(2) - (3)].sr);
}
@@ -3622,15 +3588,15 @@
case 50:
-/* Line 1464 of yacc.c */
-#line 1376 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1369 "compilers/imcc/imcc.y"
{ (yyval.sr) = NULL; }
break;
case 51:
-/* Line 1464 of yacc.c */
-#line 1381 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1374 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->cur_unit = imc_open_unit(interp, IMC_PCCSUB);
}
@@ -3638,8 +3604,8 @@
case 52:
-/* Line 1464 of yacc.c */
-#line 1385 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1378 "compilers/imcc/imcc.y"
{
iSUBROUTINE(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (3)].sr));
}
@@ -3647,8 +3613,8 @@
case 53:
-/* Line 1464 of yacc.c */
-#line 1389 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1382 "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) {
@@ -3660,29 +3626,29 @@
case 54:
-/* Line 1464 of yacc.c */
-#line 1397 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1390 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; }
break;
case 55:
-/* Line 1464 of yacc.c */
-#line 1401 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1394 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
case 56:
-/* Line 1464 of yacc.c */
-#line 1402 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1395 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
case 57:
-/* Line 1464 of yacc.c */
-#line 1404 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1397 "compilers/imcc/imcc.y"
{
if (IMCC_INFO(interp)->adv_named_id) {
add_pcc_named_param(interp, IMCC_INFO(interp)->cur_call,
@@ -3696,26 +3662,24 @@
case 58:
-/* Line 1464 of yacc.c */
-#line 1416 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1409 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 59:
-/* Line 1464 of yacc.c */
-#line 1416 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1409 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(3) - (3)].sr); IMCC_INFO(interp)->is_def = 0; }
break;
case 60:
-/* Line 1464 of yacc.c */
-#line 1421 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1414 "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));
- else if ((yyvsp[(3) - (3)].t) & VT_OPT_FLAG && (yyvsp[(1) - (3)].t) != 'I') {
+ if ((yyvsp[(3) - (3)].t) & VT_OPT_FLAG && (yyvsp[(1) - (3)].t) != 'I') {
const char *type;
switch ((yyvsp[(1) - (3)].t)) {
case 'N': type = "num"; break;
@@ -3725,10 +3689,11 @@
}
IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
- ":opt_flag parameter must be of type 'I', not '%s'", type);
+ ":opt_flag parameter must be of type 'int', not '%s'", type);
}
- else
- (yyval.sr) = mk_ident(interp, (yyvsp[(2) - (3)].s), (yyvsp[(1) - (3)].t));
+ if ((yyvsp[(3) - (3)].t) & VT_NAMED && !((yyvsp[(3) - (3)].t) & VT_FLAT) && !IMCC_INFO(interp)->adv_named_id)
+ adv_named_set(interp, (yyvsp[(2) - (3)].s));
+ (yyval.sr) = mk_ident(interp, (yyvsp[(2) - (3)].s), (yyvsp[(1) - (3)].t));
(yyval.sr)->type |= (yyvsp[(3) - (3)].t);
mem_sys_free((yyvsp[(2) - (3)].s));
}
@@ -3736,15 +3701,15 @@
case 61:
-/* Line 1464 of yacc.c */
-#line 1446 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1438 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
case 62:
-/* Line 1464 of yacc.c */
-#line 1451 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1443 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
IMCC_INFO(interp)->cur_unit->outer = mk_sub_address_fromc(interp, (yyvsp[(3) - (4)].s));
@@ -3754,8 +3719,8 @@
case 63:
-/* Line 1464 of yacc.c */
-#line 1457 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1449 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
IMCC_INFO(interp)->cur_unit->outer = mk_const(interp, (yyvsp[(3) - (4)].s), 'S');
@@ -3765,8 +3730,8 @@
case 64:
-/* Line 1464 of yacc.c */
-#line 1466 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1458 "compilers/imcc/imcc.y"
{
(yyval.t) = P_VTABLE;
IMCC_INFO(interp)->cur_unit->vtable_name = NULL;
@@ -3776,8 +3741,8 @@
case 65:
-/* Line 1464 of yacc.c */
-#line 1472 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1464 "compilers/imcc/imcc.y"
{
(yyval.t) = P_VTABLE;
IMCC_INFO(interp)->cur_unit->vtable_name = (yyvsp[(3) - (4)].s);
@@ -3787,8 +3752,8 @@
case 66:
-/* Line 1464 of yacc.c */
-#line 1481 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1473 "compilers/imcc/imcc.y"
{
(yyval.t) = P_METHOD;
IMCC_INFO(interp)->cur_unit->method_name = NULL;
@@ -3798,8 +3763,8 @@
case 67:
-/* Line 1464 of yacc.c */
-#line 1487 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1479 "compilers/imcc/imcc.y"
{
(yyval.t) = P_METHOD;
IMCC_INFO(interp)->cur_unit->method_name = (yyvsp[(3) - (4)].s);
@@ -3809,8 +3774,8 @@
case 68:
-/* Line 1464 of yacc.c */
-#line 1496 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1488 "compilers/imcc/imcc.y"
{
(yyval.t) = P_NSENTRY;
IMCC_INFO(interp)->cur_unit->ns_entry_name = NULL;
@@ -3820,8 +3785,8 @@
case 69:
-/* Line 1464 of yacc.c */
-#line 1502 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1494 "compilers/imcc/imcc.y"
{
(yyval.t) = P_NSENTRY;
IMCC_INFO(interp)->cur_unit->ns_entry_name = (yyvsp[(3) - (4)].s);
@@ -3831,8 +3796,8 @@
case 70:
-/* Line 1464 of yacc.c */
-#line 1511 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1503 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
IMCC_INFO(interp)->cur_unit->instance_of = (yyvsp[(3) - (4)].s);
@@ -3841,8 +3806,8 @@
case 71:
-/* Line 1464 of yacc.c */
-#line 1519 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1511 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
IMCC_INFO(interp)->cur_unit->subid = NULL;
@@ -3851,8 +3816,8 @@
case 72:
-/* Line 1464 of yacc.c */
-#line 1524 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1516 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
IMCC_INFO(interp)->cur_unit->subid = mk_const(interp, (yyvsp[(3) - (4)].s), 'S');
@@ -3863,8 +3828,8 @@
case 73:
-/* Line 1464 of yacc.c */
-#line 1534 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1526 "compilers/imcc/imcc.y"
{
add_pcc_multi(interp, IMCC_INFO(interp)->cur_call, NULL);
}
@@ -3872,8 +3837,8 @@
case 74:
-/* Line 1464 of yacc.c */
-#line 1538 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1530 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
add_pcc_multi(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(3) - (3)].sr));
@@ -3882,8 +3847,8 @@
case 75:
-/* Line 1464 of yacc.c */
-#line 1543 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1535 "compilers/imcc/imcc.y"
{
(yyval.t) = 0;
add_pcc_multi(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (1)].sr));
@@ -3892,36 +3857,36 @@
case 76:
-/* Line 1464 of yacc.c */
-#line 1550 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1542 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, "INTVAL", 'S'); }
break;
case 77:
-/* Line 1464 of yacc.c */
-#line 1551 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1543 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, "FLOATVAL", 'S'); }
break;
case 78:
-/* Line 1464 of yacc.c */
-#line 1552 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1544 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, "PMC", 'S'); }
break;
case 79:
-/* Line 1464 of yacc.c */
-#line 1553 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1545 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, "STRING", 'S'); }
break;
case 80:
-/* Line 1464 of yacc.c */
-#line 1555 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1547 "compilers/imcc/imcc.y"
{
SymReg *r;
if (strcmp((yyvsp[(1) - (1)].s), "_") != 0)
@@ -3936,8 +3901,8 @@
case 81:
-/* Line 1464 of yacc.c */
-#line 1566 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1558 "compilers/imcc/imcc.y"
{
SymReg *r;
if (strcmp((yyvsp[(1) - (1)].s), "_") != 0)
@@ -3952,15 +3917,15 @@
case 82:
-/* Line 1464 of yacc.c */
-#line 1576 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1568 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(2) - (3)].sr); }
break;
case 85:
-/* Line 1464 of yacc.c */
-#line 1586 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1578 "compilers/imcc/imcc.y"
{
char name[128];
SymReg *r, *r1;
@@ -3981,120 +3946,118 @@
* sub call; the sub is in r[0] of the first ins
*/
r1 = IMCC_INFO(interp)->cur_unit->instructions->symregs[0];
- if (r1 && r1->pcc_sub)
- r1->pcc_sub->calls_a_sub |= 1;
}
break;
case 86:
-/* Line 1464 of yacc.c */
-#line 1614 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1604 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; }
break;
case 87:
-/* Line 1464 of yacc.c */
-#line 1618 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1608 "compilers/imcc/imcc.y"
{ (yyval.i) = NULL; IMCC_INFO(interp)->cur_call->pcc_sub->label = 0; }
break;
case 88:
-/* Line 1464 of yacc.c */
-#line 1619 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1609 "compilers/imcc/imcc.y"
{ (yyval.i) = NULL; IMCC_INFO(interp)->cur_call->pcc_sub->label = 1; }
break;
case 89:
-/* Line 1464 of yacc.c */
-#line 1623 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1613 "compilers/imcc/imcc.y"
{ (yyval.i) = NULL; }
break;
case 90:
-/* Line 1464 of yacc.c */
-#line 1624 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1614 "compilers/imcc/imcc.y"
{ (yyval.i) = NULL; IMCC_INFO(interp)->cur_call->pcc_sub->object = (yyvsp[(2) - (3)].sr); }
break;
case 91:
-/* Line 1464 of yacc.c */
-#line 1628 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1618 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
case 93:
-/* Line 1464 of yacc.c */
-#line 1633 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1623 "compilers/imcc/imcc.y"
{ (yyval.t) = (yyvsp[(1) - (1)].t); }
break;
case 94:
-/* Line 1464 of yacc.c */
-#line 1634 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1624 "compilers/imcc/imcc.y"
{ (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); }
break;
case 95:
-/* Line 1464 of yacc.c */
-#line 1638 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1628 "compilers/imcc/imcc.y"
{ (yyval.t) = P_LOAD; }
break;
case 96:
-/* Line 1464 of yacc.c */
-#line 1639 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1629 "compilers/imcc/imcc.y"
{ (yyval.t) = P_INIT; }
break;
case 97:
-/* Line 1464 of yacc.c */
-#line 1640 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1630 "compilers/imcc/imcc.y"
{ (yyval.t) = P_MAIN; }
break;
case 98:
-/* Line 1464 of yacc.c */
-#line 1641 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1631 "compilers/imcc/imcc.y"
{ (yyval.t) = P_IMMEDIATE; }
break;
case 99:
-/* Line 1464 of yacc.c */
-#line 1642 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1632 "compilers/imcc/imcc.y"
{ (yyval.t) = P_POSTCOMP; }
break;
case 100:
-/* Line 1464 of yacc.c */
-#line 1643 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1633 "compilers/imcc/imcc.y"
{ (yyval.t) = P_ANON; }
break;
case 101:
-/* Line 1464 of yacc.c */
-#line 1644 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1634 "compilers/imcc/imcc.y"
{ (yyval.t) = P_NEED_LEX; }
break;
case 109:
-/* Line 1464 of yacc.c */
-#line 1656 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1646 "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));
@@ -4103,8 +4066,8 @@
case 110:
-/* Line 1464 of yacc.c */
-#line 1661 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1651 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
}
@@ -4112,18 +4075,17 @@
case 111:
-/* Line 1464 of yacc.c */
-#line 1665 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1655 "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;
}
break;
case 112:
-/* Line 1464 of yacc.c */
-#line 1670 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1659 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
}
@@ -4131,8 +4093,8 @@
case 113:
-/* Line 1464 of yacc.c */
-#line 1674 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1663 "compilers/imcc/imcc.y"
{
add_pcc_sub(IMCC_INFO(interp)->cur_call, mk_const(interp, (yyvsp[(2) - (3)].s), 'S'));
}
@@ -4140,8 +4102,8 @@
case 114:
-/* Line 1464 of yacc.c */
-#line 1678 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1667 "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));
@@ -4150,8 +4112,8 @@
case 115:
-/* Line 1464 of yacc.c */
-#line 1683 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1672 "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));
@@ -4160,36 +4122,44 @@
case 116:
-/* Line 1464 of yacc.c */
-#line 1691 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1680 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
case 117:
-/* Line 1464 of yacc.c */
-#line 1692 "compilers/imcc/imcc.y"
- { add_pcc_arg(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr)); }
+/* Line 1455 of yacc.c */
+#line 1681 "compilers/imcc/imcc.y"
+ {
+ if (IMCC_INFO(interp)->adv_named_id) {
+ 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(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
+ }
break;
case 118:
-/* Line 1464 of yacc.c */
-#line 1696 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1693 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(2) - (2)].sr); }
break;
case 119:
-/* Line 1464 of yacc.c */
-#line 1701 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1698 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
case 120:
-/* Line 1464 of yacc.c */
-#line 1703 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1700 "compilers/imcc/imcc.y"
{
if ((yyvsp[(2) - (3)].sr))
add_pcc_result(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
@@ -4198,29 +4168,26 @@
case 121:
-/* Line 1464 of yacc.c */
-#line 1710 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1707 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(2) - (3)].sr); (yyval.sr)->type |= (yyvsp[(3) - (3)].t); }
break;
case 122:
-/* Line 1464 of yacc.c */
-#line 1711 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1708 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 123:
-/* Line 1464 of yacc.c */
-#line 1712 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1709 "compilers/imcc/imcc.y"
{
IdList * const l = (yyvsp[(4) - (4)].idlist);
SymReg *ignored;
- if (l->unique_reg)
- ignored = mk_ident_ur(interp, l->id, (yyvsp[(3) - (4)].t));
- else
- ignored = mk_ident(interp, l->id, (yyvsp[(3) - (4)].t));
+ ignored = mk_ident(interp, l->id, (yyvsp[(3) - (4)].t));
UNUSED(ignored);
IMCC_INFO(interp)->is_def = 0;
(yyval.sr) = 0;
@@ -4229,92 +4196,92 @@
case 124:
-/* Line 1464 of yacc.c */
-#line 1726 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1720 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
case 125:
-/* Line 1464 of yacc.c */
-#line 1727 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1721 "compilers/imcc/imcc.y"
{ (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); }
break;
case 126:
-/* Line 1464 of yacc.c */
-#line 1731 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1725 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_FLAT; }
break;
case 127:
-/* Line 1464 of yacc.c */
-#line 1732 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1726 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_OPTIONAL; }
break;
case 128:
-/* Line 1464 of yacc.c */
-#line 1733 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1727 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_OPT_FLAG; }
break;
case 129:
-/* Line 1464 of yacc.c */
-#line 1734 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1728 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_NAMED; }
break;
case 130:
-/* Line 1464 of yacc.c */
-#line 1735 "compilers/imcc/imcc.y"
- { adv_named_set(interp, (yyvsp[(3) - (4)].s)); (yyval.t) = 0; mem_sys_free((yyvsp[(3) - (4)].s)); }
+/* Line 1455 of yacc.c */
+#line 1729 "compilers/imcc/imcc.y"
+ { adv_named_set(interp, (yyvsp[(3) - (4)].s)); (yyval.t) = VT_NAMED; mem_sys_free((yyvsp[(3) - (4)].s)); }
break;
case 131:
-/* Line 1464 of yacc.c */
-#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)); }
+/* Line 1455 of yacc.c */
+#line 1730 "compilers/imcc/imcc.y"
+ { adv_named_set_u(interp, (yyvsp[(3) - (4)].s)); (yyval.t) = VT_NAMED; mem_sys_free((yyvsp[(3) - (4)].s)); }
break;
case 132:
-/* Line 1464 of yacc.c */
-#line 1737 "compilers/imcc/imcc.y"
- { (yyval.t) = VT_UNIQUE_REG; }
+/* Line 1455 of yacc.c */
+#line 1731 "compilers/imcc/imcc.y"
+ { (yyval.t) = 0; }
break;
case 133:
-/* Line 1464 of yacc.c */
-#line 1738 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1732 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_CALL_SIG; }
break;
case 134:
-/* Line 1464 of yacc.c */
-#line 1743 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1737 "compilers/imcc/imcc.y"
{ begin_return_or_yield(interp, 0); }
break;
case 135:
-/* Line 1464 of yacc.c */
-#line 1745 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1739 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; IMCC_INFO(interp)->asm_state = AsmDefault; }
break;
case 136:
-/* Line 1464 of yacc.c */
-#line 1747 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1741 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->asm_state = AsmDefault;
(yyval.i) = 0;
@@ -4323,29 +4290,29 @@
case 137:
-/* Line 1464 of yacc.c */
-#line 1754 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1748 "compilers/imcc/imcc.y"
{ begin_return_or_yield(interp, 1); }
break;
case 138:
-/* Line 1464 of yacc.c */
-#line 1756 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1750 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; IMCC_INFO(interp)->asm_state = AsmDefault; }
break;
case 139:
-/* Line 1464 of yacc.c */
-#line 1760 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1754 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
case 140:
-/* Line 1464 of yacc.c */
-#line 1762 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1756 "compilers/imcc/imcc.y"
{
if ((yyvsp[(1) - (2)].sr))
add_pcc_result(interp, IMCC_INFO(interp)->sr_return, (yyvsp[(1) - (2)].sr));
@@ -4354,8 +4321,8 @@
case 141:
-/* Line 1464 of yacc.c */
-#line 1767 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1761 "compilers/imcc/imcc.y"
{
if ((yyvsp[(2) - (3)].sr))
add_pcc_result(interp, IMCC_INFO(interp)->sr_return, (yyvsp[(2) - (3)].sr));
@@ -4364,15 +4331,15 @@
case 142:
-/* Line 1464 of yacc.c */
-#line 1774 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1768 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
case 143:
-/* Line 1464 of yacc.c */
-#line 1776 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1770 "compilers/imcc/imcc.y"
{
if ((yyvsp[(1) - (2)].sr))
add_pcc_result(interp, IMCC_INFO(interp)->sr_return, (yyvsp[(1) - (2)].sr));
@@ -4381,8 +4348,8 @@
case 144:
-/* Line 1464 of yacc.c */
-#line 1781 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1775 "compilers/imcc/imcc.y"
{
if ((yyvsp[(2) - (3)].sr))
add_pcc_result(interp, IMCC_INFO(interp)->sr_return, (yyvsp[(2) - (3)].sr));
@@ -4391,22 +4358,22 @@
case 145:
-/* Line 1464 of yacc.c */
-#line 1788 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1782 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(2) - (3)].sr); (yyval.sr)->type |= (yyvsp[(3) - (3)].t); }
break;
case 146:
-/* Line 1464 of yacc.c */
-#line 1792 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1786 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(2) - (3)].sr); (yyval.sr)->type |= (yyvsp[(3) - (3)].t); }
break;
case 147:
-/* Line 1464 of yacc.c */
-#line 1797 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1791 "compilers/imcc/imcc.y"
{
if (IMCC_INFO(interp)->asm_state == AsmDefault)
begin_return_or_yield(interp, (yyvsp[(1) - (2)].t));
@@ -4415,8 +4382,8 @@
case 148:
-/* Line 1464 of yacc.c */
-#line 1802 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1796 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->asm_state = AsmDefault;
(yyval.t) = 0;
@@ -4425,29 +4392,29 @@
case 149:
-/* Line 1464 of yacc.c */
-#line 1809 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1803 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
case 150:
-/* Line 1464 of yacc.c */
-#line 1810 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1804 "compilers/imcc/imcc.y"
{ (yyval.t) = 1; }
break;
case 151:
-/* Line 1464 of yacc.c */
-#line 1814 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1808 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 152:
-/* Line 1464 of yacc.c */
-#line 1816 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1810 "compilers/imcc/imcc.y"
{
if (IMCC_INFO(interp)->adv_named_id) {
add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return,
@@ -4461,8 +4428,8 @@
case 153:
-/* Line 1464 of yacc.c */
-#line 1826 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1820 "compilers/imcc/imcc.y"
{
SymReg * const name = mk_const(interp, (yyvsp[(1) - (3)].s), 'S');
add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return, name, (yyvsp[(3) - (3)].sr));
@@ -4471,8 +4438,8 @@
case 154:
-/* Line 1464 of yacc.c */
-#line 1831 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1825 "compilers/imcc/imcc.y"
{
if (IMCC_INFO(interp)->adv_named_id) {
add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return,
@@ -4486,8 +4453,8 @@
case 155:
-/* Line 1464 of yacc.c */
-#line 1841 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1835 "compilers/imcc/imcc.y"
{
SymReg * const name = mk_const(interp, (yyvsp[(3) - (5)].s), 'S');
add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return, name, (yyvsp[(5) - (5)].sr));
@@ -4496,64 +4463,64 @@
case 158:
-/* Line 1464 of yacc.c */
-#line 1862 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1856 "compilers/imcc/imcc.y"
{ clear_state(interp); }
break;
case 159:
-/* Line 1464 of yacc.c */
-#line 1867 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1861 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(2) - (2)].i); }
break;
case 160:
-/* Line 1464 of yacc.c */
-#line 1868 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1862 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 161:
-/* Line 1464 of yacc.c */
-#line 1869 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1863 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 162:
-/* Line 1464 of yacc.c */
-#line 1870 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1864 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 163:
-/* Line 1464 of yacc.c */
-#line 1871 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1865 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 164:
-/* Line 1464 of yacc.c */
-#line 1872 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1866 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
case 165:
-/* Line 1464 of yacc.c */
-#line 1876 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1870 "compilers/imcc/imcc.y"
{ (yyval.i) = NULL; }
break;
case 169:
-/* Line 1464 of yacc.c */
-#line 1887 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1881 "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));
@@ -4563,15 +4530,15 @@
case 170:
-/* Line 1464 of yacc.c */
-#line 1897 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1891 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(2) - (3)].i); }
break;
case 171:
-/* Line 1464 of yacc.c */
-#line 1899 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1893 "compilers/imcc/imcc.y"
{
if (yynerrs >= PARROT_MAX_RECOVER_ERRORS) {
IMCC_warning(interp, "Too many errors. Correct some first.\n");
@@ -4583,8 +4550,8 @@
case 172:
-/* Line 1464 of yacc.c */
-#line 1910 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1904 "compilers/imcc/imcc.y"
{
IdList* const l = (yyvsp[(1) - (1)].idlist);
l->next = NULL;
@@ -4594,8 +4561,8 @@
case 173:
-/* Line 1464 of yacc.c */
-#line 1917 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1911 "compilers/imcc/imcc.y"
{
IdList* const l = (yyvsp[(3) - (3)].idlist);
l->next = (yyvsp[(1) - (3)].idlist);
@@ -4605,49 +4572,31 @@
case 174:
-/* Line 1464 of yacc.c */
-#line 1926 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1920 "compilers/imcc/imcc.y"
{
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;
}
break;
- case 175:
-
-/* Line 1464 of yacc.c */
-#line 1935 "compilers/imcc/imcc.y"
- { (yyval.t) = 0; }
- break;
-
- case 176:
-
-/* Line 1464 of yacc.c */
-#line 1936 "compilers/imcc/imcc.y"
- { (yyval.t) = 1; }
- break;
-
case 179:
-/* Line 1464 of yacc.c */
-#line 1943 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1936 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 180:
-/* Line 1464 of yacc.c */
-#line 1944 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1937 "compilers/imcc/imcc.y"
{
IdList *l = (yyvsp[(4) - (4)].idlist);
while (l) {
IdList *l1;
- if (l->unique_reg)
- mk_ident_ur(interp, l->id, (yyvsp[(3) - (4)].t));
- else
- mk_ident(interp, l->id, (yyvsp[(3) - (4)].t));
+ mk_ident(interp, l->id, (yyvsp[(3) - (4)].t));
l1 = l;
l = l->next;
mem_sys_free(l1->id);
@@ -4659,8 +4608,8 @@
case 181:
-/* Line 1464 of yacc.c */
-#line 1960 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1950 "compilers/imcc/imcc.y"
{
if ((yyvsp[(4) - (4)].sr)->set != 'P') {
mem_sys_free((yyvsp[(2) - (4)].s));
@@ -4681,8 +4630,8 @@
case 182:
-/* Line 1464 of yacc.c */
-#line 1977 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1967 "compilers/imcc/imcc.y"
{
if ((yyvsp[(4) - (4)].sr)->set != 'P') {
mem_sys_free((yyvsp[(2) - (4)].s));
@@ -4699,15 +4648,15 @@
case 183:
-/* Line 1464 of yacc.c */
-#line 1989 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1979 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 184:
-/* Line 1464 of yacc.c */
-#line 1990 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1980 "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;
@@ -4717,15 +4666,15 @@
case 186:
-/* Line 1464 of yacc.c */
-#line 1997 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1987 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->is_def = 1; }
break;
case 187:
-/* Line 1464 of yacc.c */
-#line 1998 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1988 "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;
@@ -4735,19 +4684,19 @@
case 188:
-/* Line 1464 of yacc.c */
-#line 2004 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 1994 "compilers/imcc/imcc.y"
{
(yyval.i) = NULL;
- IMCC_INFO(interp)->cur_call->pcc_sub->flags |= isTAIL_CALL;
+ IMCC_INFO(interp)->cur_call->pcc_sub->tailcall = 1;
IMCC_INFO(interp)->cur_call = NULL;
}
break;
case 189:
-/* Line 1464 of yacc.c */
-#line 2010 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2000 "compilers/imcc/imcc.y"
{
(yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "branch", 1, (yyvsp[(2) - (2)].sr));
}
@@ -4755,8 +4704,8 @@
case 190:
-/* Line 1464 of yacc.c */
-#line 2014 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2004 "compilers/imcc/imcc.y"
{
(yyval.i) = INS(interp,
IMCC_INFO(interp)->cur_unit,
@@ -4772,121 +4721,99 @@
case 191:
-/* Line 1464 of yacc.c */
-#line 2025 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2015 "compilers/imcc/imcc.y"
{ (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(2) - (2)].sr)); }
break;
case 192:
-/* Line 1464 of yacc.c */
-#line 2026 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2016 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; }
break;
case 193:
-/* Line 1464 of yacc.c */
-#line 2027 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2017 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
case 196:
-/* Line 1464 of yacc.c */
-#line 2030 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2020 "compilers/imcc/imcc.y"
{ (yyval.i) = 0;}
break;
case 197:
-/* Line 1464 of yacc.c */
-#line 2034 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2024 "compilers/imcc/imcc.y"
{ (yyval.t) = 'I'; }
break;
case 198:
-/* Line 1464 of yacc.c */
-#line 2035 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2025 "compilers/imcc/imcc.y"
{ (yyval.t) = 'N'; }
break;
case 199:
-/* Line 1464 of yacc.c */
-#line 2036 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2026 "compilers/imcc/imcc.y"
{ (yyval.t) = 'S'; }
break;
case 200:
-/* Line 1464 of yacc.c */
-#line 2037 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2027 "compilers/imcc/imcc.y"
{ (yyval.t) = 'P'; }
break;
case 201:
-/* Line 1464 of yacc.c */
-#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 = 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));
- }
- }
- break;
-
- case 202:
-
-/* Line 1464 of yacc.c */
-#line 2055 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2032 "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:
+ case 202:
-/* Line 1464 of yacc.c */
-#line 2057 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2034 "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:
+ case 203:
-/* Line 1464 of yacc.c */
-#line 2059 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2036 "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:
+ case 204:
-/* Line 1464 of yacc.c */
-#line 2061 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2038 "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:
+ case 205:
-/* Line 1464 of yacc.c */
-#line 2063 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2040 "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 1464 of yacc.c */
-#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:
+ case 206:
-/* Line 1464 of yacc.c */
-#line 2071 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2043 "compilers/imcc/imcc.y"
{
add_pcc_result(interp, (yyvsp[(3) - (3)].i)->symregs[0], (yyvsp[(1) - (3)].sr));
IMCC_INFO(interp)->cur_call = NULL;
@@ -4894,220 +4821,220 @@
}
break;
- case 209:
+ case 207:
-/* Line 1464 of yacc.c */
-#line 2077 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2049 "compilers/imcc/imcc.y"
{
(yyval.i) = IMCC_create_itcall_label(interp);
}
break;
- case 210:
+ case 208:
-/* Line 1464 of yacc.c */
-#line 2081 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2053 "compilers/imcc/imcc.y"
{
IMCC_itcall_sub(interp, (yyvsp[(6) - (9)].sr));
IMCC_INFO(interp)->cur_call = NULL;
}
break;
- case 214:
+ case 212:
-/* Line 1464 of yacc.c */
-#line 2089 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2061 "compilers/imcc/imcc.y"
{
(yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(1) - (3)].sr));
}
break;
- case 215:
+ case 213:
-/* Line 1464 of yacc.c */
-#line 2096 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2068 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"not"; }
break;
- case 216:
+ case 214:
-/* Line 1464 of yacc.c */
-#line 2097 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2069 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"bnot"; }
break;
- case 217:
+ case 215:
-/* Line 1464 of yacc.c */
-#line 2098 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2070 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"neg"; }
break;
- case 218:
+ case 216:
-/* Line 1464 of yacc.c */
-#line 2102 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2074 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"sub"; }
break;
- case 219:
+ case 217:
-/* Line 1464 of yacc.c */
-#line 2103 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2075 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"add"; }
break;
- case 220:
+ case 218:
-/* Line 1464 of yacc.c */
-#line 2104 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2076 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"mul"; }
break;
- case 221:
+ case 219:
-/* Line 1464 of yacc.c */
-#line 2105 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2077 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"div"; }
break;
- case 222:
+ case 220:
-/* Line 1464 of yacc.c */
-#line 2106 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2078 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"mod"; }
break;
- case 223:
+ case 221:
-/* Line 1464 of yacc.c */
-#line 2107 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2079 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"fdiv"; }
break;
- case 224:
+ case 222:
-/* Line 1464 of yacc.c */
-#line 2108 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2080 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"pow"; }
break;
- case 225:
+ case 223:
-/* Line 1464 of yacc.c */
-#line 2109 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2081 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"concat"; }
break;
- case 226:
+ case 224:
-/* Line 1464 of yacc.c */
-#line 2110 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2082 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"iseq"; }
break;
- case 227:
+ case 225:
-/* Line 1464 of yacc.c */
-#line 2111 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2083 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"isne"; }
break;
- case 228:
+ case 226:
-/* Line 1464 of yacc.c */
-#line 2112 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2084 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"isgt"; }
break;
- case 229:
+ case 227:
-/* Line 1464 of yacc.c */
-#line 2113 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2085 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"isge"; }
break;
- case 230:
+ case 228:
-/* Line 1464 of yacc.c */
-#line 2114 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2086 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"islt"; }
break;
- case 231:
+ case 229:
-/* Line 1464 of yacc.c */
-#line 2115 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2087 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"isle"; }
break;
- case 232:
+ case 230:
-/* Line 1464 of yacc.c */
-#line 2116 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2088 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"shl"; }
break;
- case 233:
+ case 231:
-/* Line 1464 of yacc.c */
-#line 2117 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2089 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"shr"; }
break;
- case 234:
+ case 232:
-/* Line 1464 of yacc.c */
-#line 2118 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2090 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"lsr"; }
break;
- case 235:
+ case 233:
-/* Line 1464 of yacc.c */
-#line 2119 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2091 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"and"; }
break;
- case 236:
+ case 234:
-/* Line 1464 of yacc.c */
-#line 2120 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2092 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"or"; }
break;
- case 237:
+ case 235:
-/* Line 1464 of yacc.c */
-#line 2121 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2093 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"xor"; }
break;
- case 238:
+ case 236:
-/* Line 1464 of yacc.c */
-#line 2122 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2094 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"band"; }
break;
- case 239:
+ case 237:
-/* Line 1464 of yacc.c */
-#line 2123 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2095 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"bor"; }
break;
- case 240:
+ case 238:
-/* Line 1464 of yacc.c */
-#line 2124 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2096 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"bxor"; }
break;
- case 241:
+ case 239:
-/* Line 1464 of yacc.c */
-#line 2130 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2102 "compilers/imcc/imcc.y"
{
(yyval.i) = IMCC_create_itcall_label(interp);
(yyval.i)->type &= ~ITCALL;
@@ -5115,115 +5042,115 @@
}
break;
- case 242:
+ case 240:
-/* Line 1464 of yacc.c */
-#line 2135 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2107 "compilers/imcc/imcc.y"
{ (yyval.i) = 0; }
break;
- case 243:
+ case 241:
-/* Line 1464 of yacc.c */
-#line 2142 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2114 "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:
+ case 242:
-/* Line 1464 of yacc.c */
-#line 2146 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2118 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"add"; }
break;
- case 245:
+ case 243:
-/* Line 1464 of yacc.c */
-#line 2147 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2119 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"sub"; }
break;
- case 246:
+ case 244:
-/* Line 1464 of yacc.c */
-#line 2148 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2120 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"mul"; }
break;
- case 247:
+ case 245:
-/* Line 1464 of yacc.c */
-#line 2149 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2121 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"div"; }
break;
- case 248:
+ case 246:
-/* Line 1464 of yacc.c */
-#line 2150 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2122 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"mod"; }
break;
- case 249:
+ case 247:
-/* Line 1464 of yacc.c */
-#line 2151 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2123 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"fdiv"; }
break;
- case 250:
+ case 248:
-/* Line 1464 of yacc.c */
-#line 2152 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2124 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"concat"; }
break;
- case 251:
+ case 249:
-/* Line 1464 of yacc.c */
-#line 2153 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2125 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"band"; }
break;
- case 252:
+ case 250:
-/* Line 1464 of yacc.c */
-#line 2154 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2126 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"bor"; }
break;
- case 253:
+ case 251:
-/* Line 1464 of yacc.c */
-#line 2155 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2127 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"bxor"; }
break;
- case 254:
+ case 252:
-/* Line 1464 of yacc.c */
-#line 2156 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2128 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"shr"; }
break;
- case 255:
+ case 253:
-/* Line 1464 of yacc.c */
-#line 2157 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2129 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"shl"; }
break;
- case 256:
+ case 254:
-/* Line 1464 of yacc.c */
-#line 2158 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2130 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"lsr"; }
break;
- case 257:
+ case 255:
-/* Line 1464 of yacc.c */
-#line 2164 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2136 "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,
@@ -5233,31 +5160,31 @@
}
break;
- case 258:
+ case 256:
-/* Line 1464 of yacc.c */
-#line 2174 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2146 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_sub_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 259:
+ case 257:
-/* Line 1464 of yacc.c */
-#line 2175 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2147 "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:
+ case 258:
-/* Line 1464 of yacc.c */
-#line 2176 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2148 "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:
+ case 259:
-/* Line 1464 of yacc.c */
-#line 2178 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2150 "compilers/imcc/imcc.y"
{
(yyval.sr) = (yyvsp[(1) - (1)].sr);
if ((yyvsp[(1) - (1)].sr)->set != 'P')
@@ -5265,10 +5192,10 @@
}
break;
- case 262:
+ case 260:
-/* Line 1464 of yacc.c */
-#line 2184 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2156 "compilers/imcc/imcc.y"
{
/* disallow bareword method names; SREG name constants are fine */
const char * const name = (yyvsp[(3) - (3)].sr)->name;
@@ -5284,10 +5211,10 @@
}
break;
- case 263:
+ case 261:
-/* Line 1464 of yacc.c */
-#line 2198 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2170 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr);
(yyval.sr) = mk_const(interp, (yyvsp[(3) - (3)].s), 'U');
@@ -5295,10 +5222,10 @@
}
break;
- case 264:
+ case 262:
-/* Line 1464 of yacc.c */
-#line 2204 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2176 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr);
(yyval.sr) = mk_const(interp, (yyvsp[(3) - (3)].s), 'S');
@@ -5306,41 +5233,41 @@
}
break;
- case 265:
+ case 263:
-/* Line 1464 of yacc.c */
-#line 2209 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2181 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr); (yyval.sr) = (yyvsp[(3) - (3)].sr); }
break;
- case 266:
+ case 264:
-/* Line 1464 of yacc.c */
-#line 2215 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2187 "compilers/imcc/imcc.y"
{
(yyval.i) = IMCC_create_itcall_label(interp);
IMCC_itcall_sub(interp, (yyvsp[(1) - (1)].sr));
}
break;
- case 267:
+ case 265:
-/* Line 1464 of yacc.c */
-#line 2219 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2191 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(2) - (5)].i); }
break;
- case 268:
+ case 266:
-/* Line 1464 of yacc.c */
-#line 2223 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2195 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
- case 269:
+ case 267:
-/* Line 1464 of yacc.c */
-#line 2225 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2197 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
if (IMCC_INFO(interp)->adv_named_id) {
@@ -5352,10 +5279,10 @@
}
break;
- case 270:
+ case 268:
-/* Line 1464 of yacc.c */
-#line 2235 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2207 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
if (IMCC_INFO(interp)->adv_named_id) {
@@ -5367,10 +5294,10 @@
}
break;
- case 271:
+ case 269:
-/* Line 1464 of yacc.c */
-#line 2245 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2217 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
add_pcc_named_arg(interp, IMCC_INFO(interp)->cur_call,
@@ -5379,20 +5306,20 @@
}
break;
- case 272:
+ case 270:
-/* Line 1464 of yacc.c */
-#line 2252 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2224 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
add_pcc_named_arg_var(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (3)].sr), (yyvsp[(3) - (3)].sr));
}
break;
- case 273:
+ case 271:
-/* Line 1464 of yacc.c */
-#line 2257 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2229 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
add_pcc_named_arg(interp, IMCC_INFO(interp)->cur_call,
@@ -5401,73 +5328,73 @@
}
break;
- case 274:
+ case 272:
-/* Line 1464 of yacc.c */
-#line 2266 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2238 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(1) - (2)].sr); (yyval.sr)->type |= (yyvsp[(2) - (2)].t); }
break;
- case 275:
+ case 273:
-/* Line 1464 of yacc.c */
-#line 2270 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2242 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
- case 276:
+ case 274:
-/* Line 1464 of yacc.c */
-#line 2271 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2243 "compilers/imcc/imcc.y"
{ (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); }
break;
- case 277:
+ case 275:
-/* Line 1464 of yacc.c */
-#line 2275 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2247 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_FLAT; }
break;
- case 278:
+ case 276:
-/* Line 1464 of yacc.c */
-#line 2276 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2248 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_NAMED; }
break;
- case 279:
+ case 277:
-/* Line 1464 of yacc.c */
-#line 2277 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2249 "compilers/imcc/imcc.y"
{ (yyval.t) = VT_CALL_SIG; }
break;
- case 280:
+ case 278:
-/* Line 1464 of yacc.c */
-#line 2280 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2252 "compilers/imcc/imcc.y"
{ adv_named_set_u(interp, (yyvsp[(3) - (4)].s)); (yyval.t) = 0; }
break;
- case 281:
+ case 279:
-/* Line 1464 of yacc.c */
-#line 2281 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2253 "compilers/imcc/imcc.y"
{ adv_named_set(interp, (yyvsp[(3) - (4)].s)); (yyval.t) = 0; }
break;
- case 282:
+ case 280:
-/* Line 1464 of yacc.c */
-#line 2285 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2257 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(1) - (2)].sr); (yyval.sr)->type |= (yyvsp[(2) - (2)].t); }
break;
- case 283:
+ case 281:
-/* Line 1464 of yacc.c */
-#line 2290 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2262 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
if (IMCC_INFO(interp)->adv_named_id) {
@@ -5479,10 +5406,10 @@
}
break;
- case 284:
+ case 282:
-/* Line 1464 of yacc.c */
-#line 2300 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2272 "compilers/imcc/imcc.y"
{
add_pcc_named_result(interp, IMCC_INFO(interp)->cur_call,
mk_const(interp, (yyvsp[(3) - (5)].s), 'S'), (yyvsp[(5) - (5)].sr));
@@ -5490,10 +5417,10 @@
}
break;
- case 285:
+ case 283:
-/* Line 1464 of yacc.c */
-#line 2306 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2278 "compilers/imcc/imcc.y"
{
(yyval.sr) = 0;
if (IMCC_INFO(interp)->adv_named_id) {
@@ -5505,179 +5432,179 @@
}
break;
- case 286:
+ case 284:
-/* Line 1464 of yacc.c */
-#line 2316 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2288 "compilers/imcc/imcc.y"
{
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:
+ case 285:
-/* Line 1464 of yacc.c */
-#line 2320 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2292 "compilers/imcc/imcc.y"
{ (yyval.sr) = 0; }
break;
- case 288:
+ case 286:
-/* Line 1464 of yacc.c */
-#line 2324 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2296 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
- case 289:
+ case 287:
-/* Line 1464 of yacc.c */
-#line 2325 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2297 "compilers/imcc/imcc.y"
{ (yyval.i) = (yyvsp[(1) - (1)].i); }
break;
- case 290:
+ case 288:
-/* Line 1464 of yacc.c */
-#line 2330 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2302 "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:
+ case 289:
-/* Line 1464 of yacc.c */
-#line 2334 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2306 "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:
+ case 290:
-/* Line 1464 of yacc.c */
-#line 2338 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2310 "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:
+ case 291:
-/* Line 1464 of yacc.c */
-#line 2345 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2317 "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:
+ case 292:
-/* Line 1464 of yacc.c */
-#line 2349 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2321 "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:
+ case 293:
-/* Line 1464 of yacc.c */
-#line 2353 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2325 "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:
+ case 294:
-/* Line 1464 of yacc.c */
-#line 2359 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2331 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
- case 297:
+ case 295:
-/* Line 1464 of yacc.c */
-#line 2360 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2332 "compilers/imcc/imcc.y"
{ (yyval.t) = 0; }
break;
- case 298:
+ case 296:
-/* Line 1464 of yacc.c */
-#line 2364 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2336 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"eq"; }
break;
- case 299:
+ case 297:
-/* Line 1464 of yacc.c */
-#line 2365 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2337 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"ne"; }
break;
- case 300:
+ case 298:
-/* Line 1464 of yacc.c */
-#line 2366 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2338 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"gt"; }
break;
- case 301:
+ case 299:
-/* Line 1464 of yacc.c */
-#line 2367 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2339 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"ge"; }
break;
- case 302:
+ case 300:
-/* Line 1464 of yacc.c */
-#line 2368 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2340 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"lt"; }
break;
- case 303:
+ case 301:
-/* Line 1464 of yacc.c */
-#line 2369 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2341 "compilers/imcc/imcc.y"
{ (yyval.s) = (char *)"le"; }
break;
- case 306:
+ case 304:
-/* Line 1464 of yacc.c */
-#line 2378 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2350 "compilers/imcc/imcc.y"
{ (yyval.sr) = NULL; }
break;
- case 307:
+ case 305:
-/* Line 1464 of yacc.c */
-#line 2379 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2351 "compilers/imcc/imcc.y"
{ (yyval.sr) = (yyvsp[(1) - (1)].sr); }
break;
- case 308:
+ case 306:
-/* Line 1464 of yacc.c */
-#line 2383 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2355 "compilers/imcc/imcc.y"
{ (yyval.sr) = IMCC_INFO(interp)->regs[0]; }
break;
- case 310:
+ case 308:
-/* Line 1464 of yacc.c */
-#line 2388 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2360 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(1) - (1)].sr); }
break;
- case 311:
+ case 309:
-/* Line 1464 of yacc.c */
-#line 2390 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2362 "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);
@@ -5686,71 +5613,71 @@
}
break;
- case 312:
+ case 310:
-/* Line 1464 of yacc.c */
-#line 2397 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2369 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp) -> regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(2) - (3)].sr);
(yyval.sr) = (yyvsp[(2) - (3)].sr);
}
break;
- case 314:
+ case 312:
-/* Line 1464 of yacc.c */
-#line 2404 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2376 "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:
+ case 313:
-/* Line 1464 of yacc.c */
-#line 2405 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2377 "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:
+ case 314:
-/* Line 1464 of yacc.c */
-#line 2409 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2381 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_sub_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 317:
+ case 315:
-/* Line 1464 of yacc.c */
-#line 2410 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2382 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_sub_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 318:
+ case 316:
-/* Line 1464 of yacc.c */
-#line 2414 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2386 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_label_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 319:
+ case 317:
-/* Line 1464 of yacc.c */
-#line 2415 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2387 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_label_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 324:
+ case 322:
-/* Line 1464 of yacc.c */
-#line 2429 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2401 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->nkeys = 0;
}
break;
- case 325:
+ case 323:
-/* Line 1464 of yacc.c */
-#line 2433 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2405 "compilers/imcc/imcc.y"
{
(yyval.sr) = link_keys(interp,
IMCC_INFO(interp)->nkeys,
@@ -5758,19 +5685,19 @@
}
break;
- case 326:
+ case 324:
-/* Line 1464 of yacc.c */
-#line 2441 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2413 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->nkeys = 0;
}
break;
- case 327:
+ case 325:
-/* Line 1464 of yacc.c */
-#line 2445 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2417 "compilers/imcc/imcc.y"
{
(yyval.sr) = link_keys(interp,
IMCC_INFO(interp)->nkeys,
@@ -5778,99 +5705,99 @@
}
break;
- case 328:
+ case 326:
-/* Line 1464 of yacc.c */
-#line 2453 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2425 "compilers/imcc/imcc.y"
{ IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(1) - (1)].sr); }
break;
- case 329:
+ case 327:
-/* Line 1464 of yacc.c */
-#line 2455 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2427 "compilers/imcc/imcc.y"
{
IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(3) - (3)].sr);
(yyval.sr) = IMCC_INFO(interp)->keys[0];
}
break;
- case 330:
+ case 328:
-/* Line 1464 of yacc.c */
-#line 2463 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2435 "compilers/imcc/imcc.y"
{
(yyval.sr) = (yyvsp[(1) - (1)].sr);
}
break;
- case 331:
+ case 329:
-/* Line 1464 of yacc.c */
-#line 2469 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2441 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'I'); }
break;
- case 332:
+ case 330:
-/* Line 1464 of yacc.c */
-#line 2470 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2442 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'N'); }
break;
- case 333:
+ case 331:
-/* Line 1464 of yacc.c */
-#line 2471 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2443 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'S'); }
break;
- case 334:
+ case 332:
-/* Line 1464 of yacc.c */
-#line 2472 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2444 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'P'); }
break;
- case 335:
+ case 333:
-/* Line 1464 of yacc.c */
-#line 2473 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2445 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_pasm_reg(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 336:
+ case 334:
-/* Line 1464 of yacc.c */
-#line 2477 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2449 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'I'); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 337:
+ case 335:
-/* Line 1464 of yacc.c */
-#line 2478 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2450 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'N'); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 338:
+ case 336:
-/* Line 1464 of yacc.c */
-#line 2479 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2451 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'S'); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
- case 339:
+ case 337:
-/* Line 1464 of yacc.c */
-#line 2480 "compilers/imcc/imcc.y"
+/* Line 1455 of yacc.c */
+#line 2452 "compilers/imcc/imcc.y"
{ (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'U'); mem_sys_free((yyvsp[(1) - (1)].s)); }
break;
-/* Line 1464 of yacc.c */
-#line 5863 "compilers/imcc/imcparser.c"
+/* Line 1455 of yacc.c */
+#line 5790 "compilers/imcc/imcparser.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@@ -6081,8 +6008,8 @@
-/* Line 1684 of yacc.c */
-#line 2486 "compilers/imcc/imcc.y"
+/* Line 1675 of yacc.c */
+#line 2458 "compilers/imcc/imcc.y"
/* I need this prototype somewhere... */
Modified: branches/codestring/compilers/imcc/imcparser.h
==============================================================================
--- branches/codestring/compilers/imcc/imcparser.h Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/compilers/imcc/imcparser.h Mon May 10 13:15:51 2010 (r46471)
@@ -9,12 +9,13 @@
*/
/* HEADERIZER HFILE: none */
/* HEADERIZER STOP */
-/* A Bison parser, made by GNU Bison 2.4.2. */
+
+/* A Bison parser, made by GNU Bison 2.4.1. */
/* Skeleton interface for Bison's Yacc-like parsers in C
- Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software
- Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -68,107 +69,104 @@
ADV_OPT_FLAG = 274,
ADV_NAMED = 275,
ADV_ARROW = 276,
- NEW = 277,
- ADV_INVOCANT = 278,
- ADV_CALL_SIG = 279,
- NAMESPACE = 280,
- DOT_METHOD = 281,
- SUB = 282,
- SYM = 283,
- LOCAL = 284,
- LEXICAL = 285,
- CONST = 286,
- ANNOTATE = 287,
- INC = 288,
- DEC = 289,
- GLOBAL_CONST = 290,
- PLUS_ASSIGN = 291,
- MINUS_ASSIGN = 292,
- MUL_ASSIGN = 293,
- DIV_ASSIGN = 294,
- CONCAT_ASSIGN = 295,
- BAND_ASSIGN = 296,
- BOR_ASSIGN = 297,
- BXOR_ASSIGN = 298,
- FDIV = 299,
- FDIV_ASSIGN = 300,
- MOD_ASSIGN = 301,
- SHR_ASSIGN = 302,
- SHL_ASSIGN = 303,
- SHR_U_ASSIGN = 304,
- SHIFT_LEFT = 305,
- SHIFT_RIGHT = 306,
- INTV = 307,
- FLOATV = 308,
- STRINGV = 309,
- PMCV = 310,
- LOG_XOR = 311,
- RELOP_EQ = 312,
- RELOP_NE = 313,
- RELOP_GT = 314,
- RELOP_GTE = 315,
- RELOP_LT = 316,
- RELOP_LTE = 317,
- RESULT = 318,
- RETURN = 319,
- TAILCALL = 320,
- YIELDT = 321,
- GET_RESULTS = 322,
- POW = 323,
- SHIFT_RIGHT_U = 324,
- LOG_AND = 325,
- LOG_OR = 326,
- COMMA = 327,
- ESUB = 328,
- DOTDOT = 329,
- PCC_BEGIN = 330,
- PCC_END = 331,
- PCC_CALL = 332,
- PCC_SUB = 333,
- PCC_BEGIN_RETURN = 334,
- PCC_END_RETURN = 335,
- PCC_BEGIN_YIELD = 336,
- PCC_END_YIELD = 337,
- NCI_CALL = 338,
- METH_CALL = 339,
- INVOCANT = 340,
- MAIN = 341,
- LOAD = 342,
- INIT = 343,
- IMMEDIATE = 344,
- POSTCOMP = 345,
- METHOD = 346,
- ANON = 347,
- OUTER = 348,
- NEED_LEX = 349,
- MULTI = 350,
- VTABLE_METHOD = 351,
- LOADLIB = 352,
- SUB_INSTANCE_OF = 353,
- SUBID = 354,
- NS_ENTRY = 355,
- UNIQUE_REG = 356,
- LABEL = 357,
- EMIT = 358,
- EOM = 359,
- IREG = 360,
- NREG = 361,
- SREG = 362,
- PREG = 363,
- IDENTIFIER = 364,
- REG = 365,
- MACRO = 366,
- ENDM = 367,
- STRINGC = 368,
- INTC = 369,
- FLOATC = 370,
- USTRINGC = 371,
- PARROT_OP = 372,
- VAR = 373,
- LINECOMMENT = 374,
- FILECOMMENT = 375,
- DOT = 376,
- CONCAT = 377
+ ADV_INVOCANT = 277,
+ ADV_CALL_SIG = 278,
+ NAMESPACE = 279,
+ DOT_METHOD = 280,
+ SUB = 281,
+ SYM = 282,
+ LOCAL = 283,
+ LEXICAL = 284,
+ CONST = 285,
+ ANNOTATE = 286,
+ GLOBAL_CONST = 287,
+ PLUS_ASSIGN = 288,
+ MINUS_ASSIGN = 289,
+ MUL_ASSIGN = 290,
+ DIV_ASSIGN = 291,
+ CONCAT_ASSIGN = 292,
+ BAND_ASSIGN = 293,
+ BOR_ASSIGN = 294,
+ BXOR_ASSIGN = 295,
+ FDIV = 296,
+ FDIV_ASSIGN = 297,
+ MOD_ASSIGN = 298,
+ SHR_ASSIGN = 299,
+ SHL_ASSIGN = 300,
+ SHR_U_ASSIGN = 301,
+ SHIFT_LEFT = 302,
+ SHIFT_RIGHT = 303,
+ INTV = 304,
+ FLOATV = 305,
+ STRINGV = 306,
+ PMCV = 307,
+ LOG_XOR = 308,
+ RELOP_EQ = 309,
+ RELOP_NE = 310,
+ RELOP_GT = 311,
+ RELOP_GTE = 312,
+ RELOP_LT = 313,
+ RELOP_LTE = 314,
+ RESULT = 315,
+ RETURN = 316,
+ TAILCALL = 317,
+ YIELDT = 318,
+ GET_RESULTS = 319,
+ POW = 320,
+ SHIFT_RIGHT_U = 321,
+ LOG_AND = 322,
+ LOG_OR = 323,
+ COMMA = 324,
+ ESUB = 325,
+ DOTDOT = 326,
+ PCC_BEGIN = 327,
+ PCC_END = 328,
+ PCC_CALL = 329,
+ PCC_SUB = 330,
+ PCC_BEGIN_RETURN = 331,
+ PCC_END_RETURN = 332,
+ PCC_BEGIN_YIELD = 333,
+ PCC_END_YIELD = 334,
+ NCI_CALL = 335,
+ METH_CALL = 336,
+ INVOCANT = 337,
+ MAIN = 338,
+ LOAD = 339,
+ INIT = 340,
+ IMMEDIATE = 341,
+ POSTCOMP = 342,
+ METHOD = 343,
+ ANON = 344,
+ OUTER = 345,
+ NEED_LEX = 346,
+ MULTI = 347,
+ VTABLE_METHOD = 348,
+ LOADLIB = 349,
+ SUB_INSTANCE_OF = 350,
+ SUBID = 351,
+ NS_ENTRY = 352,
+ UNIQUE_REG = 353,
+ LABEL = 354,
+ EMIT = 355,
+ EOM = 356,
+ IREG = 357,
+ NREG = 358,
+ SREG = 359,
+ PREG = 360,
+ IDENTIFIER = 361,
+ REG = 362,
+ MACRO = 363,
+ ENDM = 364,
+ STRINGC = 365,
+ INTC = 366,
+ FLOATC = 367,
+ USTRINGC = 368,
+ PARROT_OP = 369,
+ VAR = 370,
+ LINECOMMENT = 371,
+ FILECOMMENT = 372,
+ DOT = 373,
+ CONCAT = 374
};
#endif
/* Tokens. */
@@ -191,107 +189,104 @@
#define ADV_OPT_FLAG 274
#define ADV_NAMED 275
#define ADV_ARROW 276
-#define NEW 277
-#define ADV_INVOCANT 278
-#define ADV_CALL_SIG 279
-#define NAMESPACE 280
-#define DOT_METHOD 281
-#define SUB 282
-#define SYM 283
-#define LOCAL 284
-#define LEXICAL 285
-#define CONST 286
-#define ANNOTATE 287
-#define INC 288
-#define DEC 289
-#define GLOBAL_CONST 290
-#define PLUS_ASSIGN 291
-#define MINUS_ASSIGN 292
-#define MUL_ASSIGN 293
-#define DIV_ASSIGN 294
-#define CONCAT_ASSIGN 295
-#define BAND_ASSIGN 296
-#define BOR_ASSIGN 297
-#define BXOR_ASSIGN 298
-#define FDIV 299
-#define FDIV_ASSIGN 300
-#define MOD_ASSIGN 301
-#define SHR_ASSIGN 302
-#define SHL_ASSIGN 303
-#define SHR_U_ASSIGN 304
-#define SHIFT_LEFT 305
-#define SHIFT_RIGHT 306
-#define INTV 307
-#define FLOATV 308
-#define STRINGV 309
-#define PMCV 310
-#define LOG_XOR 311
-#define RELOP_EQ 312
-#define RELOP_NE 313
-#define RELOP_GT 314
-#define RELOP_GTE 315
-#define RELOP_LT 316
-#define RELOP_LTE 317
-#define RESULT 318
-#define RETURN 319
-#define TAILCALL 320
-#define YIELDT 321
-#define GET_RESULTS 322
-#define POW 323
-#define SHIFT_RIGHT_U 324
-#define LOG_AND 325
-#define LOG_OR 326
-#define COMMA 327
-#define ESUB 328
-#define DOTDOT 329
-#define PCC_BEGIN 330
-#define PCC_END 331
-#define PCC_CALL 332
-#define PCC_SUB 333
-#define PCC_BEGIN_RETURN 334
-#define PCC_END_RETURN 335
-#define PCC_BEGIN_YIELD 336
-#define PCC_END_YIELD 337
-#define NCI_CALL 338
-#define METH_CALL 339
-#define INVOCANT 340
-#define MAIN 341
-#define LOAD 342
-#define INIT 343
-#define IMMEDIATE 344
-#define POSTCOMP 345
-#define METHOD 346
-#define ANON 347
-#define OUTER 348
-#define NEED_LEX 349
-#define MULTI 350
-#define VTABLE_METHOD 351
-#define LOADLIB 352
-#define SUB_INSTANCE_OF 353
-#define SUBID 354
-#define NS_ENTRY 355
-#define UNIQUE_REG 356
-#define LABEL 357
-#define EMIT 358
-#define EOM 359
-#define IREG 360
-#define NREG 361
-#define SREG 362
-#define PREG 363
-#define IDENTIFIER 364
-#define REG 365
-#define MACRO 366
-#define ENDM 367
-#define STRINGC 368
-#define INTC 369
-#define FLOATC 370
-#define USTRINGC 371
-#define PARROT_OP 372
-#define VAR 373
-#define LINECOMMENT 374
-#define FILECOMMENT 375
-#define DOT 376
-#define CONCAT 377
+#define ADV_INVOCANT 277
+#define ADV_CALL_SIG 278
+#define NAMESPACE 279
+#define DOT_METHOD 280
+#define SUB 281
+#define SYM 282
+#define LOCAL 283
+#define LEXICAL 284
+#define CONST 285
+#define ANNOTATE 286
+#define GLOBAL_CONST 287
+#define PLUS_ASSIGN 288
+#define MINUS_ASSIGN 289
+#define MUL_ASSIGN 290
+#define DIV_ASSIGN 291
+#define CONCAT_ASSIGN 292
+#define BAND_ASSIGN 293
+#define BOR_ASSIGN 294
+#define BXOR_ASSIGN 295
+#define FDIV 296
+#define FDIV_ASSIGN 297
+#define MOD_ASSIGN 298
+#define SHR_ASSIGN 299
+#define SHL_ASSIGN 300
+#define SHR_U_ASSIGN 301
+#define SHIFT_LEFT 302
+#define SHIFT_RIGHT 303
+#define INTV 304
+#define FLOATV 305
+#define STRINGV 306
+#define PMCV 307
+#define LOG_XOR 308
+#define RELOP_EQ 309
+#define RELOP_NE 310
+#define RELOP_GT 311
+#define RELOP_GTE 312
+#define RELOP_LT 313
+#define RELOP_LTE 314
+#define RESULT 315
+#define RETURN 316
+#define TAILCALL 317
+#define YIELDT 318
+#define GET_RESULTS 319
+#define POW 320
+#define SHIFT_RIGHT_U 321
+#define LOG_AND 322
+#define LOG_OR 323
+#define COMMA 324
+#define ESUB 325
+#define DOTDOT 326
+#define PCC_BEGIN 327
+#define PCC_END 328
+#define PCC_CALL 329
+#define PCC_SUB 330
+#define PCC_BEGIN_RETURN 331
+#define PCC_END_RETURN 332
+#define PCC_BEGIN_YIELD 333
+#define PCC_END_YIELD 334
+#define NCI_CALL 335
+#define METH_CALL 336
+#define INVOCANT 337
+#define MAIN 338
+#define LOAD 339
+#define INIT 340
+#define IMMEDIATE 341
+#define POSTCOMP 342
+#define METHOD 343
+#define ANON 344
+#define OUTER 345
+#define NEED_LEX 346
+#define MULTI 347
+#define VTABLE_METHOD 348
+#define LOADLIB 349
+#define SUB_INSTANCE_OF 350
+#define SUBID 351
+#define NS_ENTRY 352
+#define UNIQUE_REG 353
+#define LABEL 354
+#define EMIT 355
+#define EOM 356
+#define IREG 357
+#define NREG 358
+#define SREG 359
+#define PREG 360
+#define IDENTIFIER 361
+#define REG 362
+#define MACRO 363
+#define ENDM 364
+#define STRINGC 365
+#define INTC 366
+#define FLOATC 367
+#define USTRINGC 368
+#define PARROT_OP 369
+#define VAR 370
+#define LINECOMMENT 371
+#define FILECOMMENT 372
+#define DOT 373
+#define CONCAT 374
@@ -300,8 +295,8 @@
typedef union YYSTYPE
{
-/* Line 1685 of yacc.c */
-#line 1075 "compilers/imcc/imcc.y"
+/* Line 1676 of yacc.c */
+#line 1068 "compilers/imcc/imcc.y"
IdList * idlist;
int t;
@@ -311,8 +306,8 @@
-/* Line 1685 of yacc.c */
-#line 305 "compilers/imcc/imcparser.h"
+/* Line 1676 of yacc.c */
+#line 300 "compilers/imcc/imcparser.h"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
Modified: branches/codestring/compilers/imcc/instructions.c
==============================================================================
--- branches/codestring/compilers/imcc/instructions.c Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/compilers/imcc/instructions.c Mon May 10 13:15:51 2010 (r46471)
@@ -117,78 +117,6 @@
return ins;
}
-
-/*
- * Some instructions don't have a hint in op_info that they work
- * on all registers or all registers of a given type (e.g., cleari)
- * These instructions need special handling at various points in the code.
- */
-
-static int w_special[1+4*3];
-
-/*
-
-=item C<void imcc_init_tables(PARROT_INTERP)>
-
-Initializes IMCC's table of opcodes, based on the list maintained
-by the Parrot interpreter. Stores the results in global variable
-C<w_special>.
-
-=cut
-
-*/
-
-void
-imcc_init_tables(PARROT_INTERP)
-{
- ASSERT_ARGS(imcc_init_tables)
- const char *writes[] = {
- "cleari", "clearn", "clearp", "clears",
- };
- /* init opnums */
- if (!w_special[0]) {
- size_t i;
- for (i = 0; i < N_ELEMENTS(writes); i++) {
- const int n = interp->op_lib->op_code(interp, writes[i], 1);
- PARROT_ASSERT(n);
- w_special[i] = n;
- }
- }
-}
-
-/*
-
-=item C<int ins_writes2(const Instruction *ins, int t)>
-
-Returns TRUE if instruction ins writes to a register of type t
-
-=cut
-
-*/
-
-int
-ins_writes2(ARGIN(const Instruction *ins), int t)
-{
- ASSERT_ARGS(ins_writes2)
- const char *p;
-
- if (ins->opnum == w_special[0])
- return 1;
-
- p = strchr(types, t);
-
- if (p) {
- const size_t idx = p - types;
- size_t i;
-
- for (i = 1; i < N_ELEMENTS(w_special); i += 4)
- if (ins->opnum == w_special[i + idx])
- return 1;
- }
-
- return 0;
-}
-
/*
=item C<int instruction_reads(const Instruction *ins, const SymReg *r)>
Modified: branches/codestring/compilers/imcc/instructions.h
==============================================================================
--- branches/codestring/compilers/imcc/instructions.h Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/compilers/imcc/instructions.h Mon May 10 13:15:51 2010 (r46471)
@@ -152,9 +152,6 @@
int get_branch_regno(ARGIN(const Instruction *ins))
__attribute__nonnull__(1);
-void imcc_init_tables(PARROT_INTERP)
- __attribute__nonnull__(1);
-
PARROT_IGNORABLE_RESULT
int /*@alt void@*/
ins_print(PARROT_INTERP,
@@ -164,9 +161,6 @@
__attribute__nonnull__(2)
__attribute__nonnull__(3);
-int ins_writes2(ARGIN(const Instruction *ins), int t)
- __attribute__nonnull__(1);
-
void insert_ins(
ARGMOD(IMC_Unit *unit),
ARGMOD_NULLOK(Instruction *ins),
@@ -246,14 +240,10 @@
PARROT_ASSERT_ARG(ins))
#define ASSERT_ARGS_get_branch_regno __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(ins))
-#define ASSERT_ARGS_imcc_init_tables __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_ins_print __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(io) \
, PARROT_ASSERT_ARG(ins))
-#define ASSERT_ARGS_ins_writes2 __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(ins))
#define ASSERT_ARGS_insert_ins __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(unit) \
, PARROT_ASSERT_ARG(tmp))
Modified: branches/codestring/compilers/imcc/main.c
==============================================================================
--- branches/codestring/compilers/imcc/main.c Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/compilers/imcc/main.c Mon May 10 13:15:51 2010 (r46471)
@@ -243,7 +243,6 @@
if (strchr(opt->opt_arg, 'c'))
IMCC_INFO(interp)->optimizer_level |= OPT_SUB;
- IMCC_INFO(interp)->allocator = IMCC_GRAPH_ALLOCATOR;
/* currently not ok due to different register allocation */
if (strchr(opt->opt_arg, '1')) {
IMCC_INFO(interp)->optimizer_level |= OPT_PRE;
@@ -299,13 +298,10 @@
case GOTO: printf("goto ");break;
case IF: printf("if ");break;
case UNLESS: printf("unless ");break;
- case INC: printf("inc ");break;
- case DEC: printf("dec ");break;
case INTV: printf("int ");break;
case FLOATV: printf("float ");break;
case STRINGV: printf("string ");break;
case PMCV: printf("pmc ");break;
- case NEW: printf("new ");break;
case SHIFT_LEFT: printf(" << ");break;
case SHIFT_RIGHT: printf(" >> ");break;
case SHIFT_RIGHT_U: printf(" >>> ");break;
@@ -432,7 +428,6 @@
Parrot_block_GC_sweep(interp);
IMCC_INFO(interp)->yyscanner = yyscanner;
- IMCC_INFO(interp)->allocator = IMCC_VANILLA_ALLOCATOR;
/* Default optimization level is zero; see optimizer.c, imc.h */
if (!IMCC_INFO(interp)->optimizer_level) {
Modified: branches/codestring/compilers/imcc/parser.h
==============================================================================
--- branches/codestring/compilers/imcc/parser.h Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/compilers/imcc/parser.h Mon May 10 13:15:51 2010 (r46471)
@@ -8,7 +8,6 @@
typedef struct _IdList {
char* id;
- int unique_reg;
struct _IdList* next;
} IdList;
Modified: branches/codestring/compilers/imcc/parser_util.c
==============================================================================
--- branches/codestring/compilers/imcc/parser_util.c Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/compilers/imcc/parser_util.c Mon May 10 13:15:51 2010 (r46471)
@@ -121,6 +121,7 @@
* absolutely global to prevent the files from being overwritten.
*
*/
+/* XXX non-reentrant */
static Parrot_mutex eval_nr_lock;
static INTVAL eval_nr = 0;
@@ -128,61 +129,7 @@
=head2 Functions
-=over 4
-
-=item C<Instruction * iNEW(PARROT_INTERP, IMC_Unit *unit, SymReg *r0, char
-*type, SymReg *init, int emit)>
-
- * P = new type, [init]
- * PASM like:
- * new P, 'SomeThing'
- * is done in the lexer, this is a mess
- * best would be to have a flag in core.ops, where a PMC type is expected
-
-=cut
-
- */
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_CAN_RETURN_NULL
-Instruction *
-iNEW(PARROT_INTERP, ARGMOD(IMC_Unit *unit), ARGMOD(SymReg *r0),
- ARGMOD(char *type), ARGIN_NULLOK(SymReg *init), int emit)
-{
- ASSERT_ARGS(iNEW)
- char fmt[256];
- SymReg *regs[3];
- SymReg *pmc;
- int nargs;
- 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);
- pmc = mk_const(interp, fmt, 'I');
-
- if (pmc_num <= 0)
- IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR, "Unknown PMC type '%s'\n", type);
-
- snprintf(fmt, sizeof (fmt), "%%s, %d\t # .%s", pmc_num, type);
-
- r0->usage |= U_NEW;
- if (STREQ(type, "Hash"))
- r0->usage |= U_KEYED;
-
- regs[0] = r0;
- regs[1] = pmc;
-
- if (init) {
- regs[2] = init;
- nargs = 3;
- }
- else
- nargs = 2;
-
- return INS(interp, unit, "new", fmt, regs, nargs, 0, emit);
-}
-
-/*
+=over
=item C<void op_fullname(char *dest, const char *name, SymReg * const *args, int
narg, int keyvec)>
@@ -528,13 +475,7 @@
IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
"Cannot yield from non-continuation\n");
- IMCC_INFO(interp)->cur_unit->instructions->symregs[0]->pcc_sub->calls_a_sub
- |= 1 | ITPCCYIELD;
- }
- else if ((strncmp(name, "invoke", 6) == 0) ||
- (strncmp(name, "callmethod", 10) == 0)) {
- if (IMCC_INFO(interp)->cur_unit->type & IMC_PCCSUB)
- IMCC_INFO(interp)->cur_unit->instructions->symregs[0]->pcc_sub->calls_a_sub |= 1;
+ IMCC_INFO(interp)->cur_unit->instructions->symregs[0]->pcc_sub->yield = 1;
}
/* set up branch flags
@@ -1218,7 +1159,7 @@
try_rev_cmp(ARGIN(const char *name), ARGMOD(SymReg **r))
{
ASSERT_ARGS(try_rev_cmp)
- static struct br_pairs {
+ static const struct br_pairs {
PARROT_OBSERVER const char * const op;
PARROT_OBSERVER const char * const nop;
const int to_swap;
Modified: branches/codestring/compilers/imcc/pbc.c
==============================================================================
--- branches/codestring/compilers/imcc/pbc.c Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/compilers/imcc/pbc.c Mon May 10 13:15:51 2010 (r46471)
@@ -1156,6 +1156,10 @@
"add lexical '%s' to sub name '%Ss'\n",
n->name, sub->name);
+ if (VTABLE_exists_keyed_str(interp, lex_info, lex_name))
+ IMCC_fataly(interp, EXCEPTION_INVALID_OPERATION,
+ "Multiple declarations of lexical '%S'\n", lex_name);
+
VTABLE_set_integer_keyed_str(interp, lex_info,
lex_name, r->color);
@@ -1269,10 +1273,6 @@
IMC_Unit * const unit =
IMCC_INFO(interp)->globals->cs->subs->unit;
- INTVAL type =
- (r->pcc_sub->calls_a_sub & ITPCCYIELD) ?
- enum_class_Coroutine : enum_class_Sub;
-
int i;
int ns_const = -1;
@@ -1314,7 +1314,8 @@
}
else {
/* use a possible type mapping for the Sub PMCs, and create it */
- type = Parrot_get_ctx_HLL_type(interp, type);
+ const INTVAL type = Parrot_get_ctx_HLL_type(interp,
+ r->pcc_sub->yield ? enum_class_Coroutine : enum_class_Sub);
/* TODO create constant - see also src/packfile.c */
sub_pmc = Parrot_pmc_new(interp, type);
@@ -2179,21 +2180,13 @@
IMCC_INFO(interp)->pc = (opcode_t *)interp->code->base.data + oldsize;
IMCC_INFO(interp)->npc = 0;
- /* add debug if necessary */
- if (IMCC_INFO(interp)->optimizer_level == 0
- || IMCC_INFO(interp)->optimizer_level == OPT_PASM) {
- const char * const sourcefile = unit->file;
-
- /* FIXME length and multiple subs */
- IMCC_INFO(interp)->debug_seg = Parrot_new_debug_seg(interp,
- interp->code,
- (size_t)IMCC_INFO(interp)->ins_line + ins_size + 1);
+ /* FIXME length and multiple subs */
+ IMCC_INFO(interp)->debug_seg = Parrot_new_debug_seg(interp,
+ interp->code,
+ (size_t)IMCC_INFO(interp)->ins_line + ins_size + 1);
- Parrot_debug_add_mapping(interp, IMCC_INFO(interp)->debug_seg,
- IMCC_INFO(interp)->ins_line, sourcefile);
- }
- else
- IMCC_INFO(interp)->debug_seg = NULL;
+ Parrot_debug_add_mapping(interp, IMCC_INFO(interp)->debug_seg,
+ IMCC_INFO(interp)->ins_line, unit->file);
/* if item is a PCC_SUB entry then store it constants */
if (ins->symregs[0] && ins->symregs[0]->pcc_sub) {
Modified: branches/codestring/compilers/imcc/pcc.c
==============================================================================
--- branches/codestring/compilers/imcc/pcc.c Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/compilers/imcc/pcc.c Mon May 10 13:15:51 2010 (r46471)
@@ -258,9 +258,9 @@
static const char item[] = {'0', 'x', 'f', 'f', 'f', 'f', ','};
/* The list suffix includes the '\0' terminator */
static const char subf[] = {')', '"', '\0'};
- static unsigned int lenpref = sizeof pref;
- static unsigned int lenitem = sizeof item;
- static unsigned int lensubf = sizeof subf;
+ static const unsigned int lenpref = sizeof pref;
+ static const unsigned int lenitem = sizeof item;
+ static const unsigned int lensubf = sizeof subf;
int i, flags;
char s[16];
@@ -442,7 +442,7 @@
&& sub->pcc_sub
&& !sub->pcc_sub->object
/* s. src/inter_call.c:119 */
- && (sub->pcc_sub->flags & isTAIL_CALL))
+ && sub->pcc_sub->tailcall)
return;
if (unit->last_ins->type != (ITPCCSUB|ITLABEL)
@@ -535,6 +535,7 @@
{
ASSERT_ARGS(pcc_reg_mov)
static const char types[] = "INSP";
+ /* XXX non-reentrant */
static SymReg *temps[4];
move_info_t *info = (move_info_t *)vinfo;
SymReg *src = NULL;
@@ -780,7 +781,7 @@
return;
}
- tail_call = (sub->pcc_sub->flags & isTAIL_CALL);
+ tail_call = sub->pcc_sub->tailcall;
if (tail_call && IMCC_INFO(interp)->optimizer_level & OPT_SUB)
if (recursive_tail_call(interp, unit, ins, sub))
Modified: branches/codestring/compilers/imcc/reg_alloc.c
==============================================================================
--- branches/codestring/compilers/imcc/reg_alloc.c Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/compilers/imcc/reg_alloc.c Mon May 10 13:15:51 2010 (r46471)
@@ -44,21 +44,11 @@
__attribute__nonnull__(2)
FUNC_MODIFIES(*unit);
-static void allocate_non_volatile(PARROT_INTERP, ARGMOD(IMC_Unit *unit))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- FUNC_MODIFIES(*unit);
-
static void allocate_uniq(PARROT_INTERP, ARGMOD(IMC_Unit *unit), int usage)
__attribute__nonnull__(1)
__attribute__nonnull__(2)
FUNC_MODIFIES(*unit);
-static void build_interference_graph(PARROT_INTERP, ARGMOD(IMC_Unit *unit))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- FUNC_MODIFIES(*unit);
-
static void build_reglist(PARROT_INTERP, ARGMOD(IMC_Unit *unit))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
@@ -82,45 +72,10 @@
__attribute__nonnull__(2)
FUNC_MODIFIES(*avail);
-PARROT_WARN_UNUSED_RESULT
-PARROT_MALLOC
-PARROT_CANNOT_RETURN_NULL
-static unsigned int* ig_allocate(int N);
-
-PARROT_WARN_UNUSED_RESULT
-static int ig_find_color(
- ARGIN(const IMC_Unit *unit),
- ARGIN(const char *avail))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-PARROT_CANNOT_RETURN_NULL
-static unsigned int* ig_get_word(
- int i,
- int j,
- int N,
- ARGIN(unsigned int *graph),
- ARGMOD(int *bit_ofs))
- __attribute__nonnull__(4)
- __attribute__nonnull__(5)
- FUNC_MODIFIES(*bit_ofs);
-
-static void ig_set(int i, int j, int N, ARGIN(unsigned int *graph))
- __attribute__nonnull__(4);
-
static void imc_stat_init(ARGMOD(IMC_Unit *unit))
__attribute__nonnull__(1)
FUNC_MODIFIES(*unit);
-static int interferes(PARROT_INTERP,
- ARGIN(const IMC_Unit *unit),
- ARGIN(const SymReg *r0),
- ARGIN(const SymReg *r1))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2)
- __attribute__nonnull__(3)
- __attribute__nonnull__(4);
-
static void make_stat(
ARGMOD(IMC_Unit *unit),
ARGMOD_NULLOK(int *sets),
@@ -130,27 +85,11 @@
FUNC_MODIFIES(*sets)
FUNC_MODIFIES(*cols);
-static void map_colors(
- ARGIN(const IMC_Unit* unit),
- int x,
- ARGIN(unsigned int *graph),
- ARGMOD(char *avail),
- int typ,
- int already_allocated)
- __attribute__nonnull__(1)
- __attribute__nonnull__(3)
- __attribute__nonnull__(4)
- FUNC_MODIFIES(*avail);
-
static void print_stat(PARROT_INTERP, ARGMOD(IMC_Unit *unit))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
FUNC_MODIFIES(*unit);
-static void rebuild_reglist(ARGMOD(IMC_Unit *unit))
- __attribute__nonnull__(1)
- FUNC_MODIFIES(*unit);
-
PARROT_WARN_UNUSED_RESULT
static int reg_sort_f(ARGIN(const void *a), ARGIN(const void *b))
__attribute__nonnull__(1)
@@ -160,10 +99,6 @@
__attribute__nonnull__(1)
FUNC_MODIFIES(*unit);
-static void try_allocate(PARROT_INTERP, ARGIN(IMC_Unit *unit))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
static void vanilla_reg_alloc(PARROT_INTERP, ARGMOD(IMC_Unit *unit))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
@@ -172,15 +107,9 @@
#define ASSERT_ARGS_allocate_lexicals __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(unit))
-#define ASSERT_ARGS_allocate_non_volatile __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(unit))
#define ASSERT_ARGS_allocate_uniq __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(unit))
-#define ASSERT_ARGS_build_interference_graph __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(unit))
#define ASSERT_ARGS_build_reglist __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(unit))
@@ -192,41 +121,18 @@
#define ASSERT_ARGS_first_avail __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
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) \
- , PARROT_ASSERT_ARG(avail))
-#define ASSERT_ARGS_ig_get_word __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(graph) \
- , PARROT_ASSERT_ARG(bit_ofs))
-#define ASSERT_ARGS_ig_set __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(graph))
#define ASSERT_ARGS_imc_stat_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(unit))
-#define ASSERT_ARGS_interferes __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(unit) \
- , PARROT_ASSERT_ARG(r0) \
- , PARROT_ASSERT_ARG(r1))
#define ASSERT_ARGS_make_stat __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(unit))
-#define ASSERT_ARGS_map_colors __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(unit) \
- , PARROT_ASSERT_ARG(graph) \
- , PARROT_ASSERT_ARG(avail))
#define ASSERT_ARGS_print_stat __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(unit))
-#define ASSERT_ARGS_rebuild_reglist __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(unit))
#define ASSERT_ARGS_reg_sort_f __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(a) \
, PARROT_ASSERT_ARG(b))
#define ASSERT_ARGS_sort_reglist __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(unit))
-#define ASSERT_ARGS_try_allocate __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(unit))
#define ASSERT_ARGS_vanilla_reg_alloc __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(unit))
@@ -235,85 +141,6 @@
/*
-=item C<static unsigned int* ig_get_word(int i, int j, int N, unsigned int
-*graph, int *bit_ofs)>
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-static unsigned int*
-ig_get_word(int i, int j, int N, ARGIN(unsigned int *graph),
- ARGMOD(int *bit_ofs))
-{
- ASSERT_ARGS(ig_get_word)
- const unsigned int bit = i * N + j;
- *bit_ofs = bit % sizeof (*graph);
-
- return &graph[bit / sizeof (*graph)];
-}
-
-/*
-
-=item C<static void ig_set(int i, int j, int N, unsigned int *graph)>
-
-=cut
-
-*/
-
-static void
-ig_set(int i, int j, int N, ARGIN(unsigned int *graph))
-{
- ASSERT_ARGS(ig_set)
- int bit_ofs;
- unsigned int * const word = ig_get_word(i, j, N, graph, &bit_ofs);
- *word |= (1 << bit_ofs);
-}
-
-/*
-
-=item C<unsigned int ig_test(int i, int j, int N, unsigned int *graph)>
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-unsigned int
-ig_test(int i, int j, int N, ARGIN(unsigned int *graph))
-{
- ASSERT_ARGS(ig_test)
- int bit_ofs;
- unsigned int* word = ig_get_word(i, j, N, graph, &bit_ofs);
- return *word & (1 << bit_ofs);
-}
-
-/*
-
-=item C<static unsigned int* ig_allocate(int N)>
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-PARROT_MALLOC
-PARROT_CANNOT_RETURN_NULL
-static unsigned int*
-ig_allocate(int N)
-{
- ASSERT_ARGS(ig_allocate)
- /* size is N*N bits, but we want don't want to allocate a partial
- * word, so round up to the nearest multiple of sizeof (int).
- */
- const int need_bits = N * N;
- const int num_words = (need_bits + sizeof (int) - 1) / sizeof (int);
- return (unsigned int *)mem_sys_allocate_zeroed(num_words * sizeof (int));
-}
-
-/*
-
=item C<void imc_reg_alloc(PARROT_INTERP, IMC_Unit *unit)>
imc_reg_alloc is the main loop of the allocation algorithm. It operates
@@ -340,7 +167,6 @@
(OPT_PRE|OPT_CFG|OPT_PASM)) && unit->pasm_file)
goto done;
- imcc_init_tables(interp);
IMCC_INFO(interp)->allocated = 0;
#if IMC_TRACE
@@ -388,26 +214,14 @@
build_reglist(interp, unit);
- if (IMCC_INFO(interp)->allocator == IMCC_GRAPH_ALLOCATOR)
- life_analysis(interp, unit);
-
- allocate_non_volatile(interp, unit);
+ allocate_uniq(interp, unit, 0);
} while (!IMCC_INFO(interp)->dont_optimize && optimize(interp, unit));
if (IMCC_INFO(interp)->debug & DEBUG_IMC)
dump_symreg(unit);
- rebuild_reglist(unit);
-
- /*
- * TT #1281 - graph coloring reg allocator ignores local_branch/local_return
- if (IMCC_INFO(interp)->allocator == IMCC_VANILLA_ALLOCATOR)
- */
- vanilla_reg_alloc(interp, unit);
- /*
- else
- graph_coloring_reg_alloc(interp, unit);
- */
+ /* TODO add option for a better allocator */
+ vanilla_reg_alloc(interp, unit);
if (IMCC_INFO(interp)->debug & DEBUG_IMC)
dump_instructions(interp, unit);
@@ -434,17 +248,8 @@
#if IMC_TRACE
fprintf(stderr, "reg_alloc.c: free_reglist\n");
#endif
- if (unit->interference_graph) {
- mem_sys_free(unit->interference_graph);
- unit->interference_graph = NULL;
- }
if (unit->reglist) {
- unsigned int i;
-
- for (i = 0; i < unit->n_symbols; i++)
- free_life_info(unit, unit->reglist[i]);
-
mem_sys_free(unit->reglist);
unit->reglist = NULL;
unit->n_symbols = 0;
@@ -453,24 +258,6 @@
/*
-=item C<void graph_coloring_reg_alloc(PARROT_INTERP, IMC_Unit *unit)>
-
-=cut
-
-*/
-
-void
-graph_coloring_reg_alloc(PARROT_INTERP, ARGMOD(IMC_Unit *unit))
-{
- ASSERT_ARGS(graph_coloring_reg_alloc)
- build_interference_graph(interp, unit);
-
- try_allocate(interp, unit);
- IMCC_INFO(interp)->allocated = 1;
-}
-
-/*
-
=item C<static void make_stat(IMC_Unit *unit, int *sets, int *cols)>
some statistics about register usage
@@ -712,109 +499,6 @@
/*
-=item C<static void rebuild_reglist(IMC_Unit *unit)>
-
-Exclude all already allocated registers (< first_avail)
-from reglist. This reduced the size of the interference graph
-significantly
-
-=cut
-
-*/
-
-static void
-rebuild_reglist(ARGMOD(IMC_Unit *unit))
-{
- ASSERT_ARGS(rebuild_reglist)
- unsigned int i, count, unused;
- static const char types[] = "INSP";
-
- for (i = count = unused = 0; i < unit->n_symbols; i++) {
- SymReg * const r = unit->reglist[i];
- const char *p;
- int reg_set;
-
- if (r->color == -1)
- goto use_it;
-
- p = strchr(types, r->set);
-
- if (!p)
- goto use_it;
-
- reg_set = p - types;
- if (r->color < unit->first_avail[reg_set]) {
- unused++;
- continue;
- }
-
- use_it:
- if (i == count)
- count++;
- else
- unit->reglist[count++] = unit->reglist[i];
- }
-
- unit->n_symbols -= unused;
-}
-
-/*
-
-=item C<static void build_interference_graph(PARROT_INTERP, IMC_Unit *unit)>
-
-Creates the interference graph between the variables.
-
-Data structure is a 2-d array 'interference_graph' bitmap where
-row/column indices represent the same index in the list of all
-symbols (unit->reglist) in the current compilation unit.
-
-Two variables interfere when they are alive at the same time.
-
-=cut
-
-*/
-
-static void
-build_interference_graph(PARROT_INTERP, ARGMOD(IMC_Unit *unit))
-{
- ASSERT_ARGS(build_interference_graph)
- int x;
- unsigned int *interference_graph;
-
- const int n_symbols = unit->n_symbols;
-
- if (!n_symbols)
- return;
-
- /* Construct a graph N x N where N = number of symbolics.
- * This piece can be rewritten without the N x N array */
- interference_graph = ig_allocate(n_symbols);
- unit->interference_graph = interference_graph;
-
- /* Calculate interferences between each chain and populate the the Y-axis */
- for (x = 0; x < n_symbols; x++) {
- /* If symbol was never used in a statement, it can't interfere */
- int y;
- if (!unit->reglist[x]->first_ins)
- continue;
- for (y = x + 1; y < n_symbols; y++) {
- if (!unit->reglist[y]->first_ins)
- continue;
- if (interferes(interp, unit,
- unit->reglist[x], unit->reglist[y])) {
- ig_set(x, y, n_symbols, interference_graph);
- ig_set(y, x, n_symbols, interference_graph);
- }
- }
- }
-
- if (IMCC_INFO(interp)->debug & DEBUG_IMC)
- dump_interference_graph(unit);
-}
-
-
-/*
-
=item C<static void compute_du_chain(IMC_Unit *unit)>
Compute a DU-chain for each symbolic in a compilation unit
@@ -899,235 +583,6 @@
/*
-=item C<static int interferes(PARROT_INTERP, const IMC_Unit *unit, const SymReg
-*r0, const SymReg *r1)>
-
-See if r0's chain interferes with r1.
-
-We currently decide that two vars interfere if they are both alive
-at any point. This could be improved, requiring that one is alive
-at the point of _definition_ of the other.
-
-=cut
-
-*/
-
-static int
-interferes(PARROT_INTERP, ARGIN(const IMC_Unit *unit),
- ARGIN(const SymReg *r0), ARGIN(const SymReg *r1))
-{
- ASSERT_ARGS(interferes)
- unsigned int i;
-
- /* Registers don't interfere with themselves */
- if (r0 == r1)
- return 0;
-
- /* Different register sets don't interfere with each other */
- if (r0->set != r1->set)
- return 0;
-
- /* If the first time r0 appears is in the same instruction as the
- * last appearance of r1, or after its last appearance, then they
- * can't interfere.
- *
- * Even if r0 and r1 are called in the same instruction, and even
- * if this instruction does modify r0, if its value is never used
- * later, then they can share the same register.
- */
-#if 1
- /* If they only overlap one instruction and one is used RHS only
- * and the other LHS, then that's ok
- *
- * But only, if that isn't inside a loop, tested via loop_depth
- * see also imcc/t/reg/alloc_2
- *
- * TODO no interferences, if the life range ends in this
- * basic block, because it's end is e.g. a returncc
- */
- if (r0->first_ins->index == r1->last_ins->index
- && instruction_writes(r0->first_ins, r0)
- && instruction_reads(r1->last_ins, r1)
- && !instruction_reads(r0->first_ins, r0)) {
- const Basic_block * const bb = unit->bb_list[r0->first_ins->bbindex];
- if (bb->loop_depth == 0)
- return 0;
- }
-
- if (r1->first_ins->index == r0->last_ins->index
- && instruction_writes(r1->first_ins, r1)
- && instruction_reads(r0->last_ins, r0)
- && !instruction_reads(r1->first_ins, r1)) {
- const Basic_block * const bb = unit->bb_list[r1->first_ins->bbindex];
- if (bb->loop_depth == 0)
- return 0;
- }
-
-#endif
-
- /* Now: */
-
- if (! r0->life_info || ! r1->life_info)
- PANIC(interp, "interferes: INTERNAL ERROR: Life range is NULL\n");
-
- for (i = 0; i < unit->n_basic_blocks; i++) {
- const Life_range * const l0 = r0->life_info[i];
- const Life_range * const l1 = r1->life_info[i];
-
- /* One or both are not alive in this block, so we have no conflict */
- if (!l0->first_ins || !l1->first_ins)
- continue;
-
- /* If the registers don't overlap, i.e first_x > last_y
- * then no interference */
- if (l0->first_ins->index > l1->last_ins->index)
- continue;
-
- if (l1->first_ins->index > l0->last_ins->index)
- continue;
-
- return 1;
- }
-
- return 0;
-}
-
-/*
-
-=item C<static int ig_find_color(const IMC_Unit *unit, const char *avail)>
-
-find available color for register #x in available colors
-
-=cut
-
-*/
-
-PARROT_WARN_UNUSED_RESULT
-static int
-ig_find_color(ARGIN(const IMC_Unit *unit), ARGIN(const char *avail))
-{
- ASSERT_ARGS(ig_find_color)
- unsigned int c;
-
- for (c = 0; c < unit->n_symbols; c++)
- if (avail[c])
- return c;
-
- return -1;
-}
-
-/*
-
-=item C<static void try_allocate(PARROT_INTERP, IMC_Unit *unit)>
-
-Color the graph, assigning registers to each symbol:
-
-We just proceed popping items from the stack and assigning
-a free color to them.
-
-If we run out of colors, then we need to spill the top node.
-
-=cut
-
-*/
-
-static void
-try_allocate(PARROT_INTERP, ARGIN(IMC_Unit *unit))
-{
- ASSERT_ARGS(try_allocate)
- unsigned int i;
- char *avail;
- unsigned int *graph = unit->interference_graph;
- SymReg ** const reglist = unit->reglist;
-
- /* unit->n_symbols should be an upper limit of needed colors */
- unsigned int n = unit->n_symbols;
-
- if (unit->max_color >= (int)n)
- n = unit->max_color + 1;
-
- if (!n)
- return;
-
- avail = mem_gc_allocate_n_typed(interp, n, char);
-
- for (i = 0; i < unit->n_symbols; ++i) {
- int already_allocated, color;
- SymReg * const r = reglist[i];
- int t = -1;
-
- if (r->color >= 0)
- continue;
-
- switch (r->set) {
- case 'I': t = 0; break;
- case 'N': t = 1; break;
- case 'S': t = 2; break;
- case 'P': t = 3; break;
- default : break;
- }
-
- if (t == -1)
- continue;
-
- already_allocated = unit->first_avail[t];
-
- /* don't even consider these regs */
- memset(avail, 1, n);
- map_colors(unit, i, graph, avail, r->set, already_allocated);
- color = ig_find_color(unit, avail);
-
- if (color == -1) {
- mem_sys_free(avail);
- IMCC_fatal(interp, DEBUG_IMC,
- "# no more colors - this should not happen\n");
- }
-
- color += already_allocated;
- r->color = color;
-
- IMCC_debug(interp, DEBUG_IMC, "#[%s] gets color [%d]\n",
- r->name, color);
- }
-
- mem_sys_free(avail);
- /* we are totally finished */
-}
-
-/*
-
-=item C<static void map_colors(const IMC_Unit* unit, int x, unsigned int *graph,
-char *avail, int typ, int already_allocated)>
-
-map_colors: calculates what colors can be assigned to the x-th symbol.
-
-=cut
-
-*/
-
-static void
-map_colors(ARGIN(const IMC_Unit* unit), int x, ARGIN(unsigned int *graph),
- ARGMOD(char *avail), int typ, int already_allocated)
-{
- ASSERT_ARGS(map_colors)
- const int n_symbols = unit->n_symbols;
- int y;
-
- for (y = 0; y < n_symbols; y++) {
- if (ig_test(x, y, n_symbols, graph)) {
- const SymReg * const r = unit->reglist[y];
- if (r
- && r->color != -1
- && r->set == typ) {
- PARROT_ASSERT(r->color - already_allocated >= 0);
- avail[r->color - already_allocated] = 0;
- }
- }
- }
-}
-
-/*
-
=item C<static unsigned int first_avail(PARROT_INTERP, const IMC_Unit *unit, int
reg_set, Set **avail)>
@@ -1315,22 +770,6 @@
/*
-=item C<static void allocate_non_volatile(PARROT_INTERP, IMC_Unit *unit)>
-
-=cut
-
-*/
-
-static void
-allocate_non_volatile(PARROT_INTERP, ARGMOD(IMC_Unit *unit))
-{
- ASSERT_ARGS(allocate_non_volatile)
- IMCC_debug(interp, DEBUG_IMC, "allocate non_volatile\n");
- allocate_uniq(interp, unit, U_NON_VOLATILE);
-}
-
-/*
-
=back
=cut
Modified: branches/codestring/compilers/imcc/symreg.c
==============================================================================
--- branches/codestring/compilers/imcc/symreg.c Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/compilers/imcc/symreg.c Mon May 10 13:15:51 2010 (r46471)
@@ -368,6 +368,7 @@
{
ASSERT_ARGS(mk_temp_reg)
char buf[30];
+ /* XXX non-reentrant */
static int temp;
snprintf(buf, sizeof (buf), "__imcc_temp_%d", ++temp);
@@ -665,34 +666,6 @@
else
mem_sys_free(fullname);
- if (t == 'P') {
- r->pmc_type = IMCC_INFO(interp)->cur_pmc_type;
- IMCC_INFO(interp)->cur_pmc_type = 0;
- }
-
- return r;
-}
-
-
-/*
-
-=item C<SymReg* mk_ident_ur(PARROT_INTERP, const char *name, int t)>
-
-Creates and returns a SymReg representing a unique (non-volatile) register.
-
-=cut
-
-*/
-
-PARROT_CANNOT_RETURN_NULL
-PARROT_IGNORABLE_RESULT
-SymReg*
-mk_ident_ur(PARROT_INTERP, ARGIN(const char *name), int t)
-{
- ASSERT_ARGS(mk_ident_ur)
- SymReg * const r = mk_ident(interp, name, t);
- r->usage |= U_NON_VOLATILE;
-
return r;
}
@@ -1654,10 +1627,6 @@
for (p = hsh->data[i]; p;) {
SymReg * const next = p->next;
-
- if (unit && p->life_info)
- free_life_info(unit, p);
-
free_sym(p);
p = next;
}
Modified: branches/codestring/compilers/imcc/symreg.h
==============================================================================
--- branches/codestring/compilers/imcc/symreg.h Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/compilers/imcc/symreg.h Mon May 10 13:15:51 2010 (r46471)
@@ -24,8 +24,7 @@
VT_ENCODED = VARTYPE_BIT(16), /* unicode string constant */
VT_OPT_FLAG = VARTYPE_BIT(17), /* var :opt_flag */
VT_NAMED = VARTYPE_BIT(18), /* var :named(name) */
- VT_UNIQUE_REG = VARTYPE_BIT(19),
- VT_CALL_SIG = VARTYPE_BIT(20)
+ VT_CALL_SIG = VARTYPE_BIT(19)
};
#undef VARTYPE_BIT
@@ -33,37 +32,18 @@
#define VTREGISTER (VTREG | VTIDENTIFIER | VTREGKEY | VTPASM)
#define REG_NEEDS_ALLOC(r) ((r)->type & VTREGISTER)
-enum LIFEFLAG { /* The status of a var inside a basic block can be */
- LF_use = 1 << 0, /* block uses the the var before defining it */
- LF_def = 1 << 1, /* block defines the variable */
- LF_lv_in = 1 << 2, /* variable is alive at the beginning of the block */
- LF_lv_out = 1 << 3, /* variable is alive at the end of the block */
- LF_lv_inside = 1 << 4, /* variable is alive at some moment in the block */
- LF_lv_all = 1 << 5 /* variable is alive throughout the block */
-};
-
-/* Liveness represents the usage of a var inside a basic block
- This is represented by pairs of [definition, usage] in *intervals: */
-typedef struct _Life_range {
- int flags;
- struct _Instruction *first_ins;
- struct _Instruction *last_ins;
-} Life_range;
-
enum USAGE {
U_KEYED = 1 << 0, /* array, hash, keyed */
U_NEW = 1 << 1, /* PMC was inited */
U_GLOBAL = 1 << 3, /* symbol is global (fixup) */
U_LEXICAL = 1 << 4, /* symbol is lexical */
U_FIXUP = 1 << 5, /* maybe not global, force fixup */
- U_NON_VOLATILE = 1 << 6, /* needs preserving */
- U_SUBID_LOOKUP = 1 << 7 /* .const 'Sub' lookup is done by subid */
+ U_SUBID_LOOKUP = 1 << 6 /* .const 'Sub' lookup is done by subid */
};
typedef struct _SymReg {
char *name;
char *subid;
- Life_range **life_info; /* Each block has a Life_range status */
struct _SymReg *nextkey; /* keys */
struct _SymReg *reg; /* key->register for VTREGKEYs */
struct pcc_sub_t *pcc_sub; /* PCC subroutine */
@@ -266,12 +246,6 @@
__attribute__nonnull__(1)
__attribute__nonnull__(2);
-PARROT_CANNOT_RETURN_NULL
-PARROT_IGNORABLE_RESULT
-SymReg* mk_ident_ur(PARROT_INTERP, ARGIN(const char *name), int t)
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
SymReg * mk_label_address(PARROT_INTERP, ARGIN(const char *name))
@@ -413,9 +387,6 @@
#define ASSERT_ARGS_mk_ident __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(name))
-#define ASSERT_ARGS_mk_ident_ur __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(name))
#define ASSERT_ARGS_mk_label_address __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(name))
@@ -467,11 +438,6 @@
P_NSENTRY = SUB_COMP_FLAG_NSENTRY /* 1<<11 0x800 - 11 */
} pragma_enum_t;
-typedef enum {
- isNCI = 0x01,
- isTAIL_CALL = 0x02
-} pcc_flags_t;
-
typedef struct pcc_sub_t {
SymReg *sub;
SymReg *cc;
@@ -484,8 +450,8 @@
int nargs;
int nret;
int nmulti;
- int calls_a_sub;
- int flags; /* isNCI, isTAIL_CALL */
+ int yield;
+ int tailcall;
int label;
INTVAL pragma;
} pcc_sub_t;
Modified: branches/codestring/compilers/imcc/unit.h
==============================================================================
--- branches/codestring/compilers/imcc/unit.h Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/compilers/imcc/unit.h Mon May 10 13:15:51 2010 (r46471)
@@ -48,7 +48,6 @@
Edge *edge_list;
/* register allocation */
- unsigned int *interference_graph;
SymReg **reglist;
unsigned int n_symbols;
int max_color;
Modified: branches/codestring/docs/book/pct/ch03_compiler_tools.pod
==============================================================================
--- branches/codestring/docs/book/pct/ch03_compiler_tools.pod Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/docs/book/pct/ch03_compiler_tools.pod Mon May 10 13:15:51 2010 (r46471)
@@ -196,8 +196,8 @@
created themselves. PCT includes a tool to do just that:
C<mk_language_shell.pl>. This program automatically creates a new directory in
F<languages/> for your new language, the necessary three files, starter files
-for libraries, a F<Makefile> to automate the build process, and a basic test
-harness to demonstrate that your language works as expects.
+for libraries, a F<setup.pir> script to automate the build process, and a basic
+test harness to demonstrate that your language works as expects.
These generated files are all stubs which will require extensive editing to
implement a full language, but they are a well-understood and working starting
@@ -219,7 +219,7 @@
From the Parrot directory, invoke C<mk_language_shell.pl> like:
$ B<cd languages/>
- $ B<perl ../tools/build/mk_language_shell.pl <project name>>
+ $ B<perl ../tools/dev/mk_language_shell.pl <project name>>
=head3 Parsing Fundamentals
Modified: branches/codestring/examples/nci/sdl_blue_rectangle.pir
==============================================================================
--- branches/codestring/examples/nci/sdl_blue_rectangle.pir Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/examples/nci/sdl_blue_rectangle.pir Mon May 10 13:15:51 2010 (r46471)
@@ -33,19 +33,9 @@
SDL_FillRect = global ['SDL'; 'SDL_FillRect']
new_SDL_Rect = global "new_SDL_Rect"
- .begin_call
- .set_arg 65535
- .nci_call SDL_Init
- .end_call
-
- .begin_call
- .set_arg 640
- .set_arg 480
- .set_arg 0
- .set_arg 0
- .nci_call SetVideoMode
- .result screen
- .end_call
+ SDL_Init(65535)
+
+ screen = SetVideoMode(640, 480, 0, 0)
.local object blue_rect
#.local object blue_color
@@ -67,30 +57,15 @@
set blue_rect['x'], 270
set blue_rect['y'], 190
- .begin_call
- .set_arg screen
- .set_arg blue_rect
- .set_arg blue
- .nci_call SDL_FillRect
- .local int ok
- .result ok
- .end_call
+ .local int ok
+ ok = SDL_FillRect(screen, blue_rect, blue)
# update full screen (all 0 arguments)
- .begin_call
- .set_arg screen
- .set_arg 0
- .set_arg 0
- .set_arg 0
- .set_arg 0
- .nci_call SDL_UpdateRect
- .end_call
+ SDL_UpdateRect(screen, 0, 0, 0, 0)
sleep 2
- .begin_call
- .nci_call SDL_Quit
- .end_call
+ SDL_Quit()
.begin_return
.end_return
Modified: branches/codestring/examples/sdl/lcd/clock.pir
==============================================================================
--- branches/codestring/examples/sdl/lcd/clock.pir Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/examples/sdl/lcd/clock.pir Mon May 10 13:15:51 2010 (r46471)
@@ -28,10 +28,10 @@
=cut
.sub _main :main
- load_bytecode "library/SDL/App.pir"
- load_bytecode "library/SDL/Event.pir"
- load_bytecode "library/SDL/EventHandler.pir"
- load_bytecode "library/SDL/LCD.pir"
+ load_bytecode "SDL/App.pir"
+ load_bytecode "SDL/Event.pir"
+ load_bytecode "SDL/EventHandler.pir"
+ load_bytecode "SDL/LCD.pir"
# create the SDL application object
.local pmc app
Modified: branches/codestring/include/parrot/context.h
==============================================================================
--- branches/codestring/include/parrot/context.h Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/include/parrot/context.h Mon May 10 13:15:51 2010 (r46471)
@@ -25,8 +25,11 @@
} Regs_ni;
#include "pmc/pmc_callcontext.h"
+
typedef struct Parrot_CallContext_attributes Parrot_Context;
+#define CONTEXT_STRUCT(c) (PMC_data_typed((c), Parrot_Context *))
+
/*
* Macros to make accessing registers more convenient/readable.
*/
@@ -47,12 +50,10 @@
/* Manually inlined macros. Used in optimised builds */
-# define __C(c) (PMC_data_typed((c), Parrot_Context*))
-
-# define CTX_REG_NUM(p, x) (__C(p)->bp.regs_n[-1L - (x)])
-# define CTX_REG_INT(p, x) (__C(p)->bp.regs_i[(x)])
-# define CTX_REG_PMC(p, x) (__C(p)->bp_ps.regs_p[-1L - (x)])
-# define CTX_REG_STR(p, x) (__C(p)->bp_ps.regs_s[(x)])
+# define CTX_REG_NUM(p, x) (CONTEXT_STRUCT(p)->bp.regs_n[-1L - (x)])
+# define CTX_REG_INT(p, x) (CONTEXT_STRUCT(p)->bp.regs_i[(x)])
+# define CTX_REG_PMC(p, x) (CONTEXT_STRUCT(p)->bp_ps.regs_p[-1L - (x)])
+# define CTX_REG_STR(p, x) (CONTEXT_STRUCT(p)->bp_ps.regs_s[(x)])
# define REG_NUM(interp, x) CTX_REG_NUM((interp)->ctx, (x))
# define REG_INT(interp, x) CTX_REG_INT((interp)->ctx, (x))
@@ -61,32 +62,11 @@
#endif
-/*
- * and a set of macros to access a register by offset, used
- * in JIT emit prederef code
- * The offsets are relative to interp->ctx.bp.
- *
- * Reg order in imcc/reg_alloc.c is "INSP" TODO make defines
- */
-
#define REGNO_INT 0
#define REGNO_NUM 1
#define REGNO_STR 2
#define REGNO_PMC 3
-#define __CTX Parrot_pcc_get_context_struct(interp, interp->ctx)
-#define _SIZEOF_INTS (sizeof (INTVAL) * __CTX->n_regs_used[REGNO_INT])
-#define _SIZEOF_NUMS (sizeof (FLOATVAL) * __CTX->n_regs_used[REGNO_NUM])
-#define _SIZEOF_PMCS (sizeof (PMC*) * __CTX->n_regs_used[REGNO_PMC])
-#define _SIZEOF_STRS (sizeof (STRING*) * __CTX->n_regs_used[REGNO_STR])
-
-#define REG_OFFS_NUM(x) (sizeof (FLOATVAL) * (-1L - (x)))
-#define REG_OFFS_INT(x) (sizeof (INTVAL) * (x))
-#define REG_OFFS_PMC(x) (_SIZEOF_INTS + sizeof (PMC*) * \
- (__CTX->n_regs_used[REGNO_PMC] - 1L - (x)))
-#define REG_OFFS_STR(x) (sizeof (STRING*) * (x) + _SIZEOF_INTS + _SIZEOF_PMCS)
-
-
/* Context accessors functions */
/*
@@ -499,61 +479,61 @@
/* Map Context manipulating functions to functions or macros */
#ifdef NDEBUG
-# define Parrot_pcc_get_context_struct(i, c) (PMC_data_typed((c), Parrot_Context*))
+# define Parrot_pcc_get_context_struct(i, c) CONTEXT_STRUCT(c)
-# define Parrot_pcc_get_constants(i, c) (__C(c)->constants)
-# define Parrot_pcc_set_constants(i, c, value) (__C(c)->constants = (value))
+# define Parrot_pcc_get_constants(i, c) (CONTEXT_STRUCT(c)->constants)
+# define Parrot_pcc_set_constants(i, c, value) (CONTEXT_STRUCT(c)->constants = (value))
-# 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_continuation(i, c) (CONTEXT_STRUCT(c)->current_cont)
+# define Parrot_pcc_set_continuation(i, c, value) (CONTEXT_STRUCT(c)->current_cont = (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))
+# define Parrot_pcc_get_caller_ctx(i, c) (CONTEXT_STRUCT(c)->caller_ctx)
+# define Parrot_pcc_set_caller_ctx(i, c, value) (CONTEXT_STRUCT(c)->caller_ctx = (value))
-# define Parrot_pcc_get_namespace(i, c) (__C(c)->current_namespace)
-# define Parrot_pcc_set_namespace(i, c, value) (__C(c)->current_namespace = (value))
+# define Parrot_pcc_get_namespace(i, c) (CONTEXT_STRUCT(c)->current_namespace)
+# define Parrot_pcc_set_namespace(i, c, value) (CONTEXT_STRUCT(c)->current_namespace = (value))
-# define Parrot_pcc_get_pc(i, c) (__C(c)->current_pc)
-# define Parrot_pcc_set_pc(i, c, value) (__C(c)->current_pc = (value))
+# define Parrot_pcc_get_pc(i, c) (CONTEXT_STRUCT(c)->current_pc)
+# define Parrot_pcc_set_pc(i, c, value) (CONTEXT_STRUCT(c)->current_pc = (value))
-# define Parrot_pcc_get_HLL(i, c) (__C(c)->current_HLL)
-# define Parrot_pcc_set_HLL(i, c, value) (__C(c)->current_HLL = (value))
+# define Parrot_pcc_get_HLL(i, c) (CONTEXT_STRUCT(c)->current_HLL)
+# define Parrot_pcc_set_HLL(i, c, value) (CONTEXT_STRUCT(c)->current_HLL = (value))
-# define Parrot_pcc_get_object(i, c) (__C(c)->current_object)
-# define Parrot_pcc_set_object(i, c, value) (__C(c)->current_object = (value))
+# define Parrot_pcc_get_object(i, c) (CONTEXT_STRUCT(c)->current_object)
+# define Parrot_pcc_set_object(i, c, value) (CONTEXT_STRUCT(c)->current_object = (value))
-# define Parrot_pcc_get_lex_pad(i, c) (__C(c)->lex_pad)
-# define Parrot_pcc_set_lex_pad(i, c, value) (__C(c)->lex_pad = (value))
+# define Parrot_pcc_get_lex_pad(i, c) (CONTEXT_STRUCT(c)->lex_pad)
+# define Parrot_pcc_set_lex_pad(i, c, value) (CONTEXT_STRUCT(c)->lex_pad = (value))
-# define Parrot_pcc_get_handlers(i, c) (__C(c)->handlers)
-# define Parrot_pcc_set_handlers(i, c, value) (__C(c)->handlers = (value))
+# define Parrot_pcc_get_handlers(i, c) (CONTEXT_STRUCT(c)->handlers)
+# define Parrot_pcc_set_handlers(i, c, value) (CONTEXT_STRUCT(c)->handlers = (value))
-# define Parrot_pcc_get_outer_ctx(i, c) (__C(c)->outer_ctx)
-# define Parrot_pcc_set_outer_ctx(i, c, value) (__C(c)->outer_ctx = (value))
+# define Parrot_pcc_get_outer_ctx(i, c) (CONTEXT_STRUCT(c)->outer_ctx)
+# define Parrot_pcc_set_outer_ctx(i, c, value) (CONTEXT_STRUCT(c)->outer_ctx = (value))
-# define Parrot_pcc_get_signature(i, c) (__C(c)->current_sig)
-# define Parrot_pcc_set_signature(i, c, value) (__C(c)->current_sig = (value))
+# define Parrot_pcc_get_signature(i, c) (CONTEXT_STRUCT(c)->current_sig)
+# define Parrot_pcc_set_signature(i, c, value) (CONTEXT_STRUCT(c)->current_sig = (value))
-# define Parrot_pcc_get_int_constant(i, c, idx) (__C(c)->constants[(idx)]->u.integer)
-# define Parrot_pcc_get_num_constant(i, c, idx) (__C(c)->constants[(idx)]->u.number)
-# define Parrot_pcc_get_string_constant(i, c, idx) (__C(c)->constants[(idx)]->u.string)
-# define Parrot_pcc_get_pmc_constant(i, c, idx) (__C(c)->constants[(idx)]->u.key)
+# define Parrot_pcc_get_int_constant(i, c, idx) (CONTEXT_STRUCT(c)->constants[(idx)]->u.integer)
+# define Parrot_pcc_get_num_constant(i, c, idx) (CONTEXT_STRUCT(c)->constants[(idx)]->u.number)
+# define Parrot_pcc_get_string_constant(i, c, idx) (CONTEXT_STRUCT(c)->constants[(idx)]->u.string)
+# define Parrot_pcc_get_pmc_constant(i, c, idx) (CONTEXT_STRUCT(c)->constants[(idx)]->u.key)
-# define Parrot_pcc_get_recursion_depth(i, c) (__C(c)->recursion_depth)
-# define Parrot_pcc_dec_recursion_depth(i, c) (--__C(c)->recursion_depth)
-# define Parrot_pcc_inc_recursion_depth(i, c) (__C(c)->recursion_depth++)
+# define Parrot_pcc_get_recursion_depth(i, c) (CONTEXT_STRUCT(c)->recursion_depth)
+# define Parrot_pcc_dec_recursion_depth(i, c) (--CONTEXT_STRUCT(c)->recursion_depth)
+# define Parrot_pcc_inc_recursion_depth(i, c) (CONTEXT_STRUCT(c)->recursion_depth++)
-# define Parrot_pcc_warnings_on(i, c, flags) (__C(c)->warns |= (flags))
-# define Parrot_pcc_warnings_off(i, c, flags) (__C(c)->warns &= ~(flags))
-# define Parrot_pcc_warnings_test(i, c, flags) (__C(c)->warns & (flags))
+# define Parrot_pcc_warnings_on(i, c, flags) (CONTEXT_STRUCT(c)->warns |= (flags))
+# define Parrot_pcc_warnings_off(i, c, flags) (CONTEXT_STRUCT(c)->warns &= ~(flags))
+# define Parrot_pcc_warnings_test(i, c, flags) (CONTEXT_STRUCT(c)->warns & (flags))
-# define Parrot_pcc_errors_on(i, c, flags) (__C(c)->errors |= (flags))
-# define Parrot_pcc_errors_off(i, c, flags) (__C(c)->errors &= ~(flags))
-# define Parrot_pcc_errors_test(i, c, flags) (__C(c)->errors & (flags))
+# define Parrot_pcc_errors_on(i, c, flags) (CONTEXT_STRUCT(c)->errors |= (flags))
+# define Parrot_pcc_errors_off(i, c, flags) (CONTEXT_STRUCT(c)->errors &= ~(flags))
+# define Parrot_pcc_errors_test(i, c, flags) (CONTEXT_STRUCT(c)->errors & (flags))
-# define Parrot_pcc_trace_flags_on(i, c, flags) (__C(c)->trace_flags |= (flags))
-# define Parrot_pcc_trace_flags_off(i, c, flags) (__C(c)->trace_flags &= ~(flags))
-# define Parrot_pcc_trace_flags_test(i, c, flags) (__C(c)->trace_flags & (flags))
+# define Parrot_pcc_trace_flags_on(i, c, flags) (CONTEXT_STRUCT(c)->trace_flags |= (flags))
+# define Parrot_pcc_trace_flags_off(i, c, flags) (CONTEXT_STRUCT(c)->trace_flags &= ~(flags))
+# define Parrot_pcc_trace_flags_test(i, c, flags) (CONTEXT_STRUCT(c)->trace_flags & (flags))
#else
@@ -615,7 +595,6 @@
#endif /* ifndef NDEBUG */
-
#endif /* PARROT_CONTEXT_H_GUARD */
/*
Modified: branches/codestring/include/parrot/dynext.h
==============================================================================
--- branches/codestring/include/parrot/dynext.h Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/include/parrot/dynext.h Mon May 10 13:15:51 2010 (r46471)
@@ -12,6 +12,9 @@
#ifndef PARROT_DYNEXT_H_GUARD
#define PARROT_DYNEXT_H_GUARD
+typedef PMC *(*dynext_load_func)(PARROT_INTERP);
+typedef void (*dynext_init_func)(PARROT_INTERP, ARGIN_NULLOK(PMC *));
+
/* HEADERIZER BEGIN: src/dynext.c */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
@@ -31,9 +34,8 @@
PARROT_EXPORT
PARROT_CANNOT_RETURN_NULL
PMC * Parrot_init_lib(PARROT_INTERP,
- ARGIN_NULLOK(PMC *(*load_func)(PARROT_INTERP)),
- ARGIN_NULLOK(void (*init_func)(PARROT_INTERP,
- ARGIN_NULLOK(PMC *))))
+ NULLOK(dynext_load_func load_func),
+ NULLOK(dynext_init_func init_func))
__attribute__nonnull__(1);
PARROT_EXPORT
Modified: branches/codestring/include/parrot/embed.h
==============================================================================
--- branches/codestring/include/parrot/embed.h Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/include/parrot/embed.h Mon May 10 13:15:51 2010 (r46471)
@@ -1,5 +1,5 @@
/* embed.h
- * Copyright (C) 2001-2003, Parrot Foundation.
+ * Copyright (C) 2001-2010, Parrot Foundation.
* SVN Info
* $Id$
* Overview:
@@ -25,61 +25,186 @@
enum_DIS_HEADER = 2
} Parrot_disassemble_options;
+/* Parrot_set_config_hash exists in *_config.o (e.g install_config.o),
+ so if you make this call then you will need to link with it in
+ addition to libparrot */
+void Parrot_set_config_hash(void);
+
PARROT_EXPORT
-PARROT_CANNOT_RETURN_NULL
-PARROT_MALLOC
-Parrot_Interp Parrot_new(ARGIN_NULLOK(Parrot_Interp parent));
+PARROT_DOES_NOT_RETURN
+PARROT_COLD
+void
+Parrot_exit(PARROT_INTERP, int status);
-PARROT_EXPORT void Parrot_init_stacktop(PARROT_INTERP, void *);
+PARROT_EXPORT
+void Parrot_destroy(PARROT_INTERP)
+ __attribute__nonnull__(1);
-PARROT_EXPORT void Parrot_set_flag(PARROT_INTERP, Parrot_Int);
-PARROT_EXPORT void Parrot_clear_flag(PARROT_INTERP, Parrot_Int);
-PARROT_EXPORT Parrot_Int Parrot_test_flag(PARROT_INTERP, Parrot_Int);
-PARROT_EXPORT void Parrot_set_trace(PARROT_INTERP, Parrot_UInt);
-PARROT_EXPORT void Parrot_clear_trace(PARROT_INTERP, Parrot_UInt);
-PARROT_EXPORT Parrot_UInt Parrot_test_trace(PARROT_INTERP, Parrot_UInt);
+/* HEADERIZER BEGIN: src/embed.c */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-PARROT_EXPORT void Parrot_set_debug(PARROT_INTERP, Parrot_UInt);
-PARROT_EXPORT void Parrot_clear_debug(PARROT_INTERP, Parrot_UInt);
-PARROT_EXPORT Parrot_UInt Parrot_test_debug(PARROT_INTERP, Parrot_UInt);
+PARROT_EXPORT
+void Parrot_clear_debug(PARROT_INTERP, Parrot_UInt flag)
+ __attribute__nonnull__(1);
-PARROT_EXPORT void Parrot_set_executable_name(PARROT_INTERP, Parrot_String);
+PARROT_EXPORT
+void Parrot_clear_flag(PARROT_INTERP, Parrot_Int flag)
+ __attribute__nonnull__(1);
-PARROT_EXPORT void Parrot_set_run_core(PARROT_INTERP, Parrot_Run_core_t core);
+PARROT_EXPORT
+void Parrot_clear_trace(PARROT_INTERP, Parrot_UInt flag)
+ __attribute__nonnull__(1);
-PARROT_EXPORT void Parrot_setwarnings(PARROT_INTERP, Parrot_warnclass);
+PARROT_EXPORT
+Parrot_PMC Parrot_compile_string(PARROT_INTERP,
+ Parrot_String type,
+ ARGIN(const char *code),
+ ARGOUT(Parrot_String *error))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(3)
+ __attribute__nonnull__(4)
+ FUNC_MODIFIES(*error);
-PARROT_EXPORT Parrot_PackFile Parrot_pbc_read(PARROT_INTERP, ARGIN_NULLOK(const char *), int);
+PARROT_EXPORT
+PARROT_CAN_RETURN_NULL
+Parrot_Opcode * Parrot_debug(PARROT_INTERP,
+ ARGIN(Parrot_Interp debugger),
+ ARGIN(Parrot_Opcode *pc))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3);
-PARROT_EXPORT void Parrot_pbc_load(PARROT_INTERP, Parrot_PackFile);
+PARROT_EXPORT
+void Parrot_disassemble(PARROT_INTERP,
+ ARGIN_NULLOK(const char *outfile),
+ Parrot_disassemble_options options)
+ __attribute__nonnull__(1);
-PARROT_EXPORT void Parrot_pbc_fixup_loaded(PARROT_INTERP);
+PARROT_EXPORT
+void Parrot_init_stacktop(PARROT_INTERP, ARGIN(void *stack_top))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
-PARROT_EXPORT void Parrot_runcode(PARROT_INTERP, int argc, ARGIN(const char **argv));
+PARROT_EXPORT
+PARROT_CANNOT_RETURN_NULL
+PARROT_MALLOC
+Parrot_Interp Parrot_new(ARGIN_NULLOK(Parrot_Interp parent));
-PARROT_EXPORT Parrot_PMC Parrot_compile_string(PARROT_INTERP,
- Parrot_String type, ARGIN(const char *code), ARGOUT(Parrot_String *error));
+PARROT_EXPORT
+void Parrot_pbc_fixup_loaded(PARROT_INTERP)
+ __attribute__nonnull__(1);
-PARROT_EXPORT void Parrot_destroy(PARROT_INTERP);
+PARROT_EXPORT
+void Parrot_pbc_load(PARROT_INTERP, ARGIN(Parrot_PackFile pf))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
-PARROT_EXPORT Parrot_Opcode * Parrot_debug(PARROT_INTERP, ARGIN(Parrot_Interp debugger), ARGIN(Parrot_Opcode *pc));
+PARROT_EXPORT
+PARROT_CAN_RETURN_NULL
+Parrot_PackFile Parrot_pbc_read(PARROT_INTERP,
+ ARGIN_NULLOK(const char *fullname),
+ const int debug)
+ __attribute__nonnull__(1);
-PARROT_EXPORT void Parrot_disassemble(PARROT_INTERP, ARGIN(const char *outfile),
- Parrot_disassemble_options options);
+PARROT_EXPORT
+void Parrot_run_native(PARROT_INTERP, native_func_t func)
+ __attribute__nonnull__(1);
PARROT_EXPORT
-PARROT_DOES_NOT_RETURN
-void Parrot_exit(PARROT_INTERP, int status);
+void Parrot_runcode(PARROT_INTERP, int argc, ARGIN(const char **argv))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(3);
-PARROT_EXPORT void Parrot_run_native(PARROT_INTERP, native_func_t func);
+PARROT_EXPORT
+void Parrot_set_debug(PARROT_INTERP, Parrot_UInt flag)
+ __attribute__nonnull__(1);
-PARROT_EXPORT void Parrot_load_bytecode(PARROT_INTERP, Parrot_String file_str);
+PARROT_EXPORT
+void Parrot_set_executable_name(PARROT_INTERP, Parrot_String name)
+ __attribute__nonnull__(1);
+
+PARROT_EXPORT
+void Parrot_set_flag(PARROT_INTERP, Parrot_Int flag)
+ __attribute__nonnull__(1);
+
+PARROT_EXPORT
+void Parrot_set_run_core(PARROT_INTERP, Parrot_Run_core_t core)
+ __attribute__nonnull__(1);
+
+PARROT_EXPORT
+void Parrot_set_trace(PARROT_INTERP, Parrot_UInt flag)
+ __attribute__nonnull__(1);
+
+PARROT_EXPORT
+void Parrot_setwarnings(PARROT_INTERP, Parrot_warnclass wc)
+ __attribute__nonnull__(1);
+
+PARROT_EXPORT
+Parrot_UInt Parrot_test_debug(PARROT_INTERP, Parrot_UInt flag)
+ __attribute__nonnull__(1);
+
+PARROT_EXPORT
+Parrot_Int Parrot_test_flag(PARROT_INTERP, Parrot_Int flag)
+ __attribute__nonnull__(1);
+
+PARROT_EXPORT
+Parrot_UInt Parrot_test_trace(PARROT_INTERP, Parrot_UInt flag)
+ __attribute__nonnull__(1);
+
+#define ASSERT_ARGS_Parrot_clear_debug __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_clear_flag __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_clear_trace __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_compile_string __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(code) \
+ , PARROT_ASSERT_ARG(error))
+#define ASSERT_ARGS_Parrot_debug __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(debugger) \
+ , PARROT_ASSERT_ARG(pc))
+#define ASSERT_ARGS_Parrot_disassemble __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_init_stacktop __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(stack_top))
+#define ASSERT_ARGS_Parrot_new __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_Parrot_pbc_fixup_loaded __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_pbc_load __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(pf))
+#define ASSERT_ARGS_Parrot_pbc_read __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_run_native __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_runcode __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(argv))
+#define ASSERT_ARGS_Parrot_set_debug __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_set_executable_name __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_set_flag __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_set_run_core __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_set_trace __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_setwarnings __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_test_debug __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_test_flag __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_test_trace __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/embed.c */
-/* Parrot_set_config_hash exists in *_config.o (e.g install_config.o),
- so if you make this call then you will need to link with it in
- addition to libparrot */
-void Parrot_set_config_hash(void);
#endif /* PARROT_EMBED_H_GUARD */
Modified: branches/codestring/include/parrot/hash.h
==============================================================================
--- branches/codestring/include/parrot/hash.h Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/include/parrot/hash.h Mon May 10 13:15:51 2010 (r46471)
@@ -39,8 +39,7 @@
#define HASH_ALLOC_SIZE(n) (N_BUCKETS(n) * sizeof (HashBucket) + \
(n) * sizeof (HashBucket *))
-typedef int (*hash_comp_fn)(PARROT_INTERP, const void *const, const void *const);
-typedef void (*hash_mark_key_fn)(PARROT_INTERP, PObj *);
+typedef int (*hash_comp_fn)(PARROT_INTERP, ARGIN(const void *), ARGIN(const void *));
typedef size_t (*hash_hash_key_fn)(PARROT_INTERP, ARGIN(const void *), size_t seed);
/* &gen_from_enum(hash_key_type.pasm) */
@@ -74,7 +73,7 @@
hash_hash_key_fn hash_val; /* generate a hash value for key */
};
-typedef void (*value_free)(void *);
+typedef void (*value_free)(ARGFREE(void *));
/* To avoid creating OrderedHashItem PMC we reuse FixedPMCArray PMC */
/* So, there is indexes to avoid using of "magick constants" */
@@ -348,7 +347,7 @@
void parrot_chash_destroy_values(PARROT_INTERP,
ARGMOD(Hash *hash),
- ARGIN(value_free func))
+ NOTNULL(value_free func))
__attribute__nonnull__(1)
__attribute__nonnull__(2)
__attribute__nonnull__(3)
@@ -360,8 +359,8 @@
Hash * parrot_create_hash(PARROT_INTERP,
PARROT_DATA_TYPE val_type,
Hash_key_type hkey_type,
- ARGIN(hash_comp_fn compare),
- ARGIN(hash_hash_key_fn keyhash))
+ NOTNULL(hash_comp_fn compare),
+ NOTNULL(hash_hash_key_fn keyhash))
__attribute__nonnull__(1)
__attribute__nonnull__(4)
__attribute__nonnull__(5);
Modified: branches/codestring/include/parrot/packfile.h
==============================================================================
--- branches/codestring/include/parrot/packfile.h Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/include/parrot/packfile.h Mon May 10 13:15:51 2010 (r46471)
@@ -759,7 +759,8 @@
__attribute__nonnull__(1);
PARROT_EXPORT
-void Parrot_load_bytecode(PARROT_INTERP, ARGIN_NULLOK(STRING *file_str))
+void Parrot_load_bytecode(PARROT_INTERP,
+ ARGIN_NULLOK(Parrot_String file_str))
__attribute__nonnull__(1);
PARROT_EXPORT
Modified: branches/codestring/lib/Parrot/Headerizer.pm
==============================================================================
--- branches/codestring/lib/Parrot/Headerizer.pm Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/lib/Parrot/Headerizer.pm Mon May 10 13:15:51 2010 (r46471)
@@ -91,7 +91,9 @@
sub valid_macros {
my $self = shift;
- return sort keys %{$self->{valid_macros}};
+ my @macros = sort keys %{$self->{valid_macros}};
+
+ return @macros;
}
=item $headerizer->extract_function_declarations($text)
Modified: branches/codestring/lib/Parrot/Test.pm
==============================================================================
--- branches/codestring/lib/Parrot/Test.pm Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/lib/Parrot/Test.pm Mon May 10 13:15:51 2010 (r46471)
@@ -443,7 +443,7 @@
# set a todo-item for Test::Builder to find
my $call_pkg = $self->{builder}->exported_to() || '';
- no strict 'refs';
+ no strict 'refs'; ## no critic Variables::ProhibitConditionalDeclarations
local *{ $call_pkg . '::TODO' } = ## no critic Variables::ProhibitConditionalDeclarations
\$options{todo}
@@ -500,12 +500,22 @@
my ($package) = caller();
- no strict 'refs';
-
- *{ $package . '::' . $func } = $test_sub;
+ create_sub($package, $func, $test_sub);
}
}
+sub create_sub {
+ my $package = shift;
+ my $func = shift;
+ my $sub = shift;
+
+ no strict 'refs';
+
+ *{ $package . '::' . $func } = $sub;
+
+ return;
+}
+
=over
=item "pbc_postprocess_output_like"
@@ -766,9 +776,7 @@
return $pass;
};
- no strict 'refs';
-
- *{ $package . '::' . $func } = $test_sub;
+ create_sub($package, $func, $test_sub);
}
##### 2: PIR-to-PASM test map #####
@@ -860,9 +868,7 @@
return $pass;
};
- no strict 'refs';
-
- *{ $package . '::' . $func } = $test_sub;
+ create_sub($package, $func, $test_sub);
}
##### 3: Language test map #####
@@ -926,9 +932,7 @@
}
};
- no strict 'refs';
-
- *{ $package . '::' . $func } = $test_sub;
+ create_sub($package, $func, $test_sub);
}
##### 4: Example test map #####
@@ -973,9 +977,7 @@
}
};
- no strict 'refs';
-
- *{ $package . '::' . $func } = $test_sub;
+ create_sub($package, $func, $test_sub);
}
##### 5: C test map #####
@@ -1100,9 +1102,7 @@
return $pass;
};
- no strict 'refs';
-
- *{ $package . '::' . $func } = $test_sub;
+ create_sub($package, $func, $test_sub);
}
return;
Modified: branches/codestring/runtime/parrot/library/libpcre.pir
==============================================================================
--- branches/codestring/runtime/parrot/library/libpcre.pir Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/runtime/parrot/library/libpcre.pir Mon May 10 13:15:51 2010 (r46471)
@@ -130,37 +130,6 @@
.return( match )
.end
-=for todo
- # or use convenience function
- print "copy_substring\n"
- i = 0
- repeat match, " ", 500
-loop:
- .begin_call
- .set_arg s
- .set_arg ovector
- .set_arg ok
- .set_arg i
- .set_arg match
- .set_arg 500
- .nci_call COPY_SUBSTRING
- .end_call
- if i goto subp
- print "all "
- goto all
-subp:
- print "("
- print i
- print ") "
-all:
- print "matched: '"
- print match
- print "'\n"
- inc i
- if i < ok goto loop
- end
-.end
-
=head1 FILES
pcre.pir, libpcre.pir
Modified: branches/codestring/src/call/args.c
==============================================================================
--- branches/codestring/src/call/args.c Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/src/call/args.c Mon May 10 13:15:51 2010 (r46471)
@@ -40,7 +40,7 @@
typedef STRING* (*string_func_t)(PARROT_INTERP, void *arg_info, INTVAL index);
typedef PMC* (*pmc_func_t) (PARROT_INTERP, void *arg_info, INTVAL index);
-typedef struct pcc_set_funcs {
+typedef struct pcc_funcs_ptr {
intval_ptr_func_t intval;
numval_ptr_func_t numval;
string_ptr_func_t string;
@@ -50,19 +50,7 @@
numval_func_t numval_constant;
string_func_t string_constant;
pmc_func_t pmc_constant;
-} pcc_set_funcs;
-
-typedef struct pcc_get_funcs {
- intval_func_t intval;
- numval_func_t numval;
- string_func_t string;
- pmc_func_t pmc;
-
- intval_func_t intval_constant;
- numval_func_t numval_constant;
- string_func_t string_constant;
- pmc_func_t pmc_constant;
-} pcc_get_funcs;
+} pcc_funcs_ptr;
/* HEADERIZER BEGIN: static */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
@@ -71,7 +59,7 @@
INTVAL param_index,
INTVAL param_flags,
ARGIN(void *arg_info),
- ARGMOD(struct pcc_set_funcs *accessor))
+ ARGMOD(struct pcc_funcs_ptr *accessor))
__attribute__nonnull__(1)
__attribute__nonnull__(4)
__attribute__nonnull__(5)
@@ -108,7 +96,7 @@
ARGMOD_NULLOK(PMC *call_object),
ARGIN(PMC *raw_sig),
ARGIN(void *arg_info),
- ARGIN(struct pcc_set_funcs *accessor),
+ ARGIN(struct pcc_funcs_ptr *accessor),
Errors_classes direction)
__attribute__nonnull__(1)
__attribute__nonnull__(3)
@@ -739,7 +727,7 @@
/*
=item C<static void fill_params(PARROT_INTERP, PMC *call_object, PMC *raw_sig,
-void *arg_info, struct pcc_set_funcs *accessor, Errors_classes direction)>
+void *arg_info, struct pcc_funcs_ptr *accessor, Errors_classes direction)>
Gets args for the current function call and puts them into position.
First it gets the positional non-slurpy parameters, then the positional
@@ -753,17 +741,17 @@
static void
fill_params(PARROT_INTERP, ARGMOD_NULLOK(PMC *call_object),
ARGIN(PMC *raw_sig), ARGIN(void *arg_info),
- ARGIN(struct pcc_set_funcs *accessor),
+ ARGIN(struct pcc_funcs_ptr *accessor),
Errors_classes direction)
{
ASSERT_ARGS(fill_params)
INTVAL *raw_params;
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 param_count;
INTVAL positional_args;
GETATTR_FixedIntegerArray_size(interp, raw_sig, param_count);
@@ -1185,7 +1173,7 @@
/*
=item C<static void assign_default_param_value(PARROT_INTERP, INTVAL
-param_index, INTVAL param_flags, void *arg_info, struct pcc_set_funcs
+param_index, INTVAL param_flags, void *arg_info, struct pcc_funcs_ptr
*accessor)>
Assign an appropriate default value to the parameter depending on its type
@@ -1196,7 +1184,7 @@
static void
assign_default_param_value(PARROT_INTERP, INTVAL param_index, INTVAL param_flags,
- ARGIN(void *arg_info), ARGMOD(struct pcc_set_funcs *accessor))
+ ARGIN(void *arg_info), ARGMOD(struct pcc_funcs_ptr *accessor))
{
ASSERT_ARGS(assign_default_param_value)
switch (PARROT_ARG_TYPE_MASK_MASK(param_flags)) {
@@ -1243,7 +1231,7 @@
{
ASSERT_ARGS(Parrot_pcc_fill_params_from_op)
- static pcc_set_funcs function_pointers = {
+ static pcc_funcs_ptr function_pointers = {
(intval_ptr_func_t)intval_param_from_op,
(numval_ptr_func_t)numval_param_from_op,
(string_ptr_func_t)string_param_from_op,
@@ -1317,7 +1305,7 @@
{
ASSERT_ARGS(Parrot_pcc_fill_params_from_varargs)
PMC *raw_sig = PMCNULL;
- static pcc_set_funcs function_pointers = {
+ static pcc_funcs_ptr function_pointers = {
(intval_ptr_func_t)intval_param_from_c_args,
(numval_ptr_func_t)numval_param_from_c_args,
(string_ptr_func_t)string_param_from_c_args,
Modified: branches/codestring/src/call/context.c
==============================================================================
--- branches/codestring/src/call/context.c Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/src/call/context.c Mon May 10 13:15:51 2010 (r46471)
@@ -84,13 +84,6 @@
__attribute__nonnull__(2)
FUNC_MODIFIES(*ctx);
-PARROT_INLINE
-PARROT_CANNOT_RETURN_NULL
-static Parrot_Context * get_context_struct_fast(PARROT_INTERP,
- ARGIN(PMC *ctx))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
static void init_context(PARROT_INTERP,
ARGMOD(PMC *pmcctx),
ARGIN_NULLOK(PMC *pmcold))
@@ -112,9 +105,6 @@
#define ASSERT_ARGS_clear_regs __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(ctx))
-#define ASSERT_ARGS_get_context_struct_fast __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(ctx))
#define ASSERT_ARGS_init_context __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(pmcctx))
@@ -146,7 +136,7 @@
Parrot_pcc_get_sub(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_sub)
- Parrot_Context const *c = get_context_struct_fast(interp, ctx);
+ const Parrot_Context *c = CONTEXT_STRUCT(ctx);
return c->current_sub;
}
@@ -166,7 +156,7 @@
Parrot_pcc_set_sub(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(PMC *sub))
{
ASSERT_ARGS(Parrot_pcc_set_sub)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = CONTEXT_STRUCT(ctx);
c->current_sub = sub;
if (sub && !PMC_IS_NULL(sub)) {
@@ -215,33 +205,6 @@
/*
-=item C<static Parrot_Context * get_context_struct_fast(PARROT_INTERP, PMC
-*ctx)>
-
-Fetches Parrot_Context from Context PMC. This is a static, inlineable function
-so it only works within this file. It also only works if you *know* that ctx
-is a valid PMC, so be careful. This is an encapsulation-breaking optimization
-that improves performance measurably. Use responsibly. Never export this
-function.
-
-=cut
-
-*/
-
-
-PARROT_INLINE
-PARROT_CANNOT_RETURN_NULL
-static Parrot_Context *
-get_context_struct_fast(PARROT_INTERP, ARGIN(PMC *ctx))
-{
- ASSERT_ARGS(get_context_struct_fast)
-
- /* temporarily violate encapsulation; big speedup here */
- return PMC_data_typed(ctx, Parrot_Context *);
-}
-
-/*
-
=item C<static void clear_regs(PARROT_INTERP, Parrot_Context *ctx)>
Clears all registers in a context. PMC and STRING registers contain PMCNULL
@@ -298,12 +261,12 @@
init_context(PARROT_INTERP, ARGMOD(PMC *pmcctx), ARGIN_NULLOK(PMC *pmcold))
{
ASSERT_ARGS(init_context)
- Parrot_Context *ctx = get_context_struct_fast(interp, pmcctx);
+ Parrot_Context * const ctx = CONTEXT_STRUCT(pmcctx);
/* pmcold may be null */
Parrot_Context *old = PMC_IS_NULL(pmcold)
? NULL
- : get_context_struct_fast(interp, pmcold);
+ : CONTEXT_STRUCT(pmcold);
PARROT_ASSERT_MSG(!PMC_IS_NULL(pmcctx), "Can't initialise Null CallContext");
@@ -745,7 +708,7 @@
{
ASSERT_ARGS(Parrot_pcc_get_INTVAL_reg)
PARROT_ASSERT(Parrot_pcc_get_regs_used(interp, ctx, REGNO_INT) > idx);
- return &(get_context_struct_fast(interp, ctx)->bp.regs_i[idx]);
+ return &(CONTEXT_STRUCT(ctx)->bp.regs_i[idx]);
}
/*
@@ -766,7 +729,7 @@
{
ASSERT_ARGS(Parrot_pcc_get_FLOATVAL_reg)
PARROT_ASSERT(Parrot_pcc_get_regs_used(interp, ctx, REGNO_NUM) > idx);
- return &(get_context_struct_fast(interp, ctx)->bp.regs_n[-1L - idx]);
+ return &(CONTEXT_STRUCT(ctx)->bp.regs_n[-1L - idx]);
}
/*
@@ -787,7 +750,7 @@
{
ASSERT_ARGS(Parrot_pcc_get_STRING_reg)
PARROT_ASSERT(Parrot_pcc_get_regs_used(interp, ctx, REGNO_STR) > idx);
- return &(get_context_struct_fast(interp, ctx)->bp_ps.regs_s[idx]);
+ return &(CONTEXT_STRUCT(ctx)->bp_ps.regs_s[idx]);
}
/*
@@ -807,7 +770,7 @@
{
ASSERT_ARGS(Parrot_pcc_get_PMC_reg)
PARROT_ASSERT(Parrot_pcc_get_regs_used(interp, ctx, REGNO_PMC) > idx);
- return &(get_context_struct_fast(interp, ctx)->bp_ps.regs_p[-1L - idx]);
+ return &(CONTEXT_STRUCT(ctx)->bp_ps.regs_p[-1L - idx]);
}
/*
@@ -824,7 +787,7 @@
Parrot_pcc_get_regs_used(PARROT_INTERP, ARGIN(PMC *ctx), int type)
{
ASSERT_ARGS(Parrot_pcc_get_regs_used)
- return get_context_struct_fast(interp, ctx)->n_regs_used[type];
+ return CONTEXT_STRUCT(ctx)->n_regs_used[type];
}
/*
@@ -842,7 +805,7 @@
Parrot_pcc_set_regs_used(PARROT_INTERP, ARGIN(PMC *ctx), int type, INTVAL num)
{
ASSERT_ARGS(Parrot_pcc_set_regs_used)
- get_context_struct_fast(interp, ctx)->n_regs_used[type] = num;
+ CONTEXT_STRUCT(ctx)->n_regs_used[type] = num;
}
/*
@@ -860,7 +823,7 @@
Parrot_pcc_get_regs_ni(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_regs_ni)
- return &(get_context_struct_fast(interp, ctx)->bp);
+ return &(CONTEXT_STRUCT(ctx)->bp);
}
/*
@@ -878,7 +841,7 @@
Parrot_pcc_set_regs_ni(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN(Regs_ni *bp))
{
ASSERT_ARGS(Parrot_pcc_set_regs_ni)
- get_context_struct_fast(interp, ctx)->bp = *bp;
+ CONTEXT_STRUCT(ctx)->bp = *bp;
}
/*
@@ -896,7 +859,7 @@
Parrot_pcc_get_regs_ps(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_regs_ps)
- return &(get_context_struct_fast(interp, ctx)->bp_ps);
+ return &(CONTEXT_STRUCT(ctx)->bp_ps);
}
/*
@@ -914,7 +877,7 @@
Parrot_pcc_set_regs_ps(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN(Regs_ps *bp_ps))
{
ASSERT_ARGS(Parrot_pcc_set_regs_ps)
- get_context_struct_fast(interp, ctx)->bp_ps = *bp_ps;
+ CONTEXT_STRUCT(ctx)->bp_ps = *bp_ps;
}
Modified: branches/codestring/src/call/context_accessors.c
==============================================================================
--- branches/codestring/src/call/context_accessors.c Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/src/call/context_accessors.c Mon May 10 13:15:51 2010 (r46471)
@@ -18,22 +18,6 @@
/* HEADERIZER HFILE: include/parrot/context.h */
-/* HEADERIZER BEGIN: static */
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-
-PARROT_INLINE
-PARROT_CANNOT_RETURN_NULL
-static Parrot_Context * get_context_struct_fast(PARROT_INTERP,
- ARGIN(PMC *ctx))
- __attribute__nonnull__(1)
- __attribute__nonnull__(2);
-
-#define ASSERT_ARGS_get_context_struct_fast __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp) \
- , PARROT_ASSERT_ARG(ctx))
-/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-/* HEADERIZER END: static */
-
/*
=head2 Context API Functions
@@ -59,7 +43,7 @@
if (PMC_IS_NULL(ctx))
return NULL;
- return get_context_struct_fast(interp, ctx);
+ return CONTEXT_STRUCT(ctx);
}
/*
@@ -82,7 +66,7 @@
Parrot_pcc_get_constants_func(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_constants_func)
- return get_context_struct_fast(interp, ctx)->constants;
+ return CONTEXT_STRUCT(ctx)->constants;
}
PARROT_EXPORT
@@ -92,7 +76,7 @@
ARGIN_NULLOK(struct PackFile_Constant **constants))
{
ASSERT_ARGS(Parrot_pcc_set_constants_func)
- Parrot_Context * c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = CONTEXT_STRUCT(ctx);
c->constants = constants;
}
@@ -111,7 +95,7 @@
Parrot_pcc_get_recursion_depth_func(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_recursion_depth_func)
- Parrot_Context const *c = get_context_struct_fast(interp, ctx);
+ const Parrot_Context *c = CONTEXT_STRUCT(ctx);
return c->recursion_depth;
}
@@ -130,7 +114,7 @@
Parrot_pcc_inc_recursion_depth_func(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_inc_recursion_depth_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = CONTEXT_STRUCT(ctx);
return c->recursion_depth++;
}
@@ -149,7 +133,7 @@
Parrot_pcc_dec_recursion_depth_func(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_dec_recursion_depth_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = CONTEXT_STRUCT(ctx);
return --c->recursion_depth;
}
@@ -172,7 +156,7 @@
Parrot_pcc_get_caller_ctx_func(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_caller_ctx_func)
- Parrot_Context const *c = get_context_struct_fast(interp, ctx);
+ const Parrot_Context *c = CONTEXT_STRUCT(ctx);
return c->caller_ctx;
}
@@ -181,7 +165,7 @@
Parrot_pcc_set_caller_ctx_func(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN(PMC *caller_ctx))
{
ASSERT_ARGS(Parrot_pcc_set_caller_ctx_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = CONTEXT_STRUCT(ctx);
c->caller_ctx = caller_ctx;
}
@@ -204,7 +188,7 @@
Parrot_pcc_get_outer_ctx_func(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_outer_ctx_func)
- Parrot_Context const *c = get_context_struct_fast(interp, ctx);
+ const Parrot_Context *c = CONTEXT_STRUCT(ctx);
return c->outer_ctx;
}
@@ -213,7 +197,7 @@
Parrot_pcc_set_outer_ctx_func(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN(PMC *outer_ctx))
{
ASSERT_ARGS(Parrot_pcc_set_outer_ctx_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = CONTEXT_STRUCT(ctx);
c->outer_ctx = outer_ctx;
}
@@ -235,7 +219,7 @@
Parrot_pcc_get_lex_pad_func(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_lex_pad_func)
- Parrot_Context const *c = get_context_struct_fast(interp, ctx);
+ const Parrot_Context *c = CONTEXT_STRUCT(ctx);
return c->lex_pad;
}
@@ -244,7 +228,7 @@
Parrot_pcc_set_lex_pad_func(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN(PMC *lex_pad))
{
ASSERT_ARGS(Parrot_pcc_set_lex_pad_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = CONTEXT_STRUCT(ctx);
c->lex_pad = lex_pad;
}
@@ -267,7 +251,7 @@
Parrot_pcc_get_namespace_func(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_namespace_func)
- Parrot_Context const *c = get_context_struct_fast(interp, ctx);
+ const Parrot_Context *c = CONTEXT_STRUCT(ctx);
return c->current_namespace;
}
@@ -276,7 +260,7 @@
Parrot_pcc_set_namespace_func(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(PMC *_namespace))
{
ASSERT_ARGS(Parrot_pcc_set_namespace_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = CONTEXT_STRUCT(ctx);
c->current_namespace = _namespace;
}
@@ -297,7 +281,7 @@
Parrot_pcc_get_HLL_func(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_HLL_func)
- Parrot_Context const *c = get_context_struct_fast(interp, ctx);
+ const Parrot_Context *c = CONTEXT_STRUCT(ctx);
return c->current_HLL;
}
@@ -306,7 +290,7 @@
Parrot_pcc_set_HLL_func(PARROT_INTERP, ARGIN(PMC *ctx), INTVAL hll)
{
ASSERT_ARGS(Parrot_pcc_set_HLL_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = CONTEXT_STRUCT(ctx);
c->current_HLL = hll;
}
@@ -329,7 +313,7 @@
Parrot_pcc_get_handlers_func(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_handlers_func)
- Parrot_Context const *c = get_context_struct_fast(interp, ctx);
+ const Parrot_Context *c = CONTEXT_STRUCT(ctx);
return c->handlers;
}
@@ -339,7 +323,7 @@
Parrot_pcc_set_handlers_func(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN(PMC *handlers))
{
ASSERT_ARGS(Parrot_pcc_set_handlers_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = CONTEXT_STRUCT(ctx);
c->handlers = handlers;
}
@@ -362,7 +346,7 @@
Parrot_pcc_get_continuation_func(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_continuation_func)
- Parrot_Context const *c = get_context_struct_fast(interp, ctx);
+ const Parrot_Context *c = CONTEXT_STRUCT(ctx);
return c->current_cont;
}
@@ -371,7 +355,7 @@
Parrot_pcc_set_continuation_func(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(PMC *_continuation))
{
ASSERT_ARGS(Parrot_pcc_set_continuation_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = CONTEXT_STRUCT(ctx);
c->current_cont = _continuation;
}
@@ -394,7 +378,7 @@
Parrot_pcc_get_signature_func(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_signature_func)
- Parrot_Context const *c = get_context_struct_fast(interp, ctx);
+ const Parrot_Context *c = CONTEXT_STRUCT(ctx);
return c->current_sig;
}
@@ -403,7 +387,7 @@
Parrot_pcc_set_signature_func(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(PMC *sig_object))
{
ASSERT_ARGS(Parrot_pcc_set_signature_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = CONTEXT_STRUCT(ctx);
c->current_sig = sig_object;
}
@@ -425,7 +409,7 @@
Parrot_pcc_get_object_func(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_object_func)
- Parrot_Context const *c = get_context_struct_fast(interp, ctx);
+ const Parrot_Context *c = CONTEXT_STRUCT(ctx);
return c->current_object;
}
@@ -434,7 +418,7 @@
Parrot_pcc_set_object_func(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(PMC *object))
{
ASSERT_ARGS(Parrot_pcc_set_object_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = CONTEXT_STRUCT(ctx);
c->current_object = object;
}
@@ -456,7 +440,7 @@
Parrot_pcc_get_pc_func(PARROT_INTERP, ARGIN(PMC *ctx))
{
ASSERT_ARGS(Parrot_pcc_get_pc_func)
- Parrot_Context const *c = get_context_struct_fast(interp, ctx);
+ const Parrot_Context *c = CONTEXT_STRUCT(ctx);
return c->current_pc;
}
@@ -465,7 +449,7 @@
Parrot_pcc_set_pc_func(PARROT_INTERP, ARGIN(PMC *ctx), ARGIN_NULLOK(opcode_t *pc))
{
ASSERT_ARGS(Parrot_pcc_set_pc_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = CONTEXT_STRUCT(ctx);
c->current_pc = pc;
}
@@ -485,7 +469,7 @@
Parrot_pcc_warnings_on_func(PARROT_INTERP, ARGIN(PMC *ctx), UINTVAL flags)
{
ASSERT_ARGS(Parrot_pcc_warnings_on_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = CONTEXT_STRUCT(ctx);
c->warns |= flags;
return c->warns;
}
@@ -507,7 +491,7 @@
Parrot_pcc_warnings_off_func(PARROT_INTERP, ARGIN(PMC *ctx), UINTVAL flags)
{
ASSERT_ARGS(Parrot_pcc_warnings_off_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = CONTEXT_STRUCT(ctx);
c->warns &= ~flags;
}
@@ -528,7 +512,7 @@
Parrot_pcc_warnings_test_func(PARROT_INTERP, ARGIN(PMC *ctx), UINTVAL flags)
{
ASSERT_ARGS(Parrot_pcc_warnings_test_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = CONTEXT_STRUCT(ctx);
return c->warns & flags;
}
@@ -547,7 +531,7 @@
Parrot_pcc_errors_on_func(PARROT_INTERP, ARGIN(PMC *ctx), UINTVAL flags)
{
ASSERT_ARGS(Parrot_pcc_errors_on_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = CONTEXT_STRUCT(ctx);
c->errors |= flags;
}
@@ -567,7 +551,7 @@
Parrot_pcc_errors_off_func(PARROT_INTERP, ARGIN(PMC *ctx), UINTVAL flags)
{
ASSERT_ARGS(Parrot_pcc_errors_off_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = CONTEXT_STRUCT(ctx);
c->errors &= ~flags;
}
@@ -587,7 +571,7 @@
Parrot_pcc_errors_test_func(PARROT_INTERP, ARGIN(PMC *ctx), UINTVAL flags)
{
ASSERT_ARGS(Parrot_pcc_errors_test_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = CONTEXT_STRUCT(ctx);
return c->errors & flags;
}
@@ -607,7 +591,7 @@
Parrot_pcc_trace_flags_on_func(PARROT_INTERP, ARGIN(PMC *ctx), UINTVAL flags)
{
ASSERT_ARGS(Parrot_pcc_trace_flags_on_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = CONTEXT_STRUCT(ctx);
c->trace_flags |= flags;
}
@@ -628,7 +612,7 @@
Parrot_pcc_trace_flags_off_func(PARROT_INTERP, ARGIN(PMC *ctx), UINTVAL flags)
{
ASSERT_ARGS(Parrot_pcc_trace_flags_off_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = CONTEXT_STRUCT(ctx);
c->trace_flags &= ~flags;
}
@@ -648,7 +632,7 @@
Parrot_pcc_trace_flags_test_func(PARROT_INTERP, ARGIN(PMC *ctx), UINTVAL flags)
{
ASSERT_ARGS(Parrot_pcc_trace_flags_test_func)
- Parrot_Context *c = get_context_struct_fast(interp, ctx);
+ Parrot_Context * const c = CONTEXT_STRUCT(ctx);
return c->trace_flags & flags;
}
@@ -679,7 +663,7 @@
Parrot_pcc_get_int_constant_func(PARROT_INTERP, ARGIN(PMC *ctx), INTVAL idx)
{
ASSERT_ARGS(Parrot_pcc_get_int_constant_func)
- Parrot_Context const * c = get_context_struct_fast(interp, ctx);
+ const Parrot_Context * c = CONTEXT_STRUCT(ctx);
PARROT_ASSERT(c->constants[idx]->type == 'i');
return c->constants[idx]->u.integer;
}
@@ -690,7 +674,7 @@
Parrot_pcc_get_num_constant_func(PARROT_INTERP, ARGIN(PMC *ctx), INTVAL idx)
{
ASSERT_ARGS(Parrot_pcc_get_num_constant_func)
- Parrot_Context const * c = get_context_struct_fast(interp, ctx);
+ const Parrot_Context * c = CONTEXT_STRUCT(ctx);
PARROT_ASSERT(c->constants[idx]->type == 'n');
return c->constants[idx]->u.number;
}
@@ -701,7 +685,7 @@
Parrot_pcc_get_string_constant_func(PARROT_INTERP, ARGIN(PMC *ctx), INTVAL idx)
{
ASSERT_ARGS(Parrot_pcc_get_string_constant_func)
- Parrot_Context const * c = get_context_struct_fast(interp, ctx);
+ const Parrot_Context * c = CONTEXT_STRUCT(ctx);
PARROT_ASSERT(c->constants[idx]->type == 's');
return c->constants[idx]->u.string;
}
@@ -712,41 +696,12 @@
Parrot_pcc_get_pmc_constant_func(PARROT_INTERP, ARGIN(PMC *ctx), INTVAL idx)
{
ASSERT_ARGS(Parrot_pcc_get_pmc_constant_func)
- Parrot_Context const * c = get_context_struct_fast(interp, ctx);
+ const Parrot_Context * c = CONTEXT_STRUCT(ctx);
PARROT_ASSERT((c->constants[idx]->type == 'k')
|| (c->constants[idx]->type == 'p'));
return c->constants[idx]->u.key;
}
-
-
-/*
-
-=item C<static Parrot_Context * get_context_struct_fast(PARROT_INTERP, PMC
-*ctx)>
-
-Fetches Parrot_Context from Context PMC. This is a static, inlineable function
-so it only works within this file. It also only works if you *know* that ctx
-is a valid PMC, so be careful. This is an encapsulation-breaking optimization
-that improves performance measurably. Use responsibly. Never export this
-function.
-
-=cut
-
-*/
-
-
-PARROT_INLINE
-PARROT_CANNOT_RETURN_NULL
-static Parrot_Context *
-get_context_struct_fast(PARROT_INTERP, ARGIN(PMC *ctx))
-{
- ASSERT_ARGS(get_context_struct_fast)
-
- /* temporarily violate encapsulation; big speedup here */
- return PMC_data_typed(ctx, Parrot_Context *);
-}
-
/*
=back
Modified: branches/codestring/src/dynext.c
==============================================================================
--- branches/codestring/src/dynext.c Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/src/dynext.c Mon May 10 13:15:51 2010 (r46471)
@@ -376,8 +376,8 @@
/*
-=item C<PMC * Parrot_init_lib(PARROT_INTERP, PMC *(*load_func(PARROT_INTERP)),
-void (*init_func(PARROT_INTERP, PMC *)))>
+=item C<PMC * Parrot_init_lib(PARROT_INTERP, dynext_load_func load_func,
+dynext_init_func init_func)>
Initializes a new library. First, calls C<load_func> to load the library
(if C<load_func> is provided) and then calls C<init_func>. Returns a
@@ -391,8 +391,8 @@
PARROT_CANNOT_RETURN_NULL
PMC *
Parrot_init_lib(PARROT_INTERP,
- ARGIN_NULLOK(PMC *(*load_func)(PARROT_INTERP)),
- ARGIN_NULLOK(void (*init_func)(PARROT_INTERP, ARGIN_NULLOK(PMC *))))
+ NULLOK(dynext_load_func load_func),
+ NULLOK(dynext_init_func init_func))
{
ASSERT_ARGS(Parrot_init_lib)
PMC *lib_pmc = NULL;
Modified: branches/codestring/src/embed.c
==============================================================================
--- branches/codestring/src/embed.c Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/src/embed.c Mon May 10 13:15:51 2010 (r46471)
@@ -29,7 +29,7 @@
#include "embed.str"
-/* HEADERIZER HFILE: none */ /* The visible types are different than what we use in here */
+/* HEADERIZER HFILE: include/parrot/embed.h */
/* HEADERIZER BEGIN: static */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
@@ -84,6 +84,7 @@
Parrot_Interp
Parrot_new(ARGIN_NULLOK(Parrot_Interp parent))
{
+ ASSERT_ARGS(Parrot_new)
/* inter_create.c:make_interpreter builds a new Parrot_Interp. */
return make_interpreter(parent, PARROT_NO_FLAGS);
}
@@ -109,8 +110,9 @@
PARROT_EXPORT
void
-Parrot_init_stacktop(PARROT_INTERP, void *stack_top)
+Parrot_init_stacktop(PARROT_INTERP, ARGIN(void *stack_top))
{
+ ASSERT_ARGS(Parrot_init_stacktop)
interp->lo_var_ptr = stack_top;
init_world_once(interp);
}
@@ -118,7 +120,7 @@
/*
-=item C<void Parrot_set_flag(PARROT_INTERP, INTVAL flag)>
+=item C<void Parrot_set_flag(PARROT_INTERP, Parrot_Int flag)>
Sets on any of the following flags, specified by C<flag>, in the interpreter:
@@ -132,8 +134,9 @@
PARROT_EXPORT
void
-Parrot_set_flag(PARROT_INTERP, INTVAL flag)
+Parrot_set_flag(PARROT_INTERP, Parrot_Int flag)
{
+ ASSERT_ARGS(Parrot_set_flag)
/* These two macros (from interpreter.h) do exactly what they look like. */
Interp_flags_SET(interp, flag);
@@ -150,7 +153,7 @@
/*
-=item C<void Parrot_set_debug(PARROT_INTERP, UINTVAL flag)>
+=item C<void Parrot_set_debug(PARROT_INTERP, Parrot_UInt flag)>
Set a debug flag: C<PARROT_DEBUG_FLAG>.
@@ -160,8 +163,9 @@
PARROT_EXPORT
void
-Parrot_set_debug(PARROT_INTERP, UINTVAL flag)
+Parrot_set_debug(PARROT_INTERP, Parrot_UInt flag)
{
+ ASSERT_ARGS(Parrot_set_debug)
interp->debug_flags |= flag;
}
@@ -181,6 +185,7 @@
void
Parrot_set_executable_name(PARROT_INTERP, Parrot_String name)
{
+ ASSERT_ARGS(Parrot_set_executable_name)
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,
@@ -190,7 +195,7 @@
/*
-=item C<void Parrot_set_trace(PARROT_INTERP, UINTVAL flag)>
+=item C<void Parrot_set_trace(PARROT_INTERP, Parrot_UInt flag)>
Set a trace flag: C<PARROT_TRACE_FLAG>
@@ -200,8 +205,9 @@
PARROT_EXPORT
void
-Parrot_set_trace(PARROT_INTERP, UINTVAL flag)
+Parrot_set_trace(PARROT_INTERP, Parrot_UInt flag)
{
+ ASSERT_ARGS(Parrot_set_trace)
Parrot_pcc_trace_flags_on(interp, interp->ctx, flag);
Parrot_runcore_switch(interp, Parrot_str_new_constant(interp, "slow"));
}
@@ -209,7 +215,7 @@
/*
-=item C<void Parrot_clear_flag(PARROT_INTERP, INTVAL flag)>
+=item C<void Parrot_clear_flag(PARROT_INTERP, Parrot_Int flag)>
Clears a flag in the interpreter.
@@ -219,15 +225,16 @@
PARROT_EXPORT
void
-Parrot_clear_flag(PARROT_INTERP, INTVAL flag)
+Parrot_clear_flag(PARROT_INTERP, Parrot_Int flag)
{
+ ASSERT_ARGS(Parrot_clear_flag)
Interp_flags_CLEAR(interp, flag);
}
/*
-=item C<void Parrot_clear_debug(PARROT_INTERP, UINTVAL flag)>
+=item C<void Parrot_clear_debug(PARROT_INTERP, Parrot_UInt flag)>
Clears a flag in the interpreter.
@@ -237,15 +244,16 @@
PARROT_EXPORT
void
-Parrot_clear_debug(PARROT_INTERP, UINTVAL flag)
+Parrot_clear_debug(PARROT_INTERP, Parrot_UInt flag)
{
+ ASSERT_ARGS(Parrot_clear_debug)
interp->debug_flags &= ~flag;
}
/*
-=item C<void Parrot_clear_trace(PARROT_INTERP, UINTVAL flag)>
+=item C<void Parrot_clear_trace(PARROT_INTERP, Parrot_UInt flag)>
Clears a flag in the interpreter.
@@ -255,15 +263,16 @@
PARROT_EXPORT
void
-Parrot_clear_trace(PARROT_INTERP, UINTVAL flag)
+Parrot_clear_trace(PARROT_INTERP, Parrot_UInt flag)
{
+ ASSERT_ARGS(Parrot_clear_trace)
Parrot_pcc_trace_flags_off(interp, interp->ctx, flag);
}
/*
-=item C<Parrot_Int Parrot_test_flag(PARROT_INTERP, INTVAL flag)>
+=item C<Parrot_Int Parrot_test_flag(PARROT_INTERP, Parrot_Int flag)>
Test the interpreter flags specified in C<flag>.
@@ -273,15 +282,16 @@
PARROT_EXPORT
Parrot_Int
-Parrot_test_flag(PARROT_INTERP, INTVAL flag)
+Parrot_test_flag(PARROT_INTERP, Parrot_Int flag)
{
+ ASSERT_ARGS(Parrot_test_flag)
return Interp_flags_TEST(interp, flag);
}
/*
-=item C<UINTVAL Parrot_test_debug(PARROT_INTERP, UINTVAL flag)>
+=item C<Parrot_UInt Parrot_test_debug(PARROT_INTERP, Parrot_UInt flag)>
Test the interpreter flags specified in C<flag>.
@@ -290,16 +300,17 @@
*/
PARROT_EXPORT
-UINTVAL
-Parrot_test_debug(PARROT_INTERP, UINTVAL flag)
+Parrot_UInt
+Parrot_test_debug(PARROT_INTERP, Parrot_UInt flag)
{
+ ASSERT_ARGS(Parrot_test_debug)
return interp->debug_flags & flag;
}
/*
-=item C<UINTVAL Parrot_test_trace(PARROT_INTERP, UINTVAL flag)>
+=item C<Parrot_UInt Parrot_test_trace(PARROT_INTERP, Parrot_UInt flag)>
Test the interpreter flags specified in C<flag>.
@@ -308,9 +319,10 @@
*/
PARROT_EXPORT
-UINTVAL
-Parrot_test_trace(PARROT_INTERP, UINTVAL flag)
+Parrot_UInt
+Parrot_test_trace(PARROT_INTERP, Parrot_UInt flag)
{
+ ASSERT_ARGS(Parrot_test_trace)
return Parrot_pcc_trace_flags_test(interp, interp->ctx, flag);
}
@@ -329,6 +341,7 @@
void
Parrot_set_run_core(PARROT_INTERP, Parrot_Run_core_t core)
{
+ ASSERT_ARGS(Parrot_set_run_core)
switch (core) {
case PARROT_SLOW_CORE:
Parrot_runcore_switch(interp, Parrot_str_new_constant(interp, "slow"));
@@ -369,6 +382,7 @@
void
Parrot_setwarnings(PARROT_INTERP, Parrot_warnclass wc)
{
+ ASSERT_ARGS(Parrot_setwarnings)
/* Activates the given warnings. (Macro from warnings.h.) */
PARROT_WARNINGS_on(interp, wc);
}
@@ -376,8 +390,8 @@
/*
-=item C<PackFile * Parrot_pbc_read(PARROT_INTERP, const char *fullname, const
-int debug)>
+=item C<Parrot_PackFile Parrot_pbc_read(PARROT_INTERP, const char *fullname,
+const int debug)>
Read in a bytecode, unpack it into a C<PackFile> structure, and do fixups.
@@ -387,9 +401,10 @@
PARROT_EXPORT
PARROT_CAN_RETURN_NULL
-PackFile *
+Parrot_PackFile
Parrot_pbc_read(PARROT_INTERP, ARGIN_NULLOK(const char *fullname), const int debug)
{
+ ASSERT_ARGS(Parrot_pbc_read)
PackFile *pf;
char *program_code;
FILE *io = NULL;
@@ -567,7 +582,7 @@
/*
-=item C<void Parrot_pbc_load(PARROT_INTERP, PackFile *pf)>
+=item C<void Parrot_pbc_load(PARROT_INTERP, Parrot_PackFile pf)>
Loads the C<PackFile> returned by C<Parrot_pbc_read()>.
@@ -577,8 +592,9 @@
PARROT_EXPORT
void
-Parrot_pbc_load(PARROT_INTERP, ARGIN(PackFile *pf))
+Parrot_pbc_load(PARROT_INTERP, ARGIN(Parrot_PackFile pf))
{
+ ASSERT_ARGS(Parrot_pbc_load)
if (!pf) {
Parrot_io_eprintf(interp, "Invalid packfile\n");
return;
@@ -603,6 +619,7 @@
void
Parrot_pbc_fixup_loaded(PARROT_INTERP)
{
+ ASSERT_ARGS(Parrot_pbc_fixup_loaded)
PackFile_fixup_subs(interp, PBC_LOADED, NULL);
}
@@ -751,6 +768,7 @@
void
Parrot_runcode(PARROT_INTERP, int argc, ARGIN(const char **argv))
{
+ ASSERT_ARGS(Parrot_runcode)
PMC *userargv, *main_sub;
/* Debugging mode nonsense. */
@@ -793,8 +811,8 @@
/*
-=item C<opcode_t * Parrot_debug(PARROT_INTERP, Parrot_Interp debugger, opcode_t
-*pc)>
+=item C<Parrot_Opcode * Parrot_debug(PARROT_INTERP, Parrot_Interp debugger,
+Parrot_Opcode *pc)>
Runs the interpreter's bytecode in debugging mode.
@@ -804,9 +822,10 @@
PARROT_EXPORT
PARROT_CAN_RETURN_NULL
-opcode_t *
-Parrot_debug(PARROT_INTERP, ARGIN(Parrot_Interp debugger), ARGIN(opcode_t *pc))
+Parrot_Opcode *
+Parrot_debug(PARROT_INTERP, ARGIN(Parrot_Interp debugger), ARGIN(Parrot_Opcode *pc))
{
+ ASSERT_ARGS(Parrot_debug)
PDB_t * const pdb = debugger->pdb;
pdb->cur_opcode = pc;
@@ -945,8 +964,10 @@
PARROT_EXPORT
void
-Parrot_disassemble(PARROT_INTERP, ARGIN(const char *outfile), Parrot_disassemble_options options)
+Parrot_disassemble(PARROT_INTERP,
+ ARGIN_NULLOK(const char *outfile), Parrot_disassemble_options options)
{
+ ASSERT_ARGS(Parrot_disassemble)
PDB_line_t *line;
PDB_t * const pdb = mem_gc_allocate_zeroed_typed(interp, PDB_t);
int num_mappings = 0;
@@ -1052,6 +1073,7 @@
void
Parrot_run_native(PARROT_INTERP, native_func_t func)
{
+ ASSERT_ARGS(Parrot_run_native)
PackFile * const pf = PackFile_new(interp, 0);
static opcode_t program_code[2];
@@ -1091,6 +1113,7 @@
Parrot_compile_string(PARROT_INTERP, Parrot_String type, ARGIN(const char *code),
ARGOUT(Parrot_String *error))
{
+ ASSERT_ARGS(Parrot_compile_string)
/* For the benefit of embedders that do not load any pbc
* before compiling a string */
Modified: branches/codestring/src/gc/alloc_resources.c
==============================================================================
--- branches/codestring/src/gc/alloc_resources.c Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/src/gc/alloc_resources.c Mon May 10 13:15:51 2010 (r46471)
@@ -111,7 +111,7 @@
PARROT_CANNOT_RETURN_NULL
static Variable_Size_Pool * new_memory_pool(
size_t min_block,
- ARGIN_NULLOK(compact_f compact));
+ NULLOK(compact_f compact));
PARROT_CANNOT_RETURN_NULL
static UINTVAL pad_pool_size(ARGIN(const Variable_Size_Pool *pool))
@@ -809,7 +809,7 @@
PARROT_MALLOC
PARROT_CANNOT_RETURN_NULL
static Variable_Size_Pool *
-new_memory_pool(size_t min_block, ARGIN_NULLOK(compact_f compact))
+new_memory_pool(size_t min_block, NULLOK(compact_f compact))
{
ASSERT_ARGS(new_memory_pool)
Variable_Size_Pool * const pool = mem_internal_allocate_typed(Variable_Size_Pool);
Modified: branches/codestring/src/hash.c
==============================================================================
--- branches/codestring/src/hash.c Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/src/hash.c Mon May 10 13:15:51 2010 (r46471)
@@ -1004,7 +1004,7 @@
PARROT_MALLOC
Hash *
parrot_create_hash(PARROT_INTERP, PARROT_DATA_TYPE val_type, Hash_key_type hkey_type,
- ARGIN(hash_comp_fn compare), ARGIN(hash_hash_key_fn keyhash))
+ NOTNULL(hash_comp_fn compare), NOTNULL(hash_hash_key_fn keyhash))
{
ASSERT_ARGS(parrot_create_hash)
HashBucket *bp;
@@ -1122,7 +1122,7 @@
void
parrot_chash_destroy_values(PARROT_INTERP, ARGMOD(Hash *hash),
- ARGIN(value_free func))
+ NOTNULL(value_free func))
{
ASSERT_ARGS(parrot_chash_destroy_values)
UINTVAL i;
Modified: branches/codestring/src/ops/core.ops
==============================================================================
--- branches/codestring/src/ops/core.ops Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/src/ops/core.ops Mon May 10 13:15:51 2010 (r46471)
@@ -478,14 +478,10 @@
op set_args(inconst PMC) :flow {
opcode_t * const raw_args = CUR_OPCODE;
PMC * const signature = $1;
- PMC * call_sig;
- INTVAL argc;
-
- call_sig = Parrot_pcc_build_sig_object_from_op(interp,
+ PMC * const call_sig = Parrot_pcc_build_sig_object_from_op(interp,
PMCNULL, signature, raw_args);
+ const INTVAL argc = VTABLE_elements(interp, signature);
Parrot_pcc_set_signature(interp, CURRENT_CONTEXT(interp), call_sig);
-
- argc = VTABLE_elements(interp, signature);
goto OFFSET(argc + 2);
}
Modified: branches/codestring/src/packfile.c
==============================================================================
--- branches/codestring/src/packfile.c Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/src/packfile.c Mon May 10 13:15:51 2010 (r46471)
@@ -4801,7 +4801,7 @@
/*
-=item C<void Parrot_load_bytecode(PARROT_INTERP, STRING *file_str)>
+=item C<void Parrot_load_bytecode(PARROT_INTERP, Parrot_String file_str)>
Load a bytecode, PIR, or PASM file into the interpreter.
@@ -4812,7 +4812,7 @@
/* intermediate hook during changes */
PARROT_EXPORT
void
-Parrot_load_bytecode(PARROT_INTERP, ARGIN_NULLOK(STRING *file_str))
+Parrot_load_bytecode(PARROT_INTERP, ARGIN_NULLOK(Parrot_String file_str))
{
ASSERT_ARGS(Parrot_load_bytecode)
STRING *wo_ext, *ext, *pbc, *path;
Modified: branches/codestring/src/string/api.c
==============================================================================
--- branches/codestring/src/string/api.c Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/src/string/api.c Mon May 10 13:15:51 2010 (r46471)
@@ -1742,7 +1742,7 @@
Parrot_str_boolean(PARROT_INTERP, ARGIN_NULLOK(const STRING *s))
{
ASSERT_ARGS(Parrot_str_boolean)
- const INTVAL len = !STRING_IS_NULL(s) ? Parrot_str_byte_length(interp, s) : 0;
+ const INTVAL len = !STRING_IS_NULL(s) ? Parrot_str_length(interp, s) : 0;
if (len == 0)
return 0;
@@ -2719,7 +2719,7 @@
ASSERT_ARGS(string_increment)
UINTVAL o;
- if (Parrot_str_byte_length(interp, s) != 1)
+ if (Parrot_str_length(interp, s) != 1)
Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNIMPLEMENTED,
"increment only for length = 1 done");
Modified: branches/codestring/src/string/charset/ascii.c
==============================================================================
--- branches/codestring/src/string/charset/ascii.c Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/src/string/charset/ascii.c Mon May 10 13:15:51 2010 (r46471)
@@ -647,11 +647,11 @@
validate(PARROT_INTERP, ARGIN(const STRING *src))
{
ASSERT_ARGS(validate)
- UINTVAL offset;
+ INTVAL offset;
String_iter iter;
ENCODING_ITER_INIT(interp, src, &iter);
- for (offset = 0; offset < Parrot_str_byte_length(interp, src); ++offset) {
+ for (offset = 0; offset < Parrot_str_length(interp, src); ++offset) {
const UINTVAL codepoint = iter.get_and_advance(interp, &iter);
if (codepoint >= 0x80)
return 0;
Modified: branches/codestring/src/string/charset/iso-8859-1.c
==============================================================================
--- branches/codestring/src/string/charset/iso-8859-1.c Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/src/string/charset/iso-8859-1.c Mon May 10 13:15:51 2010 (r46471)
@@ -525,9 +525,9 @@
validate(PARROT_INTERP, ARGIN(const STRING *src))
{
ASSERT_ARGS(validate)
- UINTVAL offset;
+ INTVAL offset;
- for (offset = 0; offset < Parrot_str_byte_length(interp, src); ++offset) {
+ for (offset = 0; offset < Parrot_str_length(interp, src); ++offset) {
const UINTVAL codepoint = ENCODING_GET_CODEPOINT(interp, src, offset);
if (codepoint >= 0x100)
return 0;
Modified: branches/codestring/src/string/charset/unicode.c
==============================================================================
--- branches/codestring/src/string/charset/unicode.c Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/src/string/charset/unicode.c Mon May 10 13:15:51 2010 (r46471)
@@ -716,11 +716,11 @@
validate(PARROT_INTERP, ARGIN(const STRING *src))
{
ASSERT_ARGS(validate)
- UINTVAL offset;
+ INTVAL offset;
String_iter iter;
ENCODING_ITER_INIT(interp, src, &iter);
- for (offset = 0; offset < Parrot_str_byte_length(interp, src); ++offset) {
+ for (offset = 0; offset < Parrot_str_length(interp, src); ++offset) {
const UINTVAL codepoint = iter.get_and_advance(interp, &iter);
/* Check for Unicode non-characters */
if (codepoint >= 0xfdd0
Modified: branches/codestring/t/compilers/imcc/imcpasm/opt0.t
==============================================================================
--- branches/codestring/t/compilers/imcc/imcpasm/opt0.t Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/t/compilers/imcc/imcpasm/opt0.t Mon May 10 13:15:51 2010 (r46471)
@@ -5,27 +5,11 @@
use strict;
use warnings;
use lib qw( . lib ../lib ../../lib );
-use Parrot::Test tests => 6;
+use Parrot::Test tests => 4;
# these tests are run with -O0 by TestCompiler and show
# generated PASM code for various optimizations at level 0
-SKIP: {
- skip("disabled graph coloring register allocator, TT #1281", 1);
-pir_2_pasm_like( <<'CODE', <<'OUT', "add_n_i_n" );
-.sub _ :anon
- add $N0, $I0, $N1
- mul $N0, $I0, $N1
-.end
-CODE
-/set (N\d+), I0
- add N0, \1, N1
- set (N\d+), I0
- mul N0, \2, N1/
-OUT
-}
-
-##############################
pir_2_pasm_is( <<'CODE', <<'OUT', "sub_n_ic_n" );
.sub _ :anon
sub $N0, 2, $N1
@@ -42,25 +26,6 @@
OUT
##############################
-SKIP: {
- skip("disabled graph coloring register allocator, TT #1281", 1);
-pir_2_pasm_like( <<'CODE', <<'OUT', "sub_n_i_n" );
-.sub _test
- sub $N0, $I0, $N1
- div $N0, $I0, $N1
-.end
-CODE
-/_test:
- set N(\d+), I0
- sub N0, N\1, N1
- set N(\d+), I0
- div N0, N\2, N1
- set_returns
- returncc/
-OUT
-}
-
-##############################
pir_2_pasm_is( <<'CODE', <<'OUT', "added return - end" );
.sub _test
noop
Modified: branches/codestring/t/compilers/imcc/imcpasm/optc.t
==============================================================================
--- branches/codestring/t/compilers/imcc/imcpasm/optc.t Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/t/compilers/imcc/imcpasm/optc.t Mon May 10 13:15:51 2010 (r46471)
@@ -5,7 +5,7 @@
use strict;
use warnings;
use lib qw( . lib ../lib ../../lib );
-use Parrot::Test tests => 43;
+use Parrot::Test tests => 42;
use Test::More;
# these tests are run with -Oc by TestCompiler and show
@@ -253,20 +253,6 @@
returncc/
OUT
-pir_2_pasm_like( <<'CODE', <<'OUT', "tailcall 1", todo => "TT #1281" );
-.sub _main
- foo(1, 2)
-.end
-.sub foo
- .param int i
- .param int j
- .tailcall foo(I2, I3)
-.end
-CODE
-/ set I\d, I2
- set I\d, I3/
-OUT
-
pir_2_pasm_like( <<'CODE', <<'OUT', "tailcall 2" );
.sub _main
foo(1, 2)
Modified: branches/codestring/t/compilers/imcc/syn/clash.t
==============================================================================
--- branches/codestring/t/compilers/imcc/syn/clash.t Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/t/compilers/imcc/syn/clash.t Mon May 10 13:15:51 2010 (r46471)
@@ -261,7 +261,7 @@
ok
OUT
-pir_error_output_like( <<'CODE', <<'OUT', 'lexical redeclared in sub', todo => 'TT #1073' );
+pir_error_output_like( <<'CODE', <<'OUT', 'lexical redeclared in sub');
.sub 'main' :main
.lex 'foo', $P0
$P1 = box 'ok 1'
@@ -282,7 +282,7 @@
store_lex 'foo', $P7
.end
CODE
-/Lexical 'foo' already declared/
+/Multiple declarations of lexical 'foo'/
OUT
# Local Variables:
Modified: branches/codestring/t/compilers/imcc/syn/pcc.t
==============================================================================
--- branches/codestring/t/compilers/imcc/syn/pcc.t Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/t/compilers/imcc/syn/pcc.t Mon May 10 13:15:51 2010 (r46471)
@@ -562,7 +562,7 @@
ok 2 - Unicode method names allowed
OUT
-pir_output_is( <<'CODE', <<'OUT', 'named parameters', todo => 'long version fails, TT #1030');
+pir_output_is( <<'CODE', <<'OUT', 'named parameters');
.sub main
.local pmc foo
foo = get_global 'foo'
@@ -621,7 +621,7 @@
xyz:<\>
OUT
-pir_output_is( <<'CODE', <<'OUT', ':named should default to param name', todo=>'TT #1152');
+pir_output_is( <<'CODE', <<'OUT', ':named should default to param name');
.sub main
$I0 = 'incr'('value'=>3)
say $I0
Modified: branches/codestring/t/compilers/imcc/syn/regressions.t
==============================================================================
--- branches/codestring/t/compilers/imcc/syn/regressions.t Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/t/compilers/imcc/syn/regressions.t Mon May 10 13:15:51 2010 (r46471)
@@ -254,7 +254,7 @@
bar()
.end
CODE
-/:opt_flag parameter must be of type 'I', not '$invalid_type'/
+/:opt_flag parameter must be of type 'int', not '$invalid_type'/
OUT
}
Modified: branches/codestring/t/oo/metamodel.t
==============================================================================
--- branches/codestring/t/oo/metamodel.t Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/t/oo/metamodel.t Mon May 10 13:15:51 2010 (r46471)
@@ -17,13 +17,7 @@
=cut
.sub _main :main
- load_bytecode 'Test/More.pbc'
-
- .local pmc exports, curr_namespace, test_namespace
- curr_namespace = get_namespace
- test_namespace = get_namespace [ 'Test'; 'More' ]
- exports = split " ", "plan ok is isa_ok skip todo"
- test_namespace.'export_to'(curr_namespace, exports)
+ .include 'test_more.pir'
plan( 12 )
@@ -85,10 +79,9 @@
fail("no attribute")
NEXT:
- todo(0, "new opcode makes working objects", "not implemented: TT #1619")
-# $P0 = new "Dog"
-# $I0 = defined $P0
-# isa_ok($P0, "Dog", "new opcode makes working objects")
+ $P0 = new "Dog"
+ $I0 = defined $P0
+ isa_ok($P0, "Dog", "new opcode makes working objects")
.end
Modified: branches/codestring/t/op/calling.t
==============================================================================
--- branches/codestring/t/op/calling.t Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/t/op/calling.t Mon May 10 13:15:51 2010 (r46471)
@@ -7,7 +7,7 @@
use lib qw( . lib ../lib ../../lib );
use Test::More;
-use Parrot::Test tests => 97;
+use Parrot::Test tests => 98;
=head1 NAME
@@ -2531,6 +2531,37 @@
2
OUTPUT
+pir_output_is( <<'CODE', <<'OUTPUT', "methodtailcall 1 TT#133" );
+
+.sub main
+ say "main"
+ $P0 = foo() ## fails :-(
+ $P0 = bar()
+ say "done"
+.end
+
+.sub foo
+ .local pmc p
+ say "foo"
+ p = new "Class"
+ .tailcall p."attributes"()
+.end
+
+.sub bar
+ .local pmc p
+ say "bar"
+ p = new "Class"
+ $P0 = p."attributes"()
+ .return ($P0)
+.end
+
+CODE
+main
+foo
+bar
+done
+OUTPUT
+
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
Modified: branches/codestring/t/op/lexicals.t
==============================================================================
--- branches/codestring/t/op/lexicals.t Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/t/op/lexicals.t Mon May 10 13:15:51 2010 (r46471)
@@ -14,7 +14,7 @@
plan( skip_all => 'lexicals not thawed properly from PBC, TT #1171' )
if $ENV{TEST_PROG_ARGS} =~ /--run-pbc/;
-plan( tests => 57 );
+plan( tests => 56 );
=head1 NAME
@@ -101,16 +101,6 @@
ok
OUTPUT
-pir_output_is( <<'CODE', <<'OUTPUT', '.lex - same lex twice' );
-.sub main
- .lex '$a', $P0
- .lex '$a', $P1
- say "ok"
-.end
-CODE
-ok
-OUTPUT
-
pir_output_is( <<'CODE', <<'OUTPUT', 'api parsing' );
.sub main :main
.lex 'a', $P0
Modified: branches/codestring/t/pmc/class.t
==============================================================================
--- branches/codestring/t/pmc/class.t Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/t/pmc/class.t Mon May 10 13:15:51 2010 (r46471)
@@ -17,17 +17,10 @@
=cut
-.const int TESTS = 73
-
-
.sub 'main' :main
- load_bytecode 'Test/More.pbc'
- .local pmc exporter, test_ns
- test_ns = get_namespace [ 'Test'; 'More' ]
- exporter = new ['Exporter']
- exporter.'import'( test_ns :named('source'), 'plan ok is isa_ok todo' :named('globals') )
+ .include 'test_more.pir'
- plan(TESTS)
+ plan(73)
'new op'()
'class flag'()
'name'()
Modified: branches/codestring/t/pmc/eval.t
==============================================================================
--- branches/codestring/t/pmc/eval.t Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/t/pmc/eval.t Mon May 10 13:15:51 2010 (r46471)
@@ -395,7 +395,7 @@
written
OUTPUT
-pir_output_is( <<"CODE", <<'OUTPUT', "eval.thaw" );
+pir_output_is( <<"CODE", <<'OUTPUT', "eval.thaw", todo => 'TT #1142' );
.sub main :main
.local pmc io, e
.local string file
@@ -407,6 +407,7 @@
\$S0 = read io, size
close io
e = thaw \$S0
+ sweep 1 # ensure all of the object survives GC
e()
e = get_global "foo_1"
e()
Modified: branches/codestring/t/pmc/resizablepmcarray.t
==============================================================================
--- branches/codestring/t/pmc/resizablepmcarray.t Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/t/pmc/resizablepmcarray.t Mon May 10 13:15:51 2010 (r46471)
@@ -21,7 +21,7 @@
.include 'fp_equality.pasm'
.include 'test_more.pir'
- plan(128)
+ plan(129)
resize_tests()
negative_array_size()
@@ -51,6 +51,7 @@
addr_tests()
equality_tests()
sort_tailcall()
+ push_to_subclasses_array()
.end
@@ -1020,6 +1021,22 @@
.param pmc b
.tailcall 'cmp_func_tailcall'(a, b)
.end
+
+# Regression test for TT#835
+.sub 'push_to_subclasses_array'
+ .local pmc cl, array_one
+ cl = subclass "ResizablePMCArray", "ExampleArray"
+ array_one = new "ExampleArray"
+
+ $I0 = 100000
+ loop:
+ array_one.'push'($I0)
+ dec $I0
+ if $I0 goto loop
+
+ ok(1, "Push to subclassed array works")
+.end
+
# don't forget to change the test plan
# Local Variables:
Modified: branches/codestring/tools/dev/mk_gitignore.pl
==============================================================================
--- branches/codestring/tools/dev/mk_gitignore.pl Mon May 10 13:00:51 2010 (r46470)
+++ branches/codestring/tools/dev/mk_gitignore.pl Mon May 10 13:15:51 2010 (r46471)
@@ -6,14 +6,19 @@
use warnings;
use lib qw| lib |;
-use Parrot::Manifest;
-
-my $script = $0;
-
-my $mani = Parrot::Manifest->new( { script => $script, } );
-
-my $print_str = $mani->prepare_gitignore();
-$mani->print_gitignore($print_str);
+my ($mani, $gitignore);
+open $mani, '<', 'MANIFEST.SKIP' or die "Can't open MANIFEST.SKIP for reading";
+open $gitignore, '>', '.gitignore' or die "Can't open .gitignore for writing";
+
+while (<$mani>) {
+ next if /\/$/; # skip redundant directories
+ # Convert MANIFEST.SKIP style regexes into git paths.
+ s/^\^//;
+ s/\.\*/*/g;
+ s/\\\././g;
+ s/\$$//;
+ print $gitignore $_;
+}
__END__
@@ -27,12 +32,10 @@
=head1 DESCRIPTION
-This is a helper for users of git-svn. In an svn-checkout it creates
-a file called F<.gitignore> containing the files detailed in the subversion property
-C<svn:ignore>. This file can then be copied to a git-svn working directory.
+This is a helper for users of git-svn. It converts MANIFEST.SKIP into
+.gitgnore.
-So beware, this works only for a svn checkout and the result is only useful
-for a git-svn checkout.
+So beware, result is only useful for a git-svn checkout.
=head1 SEE ALSO
More information about the parrot-commits
mailing list