Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge from master, fix conflicts

  • Loading branch information...
commit 150157504f5c6e03417d52c33ec5b67c6e49cfab 2 parents 4e40dc3 + f0d7137
@Whiteknight Whiteknight authored
Showing with 29,263 additions and 27,370 deletions.
  1. +5 −34 .gitignore
  2. +8 −1 CREDITS
  3. +53 −0 ChangeLog
  4. +19 −22 MANIFEST
  5. +10 −66 MANIFEST.SKIP
  6. +8 −2 MANIFEST.generated
  7. +1 −0  PBC_COMPAT
  8. +1 −1  README
  9. +1 −1  RESPONSIBLE_PARTIES
  10. +1 −1  VERSION
  11. +10 −0 api.yaml
  12. +0 −2  compilers/imcc/Rules.in
  13. +2 −1  compilers/imcc/imc.h
  14. +6 −0 compilers/imcc/imcc.y
  15. +6 −0 compilers/imcc/imcparser.c
  16. +4 −3 compilers/imcc/main.c
  17. +0 −1  compilers/imcc/parser_util.c
  18. +28 −6 compilers/imcc/pbc.c
  19. +7 −6 compilers/imcc/symreg.h
  20. +1 −1  compilers/opsc/src/Ops/Compiler/Actions.pm
  21. +13 −12 compilers/opsc/src/Ops/Compiler/Grammar.pm
  22. +183 −67 compilers/pct/src/PAST/Compiler.pir
  23. +56 −15 compilers/pct/src/PAST/Node.pir
  24. +7 −3 compilers/pct/src/PCT/HLLCompiler.pir
  25. +6 −9 compilers/pct/src/PCT/Node.pir
  26. +1 −0  compilers/pge/PGE/Exp.pir
  27. +1 −0  config/auto/warnings.pm
  28. +0 −8 config/gen/makefiles.pm
  29. +0 −67 config/gen/makefiles/ext.in
  30. +48 −45 config/gen/makefiles/root.in
  31. +23 −16 config/init/hints/msys.pm
  32. +98 −0 docs/binaries/parrot-prove.pod
  33. +36 −0 docs/binaries/parrot_config.pod
  34. +95 −0 docs/binaries/parrotbug.pod
  35. +67 −0 docs/binaries/pbc_to_exe.pod
  36. +147 −0 docs/binaries/plumage.pod
  37. +40 −0 docs/binaries/winxed.pod
  38. +37 −32 docs/dev/{pccmethods.pod → pcc_methods.pod}
  39. +3 −8 docs/embed.pod
  40. +3 −1 docs/parrothist.pod
  41. +2 −2 docs/pdds/pdd10_embedding.pod
  42. +10 −0 docs/pdds/pdd17_pmc.pod
  43. +1 −1  docs/pdds/pdd22_io.pod
  44. +18 −30 docs/project/release_manager_guide.pod
  45. +1 −2  docs/tests.pod
  46. +5 −5 docs/user/pir/pmcs.pod
  47. +0 −1  examples/c/pbc_info.c
  48. +1 −1  examples/c/test_main.c
  49. +0 −1  examples/compilers/japhc.c
  50. +4 −4 examples/embed/cotorra.c
  51. +1 −1  examples/io/post.pir
  52. +3 −0  examples/languages/abc/src/parser/actions.nqp
  53. +1 −0  examples/languages/abc/t/abc_functions
  54. +7 −4 examples/languages/squaak/src/Squaak/Actions.pm
  55. +9 −3 examples/languages/squaak/src/Squaak/Grammar.pm
  56. +9 −0 examples/languages/squaak/src/Squaak/Runtime.pm
  57. +8 −1 examples/languages/squaak/t/00-sanity.t
  58. +170 −0 examples/pir/coop_threads.pir
  59. +0 −141 ext/Parrot-Embed/Build.PL
  60. +0 −17 ext/Parrot-Embed/Changes
  61. +0 −12 ext/Parrot-Embed/MANIFEST
  62. +0 −28 ext/Parrot-Embed/README
  63. +0 −10 ext/Parrot-Embed/TODO
  64. +0 −57 ext/Parrot-Embed/lib/Parrot/Embed.pm
  65. +0 −251 ext/Parrot-Embed/lib/Parrot/Embed.xs
  66. +0 −129 ext/Parrot-Embed/lib/Parrot/Interpreter.pm
  67. +0 −93 ext/Parrot-Embed/lib/Parrot/PMC.pm
  68. +0 −39 ext/Parrot-Embed/t/00-load.t
  69. +0 −28 ext/Parrot-Embed/t/greet.pir
  70. +0 −108 ext/Parrot-Embed/t/interp.t
  71. +0 −40 ext/Parrot-Embed/t/languages.t
  72. +0 −82 ext/Parrot-Embed/t/pipp.t
  73. +0 −63 ext/Parrot-Embed/tools/check_embed_coverage.pl
  74. +0 −26 ext/Parrot-Embed/tools/write_typemap.pl
  75. +0 −35 ext/Parrot-Embed/typemap
  76. +1 −1  ext/nqp-rx/src/stage0/Regex-s0.pir
  77. +15,715 −16,056 ext/winxed/compiler.pir
  78. +25 −205 ext/winxed/driver.pir
  79. +1 −1  frontend/parrot/main.c
  80. +23 −34 frontend/parrot2/main.c
  81. +124 −208 frontend/parrot2/prt0.pir
  82. +60 −25 frontend/parrot2/prt0.winxed
  83. +12 −17 frontend/parrot_debugger/main.c
  84. +0 −6 frontend/pbc_disassemble/main.c
  85. +6 −6 frontend/pbc_dump/main.c
  86. +9 −3 frontend/pbc_dump/packdump.c
  87. +1 −9 frontend/pbc_merge/main.c
  88. +43 −0 include/parrot/alarm.h
  89. +11 −2 include/parrot/api.h
  90. +5 −0 include/parrot/call.h
  91. +12 −1 include/parrot/context.h
  92. +3 −0  include/parrot/datatypes.h
  93. +43 −0 include/parrot/disassemble.h
  94. +0 −119 include/parrot/embed.h
  95. +99 −0 include/parrot/events.h
  96. +8 −4 include/parrot/exceptions.h
  97. +3 −168 include/parrot/extend.h
  98. +5 −4 include/parrot/gc_api.h
  99. +13 −0 include/parrot/hash.h
  100. +11 −4 include/parrot/interpreter.h
  101. +1 −1  include/parrot/io.h
  102. +38 −0 include/parrot/misc.h
  103. +7 −0 include/parrot/namespace.h
  104. +9 −0 include/parrot/oo.h
  105. +12 −1 include/parrot/oplib/core_ops.h
  106. +1,040 −1,029 include/parrot/oplib/ops.h
  107. +1,040 −1,029 include/parrot/opsenum.h
  108. +18 −20 include/parrot/packfile.h
  109. +1 −0  include/parrot/parrot.h
  110. +4 −1 include/parrot/platform_interface.h
  111. +6 −53 include/parrot/pmc.h
  112. +1 −1  include/parrot/pobj.h
  113. +10 −8 include/parrot/runcore_api.h
  114. +0 −1  include/parrot/runcore_subprof.h
  115. +94 −146 include/parrot/scheduler.h
  116. +27 −6 include/parrot/scheduler_private.h
  117. +1 −1  include/parrot/string_funcs.h
  118. +21 −47 lib/Parrot/Harness/DefaultTests.pm
  119. +18 −24 lib/Parrot/Harness/Options.pm
  120. +1 −1  lib/Parrot/Harness/Smoke.pm
  121. +150 −0 lib/Parrot/Harness/TestSets.pm
  122. +1 −1  lib/Parrot/Install.pm
  123. +14 −14 lib/Parrot/Pmc2c/PMC.pm
  124. +1 −1  lib/Parrot/Pmc2c/UtilFunctions.pm
  125. +1 −2  ports/debian/libparrot3.3.0.symbols
  126. +1 −1  ports/debian/rules
  127. +104 −0 runtime/parrot/include/green_threads.pir
  128. +3 −3 runtime/parrot/library/Archive/Tar.pir
  129. +2 −2 runtime/parrot/library/Archive/Zip.pir
  130. +8 −1 runtime/parrot/library/Test/Builder.pir
  131. +2 −2 runtime/parrot/library/Test/More.pir
  132. +3 −3 runtime/parrot/library/distutils.pir
  133. +3 −2 runtime/parrot/library/postgres.pir
  134. +263 −0 src/alarm.c
  135. +30 −20 src/call/args.c
  136. +23 −2 src/call/context_accessors.c
  137. +18 −0 src/call/ops.c
  138. +2 −1  src/call/pcc.c
  139. +0 −2  src/debug.c
  140. +243 −0 src/disassemble.c
  141. +3 −4 src/dynext.c
  142. +2 −2 src/dynpmc/Defines.in
  143. +2 −0  src/dynpmc/dynlexpad.pmc
  144. +153 −129 src/dynpmc/select.pmc
  145. +0 −539 src/embed.c
  146. +0 −1  src/embed/api.c
  147. +7 −10 src/embed/bytecode.c
  148. +25 −4 src/embed/pmc.c
  149. +412 −0 src/events.c
  150. +2 −0  src/exceptions.c
  151. +3 −1 src/exit.c
  152. +6 −515 src/extend.c
  153. +10 −8 src/gc/alloc_resources.c
  154. +14 −13 src/gc/api.c
  155. +12 −12 src/gc/fixed_allocator.c
  156. +43 −39 src/gc/gc_gms.c
  157. +17 −16 src/gc/gc_inf.c
  158. +20 −18 src/gc/gc_ms.c
  159. +23 −22 src/gc/gc_ms2.c
  160. +20 −20 src/gc/gc_private.h
  161. +44 −6 src/gc/mark_sweep.c
  162. +34 −29 src/gc/string_gc.c
  163. +76 −95 src/hash.c
  164. +10 −6 src/hll.c
  165. +10 −4 src/interp/inter_cb.c
  166. +2 −6 src/interp/inter_create.c
  167. +14 −0 src/interp/inter_misc.c
  168. +6 −7 src/io/buffer.c
  169. +4 −6 src/key.c
  170. +91 −0 src/misc.c
  171. +3 −3 src/multidispatch.c
  172. +20 −0 src/namespace.c
  173. +1 −1  src/nci/libffi.c
  174. +19 −0 src/oo.c
  175. +85 −27 src/ops/core.ops
  176. +2,460 −2,102 src/ops/core_ops.c
  177. +78 −0 src/ops/experimental.ops
  178. +10 −0 src/ops/math.ops
  179. +2 −1  src/ops/string.ops
  180. +104 −136 src/packfile/api.c
  181. +0 −1  src/packfile/pf_private.h
  182. +0 −25 src/platform/aix/asm.s
  183. +2 −1  src/platform/darwin/hires_timer.c
  184. +2 −1  src/platform/generic/hires_timer.c
  185. +1 −0  src/platform/generic/io.c
  186. +22 −0 src/platform/generic/time.c
  187. +2 −3 src/platform/win32/hires_timer.c
  188. +1 −0  src/platform/win32/io.c
  189. +19 −92 src/pmc.c
  190. +227 −0 src/pmc/alarm.pmc
  191. +78 −6 src/pmc/bytebuffer.pmc
  192. +66 −0 src/pmc/callback.pmc
  193. +4 −4 src/pmc/callcontext.pmc
  194. +4 −4 src/pmc/coroutine.pmc
  195. +33 −10 src/pmc/default.pmc
  196. +8 −9 src/pmc/eval.pmc
  197. +33 −23 src/pmc/exception.pmc
  198. +84 −14 src/pmc/exceptionhandler.pmc
  199. +63 −0 src/pmc/fixedfloatarray.pmc
  200. +34 −4 src/pmc/fixedintegerarray.pmc
  201. +26 −0 src/pmc/fixedpmcarray.pmc
  202. +28 −0 src/pmc/fixedstringarray.pmc
  203. +16 −0 src/pmc/hash.pmc
  204. +3 −3 src/pmc/imageiofreeze.pmc
  205. +11 −8 src/pmc/imageiosize.pmc
  206. +11 −4 src/pmc/imccompiler.pmc
  207. +43 −0 src/pmc/integer.pmc
  208. +1 −1  src/pmc/key.pmc
  209. +4 −4 src/pmc/nativepccmethod.pmc
  210. +179 −2 src/pmc/opcode.pmc
  211. +128 −8 src/pmc/oplib.pmc
  212. +2 −4 src/pmc/packfile.pmc
  213. +74 −0 src/pmc/packfileannotation.pmc
  214. +5 −1 src/pmc/packfileannotations.pmc
  215. +100 −29 src/pmc/packfiledebug.pmc
  216. +40 −2 src/pmc/packfileopmap.pmc
  217. +17 −0 src/pmc/packfileview.pmc
  218. +10 −5 src/pmc/parrotinterpreter.pmc
  219. +602 −0 src/pmc/pmclist.pmc
  220. +10 −2 src/pmc/pointer.pmc
  221. +66 −229 src/pmc/scheduler.pmc
  222. +11 −6 src/pmc/socket.pmc
  223. +125 −57 src/pmc/structview.pmc
  224. +16 −2 src/pmc/sub.pmc
  225. +209 −256 src/pmc/task.pmc
  226. +100 −35 src/pmc/timer.pmc
  227. +1 −1  src/pmc/undef.pmc
  228. +0 −14 src/pointer_array.c
  229. +2 −2 src/runcore/cores.c
  230. +6 −6 src/runcore/main.c
  231. +0 −1  src/runcore/profiling.c
  232. +86 −88 src/runcore/subprof.c
  233. +328 −730 src/scheduler.c
  234. +6 −5 src/string/api.c
  235. +3 −0  t/archive/README
  236. +1 −1  t/compilers/opsc/01-parse.t
  237. +10 −12 t/compilers/opsc/06-opsfile.t
  238. +1 −1  t/dynpmc/os.t
  239. +8 −3 t/dynpmc/select.t
  240. +167 −0 t/fullharness
  241. +1 −1  t/harness
  242. +2 −2 t/harness.pir
  243. +2 −1  t/library/pg.t
  244. BIN  t/native_pbc/number.pbc
  245. BIN  t/native_pbc/string.pbc
  246. +30 −3 t/op/calling.t
  247. +1 −1  t/op/gc.t
  248. +22 −1 t/op/inf_nan.t
  249. +10 −1 t/op/stringu.t
  250. +146 −0 t/pmc/alarm.t
  251. +98 −1 t/pmc/exceptionhandler.t
  252. +9 −1 t/pmc/fixedbooleanarray.t
  253. +13 −1 t/pmc/fixedfloatarray.t
  254. +2 −0  t/pmc/fixedintegerarray.t
  255. +29 −4 t/pmc/fixedpmcarray.t
  256. +59 −0 t/pmc/hash.t
  257. +1 −1  t/pmc/iterator.t
  258. +1 −1  t/pmc/mappedbytearray.t
  259. +42 −27 t/pmc/nci.t
  260. +1 −1  t/pmc/opcode.t
  261. +9 −0 t/pmc/packfileopmap.t
  262. +229 −0 t/pmc/pmclist.t
  263. +38 −1 t/pmc/resizablefloatarray.t
  264. +38 −1 t/pmc/resizableintegerarray.t
  265. +38 −1 t/pmc/resizablepmcarray.t
  266. +38 −1 t/pmc/resizablestringarray.t
  267. +0 −120 t/pmc/scheduler.t
  268. +112 −239 t/pmc/task.t
  269. +152 −0 t/pmc/task_primes.t
  270. +5 −130 t/pmc/timer.t
  271. +9 −118 t/src/embed.t
  272. +2 −3 t/src/embed/api.t
  273. +42 −1 t/src/embed/pmc.t
  274. +0 −1  t/src/embed/strings.t
  275. +0 −1  t/src/exit.t
  276. +183 −176 t/src/extend.t
  277. +36 −44 t/src/extend_vtable.t
  278. +0 −2  t/src/misc.t
  279. +0 −2  t/src/pointer_array.t
  280. +86 −0 t/src/threads_io.t
  281. +0 −2  t/src/warnings.t
  282. +1 −1  t/tools/dev/search_ops/samples.pm
  283. +1 −0  tools/dev/all_hll_test.pl
  284. +6 −1 tools/dev/mk_inno_language.pl
  285. +3 −11 tools/dev/mk_language_shell.in
  286. +29 −10 tools/dev/pbc_to_exe.pir
  287. +3 −2 tools/dev/resubmit_smolder.pl
  288. +1 −1  tools/release/auto_release.pl
  289. +8 −8 tools/release/release.json
