Permalink
Browse files

[gc_api] Behold! Parrot is entering an age of slightly less lousy GC!…

… Merging the gc_api branch into trunk, all tests pass.

git-svn-id: https://svn.parrot.org/parrot/trunk@38654 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information...
1 parent 57a39d4 commit b354cdb3c2bd4f3b366aed0b8a40b79299400d9d @Whiteknight Whiteknight committed May 9, 2009
Showing with 2,675 additions and 2,275 deletions.
  1. +0 −3 MANIFEST
  2. +1 −1 config/gen/parrot_include.pm
  3. +1 −1 docs/dev/pmc_freeze.pod
  4. +2 −2 docs/pdds/pdd09_gc.pod
  5. +2 −2 docs/pmc.pod
  6. +367 −156 include/parrot/gc_api.h
  7. +0 −269 include/parrot/gc_mark_sweep.h
  8. +0 −179 include/parrot/gc_pools.h
  9. +0 −7 include/parrot/memory.h
  10. +0 −3 include/parrot/parrot.h
  11. +0 −224 include/parrot/resources.h
  12. +0 −3 include/parrot/stacks.h
  13. +1 −1 src/dynpmc/dynlexpad.pmc
  14. +2 −2 src/dynpmc/pair.pmc
  15. +1,079 −189 src/gc/api.c
  16. +657 −0 src/gc/gc_private.h
  17. +9 −10 src/gc/generational_ms.c
  18. +5 −5 src/gc/incremental_ms.c
  19. +82 −86 src/gc/mark_sweep.c
  20. +0 −38 src/gc/memory.c
  21. +116 −251 src/gc/pools.c
  22. +17 −16 src/gc/res_lea.c
  23. +58 −383 src/gc/resources.c
  24. +4 −4 src/gc/system.c
  25. +4 −4 src/hash.c
  26. +1 −1 src/interp/inter_cb.c
  27. +9 −11 src/interp/inter_create.c
  28. +13 −28 src/interp/inter_misc.c
  29. +7 −7 src/io/buffer.c
  30. +1 −1 src/io/core.c
  31. +1 −1 src/io/filehandle.c
  32. +1 −1 src/io/utf8.c
  33. +2 −2 src/key.c
  34. +14 −14 src/list.c
  35. +1 −1 src/oo.c
  36. +5 −6 src/ops/core.ops
  37. +2 −2 src/ops/string.ops
  38. +1 −1 src/packfile.c
  39. +5 −45 src/pmc.c
  40. +1 −9 src/pmc/array.pmc
  41. +6 −6 src/pmc/callsignature.pmc
  42. +1 −1 src/pmc/capture.pmc
  43. +13 −13 src/pmc/class.pmc
  44. +3 −3 src/pmc/cpointer.pmc
  45. +3 −3 src/pmc/default.pmc
  46. +1 −1 src/pmc/eval.pmc
  47. +3 −3 src/pmc/eventhandler.pmc
  48. +5 −5 src/pmc/exception.pmc
  49. +2 −2 src/pmc/exceptionhandler.pmc
  50. +3 −3 src/pmc/exporter.pmc
  51. +4 −4 src/pmc/filehandle.pmc
  52. +1 −1 src/pmc/fixedpmcarray.pmc
  53. +1 −1 src/pmc/fixedstringarray.pmc
  54. +2 −2 src/pmc/iterator.pmc
  55. +5 −5 src/pmc/namespace.pmc
  56. +2 −2 src/pmc/nci.pmc
  57. +3 −3 src/pmc/object.pmc
  58. +2 −2 src/pmc/orderedhash.pmc
  59. +2 −2 src/pmc/packfile.pmc
  60. +3 −3 src/pmc/packfileannotationkeys.pmc
  61. +2 −2 src/pmc/packfileannotations.pmc
  62. +2 −2 src/pmc/packfileconstanttable.pmc
  63. +1 −1 src/pmc/packfiledirectory.pmc
  64. +1 −1 src/pmc/packfilefixupentry.pmc
  65. +1 −1 src/pmc/packfilefixuptable.pmc
  66. +1 −1 src/pmc/packfilerawsegment.pmc
  67. +1 −1 src/pmc/packfilesegment.pmc
  68. +2 −2 src/pmc/parrotinterpreter.pmc
  69. +12 −12 src/pmc/pmcproxy.pmc
  70. +4 −11 src/pmc/retcontinuation.pmc
  71. +5 −5 src/pmc/role.pmc
  72. +1 −1 src/pmc/scalar.pmc
  73. +5 −5 src/pmc/scheduler.pmc
  74. +1 −1 src/pmc/schedulermessage.pmc
  75. +2 −2 src/pmc/socket.pmc
  76. +1 −1 src/pmc/string.pmc
  77. +4 −4 src/pmc/stringhandle.pmc
  78. +9 −9 src/pmc/sub.pmc
  79. +2 −2 src/pmc/task.pmc
  80. +1 −1 src/pmc/unmanagedstruct.pmc
  81. +7 −95 src/pmc_freeze.c
  82. +11 −9 src/runcore/cores.c
  83. +8 −14 src/stacks.c
  84. +21 −24 src/string/api.c
  85. +4 −4 src/string/charset/ascii.c
  86. +4 −4 src/string/charset/iso-8859-1.c
  87. +4 −4 src/string/charset/unicode.c
  88. +3 −3 src/string/encoding/utf16.c
  89. +3 −3 src/string/encoding/utf8.c
  90. +8 −8 src/sub.c
  91. +3 −3 src/thread.c
  92. +5 −5 src/vtables.c
