Guest User

Untitled

a guest
Feb 20th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.91 KB | None | 0 0
  1. Index: parse.y
  2. ===================================================================
  3. --- parse.y (revision 6446)
  4. +++ parse.y (working copy)
  5. @@ -6168,6 +6168,11 @@
  6. * :wait2, :$>]
  7. */
  8.  
  9. +struct st_table *
  10. +rb_parse_sym_tbl() {
  11. + return sym_tbl;
  12. +}
  13. +
  14. VALUE
  15. rb_sym_all_symbols()
  16. {
  17. Index: parse.c
  18. ===================================================================
  19. --- parse.c (revision 6446)
  20. +++ parse.c (working copy)
  21. @@ -11157,6 +11157,11 @@
  22. * :wait2, :$>]
  23. */
  24.  
  25. +struct st_table *
  26. +rb_parse_sym_tbl() {
  27. + return sym_tbl;
  28. +}
  29. +
  30. VALUE
  31. rb_sym_all_symbols()
  32. {
  33. Index: gc.c
  34. ===================================================================
  35. --- gc.c (revision 6446)
  36. +++ gc.c (working copy)
  37. @@ -260,8 +260,6 @@
  38. }
  39. }
  40.  
  41. -#undef GC_DEBUG
  42. -
  43. void
  44. rb_global_variable(var)
  45. VALUE *var;
  46. @@ -296,10 +294,8 @@
  47. struct RVarmap varmap;
  48. struct SCOPE scope;
  49. } as;
  50. -#ifdef GC_DEBUG
  51. char *file;
  52. int line;
  53. -#endif
  54. } RVALUE;
  55.  
  56. #if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__CYGWIN__)
  57. @@ -318,6 +314,22 @@
  58. static int heaps_length = 0;
  59. static int heaps_used = 0;
  60.  
  61. +struct heaps_slot *
  62. +rb_gc_heap_slots()
  63. +{
  64. + return heaps;
  65. +}
  66. +
  67. +int
  68. +rb_gc_heaps_used() {
  69. + return heaps_used;
  70. +}
  71. +
  72. +int
  73. +rb_gc_heaps_length() {
  74. + return heaps_length;
  75. +}
  76. +
  77. #define HEAP_MIN_SLOTS 10000
  78. static int heap_slots = HEAP_MIN_SLOTS;
  79.  
  80. @@ -386,16 +398,19 @@
  81. rb_newobj()
  82. {
  83. VALUE obj;
  84. -
  85. +
  86. if (!freelist) garbage_collect();
  87.  
  88. obj = (VALUE)freelist;
  89. freelist = freelist->as.free.next;
  90. - MEMZERO((void*)obj, RVALUE, 1);
  91. -#ifdef GC_DEBUG
  92. - RANY(obj)->file = ruby_sourcefile;
  93. - RANY(obj)->line = ruby_sourceline;
  94. -#endif
  95. +
  96. + MEMZERO((void*)obj, RVALUE, 1);
  97. +
  98. + if (ruby_current_node && ruby_current_node->nd_file) {
  99. + RANY(obj)->file = ruby_current_node->nd_file;
  100. + RANY(obj)->line = nd_line(ruby_current_node);
  101. + }
  102. +
  103. return obj;
  104. }
  105.  
  106. @@ -732,7 +747,10 @@
  107. if (rb_special_const_p(ptr)) return; /* special const not marked */
  108. if (obj->as.basic.flags == 0) return; /* free cell */
  109. if (obj->as.basic.flags & FL_MARK) return; /* already marked */
  110. +
  111. obj->as.basic.flags |= FL_MARK;
  112. + /* mark our new reference point for sourcefile objects */
  113. + mark_source_filename(RANY(obj)->file);
  114.  
  115. if (lev > GC_LEVEL_MAX || (lev == 0 && ruby_stack_check())) {
  116. if (!mark_stack_overflow) {
  117. Index: version.h
  118. ===================================================================
  119. --- version.h (revision 6439)
  120. +++ version.h (working copy)
  121. @@ -2,7 +2,7 @@
  122. #define RUBY_RELEASE_DATE "2008-06-20"
  123. #define RUBY_VERSION_CODE 186
  124. #define RUBY_RELEASE_CODE 20080620
  125. -#define RUBY_PATCHLEVEL 230
  126. +#define RUBY_PATCHLEVEL 902
  127.  
  128. #define RUBY_VERSION_MAJOR 1
  129. #define RUBY_VERSION_MINOR 8
Add Comment
Please, Sign In to add comment