View
39 .gitignore
@@ -55,6 +55,7 @@ cachegrind.out.*
/installable*
/libparrot.def
/libparrot.dll
+/libparrot.dll.a
/miniparrot
/myconfig
/ops2c
@@ -77,7 +78,6 @@ cachegrind.out.*
/parrot_nci_thunk_gen
/parrot_nci_thunk_gen.c
/parrot_nci_thunk_gen.pbc
-/parrot_test_run.tar.gz
/parrot_old
/pbc_disassemble
/pbc_dump
@@ -180,39 +180,6 @@ cachegrind.out.*
/examples/pir/befunge/MANIFEST
/examples/pir/befunge/befunge
/examples/pir/befunge/installable_befunge
-/ext/Makefile
-/ext/Parrot-Embed/*.bs
-/ext/Parrot-Embed/*.bundle
-/ext/Parrot-Embed/*.c
-/ext/Parrot-Embed/*.def
-/ext/Parrot-Embed/*.dll
-/ext/Parrot-Embed/*.dump
-/ext/Parrot-Embed/*.dylib
-/ext/Parrot-Embed/*.exe
-/ext/Parrot-Embed/*.exp
-/ext/Parrot-Embed/*.h
-/ext/Parrot-Embed/*.ilk
-/ext/Parrot-Embed/*.lib
-/ext/Parrot-Embed/*.manifest
-/ext/Parrot-Embed/*.o
-/ext/Parrot-Embed/*.obj
-/ext/Parrot-Embed/*.old
-/ext/Parrot-Embed/*.pdb
-/ext/Parrot-Embed/*.pdb
-/ext/Parrot-Embed/*.so
-/ext/Parrot-Embed/*.tmp
-/ext/Parrot-Embed/*.xs
-/ext/Parrot-Embed/Build
-/ext/Parrot-Embed/Build.bat
-/ext/Parrot-Embed/Makefile
-/ext/Parrot-Embed/Makefile.PL
-/ext/Parrot-Embed/_build
-/ext/Parrot-Embed/blib
-/ext/Parrot-Embed/dll.base
-/ext/Parrot-Embed/pm_to_blib
-/ext/Parrot-Embed/lib/Parrot/*.c
-/ext/Parrot-Embed/lib/Parrot/*.obj
-/ext/Parrot-Embed/t/*.pbc
/ext/nqp-rx/src/stage0/nqp-setting.pir
/frontend/parrot/main.o
/frontend/parrot2/main.o
@@ -249,6 +216,7 @@ cachegrind.out.*
/runtime/parrot/dynext/*.bundle
/runtime/parrot/dynext/*.def
/runtime/parrot/dynext/*.dll
+/runtime/parrot/dynext/*.dll.a
/runtime/parrot/dynext/*.dylib
/runtime/parrot/dynext/*.exe
/runtime/parrot/dynext/*.exp
@@ -333,6 +301,7 @@ cachegrind.out.*
/src/dynoplibs/*.bundle
/src/dynoplibs/*.c
/src/dynoplibs/*.dll
+/src/dynoplibs/*.dll.a
/src/dynoplibs/*.exp
/src/dynoplibs/*.h
/src/dynoplibs/*.ilk
@@ -348,6 +317,7 @@ cachegrind.out.*
/src/dynpmc/*.c
/src/dynpmc/*.def
/src/dynpmc/*.dll
+/src/dynpmc/*.dll.a
/src/dynpmc/*.dump
/src/dynpmc/*.dylib
/src/dynpmc/*.exe
@@ -394,6 +364,7 @@ cachegrind.out.*
/src/string/charset/*.obj
/src/string/encoding/*.o
/src/string/encoding/*.obj
+/t/archive/parrot_test_run.tar.gz
/t/benchmark/*.pasm
/t/benchmark/*.pir
/t/compilers/data_json/*.pbc
View
9 CREDITS
@@ -107,7 +107,7 @@ E: yDNA@cpan.org
N: Andrew Whitworth
D: Internals development
D: Documentation
-D: Release manager for 0.8.2, 1.3.0, 1.5.0, 2.4.0, 2.11.0 and 3.3.0
+D: Release manager for 0.8.2, 1.3.0, 1.5.0, 2.4.0, 2.11.0, 3.3.0 and 3.10.0
E: wknight8111@gmail.com
U: Whiteknight
@@ -1058,6 +1058,13 @@ E: stefanor@cox.net
D: Perl 5 interoperability, Blizkost
U: sorear
+N: Stefan Seifert
+U: nine
+E: nine@detonation.org
+D: Continuation of Chandler's work on tasks
+S: Linz, Austria
+W: http://niner.name
+
N: Stéphane Payrard
D: Various code fixes and improvements
View
53 ChangeLog
@@ -1,3 +1,56 @@
+2011-11-15 release 3.10.0
+ - Core
+ + The mark VTABLE was added to the Select PMC
+ + The Parrot::Embed Perl 5 module was removed from parrot.git and now lives
+ at https://github.com/parrot/parrot-embed
+ + A set_random method was added to the Integer PMC, so random numbers can
+ be generated without needing to load math dynops
+ + A new implementation of green threads was added to Parrot, in preparation
+ for a robust hybrid threading system. Green threads are currently
+ not available on Windows.
+ - Languages
+ + Winxed
+ - 'multi' modifier improved
+ - throw "string" now emits throw instead of die
+ - several optimizations in generated code
+ - improved some error dianostics
+ - Community
+ + Parrot Foundation was accepted to Google Code-In 2011. We could always use more volunteers.
+ Task ideas are on the wiki:
+ https://github.com/parrot/parrot/wiki/Google-Code-In-Task-Ideas
+ - Documentation
+ - Tests
+ + Added tests for recently-fixed bugs using return :flat and ResizableStringArrays.
+
+2011-10-18 release 3.9.0
+ - Core
+ + The whiteknight/kill_threads branch was merged, which removes the old and broken
+ thread/concurrency implementation. Better and more flexible concurrency primitives
+ are currently being worked on. This also involved removing some of the last vestiges
+ of assembly code from Parrot as well as removing the share and share_ro vtables.
+ + random_lib.pir was removed, since better alternatives already exist
+ + The freeze and thaw vtables were removed from Default PMC, because they weren't
+ useful and caused hard-to-find bugs.
+ + A new subroutine profiling runcore was added. It can be enabled with the command-line
+ argument of -R subprof . The resulting data can be analyzed with kcachegrind.
+ + Added get_string VTABLE to FixedIntegerArray and FixedFloatArray PMCs
+ + The update() method was added to the Hash PMC, which updates one Hash with the contents
+ of another. This speeds up rakudo/nqp startup time.
+ - Languages
+ + Winxed
+ - Updated snapshot to version 1.3.0
+ - Added the builtin sleep
+ - Modifier 'multi' allows some more multi functionality
+ - Community
+ + New repo for the Parrot Alternate Compiler Toolkit, a re-implementation of
+ PCT in Winxed: https://github.com/parrot/PACT
+ - Documentation
+ + We are in the process to migrating our Trac wiki at http://trac.parrot.org/ to Github
+ at https://github.com/parrot/parrot/wiki
+ + Packfile PMC documentation was updated
+ - Tests
+ + Select PMC tests improved to pass on non-Linuxy platforms
+
2011-09-20 release 3.8.0
- Core
+ New tools/release/auto_release.pl script automates most of release
View
41 MANIFEST
@@ -218,7 +218,6 @@ config/gen/core_pmcs.pm []
config/gen/makefiles.pm []
config/gen/makefiles/docs.in []
config/gen/makefiles/editor.in []
-config/gen/makefiles/ext.in []
config/gen/makefiles/parrot_embed_pl.in []
config/gen/makefiles/root.in []
config/gen/opengl.pm []
@@ -302,8 +301,8 @@ docs/dev/infant.pod [doc]
docs/dev/longopt.pod [doc]
docs/dev/optimizer.pod [doc]
docs/dev/parrot_api.pod [doc]
+docs/dev/pcc_methods.pod [doc]
docs/dev/pcc_state.pod [doc]
-docs/dev/pccmethods.pod [doc]
docs/dev/pmc_freeze.pod [doc]
docs/dev/pmc_obj_design_meeting_notes.pod [doc]
docs/dev/profiling.pod [doc]
@@ -621,6 +620,7 @@ examples/pir/befunge/stack.pir [examples]
examples/pir/befunge/t/basic.t [examples]
examples/pir/befunge/test.bef [examples]
examples/pir/circle.pir [examples]
+examples/pir/coop_threads.pir [examples]
examples/pir/euclid.pir [examples]
examples/pir/genprog.bas [examples]
examples/pir/hanoi.pir [examples]
@@ -780,23 +780,6 @@ examples/tutorial/81_continuation.pir [examples]
examples/tutorial/82_coroutine.pir [examples]
examples/tutorial/83_external_libraries.pir [examples]
examples/tutorial/90_writing_tests.pir [examples]
-ext/Parrot-Embed/Build.PL []
-ext/Parrot-Embed/Changes []
-ext/Parrot-Embed/MANIFEST []
-ext/Parrot-Embed/README []doc
-ext/Parrot-Embed/TODO []
-ext/Parrot-Embed/lib/Parrot/Embed.pm []
-ext/Parrot-Embed/lib/Parrot/Embed.xs []
-ext/Parrot-Embed/lib/Parrot/Interpreter.pm []
-ext/Parrot-Embed/lib/Parrot/PMC.pm []
-ext/Parrot-Embed/t/00-load.t [test]
-ext/Parrot-Embed/t/greet.pir [test]
-ext/Parrot-Embed/t/interp.t [test]
-ext/Parrot-Embed/t/languages.t [test]
-ext/Parrot-Embed/t/pipp.t [test]
-ext/Parrot-Embed/tools/check_embed_coverage.pl []
-ext/Parrot-Embed/tools/write_typemap.pl []
-ext/Parrot-Embed/typemap []
ext/nqp-rx/CREDITS []
ext/nqp-rx/Defines.mak []
ext/nqp-rx/LICENSE []
@@ -881,6 +864,7 @@ frontend/pbc_merge/main.c []
include/imcc/api.h [main]include
include/imcc/embed.h [main]include
include/imcc/yyscanner.h [main]include
+include/parrot/alarm.h [main]include
include/parrot/api.h [main]include
include/parrot/caches.h [main]include
include/parrot/call.h [main]include
@@ -890,10 +874,11 @@ include/parrot/context.h [main]include
include/parrot/core_types.h [main]include
include/parrot/datatypes.h [main]include
include/parrot/debugger.h [main]include
+include/parrot/disassemble.h [main]include
include/parrot/dynext.h [main]include
-include/parrot/embed.h [main]include
include/parrot/encoding.h [main]include
include/parrot/enums.h [main]include
+include/parrot/events.h [main]include
include/parrot/exceptions.h [main]include
include/parrot/exit.h [main]include
include/parrot/extend.h [main]include
@@ -994,6 +979,7 @@ lib/Parrot/H2inc.pm [devel]lib
lib/Parrot/Harness/DefaultTests.pm [devel]lib
lib/Parrot/Harness/Options.pm [devel]lib
lib/Parrot/Harness/Smoke.pm [devel]lib
+lib/Parrot/Harness/TestSets.pm [devel]lib
lib/Parrot/Headerizer.pm [devel]lib
lib/Parrot/Headerizer/Functions.pm [devel]lib
lib/Parrot/IO/Directory.pm [devel]lib
@@ -1072,6 +1058,7 @@ runtime/parrot/bin/prove.pir [library]
runtime/parrot/dynext/README []doc
runtime/parrot/include/README []doc
runtime/parrot/include/fp_equality.pasm [library]
+runtime/parrot/include/green_threads.pir [library]
runtime/parrot/include/hllmacros.pir [library]
runtime/parrot/include/test_more.pir [library]
runtime/parrot/languages/parrot/parrot.pir [library]
@@ -1174,6 +1161,7 @@ runtime/parrot/library/postgres.declarations [library]
runtime/parrot/library/postgres.pir [library]
runtime/parrot/library/uuid.pir [library]
runtime/parrot/library/yaml_dumper.pir [library]
+src/alarm.c []
src/call/args.c []
src/call/context.c []
src/call/context_accessors.c []
@@ -1181,6 +1169,7 @@ src/call/ops.c []
src/call/pcc.c []
src/datatypes.c []
src/debug.c []
+src/disassemble.c []
src/dynext.c []
src/dynoplibs/Defines.in []
src/dynoplibs/README []doc
@@ -1208,12 +1197,12 @@ src/dynpmc/rational.pmc []
src/dynpmc/rotest.pmc []
src/dynpmc/select.pmc []
src/dynpmc/subproxy.pmc []
-src/embed.c []
src/embed/api.c []
src/embed/bytecode.c []
src/embed/embed_private.h []
src/embed/pmc.c []
src/embed/strings.c []
+src/events.c []
src/exceptions.c []
src/exit.c []
src/extend.c []
@@ -1328,11 +1317,13 @@ src/platform/win32/time.c []
src/platform/win32/uid.c []
src/pmc.c []
src/pmc/addrregistry.pmc []
+src/pmc/alarm.pmc []
src/pmc/arrayiterator.pmc []
src/pmc/bigint.pmc []
src/pmc/bignum.pmc []
src/pmc/boolean.pmc []
src/pmc/bytebuffer.pmc []
+src/pmc/callback.pmc []
src/pmc/callcontext.pmc []
src/pmc/capture.pmc []
src/pmc/class.pmc []
@@ -1393,6 +1384,7 @@ src/pmc/packfileview.pmc []
src/pmc/parrotinterpreter.pmc []
src/pmc/parrotlibrary.pmc []
src/pmc/pmc.num []
+src/pmc/pmclist.pmc []
src/pmc/pmcproxy.pmc []
src/pmc/pointer.pmc []
src/pmc/ptr.pmc []
@@ -1450,6 +1442,7 @@ src/vtables.c []
src/warnings.c []
t/README.pod []doc
t/TESTS_STATUS.pod [test]
+t/archive/README []doc
t/benchmark/benchmarks.t [test]
t/codingstd/c_arg_assert.t [test]
t/codingstd/c_code_coda.t [test]
@@ -1677,6 +1670,7 @@ t/examples/streams.t [test]
t/examples/subs.t [test]
t/examples/tutorial.t [test]
t/ext/winxed/compreg.t [test]
+t/fullharness [test]
t/harness [test]
t/harness.pir [test]
t/include/fp_equality.t [test]
@@ -1839,6 +1833,7 @@ t/pir/registernames.t [test]
t/pir/testlib/loadtest.pir [test]
t/pir/timer_exit.t [test]
t/pmc/addrregistry.t [test]
+t/pmc/alarm.t [test]
t/pmc/arrayiterator.t [test]
t/pmc/bigint.t [test]
t/pmc/bignum.t [test]
@@ -1918,6 +1913,7 @@ t/pmc/parrotio.t [test]
t/pmc/parrotlibrary.t [test]
t/pmc/parrotobject.t [test]
t/pmc/pmc.t [test]
+t/pmc/pmclist.t [test]
t/pmc/pmcproxy.t [test]
t/pmc/pointer.t [test]
t/pmc/prop.t [test]
@@ -1929,7 +1925,6 @@ t/pmc/resizablestringarray.t [test]
t/pmc/ro.t [test]
t/pmc/role.t [test]
t/pmc/scalar.t [test]
-t/pmc/scheduler.t [test]
t/pmc/schedulermessage.t [test]
t/pmc/signal.t [test]
t/pmc/sockaddr.t [test]
@@ -1943,6 +1938,7 @@ t/pmc/structview.t [test]
t/pmc/sub.t [test]
t/pmc/sys.t [test]
t/pmc/task.t [test]
+t/pmc/task_primes.t [test]
t/pmc/testfile [test]
t/pmc/testlib/annotations.pir [test]
t/pmc/testlib/number.pasm [test]
@@ -1972,6 +1968,7 @@ t/src/extend.t [test]
t/src/extend_vtable.t [test]
t/src/misc.t [test]
t/src/pointer_array.t [test]
+t/src/threads_io.t [test]
t/src/warnings.t [test]
t/steps/auto/arch-01.t [test]
t/steps/auto/attributes-01.t [test]
View
76 MANIFEST.SKIP
@@ -264,70 +264,6 @@
^/examples/pir/befunge/befunge/
^/examples/pir/befunge/installable_befunge$
^/examples/pir/befunge/installable_befunge/
-^/ext/Makefile$
-^/ext/Makefile/
-^/ext/Parrot-Embed/.*\.bs$
-^/ext/Parrot-Embed/.*\.bs/
-^/ext/Parrot-Embed/.*\.bundle$
-^/ext/Parrot-Embed/.*\.bundle/
-^/ext/Parrot-Embed/.*\.c$
-^/ext/Parrot-Embed/.*\.c/
-^/ext/Parrot-Embed/.*\.def$
-^/ext/Parrot-Embed/.*\.def/
-^/ext/Parrot-Embed/.*\.dll$
-^/ext/Parrot-Embed/.*\.dll/
-^/ext/Parrot-Embed/.*\.dump$
-^/ext/Parrot-Embed/.*\.dump/
-^/ext/Parrot-Embed/.*\.dylib$
-^/ext/Parrot-Embed/.*\.dylib/
-^/ext/Parrot-Embed/.*\.exe$
-^/ext/Parrot-Embed/.*\.exe/
-^/ext/Parrot-Embed/.*\.exp$
-^/ext/Parrot-Embed/.*\.exp/
-^/ext/Parrot-Embed/.*\.h$
-^/ext/Parrot-Embed/.*\.h/
-^/ext/Parrot-Embed/.*\.ilk$
-^/ext/Parrot-Embed/.*\.ilk/
-^/ext/Parrot-Embed/.*\.lib$
-^/ext/Parrot-Embed/.*\.lib/
-^/ext/Parrot-Embed/.*\.manifest$
-^/ext/Parrot-Embed/.*\.manifest/
-^/ext/Parrot-Embed/.*\.o$
-^/ext/Parrot-Embed/.*\.o/
-^/ext/Parrot-Embed/.*\.obj$
-^/ext/Parrot-Embed/.*\.obj/
-^/ext/Parrot-Embed/.*\.old$
-^/ext/Parrot-Embed/.*\.old/
-^/ext/Parrot-Embed/.*\.pdb$
-^/ext/Parrot-Embed/.*\.pdb/
-^/ext/Parrot-Embed/.*\.so$
-^/ext/Parrot-Embed/.*\.so/
-^/ext/Parrot-Embed/.*\.tmp$
-^/ext/Parrot-Embed/.*\.tmp/
-^/ext/Parrot-Embed/.*\.xs$
-^/ext/Parrot-Embed/.*\.xs/
-^/ext/Parrot-Embed/Build$
-^/ext/Parrot-Embed/Build/
-^/ext/Parrot-Embed/Build\.bat$
-^/ext/Parrot-Embed/Build\.bat/
-^/ext/Parrot-Embed/Makefile$
-^/ext/Parrot-Embed/Makefile/
-^/ext/Parrot-Embed/Makefile\.PL$
-^/ext/Parrot-Embed/Makefile\.PL/
-^/ext/Parrot-Embed/_build$
-^/ext/Parrot-Embed/_build/
-^/ext/Parrot-Embed/blib$
-^/ext/Parrot-Embed/blib/
-^/ext/Parrot-Embed/dll\.base$
-^/ext/Parrot-Embed/dll\.base/
-^/ext/Parrot-Embed/lib/Parrot/.*\.c$
-^/ext/Parrot-Embed/lib/Parrot/.*\.c/
-^/ext/Parrot-Embed/lib/Parrot/.*\.obj$
-^/ext/Parrot-Embed/lib/Parrot/.*\.obj/
-^/ext/Parrot-Embed/pm_to_blib$
-^/ext/Parrot-Embed/pm_to_blib/
-^/ext/Parrot-Embed/t/.*\.pbc$
-^/ext/Parrot-Embed/t/.*\.pbc/
^/ext/nqp-rx/src/stage0/nqp-setting\.pir$
^/ext/nqp-rx/src/stage0/nqp-setting\.pir/
^/frontend/parrot/.*\.gcda$
@@ -428,6 +364,8 @@
^/libparrot\.def/
^/libparrot\.dll$
^/libparrot\.dll/
+^/libparrot\.dll\.a$
+^/libparrot\.dll\.a/
^/miniparrot$
^/miniparrot/
^/myconfig$
@@ -474,8 +412,6 @@
^/parrot_nci_thunk_gen\.pbc/
^/parrot_old$
^/parrot_old/
-^/parrot_test_run\.tar\.gz$
-^/parrot_test_run\.tar\.gz/
^/pbc_disassemble$
^/pbc_disassemble/
^/pbc_dump$
@@ -498,6 +434,8 @@
^/runtime/parrot/dynext/.*\.def/
^/runtime/parrot/dynext/.*\.dll$
^/runtime/parrot/dynext/.*\.dll/
+^/runtime/parrot/dynext/.*\.dll\.a$
+^/runtime/parrot/dynext/.*\.dll\.a/
^/runtime/parrot/dynext/.*\.dylib$
^/runtime/parrot/dynext/.*\.dylib/
^/runtime/parrot/dynext/.*\.exe$
@@ -636,6 +574,8 @@
^/src/dynoplibs/.*\.c/
^/src/dynoplibs/.*\.dll$
^/src/dynoplibs/.*\.dll/
+^/src/dynoplibs/.*\.dll\.a$
+^/src/dynoplibs/.*\.dll\.a/
^/src/dynoplibs/.*\.exp$
^/src/dynoplibs/.*\.exp/
^/src/dynoplibs/.*\.gcda$
@@ -672,6 +612,8 @@
^/src/dynpmc/.*\.def/
^/src/dynpmc/.*\.dll$
^/src/dynpmc/.*\.dll/
+^/src/dynpmc/.*\.dll\.a$
+^/src/dynpmc/.*\.dll\.a/
^/src/dynpmc/.*\.dump$
^/src/dynpmc/.*\.dump/
^/src/dynpmc/.*\.dylib$
@@ -872,6 +814,8 @@
^/src/string/encoding/.*\.obj/
^/src/string/private_cstring\.h$
^/src/string/private_cstring\.h/
+^/t/archive/parrot_test_run\.tar\.gz$
+^/t/archive/parrot_test_run\.tar\.gz/
^/t/benchmark/.*\.pasm$
^/t/benchmark/.*\.pasm/
^/t/benchmark/.*\.pir$
View
10 MANIFEST.generated
@@ -1,11 +1,11 @@
# 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.3.8.0.dylib [main]lib
+blib/lib/libparrot.3.10.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.3.8.0 [main]lib
+blib/lib/libparrot.so.3.10.0 [main]lib
compilers/data_json/data_json.pbc [data_json]
config/gen/call_list/opengl.in []
docs/ops/bit.pod [doc]
@@ -35,11 +35,13 @@ include/parrot/has_header.h [main]include
include/parrot/pbcversion.h [devel]include
include/parrot/vtable.h [main]include
include/pmc/pmc_addrregistry.h [devel]include
+include/pmc/pmc_alarm.h [devel]include
include/pmc/pmc_arrayiterator.h [devel]include
include/pmc/pmc_bigint.h [devel]include
include/pmc/pmc_bignum.h [devel]include
include/pmc/pmc_boolean.h [devel]include
include/pmc/pmc_bytebuffer.h [devel]include
+include/pmc/pmc_callback.h [devel]include
include/pmc/pmc_callcontext.h [devel]include
include/pmc/pmc_capture.h [devel]include
include/pmc/pmc_class.h [devel]include
@@ -103,6 +105,7 @@ include/pmc/pmc_packfilesegment.h [devel]include
include/pmc/pmc_packfileview.h [devel]include
include/pmc/pmc_parrotinterpreter.h [devel]include
include/pmc/pmc_parrotlibrary.h [devel]include
+include/pmc/pmc_pmclist.h [devel]include
include/pmc/pmc_pmcproxy.h [devel]include
include/pmc/pmc_pointer.h [devel]include
include/pmc/pmc_ptr.h [devel]include
@@ -348,11 +351,13 @@ src/nci.c []
src/null_config.c []
src/parrot_config.c []
src/pmc/addrregistry.dump [devel]src
+src/pmc/alarm.dump [devel]src
src/pmc/arrayiterator.dump [devel]src
src/pmc/bigint.dump [devel]src
src/pmc/bignum.dump [devel]src
src/pmc/boolean.dump [devel]src
src/pmc/bytebuffer.dump [devel]src
+src/pmc/callback.dump [devel]src
src/pmc/callcontext.dump [devel]src
src/pmc/capture.dump [devel]src
src/pmc/class.dump [devel]src
@@ -415,6 +420,7 @@ src/pmc/packfilesegment.dump [devel]src
src/pmc/packfileview.dump [devel]src
src/pmc/parrotinterpreter.dump [devel]src
src/pmc/parrotlibrary.dump [devel]src
+src/pmc/pmclist.dump [devel]src
src/pmc/pmcproxy.dump [devel]src
src/pmc/pointer.dump [devel]src
src/pmc/ptr.dump [devel]src
View
1  PBC_COMPAT
@@ -28,6 +28,7 @@
# please insert tab separated entries at the top of the list
+12.0 2011.10.18 dukeleto released 3.9.0
11.0 2011.07.19 jkeenan released 3.6.0
10.0 2011.01.18 cotto released 3.0.0
9.0 2010.10.19 gerd released 2.9.0
View
2  README
@@ -1,4 +1,4 @@
-This is Parrot, version 3.8.0
+This is Parrot, version 3.10.0
------------------------------
Parrot is Copyright (C) 2001-2011, Parrot Foundation.
View
2  RESPONSIBLE_PARTIES
@@ -16,7 +16,7 @@ Architect Christoph Otto
Product Manager Andrew Whitworth
-Project Manager James E Keenan
+Project Manager
Community Manager Jonathan "Duke" Leto
View
2  VERSION
@@ -1 +1 @@
-3.8.0
+3.10.0
View
10 api.yaml
@@ -1,5 +1,12 @@
---
-
+ name: 'Op new_si is deprecated'
+ note: "new_si op used to create empty string with reserved capacity. In non-mutable strings world of modern parrot this doesn't make sense. new_s to create new empty string will remain"
+ tags:
+ - 'deprecated'
+ - 'Opcodes'
+ ticket: 'https://github.com/parrot/parrot/issues/203'
+-
name: 'Experimental Select PMC'
note: 'The Select PMC is experimental until its interface gets some exercise. See ticket for more information.'
tags:
@@ -558,6 +565,9 @@
PObj flag C<PObj_constant_FLAG> and related macros will be removed.
ticket : 'https://trac.parrot.org/parrot/ticket/1875'
+ tags:
+ - 'deprecated'
+ - 'completed'
-
name : 'Non-const STRING* arguments'
eligible : '3.1'
View
2  compilers/imcc/Rules.in
@@ -87,7 +87,6 @@ compilers/imcc/parser_util$(O) : \
include/imcc/yyscanner.h \
include/imcc/embed.h \
$(INC_DIR)/dynext.h \
- $(INC_DIR)/embed.h \
$(INC_DIR)/oplib/ops.h \
$(PARROT_H_HEADERS) \
include/pmc/pmc_sub.h
@@ -192,7 +191,6 @@ compilers/imcc/main$(O) : \
compilers/imcc/symreg.h \
compilers/imcc/unit.h \
include/imcc/yyscanner.h \
- $(INC_DIR)/embed.h \
$(INC_DIR)/oplib/ops.h \
$(INC_DIR)/runcore_api.h \
$(INC_DIR)/api.h \
View
3  compilers/imcc/imc.h
@@ -423,7 +423,8 @@ typedef struct subs_t {
SymHash fixup; /* currently set_p_pc sub names only */
int ins_line; /* line number for debug */
int n_basic_blocks; /* block count */
- int pmc_const; /* index in const table */
+ int pmc_const; /* sub pmc index in const table */
+ int lexinfo_const; /* lexinfo pmc index in const table */
size_t size; /* code size in ops */
} subs_t;
View
6 compilers/imcc/imcc.y
@@ -488,6 +488,12 @@ mk_pmc_const_named(ARGMOD(imc_info_t *imcc), ARGMOD(IMC_Unit *unit),
rhs->usage |= U_FIXUP | U_SUBID_LOOKUP;
}
+ else if (strncmp(unquoted_name, "LexInfo", name_length) == 0) {
+ rhs = mk_const(imcc, const_name, 'l');
+ if (!ascii)
+ rhs->type |= VT_ENCODED;
+ rhs->usage |= U_FIXUP | U_LEXINFO_LOOKUP;
+ }
else {
rhs = mk_const(imcc, const_name, 'P');
}
View
6 compilers/imcc/imcparser.c
@@ -568,6 +568,12 @@ mk_pmc_const_named(ARGMOD(imc_info_t *imcc), ARGMOD(IMC_Unit *unit),
rhs->usage |= U_FIXUP | U_SUBID_LOOKUP;
}
+ else if (strncmp(unquoted_name, "LexInfo", name_length) == 0) {
+ rhs = mk_const(imcc, const_name, 'l');
+ if (!ascii)
+ rhs->type |= VT_ENCODED;
+ rhs->usage |= U_FIXUP | U_LEXINFO_LOOKUP;
+ }
else {
rhs = mk_const(imcc, const_name, 'P');
}
View
7 compilers/imcc/main.c
@@ -29,7 +29,7 @@ IMCC helpers.
#include <stdlib.h>
#include "imc.h"
-#include "parrot/embed.h"
+#include "parrot/parrot.h"
#include "parrot/longopt.h"
#include "parrot/runcore_api.h"
#include "pmc/pmc_callcontext.h"
@@ -553,8 +553,9 @@ imcc_run_compilation_internal(ARGMOD(imc_info_t *imcc), ARGIN(STRING *source),
yyscan_t yyscanner = imcc_get_scanner(imcc);
PackFile * const pf_raw = PackFile_new(imcc->interp, 0);
PMC * const old_packfilepmc = Parrot_pf_get_current_packfile(imcc->interp);
- PMC * const packfilepmc = Parrot_pf_get_packfile_pmc(imcc->interp, pf_raw);
- INTVAL success = 0;
+ STRING * const pf_path = is_file ? source : STRINGNULL;
+ PMC * const packfilepmc = Parrot_pf_get_packfile_pmc(imcc->interp, pf_raw, pf_path);
+ INTVAL success = 0;
/* TODO: Don't set current packfile in the interpreter. Leave the
interpreter alone */
View
1  compilers/imcc/parser_util.c
@@ -19,7 +19,6 @@
#include "imc.h"
#include "parrot/dynext.h"
-#include "parrot/embed.h"
#include "pmc/pmc_sub.h"
#include "pmc/pmc_callcontext.h"
#include "pbc.h"
View
34 compilers/imcc/pbc.c
@@ -516,6 +516,7 @@ make_new_sub(ARGMOD(imc_info_t * imcc), ARGIN(IMC_Unit *unit))
s->prev = imcc->globals->cs->subs;
s->unit = unit;
s->pmc_const = -1;
+ s->lexinfo_const = -1;
if (imcc->globals->cs->subs)
imcc->globals->cs->subs->next = s;
@@ -609,6 +610,9 @@ store_fixup(ARGMOD(imc_info_t * imcc), ARGIN(const SymReg *r), int pc, int offse
if (r->usage & U_SUBID_LOOKUP)
fixup->usage = U_SUBID_LOOKUP;
+ if (r->usage & U_LEXINFO_LOOKUP)
+ fixup->usage = U_LEXINFO_LOOKUP;
+
if (r->usage & U_LEXICAL)
fixup->usage |= U_LEXICAL;
@@ -933,6 +937,24 @@ fixup_globals(ARGMOD(imc_info_t * imcc))
/* s1 = find_sub_by_subid(interp, fixup->name, &pc); */
s1 = find_sub_by_subid(imcc, fixup->name, s, &pc);
}
+ else if (fixup->usage & U_LEXINFO_LOOKUP) {
+ s1 = find_sub_by_subid(imcc, fixup->name, s, &pc);
+ if (!s1 || s1->pmc_const == -1)
+ IMCC_fataly(imcc, EXCEPTION_INVALID_OPERATION,
+ "Sub '%s' not found\n", fixup->name);
+ if (s1->lexinfo_const == -1) {
+ PackFile_ConstTable * const ct = bc->const_table;
+ PMC *sub_pmc = ct->pmc.constants[s1->pmc_const];
+ Parrot_Sub_attributes *sub;
+ PMC_get_sub(imcc->interp, sub_pmc, sub);
+ if (!sub->lex_info)
+ IMCC_fataly(imcc, EXCEPTION_INVALID_OPERATION,
+ "Sub '%s' does not have a lexinfo\n", fixup->name);
+ s1->lexinfo_const = add_const_table_pmc(imcc, sub->lex_info);
+ }
+ bc->base.data[addr+fixup->offset] = s1->lexinfo_const;
+ continue;
+ }
else
s1 = find_global_label(imcc, fixup->name, s, &pc);
@@ -1538,7 +1560,7 @@ add_const_pmc_sub(ARGMOD(imc_info_t * imcc), ARGMOD(SymReg *r), size_t offs,
break;
case 'S':
if (ns_const >= 0 && ns_const < ct->str.const_count) {
- ns_pmc = Parrot_pmc_new_constant(imcc->interp, enum_class_String);
+ ns_pmc = Parrot_pmc_new(imcc->interp, enum_class_String);
VTABLE_set_string_native(imcc->interp, ns_pmc,
ct->str.constants[ns_const]);
}
@@ -1726,12 +1748,12 @@ build_key(ARGMOD(imc_info_t * imcc), ARGIN(SymReg *key_reg),
SymReg *r = reg;
if (tail) {
- PMC * temp = Parrot_pmc_new_constant(imcc->interp, enum_class_Key);
+ PMC * temp = Parrot_pmc_new(imcc->interp, enum_class_Key);
SETATTR_Key_next_key(imcc->interp, tail, temp);
GETATTR_Key_next_key(imcc->interp, tail, tail);
}
else {
- head = tail = Parrot_pmc_new_constant(imcc->interp, enum_class_Key);
+ head = tail = Parrot_pmc_new(imcc->interp, enum_class_Key);
}
switch (r->type) {
@@ -1739,8 +1761,8 @@ build_key(ARGMOD(imc_info_t * imcc), ARGIN(SymReg *key_reg),
case VTPASM: /* P[S0] */
case VTREG: /* P[S0] */
- /* if key is a register, the original sym is in r->reg */
- if (r->reg)
+ /* if key is a copy created by link_keys, use the original */
+ if (r->reg && r->reg->type == r->type)
r = r->reg;
/* don't emit mapped regs in key parts */
@@ -1990,7 +2012,7 @@ make_pmc_const(ARGMOD(imc_info_t * imcc), ARGMOD(SymReg *r))
else
s = Parrot_str_unescape(imcc->interp, r->name, 0, NULL);
- p = Parrot_pmc_new_constant(imcc->interp, r->pmc_type);
+ p = Parrot_pmc_new(imcc->interp, r->pmc_type);
switch (r->pmc_type) {
case enum_class_Integer:
View
13 compilers/imcc/symreg.h
@@ -32,12 +32,13 @@ enum VARTYPE { /* variable type can be */
#define REG_NEEDS_ALLOC(r) ((r)->type & VTREGISTER)
enum USAGE {
- U_KEYED = 1 << 0, /* array, hash, keyed */
- U_NEW = 1 << 1, /* PMC was inited */
- U_GLOBAL = 1 << 3, /* symbol is global (fixup) */
- U_LEXICAL = 1 << 4, /* symbol is lexical */
- U_FIXUP = 1 << 5, /* maybe not global, force fixup */
- U_SUBID_LOOKUP = 1 << 6 /* .const 'Sub' lookup is done by subid */
+ U_KEYED = 1 << 0, /* array, hash, keyed */
+ U_NEW = 1 << 1, /* PMC was inited */
+ U_GLOBAL = 1 << 3, /* symbol is global (fixup) */
+ U_LEXICAL = 1 << 4, /* symbol is lexical */
+ U_FIXUP = 1 << 5, /* maybe not global, force fixup */
+ U_SUBID_LOOKUP = 1 << 6, /* .const 'Sub' lookup is done by subid */
+ U_LEXINFO_LOOKUP = 1 << 7 /* .const 'LexInfo' lookup is done by subid */
};
typedef struct _SymReg {
View
2  compilers/opsc/src/Ops/Compiler/Actions.pm
@@ -520,7 +520,7 @@ method term:sym<str> ($/) {
method term:sym<float_constant_long> ($/) { # longer to work-around lack of LTM
make PAST::Val.new(
- :value(~$/),
+ :value(~$/[0]),
:returns<float>
);
}
View
25 compilers/opsc/src/Ops/Compiler/Grammar.pm
@@ -183,7 +183,7 @@ token statement {
token label {
[
- | 'case' <.ws> [ <integer> | <identifier> ] ':'
+ | 'case' <.ws> [ <integer> | <identifier> | "'" <alnum> "'" ] ':'
| 'default:'
| <identifier> ':'
]
@@ -198,24 +198,23 @@ rule statement_control:sym<if> {
}
rule statement_control:sym<while> {
- <sym> '(' <condition=.EXPR> ')'
+ <sym> '(' ~ ')' <condition=.EXPR>
<statement_list=.statement_or_block>
}
rule statement_control:sym<for> {
- <sym> '(' <init=.EXPR>? ';' <test=.EXPR>? ';' <step=.EXPR>? ')'
+ <sym> '(' ~ ')' [ <init=.EXPR>? ';' <test=.EXPR>? ';' <step=.EXPR>? ]
<statement_list=.statement_or_block>
}
rule statement_control:sym<do-while> {
- 'do' <blockoid> 'while' '(' <condition=.EXPR> ')'
+ 'do' <blockoid> 'while' '(' ~ ')' <condition=.EXPR>
}
# Not real "C" switch. Just close enough
rule statement_control:sym<switch> {
- <sym> '(' <test=.EXPR> ')' '{'
+ <sym> '(' <test=.EXPR> ')' '{' ~ '}'
<statement_list>
- '}'
}
rule statement_control:sym<break> { <sym> }
@@ -232,16 +231,17 @@ token term:sym<concatenate_strings> { # Long-long name as LTM workaround
}
token term:sym<call> {
- <identifier> <.ws> '(' <arglist> ')'
+ <identifier> <.ws> '(' ~ ')' <arglist>
}
token term:sym<int> { <integer> ('u'|'U'|'l'|'L')* }
token term:sym<str> { <quote> }
token term:sym<float_constant_long> { # longer to work-around lack of LTM
- [
+ (
| \d+ '.' \d*
| \d* '.' \d+
- ]
+ )
+ <[fF]>?
}
token term:sym<reg> {
@@ -350,7 +350,7 @@ token prefix:sym<~> { <sym> <O('%symbolic_unary :pirop<~>')> }
token prefix:sym<return> { <sym> <O('%symbolic_unary :pirop<return>')> }
rule blockoid {
- '{' <mixed_content> '}'
+ '{' ~ '}' <mixed_content>
}
rule mixed_content {
@@ -371,17 +371,18 @@ rule pointer { <star> 'const'? }
token star { '*' }
rule pointerless_type {
- 'struct'? 'const'? <identifier>
+ 'struct'? 'const'? 'unsigned'? <identifier>
}
rule type_declarator {
- 'struct'? 'const'? <identifier> <pointer>*
+ 'struct'? 'const'? 'unsigned'? <identifier> <pointer>*
}
token eat_terminator {
| ';'
| <?MARKED('endstmt')>
| $
+ | <.panic('Statement not properly terminated')>
}
token pod_ws {
View
250 compilers/pct/src/PAST/Compiler.pir
@@ -155,7 +155,7 @@ any value type.
## type of exception handler we support
.local pmc controltypes
controltypes = new 'Hash'
- controltypes['CONTROL'] = '.CONTROL_RETURN, .CONTROL_OK, .CONTROL_BREAK, .CONTROL_CONTINUE, .CONTROL_TAKE, .CONTROL_LEAVE, .CONTROL_EXIT, .CONTROL_LOOP_NEXT, .CONTROL_LOOP_LAST, .CONTROL_LOOP_REDO'
+ controltypes['CONTROL'] = '.CONTROL_ALL'
controltypes['RETURN'] = '.CONTROL_RETURN'
controltypes['OK'] = '.CONTROL_OK'
controltypes['BREAK'] = '.CONTROL_BREAK'
@@ -202,6 +202,8 @@ Compile the abstract syntax tree given by C<past> into POST.
.lex '@*BLOCKPAST', blockpast
null $P99
.lex '$*SUB', $P99
+ null $P98
+ .lex '%*LEXREGS', $P98
.local pmc tempregs
tempregs = find_dynamic_lex '%*TEMPREGS'
@@ -849,17 +851,15 @@ Return the POST representation of a C<PAST::Control>.
.param pmc options :slurpy :named
# Probably not safe to use tempregs in an exception handler
- .local pmc tempregs
- null tempregs
+ .local pmc tempregs
+ null tempregs
.lex '%*TEMPREGS', tempregs
- .local pmc ops, children, ishandled, nothandled
+ .local pmc ops, children, ishandled
.local string handled
$P0 = get_hll_global ['POST'], 'Label'
$S0 = self.'unique'('handled_')
ishandled = $P0.'new'('result'=>$S0)
- $S0 = self.'unique'('nothandled_')
- nothandled = $P0.'new'('result'=>$S0)
$P0 = get_hll_global ['POST'], 'Ops'
ops = $P0.'new'('node'=>node)
.local string rtype
@@ -874,88 +874,140 @@ Return the POST representation of a C<PAST::Control>.
ops.'push'(children)
handled = self.'uniquereg'('I')
ops.'push_pirop'('set', handled, 'exception["handled"]')
- ops.'push_pirop'('ne', handled, 1, nothandled)
- ops.'push'(ishandled)
- ops.'push_pirop'('return', 'exception')
- ops.'push'(nothandled)
+ ops.'push_pirop'('eq', handled, 1, ishandled)
ops.'push_pirop'('rethrow', 'exception')
+ ops.'push'(ishandled)
+ ops.'result'('exception')
.return (ops)
.end
+.sub 'push_exception_handler' :method
+ .param pmc node
+ .param pmc ops
+ .param pmc label
+
+ .local string type, extype
+ type = node.'handle_types'()
+ extype = node.'handle_types_except'()
+ if type goto handler_need_exhandler
+ if extype goto handler_need_exhandler
+ ops.'push_pirop'('push_eh', label)
+ .return ()
+
+ handler_need_exhandler:
+ .local pmc controltypes, subpost
+ .local string ehreg
+ subpost = find_dynamic_lex '$*SUB'
+ ehreg = self.'uniquereg'('P')
+ unless type, no_handle_types
+ controltypes = get_global '%!controltypes'
+ type = controltypes[type]
+ unless type, no_handle_types
+ $P0 = split ',', type
+ $S0 = join ';', $P0
+ $S0 = concat '[', $S0
+ $S0 = concat $S0, ']'
+ ops.'push_pirop'('new', ehreg, "'ExceptionHandler'", $S0)
+ subpost.'add_directive'('.include "except_types.pasm"')
+ goto handle_types_done
+ no_handle_types:
+ ops.'push_pirop'('new', ehreg, "'ExceptionHandler'")
+ handle_types_done:
+ ops.'push_pirop'('set_label', ehreg, label)
+ unless extype, handle_types_except_done
+ controltypes = get_global '%!controltypes'
+ extype = controltypes[extype]
+ unless extype, handle_types_except_done
+ $P0 = split ',', extype
+ ops.'push_pirop'('callmethod', '"handle_types_except"', ehreg, $P0 :flat)
+ subpost.'add_directive'('.include "except_types.pasm"')
+ handle_types_except_done:
+ ops.'push_pirop'('push_eh', ehreg)
+ .return ()
+.end
+
.sub 'wrap_handlers' :method
.param pmc child
.param pmc ehs
.param pmc options :slurpy :named
- .local string rtype
+ .local string rtype, result
+ .local int addreturn
rtype = options['rtype']
+ addreturn = options['addreturn']
+ if addreturn goto wrap_no_result
+ result = self.'tempreg'(rtype)
+ wrap_no_result:
- # Probably not safe to use tempregs in an exception handler
- .local pmc tempregs
- null tempregs
+ # Probably not safe to use tempregs in an exception handler
+ .local pmc tempregs
+ null tempregs
.lex '%*TEMPREGS', tempregs
- .local pmc it, node, ops, pops, tail, skip
+ .local pmc it, node, ops, tail, skip
+ .local int depth
$P0 = get_hll_global ['POST'], 'Ops'
ops = $P0.'new'('node'=>node)
$P0 = get_hll_global ['POST'], 'Ops'
- pops = $P0.'new'('node'=>node)
- $P0 = get_hll_global ['POST'], 'Ops'
tail = $P0.'new'('node'=>node)
$P0 = get_hll_global ['POST'], 'Label'
$S0 = self.'unique'('skip_handler_')
skip = $P0.'new'('result'=>$S0)
+ ops.'result'(result)
+ unless result goto wrap_child_no_result
+ child = self.'coerce'(child, result)
+ wrap_child_no_result:
+
it = iter ehs
+ depth = 0
handler_loop:
unless it, handler_loop_done
node = shift it
- .local pmc ehpir, label, controltypes, subpost
- .local string ehreg, type
+ .local pmc ehpir, label
+ .local string exceptreg
$P0 = get_hll_global ['POST'], 'Label'
$S0 = self.'unique'('control_')
label = $P0.'new'('result'=>$S0)
-
- subpost = find_dynamic_lex '$*SUB'
-
- ehreg = self.'uniquereg'('P')
- ops.'push_pirop'('new', ehreg, "'ExceptionHandler'")
- ops.'push_pirop'('set_label', ehreg, label)
- controltypes = get_global '%!controltypes'
- type = node.'handle_types'()
- unless type, handle_types_done
- type = controltypes[type]
- unless type, handle_types_done
- $P0 = split ',', type
- ops.'push_pirop'('callmethod', '"handle_types"', ehreg, $P0 :flat)
- subpost.'add_directive'('.include "except_types.pasm"')
- handle_types_done:
- type = node.'handle_types_except'()
- unless type, handle_types_except_done
- type = controltypes[type]
- unless type, handle_types_except_done
- $P0 = split ',', type
- ops.'push_pirop'('callmethod', '"handle_types_except"', ehreg, $P0 :flat)
- subpost.'add_directive'('.include "except_types.pasm"')
- handle_types_except_done:
- ops.'push_pirop'('push_eh', ehreg)
-
- # Add one pop_eh for every handler we push_eh
- pops.'push_pirop'('pop_eh')
+ self.'push_exception_handler'(node, ops, label)
+ inc depth
# Push the handler itself
tail.'push'(label)
+ exceptreg = self.'uniquereg'('P')
+ tail.'push_pirop'('peek_exception', exceptreg)
ehpir = self.'as_post'(node, 'rtype'=>rtype)
+ unless result goto handler_loop_no_result
+ ehpir = self.'coerce'(ehpir, result)
+ handler_loop_no_result:
tail.'push'(ehpir)
-
+ tail.'push_pirop'('finalize', exceptreg)
+ unless addreturn goto handler_loop_no_return
+ .local pmc retval
+ retval = ehpir.'result'()
+ tail.'push_pirop'('return', retval)
+ goto handler_loop
+ handler_loop_no_return:
+ tail.'push_pirop'('pop_upto_eh', exceptreg)
+ $I0 = depth
+ pops_loop_handler:
+ tail.'push_pirop'('pop_eh')
+ dec $I0
+ if $I0 goto pops_loop_handler
+ unless it, handler_loop_done
+ tail.'push_pirop'('goto', skip)
goto handler_loop
handler_loop_done:
ops.'push'(child)
-
-
- ops.'push'(pops)
+ $I0 = depth
+ unless $I0 goto pops_done
+ pops_loop:
+ ops.'push_pirop'('pop_eh')
+ dec $I0
+ if $I0 goto pops_loop
+ pops_done:
ops.'push_pirop'('goto', skip)
ops.'push'(tail)
ops.'push'(skip)
@@ -1095,6 +1147,11 @@ Return the POST representation of a C<PAST::Block>.
have_tempregs:
.lex '%*TEMPREGS', tempregs
+ .local pmc lexregs, outerlexregs
+ outerlexregs = find_dynamic_lex '%*LEXREGS'
+ null lexregs
+ .lex '%*LEXREGS', lexregs
+
## control exception handler
.local pmc ctrlpast, ctrllabel
ctrlpast = node.'control'()
@@ -1103,7 +1160,7 @@ Return the POST representation of a C<PAST::Block>.
$S0 = self.'unique'('control_')
ctrllabel = $P0.'new'('result'=>$S0)
$S0 = self.'uniquereg'('P')
- bpost.'push_pirop'('new', $S0, "['ExceptionHandler']", '.CONTROL_RETURN')
+ bpost.'push_pirop'('new', $S0, "'ExceptionHandler'", '[.CONTROL_RETURN]')
bpost.'push_pirop'('set_label', $S0, ctrllabel)
bpost.'push_pirop'('push_eh', $S0)
bpost.'add_directive'('.include "except_types.pasm"')
@@ -1117,18 +1174,15 @@ Return the POST representation of a C<PAST::Block>.
## convert children to post
.local pmc ops, retval
ops = self.'post_children'(node, 'signature'=>$S0)
+ ## result of last child is return from block
+ retval = ops[-1]
+ ops.'result'(retval)
## wrap the child with appropriate exception handlers, if any
.local pmc eh
eh = node.'handlers'()
unless eh, no_eh
- $S0 = options['rtype']
- retval = ops[-1]
- ops = self.'wrap_handlers'(ops, eh, 'rtype'=>$S0)
- goto had_eh
+ ops = self.'wrap_handlers'(ops, eh, 'rtype'=>'*', 'addreturn'=>1)
no_eh:
- ## result of last child is return from block
- retval = ops[-1]
- had_eh:
bpost.'push'(ops)
bpost.'push_pirop'('return', retval)
@@ -1180,6 +1234,9 @@ Return the POST representation of a C<PAST::Block>.
## restore the outer temporary register bank
store_lex '%*TEMPREGS', outerregs
+ ## restore the outer lexical register hash
+ store_lex '%*LEXREGS', outerlexregs
+
## restore previous outer scope and symtable
setattribute self, '%!symtable', outersym
@@ -1586,9 +1643,8 @@ Generate a standard loop with NEXT/LAST/REDO exception handling.
.local string handreg
handreg = self.'tempreg'('P')
- ops.'push_pirop'('new', handreg, "'ExceptionHandler'")
+ ops.'push_pirop'('new', handreg, "'ExceptionHandler'", "[.CONTROL_LOOP_NEXT;.CONTROL_LOOP_REDO;.CONTROL_LOOP_LAST]")
ops.'push_pirop'('set_label', handreg, handlabel)
- ops.'push_pirop'('callmethod', '"handle_types"', handreg, '.CONTROL_LOOP_NEXT', '.CONTROL_LOOP_REDO', '.CONTROL_LOOP_LAST')
ops.'push_pirop'('push_eh', handreg)
unless bodyfirst goto bodyfirst_done
@@ -1614,6 +1670,8 @@ Generate a standard loop with NEXT/LAST/REDO exception handling.
ops.'push'(handlabel)
ops.'push_pirop'('.local pmc exception')
ops.'push_pirop'('.get_results (exception)')
+ # should probably also finalize the exception
+ ops.'push_pirop'('pop_upto_eh', 'exception')
$S0 = self.'tempreg'('P')
ops.'push_pirop'('getattribute', $S0, 'exception', "'type'")
ops.'push_pirop'('eq', $S0, '.CONTROL_LOOP_NEXT', nextlabel)
@@ -1875,7 +1933,7 @@ a return value.
=item try(PAST::Op node)
Return the POST representation of a C<PAST::Op>
-node with a 'pasttype' of bind. The first child
+node with a 'pasttype' of try. The first child
is the code to be surrounded by an exception handler,
the second child (if any) is the code to process the
handler.
@@ -1897,13 +1955,18 @@ handler.
$S0 = concat $S0, '_end'
endlabel = $P0.'new'('result'=>$S0)
- .local string rtype
+ .local string rtype, result
rtype = options['rtype']
+ result = self.'tempreg'(rtype)
+ ops.'result'(result)
.local pmc trypast, trypost
trypast = node[0]
trypost = self.'as_post'(trypast, 'rtype'=>rtype)
- ops.'push_pirop'('push_eh', catchlabel)
+ unless result goto trypost_no_result
+ trypost = self.'coerce'(trypost, result)
+ trypost_no_result:
+ self.'push_exception_handler'(node, ops, catchlabel)
ops.'push'(trypost)
ops.'push_pirop'('pop_eh')
.local pmc elsepast, elsepost
@@ -1914,15 +1977,23 @@ handler.
else_done:
ops.'push_pirop'('goto', endlabel)
ops.'push'(catchlabel)
+ .local string exceptreg
+ exceptreg = self.'uniquereg'('P')
+ ops.'push_pirop'('peek_exception', exceptreg)
.local pmc catchpast, catchpost
catchpast = node[1]
- if null catchpast goto catch_done
- catchpost = self.'as_post'(catchpast, 'rtype'=>'v')
+ if null catchpast goto catchpost_done
+ catchpost = self.'as_post'(catchpast, 'rtype'=>rtype)
+ unless result goto catchpost_no_result
+ catchpost = self.'coerce'(catchpost, result)
+ catchpost_no_result:
ops.'push'(catchpost)
- ops.'push_pirop'('pop_eh') # FIXME: should be before catchpost
+ catchpost_done:
+ ops.'push_pirop'('finalize', exceptreg)
+ ops.'push_pirop'('pop_upto_eh', exceptreg)
+ ops.'push_pirop'('pop_eh')
catch_done:
ops.'push'(endlabel)
- ops.'result'(trypost)
.return (ops)
.end
@@ -2362,6 +2433,16 @@ attribute.
unless $I0 goto param_lex_done
name = self.'escape'(name)
ops.'push_pirop'('.lex', name, ops)
+ .local int directaccess
+ directaccess = node.'directaccess'()
+ unless directaccess goto param_lex_done
+ .local pmc lexregs
+ lexregs = find_dynamic_lex '%*LEXREGS'
+ unless null lexregs goto have_lexregs
+ lexregs = new 'Hash'
+ store_dynamic_lex '%*LEXREGS', lexregs
+ have_lexregs:
+ lexregs[name] = pname
param_lex_done:
.return (ops)
.end
@@ -2420,6 +2501,9 @@ attribute.
name = node.'name'()
name = self.'escape'(name)
+ .local pmc lexregs
+ lexregs = find_dynamic_lex '%*LEXREGS'
+
.local int isdecl
isdecl = node.'isdecl'()
@@ -2430,6 +2514,14 @@ attribute.
$P0 = get_hll_global ['POST'], 'Ops'
ops = $P0.'new'('node'=>node)
$P0 = get_hll_global ['POST'], 'Op'
+ if null lexregs goto no_lexregs
+ .local string lexreg
+ lexreg = lexregs[name]
+ unless lexreg goto no_lexregs
+ fetchop = $P0.'new'(ops, lexreg, 'pirop'=>'set')
+ storeop = $P0.'new'(lexreg, ops, 'pirop'=>'set')
+ .tailcall self.'vivify'(node, ops, fetchop, storeop)
+ no_lexregs:
fetchop = $P0.'new'(ops, name, 'pirop'=>'find_lex')
storeop = $P0.'new'(name, ops, 'pirop'=>'store_lex')
.tailcall self.'vivify'(node, ops, fetchop, storeop)
@@ -2451,10 +2543,25 @@ attribute.
have_lexreg:
ops.'push_pirop'('.lex', name, lexreg)
ops.'result'(lexreg)
+ .local int directaccess
+ directaccess = node.'directaccess'()
+ unless directaccess goto no_directaccess
+ unless null lexregs goto have_lexregs
+ lexregs = new 'Hash'
+ store_dynamic_lex '%*LEXREGS', lexregs
+ have_lexregs:
+ lexregs[name] = lexreg
+ no_directaccess:
.return (ops)
lexical_bind:
$P0 = get_hll_global ['POST'], 'Op'
+ if null lexregs goto no_lexregs_bind
+ .local string lexreg
+ lexreg = lexregs[name]
+ unless lexreg goto no_lexregs_bind
+ .tailcall $P0.'new'(lexreg, bindpost, 'pirop'=>'set', 'result'=>bindpost)
+ no_lexregs_bind:
.tailcall $P0.'new'(name, bindpost, 'pirop'=>'store_lex', 'result'=>bindpost)
.end
@@ -2765,7 +2872,16 @@ to have a PMC generated containing the constant value.
value_block:
.local string blockreg, blockref
blockreg = self.'uniquereg'('P')
+ returns = node.'returns'()
+ if null returns goto value_block_no_returns
+ $S0 = returns
+ blockref = concat ".const '", $S0
+ blockref = concat blockref, "' "
+ blockref = concat blockref, blockreg
+ goto value_block_blockref_set
+ value_block_no_returns:
blockref = concat ".const 'Sub' ", blockreg
+ value_block_blockref_set:
blockref = concat blockref, ' = '
$P0 = value.'subid'()
$S0 = self.'escape'($P0)
View
71 compilers/pct/src/PAST/Node.pir
@@ -104,6 +104,14 @@ Accessor method -- sets/returns the "flatten" flag on arguments.
.tailcall self.'attr'('flat', value, has_value)
.end
+
+=item handlers([node array])
+
+Accessor method -- sets/returns handlers associated with this node.
+Handlers can be used for PAST::Block and PAST::Stmts nodes.
+
+=cut
+
.sub 'handlers' :method
.param pmc value :optional
.param int has_value :opt_flag
@@ -111,6 +119,37 @@ Accessor method -- sets/returns the "flatten" flag on arguments.
.end
+=item handle_types([value])
+
+Accessor method -- sets/returns the exception types this node
+handles. This is evaluated if the node is used as a block
+handler, the node is a PAST::Control node, or the node is
+a PAST::Op node of type 'try'.
+
+=cut
+
+.sub 'handle_types' :method
+ .param pmc value :optional
+ .param int has_value :opt_flag
+ .tailcall self.'attr'('handle_types', value, has_value)
+.end
+
+
+=item handle_types_except([value])
+
+Accessor method -- sets/returns the exception types this node
+does not handle. Same as handle_types, but all exceptions not
+matching the specified ones will be caught.
+
+=cut
+
+.sub 'handle_types_except' :method
+ .param pmc value :optional
+ .param int has_value :opt_flag
+ .tailcall self.'attr'('handle_types_except', value, has_value)
+.end
+
+
=item lvalue([flag])
Get/set the C<lvalue> attribute, which indicates whether this
@@ -239,6 +278,23 @@ Otherwise, the node refers to a lexical variable from an outer scope.
.end
+=item directaccess([flag])
+
+Get/set the node's C<directaccess> attribute (for lexical variables) to C<flag>.
+A true value of C<isdecl> indicates that the variable given by this node
+can be accessed directly through the assigned register without going
+through the lexpad. Otherwise, find_lex/store_lex instructions will be used
+for retrieval and storage.
+
+=cut
+
+.sub 'directaccess' :method
+ .param pmc value :optional
+ .param int has_value :opt_flag
+ .tailcall self.'attr'('directaccess', value, has_value)
+.end
+
+
=item namespace([namespace])
Get/set the variable's namespace attribute to the array of strings
@@ -842,21 +898,6 @@ outer statement.
.end
-.namespace [ 'PAST';'Control' ]
-
-.sub 'handle_types' :method
- .param pmc value :optional
- .param int has_value :opt_flag
- .tailcall self.'attr'('handle_types', value, has_value)
-.end
-
-.sub 'handle_types_except' :method
- .param pmc value :optional
- .param int has_value :opt_flag
- .tailcall self.'attr'('handle_types_except', value, has_value)
-.end
-
-
.namespace [ 'PAST';'VarList' ]
.sub 'bindvalue' :method
View
10 compilers/pct/src/PCT/HLLCompiler.pir
@@ -855,6 +855,10 @@ Generic method for compilers invoked from a shell command line.
$I0 = adverbs['version']
if $I0 goto version
+ .local string target
+ target = adverbs['target']
+ target = downcase target
+
.local int can_backtrace, ll_backtrace
can_backtrace = can self, 'backtrace'
unless can_backtrace goto no_push_eh
@@ -882,6 +886,9 @@ Generic method for compilers invoked from a shell command line.
goto save_output
eval_line:
result = self.'eval'($S0, '-e', args :flat, adverbs :flat :named)
+ if target == '' goto save_output
+ if target == 'pir' goto save_output
+ '_dumper'(result, target)
save_output:
unless can_backtrace goto no_pop_eh
@@ -890,9 +897,6 @@ Generic method for compilers invoked from a shell command line.
if null result goto end
$I0 = defined result
unless $I0 goto end
- .local string target
- target = adverbs['target']
- target = downcase target
if target != 'pir' goto end
.local string output
.local pmc ofh
View
15 compilers/pct/src/PCT/Node.pir
@@ -46,7 +46,7 @@ Other node attributes are generally defined by subclasses of C<PCT::Node>.
=item init([child1, child2, ..., ] [attr1=>val1, attr2=>val2, ... ])
Initialize a node with the given children and attributes.
-Adds each child to the node (using the C<push> method, below) and
+Adds each child to the node (using the C<append> method, below) and
calls the appropriate accessor method for each attribute.
And returns the node.
@@ -56,15 +56,13 @@ And returns the node.
.param pmc children :slurpy
.param pmc adverbs :slurpy :named
- .local pmc it
- it = iter children
- children_loop:
- unless it goto children_end
- $P0 = shift it
- push self, $P0
- goto children_loop
+ $I0 = elements children
+ unless $I0 goto children_end
+ $P0 = self.'list'()
+ $P0.'append'(children)
children_end:
+ .local pmc it
it = iter adverbs
adverbs_loop:
unless it goto adverbs_end
@@ -74,7 +72,6 @@ And returns the node.
self.$P1($P0)
goto adverbs_loop
adverbs_end:
- end:
.return (self)
.end
View
1  compilers/pge/PGE/Exp.pir
@@ -1272,6 +1272,7 @@ tree as a PIR code object that can be compiled.
dec rep
goto %L_2
CODE
+ .return (1)
.end
View
1  config/auto/warnings.pm
@@ -190,6 +190,7 @@ sub _init {
-Wunused-label
-Wunused-value
-Wunused-variable
+ -Wzero-as-null-pointer-constant
) ];
$gcc->{'cage'} = $gcc_or_gpp_cage;
View
8 config/gen/makefiles.pm
@@ -29,9 +29,6 @@ sub _init {
'Makefile' => {
SOURCE => 'config/gen/makefiles/root.in',
},
- 'ext/Makefile' => {
- SOURCE => 'config/gen/makefiles/ext.in',
- },
'compilers/imcc/Rules.mak' => {
SOURCE => 'compilers/imcc/Rules.in',
},
@@ -42,11 +39,6 @@ sub _init {
SOURCE => 'src/dynoplibs/Defines.in',
},
- 'ext/Parrot-Embed/Makefile.PL' => {
- SOURCE => 'config/gen/makefiles/parrot_embed_pl.in',
- conditioned_lines => 1,
- },
-
'src/dynpmc/Rules.mak' => {
SOURCE => 'src/dynpmc/Rules.in',
},
View
67 config/gen/makefiles/ext.in
@@ -1,67 +0,0 @@
-# Copyright (C) 2006-2009, Parrot Foundation.
-
-# setup of commands
-@make_set_make@
-MAKE = @make@
-PERL = @perl@
-RM_F = @rm_f@
-
-# add new languages here
-# remove obsolete languages here
-EXT = \
- Parrot-Embed
-
-# the default target
-all: $(EXT)
-
-# hard-code these for now
-test: Parrot-Embed
- - cd Parrot-Embed && $(MAKE) test
-
-
-# This is a listing of all targets, that are meant to be called by users
-help:
- @echo ""
- @echo "Following targets are available for the user:"
- @echo ""
- @echo " all: Make a lot of language implementations."
- @echo " This is the default."
- @echo " test: Unified test suite for a lot of languages."
- @echo ""
- @echo " clean: Clean up a lot of languages."
- @echo ""
- @echo " help: Print this help message."
- @echo ""
- @echo "Following languages are available:"
- @echo " $(LANGUAGES)"
- @echo "A particular language <lang> can be built, tested and cleand up"
- @echo " make <lang>"
- @echo " make <lang>.test"
- @echo " make <lang>.clean"
- @echo "For the status of individual languages see:"
- @echo " https://trac.parrot.org/parrot/wiki/Languages"
- @echo ""
-
-clean: \
- Parrot-Embed.clean
-
-#
-# Extension specific targets
-#
-
-# The *.dummy targets are a replacement for the target .PHONY in 'GNU make'
-
-Parrot-Embed : Parrot-Embed.dummy
-
-Parrot-Embed.dummy:
-#IF(win32): - cd Parrot-Embed && $(PERL) Makefile.PL && nmake
-#UNLESS(win32): - cd Parrot-Embed && $(PERL) Makefile.PL && $(MAKE)
-
-Parrot-Embed.clean:
-#IF(win32): - cd Parrot-Embed && nmake clean
-#UNLESS(win32): - cd Parrot-Embed && $(MAKE) clean
-
-# Local variables:
-# mode: makefile
-# End:
-# vim: ft=make:
View
93 config/gen/makefiles/root.in
@@ -151,7 +151,6 @@ GEN_MAKEFILES = \
Makefile \
docs/Makefile \
editor/Makefile \
- ext/Makefile \
src/dynoplibs/Rules.mak \
src/dynoplibs/Defines.mak \
src/dynpmc/Rules.mak \
@@ -214,7 +213,6 @@ GEN_PM_INCLUDES = \
CONFIGURE_GENERATED_FILES = \
$(GEN_CONFIGS) \