Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'threads' into gh798_embed_api_green_threads

  • Loading branch information...
commit 12b8d90c763cdf5c5f1fd4d9262a8c8c0f158046 2 parents 5ee91fa + d215d68
@niner niner authored
Showing with 10,032 additions and 8,959 deletions.
  1. +1 −0  .gitignore
  2. +8 −6 CREDITS
  3. +38 −0 ChangeLog
  4. +3 −3 DONORS.pod
  5. +5 −7 MANIFEST
  6. +2 −0  MANIFEST.SKIP
  7. +3 −3 MANIFEST.generated
  8. +1 −1  README.pod
  9. +24 −3 README_cygwin.pod
  10. +1 −1  VERSION
  11. +8 −0 api.yaml
  12. +3 −5 compilers/data_json/JSON_README.pod
  13. +1 −1  compilers/data_json/data_json.pir
  14. +0 −6 compilers/imcc/imcc.l
  15. +17 −17 compilers/imcc/imcc.y
  16. +1,494 −1,947 compilers/imcc/imclexer.c
  17. +1,379 −1,415 compilers/imcc/imcparser.c
  18. +219 −223 compilers/imcc/imcparser.h
  19. +2 −1  compilers/opsc/src/Ops/File.pm
  20. +17 −1 compilers/opsc/src/Ops/Op.pm
  21. +10 −3 compilers/pct/README.pod
  22. +1 −1  compilers/pge/PGE.pir
  23. +1 −1  compilers/pge/PGE/Exp.pir
  24. +1 −1  compilers/pge/PGE/OPTable.pir
  25. +1 −1  compilers/pge/PGE/Perl6Regex.pir
  26. +8 −2 compilers/pge/README.pod
  27. +2 −0  compilers/tge/TGE/Compiler.pir
  28. +3 −4 compilers/tge/TGE/Grammar.pir
  29. +2 −2 compilers/tge/tgc.pir
  30. +3 −2 config/auto/icu.pm
  31. +3 −3 config/auto/llvm/hello.c
  32. +0 −12 config/auto/memalign.pm
  33. +0 −1  config/auto/pmc.pm
  34. +162 −141 config/auto/sizes.pm
  35. +2 −2 config/auto/sizes/test_c.in
  36. +2 −2 config/auto/va_ptr.pm
  37. +3 −3 config/gen/config_h/config_h.in
  38. +20 −11 config/gen/makefiles/root.in
  39. +6 −6 docs/binaries/ops2c.pod
  40. +7 −7 docs/binaries/parrot-nqp.pod
  41. +7 −7 docs/binaries/parrot-prove.pod
  42. +6 −6 docs/binaries/parrot_nci_thunk_gen.pod
  43. +8 −8 docs/binaries/parrotbug.pod
  44. +20 −20 docs/binaries/pbc_to_exe.pod
  45. +9 −9 docs/binaries/plumage.pod
  46. +7 −7 docs/binaries/winxed.pod
  47. +14 −9 docs/compiler_faq.pod
  48. +4 −2 docs/debug.pod
  49. +2 −2 docs/deprecations/deprecations.pod
  50. +4 −2 docs/deprecations/deprecations_2_6.pod
  51. +5 −3 docs/deprecations/deprecations_2_9.pod
  52. +4 −2 docs/deprecations/deprecations_3_0.pod
  53. +4 −2 docs/deprecations/deprecations_3_3.pod
  54. +4 −2 docs/deprecations/deprecations_3_6.pod
  55. +6 −4 docs/deprecations/how_to_deprecate.pod
  56. +14 −9 docs/dev/byteorder.pod
  57. +11 −5 docs/dev/c_functions.pod
  58. +5 −5 docs/dev/coverage.pod
  59. +2 −4 docs/dev/debugging_with_msvc.pod
  60. +8 −6 docs/dev/headerizer.pod
  61. +12 −7 docs/dev/infant.pod
  62. +2 −2 docs/dev/longopt.pod
  63. +9 −1 docs/dev/parrot_api.pod
  64. +6 −1 docs/dev/pcc_methods.pod
  65. +14 −3 docs/dev/pcc_state.pod
  66. +7 −7 docs/dev/pmc_freeze.pod
  67. +16 −4 docs/dev/pmc_obj_design_meeting_notes.pod
  68. +1 −1  docs/embed_new.pod
  69. +5 −1 docs/extend.pod
  70. +5 −1 docs/faq.pod
  71. +7 −1 docs/gettingstarted.pod
  72. +3 −3 docs/glossary.pod
  73. +12 −4 docs/imcc/imcfaq.pod
  74. +5 −5 docs/intro.pod
  75. +9 −7 docs/memory_internals.pod
  76. +8 −7 docs/overview.pod
  77. +5 −4 docs/parrot.pod
  78. +8 −3 docs/parrotbyte.pod
  79. +2 −0  docs/parrothist.pod
  80. +0 −4 docs/pdds/draft/pdd01_overview.pod
  81. +0 −4 docs/pdds/draft/pdd05_opfunc.pod
  82. +0 −4 docs/pdds/draft/pdd06_pasm.pod
  83. +0 −4 docs/pdds/draft/pdd08_keys.pod
  84. +7 −33 docs/pdds/draft/pdd13_bytecode.pod
  85. +0 −4 docs/pdds/draft/pdd14_numbers.pod
  86. +0 −4 docs/pdds/draft/pdd16_native_call.pod
  87. +0 −4 docs/pdds/draft/pdd29_compiler_tools.pod
  88. +0 −4 docs/pdds/pdd00_pdd.pod
  89. +0 −4 docs/pdds/pdd03_calling_conventions.pod
  90. +0 −4 docs/pdds/pdd07_codingstd.pod
  91. +0 −4 docs/pdds/pdd09_gc.pod
  92. +0 −2  docs/pdds/pdd10_embedding.pod
  93. +0 −4 docs/pdds/pdd15_objects.pod
  94. +0 −4 docs/pdds/pdd17_pmc.pod
  95. +0 −4 docs/pdds/pdd18_security.pod
  96. +0 −4 docs/pdds/pdd19_pir.pod
  97. +0 −4 docs/pdds/pdd20_lexical_vars.pod
  98. +0 −4 docs/pdds/pdd21_namespaces.pod
  99. +0 −4 docs/pdds/pdd22_io.pod
  100. +0 −4 docs/pdds/pdd23_exceptions.pod
  101. +0 −4 docs/pdds/pdd24_events.pod
  102. +0 −4 docs/pdds/pdd25_concurrency.pod
  103. +0 −4 docs/pdds/pdd26_ast.pod
  104. +0 −4 docs/pdds/pdd27_multiple_dispatch.pod
  105. +0 −4 docs/pdds/pdd28_strings.pod
  106. +0 −4 docs/pdds/pdd30_install.pod
  107. +1 −1  docs/pdds/pdd31_hll.pod
  108. +0 −4 docs/pdds/pdd_template.pod
  109. +24 −15 docs/pmc.pod
  110. +9 −10 docs/pmc/array.pod
  111. +7 −3 docs/pmc/documentation.pod
  112. +11 −2 docs/pmc2c.pod
  113. +7 −5 docs/porting_intro.pod
  114. +16 −10 docs/project/cage_cleaners_guide.pod
  115. +14 −8 docs/project/committer_guide.pod
  116. +7 −5 docs/project/core_inclusion.pod
  117. +16 −7 docs/project/debian_packaging_guide.pod
  118. +13 −4 docs/project/metacommitter_guide.pod
  119. +60 −49 docs/project/release_manager_guide.pod
  120. +16 −6 docs/project/roles_responsibilities.pod
  121. +3 −3 docs/project/support_policy.pod
  122. +14 −5 docs/project/ubuntu_packaging_guide.pod
  123. +12 −5 docs/req/model_users.pod
  124. +11 −9 docs/running.pod
  125. +12 −11 docs/submissions.pod
  126. +9 −7 docs/tests.pod
  127. +14 −3 docs/user/pir/exceptions.pod
  128. +21 −8 docs/user/pir/intro.pod
  129. +12 −1 docs/user/pir/objects.pod
  130. +13 −1 docs/user/pir/pmcs.pod
  131. +4 −2 docs/vtables.pod
  132. +4 −1 editor/README.pod
  133. +1 −1  examples/README.pod
  134. +2 −2 examples/languages/abc/abc.pir
  135. +1 −1  examples/languages/abc/src/builtins/all.pir
  136. +15 −9 examples/languages/squaak/doc/tutorial_episode_1.pod
  137. +8 −1 examples/languages/squaak/doc/tutorial_episode_2.pod
  138. +8 −2 examples/languages/squaak/doc/tutorial_episode_3.pod
  139. +7 −0 examples/languages/squaak/doc/tutorial_episode_4.pod
  140. +8 −1 examples/languages/squaak/doc/tutorial_episode_5.pod
  141. +8 −1 examples/languages/squaak/doc/tutorial_episode_6.pod
  142. +8 −1 examples/languages/squaak/doc/tutorial_episode_7.pod
  143. +8 −1 examples/languages/squaak/doc/tutorial_episode_8.pod
  144. +8 −1 examples/languages/squaak/doc/tutorial_episode_9.pod
  145. +1 −1  examples/languages/squaak/squaak.pir
  146. +1 −1  examples/languages/squaak/src/squaak.pir
  147. +3 −4 examples/mops/mops.p6
  148. +2 −6 examples/mops/mops.rb
  149. +3 −1 examples/nci/Xlib.pir
  150. +2 −2 examples/nci/Xlibconstants.pir
  151. +6 −4 examples/nci/xlibtest.nqp
  152. +7 −3 examples/nci/xlibtest.p6
  153. +5 −3 examples/nci/xlibtest.pir
  154. +17 −1 examples/past/01-sub.pir
  155. +10 −1 examples/past/four_plus_one.pir
  156. +5 −7 examples/pir/coop_threads.pir
  157. +6 −1 examples/sdl/anim_image.pir
  158. +7 −1 examples/sdl/anim_image_dblbuf.pir
  159. +6 −1 examples/sdl/blue_font.pir
  160. +7 −3 examples/sdl/blue_rect.pir
  161. +7 −1 examples/sdl/blue_rect.pl
  162. +7 −1 examples/sdl/bounce_parrot_logo.pir
  163. +6 −2 examples/sdl/mandel.pir
  164. +3 −2 examples/sdl/minesweeper/eventhandler.pir
  165. +6 −1 examples/sdl/minesweeper/mines.pir
  166. +1 −1  examples/sdl/move_parrot_logo.pir
  167. +1 −1  examples/sdl/raw_pixels.pir
  168. +1 −1  examples/sdl/tetris/app.pir
  169. +1 −1  examples/sdl/tetris/block.pir
  170. +1 −1  examples/sdl/tetris/blockdata.pir
  171. +1 −1  examples/sdl/tetris/blocks.pir
  172. +1 −1  examples/sdl/tetris/board.pir
  173. +1 −1  examples/sdl/tetris/boarddata.pir
  174. +1 −1  examples/sdl/tetris/eventhandler.pir
  175. +1 −1  examples/sdl/tetris/tetris.pir
  176. +1 −1  examples/streams/Bytes.pir
  177. +1 −1  examples/streams/Combiner.pir
  178. +1 −1  examples/streams/Coroutine.pir
  179. +1 −1  examples/streams/FileLines.pir
  180. +1 −1  examples/streams/Filter.pir
  181. +1 −1  examples/streams/Include.pir
  182. +1 −1  examples/streams/Lines.pir
  183. +1 −1  examples/streams/ParrotIO.pir
  184. +1 −1  examples/streams/SubCounter.pir
  185. +1 −1  examples/streams/SubHello.pir
  186. +1 −1  examples/streams/Writer.pir
  187. +3 −1 examples/tge/branch/lib/Branch.pir
  188. +3 −1 examples/tge/branch/lib/Leaf.pir
  189. +9 −1 examples/tutorial/00_README.pod
  190. +8 −2 examples/tutorial/01_temp_var.pir
  191. +8 −2 examples/tutorial/02_local_var.pir
  192. +8 −2 examples/tutorial/03_temp_var_basic_pmcs.pir
  193. +8 −2 examples/tutorial/04_pod_comments.pir
  194. +8 −2 examples/tutorial/10_math_ops.pir
  195. +8 −2 examples/tutorial/11_math_ops_self_mod.pir
  196. +8 −2 examples/tutorial/12_math_ops_pasm.pir
  197. +8 −2 examples/tutorial/13_logical_ops.pir
  198. +8 −2 examples/tutorial/20_string_ops.pir
  199. +8 −2 examples/tutorial/21_string_ops_repeat.pir
  200. +8 −2 examples/tutorial/22_string_ops_length.pir
  201. +8 −2 examples/tutorial/23_string_ops_substr.pir
  202. +8 −2 examples/tutorial/24_string_ops_clone.pir
  203. +8 −2 examples/tutorial/30_arrays_basic.pir
  204. +8 −2 examples/tutorial/31_array_ops_split.pir
  205. +9 −3 examples/tutorial/32_array_ops_sprintf.pir
  206. +8 −2 examples/tutorial/33_hashes.pir
  207. +8 −2 examples/tutorial/34_multikey.pir
  208. +8 −2 examples/tutorial/40_file_ops.pir
  209. +8 −2 examples/tutorial/50_goto.pir
  210. +8 −2 examples/tutorial/51_if_unless.pir
  211. +8 −2 examples/tutorial/52_if_compare.pir
  212. +8 −2 examples/tutorial/53_loop.pir
  213. +8 −2 examples/tutorial/55_iterator.pir
  214. +8 −2 examples/tutorial/56_defined.pir
  215. +8 −2 examples/tutorial/57_exists.pir
  216. +8 −2 examples/tutorial/60_subroutines.pir
  217. +8 −2 examples/tutorial/61_namespaces.pir
  218. +8 −2 examples/tutorial/62_namespaces.pir
  219. +8 −2 examples/tutorial/70_class_object.pir
  220. +8 −2 examples/tutorial/81_continuation.pir
  221. +8 −2 examples/tutorial/82_coroutine.pir
  222. +8 −2 examples/tutorial/83_external_libraries.pir
  223. +8 −2 examples/tutorial/90_writing_tests.pir
  224. +4,019 −3,438 ext/winxed/compiler.pir
  225. +5 −5 ext/winxed/driver.pir
  226. +0 −3  frontend/parrot2/main.c
  227. +3 −3 frontend/parrot2/prt0.pir
  228. +1 −1  frontend/parrot2/prt0.winxed
  229. +32 −0 include/parrot/api.h
  230. +16 −0 include/parrot/atomic/gcc_pcc.h
  231. +8 −0 include/parrot/call.h
  232. +11 −10 include/parrot/exit.h
  233. +11 −1 include/parrot/gc_api.h
  234. +16 −12 include/parrot/interpreter.h
  235. +59 −0 include/parrot/io.h
  236. +0 −231 include/parrot/misc.h
  237. +1 −1  include/parrot/oplib/core_ops.h
  238. +5 −1 include/parrot/parrot.h
  239. +6 −0 include/parrot/platform_interface.h
  240. +3 −6 include/parrot/pointer_array.h
  241. +146 −0 include/parrot/string_funcs.h
  242. +4 −1 include/parrot/thr_windows.h
  243. +1 −1  lib/Parrot/Headerizer.pm
  244. +0 −274 lib/Parrot/Pmc2c/Attribute.pm
  245. +231 −12 lib/Parrot/Pmc2c/Emitter.pm
  246. +0 −103 lib/Parrot/Pmc2c/MULTI.pm
  247. +1 −2  lib/Parrot/Pmc2c/Method.pm
  248. +0 −93 lib/Parrot/Pmc2c/Object.pm
  249. +88 −20 lib/Parrot/Pmc2c/PCCMETHOD.pm
  250. +231 −15 lib/Parrot/Pmc2c/PMC.pm
  251. +11 −11 lib/Parrot/Pmc2c/Parser.pm
  252. +16 −11 lib/Parrot/Pmc2c/Pmc2cMain.pm
  253. +19 −4 lib/Parrot/Test/Pod.pm
  254. +2 −2 runtime/parrot/include/green_threads.pir
  255. +7 −7 runtime/parrot/include/hllmacros.pir
  256. +10 −6 runtime/parrot/include/test_more.pir
  257. +5 −0 runtime/parrot/languages/parrot/parrot.pir
  258. +6 −3 runtime/parrot/library/CGI/QueryHash.pir
  259. +2 −2 runtime/parrot/library/Config/JSON.pir
  260. +3 −3 runtime/parrot/library/HTTP/Daemon.pir
  261. +2 −2 runtime/parrot/library/HTTP/Message.pir
  262. +2 −2 runtime/parrot/library/JSON.pir
  263. +2 −2 runtime/parrot/library/LWP/Protocol.pir
  264. +2 −2 runtime/parrot/library/LWP/UserAgent.pir
  265. +2 −2 runtime/parrot/library/PGE/Dumper.pir
  266. +2 −2 runtime/parrot/library/Range.pir
  267. +1 −3 runtime/parrot/library/Stream/Writer.pir
  268. +6 −2 runtime/parrot/library/String/Utils.pir
  269. +2 −2 runtime/parrot/library/TAP/Formatter.pir
  270. +2 −2 runtime/parrot/library/TAP/Harness.pir
  271. +2 −2 runtime/parrot/library/TAP/Parser.pir
  272. +4 −0 runtime/parrot/library/Test/Builder/Test.pir
  273. +2 −2 runtime/parrot/library/URI.pir
  274. +6 −6 runtime/parrot/library/distutils.pir
  275. +3 −3 runtime/parrot/library/dumper.pir
  276. +0 −33 runtime/parrot/library/osutils.pir
  277. +1 −1  runtime/parrot/library/parrotlib.pir
  278. +28 −14 src/alarm.c
  279. +1 −1  src/call/args.c
  280. +20 −0 src/call/pcc.c
  281. +4 −4 src/dynext.c
  282. +2 −2 src/dynoplibs/sys.ops
  283. +1 −1  src/dynpmc/README.pod
  284. +32 −34 src/embed/api.c
  285. +58 −0 src/embed/pmc.c
  286. +3 −1 src/exit.c
  287. +2 −3 src/gc/fixed_allocator.c
  288. +2 −2 src/gc/gc_inf.c
  289. +2 −0  src/gc/gc_ms2.c
  290. +1 −2  src/gc/string_gc.c
  291. +1 −5 src/gc/system.c
  292. +58 −2 src/interp/api.c
  293. +1 −1  src/interp/inter_cb.c
  294. +114 −4 src/io/api.c
  295. +46 −1 src/io/socket_api.c
  296. +6 −8 src/ops/core.ops
  297. +14 −18 src/ops/core_ops.c
  298. +1 −1  src/ops/experimental.ops
  299. +2 −1  src/ops/object.ops
  300. +25 −2 src/platform/generic/misc.c
