Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[html_cleanup] merge in origin/master

  • Loading branch information...
commit b8261e42876c7e2406014cc9791ffc5164d00998 2 parents 6cbc51a + 3e9a2f0
@mikehh mikehh authored
Showing with 10,215 additions and 7,472 deletions.
  1. +13 −1 CREDITS
  2. +1 −2  Configure.pl
  3. +24 −27 DEPRECATED.pod
  4. +12 −5 MANIFEST
  5. +1 −1  README.deutsch
  6. +3 −3 README.espanol
  7. +1 −1  README.polski
  8. +2 −0  compilers/imcc/Rules.in
  9. +1 −1  compilers/imcc/debug.c
  10. +12 −5 compilers/imcc/imcc.y
  11. +21 −11 compilers/imcc/imclexer.c
  12. +864 −856 compilers/imcc/imcparser.c
  13. +7 −6 compilers/imcc/imcparser.h
  14. +102 −15 compilers/imcc/main.c
  15. +12 −63 compilers/imcc/pbc.c
  16. +13 −7 compilers/imcc/pcc.c
  17. +0 −1  compilers/imcc/symreg.c
  18. +1 −1  compilers/imcc/symreg.h
  19. +24 −24 compilers/pct/src/PAST/Compiler.pir
  20. +1 −1  compilers/pct/src/PCT/Dumper.pir
  21. +1 −1  compilers/pct/src/PCT/Grammar.pir
  22. +2 −2 compilers/pct/src/PCT/HLLCompiler.pir
  23. +7 −7 compilers/pct/src/POST/Compiler.pir
  24. +3 −3 compilers/pge/PGE/Exp.pir
  25. +2 −2 compilers/pge/PGE/Perl6Regex.pir
  26. +1 −1  compilers/tge/TGE/Compiler.pir
  27. +19 −2 config/auto/coverage.pm
  28. +1 −1  config/auto/gc.pm
  29. +1 −0  config/auto/ipv6/test.in
  30. +99 −9 config/auto/pmc.pm
  31. +205 −85 config/gen/makefiles/root.in
  32. +1 −0  config/gen/platform/darwin/sysmem.c
  33. +0 −62 config/init/headers.pm
  34. +61 −0 docs/dev/coverage.pod
  35. +265 −189 docs/pdds/draft/pdd10_embedding.pod
  36. +2 −2 docs/project/release_manager_guide.pod
  37. +1 −1  examples/c/test_main.c
  38. +0 −1  examples/config/file/configcompiler
  39. +0 −1  examples/config/file/configwithfatalstep
  40. +3 −3 examples/io/httpd.pir
  41. +30 −30 examples/library/ncurses_life.pir
  42. +7 −7 examples/pir/befunge/debug.pir
  43. +1 −1  examples/pir/befunge/io.pir
  44. +1 −1  examples/pir/befunge/load.pir
  45. +179 −179 examples/pir/life.pir
  46. +9 −9 examples/pir/pirric.pir
  47. +13 −13 examples/pir/readline.pir
  48. +8 −8 examples/sdl/lcd/clock.pir
  49. +3 −3 examples/streams/Combiner.pir
  50. +3 −3 examples/streams/Filter.pir
  51. +372 −417 ext/nqp-rx/src/stage0/HLL-s0.pir
  52. +989 −1,103 ext/nqp-rx/src/stage0/NQP-s0.pir
  53. +537 −594 ext/nqp-rx/src/stage0/P6Regex-s0.pir
  54. +16 −16 ext/nqp-rx/src/stage0/Regex-s0.pir
  55. +239 −128 frontend/parrot/main.c
  56. +6 −6 frontend/parrot_debugger/main.c
  57. +3 −2 frontend/pbc_dump/main.c
  58. +3 −2 frontend/pbc_merge/main.c
  59. +715 −0 include/parrot/api.h
  60. +12 −1 include/parrot/debugger.h
  61. +1 −1  include/parrot/dynext.h
  62. +15 −5 include/parrot/embed.h
  63. +16 −0 include/parrot/exit.h
  64. +13 −0 include/parrot/gc_api.h
  65. +16 −9 include/parrot/global_setup.h
  66. +1 −1  include/parrot/imcc.h
  67. +40 −19 include/parrot/interpreter.h
  68. +7 −0 include/parrot/library.h
  69. +5 −13 include/parrot/longopt.h
  70. +5 −2 include/parrot/misc.h
  71. +0 −2  include/parrot/oplib/core_ops.h
  72. +283 −285 include/parrot/oplib/ops.h
  73. +283 −285 include/parrot/opsenum.h
  74. +0 −442 include/parrot/packfile.h
  75. +0 −2  include/parrot/parrot.h
  76. +27 −1 include/parrot/pmc.h
  77. +5 −131 include/parrot/pmc_freeze.h
  78. +1 −37 include/parrot/string_funcs.h
  79. +0 −64 include/parrot/string_primitives.h
  80. +0 −1  lib/Parrot/Configure/Step/List.pm
  81. +0 −4 lib/Parrot/Distribution.pm
  82. +2 −3 lib/Parrot/Docs/Section/C.pm
  83. +2 −0  lib/Parrot/Headerizer.pm
  84. +0 −1  lib/Parrot/Pmc2c/PCCMETHOD.pm
  85. +1 −1  lib/Parrot/Test/Harness.pm
  86. 0  ports/fedora/{2.6.0 → 2.11.0}/parrot.desk.in.tar.gz
  87. +25 −11 ports/fedora/{2.6.0 → 2.11.0}/parrot.spec
  88. +1 −1  runtime/parrot/library/CGI/QueryHash.pir
  89. +1 −1  runtime/parrot/library/Data/Dumper/Base.pir
  90. +1 −1  runtime/parrot/library/Data/Dumper/Default.pir
  91. +11 −11 runtime/parrot/library/MIME/Base64.pir
  92. +4 −4 runtime/parrot/library/PGE/Hs.pir
  93. +5 −5 runtime/parrot/library/PGE/Perl6Grammar.pir
  94. +1 −1  runtime/parrot/library/Stream/Base.pir
  95. +1 −1  runtime/parrot/library/Stream/Lines.pir
  96. +2 −2 runtime/parrot/library/String/Utils.pir
  97. +2 −1  runtime/parrot/library/TAP/Harness.pir
  98. +3 −5 runtime/parrot/library/Test/Builder/Output.pir
  99. +11 −11 runtime/parrot/library/Test/Builder/Test.pir
  100. +6 −6 runtime/parrot/library/Test/Builder/TestPlan.pir
  101. +13 −13 runtime/parrot/library/Test/Builder/Tester.pir
  102. +4 −4 runtime/parrot/library/Test/More.pir
  103. +1 −1  runtime/parrot/library/YAML/Dumper/Base.pir
  104. +1 −1  runtime/parrot/library/YAML/Dumper/Default.pir
  105. +128 −17 src/debug.c
  106. +17 −48 src/dynext.c
  107. +5 −4 src/dynpmc/Defines.in
  108. +53 −17 src/dynpmc/Rules.in
  109. +27 −8 src/embed.c
  110. +819 −0 src/embed/api.c
  111. +48 −0 src/embed/embed_private.h
  112. +603 −0 src/embed/pmc.c
  113. +237 −0 src/embed/strings.c
  114. +14 −34 src/exceptions.c
  115. +49 −1 src/exit.c
  116. +24 −0 src/gc/api.c
  117. +2 −2 src/gc/gc_ms2.c
  118. +0 −8 src/gc/gc_private.h
  119. +3 −0  src/gc/mark_sweep.c
  120. +37 −34 src/global_setup.c
  121. +14 −98 src/hash.c
  122. +59 −0 src/interp/inter_misc.c
  123. +83 −51 src/library.c
  124. +34 −95 src/longopt.c
  125. +575 −623 src/ops/core_ops.c
  126. +3 −6 src/ops/pmc.ops
  127. +0 −6 src/ops/string.ops
  128. +34 −25 src/packfile/object_serialization.c
  129. +52 −28 src/pbc_disassemble.c
  130. +76 −2 src/pmc.c
  131. +4 −11 src/pmc/callcontext.pmc
  132. +18 −12 src/pmc/eventhandler.pmc
  133. +3 −0  src/pmc/exception.pmc
  134. +13 −9 src/pmc/exporter.pmc
  135. +1 −1  src/pmc/fixedintegerarray.pmc
  136. +1 −1  src/pmc/fixedpmcarray.pmc
  137. +0 −1  src/pmc/imageiosize.pmc
  138. +0 −2  src/pmc/iterator.pmc
  139. +3 −38 src/pmc/orderedhash.pmc
  140. +0 −1  src/pmc/packfiledebug.pmc
  141. +4 −2 src/pmc/socket.pmc
  142. +0 −1  src/pmc/stringbuilder.pmc
  143. +0 −1  src/pmc/undef.pmc
  144. +1 −0  src/pointer_array.c
  145. +40 −149 src/string/api.c
  146. +0 −394 src/string/primitives.c
  147. +21 −12 src/utils.c
  148. +7 −1 t/codingstd/pccmethod_deps.t
  149. +3 −0  t/codingstd/perlcritic.t
  150. +1 −1  t/compilers/imcc/syn/const.t
  151. +0 −1  t/configure/testlib/adefectivefoobar
  152. +0 −1  t/configure/testlib/bdefectivefoobar
  153. +0 −1  t/configure/testlib/cdefectivefoobar
  154. +0 −1  t/configure/testlib/ddefectivefoobar
  155. +0 −1  t/configure/testlib/verbosefoobar
  156. +1 −1  t/dynoplibs/pmc_pow.t
  157. +1 −1  t/dynpmc/foo.t
  158. +8 −2 t/harness.pir
  159. +3 −2 t/library/lwp.t
  160. +3 −3 t/library/mime_base64.t
  161. +4 −4 t/library/streams.t
  162. +2 −2 t/oo/new.t
  163. +2 −2 t/oo/root_new.t
  164. +10 −10 t/op/arithmetics_pmc.t
  165. +37 −1 t/op/calling.t
  166. +15 −15 t/op/cmp-nonbranch.t
  167. +11 −7 t/op/exit.t
  168. +12 −12 t/op/string.t
  169. +2 −2 t/op/string_cs.t
  170. +4 −4 t/op/stringu.t
  171. +178 −38 t/pmc/bigint.t
  172. +9 −1 t/pmc/continuation.t
  173. +10 −10 t/pmc/eval.t
  174. +15 −19 t/pmc/eventhandler.t
  175. +55 −1 t/pmc/exporter.t
  176. +24 −2 t/pmc/fixedintegerarray.t
  177. +3 −3 t/pmc/fixedpmcarray.t
  178. +2 −2 t/pmc/fixedstringarray.t
  179. +6 −3 t/pmc/hash.t
  180. +24 −1 t/pmc/hashiterator.t
  181. +35 −3 t/pmc/key.t
  182. +13 −2 t/pmc/mappedbytearray.t
  183. +9 −9 t/pmc/resizablepmcarray.t
  184. +6 −1 t/pmc/role.t
  185. +3 −2 t/pmc/socket.t
  186. +0 −1  t/pmc/string.t
  187. +1 −0  t/pmc/testfile
  188. +4 −1 t/run/options.t
  189. +75 −79 tools/dev/checkdepend.pl → t/src/checkdepend.t
  190. +310 −0 t/src/embed/pmc.t
  191. +92 −0 t/src/embed/strings.t
  192. +1 −1  t/steps/auto/pmc-01.t
  193. +0 −93 t/steps/init/headers-01.t
  194. +25 −13 tools/build/parrot_config_c.pl
  195. +120 −0 tools/dev/findhacks.pl
  196. +42 −14 tools/dev/github_post_receive.pl
  197. +92 −0 tools/dev/make_cover.pl
  198. +1 −0  tools/dev/mk_nci_thunks.pl
  199. +1 −1  tools/dev/nci_thunk_gen.pir
  200. +77 −40 tools/dev/pbc_to_exe.pir