View
@@ -950,8 +950,6 @@ include/parrot/exec.h [main]include
include/parrot/exit.h [main]include
include/parrot/extend.h [main]include
include/parrot/gc_api.h [main]include
-include/parrot/gc_mark_sweep.h [main]include
-include/parrot/gc_pools.h [main]include
include/parrot/global.h [main]include
include/parrot/global_setup.h [main]include
include/parrot/hash.h [main]include
@@ -981,7 +979,6 @@ include/parrot/pmc.h [main]include
include/parrot/pmc_freeze.h [main]include
include/parrot/pobj.h [main]include
include/parrot/register.h [main]include
-include/parrot/resources.h [main]include
include/parrot/runcore_api.h [main]include
include/parrot/runcore_trace.h [main]include
include/parrot/scheduler.h [main]include
@@ -38,11 +38,11 @@ sub _init {
include/parrot/longopt.h
include/parrot/multidispatch.h
include/parrot/packfile.h
- include/parrot/resources.h
include/parrot/stat.h
include/parrot/string.h
include/parrot/pmc.h
include/parrot/warnings.h
+ include/parrot/gc_api.h
src/pmc/timer.pmc
src/utils.c
) ];
View
@@ -58,7 +58,7 @@ destroyed in an appropriate order. This is also called on interpreter shutdown.
=item mark
-Mark all objects as being live by calling B<pobject_lives> called from GC.
+Mark all objects as being live by calling B<Parrot_gc_mark_PObj_alive> called from GC.
While the functionality is the same, it will not be implemented on top of this
general scheme for performance reasons. This leads to some code duplication,
but GC is run permanently and deserves all the speed it can get.
View
@@ -380,7 +380,7 @@ order to complete an entire run of an incremental collector.
For a concurrent collector, calls to this function may activate a concurrent
collection thread or, if such a thread is already running, do nothing at all.
-The C<do_gc_mark> function is called from the C<Parrot_do_gc_run> function,
+The C<do_gc_mark> function is called from the C<Parrot_gc_mark_and_sweep> function,
and should not usually be called directly.
C<flags> is one of:
@@ -570,7 +570,7 @@ within C<src/gc/api.c:Parrot_gc_free_pmc>.
=item PObj_custom_mark_FLAG
The C<mark> vtable slot will be called during the GC mark phase. The mark
-function must call C<pobject_lives> for all non-NULL objects (Buffers and
+function must call C<Parrot_gc_mark_PObj_alive> for all non-NULL objects (Buffers and
PMCs) that PMC refers to. This flag is typically tested and the custom mark
VTABLE method called from C<src/gc/api.c:mark_special>.
View
@@ -87,7 +87,7 @@ information. See C<include/parrot/key.h> and C<src/pmc/key.pmc> for examples.
=head1 PMCs and GC
The GC system doesn't make any assumptions about your PMC's layout. Whenever a
-PMC is found in the root set, B<pobject_lives()> is called with that PMC. The
+PMC is found in the root set, B<Parrot_gc_mark_PObj_alive()> is called with that PMC. The
PMC is responsible to mark all contained or referenced active Parrot objects
(Buffers, STRINGs or other PMCs) when its C<mark()> VTABLE function is called.
@@ -107,7 +107,7 @@ below.
If your PMC contains any other B<PObj>s (STRINGs, PMCs, etc), your PMC must
implement the B<mark()> VTABLE function and set this flag. The B<mark()>
-VTABLE function must call B<pobject_lives()> on all B<PObj>s which your PMC
+VTABLE function must call B<Parrot_gc_mark_PObj_alive()> on all B<PObj>s which your PMC
contains.
=item PObj_active_destroy_FLAG
Oops, something went wrong.

0 comments on commit b354cdb

Please sign in to comment.