Sorry, we could not display the entire diff because too many files (363) changed.
View
1  .gitignore
@@ -455,6 +455,7 @@ cachegrind.out.*
/t/tools/pmc2c.*.h
/t/tools/pmc2c.*.pmc
/tools/dev/mk_language_shell.pl
+/tools/dev/pbc_to_exe.pir
/*.gcda
/*.gcno
/*.gcov
View
14 CREDITS
@@ -1,5 +1,3 @@
-=pod
-
Following in the steps of other open source projects that
eventually take over the world, here is the partial list
@@ -78,7 +76,7 @@ U: allison
N: Alvis Yardley
D: Documentation Shepherd (3.9.0 - Present)
-D: Release manger for 4.1.0
+D: Release manger for 4.1.0 and 4.5.0
E: ac.yardley@gmail.com
U: alvis
S: Ft. Worth, Texas
@@ -112,9 +110,10 @@ D: typo squisher
E: yDNA@cpan.org
N: Andrew Whitworth
+D: Product Manager (2.9.0 - current)
D: Internals development
D: Documentation
-D: Release manager for 0.8.2, 1.3.0, 1.5.0, 2.4.0, 2.11.0, 3.3.0, 3.10.0 and 4.0.0
+D: Release manager for 0.8.2, 1.3.0, 1.5.0, 2.4.0, 2.11.0, 3.3.0, 3.10.0, 4.0.0 and 4.4.0
E: wknight8111@gmail.com
U: Whiteknight
@@ -516,6 +515,7 @@ D: various Pynie patches
N: James E Keenan
E: jkeenan@cpan.org
U: jkeenan
+A: kid51
D: Testing of configuration and build tools; release manager
W: http://thenceforward.net/parrot/
S: Brooklyn, NY, USA
@@ -696,7 +696,7 @@ D: clean-ups of compilers/imcc and its documentation.
D: compilers/pirc and languages/PIR.
D: various updates to PCT-based languages (C99,Punie,Cardinal,Ecmascript)
D: languages/json, languages/squaak
-U: kj, kjs
+U: kjs
E: parrotcode@gmail.com
N: Klāvs Priedītis
@@ -1213,4 +1213,6 @@ N: svn
U: svn
E: svn@perl.org
-=cut
+N: Bart Wiegmans
+E: bartwiegmans@gmail.com
+D: mod_parrot
View
38 ChangeLog
@@ -1,3 +1,41 @@
+2012-07-XX release 4.6.0
+ - Core
+ - Documentation
+ - Tests
+ - Community
+
+2012-06-19 release 4.5.0
+ - Core
+ + Added .write_bytes and .read_bytes methods to FileHandle and Socket
+ PMCs.
+ + Added Parrot_api_set_stdhandle, Parrot_api_new_call_object and
+ Parrot_api_setup_signature functions to the embedding API
+ + Removed the "can" VTABLE
+ - Languages
+ + Winxed snapshot updated to 1.9.1
+ - New syntax for parameters in multi
+ - New syntax for initalization with new
+ - Cast to var improved
+ - IMCC
+ + Removed .line, .file, setline and setfile directives from IMCC
+ - Documentation
+ + Fixed up Pod in 240 files to pass 't/codingstd/pod_description.t'.
+ - Tests
+ + Added 'docs/pdds' and 'docs/pdds/draft' as files for
+ 'Parrot::Test::Pod.pm' to exclude.
+ - Build
+ + Reduced number of packages under 'lib/Parrot/Pmc2c/'.
+ + Added method-level documentation to several of the remaining packages.
+ + Added 'docs/pdds' and 'docs/pdds/draft' as files for
+ 'Parrot::Test::Pod.pm' to exclude.
+ - Community
+ + M1, a C-like language that targets M0 had a burst of development
+ and now has many working examples such as recursive Fibonacci and
+ recursive factorial : https://github.com/parrot/m1
+ + Parrot bindings to LAPACK are being worked on as part of Google
+ Summer of Code: https://github.com/leto/parrot-lapack
+
+
2012-05-15 release 4.4.0
- Core
+ Most internal calls to libc exit(x) have been replaced with
View
6 DONORS.pod
@@ -4,10 +4,10 @@
DONORS
-=head1 DONORS
+=head1 DESCRIPTION
-We would like to thank the following people and institutions,
-whose financial contributions help support the development of Parrot.
+We want to thank the following people and institutions, whose financial
+contributions help to support the development of Parrot.
=over 4
View
12 MANIFEST
@@ -1018,13 +1018,10 @@ lib/Parrot/IO/File.pm [devel]lib
lib/Parrot/IO/Path.pm [devel]lib
lib/Parrot/Install.pm [devel]lib
lib/Parrot/Manifest.pm [devel]lib
-lib/Parrot/Pmc2c/Attribute.pm [devel]lib
lib/Parrot/Pmc2c/Dumper.pm [devel]lib
lib/Parrot/Pmc2c/Emitter.pm [devel]lib
lib/Parrot/Pmc2c/Library.pm [devel]lib
-lib/Parrot/Pmc2c/MULTI.pm [devel]lib
lib/Parrot/Pmc2c/Method.pm [devel]lib
-lib/Parrot/Pmc2c/Object.pm [devel]lib
lib/Parrot/Pmc2c/PCCMETHOD.pm [devel]lib
lib/Parrot/Pmc2c/PMC.pm [devel]lib
lib/Parrot/Pmc2c/PMC/Null.pm [devel]lib
@@ -1276,7 +1273,6 @@ src/libnci_test.def []
src/library.c []
src/list.c []
src/longopt.c []
-src/misc.c []
src/multidispatch.c []
src/namespace.c []
src/nci/api.c []
@@ -1454,8 +1450,6 @@ src/runcore/profiling.c []
src/runcore/subprof.c []
src/runcore/trace.c []
src/scheduler.c []
-src/spf_render.c []
-src/spf_vtable.c []
src/string/api.c []
src/string/encoding.c []
src/string/encoding/ascii.c []
@@ -1471,6 +1465,10 @@ src/string/encoding/ucs4.c []
src/string/encoding/unicode.h []
src/string/encoding/utf16.c []
src/string/encoding/utf8.c []
+src/string/spf_private.h []
+src/string/spf_render.c []
+src/string/spf_vtable.c []
+src/string/sprintf.c []
src/sub.c []
src/thread.c []
src/utils.c []
@@ -2200,7 +2198,7 @@ tools/dev/parrot_fuzzer.py []
tools/dev/parrot_shell.pl []
tools/dev/parrotbench.pl []
tools/dev/pbc_header.pl []
-tools/dev/pbc_to_exe.pir [devel]
+tools/dev/pbc_to_exe.winxed []
tools/dev/perlcritic-cage.conf []
tools/dev/perlcritic.conf []
tools/dev/perltidy.conf []
View
2  MANIFEST.SKIP
@@ -1018,6 +1018,8 @@
^/test\.pdb/
^/tools/dev/mk_language_shell\.pl$
^/tools/dev/mk_language_shell\.pl/
+^/tools/dev/pbc_to_exe\.pir$
+^/tools/dev/pbc_to_exe\.pir/
^/vc60\.pdb$
^/vc60\.pdb/
^/vc70\.pdb$
View
6 MANIFEST.generated
@@ -2,14 +2,14 @@
# See tools/dev/install_files.pl for documentation on the
# format of this file.
# Please re-sort this file after *EVERY* modification
-blib/lib/libparrot.4.3.0.dylib [main]lib
+blib/lib/libparrot.4.5.0.dylib [main]lib
blib/lib/libparrot.a [main]lib
blib/lib/libparrot.dylib [main]lib
blib/lib/libparrot.so [main]lib
-blib/lib/libparrot.so.4.3.0 [main]lib
+blib/lib/libparrot.so.4.5.0 [main]lib
compilers/data_json/data_json.pbc [data_json]
config/gen/call_list/opengl.in []
-cygparrot-4.3.0.dll [main]bin
+cygparrot-4.5.0.dll [main]bin
docs/ops/bit.pod [doc]
docs/ops/cmp.pod [doc]
docs/ops/core.pod [doc]
View
2  README.pod
@@ -4,7 +4,7 @@
=head1 NAME
-README.pod - Readme to Parrot, version 4.3.0.
+README.pod - Readme to Parrot, version 4.5.0.
=head1 DESCRIPTION
View
27 README_cygwin.pod
@@ -4,10 +4,10 @@ This file is best viewed with "perldoc README.cygwin".
README.cygwin - Parrot under Cygwin
-=head1 SYNOPSIS
+=head1 DESCRIPTION
-Parrot builds out of the box under Cygwin,
-when no other parrot is installed. See below at PROBLEMS.
+Parrot builds out of the box under Cygwin, when no other parrot is installed.
+I<See> PROBLEMS below.
There are official cygwin parrot packages available via
L<http://cygwin.com/setup.exe>.
@@ -127,6 +127,11 @@ This is a known cygwin problem with dll's, esp. perl on non-XP 32bit platforms.
You need to install the C<rebase> package and run C<rebaseall> from an C<ash>
shell.
+For more information regarding this problem, I<see>
+http://www.cygwin.com/ml/cygwin/2009-05/msg00413.html;
+http://www.heikkitoivonen.net/blog/2008/11/26/cygwin-upgrades-and-rebaseall/;
+I<and see> http://code.google.com/p/chromium/wiki/CygwinDllRemappingFailure.
+
=item Crash at miniparrot.exe config_lib.pasm
Invoking Parrot to generate runtime/parrot/include/config.fpmc --cross your
@@ -152,6 +157,22 @@ F</usr/lib/libparrot.dll.a>, F</usr/local/lib/libparrot.dll.a>
This is a known Windows limitation with NTFS junctions on files.
+=item Exception: STATUS_ACCESS_VIOLATION ....
+
+If this exception results, ensure there is only one version of the
+C<cygwin1.dll> present on your system or, alternatively, ensure no other
+application interferes with Cygwin. For more information on this problem,
+I<see> the Cygwin/X FAQ at
+http://x.cygwin.com/docs/faq/cygwin-x-faq.html#q-status-access-violation
+I<and see> the main Cygwin FAQ at
+http://cygwin.com/faq-nochunks.html#faq.using.bloda
+
+=item build aborts
+
+If the build aborts, it may be necessary to include already built DLLs in the
+rebase. For instructions on how to accomplish this, I<see> the "PROBLEMS"
+section at http://cpansearch.perl.org/src/BFREE/OpenGL-0.57/README.cygwin
+
=back
=head1 TODO
View
2  VERSION
@@ -1 +1 @@
-4.3.0
+4.5.0
View
8 api.yaml
@@ -634,3 +634,11 @@
tags :
- experimental
ticket : 'https://github.com/parrot/parrot/issues/767'
+
+ name : 'write_bytes and read_bytes methods'
+ note :
+ The .write_bytes and .read_bytes methods for the Handle PMC (inherited
+ by FileHandle and Socket, currently) are new and experimental.
+ tags :
+ - experimental
+ ticket : 'https://github.com/parrot/parrot/issues/610'
View
8 compilers/data_json/JSON_README.pod
@@ -3,16 +3,14 @@
# This is the start to rewrite JSON. It starts with rewriting data_json only.
# data_json depends on the PGE. The rewrite use parrot-nqp.
-
=head1 NAME
JSON, a lightweight data-interchange format.
-=head1 SYNOPSIS
+=head1 DESCRIPTION
-The C<from_json> method return a PMC that containing the data structure
-for a given valid JSON (JavaScript Object Notation) string.
-For example:
+The C<from_json> method return a PMC that contains the data structure for
+a given valid JSON (JavaScript Object Notation) string. For example:
.sub 'main' :main
.local pmc result
View
2  compilers/data_json/data_json.pir
@@ -4,7 +4,7 @@
data_json - parse JSON, a lightweight data-interchange format.
-=head1 SYNOPSIS
+=head1 DESCRIPTION
Given a valid JSON (JavaScript Object Notation) string, the compiler will
return a sub that when called will produce the appropriate values. For
View
6 compilers/imcc/imcc.l
@@ -223,10 +223,6 @@ SP [ ]
yy_push_state(cmt4, yyscanner);
}
-<*>setfile{SP}+["] { yy_push_state(cmt2, yyscanner); }
-
-<*>setline{SP}+ { yy_push_state(cmt1, yyscanner); }
-
<cmt1>{DIGITS} {
yylineno = imcc->line = atoi(yytext);
yy_pop_state(yyscanner);
@@ -284,8 +280,6 @@ SP [ ]
<pod>{EOL} { /* ignore */ }
-<*>".line" return TK_LINE;
-<*>".file" return TK_FILE;
<INITIAL,emit>".annotate" return ANNOTATE;
<INITIAL,emit>".lex" return LEXICAL;
".set_arg" return ARG;
View
34 compilers/imcc/imcc.y
@@ -12,6 +12,22 @@
*
*/
+/*
+
+=pod
+
+=head1 NAME
+
+compilers/imcc/imcc.y - Intermediate Code Compiler for Parrot.
+
+=head1 DESCRIPTION
+
+This file contains the grammar of the PIR language parser.
+
+=cut
+
+*/
+
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
@@ -1042,7 +1058,7 @@ do_loadlib(ARGMOD(imc_info_t *imcc), ARGIN(const char *lib))
%nonassoc '\n'
%nonassoc <t> PARAM
-%token <t> SOL HLL TK_LINE TK_FILE
+%token <t> SOL HLL
%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> ADV_INVOCANT ADV_CALL_SIG
@@ -1145,7 +1161,6 @@ compilation_unit:
}
| MACRO '\n' { $$ = 0; }
| pragma { $$ = 0; }
- | location_directive { $$ = 0; }
| '\n' { $$ = 0; }
;
@@ -1159,20 +1174,6 @@ pragma:
}
;
-location_directive:
- TK_LINE INTC COMMA STRINGC '\n'
- {
- imcc->line = atoi($2);
- /* set_filename() frees the STRINGC */
- set_filename(imcc, $4);
- }
- | TK_FILE STRINGC '\n'
- {
- /* set_filename() frees the STRINGC */
- set_filename(imcc, $2);
- }
- ;
-
annotate_directive:
ANNOTATE STRINGC COMMA const
{
@@ -1850,7 +1851,6 @@ statement:
| MACRO '\n' { $$ = 0; }
| FILECOMMENT { $$ = 0; }
| LINECOMMENT { $$ = 0; }
- | location_directive { $$ = 0; }
| annotate_directive { $$ = $1; }
;
View
3,441 compilers/imcc/imclexer.c
1,494 additions, 1,947 deletions not shown
View
2,794 compilers/imcc/imcparser.c
1,379 additions, 1,415 deletions not shown
View
442 compilers/imcc/imcparser.h
@@ -52,117 +52,115 @@
PARAM = 259,
SOL = 260,
HLL = 261,
- TK_LINE = 262,
- TK_FILE = 263,
- GOTO = 264,
- ARG = 265,
- IF = 266,
- UNLESS = 267,
- PNULL = 268,
- SET_RETURN = 269,
- SET_YIELD = 270,
- ADV_FLAT = 271,
- ADV_SLURPY = 272,
- ADV_OPTIONAL = 273,
- ADV_OPT_FLAG = 274,
- ADV_NAMED = 275,
- ADV_ARROW = 276,
- 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,
- INVOCANT = 335,
- MAIN = 336,
- LOAD = 337,
- INIT = 338,
- IMMEDIATE = 339,
- POSTCOMP = 340,
- METHOD = 341,
- ANON = 342,
- OUTER = 343,
- NEED_LEX = 344,
- MULTI = 345,
- SUBTAG = 346,
- VTABLE_METHOD = 347,
- LOADLIB = 348,
- SUB_INSTANCE_OF = 349,
- SUBID = 350,
- NS_ENTRY = 351,
- LABEL = 352,
- EMIT = 353,
- EOM = 354,
- IREG = 355,
- NREG = 356,
- SREG = 357,
- PREG = 358,
- IDENTIFIER = 359,
- REG = 360,
- MACRO = 361,
- ENDM = 362,
- STRINGC = 363,
- INTC = 364,
- FLOATC = 365,
- USTRINGC = 366,
- PARROT_OP = 367,
- VAR = 368,
- LINECOMMENT = 369,
- FILECOMMENT = 370,
- DOT = 371,
- CONCAT = 372
+ GOTO = 262,
+ ARG = 263,
+ IF = 264,
+ UNLESS = 265,
+ PNULL = 266,
+ SET_RETURN = 267,
+ SET_YIELD = 268,
+ ADV_FLAT = 269,
+ ADV_SLURPY = 270,
+ ADV_OPTIONAL = 271,
+ ADV_OPT_FLAG = 272,
+ ADV_NAMED = 273,
+ ADV_ARROW = 274,
+ ADV_INVOCANT = 275,
+ ADV_CALL_SIG = 276,
+ NAMESPACE = 277,
+ DOT_METHOD = 278,
+ SUB = 279,
+ SYM = 280,
+ LOCAL = 281,
+ LEXICAL = 282,
+ CONST = 283,
+ ANNOTATE = 284,
+ GLOBAL_CONST = 285,
+ PLUS_ASSIGN = 286,
+ MINUS_ASSIGN = 287,
+ MUL_ASSIGN = 288,
+ DIV_ASSIGN = 289,
+ CONCAT_ASSIGN = 290,
+ BAND_ASSIGN = 291,
+ BOR_ASSIGN = 292,
+ BXOR_ASSIGN = 293,
+ FDIV = 294,
+ FDIV_ASSIGN = 295,
+ MOD_ASSIGN = 296,
+ SHR_ASSIGN = 297,
+ SHL_ASSIGN = 298,
+ SHR_U_ASSIGN = 299,
+ SHIFT_LEFT = 300,
+ SHIFT_RIGHT = 301,
+ INTV = 302,
+ FLOATV = 303,
+ STRINGV = 304,
+ PMCV = 305,
+ LOG_XOR = 306,
+ RELOP_EQ = 307,
+ RELOP_NE = 308,
+ RELOP_GT = 309,
+ RELOP_GTE = 310,
+ RELOP_LT = 311,
+ RELOP_LTE = 312,
+ RESULT = 313,
+ RETURN = 314,
+ TAILCALL = 315,
+ YIELDT = 316,
+ GET_RESULTS = 317,
+ POW = 318,
+ SHIFT_RIGHT_U = 319,
+ LOG_AND = 320,
+ LOG_OR = 321,
+ COMMA = 322,
+ ESUB = 323,
+ DOTDOT = 324,
+ PCC_BEGIN = 325,
+ PCC_END = 326,
+ PCC_CALL = 327,
+ PCC_SUB = 328,
+ PCC_BEGIN_RETURN = 329,
+ PCC_END_RETURN = 330,
+ PCC_BEGIN_YIELD = 331,
+ PCC_END_YIELD = 332,
+ INVOCANT = 333,
+ MAIN = 334,
+ LOAD = 335,
+ INIT = 336,
+ IMMEDIATE = 337,
+ POSTCOMP = 338,
+ METHOD = 339,
+ ANON = 340,
+ OUTER = 341,
+ NEED_LEX = 342,
+ MULTI = 343,
+ SUBTAG = 344,
+ VTABLE_METHOD = 345,
+ LOADLIB = 346,
+ SUB_INSTANCE_OF = 347,
+ SUBID = 348,
+ NS_ENTRY = 349,
+ LABEL = 350,
+ EMIT = 351,
+ EOM = 352,
+ IREG = 353,
+ NREG = 354,
+ SREG = 355,
+ PREG = 356,
+ IDENTIFIER = 357,
+ REG = 358,
+ MACRO = 359,
+ ENDM = 360,
+ STRINGC = 361,
+ INTC = 362,
+ FLOATC = 363,
+ USTRINGC = 364,
+ PARROT_OP = 365,
+ VAR = 366,
+ LINECOMMENT = 367,
+ FILECOMMENT = 368,
+ DOT = 369,
+ CONCAT = 370
};
#endif
/* Tokens. */
@@ -170,117 +168,115 @@
#define PARAM 259
#define SOL 260
#define HLL 261
-#define TK_LINE 262
-#define TK_FILE 263
-#define GOTO 264
-#define ARG 265
-#define IF 266
-#define UNLESS 267
-#define PNULL 268
-#define SET_RETURN 269
-#define SET_YIELD 270
-#define ADV_FLAT 271
-#define ADV_SLURPY 272
-#define ADV_OPTIONAL 273
-#define ADV_OPT_FLAG 274
-#define ADV_NAMED 275
-#define ADV_ARROW 276
-#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 INVOCANT 335
-#define MAIN 336
-#define LOAD 337
-#define INIT 338
-#define IMMEDIATE 339
-#define POSTCOMP 340
-#define METHOD 341
-#define ANON 342
-#define OUTER 343
-#define NEED_LEX 344
-#define MULTI 345
-#define SUBTAG 346
-#define VTABLE_METHOD 347
-#define LOADLIB 348
-#define SUB_INSTANCE_OF 349
-#define SUBID 350
-#define NS_ENTRY 351
-#define LABEL 352
-#define EMIT 353
-#define EOM 354
-#define IREG 355
-#define NREG 356
-#define SREG 357
-#define PREG 358
-#define IDENTIFIER 359
-#define REG 360
-#define MACRO 361
-#define ENDM 362
-#define STRINGC 363
-#define INTC 364
-#define FLOATC 365
-#define USTRINGC 366
-#define PARROT_OP 367
-#define VAR 368
-#define LINECOMMENT 369
-#define FILECOMMENT 370
-#define DOT 371
-#define CONCAT 372
+#define GOTO 262
+#define ARG 263
+#define IF 264
+#define UNLESS 265
+#define PNULL 266
+#define SET_RETURN 267
+#define SET_YIELD 268
+#define ADV_FLAT 269
+#define ADV_SLURPY 270
+#define ADV_OPTIONAL 271
+#define ADV_OPT_FLAG 272
+#define ADV_NAMED 273
+#define ADV_ARROW 274
+#define ADV_INVOCANT 275
+#define ADV_CALL_SIG 276
+#define NAMESPACE 277
+#define DOT_METHOD 278
+#define SUB 279
+#define SYM 280
+#define LOCAL 281
+#define LEXICAL 282
+#define CONST 283
+#define ANNOTATE 284
+#define GLOBAL_CONST 285
+#define PLUS_ASSIGN 286
+#define MINUS_ASSIGN 287
+#define MUL_ASSIGN 288
+#define DIV_ASSIGN 289
+#define CONCAT_ASSIGN 290
+#define BAND_ASSIGN 291
+#define BOR_ASSIGN 292
+#define BXOR_ASSIGN 293
+#define FDIV 294
+#define FDIV_ASSIGN 295
+#define MOD_ASSIGN 296
+#define SHR_ASSIGN 297
+#define SHL_ASSIGN 298
+#define SHR_U_ASSIGN 299
+#define SHIFT_LEFT 300
+#define SHIFT_RIGHT 301
+#define INTV 302
+#define FLOATV 303
+#define STRINGV 304
+#define PMCV 305
+#define LOG_XOR 306
+#define RELOP_EQ 307
+#define RELOP_NE 308
+#define RELOP_GT 309
+#define RELOP_GTE 310
+#define RELOP_LT 311
+#define RELOP_LTE 312
+#define RESULT 313
+#define RETURN 314
+#define TAILCALL 315
+#define YIELDT 316
+#define GET_RESULTS 317
+#define POW 318
+#define SHIFT_RIGHT_U 319
+#define LOG_AND 320
+#define LOG_OR 321
+#define COMMA 322
+#define ESUB 323
+#define DOTDOT 324
+#define PCC_BEGIN 325
+#define PCC_END 326
+#define PCC_CALL 327
+#define PCC_SUB 328
+#define PCC_BEGIN_RETURN 329
+#define PCC_END_RETURN 330
+#define PCC_BEGIN_YIELD 331
+#define PCC_END_YIELD 332
+#define INVOCANT 333
+#define MAIN 334
+#define LOAD 335
+#define INIT 336
+#define IMMEDIATE 337
+#define POSTCOMP 338
+#define METHOD 339
+#define ANON 340
+#define OUTER 341
+#define NEED_LEX 342
+#define MULTI 343
+#define SUBTAG 344
+#define VTABLE_METHOD 345
+#define LOADLIB 346
+#define SUB_INSTANCE_OF 347
+#define SUBID 348
+#define NS_ENTRY 349
+#define LABEL 350
+#define EMIT 351
+#define EOM 352
+#define IREG 353
+#define NREG 354
+#define SREG 355
+#define PREG 356
+#define IDENTIFIER 357
+#define REG 358
+#define MACRO 359
+#define ENDM 360
+#define STRINGC 361
+#define INTC 362
+#define FLOATC 363
+#define USTRINGC 364
+#define PARROT_OP 365
+#define VAR 366
+#define LINECOMMENT 367
+#define FILECOMMENT 368
+#define DOT 369
+#define CONCAT 370
@@ -301,7 +297,7 @@ typedef union YYSTYPE
/* Line 2068 of yacc.c */
-#line 294 "compilers/imcc/imcparser.h"
+#line 290 "compilers/imcc/imcparser.h"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
View
3  compilers/opsc/src/Ops/File.pm
@@ -258,7 +258,8 @@ method compile_ops($str, :$experimental? = 0) {
my $past := $compiler.compile($str, :target('past'));
for @($past<ops>) {
- $_<experimental> := $experimental;
+ $_.experimental($experimental);
+ $_.deprecated($_.flags<deprecated> ?? 1 !! 0);
self<ops>.push($_);
#say($_.full_name ~ " is number " ~ self<op_order>);
self<op_order>++;
View
18 compilers/opsc/src/Ops/Op.pm
@@ -116,6 +116,14 @@ are appended to the name.
The same as C<full_name()>, but with 'C<Parrot_>' prefixed.
+=item C<experimental()>
+
+Set or get "experimental" flag for Op.
+
+=item C<deprecated()>
+
+Set or get "deprecated" flag for Op.
+
=end
method code($code?) { self.attr('code', $code, defined($code)) }
@@ -126,6 +134,10 @@ method name($name?) { self.attr('name', $name, defined($name)) }
method args($args?) { self.attr('args', $args, defined($args)) }
+method experimental($args?) { self.attr('experimental', $args, defined($args)) }
+
+method deprecated($args?) { self.attr('deprecated', $args, defined($args)) }
+
method need_write_barrier() {
my $need := 0;
# We need write barriers only for (in)out PMC|STR
@@ -173,7 +185,11 @@ flags (passed as ":flag") specified for the op.
=end
-method flags(%flags?) { self.attr('flags', %flags, defined(%flags)) }
+method flags(%flags?) {
+ %flags := self.attr('flags', %flags, defined(%flags));
+ self.deprecated(%flags<deprecated> ?? 1 !! 0);
+ %flags;
+}
=begin
View
13 compilers/pct/README.pod
@@ -1,7 +1,14 @@
+# Copyright (C) 2001-2012, Parrot Foundation.
-=head1 Parrot Compiler Toolkit (PCT)
+=pod
-This is an implementation of an abstract tree representation
-and compiler for Parrot.
+=head1 NAME
+
+compiler/pct/README.pod - Readme file for the 'compiler/pct/' directory.
+
+=head1 DESCRIPTION
+
+This is an implementation of an abstract tree representation and compiler for
+Parrot.
=cut
View
2  compilers/pge/PGE.pir
@@ -4,7 +4,7 @@
PGE - the Parrot/Perl Grammar Engine
-=head2 Description
+=head1 DESCRIPTION
This is the base file for the grammar engine. It basically combines
(via .include) each of the separate PGE modules into a single compilation
View
2  compilers/pge/PGE/Exp.pir
@@ -1,6 +1,6 @@
# Copyright (C) 2005-2009, Parrot Foundation.
-=head1 TITLE
+=head1 DESCRIPTION
PGE::Exp - base class for expressions
View
2  compilers/pge/PGE/OPTable.pir
@@ -1,6 +1,6 @@
# Copyright (C) 2005-2009, Parrot Foundation.
-=head1 Title
+=head1 DESCRIPTION
PGE::OPTable - PGE operator precedence table and parser
View
2  compilers/pge/PGE/Perl6Regex.pir
@@ -1,6 +1,6 @@
# Copyright (C) 2006-2009, Parrot Foundation.
-=head1 TITLE
+=head1 DESCRIPTION
Perl6Regex - compiler and parser for Perl 6 regex
View
10 compilers/pge/README.pod
@@ -1,5 +1,12 @@
+# Copyright (C) 2001-2012, Parrot Foundation.
-=head1 Parrot Grammar Engine (PGE)
+=pod
+
+=head1 NAME
+
+compiler/pge/README.pod - Readme to the 'compilers/pge' directory.
+
+=head1 DESCRIPTION
This is a regular expression/rules/grammar engine/parser designed to
run in Parrot. It's still a work in progress, but has a lot of
@@ -141,4 +148,3 @@ Patches and suggestions should be sent to the Perl 6 compiler list
(perl6-compiler@perl.org).
=cut
-
View
2  compilers/tge/TGE/Compiler.pir
@@ -6,6 +6,8 @@ TGE::Compiler - A compiler for the grammar syntax of TGE.
=head1 DESCRIPTION
+TGE::Compiler is a compiler for the grammar syntax of Tree Grammar Engine.
+
=cut
.namespace [ 'TGE'; 'Compiler' ]
View
7 compilers/tge/TGE/Grammar.pir
@@ -4,12 +4,11 @@
TGE::Grammar - The base class for all tree grammars.
-=head1 SYNOPSIS
-
-(To come.)
-
=head1 DESCRIPTION
+TGE::Grammar is the base class for all of the tree grammars for the Tree
+Grammar Engine
+
=cut
.namespace [ 'TGE'; 'Grammar' ]
View
4 compilers/tge/tgc.pir
@@ -8,13 +8,13 @@ tgc.pir - The TGE rules compiler
> ./parrot compilers/tge/tgc.pir [OPTIONS] FILE
-=head2 DESCRIPTION
+=head1 DESCRIPTION
This program takes a tree grammar, specified in B<FILE>, and compiles it
into the PIR code needed to execute that grammar. This PIR code is then
suitable for inclusion or compilation into other larger programs.
-=head2 OPTIONS
+=head1 OPTIONS
=over 4
View
5 config/auto/icu.pm
@@ -278,9 +278,10 @@ sub _try_icuconfig {
$arg->{icuconfig}
) {
# ldflags
- $conf->debug("Trying $arg->{icuconfig} with '--ldflags'\n");
- $icushared = capture_output("$arg->{icuconfig} --ldflags");
+ $conf->debug("Trying $arg->{icuconfig} with '--ldflags-searchpath --ldflags-libsonly'\n");
+ $icushared = capture_output("$arg->{icuconfig} --ldflags-searchpath --ldflags-libsonly");
chomp $icushared;
+ $icushared =~ s/\n/ /g;
$conf->debug("icushared: captured $icushared\n");
($icushared, $arg->{without}) =
$self->_handle_icushared($icushared, $arg->{without});
View
6 config/auto/llvm/hello.c
@@ -2,15 +2,15 @@
*
Copyright (C) 2009, Parrot Foundation.
-=head1
+=head1 DESCRIPTION
-Test file only.
+A test file only.
=over 4
=item C<int main()>
-Test file only.
+A test file only.
=cut
View
12 config/auto/memalign.pm
@@ -41,8 +41,6 @@ sub runstep {
_set_malloc_header($conf);
- _set_ptrcast($conf);
-
$conf->cc_gen('config/auto/memalign/test_c.in');
eval { $conf->cc_build(); };
unless ( $@ || $conf->cc_run_capture() !~ /ok/ ) {
@@ -74,16 +72,6 @@ sub _set_malloc_header {
}
}
-sub _set_ptrcast {
- my $conf = shift;
- if ( $conf->data->get('ptrsize') == $conf->data->get('intsize') ) {
- $conf->data->set( ptrcast => 'int' );
- }
- else {
- $conf->data->set( ptrcast => 'long' );
- }
-}
-
sub _set_memalign {
my $self = shift;
my ($conf, $test, $test2) = @_;
View
1  config/auto/pmc.pm
@@ -61,7 +61,6 @@ PMC2C_FILES = \\
lib/Parrot/Pmc2c/PMC.pm \\
lib/Parrot/Pmc2c/Method.pm \\
lib/Parrot/Pmc2c/PCCMETHOD.pm \\
- lib/Parrot/Pmc2c/MULTI.pm \\
lib/Parrot/Pmc2c/Library.pm \\
lib/Parrot/Pmc2c/UtilFunctions.pm \\
lib/Parrot/Pmc2c/PMC/default.pm \\
View
303 config/auto/sizes.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2003, Parrot Foundation.
+# Copyright (C) 2001-2012, Parrot Foundation.
=head1 NAME
@@ -19,7 +19,6 @@ use base qw(Parrot::Configure::Step);
use Parrot::Configure::Utils ':auto';
-
sub _init {
my $self = shift;
my %data;
@@ -45,65 +44,40 @@ sub runstep {
longdouble => 'long double',
);
- my %sizes = map {
- $_, test_size($conf, $types{$_})
- } keys %types;
-
- for ( keys %sizes ) {
- $conf->data->set( $_ . 'size' => $sizes{$_} );
- }
-
- _handle_intval_ptrsize_discrepancy(\%sizes);
- _handle_longlong($conf, \%sizes);
-
- # probe for 64-bit integer-types
- foreach my $type ('int64_t', '__int64') {
- my $size = test_size($conf, $type);
- if ($size) {
- $types{int64} = $type;
- $sizes{int64} = $size;
- last;
- }
- }
+ my @std_ints = ( 'short', 'int', 'long', 'long long' );
+ my @std_floats = ( 'float', 'double', 'long double' );
+ my @extra_ints = ( '__int16', '__int32', '__int64' );
- # set fixed sized types
- _set_int2($conf, \%types, \%sizes);
+ my $sizes = _get_sizes($conf, values %types, @extra_ints);
- _set_int4($conf, \%types, \%sizes);
+ $conf->data->set( HAS_LONGLONG => $sizes->{'long long'} ? 1 : 0 );
- _set_int8($conf, \%types, \%sizes);
+ _handle_ptrcast(
+ $conf, \%types, $sizes, [ @std_ints, @extra_ints ]);
- _set_float4($conf, \%types, \%sizes);
+ for ( keys %types ) {
+ $conf->data->set( $_.'size' => $sizes->{$types{$_}} );
+ }
- _set_float8($conf, \%types, \%sizes);
+ _set_intval_range($conf);
+ _set_floatval_range($conf);
- # get HUGEINTVAL
- my $hiv = do {
- my @t = ('long', 'int', 'longlong', 'int64', 'invtal');
- my $i = maxind( @sizes{grep exists $sizes{$_}, @t} );
- $t[$i];
- };
+ # not as portable as possible, but should cover common architectures
+ # extend list of types as necessary
- $conf->data->set(
- hugeintval => $types{$hiv},
- hugeintvalsize => $sizes{$hiv},
- );
+ _set_fixed($conf, $sizes, 'int', 2, [ 'short', 'int', '__int16' ]);
+ _set_fixed($conf, $sizes, 'int', 4, [ 'int', 'long', '__int32' ]);
- # get HUGEFLOATVAL
- my $hfv = do {
- my @t = ('float', 'double', 'longdouble', 'numval');
- my $i = maxind( @sizes{@t} );
- $t[$i];
- };
+ _handle_int64($conf, $sizes, [ 'long', 'long long', '__int64' ]);
- $conf->data->set(
- hugefloatval => $types{$hfv},
- hugefloatvalsize => $sizes{$hfv},
- );
+ _set_fixed($conf, $sizes, 'float', 4, [ 'float', 'double' ]);
+ _set_fixed($conf, $sizes, 'float', 8, [ 'double', 'long double' ]);
- _set_intvalmaxmin($conf);
+ _set_huge($conf, $sizes, 'int',
+ [ reverse(@std_ints), reverse(@extra_ints), $types{intval} ] );
- _set_floatvalmaxmin($conf);
+ _set_huge($conf, $sizes, 'float',
+ [ reverse(@std_floats), $types{numval} ] );
return 1;
}
@@ -122,163 +96,210 @@ sub test_size {
return $ret;
}
-sub maxind {
- my $i = 0;
- $_[$_] <= $_[$i] or $i = $_ for 0..$#_;
- return $i;
+sub _get_sizes {
+ my $conf = shift;
+ my %sizes = map { $_ => 0 } @_;
+ $sizes{$_} = test_size($conf, $_) for keys %sizes;
+ return \%sizes;
}
-sub _handle_intval_ptrsize_discrepancy {
- my $sizesref = shift;
- if ( $sizesref->{ptr} != $sizesref->{intval} ) {
- print <<"END";
-
-Hmm, I see your chosen INTVAL isn't the same size as your pointers. Parrot
-should still compile and run, but you may see a ton of warnings.
-END
+sub _find_type_eq {
+ my ($sizesref, $size, $checklist) = @_;
+ for ( @$checklist ) {
+ return $_ if $sizesref->{$_} == $size;
}
}
-sub _handle_longlong {
- my ($conf, $sizesref) = @_;
- $conf->data->set( HAS_LONGLONG => !!($sizesref->{longlong} > 0) );
-}
+sub _find_type_max {
+ my ($sizesref, $checklist) = @_;
+ my $size = 0;
+ my $type;
-sub _set_int2 {
- my ($conf, $typesref, $sizesref) = @_;
- if ( $sizesref->{short} == 2 ) {
- $conf->data->set( int2_t => 'short' );
- }
- else {
- $conf->data->set( int2_t => 'int' );
- print <<'END';
-
-Can't find a int type with size 2, conversion ops might fail!
-
-END
- }
-}
-
-sub _set_int4 {
- my ($conf, $typesref, $sizesref) = @_;
- foreach my $type (qw[ short int long ]) {
- if ( $sizesref->{$type} == 4 ) {
- $conf->data->set( int4_t => $typesref->{$type} );
- return;
+ for ( @$checklist ) {
+ if ( $sizesref->{$_} > $size ) {
+ $type = $_;
+ $size = $sizesref->{$_};
}
}
- $conf->data->set( int4_t => 'int' );
- print <<'END';
-
-Can't find a int type with size 4, conversion ops might fail!
-
-END
+ return $type;
}
-sub _set_int8 {
- my ($conf, $typesref, $sizesref) = @_;
- foreach my $type (qw[ int long longlong int64 ]) {
- if ( $sizesref->{$type} == 8 ) {
- $conf->data->set(
- int8_t => $typesref->{$type},
- HAS_INT64 => 1,
- );
- return;
+sub _find_type_min {
+ my ($sizesref, $checklist) = @_;
+ my $size = 1024; # magic number greater than size of any scalar C type
+ my $type;
+
+ for ( @$checklist ) {
+ if ( $sizesref->{$_} < $size ) {
+ $type = $_;
+ $size = $sizesref->{$_};
}
}
- $conf->data->set( HAS_INT64 => 0 );
- print <<'END';
-
-Can't find an int type with size 8, 64-bit support dissabled.
+ return $type;
+}
-END
+sub _find_type_min_ge {
+ my ($sizesref, $size, $checklist) = @_;
+ my @reduced_checklist = grep { $sizesref->{$_} >= $size } @$checklist;
+ return _find_type_min($sizesref, \@reduced_checklist);
}
-sub _set_float4 {
- my ($conf, $typesref, $sizesref) = @_;
- if ( $sizesref->{float} == 4 ) {
- $conf->data->set( float4_t => 'float' );
+sub _set_fixed {
+ my ($conf, $sizesref, $kind, $size, $checklist) = @_;
+ my $type = _find_type_eq($sizesref, $size, $checklist);
+ my $name = $kind.$size.'_t';
+
+ if ( defined $type ) {
+ $conf->data->set( $name => $type );
+ return 1;
}
else {
- $conf->data->set( float4_t => 'double' );
- print <<'END';
+ $conf->data->set( $name => $checklist->[0] );
+ print <<END;
-Can't find a float type with size 4, conversion ops might fail!
+Can't find $kind type with size $size, conversion ops might fail!
END
+ return 0;
}
}
-sub _set_float8 {
- my ($conf, $typesref, $sizesref) = @_;
- if ( $sizesref->{double} == 8 ) {
- $conf->data->set( float8_t => 'double' );
- }
- else {
- $conf->data->set( float8_t => 'double' );
- print <<'END';
-
-Can't find a float type with size 8, conversion ops might fail!
+sub _set_huge {
+ my ($conf, $sizesref, $kind, $checklist) = @_;
+ my $type = _find_type_max($sizesref, $checklist);
+ my $size = $sizesref->{$type};
-END
- }
+ $conf->data->set(
+ 'huge'.$kind.'val' => $type,
+ 'huge'.$kind.'valsize' => $size
+ );
}
-sub _set_intvalmaxmin {
+sub _set_intval_range {
my $conf = shift;
my $ivmin;
my $ivmax;
- my $iv = $conf->data->get(qw(iv));
+ my $iv = $conf->data->get('iv');
- if ( $iv eq "int" ) {
+ if ( ( $iv eq 'short' ) || ( $iv eq 'short int' ) ) {
+ $ivmin = 'SHRT_MIN';
+ $ivmax = 'SHRT_MAX';
+ }
+ elsif ( $iv eq 'int' ) {
$ivmin = 'INT_MIN';
$ivmax = 'INT_MAX';
}
- elsif ( ( $iv eq "long" ) || ( $iv eq "long int" ) ) {
+ elsif ( ( $iv eq 'long' ) || ( $iv eq 'long int' ) ) {
$ivmin = 'LONG_MIN';
$ivmax = 'LONG_MAX';
}
- elsif ( ( $iv eq "long long" ) || ( $iv eq "long long int" ) ) {
+ elsif ( ( $iv eq 'long long' ) || ( $iv eq 'long long int' ) ) {
# The assumption is that a compiler that have the long long type
- # also provides his limit macros.
+ # also provides its limit macros.
$ivmin = 'LLONG_MIN';
$ivmax = 'LLONG_MAX';
}
else {
- die qq{Configure.pl: Cannot find limits for type '$iv'\n};
+ my $size = $conf->data->get('intvalsize');
+ my $n = 8 * $size;
+
+ $ivmin = -2 ** ($n - 1);
+ $ivmax = 2 ** ($n - 1) - 1;
+
+ print <<END;
+
+Your chosen integer type '$iv' does not look like a standard type.
+The range of representable values has been computed assuming a padding-free,
+two's complement representation and CHAR_BIT == 8.
+
+END
}
$conf->data->set( intvalmin => $ivmin );
$conf->data->set( intvalmax => $ivmax );
}
-sub _set_floatvalmaxmin {
+sub _set_floatval_range {
my $conf = shift;
my $nvmin;
my $nvmax;
- my $nv = $conf->data->get(qw(nv));
+ my $nv = $conf->data->get('nv');
- if ( $nv eq "double" ) {
+ if ( $nv eq 'float') {
+ $nvmin = 'FLT_MIN';
+ $nvmax = 'FLT_MAX';
+ }
+ elsif ( $nv eq 'double' ) {
$nvmin = 'DBL_MIN';
$nvmax = 'DBL_MAX';
}
- elsif ( $nv eq "long double" ) {
-
- # Stay way from long double for now (it may be 64 or 80 bits)
- # die "long double not supported at this time, use double.";
+ elsif ( $nv eq 'long double' ) {
$nvmin = 'LDBL_MIN';
$nvmax = 'LDBL_MAX';
}
else {
- die qq{Configure.pl: Cannot find limits for type '$nv'\n};
+ print <<END;
+
+Your chosen numeric type '$nv' does not look like a standard type.
+The range of representable values cannot be computed for arbitrary
+floating-point types.
+
+END
+ die "Configure.pl: Cannot find limits for type '$nv'\n";
}
$conf->data->set( floatvalmin => $nvmin );
$conf->data->set( floatvalmax => $nvmax );
}
+sub _handle_ptrcast {
+ my ($conf, $typesref, $sizesref, $checklist) = @_;
+ my $intvalsize = $sizesref->{$typesref->{'intval'}};
+ my $ptrsize = $sizesref->{$typesref->{'ptr'}};
+ my $intptr = _find_type_min_ge($sizesref, $ptrsize, $checklist);
+
+ if ( defined $intptr ) {
+ $conf->data->set( ptrcast => 'unsigned '.$intptr );
+ }
+ else {
+ die "Configure.pl: No int type of at least pointer size found.\n";
+ }
+
+ return if $intvalsize >= $ptrsize;
+ if ( $conf->options->get('intval') or $conf->options->get('ask') ) {
+ print <<END;
+
+Hmm, I see your chosen INTVAL is of smaller size than your pointers. Parrot
+should still compile and run, but you may see a ton of warnings.
+
+END
+ }
+ else {
+ $typesref->{intval} = $intptr;
+ $conf->data->set( iv => $intptr );
+
+ # FIXME: workaround for issue #705
+ $typesref->{opcode} = $intptr;
+ $conf->data->set( opcode_t => $intptr );
+ }
+}
+
+sub _handle_int64 {
+ my ($conf, $sizesref, $checklist) = @_;
+ my $has_int64 = _set_fixed($conf, $sizesref, 'int', 8, $checklist);
+
+ $conf->data->set( HAS_INT64 => $has_int64 );
+
+ if ( not $has_int64 ) {
+ print <<'END';
+64-bit support disabled.
+
+END
+ }
+}
+
1;
# Local Variables:
View
4 config/auto/sizes/test_c.in
@@ -1,5 +1,5 @@
/*
-Copyright (C) 2002-2009, Parrot Foundation.
+Copyright (C) 2002-2011, Parrot Foundation.
figure out some Configure settings
*/
@@ -10,7 +10,7 @@ figure out some Configure settings
int
main(int argc, char **argv)
{
- printf("%u\n", sizeof (@TEMP_type@));
+ printf("%u\n", (unsigned)sizeof (@TEMP_type@));
return EXIT_SUCCESS;
}
View
4 config/auto/va_ptr.pm
@@ -35,9 +35,9 @@ sub runstep {
$conf->cc_gen('config/auto/va_ptr/test_c.in');
eval { $conf->cc_build('-DVA_TYPE_STACK'); };
- if ( $@ || $conf->cc_run() !~ /^ok/ ) {
+ if ( $@ || $conf->cc_run_capture() !~ /^ok/ ) {
eval { $conf->cc_build('-DVA_TYPE_REGISTER'); };
- if ( $@ || $conf->cc_run() !~ /^ok/ ) {
+ if ( $@ || $conf->cc_run_capture() !~ /^ok/ ) {
die "Unknown va_ptr type";
}
$va_type = 'register';
View
6 config/gen/config_h/config_h.in
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2009, Parrot Foundation.
+/* Copyright (C) 2001-2011, Parrot Foundation.
*/
/* config.h
@@ -31,7 +31,7 @@ typedef @nv@ Parrot_Float;
typedef @opcode_t@ Parrot_Opcode;
typedef void * Parrot_Pointer;
-typedef char Parrot_Int1;
+typedef signed char Parrot_Int1;
typedef unsigned char Parrot_UInt1;
typedef @int2_t@ Parrot_Int2;
typedef unsigned @int2_t@ Parrot_UInt2;
@@ -132,7 +132,7 @@ typedef @hugefloatval@ HUGEFLOATVAL;
#define DOUBLE_SIZE @doublesize@
typedef Parrot_Opcode opcode_t;
-typedef size_t ptrcast_t;
+typedef @ptrcast@ ptrcast_t;
typedef struct _vtable VTABLE;
typedef void DPOINTER;
View
31 config/gen/makefiles/root.in
@@ -494,7 +494,7 @@ INTERP_O_FILES = \
src/library$(O) \
src/list$(O) \
src/pointer_array$(O) \
- src/misc$(O) \
+ src/string/sprintf$(O) \
src/multidispatch$(O) \
src/namespace$(O) \
src/nci/api$(O) \
@@ -512,8 +512,8 @@ INTERP_O_FILES = \
src/scheduler$(O) \
src/thread$(O) \
src/events$(O) \
- src/spf_render$(O) \
- src/spf_vtable$(O) \
+ src/string/spf_render$(O) \
+ src/string/spf_vtable$(O) \
src/sub$(O) \
src/runcore/trace$(O) \
src/utils$(O) \
@@ -692,6 +692,8 @@ $(LIBRARY_DIR)/Config/JSON.pbc: $(DYNEXT_DIR)/io_ops$(LOAD_EXT) $(DYNEXT_DIR)/sy
$(LIBRARY_DIR)/LWP/UserAgent.pbc: $(DYNEXT_DIR)/io_ops$(LOAD_EXT)
# constant string support
+# To accommodate 'nmake', we're stuck with suffix rules rather than pattern
+# rule.
.c.str : # suffix rule (limited support)
$(PERL) $(BUILD_TOOLS_DIR)/c2str.pl $< > $@
@@ -726,8 +728,8 @@ STR_FILES = \
src/runcore/subprof.str \
src/scheduler.str \
src/events.str \
- src/spf_render.str \
- src/spf_vtable.str \
+ src/string/spf_render.str \
+ src/string/spf_vtable.str \
src/string/api.str \
src/string/encoding.str \
src/sub.str \
@@ -915,6 +917,9 @@ $(PARROT) : $(FRPTWO_DIR)/main$(O) $(GEN_HEADERS)