View
14 CREDITS
@@ -323,6 +323,11 @@ N: Dave Woldrich
D: Win32 build fixes
E: dave@woldrich.com
+N: David Czech
+U: kapace
+E: davidczech510@gmail.com
+D: increasing EventHandler test coverage
+
N: David M. Lloyd
U: dmlloyd
E: dmlloyd@tds.net
@@ -712,7 +717,9 @@ N: Matt Kennedy
D: Some Env PMC method implementations and tests
N: Matt Rajca
-D: Code refactoring
+E: mattmatt.rajca@me.com
+A: mattrajca
+D: Code refactoring, increasing test coverage
N: Mattia Barbon
D: Win32 fixes, dynamic PMC creation and loading
@@ -1047,6 +1054,11 @@ D: Nicer command line handling in ops2c.pl
N: Tony Payne
D: Example hanoi.pasm
+N: Tony Young
+E: rofflwaffls@gmail.com
+A: rfw
+D: increasing PMC test coverage
+
N: Tyler Curtis
U: tcurtis
E: tyler.l.curtis@gmail.com
View
3  Configure.pl
@@ -553,7 +553,7 @@ =head1 CONFIGURATION-FILE INTERFACE
...
init::hints verbose-step
- init::headers
+ ...
inter::progs fatal-step
...
auto::gcc verbose-step
@@ -600,7 +600,6 @@ =head2 Example
init::defaults
init::install
init::hints verbose-step
- init::headers
inter::progs
inter::make
inter::lex
View
51 DEPRECATED.pod
@@ -104,12 +104,6 @@ will not auto-vivify nested hashes and return PMCNULL early.
L<https://trac.parrot.org/parrot/ticket/1561>
-=item Method unescape on String [experimental]
-
-This is a helper method for testing of Parrot_str_unescape_string.
-
-L<https://trac.parrot.org/parrot/ticket/1628>
-
=item logical_* vtables [eligiblie in 2.7]
These can be replaced by C<get_bool> and intval ops unless you're using them for
@@ -200,13 +194,6 @@ These will be changed to allow more flexibility in types.
L<https://trac.parrot.org/parrot/ticket/1565>
-=item inplace string updates. [eligible in 2.4]
-
-All "inplace" string update ops are deprecated. E.g. "chopn_s", etc.
-Part of COW removal.
-
-L<https://trac.parrot.org/parrot/ticket/1540>
-
=item finalize [experimental]
Finalize exception handler, unrolling inner runloops if needed.
@@ -291,6 +278,12 @@ At this point, C<:init> is a no-op, and will therefore be removed.
L<https://trac.parrot.org/parrot/ticket/1896>
+=item encoding:charset:"" string literals [eligible in 3.1]
+
+This form of string literals will be removed.
+
+L<https://trac.parrot.org/parrot/ticket/1808>
+
=back
=head1 Functions
@@ -324,20 +317,6 @@ this rather than relying on in-place modification of an existing pointer.
L<https://trac.parrot.org/parrot/ticket/1584>
-=item STRING COW [eligible in 2.4]
-
-COW strings are to be removed. All "inplace" string modification
-functions and all "inplace" string ops are deprecated.
-
-L<https://trac.parrot.org/parrot/ticket/1540>
-
-=item Parrot_str_unescape_string [experimental]
-
-This function is an experimental addition to enhance and maybe replace
-Parrot_str_unescape
-
-L<https://trac.parrot.org/parrot/ticket/1628>
-
=item Parrot_load_bytecode_file [experimental]
Load a .pbc file into the interpreter. Experimental.
@@ -349,6 +328,24 @@ is deprecated.
L<http://trac.parrot.org/parrot/ticket/1800>
+=item Non-const STRING* arguments [eligible in 3.1]
+
+Due immutable nature of STRINGs we are changing internal handling to use only
+const STRING pointers. It will improve optimizations possibilities by compiler,
+make parrot const-correct, etc.
+
+Passing of non-const STRING* arguments is deprecated and will be changed to
+const STRING*. This includes (but not limited to) all string API functions,
+VTABLEs, PCC, etc.
+
+L<http://trac.parrot.org/parrot/ticket/1906>
+
+=item Old string_* functions [eligible in 3.0]
+
+The old string_* functions will be removed.
+
+L<http://trac.parrot.org/parrot/ticket/1809>
+
=back
=head1 Compiler tools
View
17 MANIFEST
@@ -289,7 +289,6 @@ config/gen/platform/win32/sysmem.c []
config/gen/platform/win32/threads.h []
config/gen/platform/win32/time.c []
config/init/defaults.pm []
-config/init/headers.pm []
config/init/hints.pm []
config/init/hints/aix.pm []
config/init/hints/cygwin.pm []
@@ -354,6 +353,7 @@ docs/debug.pod [doc]
docs/debugger.pod [doc]
docs/dev/byteorder.pod [doc]
docs/dev/c_functions.pod [doc]
+docs/dev/coverage.pod [doc]
docs/dev/debugging_with_msvc.pod [doc]
docs/dev/events.pod [doc]
docs/dev/headerizer.pod [doc]
@@ -916,6 +916,7 @@ frontend/parrot_debugger/main.c []
frontend/pbc_dump/main.c []
frontend/pbc_dump/packdump.c []
frontend/pbc_merge/main.c []
+include/parrot/api.h [main]include
include/parrot/atomic.h [main]include
include/parrot/atomic/fallback.h [main]include
include/parrot/atomic/gcc_pcc.h [main]include
@@ -979,7 +980,6 @@ include/parrot/settings.h [main]include
include/parrot/stat.h [main]include
include/parrot/string.h [main]include
include/parrot/string_funcs.h [main]include
-include/parrot/string_primitives.h [main]include
include/parrot/sub.h [main]include
include/parrot/sysmem.h [main]include
include/parrot/thr_pthread.h [main]include
@@ -1262,6 +1262,10 @@ src/dynpmc/rational.pmc []
src/dynpmc/rotest.pmc []
src/dynpmc/subproxy.pmc []
src/embed.c []
+src/embed/api.c []
+src/embed/embed_private.h []
+src/embed/pmc.c []
+src/embed/strings.c []
src/exceptions.c []
src/exit.c []
src/extend.c []
@@ -1446,7 +1450,6 @@ src/string/encoding/ucs2.c []
src/string/encoding/ucs4.c []
src/string/encoding/utf16.c []
src/string/encoding/utf8.c []
-src/string/primitives.c []
src/string/unicode.h []
src/sub.c []
src/thread.c []
@@ -1929,6 +1932,7 @@ t/pmc/stringiterator.t [test]
t/pmc/sub.t [test]
t/pmc/sys.t [test]
t/pmc/task.t [test]
+t/pmc/testfile [test]
t/pmc/testlib/annotations.pir [test]
t/pmc/testlib/number.pasm [test]
t/pmc/testlib/packfile_common.pir [test]
@@ -1947,7 +1951,10 @@ t/run/options.t [test]
t/src/README []doc
t/src/atomic.t [test]
t/src/basic.t [test]
+t/src/checkdepend.t [test]
t/src/embed.t [test]
+t/src/embed/pmc.t [test]
+t/src/embed/strings.t [test]
t/src/exit.t [test]
t/src/extend.t [test]
t/src/pointer_array.t [test]
@@ -2006,7 +2013,6 @@ t/steps/gen/makefiles-01.t [test]
t/steps/gen/opengl-01.t [test]
t/steps/gen/platform-01.t [test]
t/steps/init/defaults-01.t [test]
-t/steps/init/headers-01.t [test]
t/steps/init/hints-01.t [test]
t/steps/init/hints/darwin-01.t [test]
t/steps/init/hints/linux-01.t [test]
@@ -2105,12 +2111,12 @@ tools/dev/README []doc
tools/dev/addopstags.pl []
tools/dev/as2c.pl []
tools/dev/bench_op.pir []
-tools/dev/checkdepend.pl []
tools/dev/create_language.pl [devel]
tools/dev/debian_docs.sh []
tools/dev/dump_pbc.pl []
tools/dev/faces.pl []
tools/dev/fetch_languages.pl []
+tools/dev/findhacks.pl []
tools/dev/gen_charset_tables.pl []
tools/dev/gen_class.pl []
tools/dev/gen_makefile.pl [devel]
@@ -2122,6 +2128,7 @@ tools/dev/install_doc_files.pl []
tools/dev/install_files.pl []
tools/dev/lib_deps.pl []
tools/dev/list_unjitted.pl []
+tools/dev/make_cover.pl []
tools/dev/manicheck.pl []
tools/dev/mk_author_map.pl []
tools/dev/mk_inno.pl []
View
2  README.deutsch
@@ -1,4 +1,4 @@
-Parrot-Version 2.10.1
+Parrot-Version 2.11.0
---------------------
Parrot ist lizenziert (C) 2001-2010, Parrot Foundation.
View
6 README.espanol
@@ -1,8 +1,8 @@
LÉASE
------------------------
-Esta es la versión Parrot, 2.10.1
------------------------------
+Esta es la versión Parrot, 2.11.0
+---------------------------------
Parrot Copyright (C) 2001-2010, Parrot Foundation.
@@ -180,4 +180,4 @@ Los siguientes sitios web contienen toda la información que necesitas sobre Par
http://docs.parrot.org/
Que se diviertan,
- El equipo de Parrot.
+ El equipo de Parrot.
View
2  README.polski
@@ -1,4 +1,4 @@
-To jest Parrot, wersja 2.10.1
+To jest Parrot, wersja 2.11.0
-----------------------------
Prawa autorskie (C) Parrota należą do 2001-2010, Parrot Foundation.
View
2  compilers/imcc/Rules.in
@@ -157,6 +157,8 @@ compilers/imcc/main$(O) : \
$(INC_DIR)/imcc.h \
$(INC_DIR)/oplib/ops.h \
$(INC_DIR)/runcore_api.h \
+ $(INC_DIR)/api.h \
+ $(INC_DIR)/longopt.h \
$(PARROT_H_HEADERS)
## SUFFIX OVERRIDE - Warnings (This is generated code)
View
2  compilers/imcc/debug.c
@@ -96,7 +96,7 @@ IMCC_fatal_standalone(PARROT_INTERP, int code, ARGIN(const char *fmt), ...)
va_start(ap, fmt);
imcc_vfprintf(interp, Parrot_io_STDERR(interp), fmt, ap);
va_end(ap);
- Parrot_x_exit(interp, code);
+ Parrot_x_jump_out_error(interp, code);
}
/*
View
17 compilers/imcc/imcc.y
@@ -1315,8 +1315,8 @@ sub:
{
IMCC_INFO(interp)->cur_call->pcc_sub->pragma = $5;
if (!IMCC_INFO(interp)->cur_unit->instructions->symregs[0]->subid) {
- IMCC_INFO(interp)->cur_unit->instructions->symregs[0]->subid = mem_sys_strdup(
- IMCC_INFO(interp)->cur_unit->instructions->symregs[0]->name);
+ IMCC_INFO(interp)->cur_unit->instructions->symregs[0]->subid =
+ IMCC_INFO(interp)->cur_unit->instructions->symregs[0];
}
}
sub_params
@@ -1447,9 +1447,10 @@ subid:
}
| SUBID '(' any_string ')'
{
+ SymReg *r = mk_const(interp, $3, 'S');
$$ = 0;
- IMCC_INFO(interp)->cur_unit->subid = mk_const(interp, $3, 'S');
- IMCC_INFO(interp)->cur_unit->instructions->symregs[0]->subid = str_dup_remove_quotes($3);
+ IMCC_INFO(interp)->cur_unit->subid = r;
+ IMCC_INFO(interp)->cur_unit->instructions->symregs[0]->subid = r;
mem_sys_free($3);
}
;
@@ -2015,6 +2016,13 @@ get_results:
op_assign:
target assign_op var
{ $$ = MK_I(interp, IMCC_INFO(interp)->cur_unit, $2, 2, $1, $3); }
+ | target CONCAT_ASSIGN var
+ {
+ if ($1->set == 'P')
+ $$ = MK_I(interp, IMCC_INFO(interp)->cur_unit, "concat", 2, $1, $3);
+ else
+ $$ = MK_I(interp, IMCC_INFO(interp)->cur_unit, "concat", 3, $1, $1, $3);
+ }
;
assign_op:
@@ -2024,7 +2032,6 @@ assign_op:
| DIV_ASSIGN { $$ = (char *)"div"; }
| MOD_ASSIGN { $$ = (char *)"mod"; }
| FDIV_ASSIGN { $$ = (char *)"fdiv"; }
- | CONCAT_ASSIGN { $$ = (char *)"concat"; }
| BAND_ASSIGN { $$ = (char *)"band"; }
| BOR_ASSIGN { $$ = (char *)"bor"; }
| BXOR_ASSIGN { $$ = (char *)"bxor"; }
View
32 compilers/imcc/imclexer.c
@@ -78,7 +78,6 @@ typedef int flex_int32_t;
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
@@ -109,6 +108,8 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -182,7 +183,15 @@ typedef void* yyscan_t;
/* 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.
@@ -2478,7 +2487,7 @@ static int handle_identifier(PARROT_INTERP, YYSTYPE *valp, ARGIN(const char *id)
-#line 2482 "compilers/imcc/imclexer.c"
+#line 2491 "compilers/imcc/imclexer.c"
#define INITIAL 0
#define emit 1
@@ -2573,10 +2582,6 @@ int yyget_lineno (yyscan_t yyscanner );
void yyset_lineno (int line_number ,yyscan_t yyscanner );
-int yyget_column (yyscan_t yyscanner );
-
-void yyset_column (int column_no ,yyscan_t yyscanner );
-
/* Macros after this point can all be overridden by user definitions in
* section 1.
*/
@@ -2617,7 +2622,12 @@ static int input (yyscan_t yyscanner );
/* 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. */
@@ -2636,7 +2646,7 @@ static int input (yyscan_t yyscanner );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- unsigned n; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -2741,7 +2751,7 @@ YY_DECL
return 0;
}
-#line 2745 "compilers/imcc/imclexer.c"
+#line 2755 "compilers/imcc/imclexer.c"
if ( !yyg->yy_init )
{
@@ -3920,7 +3930,7 @@ YY_RULE_SETUP
#line 717 "compilers/imcc/imcc.l"
ECHO;
YY_BREAK
-#line 3924 "compilers/imcc/imclexer.c"
+#line 3934 "compilers/imcc/imclexer.c"
case YY_STATE_EOF(pod):
case YY_STATE_EOF(cmt1):
case YY_STATE_EOF(cmt2):
@@ -4709,8 +4719,8 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
/** 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 bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @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 yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
View
1,720 compilers/imcc/imcparser.c
864 additions, 856 deletions not shown
View
13 compilers/imcc/imcparser.h
@@ -9,14 +9,15 @@
*/
/* HEADERIZER HFILE: none */
/* HEADERIZER STOP */
-/* A Bison parser, made by GNU Bison 2.4.3. */
+
+/* A Bison parser, made by GNU Bison 2.4.1. */
/* 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, 2001, 2002, 2003, 2004, 2005, 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
@@ -290,7 +291,7 @@
typedef union YYSTYPE
{
-/* Line 1685 of yacc.c */
+/* Line 1676 of yacc.c */
#line 991 "compilers/imcc/imcc.y"
IdList * idlist;
@@ -301,8 +302,8 @@ typedef union YYSTYPE
-/* Line 1685 of yacc.c */
-#line 293 "compilers/imcc/imcparser.h"
+/* Line 1676 of yacc.c */
+#line 294 "compilers/imcc/imcparser.h"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
View
117 compilers/imcc/main.c
@@ -44,7 +44,7 @@ extern int yydebug;
/* HEADERIZER BEGIN: static */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-static void compile_to_bytecode(PARROT_INTERP,
+static PackFile * compile_to_bytecode(PARROT_INTERP,
ARGIN(const char * const sourcefile),
ARGIN_NULLOK(const char * const output_file),
ARGIN(yyscan_t yyscanner))
@@ -89,6 +89,7 @@ PARROT_PURE_FUNCTION
static int is_all_hex_digits(ARGIN(const char *s))
__attribute__nonnull__(1);
+static const struct longopt_opt_decl * Parrot_cmd_options(void);
#define ASSERT_ARGS_compile_to_bytecode __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(sourcefile) \
@@ -113,6 +114,7 @@ static int is_all_hex_digits(ARGIN(const char *s))
, PARROT_ASSERT_ARG(output_file))
#define ASSERT_ARGS_is_all_hex_digits __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(s))
+#define ASSERT_ARGS_Parrot_cmd_options __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: static */
@@ -148,6 +150,60 @@ is_all_hex_digits(ARGIN(const char *s))
/*
+=item C<static const struct longopt_opt_decl * Parrot_cmd_options(void)>
+
+Set up the const struct declaration for cmd_options
+
+=cut
+
+*/
+
+/* TODO: Weed out the options that IMCC doesn't use, and rename this function
+ to something more imcc-ish
+*/
+
+static const struct longopt_opt_decl *
+Parrot_cmd_options(void)
+{
+ ASSERT_ARGS(Parrot_cmd_options)
+ static const struct longopt_opt_decl cmd_options[] = {
+ { '.', '.', (OPTION_flags)0, { "--wait" } },
+ { 'D', 'D', OPTION_optional_FLAG, { "--parrot-debug" } },
+ { 'E', 'E', (OPTION_flags)0, { "--pre-process-only" } },
+ { 'G', 'G', (OPTION_flags)0, { "--no-gc" } },
+ { '\0', OPT_HASH_SEED, OPTION_required_FLAG, { "--hash-seed" } },
+ { 'I', 'I', OPTION_required_FLAG, { "--include" } },
+ { 'L', 'L', OPTION_required_FLAG, { "--library" } },
+ { 'O', 'O', OPTION_optional_FLAG, { "--optimize" } },
+ { 'R', 'R', OPTION_required_FLAG, { "--runcore" } },
+ { 'g', 'g', OPTION_required_FLAG, { "--gc" } },
+ { '\0', OPT_GC_THRESHOLD, OPTION_required_FLAG, { "--gc-threshold" } },
+ { 'V', 'V', (OPTION_flags)0, { "--version" } },
+ { 'X', 'X', OPTION_required_FLAG, { "--dynext" } },
+ { '\0', OPT_DESTROY_FLAG, (OPTION_flags)0,
+ { "--leak-test", "--destroy-at-end" } },
+ { '\0', OPT_GC_DEBUG, (OPTION_flags)0, { "--gc-debug" } },
+ { 'a', 'a', (OPTION_flags)0, { "--pasm" } },
+ { 'c', 'c', (OPTION_flags)0, { "--pbc" } },
+ { 'd', 'd', OPTION_optional_FLAG, { "--imcc-debug" } },
+ { '\0', OPT_HELP_DEBUG, (OPTION_flags)0, { "--help-debug" } },
+ { 'h', 'h', (OPTION_flags)0, { "--help" } },
+ { 'o', 'o', OPTION_required_FLAG, { "--output" } },
+ { '\0', OPT_PBC_OUTPUT, (OPTION_flags)0, { "--output-pbc" } },
+ { 'r', 'r', (OPTION_flags)0, { "--run-pbc" } },
+ { '\0', OPT_RUNTIME_PREFIX, (OPTION_flags)0, { "--runtime-prefix" } },
+ { 't', 't', OPTION_optional_FLAG, { "--trace" } },
+ { 'v', 'v', (OPTION_flags)0, { "--verbose" } },
+ { 'w', 'w', (OPTION_flags)0, { "--warnings" } },
+ { 'y', 'y', (OPTION_flags)0, { "--yydebug" } },
+ { 0, 0, (OPTION_flags)0, { NULL } }
+ };
+ return cmd_options;
+}
+
+
+/*
+
=item C<static void imcc_parseflags(PARROT_INTERP, int argc, const char **argv)>
Parse flags ans set approptiate state(s)
@@ -165,7 +221,7 @@ imcc_parseflags(PARROT_INTERP, int argc, ARGIN(const char **argv))
/* default state: run pbc */
SET_STATE_RUN_PBC(interp);
- while (longopt_get(interp, argc, argv, Parrot_cmd_options(), &opt) > 0) {
+ while (longopt_get(argc, argv, Parrot_cmd_options(), &opt) > 0) {
switch (opt.opt_id) {
case 'd':
if (opt.opt_arg && is_all_hex_digits(opt.opt_arg)) {
@@ -522,7 +578,7 @@ determine_output_file_type(PARROT_INTERP, ARGIN(const char *output_file))
/*
-=item C<static void compile_to_bytecode(PARROT_INTERP, const char * const
+=item C<static PackFile * compile_to_bytecode(PARROT_INTERP, const char * const
sourcefile, const char * const output_file, yyscan_t yyscanner)>
Compile source code into bytecode (or die trying).
@@ -531,7 +587,7 @@ Compile source code into bytecode (or die trying).
*/
-static void
+static PackFile *
compile_to_bytecode(PARROT_INTERP,
ARGIN(const char * const sourcefile),
ARGIN_NULLOK(const char * const output_file),
@@ -571,7 +627,9 @@ compile_to_bytecode(PARROT_INTERP,
fprintf(stderr, "error:imcc:%s", error_str);
IMCC_print_inc(interp);
Parrot_str_free_cstring(error_str);
- Parrot_x_exit(interp, IMCC_FATAL_EXCEPTION);
+
+ imc_cleanup(interp, yyscanner);
+ Parrot_x_jump_out_error(interp, IMCC_FATAL_EXCEPTION);
}
imc_cleanup(interp, yyscanner);
@@ -581,12 +639,34 @@ compile_to_bytecode(PARROT_INTERP,
IMCC_info(interp, 1, "%ld lines compiled.\n", IMCC_INFO(interp)->line);
if (per_pbc && !IMCC_INFO(interp)->write_pbc)
PackFile_fixup_subs(interp, PBC_POSTCOMP, NULL);
+ return pf;
+}
+
+/*
+
+=item C<int imcc_run_api(PMC * interp_pmc, const char *sourcefile, int argc,
+const char **argv, PMC **pbcpmc)>
+
+This is a wrapper around C<imcc_run> function in which the input parameter is a
+PMC interpreter.
+
+=cut
+
+*/
+
+PARROT_API
+int
+imcc_run_api(ARGMOD(PMC * interp_pmc), ARGIN(const char *sourcefile), int argc,
+ ARGIN(const char **argv), ARGOUT(PMC **pbcpmc))
+{
+ Interp * interp = (Interp *)VTABLE_get_pointer(NULL, interp_pmc);
+ return imcc_run(interp, sourcefile, argc, argv, pbcpmc);
}
/*
=item C<int imcc_run(PARROT_INTERP, const char *sourcefile, int argc, const char
-**argv)>
+**argv, PMC **pbcpmc)>
Entry point of IMCC, as invoked by Parrot's main function.
Compile source code (if required), write bytecode file (if required)
@@ -598,10 +678,12 @@ and run. This function always returns 0.
int
imcc_run(PARROT_INTERP, ARGIN(const char *sourcefile), int argc,
- ARGIN(const char **argv))
+ ARGIN(const char **argv), ARGOUT(PMC **pbcpmc))
{
yyscan_t yyscanner;
const char * const output_file = interp->output_file;
+ PackFile * pf_raw = NULL;
+ *pbcpmc = PMCNULL;
imcc_parseflags(interp, argc, argv);
@@ -644,12 +726,13 @@ imcc_run(PARROT_INTERP, ARGIN(const char *sourcefile), int argc,
/* If the input file is Parrot bytecode, then we simply read it
into a packfile, which Parrot then loads */
if (STATE_LOAD_PBC(interp)) {
- const int loaded = Parrot_load_bytecode_file(interp, sourcefile);
- if (!loaded)
+ pf_raw = Parrot_pbc_read(interp, sourcefile, 0);
+ if (!pf_raw)
IMCC_fatal_standalone(interp, 1, "main: Packfile loading failed\n");
+ Parrot_pbc_load(interp, pf_raw);
}
else
- compile_to_bytecode(interp, sourcefile, output_file, yyscanner);
+ pf_raw = compile_to_bytecode(interp, sourcefile, output_file, yyscanner);
/* Produce a PBC output file, if one was requested */
if (STATE_WRITE_PBC(interp)) {
@@ -661,13 +744,11 @@ imcc_run(PARROT_INTERP, ARGIN(const char *sourcefile), int argc,
/* If necessary, load the file written above */
if (STATE_RUN_FROM_FILE(interp) && !STREQ(output_file, "-")) {
- PackFile *pf;
-
IMCC_info(interp, 1, "Loading %s\n", output_file);
- pf = Parrot_pbc_read(interp, output_file, 0);
- if (!pf)
+ pf_raw = Parrot_pbc_read(interp, output_file, 0);
+ if (!pf_raw)
IMCC_fatal_standalone(interp, 1, "Packfile loading failed\n");
- Parrot_pbc_load(interp, pf);
+ Parrot_pbc_load(interp, pf_raw);
SET_STATE_LOAD_PBC(interp);
}
}
@@ -685,6 +766,12 @@ imcc_run(PARROT_INTERP, ARGIN(const char *sourcefile), int argc,
yylex_destroy(yyscanner);
+ if (pf_raw) {
+ PMC * const _pbcpmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, _pbcpmc, pf_raw);
+ *pbcpmc = _pbcpmc;
+ }
+
/* should the bytecode be run */
if (STATE_RUN_PBC(interp))
return 1;
View
75 compilers/imcc/pbc.c
@@ -778,7 +778,7 @@ find_sub_by_subid(PARROT_INTERP, ARGIN(const char *lookup),
const SymReg * const r = s->unit->instructions->symregs[0];
/* if subid matches - ok */
- if (r && (r->subid && (strcmp(r->subid, lookup) == 0)))
+ if (r && (r->subid && (strcmp(r->subid->name, lookup) == 0)))
return s;
*pc += s->size;
@@ -916,73 +916,22 @@ IMCC_string_from_reg(PARROT_INTERP, ARGIN(const SymReg *r))
if (r->type & VT_ENCODED) {
/*
* the lexer parses: foo:"string"
- * get first part as charset, rest as string
+ * get first part as encoding, rest as string
*/
- STRING *s;
- const STR_VTABLE *s_encoding;
- const STR_VTABLE *src_encoding;
#define MAX_NAME 31
- char charset_name[MAX_NAME + 1];
char encoding_name[MAX_NAME + 1];
- char * p = strchr(r->name, '"');
- char * p2 = strchr(r->name, ':');
+ char * p = strchr(buf, '"');
+ size_t len;
+
PARROT_ASSERT(p && p[-1] == ':');
- if (p2 < p -1) {
- /* Handle the old 'encoding:charset' format by trying
- * encoding as well as charset */
- strncpy(encoding_name, buf, p2 - buf);
- encoding_name[p2-buf] = '\0';
- strncpy(charset_name, p2 +1, p - p2 - 2);
- charset_name[p- p2 - 2] = '\0';
- /*fprintf(stderr, "%s:%s\n", charset_name, encoding_name);*/
- s_encoding = Parrot_find_encoding(interp, encoding_name);
- if (s_encoding == NULL) {
- s_encoding = Parrot_find_encoding(interp, charset_name);
- if (s_encoding == NULL)
- Parrot_ex_throw_from_c_args(interp, NULL,
- EXCEPTION_INVALID_STRING_REPRESENTATION,
- "Unknown encoding '%s:%s'",
- encoding_name, charset_name);
- }
- }
- else {
- strncpy(encoding_name, buf, p - buf - 1);
- encoding_name[p - buf - 1] = '\0';
- charset_name[0] = '\0';
- /*fprintf(stderr, "%s\n", encoding_name);*/
- s_encoding = Parrot_find_encoding(interp, encoding_name);
- if (s_encoding == NULL)
- Parrot_ex_throw_from_c_args(interp, NULL,
- EXCEPTION_INVALID_STRING_REPRESENTATION,
- "Unknown encoding '%s'", encoding_name);
- }
- if (s_encoding->max_bytes_per_codepoint == 1)
- src_encoding = s_encoding;
- else
- src_encoding = Parrot_utf8_encoding_ptr;
- /* past delim */
- buf = p + 1;
- if (strcmp(charset_name, "unicode") == 0 && strcmp(encoding_name, "utf8") == 0) {
- /* Special case needed for backward compatibility with utf8 literals
- * using \xHH\xHH byte sequences */
- s = Parrot_str_unescape(interp, buf, '"', "utf8:unicode");
- }
- else {
- p = buf;
- p2 = strchr(buf, '"');
- while (p2 != NULL) {
- p = p2;
- p2 = strchr(p + 1, '"');
- }
- {
- STRING * aux = Parrot_str_new_init(interp, buf, p - buf,
- src_encoding, 0);
- s = Parrot_str_unescape_string(interp, aux,
- s_encoding, PObj_constant_FLAG);
- }
- }
- return s;
+ len = p - buf - 1;
+ if (len > MAX_NAME)
+ len = MAX_NAME;
+ memcpy(encoding_name, buf, len);
+ encoding_name[len] = '\0';
+
+ return Parrot_str_unescape(interp, p + 1, '"', encoding_name);
}
else if (*buf == '"') {
buf++;
View
20 compilers/imcc/pcc.c
@@ -438,13 +438,16 @@ expand_pcc_sub(PARROT_INTERP, ARGMOD(IMC_Unit *unit), ARGIN(Instruction *ins))
/* check if there is a return */
if (unit->last_ins->type & (ITPCCSUB)
- && unit->last_ins->symreg_count == 1
- && (sub = unit->last_ins->symregs[0])
- && sub->pcc_sub
- && !sub->pcc_sub->object
- /* s. src/inter_call.c:119 */
- && sub->pcc_sub->tailcall)
- return;
+ && unit->last_ins->symreg_count == 1) {
+ sub = unit->last_ins->symregs[0];
+
+ if (sub->pcc_sub
+ && !sub->pcc_sub->object
+ /* s. src/inter_call.c:119 */
+ && sub->pcc_sub->tailcall) {
+ return;
+ }
+ }
if (unit->last_ins->type != (ITPCCSUB|ITLABEL)
&& STRNEQ(unit->last_ins->opname, "ret")
@@ -860,6 +863,9 @@ expand_pcc_sub_call(PARROT_INTERP, ARGMOD(IMC_Unit *unit), ARGMOD(Instruction *i
}
arg = sub->pcc_sub->sub;
+ if (arg == NULL)
+ Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_UNEXPECTED_NULL,
+ "Subroutine is not defined");
if (meth_call) {
meth = arg;
View
1  compilers/imcc/symreg.c
@@ -1309,7 +1309,6 @@ free_sym(ARGMOD(SymReg *r))
}
}
- mem_sys_free(r->subid);
mem_sys_free(r->name);
mem_sys_free(r);
}
View
2  compilers/imcc/symreg.h
@@ -42,7 +42,7 @@ enum USAGE {
typedef struct _SymReg {
char *name;
- char *subid;
+ struct _SymReg *subid;
struct _SymReg *nextkey; /* keys */
struct _SymReg *reg; /* key->register for VTREGKEYs */
struct pcc_sub_t *pcc_sub; /* PCC subroutine */
View
48 compilers/pct/src/PAST/Compiler.pir
@@ -461,12 +461,12 @@ third and subsequent children can be any value they wish.
npost = self.'as_post'(npast, 'rtype'=>'~')
$S1 = npost
ops.'push'(npost)
- concat $S0, ' :named('
- concat $S0, $S1
- concat $S0, ')'
+ $S0 = concat $S0, ' :named('
+ $S0 = concat $S0, $S1
+ $S0 = concat $S0, ')'
goto named_done
flat_named:
- concat $S0, ' :named :flat'
+ $S0 = concat $S0, ' :named :flat'
named_done:
push namedargs, $S0
goto iter_rtype
@@ -477,7 +477,7 @@ third and subsequent children can be any value they wish.
goto iter_rtype
flat_pos:
$S0 = cpost
- concat $S0, ' :flat'
+ $S0 = concat $S0, ' :flat'
push posargs, $S0
iter_rtype:
unless sigidx < sigmax goto iter_loop
@@ -503,10 +503,10 @@ third and subsequent children can be any value they wish.
ops.'push'(cpost)
# now construct the keyed PMC
$S0 = cpost
- concat $S0, '['
+ $S0 = concat $S0, '['
$S1 = kpost
- concat $S0, $S1
- concat $S0, ']'
+ $S0 = concat $S0, $S1
+ $S0 = concat $S0, ']'
push posargs, $S0
goto iter_rtype
iter_end:
@@ -656,7 +656,7 @@ nodes of type C<PAST::Stmts>.
$P0 = node.'list'()
$I0 = elements $P0
$S0 = repeat 'v', $I0
- concat $S0, rtype
+ $S0 = concat $S0, rtype
ops = self.'post_children'(node, 'signature'=>$S0)
$P0 = ops[-1]
ops.'result'($P0)
@@ -698,7 +698,7 @@ Return the POST representation of a C<PAST::Control>.
$P0 = node.'list'()
$I0 = elements $P0
$S0 = repeat 'v', $I0
- concat $S0, rtype
+ $S0 = concat $S0, rtype
ops.'push_pirop'('.local pmc exception')
ops.'push_pirop'('.get_results (exception)')
children = self.'post_children'(node, 'signature'=>$S0)
@@ -856,20 +856,20 @@ Return the POST representation of a C<PAST::Block>.
blockreg = self.'uniquereg'('P')
if ns goto block_ns
blockref = concat ".const 'Sub' ", blockreg
- concat blockref, ' = '
+ blockref = concat blockref, ' = '
$P0 = bpost.'subid'()
$S0 = self.'escape'($P0)
- concat blockref, $S0
+ blockref = concat blockref, $S0
goto have_blockref
block_ns:
$P0 = get_hll_global ['POST'], 'Compiler'
blockref = concat 'get_hll_global ', blockreg
$S0 = $P0.'key_pir'(ns)
- concat blockref, ', '
- concat blockref, $S0
+ blockref = concat blockref, ', '
+ blockref = concat blockref, $S0
$S0 = self.'escape'(name)
- concat blockref, ', '
- concat blockref, $S0
+ blockref = concat blockref, ', '
+ blockref = concat blockref, $S0
have_blockref:
## determine the outer POST::Sub for the new one
@@ -941,7 +941,7 @@ Return the POST representation of a C<PAST::Block>.
$P0 = node.'list'()
$I0 = elements $P0
$S0 = repeat 'v', $I0
- concat $S0, '*'
+ $S0 = concat $S0, '*'
## convert children to post
.local pmc ops, retval
ops = self.'post_children'(node, 'signature'=>$S0)
@@ -2085,12 +2085,12 @@ attribute.
if null files goto scope_error_3
$S0 = files
sourceline = concat ' (', $S0
- concat sourceline, ':'
+ sourceline = concat sourceline, ':'
$I0 = self.'lineof'(source, pos)
inc $I0
$S0 = $I0
- concat sourceline, $S0
- concat sourceline, ')'
+ sourceline = concat sourceline, $S0
+ sourceline = concat sourceline, ')'
scope_error_3:
.tailcall self.'panic'("Symbol '", name, "' not predeclared", scope, " in ", blockname, sourceline)
.end
@@ -2357,8 +2357,8 @@ attribute.
$S0 = basepost.'result'()
name = concat $S0, '['
$S0 = keypost.'result'()
- concat name, $S0
- concat name, ']'
+ name = concat name, $S0
+ name = concat name, ']'
.local pmc fetchop, storeop
$P0 = get_hll_global ['POST'], 'Op'
if bindpost goto keyed_bind
@@ -2570,10 +2570,10 @@ to have a PMC generated containing the constant value.
.local string blockreg, blockref
blockreg = self.'uniquereg'('P')
blockref = concat ".const 'Sub' ", blockreg
- concat blockref, ' = '
+ blockref = concat blockref, ' = '
$P0 = value.'subid'()
$S0 = self.'escape'($P0)
- concat blockref, $S0
+ blockref = concat blockref, $S0
ops.'push_pirop'(blockref)
ops.'result'(blockreg)
.return (ops)
View
2  compilers/pct/src/PCT/Dumper.pir
@@ -40,7 +40,7 @@ it should be. No, I'm not proud of it, but it works for now.
$I0 = length str
if $I0 < 48 goto have_str
str = substr str, 0, 48
- str .= '...'
+ str = concat str, '...'
have_str:
str = escape str
View
2  compilers/pct/src/PCT/Grammar.pir
@@ -205,7 +205,7 @@ to enforce whitespace between lexical words.
goto literal_xdo_char_loop
literal_xdo_char_end:
$S1 = chr codepoint
- concat literal, $S1
+ literal = concat literal, $S1
unless isbracketed goto literal_xdo_end
if $S0 == ']' goto literal_xdo_end
if $S0 != ',' goto fail
View
4 compilers/pct/src/PCT/HLLCompiler.pir
@@ -646,7 +646,7 @@ specifies the encoding to use for the input (e.g., "utf8").
code = stdin.'readline_interactive'(prompt)
if null code goto interactive_end
unless code goto interactive_loop
- concat code, "\n"
+ code = concat code, "\n"
push_eh interactive_trap
$P0 = self.'eval'(code, adverbs :flat :named)
pop_eh
@@ -754,7 +754,7 @@ options are passed to the evaluator.
ifh.'encoding'(encoding)
iter_loop_1:
$S0 = ifh.'readall'(iname)
- code .= $S0
+ code = concat code, $S0
ifh.'close'()
goto iter_loop
iter_end:
View
14 compilers/pct/src/POST/Compiler.pir
@@ -67,15 +67,15 @@ For example, C<key('Foo', 'Bar')> returns C<["Foo";"Bar"]>.
if $I0 goto args_array
args_string:
$S0 = self.'escape'($P0)
- concat out, sep
- concat out, $S0
+ out = concat out, sep
+ out = concat out, $S0
sep = ';'
goto args_loop
args_array:
splice args, $P0, 0, 0
goto args_loop
args_done:
- concat out, ']'
+ out = concat out, ']'
.return (out)
.end
@@ -169,7 +169,7 @@ Return pir for an operation node.
.local string result
result = node.'result'()
unless result goto have_result
- concat result, ' = '
+ result = concat result, ' = '
have_result:
## get list of arguments to operation
@@ -216,7 +216,7 @@ Return pir for an operation node.
pirop_inline:
fmt = node.'inline'()
- concat fmt, "\n"
+ fmt = concat fmt, "\n"
result = node.'result'()
goto pirop_emit
@@ -297,8 +297,8 @@ the sub.
outername = outerpost.'subid'()
$S0 = self.'escape'(outername)
pirflags = concat pirflags, ' :outer('
- concat pirflags, $S0
- concat pirflags, ')'
+ pirflags = concat pirflags, $S0
+ pirflags = concat pirflags, ')'
pirflags_done:
.local pmc outerhll, hll
View
6 compilers/pge/PGE/Exp.pir
@@ -140,8 +140,8 @@ tree as a PIR code object that can be compiled.
if null $P0 goto have_subid
$S0 = escape($P0)
pirflags = concat pirflags, ' :subid('
- concat pirflags, $S0
- concat pirflags, ')'
+ pirflags = concat pirflags, $S0
+ pirflags = concat pirflags, ')'
have_subid:
## Perform reduction/optimization on the
@@ -444,7 +444,7 @@ tree as a PIR code object that can be compiled.
if $I0 != $I1 goto concat_lit_shift
$S0 = exp0.'ast'()
$S1 = exp1.'ast'()
- concat $S0, $S1
+ $S0 = concat $S0, $S1
exp0.'!make'($S0)
goto concat_lit_loop
concat_lit_shift:
View
4 compilers/pge/PGE/Perl6Regex.pir
@@ -258,7 +258,7 @@ and someday may be refactored to a different location.
goto scan_xco_char_digits
scan_xco_char_end:
$S1 = chr decnum
- concat literal, $S1
+ literal = concat literal, $S1
unless isbracketed goto scan_xco_end
pos = find_not_cclass .CCLASS_WHITESPACE, target, pos, lastpos
$S0 = substr target, pos, 1
@@ -1329,7 +1329,7 @@ Parse a modifier.
mob['isnegated'] = 1
assert_pos:
mob['iszerowidth'] = 1
- concat close, '>'
+ close = concat close, '>'
inc len
have_close:
$I0 = index target, close, pos
View
2  compilers/tge/TGE/Compiler.pir
@@ -283,7 +283,7 @@ Compile a grammar from a source string.
goto have_infile
quote_infile:
infile = concat '"', infile
- concat infile, '"'
+ infile = concat infile, '"'
have_infile:
$P0 = new 'String'
$P0 = infile
View
21 config/auto/coverage.pm
@@ -43,14 +43,31 @@ sub runstep {
my ( $self, $conf ) = @_;
my %utils_needed = map { $_ => undef } qw( gcov gcov2perl cover );
+ my @utils_lacking;
foreach my $util (keys %utils_needed) {
- $utils_needed{$util} = which($util);
+ my $which_util = which($util);
+ if ($which_util) {
+ $utils_needed{$util} = which($util);
+ }
+ else {
+ $utils_needed{$util} =
+ '$(PERL) -e "print \"'.$util.' needed but not found.\\n\"; exit 1;"';
+ push @utils_lacking, $util;
+ }
}
- my @utils_lacking = grep { ! defined $utils_needed{$_} } keys %utils_needed;
if (@utils_lacking) {
+ $utils_needed{'have_cover'} =
+ '$(PERL) -e "print \"The following tools are needed for coverage testing: '.
+ join(', ',@utils_lacking).
+ '\\n\"; print \"Please install Devel::Cover.\\n\"; exit 1;"';
$self->set_result("lacking @utils_lacking");
+ $conf->data->set(
+ "has_coverage_tools" => 0,
+ %utils_needed,
+ );
}
else {
+ $utils_needed{'have_cover'} = 'exit 0';
$conf->data->set(
"has_coverage_tools" => 1,
%utils_needed,
View
2  config/auto/gc.pm
@@ -44,7 +44,7 @@ sub runstep {
$conf->data->set(
TEMP_gc_c => <<"EOF",
-src/gc/alloc_resources\$(O): \$(GENERAL_H_FILES) src/gc/alloc_resources.c
+src/gc/alloc_resources\$(O): \$(GEN_HEADERS) src/gc/alloc_resources.c
EOF
TEMP_gc_o => "src/gc/alloc_resources\$(O)",
gc_flag => '',
View
1  config/auto/ipv6/test.in
@@ -1,4 +1,5 @@
/*
+
Copyright (C) 2010, Parrot Foundation.
*/
View
108 config/auto/pmc.pm
@@ -71,6 +71,14 @@ PMC2C_FILES = \\
lib/Parrot/Pmc2c/PMC/RO.pm
END
+ my %universal_deps;
+ while (<DATA>) {
+ next if /^#/;
+ next if /^\s*$/;
+ chomp;
+ $universal_deps{$_} = 1;
+ }
+
for my $pmc ( split( /\s+/, $pmc_list ) ) {
$pmc =~ s/\.pmc$//;
@@ -85,18 +93,40 @@ END
# add dependencies that result from METHOD usage.
my $pmc_fname = catfile('src', 'pmc', "$pmc.pmc");
my $pccmethod_depend = '';
+ my %o_deps = %universal_deps;
+ $o_deps{"src/pmc/$pmc.c"} = 1;
+ $o_deps{"src/pmc/$pmc.str"} = 1;
+ $o_deps{"include/pmc/pmc_$pmc.h"} = 1;
+
if (contains_pccmethod($pmc_fname)) {
$pccmethod_depend = 'lib/Parrot/Pmc2c/PCCMETHOD.pm';
+ $o_deps{"include/pmc/pmc_fixedintegerarray.h"} = 1;
if ($pmc ne 'fixedintegerarray') {
$pccmethod_depend .= ' include/pmc/pmc_fixedintegerarray.h';
}
}
+
my $include_headers = get_includes($pmc_fname);
my $cc_shared = $conf->data->get('cc_shared');
my $cc_o_out = $conf->data->get('cc_o_out');
my $warnings = $conf->data->get('ccwarn');
my $optimize = $conf->data->get('optimize');
+ foreach my $header (split ' ', $parent_headers) {
+ $o_deps{$header} = 1;
+ }
+ foreach my $header (split ' ', $include_headers) {
+ $o_deps{$header} = 1;
+ }
+
+ # includes of includes
+ # (cheat. The right way to handle this is to do what
+ # checkdepend.t does.)
+ if (exists $o_deps{'include/parrot/oplib/core_ops.h'} ) {
+ $o_deps{'include/parrot/runcore_api.h'} = 1;
+ }
+
+ my $o_deps = " " . join(" \\\n ", keys %o_deps);
$TEMP_pmc_build .= <<END
src/pmc/$pmc.c : src/pmc/$pmc.dump
\t\$(PMC2CC) src/pmc/$pmc.pmc
@@ -107,10 +137,8 @@ src/pmc/$pmc.dump : vtable.dump $parent_dumps src/pmc/$pmc.pmc \$(PMC2C_FILES) $
include/pmc/pmc_$pmc.h: src/pmc/$pmc.c
## SUFFIX OVERRIDE -Warnings
-src/pmc/$pmc\$(O): include/pmc/pmc_$pmc.h src/pmc/$pmc.str \$(NONGEN_HEADERS) \\
- $parent_headers $include_headers include/pmc/pmc_continuation.h \\
- include/pmc/pmc_callcontext.h include/pmc/pmc_fixedintegerarray.h \\
- src/pmc/$pmc.c
+src/pmc/$pmc\$(O): \\
+$o_deps
\t\$(CC) \$(CFLAGS) $optimize $cc_shared $warnings -I\$(\@D) $cc_o_out\$@ -c src/pmc/$pmc.c
END
@@ -289,7 +317,7 @@ sub contains_pccmethod {
local $_;
while (<$fh>) {
- next unless /METHOD/;
+ next unless /\bMETHOD\b/;
return 1;
}
@@ -304,15 +332,19 @@ sub get_includes {
my @retval;
local $_;
while (<$fh>) {
- next unless /^\s*#include\s+["<](.*)[">]\s+$/;
+ next unless /^\s*#include\s+"(.*)"\s+$/;
my $include = $1;
- if ($include =~ m{^(\.|parrot/)}) { # main parrot include dir
+ if ($include =~ m{^parrot}) { # main parrot include dir
+ next if $include eq "parrot/parrot.h"; # already implicit everywhere.
+ next if $include eq "parrot/io.h"; # already implicit everywhere.
$include = "include/" . $include;
} elsif ($include =~ m/^pmc_|\.str$/) { # local pmc header
$include = "src/pmc/" . $include;
- } elsif ($include =~ m/^pmc\/pmc_|\.h$/) { # local pmc header
+ } elsif ($include =~ m/^pmc\/pmc_/) { # local pmc header
$include = "include/" . $include;
- } # else it's probably a system header, don't depend on it.
+ } elsif ($include =~ m{^\.\./}) { # relative to include/ dir...
+ $include =~ s{^\.\./}{};
+ }
push @retval, $include;
}
@@ -346,6 +378,64 @@ sub get_kids_for_parent {
1;
+__DATA__
+include/parrot/cclass.h
+include/parrot/multidispatch.h
+include/parrot/call.h
+include/parrot/exit.h
+include/parrot/pobj.h
+include/parrot/extend_vtable.h
+include/parrot/memory.h
+include/parrot/key.h
+include/parrot/oo.h
+include/parrot/feature.h
+include/parrot/oplib.h
+include/parrot/library.h
+include/parrot/thread.h
+include/parrot/string.h
+include/parrot/settings.h
+include/parrot/namespace.h
+include/parrot/extend.h
+include/parrot/pbcversion.h
+include/parrot/core_types.h
+include/parrot/interpreter.h
+include/parrot/io.h
+include/parrot/context.h
+include/parrot/parrot.h
+include/parrot/dynext.h
+include/parrot/hash.h
+include/parrot/enums.h
+include/parrot/encoding.h
+include/parrot/vtable.h
+include/parrot/scheduler.h
+include/parrot/pmc.h
+include/parrot/datatypes.h
+include/parrot/core_pmcs.h
+include/parrot/misc.h
+include/parrot/sub.h
+include/parrot/platform.h
+include/parrot/pmc_freeze.h
+include/parrot/global_setup.h
+include/parrot/gc_api.h
+include/parrot/nci.h
+include/parrot/vtables.h
+include/parrot/has_header.h
+include/parrot/warnings.h
+include/parrot/op.h
+include/parrot/platform_limits.h
+include/parrot/stat.h
+include/parrot/debugger.h
+include/parrot/caches.h
+include/parrot/config.h
+include/parrot/platform_interface.h
+include/parrot/hll.h
+include/parrot/packfile.h
+include/parrot/exceptions.h
+include/parrot/string_funcs.h
+include/parrot/compiler.h
+include/pmc/pmc_callcontext.h
+include/pmc/pmc_continuation.h
+
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
View
290 config/gen/makefiles/root.in
@@ -57,7 +57,7 @@ BUILD_TOOLS_DIR = tools/build
DEV_TOOLS_DIR = tools/dev
# directory for header files
-INC_DIR = @inc@
+INC_DIR = include/parrot
# directory with Parrot modules
LIBRARY_DIR = runtime/parrot/library
@@ -118,9 +118,6 @@ LD_SHARE_FLAGS = @ld_share_flags@
LD_LOAD_FLAGS = @ld_load_flags@
LINKARGS = $(LDFLAGS) $(LD_LOAD_FLAGS) @libparrot_ldflags@ @icu_shared@ @libs@
-# generated by config/init/headers.pm
-NONGEN_HEADERS = @TEMP_nongen_headers@
-
# The headerizer
HEADERIZER = $(PERL) $(DEV_TOOLS_DIR)/headerizer.pl
@@ -371,7 +368,6 @@ PARROT_H_HEADERS = \
$(INC_DIR)/datatypes.h \
$(INC_DIR)/encoding.h \
$(INC_DIR)/string.h \
- $(INC_DIR)/string_primitives.h \
$(INC_DIR)/hash.h \
$(INC_DIR)/pmc_freeze.h \
$(INC_DIR)/vtable.h \
@@ -393,7 +389,6 @@ PARROT_H_HEADERS = \
$(INC_DIR)/nci.h \
$(INC_DIR)/thread.h \
$(INC_DIR)/scheduler.h \
- $(INC_DIR)/longopt.h \
$(INC_DIR)/oo.h \
$(INC_DIR)/vtables.h \
$(INC_DIR)/multidispatch.h \
@@ -414,10 +409,6 @@ PARROT_H_HEADERS = \
$(INC_DIR)/cclass.h \
include/pmc/pmc_callcontext.h
-# generated list of header files
-GENERAL_H_FILES = $(NONGEN_HEADERS) $(GEN_HEADERS) \
-
-
CLASS_PMC_FILES = @TEMP_pmc_classes_pmc@
CLASS_O_FILES = @TEMP_pmc_classes_o@
CLASS_STR_FILES = @TEMP_pmc_classes_str@
@@ -456,6 +447,9 @@ INTERP_O_FILES = \
src/debug$(O) \
src/dynext$(O) \
src/embed$(O) \
+ src/embed/api$(O) \
+ src/embed/strings$(O) \
+ src/embed/pmc$(O) \
src/string/encoding$(O) \
src/exceptions$(O) \
src/exit$(O) \
@@ -486,7 +480,6 @@ INTERP_O_FILES = \
src/library$(O) \
src/list$(O) \
src/pointer_array$(O) \
- src/longopt$(O) \
src/misc$(O) \
src/multidispatch$(O) \
src/namespace$(O) \
@@ -505,7 +498,6 @@ INTERP_O_FILES = \
src/scheduler$(O) \
src/spf_render$(O) \
src/spf_vtable$(O) \
- src/string/primitives$(O) \
src/sub$(O) \
src/thread$(O) \
src/runcore/trace$(O) \
@@ -515,6 +507,7 @@ INTERP_O_FILES = \
src/packfile/api$(O) \
src/packfile/output$(O) \
src/packfile/pf_items$(O) \
+ src/longopt$(O) \
@TEMP_atomic_o@ \
@TEMP_gc_o@ \
#IF(platform_asm): src/platform_asm$(O) \
@@ -827,11 +820,13 @@ help :
@echo " apilist: Show list of PARROT_API functions"
@echo " exportlist: Show list of PARROT_EXPORT functions"
@echo " malloclist: Show list of PARROT_MALLOC functions"
- @echo " cover: Run test suite coverage analysis."
+ @echo " quickcover: Run test suite coverage analysis (core)."
+ @echo " cover: Run test suite coverage analysis (full)."
@echo " tags-vi: Create tags for the vi editor."
@echo " tags-emacs: Create tags for the Emacs editor."
@echo " perlcritic: Check Perl code with Perl::Critic."
- @echo " bootstrap-ops: Generate C code from .ops files."
+ @echo " bootstrap-ops: Generate C code from .ops files. Requires already built parrot."
+ @echo " bootstrap-nci Generate C code for NCI. Requires already built parrot."
@echo ""
@echo "Release:"
@echo " release: Create a tarball."
@@ -859,10 +854,10 @@ runtime/parrot/include/config.fpmc : myconfig config_lib.pir \
$(MINIPARROT) -Iruntime/parrot/include config_lib.pir > $@
$(PARROT) : frontend/parrot/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
- src/parrot_config$(O) \
+ src/parrot_config$(O) src/longopt$(O) \
$(MINIPARROT)
$(LINK) @ld_out@$@ \
- frontend/parrot/main$(O) src/parrot_config$(O) \
+ frontend/parrot/main$(O) src/parrot_config$(O) src/longopt$(O) \
@rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
@@ -886,17 +881,17 @@ $(PARROT_CONFIG) : $(DEV_TOOLS_DIR)/parrot-config.pir $(PARROT) $(PBC_TO_EXE)
$(PARROT) -o parrot_config.pbc $(DEV_TOOLS_DIR)/parrot-config.pir
$(PARROT) pbc_to_exe.pbc parrot_config.pbc
-$(MINIPARROT) : frontend/parrot/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
- src/null_config$(O)
- $(LINK) @ld_out@$@ frontend/parrot/main$(O) src/null_config$(O) \
+$(MINIPARROT) : frontend/parrot/main$(O) include/parrot/api.h include/parrot/longopt.h $(LIBPARROT) \
+ src/null_config$(O) src/longopt$(O)
+ $(LINK) @ld_out@$@ frontend/parrot/main$(O) src/null_config$(O) src/longopt$(O) \
@rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
$(INSTALLABLEPARROT) : frontend/parrot/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
- src/install_config$(O) \
+ src/install_config$(O) src/longopt$(O) \
$(PARROT)
$(LINK) @ld_out@$@ \
- frontend/parrot/main$(O) src/install_config$(O) \
+ frontend/parrot/main$(O) src/install_config$(O) src/longopt$(O) \
@rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
@@ -923,11 +918,35 @@ install_config.fpmc : myconfig config_lib.pir $(PARROT)
@echo "Invoking Parrot to generate install_config.fpmc"
$(PARROT) config_lib.pir --install > $@
-src/parrot_config$(O) : $(PARROT_H_HEADERS) src/parrot_config.c
+src/parrot_config$(O) : \
+ $(INC_DIR)/api.h \
+ $(INC_DIR)/compiler.h \
+ $(INC_DIR)/config.h \
+ $(INC_DIR)/core_types.h \
+ $(INC_DIR)/feature.h \
+ $(INC_DIR)/has_header.h \
+ $(INC_DIR)/platform_limits.h \
+ src/parrot_config.c
-src/install_config$(O) : $(PARROT_H_HEADERS) src/install_config.c
+src/install_config$(O) : \
+ $(INC_DIR)/api.h \
+ $(INC_DIR)/compiler.h \
+ $(INC_DIR)/config.h \
+ $(INC_DIR)/core_types.h \
+ $(INC_DIR)/feature.h \
+ $(INC_DIR)/has_header.h \
+ $(INC_DIR)/platform_limits.h \
+ src/install_config.c
-src/null_config$(O) : $(PARROT_H_HEADERS) src/null_config.c
+src/null_config$(O) : \
+ $(INC_DIR)/api.h \
+ $(INC_DIR)/compiler.h \
+ $(INC_DIR)/config.h \
+ $(INC_DIR)/core_types.h \
+ $(INC_DIR)/feature.h \
+ $(INC_DIR)/has_header.h \
+ $(INC_DIR)/platform_limits.h \
+ src/null_config.c
src/list$(O) : \
$(PARROT_H_HEADERS) \
@@ -977,7 +996,7 @@ O_FILES = \
lib_deps_object : $(O_FILES)
$(PERL) $(DEV_TOOLS_DIR)/lib_deps.pl object $(O_FILES)
-lib_deps_source : $(GENERAL_H_FILES)
+lib_deps_source : $(GEN_HEADERS)
$(PERL) $(DEV_TOOLS_DIR)/lib_deps.pl source all_source
lib_deps : lib_deps_object lib_deps_source
@@ -1024,9 +1043,11 @@ $(INSTALLABLEPROVE) : parrot-prove.pbc $(PBC_TO_EXE) src/install_config$(O)
# Parrot Debugger
#
-frontend/parrot_debugger/main$(O) : $(PARROT_H_HEADERS) frontend/parrot_debugger/main.c \
- $(INC_DIR)/embed.h \
- $(INC_DIR)/runcore_api.h
+frontend/parrot_debugger/main$(O) : \
+ $(PARROT_H_HEADERS) \
+ frontend/parrot_debugger/main.c \
+ $(INC_DIR)/runcore_api.h \
+ $(INC_DIR)/embed.h
$(PDB) : frontend/parrot_debugger/main$(O) src/parrot_config$(O) $(LIBPARROT)
$(LINK) @ld_out@$@ \
@@ -1046,12 +1067,21 @@ $(INSTALLABLEPDB) : frontend/parrot_debugger/main$(O) $(LIBPARROT) src/parrot_co
# Parrot Disassembler
#
-src/pbc_disassemble$(O) : $(INC_DIR)/embed.h $(PARROT_H_HEADERS) \
- src/pbc_disassemble.c
+src/pbc_disassemble$(O) : \
+ $(INC_DIR)/api.h \
+ $(INC_DIR)/compiler.h \
+ $(INC_DIR)/config.h \
+ $(INC_DIR)/core_types.h \
+ $(INC_DIR)/feature.h \
+ $(INC_DIR)/has_header.h \
+ $(INC_DIR)/longopt.h \
+ $(INC_DIR)/platform_limits.h \
+ src/pbc_disassemble.c \
$(DIS) : src/pbc_disassemble$(O) $(LIBPARROT)
$(LINK) @ld_out@$@ \
src/pbc_disassemble$(O) \
+ src/longopt$(O) \
@rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
@@ -1059,6 +1089,7 @@ $(INSTALLABLEDIS) : src/pbc_disassemble$(O) \
src/install_config$(O) $(LIBPARROT)
$(LINK) @ld_out@$@ \
src/pbc_disassemble$(O) \
+ src/longopt$(O) \
@rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
@@ -1068,13 +1099,16 @@ $(INSTALLABLEDIS) : src/pbc_disassemble$(O) \
frontend/pbc_dump/packdump$(O) : $(PARROT_H_HEADERS) include/pmc/pmc_sub.h \
include/pmc/pmc_key.h frontend/pbc_dump/packdump.c
-$(PDUMP) : frontend/pbc_dump/main$(O) frontend/pbc_dump/packdump$(O) $(LIBPARROT)
+$(PDUMP) : frontend/pbc_dump/main$(O) frontend/pbc_dump/packdump$(O) $(LIBPARROT) $(INC_DIR)/api.h
$(LINK) @ld_out@$@ \
frontend/pbc_dump/main$(O) \
+ src/longopt$(O) \
frontend/pbc_dump/packdump$(O) @rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
frontend/pbc_dump/main$(O) : \
+ $(INC_DIR)/longopt.h \
+ $(INC_DIR)/api.h \
$(INC_DIR)/embed.h \
$(INC_DIR)/oplib/ops.h \
$(INC_DIR)/oplib/core_ops.h \
@@ -1087,6 +1121,7 @@ $(INSTALLABLEPDUMP) : frontend/pbc_dump/main$(O) frontend/pbc_dump/packdump$(O)
$(LINK) @ld_out@$@ \
frontend/pbc_dump/main$(O) \
frontend/pbc_dump/packdump$(O) \
+ src/longopt$(O) \
@rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
@@ -1100,6 +1135,7 @@ $(PBC_MERGE) : frontend/pbc_merge/main$(O) $(LIBPARROT) src/parrot_config$(O)
$(LINK) @ld_out@$@ \
frontend/pbc_merge/main$(O) \
src/parrot_config$(O) \
+ src/longopt$(O) \
@rpath_blib@ $(ALL_PARROT_LIBS) $(LINK_DYNAMIC) $(LINKFLAGS)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
@@ -1107,6 +1143,7 @@ $(INSTALLABLEPBC_MERGE) : frontend/pbc_merge/main$(O) $(LIBPARROT) $(INSTALLABLE
$(LINK) @ld_out@$@ \
frontend/pbc_merge/main$(O) \
src/install_config$(O) \
+ src/longopt$(O) \
@rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
@@ -1374,6 +1411,7 @@ src/hll$(O) : $(PARROT_H_HEADERS) src/hll.str $(INC_DIR)/dynext.h src/hll.c
src/platform$(O) : \
$(PARROT_H_HEADERS) \
+ $(INC_DIR)/sysmem.h \
src/platform.c
#IF(platform_asm):src/platform_asm$(O) : $(PARROT_H_HEADERS)
@@ -1411,9 +1449,11 @@ src/sub$(O) : \
src/string/api$(O) : $(PARROT_H_HEADERS) src/string/api.str \
src/string/private_cstring.h src/string/api.c
-src/string/primitives$(O) : $(PARROT_H_HEADERS) src/string/primitives.c
-
-src/longopt$(O) : $(PARROT_H_HEADERS) src/longopt.c
+src/longopt$(O) : \
+ $(PARROT_H_HEADERS) \
+ $(INC_DIR)/api.h \
+ $(INC_DIR)/longopt.h \
+ src/longopt.c
src/dynext$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/dynext.h \
src/dynext.str include/pmc/pmc_parrotlibrary.h src/dynext.c
@@ -1539,13 +1579,15 @@ src/io/win32$(O) : $(PARROT_H_HEADERS) src/io/io_private.h \
src/gc/alloc_memory$(O) : $(PARROT_H_HEADERS) src/gc/alloc_memory.c
frontend/parrot/main$(O) : \
- $(INC_DIR)/imcc.h \
- $(PARROT_H_HEADERS) \
- $(INC_DIR)/embed.h \
- $(INC_DIR)/runcore_api.h \
- src/gc/gc_private.h \
- frontend/parrot/main.c \
- src/gc/variable_size_pool.h
+ $(INC_DIR)/platform_limits.h \
+ $(INC_DIR)/api.h \
+ $(INC_DIR)/compiler.h \
+ $(INC_DIR)/config.h \
+ $(INC_DIR)/core_types.h \
+ $(INC_DIR)/feature.h \
+ $(INC_DIR)/has_header.h \
+ $(INC_DIR)/longopt.h \
+ frontend/parrot/main.c
src/multidispatch$(O) : \
src/multidispatch.c \
@@ -1586,7 +1628,7 @@ src/packfile/pf_items$(O) : \
src/packfile/pf_items.str \
src/packfile/pf_items.c
-src/parrot$(O) : $(GENERAL_H_FILES)
+src/parrot$(O) : $(GEN_HEADERS)
src/runcore/cores$(O) : src/runcore/cores.str \
src/runcore/cores.c \
@@ -1596,22 +1638,49 @@ src/runcore/cores$(O) : src/runcore/cores.str \
$(INC_DIR)/runcore_api.h $(INC_DIR)/runcore_trace.h \
$(PARROT_H_HEADERS)
-src/embed$(O) : $(PARROT_H_HEADERS) $(INC_DIR)/embed.h \
- src/embed.c src/embed.str \
- $(INC_DIR)/oplib/ops.h $(INC_DIR)/runcore_api.h \
- $(INC_DIR)/extend.h \
- $(INC_DIR)/extend_vtable.h \
- $(INC_DIR)/oplib/core_ops.h \
- compilers/imcc/imc.h \
- compilers/imcc/cfg.h \
- compilers/imcc/debug.h \
- compilers/imcc/instructions.h \
- compilers/imcc/sets.h \
- compilers/imcc/symreg.h \
- compilers/imcc/unit.h \
- include/pmc/pmc_sub.h
+src/embed$(O) : \
+ $(PARROT_H_HEADERS) \
+ src/embed.c \
+ src/embed.str \
+ $(INC_DIR)/oplib/ops.h \
+ $(INC_DIR)/extend.h \
+ $(INC_DIR)/embed.h \
+ $(INC_DIR)/runcore_api.h \
+ $(INC_DIR)/extend_vtable.h \
+ $(INC_DIR)/oplib/core_ops.h \
+ compilers/imcc/imc.h \
+ compilers/imcc/cfg.h \
+ compilers/imcc/debug.h \
+ compilers/imcc/instructions.h \
+ compilers/imcc/sets.h \
+ compilers/imcc/symreg.h \
+ compilers/imcc/unit.h \
+ include/pmc/pmc_sub.h
-src/dataypes$(O) : $(GENERAL_H_FILES) src/dataypes.c
+src/embed/api$(O) : \
+ $(PARROT_H_HEADERS) \
+ $(INC_DIR)/api.h \
+ $(INC_DIR)/embed.h \
+ $(INC_DIR)/runcore_api.h \
+ src/embed/api.c \
+ src/embed/embed_private.h \
+ include/pmc/pmc_parrotinterpreter.h
+
+src/embed/strings$(O) : \
+ $(PARROT_H_HEADERS) \
+ $(INC_DIR)/api.h \
+ src/embed/strings.c \
+ src/embed/embed_private.h \
+ include/pmc/pmc_parrotinterpreter.h
+
+src/embed/pmc$(O) : \
+ $(PARROT_H_HEADERS) \
+ $(INC_DIR)/api.h \
+ src/embed/pmc.c \
+ src/embed/embed_private.h \
+ include/pmc/pmc_parrotinterpreter.h
+
+src/dataypes$(O) : $(GEN_HEADERS) src/dataypes.c
src/exit$(O) : $(PARROT_H_HEADERS) src/exit.c
@@ -1678,38 +1747,71 @@ src/spf_render$(O) : $(PARROT_H_HEADERS) src/spf_render.str src/spf_render.c
src/spf_vtable$(O) : $(PARROT_H_HEADERS) src/spf_vtable.str src/spf_vtable.c
-src/string/encoding$(O) : $(PARROT_H_HEADERS) src/string/encoding.c