debase-ruby_core_source 0.9.9 → 0.9.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/addr2line.h +0 -0
  4. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/ccan/build_assert/build_assert.h +0 -0
  5. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/ccan/check_type/check_type.h +0 -0
  6. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/ccan/container_of/container_of.h +0 -0
  7. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/ccan/list/list.h +28 -166
  8. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/ccan/str/str.h +0 -0
  9. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/constant.h +3 -10
  10. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/dln.h +0 -0
  11. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.2.8-p477}/eval_intern.h +49 -89
  12. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/gc.h +1 -8
  13. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.2.8-p477}/id.h +5 -15
  14. data/lib/debase/ruby_core_source/ruby-2.2.8-p477/insns.inc +107 -0
  15. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/insns_info.inc +45 -89
  16. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.2.8-p477}/internal.h +164 -666
  17. data/lib/debase/ruby_core_source/ruby-2.2.8-p477/iseq.h +158 -0
  18. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/known_errors.inc +0 -0
  19. data/lib/debase/ruby_core_source/ruby-2.2.8-p477/method.h +144 -0
  20. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/node.h +42 -18
  21. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/node_name.inc +6 -2
  22. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.2.8-p477}/opt_sc.inc +0 -40
  23. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/optinsn.inc +0 -0
  24. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.2.8-p477}/optunifs.inc +0 -5
  25. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/parse.h +8 -28
  26. data/lib/debase/ruby_core_source/ruby-2.2.8-p477/probes_helper.h +67 -0
  27. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/regenc.h +16 -16
  28. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/regint.h +10 -33
  29. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/regparse.h +1 -5
  30. data/lib/debase/ruby_core_source/ruby-2.2.8-p477/revision.h +1 -0
  31. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/ruby_atomic.h +5 -68
  32. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/siphash.h +0 -0
  33. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.2.8-p477}/symbol.h +13 -33
  34. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/thread_pthread.h +2 -2
  35. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/thread_win32.h +0 -0
  36. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/timev.h +0 -0
  37. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/transcode_data.h +7 -23
  38. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/version.h +10 -31
  39. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.2.8-p477}/vm.inc +497 -542
  40. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.2.8-p477}/vm_core.h +305 -784
  41. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/vm_debug.h +0 -0
  42. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/vm_exec.h +0 -0
  43. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.2.8-p477}/vm_insnhelper.h +56 -50
  44. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/vm_opts.h +7 -8
  45. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/vmtc.inc +0 -5
  46. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/addr2line.h +0 -0
  47. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/ccan/build_assert/build_assert.h +0 -0
  48. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/ccan/check_type/check_type.h +0 -0
  49. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/ccan/container_of/container_of.h +0 -0
  50. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/ccan/list/list.h +0 -0
  51. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/ccan/str/str.h +0 -0
  52. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/constant.h +1 -1
  53. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/dln.h +0 -0
  54. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/encindex.h +0 -0
  55. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/eval_intern.h +3 -4
  56. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/gc.h +0 -0
  57. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.3.5-p376}/id.h +0 -9
  58. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/id_table.h +0 -0
  59. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/insns.inc +46 -48
  60. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/insns_info.inc +0 -20
  61. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/internal.h +58 -290
  62. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/iseq.h +15 -18
  63. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/known_errors.inc +0 -0
  64. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/method.h +2 -2
  65. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.3.5-p376}/node.h +2 -2
  66. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/node_name.inc +0 -0
  67. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.3.5-p376}/opt_sc.inc +0 -16
  68. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/optinsn.inc +0 -0
  69. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.3.5-p376}/optunifs.inc +0 -2
  70. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.3.5-p376}/parse.h +8 -27
  71. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/probes_helper.h +0 -0
  72. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/regenc.h +14 -14
  73. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/regint.h +0 -8
  74. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/regparse.h +0 -0
  75. data/lib/debase/ruby_core_source/ruby-2.3.5-p376/revision.h +1 -0
  76. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/ruby_atomic.h +0 -0
  77. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/siphash.h +0 -0
  78. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.3.5-p376}/symbol.h +3 -3
  79. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/thread_pthread.h +0 -0
  80. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/thread_win32.h +0 -0
  81. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/timev.h +0 -0
  82. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/transcode_data.h +0 -0
  83. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.3.5-p376}/version.h +9 -27
  84. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/vm.inc +255 -264
  85. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/vm_call_iseq_optimized.inc +5 -5
  86. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/vm_core.h +37 -28
  87. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/vm_debug.h +0 -0
  88. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/vm_exec.h +0 -0
  89. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/vm_insnhelper.h +32 -16
  90. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/vm_opts.h +0 -0
  91. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/vmtc.inc +0 -2
  92. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/addr2line.h +0 -0
  93. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/ccan/build_assert/build_assert.h +0 -0
  94. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/ccan/check_type/check_type.h +0 -0
  95. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/ccan/container_of/container_of.h +0 -0
  96. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/ccan/list/list.h +0 -0
  97. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/ccan/str/str.h +0 -0
  98. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/constant.h +0 -0
  99. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/dln.h +0 -0
  100. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/encindex.h +0 -0
  101. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/eval_intern.h +0 -0
  102. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/gc.h +0 -0
  103. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/id.h +0 -0
  104. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/id_table.h +0 -0
  105. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/insns.inc +0 -0
  106. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/insns_info.inc +0 -0
  107. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/internal.h +116 -51
  108. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/iseq.h +0 -0
  109. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/known_errors.inc +0 -0
  110. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/method.h +0 -0
  111. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/node.h +2 -2
  112. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/node_name.inc +0 -0
  113. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/opt_sc.inc +0 -0
  114. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/optinsn.inc +0 -0
  115. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/optunifs.inc +0 -0
  116. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/parse.h +8 -27
  117. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/probes_helper.h +0 -0
  118. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/regenc.h +79 -67
  119. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/regint.h +187 -244
  120. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/regparse.h +30 -27
  121. data/lib/debase/ruby_core_source/ruby-2.4.2-p198/revision.h +1 -0
  122. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/ruby_assert.h +0 -0
  123. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/ruby_atomic.h +0 -0
  124. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/siphash.h +0 -0
  125. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/symbol.h +0 -0
  126. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/thread_pthread.h +0 -0
  127. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/thread_win32.h +0 -0
  128. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/timev.h +0 -0
  129. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/transcode_data.h +0 -0
  130. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/version.h +6 -6
  131. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/vm.inc +37 -34
  132. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/vm_call_iseq_optimized.inc +0 -0
  133. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/vm_core.h +9 -7
  134. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/vm_debug.h +0 -0
  135. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/vm_exec.h +0 -0
  136. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/vm_insnhelper.h +30 -14
  137. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/vm_opts.h +0 -0
  138. data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/vmtc.inc +0 -0
  139. data/lib/debase/ruby_core_source/version.rb +1 -1
  140. metadata +138 -143
  141. data/lib/debase/ruby_core_source/ruby-2.4.0-preview1/method.h +0 -213
  142. data/lib/debase/ruby_core_source/ruby-2.4.0-preview1/revision.h +0 -1
  143. data/lib/debase/ruby_core_source/ruby-2.4.0-preview2/revision.h +0 -1
  144. data/lib/debase/ruby_core_source/ruby-2.4.0-preview2/ruby_assert.h +0 -54
  145. data/lib/debase/ruby_core_source/ruby-2.4.0-preview3/encindex.h +0 -67
  146. data/lib/debase/ruby_core_source/ruby-2.4.0-preview3/id_table.h +0 -31
  147. data/lib/debase/ruby_core_source/ruby-2.4.0-preview3/insns.inc +0 -112
  148. data/lib/debase/ruby_core_source/ruby-2.4.0-preview3/iseq.h +0 -252
  149. data/lib/debase/ruby_core_source/ruby-2.4.0-preview3/probes_helper.h +0 -43
  150. data/lib/debase/ruby_core_source/ruby-2.4.0-preview3/revision.h +0 -1
  151. data/lib/debase/ruby_core_source/ruby-2.4.0-preview3/ruby_assert.h +0 -54
  152. data/lib/debase/ruby_core_source/ruby-2.4.0-preview3/vm_call_iseq_optimized.inc +0 -212
@@ -23,25 +23,31 @@ extern "C" {
23
23
  #endif
24
24
  #endif
25
25
 
26
- #define LIKELY(x) RB_LIKELY(x)
27
- #define UNLIKELY(x) RB_UNLIKELY(x)
26
+ /* likely */
27
+ #if __GNUC__ >= 3
28
+ #define LIKELY(x) (__builtin_expect(!!(x), 1))
29
+ #define UNLIKELY(x) (__builtin_expect(!!(x), 0))
30
+ #else /* __GNUC__ >= 3 */
31
+ #define LIKELY(x) (x)
32
+ #define UNLIKELY(x) (x)
33
+ #endif /* __GNUC__ >= 3 */
28
34
 
29
35
  #ifndef __has_attribute
30
36
  # define __has_attribute(x) 0
31
37
  #endif
32
38
 
33
- #if __has_attribute(__unused__)
34
- #define UNINITIALIZED_VAR(x) x __attribute__((__unused__))
39
+ #if __has_attribute(unused)
40
+ #define UNINITIALIZED_VAR(x) x __attribute__((unused))
35
41
  #elif defined(__GNUC__) && __GNUC__ >= 3
36
42
  #define UNINITIALIZED_VAR(x) x = x
37
43
  #else
38
44
  #define UNINITIALIZED_VAR(x) x
39
45
  #endif
40
46
 
41
- #if __has_attribute(__warn_unused_result__)
42
- #define WARN_UNUSED_RESULT(x) x __attribute__((__warn_unused_result__))
43
- #elif GCC_VERSION_SINCE(3,4,0)
44
- #define WARN_UNUSED_RESULT(x) x __attribute__((__warn_unused_result__))
47
+ #if __has_attribute(warn_unused_result)
48
+ #define WARN_UNUSED_RESULT(x) x __attribute__((warn_unused_result))
49
+ #elif defined(__GNUC__) && (__GNUC__ * 1000 + __GNUC_MINOR__) >= 3004
50
+ #define WARN_UNUSED_RESULT(x) x __attribute__((warn_unused_result))
45
51
  #else
46
52
  #define WARN_UNUSED_RESULT(x) x
47
53
  #endif
@@ -61,6 +67,12 @@ extern "C" {
61
67
 
62
68
  #define numberof(array) ((int)(sizeof(array) / sizeof((array)[0])))
63
69
 
70
+ #define GCC_VERSION_SINCE(major, minor, patchlevel) \
71
+ (defined(__GNUC__) && !defined(__INTEL_COMPILER) && \
72
+ ((__GNUC__ > (major)) || \
73
+ (__GNUC__ == (major) && __GNUC_MINOR__ > (minor)) || \
74
+ (__GNUC__ == (major) && __GNUC_MINOR__ == (minor) && __GNUC_PATCHLEVEL__ >= (patchlevel))))
75
+
64
76
  #ifndef __has_feature
65
77
  # define __has_feature(x) 0
66
78
  #endif
@@ -254,156 +266,6 @@ nlz_int128(uint128_t x)
254
266
  }
255
267
  #endif
256
268
 
257
- static inline int
258
- nlz_intptr(uintptr_t x) {
259
- #if SIZEOF_VOIDP == 8
260
- return nlz_long_long(x);
261
- #elif SIZEOF_VOIDP == 4
262
- return nlz_int(x);
263
- #endif
264
- }
265
-
266
- static inline int
267
- rb_popcount32(uint32_t x) {
268
- #ifdef HAVE_BUILTIN___BUILTIN_POPCOUNT
269
- return __builtin_popcount(x);
270
- #else
271
- x = (x & 0x55555555) + (x >> 1 & 0x55555555);
272
- x = (x & 0x33333333) + (x >> 2 & 0x33333333);
273
- x = (x & 0x0f0f0f0f) + (x >> 4 & 0x0f0f0f0f);
274
- x = (x & 0x001f001f) + (x >> 8 & 0x001f001f);
275
- return (x & 0x0000003f) + (x >>16 & 0x0000003f);
276
- #endif
277
- }
278
-
279
- static inline int
280
- rb_popcount64(uint64_t x) {
281
- #ifdef HAVE_BUILTIN___BUILTIN_POPCOUNT
282
- return __builtin_popcountll(x);
283
- #else
284
- x = (x & 0x5555555555555555) + (x >> 1 & 0x5555555555555555);
285
- x = (x & 0x3333333333333333) + (x >> 2 & 0x3333333333333333);
286
- x = (x & 0x0707070707070707) + (x >> 4 & 0x0707070707070707);
287
- x = (x & 0x001f001f001f001f) + (x >> 8 & 0x001f001f001f001f);
288
- x = (x & 0x0000003f0000003f) + (x >>16 & 0x0000003f0000003f);
289
- return (x & 0x7f) + (x >>32 & 0x7f);
290
- #endif
291
- }
292
-
293
- static inline int
294
- rb_popcount_intptr(uintptr_t x) {
295
- #if SIZEOF_VOIDP == 8
296
- return rb_popcount64(x);
297
- #elif SIZEOF_VOIDP == 4
298
- return rb_popcount32(x);
299
- #endif
300
- }
301
-
302
- static inline int
303
- ntz_int32(uint32_t x) {
304
- #ifdef HAVE_BUILTIN___BUILTIN_CTZ
305
- return __builtin_ctz(x);
306
- #else
307
- return rb_popcount32((~x) & (x-1));
308
- #endif
309
- }
310
-
311
- static inline int
312
- ntz_int64(uint64_t x) {
313
- #ifdef HAVE_BUILTIN___BUILTIN_CTZLL
314
- return __builtin_ctzll(x);
315
- #else
316
- return rb_popcount64((~x) & (x-1));
317
- #endif
318
- }
319
-
320
- static inline int
321
- ntz_intptr(uintptr_t x) {
322
- #if SIZEOF_VOIDP == 8
323
- return ntz_int64(x);
324
- #elif SIZEOF_VOIDP == 4
325
- return ntz_int32(x);
326
- #endif
327
- }
328
-
329
- #if HAVE_LONG_LONG && SIZEOF_LONG * 2 <= SIZEOF_LONG_LONG
330
- # define DLONG LONG_LONG
331
- # define DL2NUM(x) LL2NUM(x)
332
- #elif defined(HAVE_INT128_T)
333
- # define DLONG int128_t
334
- # define DL2NUM(x) (RB_FIXABLE(x) ? LONG2FIX(x) : rb_int128t2big(x))
335
- VALUE rb_int128t2big(int128_t n);
336
- #endif
337
-
338
- /* arguments must be Fixnum */
339
- static inline VALUE
340
- rb_fix_mul_fix(VALUE x, VALUE y)
341
- {
342
- long lx = FIX2LONG(x);
343
- long ly = FIX2LONG(y);
344
- #ifdef DLONG
345
- return DL2NUM((DLONG)lx * (DLONG)ly);
346
- #else
347
- if (MUL_OVERFLOW_FIXNUM_P(lx, ly)) {
348
- return rb_big_mul(rb_int2big(lx), rb_int2big(ly));
349
- }
350
- else {
351
- return LONG2FIX(lx * ly);
352
- }
353
- #endif
354
- }
355
-
356
- /*
357
- * This behaves different from C99 for negative arguments.
358
- * Note that div may overflow fixnum.
359
- */
360
- static inline void
361
- rb_fix_divmod_fix(VALUE a, VALUE b, VALUE *divp, VALUE *modp)
362
- {
363
- /* assume / and % comply C99.
364
- * ldiv(3) won't be inlined by GCC and clang.
365
- * I expect / and % are compiled as single idiv.
366
- */
367
- long x = FIX2LONG(a);
368
- long y = FIX2LONG(b);
369
- long div, mod;
370
- if (x == FIXNUM_MIN && y == -1) {
371
- if (divp) *divp = LONG2NUM(-FIXNUM_MIN);
372
- if (modp) *modp = LONG2FIX(0);
373
- return;
374
- }
375
- div = x / y;
376
- mod = x % y;
377
- if (y > 0 ? mod < 0 : mod > 0) {
378
- mod += y;
379
- div -= 1;
380
- }
381
- if (divp) *divp = LONG2FIX(div);
382
- if (modp) *modp = LONG2FIX(mod);
383
- }
384
-
385
- /* div() for Ruby
386
- * This behaves different from C99 for negative arguments.
387
- */
388
- static inline VALUE
389
- rb_fix_div_fix(VALUE x, VALUE y)
390
- {
391
- VALUE div;
392
- rb_fix_divmod_fix(x, y, &div, NULL);
393
- return div;
394
- }
395
-
396
- /* mod() for Ruby
397
- * This behaves different from C99 for negative arguments.
398
- */
399
- static inline VALUE
400
- rb_fix_mod_fix(VALUE x, VALUE y)
401
- {
402
- VALUE mod;
403
- rb_fix_divmod_fix(x, y, NULL, &mod);
404
- return mod;
405
- }
406
-
407
269
  #if defined(HAVE_UINT128_T)
408
270
  # define bit_length(x) \
409
271
  (sizeof(x) <= SIZEOF_INT ? SIZEOF_INT * CHAR_BIT - nlz_int((unsigned int)(x)) : \
@@ -502,7 +364,6 @@ struct RBignum {
502
364
  : (RBASIC(b)->flags &= ~BIGNUM_SIGN_BIT))
503
365
  #define BIGNUM_POSITIVE_P(b) BIGNUM_SIGN(b)
504
366
  #define BIGNUM_NEGATIVE_P(b) (!BIGNUM_SIGN(b))
505
- #define BIGNUM_NEGATE(b) (RBASIC(b)->flags ^= BIGNUM_SIGN_BIT)
506
367
 
507
368
  #define BIGNUM_EMBED_FLAG FL_USER2
508
369
  #define BIGNUM_EMBED_LEN_MASK (FL_USER5|FL_USER4|FL_USER3)
@@ -528,8 +389,6 @@ struct RRational {
528
389
  };
529
390
 
530
391
  #define RRATIONAL(obj) (R_CAST(RRational)(obj))
531
- #define RRATIONAL_SET_NUM(rat, n) RB_OBJ_WRITE((rat), &((struct RRational *)(rat))->num,(n))
532
- #define RRATIONAL_SET_DEN(rat, d) RB_OBJ_WRITE((rat), &((struct RRational *)(rat))->den,(d))
533
392
 
534
393
  struct RFloat {
535
394
  struct RBasic basic;
@@ -604,7 +463,7 @@ typedef unsigned long rb_serial_t;
604
463
  struct rb_classext_struct {
605
464
  struct st_table *iv_index_tbl;
606
465
  struct st_table *iv_tbl;
607
- struct rb_id_table *const_tbl;
466
+ struct st_table *const_tbl;
608
467
  struct rb_id_table *callable_m_tbl;
609
468
  rb_subclass_entry_t *subclasses;
610
469
  rb_subclass_entry_t **parent_subclasses;
@@ -724,6 +583,8 @@ struct vm_svar {
724
583
 
725
584
  /* THROW_DATA */
726
585
 
586
+ #define THROW_DATA_CONSUMED IMEMO_FL_USER0
587
+
727
588
  struct vm_throw_data {
728
589
  VALUE flags;
729
590
  VALUE reserved;
@@ -732,7 +593,7 @@ struct vm_throw_data {
732
593
  VALUE throw_state;
733
594
  };
734
595
 
735
- #define THROW_DATA_P(err) RB_TYPE_P((err), T_IMEMO)
596
+ #define THROW_DATA_P(err) RB_TYPE_P((VALUE)(err), T_IMEMO)
736
597
 
737
598
  /* IFUNC */
738
599
 
@@ -773,45 +634,6 @@ struct MEMO {
773
634
  #define MEMO_FOR(type, value) ((type *)RARRAY_PTR(value))
774
635
  #define NEW_MEMO_FOR(type, value) \
775
636
  ((value) = rb_ary_tmp_new_fill(type_roomof(type, VALUE)), MEMO_FOR(type, value))
776
- #define NEW_PARTIAL_MEMO_FOR(type, value, member) \
777
- ((value) = rb_ary_tmp_new_fill(type_roomof(type, VALUE)), \
778
- rb_ary_set_len((value), offsetof(type, member) / sizeof(VALUE)), \
779
- MEMO_FOR(type, value))
780
-
781
- #define STRING_P(s) (RB_TYPE_P((s), T_STRING) && CLASS_OF(s) == rb_cString)
782
-
783
- #ifdef RUBY_INTEGER_UNIFICATION
784
- # define rb_cFixnum rb_cInteger
785
- # define rb_cBignum rb_cInteger
786
- #endif
787
-
788
- enum {
789
- cmp_opt_Fixnum,
790
- cmp_opt_String,
791
- cmp_optimizable_count
792
- };
793
-
794
- struct cmp_opt_data {
795
- int opt_methods;
796
- int opt_inited;
797
- };
798
-
799
- #define NEW_CMP_OPT_MEMO(type, value) \
800
- NEW_PARTIAL_MEMO_FOR(type, value, cmp_opt)
801
- #define CMP_OPTIMIZABLE_BIT(type) (1U << TOKEN_PASTE(cmp_opt_,type))
802
- #define CMP_OPTIMIZABLE(data, type) \
803
- (((data).opt_inited & CMP_OPTIMIZABLE_BIT(type)) ? \
804
- ((data).opt_methods & CMP_OPTIMIZABLE_BIT(type)) : \
805
- (((data).opt_inited |= CMP_OPTIMIZABLE_BIT(type)), \
806
- rb_method_basic_definition_p(TOKEN_PASTE(rb_c,type), id_cmp) && \
807
- ((data).opt_methods |= CMP_OPTIMIZABLE_BIT(type))))
808
-
809
- #define OPTIMIZED_CMP(a, b, data) \
810
- ((FIXNUM_P(a) && FIXNUM_P(b) && CMP_OPTIMIZABLE(data, Fixnum)) ? \
811
- (((long)a > (long)b) ? 1 : ((long)a < (long)b) ? -1 : 0) : \
812
- (STRING_P(a) && STRING_P(b) && CMP_OPTIMIZABLE(data, String)) ? \
813
- rb_str_cmp(a, b) : \
814
- rb_cmpint(rb_funcallv(a, id_cmp, 1, &b), a, b))
815
637
 
816
638
  /* ment is in method.h */
817
639
 
@@ -851,29 +673,10 @@ size_t rb_ary_memsize(VALUE);
851
673
  extern const char ruby_digitmap[];
852
674
  VALUE rb_big_fdiv(VALUE x, VALUE y);
853
675
  VALUE rb_big_uminus(VALUE x);
854
- VALUE rb_big_hash(VALUE);
855
- VALUE rb_big_odd_p(VALUE);
856
- VALUE rb_big_even_p(VALUE);
857
- size_t rb_big_size(VALUE);
858
676
  VALUE rb_integer_float_cmp(VALUE x, VALUE y);
859
677
  VALUE rb_integer_float_eq(VALUE x, VALUE y);
860
- VALUE rb_cstr_parse_inum(const char *str, ssize_t len, char **endp, int base);
861
- VALUE rb_big_comp(VALUE x);
862
- VALUE rb_big_aref(VALUE x, VALUE y);
863
- VALUE rb_big_abs(VALUE x);
864
- VALUE rb_big_size_m(VALUE big);
865
- VALUE rb_big_bit_length(VALUE big);
866
- VALUE rb_big_remainder(VALUE x, VALUE y);
867
- VALUE rb_big_gt(VALUE x, VALUE y);
868
- VALUE rb_big_ge(VALUE x, VALUE y);
869
- VALUE rb_big_lt(VALUE x, VALUE y);
870
- VALUE rb_big_le(VALUE x, VALUE y);
871
678
 
872
679
  /* class.c */
873
- VALUE rb_class_boot(VALUE);
874
- VALUE rb_class_inherited(VALUE, VALUE);
875
- VALUE rb_make_metaclass(VALUE, VALUE);
876
- VALUE rb_include_class_new(VALUE, VALUE);
877
680
  void rb_class_foreach_subclass(VALUE klass, void (*f)(VALUE, VALUE), VALUE);
878
681
  void rb_class_detach_subclasses(VALUE);
879
682
  void rb_class_detach_module_subclasses(VALUE);
@@ -894,16 +697,13 @@ int rb_class_has_methods(VALUE c);
894
697
  VALUE rb_invcmp(VALUE, VALUE);
895
698
 
896
699
  /* compile.c */
897
- struct rb_block_struct;
898
- int rb_dvar_defined(ID, const struct rb_block_struct *);
899
- int rb_local_defined(ID, const struct rb_block_struct *);
900
- CONSTFUNC(const char * rb_insns_name(int i));
700
+ int rb_dvar_defined(ID);
701
+ int rb_local_defined(ID);
702
+ int rb_parse_in_eval(void);
703
+ int rb_parse_in_main(void);
704
+ const char * rb_insns_name(int i);
901
705
  VALUE rb_insns_name_array(void);
902
706
 
903
- /* complex.c */
904
- VALUE rb_nucomp_add(VALUE, VALUE);
905
- VALUE rb_nucomp_mul(VALUE, VALUE);
906
-
907
707
  /* cont.c */
908
708
  VALUE rb_obj_is_fiber(VALUE);
909
709
  void rb_fiber_reset_root_local_storage(VALUE);
@@ -918,7 +718,7 @@ void Init_ext(void);
918
718
 
919
719
  /* encoding.c */
920
720
  ID rb_id_encoding(void);
921
- CONSTFUNC(void rb_gc_mark_encodings(void));
721
+ void rb_gc_mark_encodings(void);
922
722
  rb_encoding *rb_enc_get_from_index(int index);
923
723
  rb_encoding *rb_enc_check_str(VALUE str1, VALUE str2);
924
724
  int rb_encdb_replicate(const char *alias, const char *orig);
@@ -928,19 +728,18 @@ void rb_encdb_declare(const char *name);
928
728
  void rb_enc_set_base(const char *name, const char *orig);
929
729
  int rb_enc_set_dummy(int index);
930
730
  void rb_encdb_set_unicode(int index);
931
- PUREFUNC(int rb_data_is_encoding(VALUE obj));
731
+ int rb_data_is_encoding(VALUE obj);
932
732
 
933
733
  /* enum.c */
934
734
  VALUE rb_f_send(int argc, VALUE *argv, VALUE recv);
935
- VALUE rb_nmin_run(VALUE obj, VALUE num, int by, int rev, int ary);
936
735
 
937
736
  /* error.c */
938
737
  extern VALUE rb_eEAGAIN;
939
738
  extern VALUE rb_eEWOULDBLOCK;
940
739
  extern VALUE rb_eEINPROGRESS;
941
- void rb_report_bug_valist(VALUE file, int line, const char *fmt, va_list args);
740
+ NORETURN(PRINTF_ARGS(void rb_compile_bug(const char*, int, const char*, ...), 3, 4));
741
+ NORETURN(PRINTF_ARGS(void rb_compile_bug_str(VALUE file, int line, const char *fmt, ...), 3, 4));
942
742
  PRINTF_ARGS(void rb_compile_error_str(VALUE file, int line, void *enc, const char *fmt, ...), 4, 5);
943
- VALUE rb_syntax_error_append(VALUE, VALUE, int, int, rb_encoding*, const char*, va_list);
944
743
  VALUE rb_check_backtrace(VALUE);
945
744
  NORETURN(void rb_async_bug_errno(const char *,int));
946
745
  const char *rb_builtin_type_name(int t);
@@ -953,8 +752,6 @@ VALUE rb_name_err_new(VALUE mesg, VALUE recv, VALUE method);
953
752
  rb_exc_raise(rb_name_err_new(mesg, recv, name))
954
753
  #define rb_name_err_raise(mesg, recv, name) \
955
754
  rb_name_err_raise_str(rb_fstring_cstr(mesg), (recv), (name))
956
- NORETURN(void ruby_only_for_internal_use(const char *));
957
- #define ONLY_FOR_INTERNAL_USE(func) ruby_only_for_internal_use(func)
958
755
 
959
756
  /* eval.c */
960
757
  VALUE rb_refinement_module_get_refined_class(VALUE module);
@@ -1042,6 +839,7 @@ VALUE rb_hash_set_default_proc(VALUE hash, VALUE proc);
1042
839
  long rb_objid_hash(st_index_t index);
1043
840
  st_table *rb_init_identtable(void);
1044
841
  st_table *rb_init_identtable_with_size(st_index_t size);
842
+ VALUE rb_hash_compare_by_id_p(VALUE hash);
1045
843
 
1046
844
  #define RHASH_TBL_RAW(h) rb_hash_tbl_raw(h)
1047
845
  VALUE rb_hash_keys(VALUE hash);
@@ -1058,6 +856,7 @@ const char *ruby_get_inplace_mode(void);
1058
856
  void ruby_set_inplace_mode(const char *);
1059
857
  ssize_t rb_io_bufread(VALUE io, void *buf, size_t size);
1060
858
  void rb_stdio_set_default_encoding(void);
859
+ void rb_write_error_str(VALUE mesg);
1061
860
  VALUE rb_io_flush_raw(VALUE, int);
1062
861
  size_t rb_io_memsize(const rb_io_t *);
1063
862
 
@@ -1098,17 +897,7 @@ double ruby_float_mod(double x, double y);
1098
897
  int rb_num_negative_p(VALUE);
1099
898
  VALUE rb_int_succ(VALUE num);
1100
899
  VALUE rb_int_pred(VALUE num);
1101
- VALUE rb_int_uminus(VALUE num);
1102
- VALUE rb_int_plus(VALUE x, VALUE y);
1103
- VALUE rb_int_minus(VALUE x, VALUE y);
1104
- VALUE rb_int_mul(VALUE x, VALUE y);
1105
- VALUE rb_int_idiv(VALUE x, VALUE y);
1106
- VALUE rb_int_modulo(VALUE x, VALUE y);
1107
- VALUE rb_int_round(VALUE num, int ndigits);
1108
- VALUE rb_int2str(VALUE num, int base);
1109
900
  VALUE rb_dbl_hash(double d);
1110
- VALUE rb_fix_plus(VALUE x, VALUE y);
1111
- VALUE rb_int_ge(VALUE x, VALUE y);
1112
901
 
1113
902
  #if USE_FLONUM
1114
903
  #define RUBY_BIT_ROTL(v, n) (((v) << (n)) | ((v) >> ((sizeof(v) * 8) - n)))
@@ -1186,8 +975,7 @@ rb_float_new_inline(double d)
1186
975
 
1187
976
  /* object.c */
1188
977
  void rb_obj_copy_ivar(VALUE dest, VALUE obj);
1189
- CONSTFUNC(VALUE rb_obj_equal(VALUE obj1, VALUE obj2));
1190
- CONSTFUNC(VALUE rb_obj_not(VALUE obj));
978
+ VALUE rb_obj_equal(VALUE obj1, VALUE obj2);
1191
979
  VALUE rb_class_search_ancestor(VALUE klass, VALUE super);
1192
980
  NORETURN(void rb_undefined_alloc(VALUE klass));
1193
981
  double rb_num_to_dbl(VALUE val);
@@ -1211,8 +999,6 @@ struct RBasicRaw {
1211
999
  #endif
1212
1000
  VALUE rb_parser_get_yydebug(VALUE);
1213
1001
  VALUE rb_parser_set_yydebug(VALUE, VALUE);
1214
- VALUE rb_parser_set_context(VALUE, const struct rb_block_struct *, int);
1215
- void *rb_parser_load_file(VALUE parser, VALUE name);
1216
1002
  int rb_is_const_name(VALUE name);
1217
1003
  int rb_is_class_name(VALUE name);
1218
1004
  int rb_is_global_name(VALUE name);
@@ -1221,14 +1007,14 @@ int rb_is_attrset_name(VALUE name);
1221
1007
  int rb_is_local_name(VALUE name);
1222
1008
  int rb_is_method_name(VALUE name);
1223
1009
  int rb_is_junk_name(VALUE name);
1224
- PUREFUNC(int rb_is_const_sym(VALUE sym));
1225
- PUREFUNC(int rb_is_class_sym(VALUE sym));
1226
- PUREFUNC(int rb_is_global_sym(VALUE sym));
1227
- PUREFUNC(int rb_is_instance_sym(VALUE sym));
1228
- PUREFUNC(int rb_is_attrset_sym(VALUE sym));
1229
- PUREFUNC(int rb_is_local_sym(VALUE sym));
1230
- PUREFUNC(int rb_is_method_sym(VALUE sym));
1231
- PUREFUNC(int rb_is_junk_sym(VALUE sym));
1010
+ int rb_is_const_sym(VALUE sym);
1011
+ int rb_is_class_sym(VALUE sym);
1012
+ int rb_is_global_sym(VALUE sym);
1013
+ int rb_is_instance_sym(VALUE sym);
1014
+ int rb_is_attrset_sym(VALUE sym);
1015
+ int rb_is_local_sym(VALUE sym);
1016
+ int rb_is_method_sym(VALUE sym);
1017
+ int rb_is_junk_sym(VALUE sym);
1232
1018
  ID rb_make_internal_id(void);
1233
1019
  void rb_gc_free_dsymbol(VALUE);
1234
1020
  ID rb_id_attrget(ID id);
@@ -1296,7 +1082,6 @@ rb_pid_t rb_fork_ruby(int *status);
1296
1082
  void rb_last_status_clear(void);
1297
1083
 
1298
1084
  /* rational.c */
1299
- VALUE rb_rational_plus(VALUE self, VALUE other);
1300
1085
  VALUE rb_lcm(VALUE x, VALUE y);
1301
1086
  VALUE rb_rational_reciprocal(VALUE x);
1302
1087
  VALUE rb_cstr_to_rat(const char *, int);
@@ -1306,8 +1091,6 @@ VALUE rb_reg_compile(VALUE str, int options, const char *sourcefile, int sourcel
1306
1091
  VALUE rb_reg_check_preprocess(VALUE);
1307
1092
  long rb_reg_search0(VALUE, VALUE, long, int, int);
1308
1093
  void rb_backref_set_string(VALUE string, long pos, long len);
1309
- int rb_match_count(VALUE match);
1310
- int rb_match_nth_defined(int nth, VALUE match);
1311
1094
 
1312
1095
  /* signal.c */
1313
1096
  extern int ruby_enable_coredump;
@@ -1316,38 +1099,25 @@ int rb_sigaltstack_size(void);
1316
1099
 
1317
1100
  /* strftime.c */
1318
1101
  #ifdef RUBY_ENCODING_H
1319
- VALUE rb_strftime_timespec(const char *format, size_t format_len, rb_encoding *enc,
1320
- const struct vtm *vtm, struct timespec *ts, int gmt);
1321
- VALUE rb_strftime(const char *format, size_t format_len, rb_encoding *enc,
1322
- const struct vtm *vtm, VALUE timev, int gmt);
1102
+ size_t rb_strftime_timespec(char *s, size_t maxsize, const char *format, rb_encoding *enc,
1103
+ const struct vtm *vtm, struct timespec *ts, int gmt);
1104
+ size_t rb_strftime(char *s, size_t maxsize, const char *format, rb_encoding *enc,
1105
+ const struct vtm *vtm, VALUE timev, int gmt);
1323
1106
  #endif
1324
1107
 
1325
1108
  /* string.c */
1326
- void Init_frozen_strings(void);
1327
1109
  VALUE rb_fstring(VALUE);
1328
1110
  VALUE rb_fstring_new(const char *ptr, long len);
1329
1111
  #define rb_fstring_lit(str) rb_fstring_new((str), rb_strlen_lit(str))
1330
1112
  #define rb_fstring_literal(str) rb_fstring_lit(str)
1331
1113
  VALUE rb_fstring_cstr(const char *str);
1332
- #ifdef HAVE_BUILTIN___BUILTIN_CONSTANT_P
1333
- # define rb_fstring_cstr(str) RB_GNUC_EXTENSION_BLOCK( \
1114
+ #if defined(__GNUC__) && !defined(__PCC__)
1115
+ #define rb_fstring_cstr(str) __extension__ ( \
1116
+ { \
1334
1117
  (__builtin_constant_p(str)) ? \
1335
1118
  rb_fstring_new((str), (long)strlen(str)) : \
1336
- rb_fstring_cstr(str) \
1337
- )
1338
- #endif
1339
- #ifdef RUBY_ENCODING_H
1340
- VALUE rb_fstring_enc_new(const char *ptr, long len, rb_encoding *enc);
1341
- #define rb_fstring_enc_lit(str, enc) rb_fstring_enc_new((str), rb_strlen_lit(str), (enc))
1342
- #define rb_fstring_enc_literal(str, enc) rb_fstring_enc_lit(str, enc)
1343
- VALUE rb_fstring_enc_cstr(const char *ptr, rb_encoding *enc);
1344
- # ifdef HAVE_BUILTIN___BUILTIN_CONSTANT_P
1345
- # define rb_fstring_enc_cstr(str, enc) RB_GNUC_EXTENSION_BLOCK( \
1346
- (__builtin_constant_p(str)) ? \
1347
- rb_fstring_enc_new((str), (long)strlen(str), (enc)) : \
1348
- rb_fstring_enc_cstr(str, enc) \
1349
- )
1350
- # endif
1119
+ rb_fstring_cstr(str); \
1120
+ })
1351
1121
  #endif
1352
1122
  int rb_str_buf_cat_escaped_char(VALUE result, unsigned int c, int unicode_p);
1353
1123
  int rb_str_symname_p(VALUE);
@@ -1355,7 +1125,8 @@ VALUE rb_str_quote_unprintable(VALUE);
1355
1125
  VALUE rb_id_quote_unprintable(ID);
1356
1126
  #define QUOTE(str) rb_str_quote_unprintable(str)
1357
1127
  #define QUOTE_ID(id) rb_id_quote_unprintable(id)
1358
- char *rb_str_fill_terminator(VALUE str, const int termlen);
1128
+ void rb_str_fill_terminator(VALUE str, const int termlen);
1129
+ void rb_str_change_terminator_length(VALUE str, const int oldtermlen, const int termlen);
1359
1130
  VALUE rb_str_locktmp_ensure(VALUE str, VALUE (*func)(VALUE), VALUE arg);
1360
1131
  #ifdef RUBY_ENCODING_H
1361
1132
  VALUE rb_external_str_with_enc(VALUE str, rb_encoding *eenc);
@@ -1439,7 +1210,6 @@ char *ruby_hdtoa(double d, const char *xdigs, int ndigits, int *decpt, int *sign
1439
1210
  extern rb_encoding OnigEncodingUTF_8;
1440
1211
 
1441
1212
  /* variable.c */
1442
- void rb_gc_mark_global_tbl(void);
1443
1213
  size_t rb_generic_ivar_memsize(VALUE);
1444
1214
  VALUE rb_search_class_path(VALUE);
1445
1215
  VALUE rb_attr_delete(VALUE, ID);
@@ -1457,7 +1227,7 @@ VALUE rb_obj_is_thread(VALUE obj);
1457
1227
  void rb_vm_mark(void *ptr);
1458
1228
  void Init_BareVM(void);
1459
1229
  void Init_vm_objects(void);
1460
- PUREFUNC(VALUE rb_vm_top_self(void));
1230
+ VALUE rb_vm_top_self(void);
1461
1231
  void rb_thread_recycle_stack_release(VALUE *);
1462
1232
  void rb_vm_change_state(void);
1463
1233
  void rb_vm_inc_const_missing_count(void);
@@ -1470,9 +1240,7 @@ void rb_vm_pop_cfunc_frame(void);
1470
1240
  int rb_vm_add_root_module(ID id, VALUE module);
1471
1241
  void rb_vm_check_redefinition_by_prepend(VALUE klass);
1472
1242
  VALUE rb_yield_refine_block(VALUE refinement, VALUE refinements);
1473
- VALUE ruby_vm_sysstack_error_copy(void);
1474
- PUREFUNC(st_table *rb_vm_fstring_table(void));
1475
-
1243
+ VALUE ruby_vm_special_exception_copy(VALUE);
1476
1244
 
1477
1245
  /* vm_dump.c */
1478
1246
  void rb_print_backtrace(void);
@@ -1554,7 +1322,6 @@ VALUE rb_ident_hash_new(void);
1554
1322
  /* io.c (export) */
1555
1323
  void rb_maygvl_fd_fix_cloexec(int fd);
1556
1324
  int rb_gc_for_fd(int err);
1557
- void rb_write_error_str(VALUE mesg);
1558
1325
 
1559
1326
  /* numeric.c (export) */
1560
1327
  VALUE rb_int_positive_pow(long x, unsigned long y);
@@ -1593,6 +1360,7 @@ extern const char ruby_hexdigits[];
1593
1360
  extern unsigned long ruby_scan_digits(const char *str, ssize_t len, int base, size_t *retlen, int *overflow);
1594
1361
 
1595
1362
  /* variable.c (export) */
1363
+ void rb_gc_mark_global_tbl(void);
1596
1364
  void rb_mark_generic_ivar(VALUE);
1597
1365
  VALUE rb_const_missing(VALUE klass, VALUE name);
1598
1366
  int rb_class_ivar_set(VALUE klass, ID vid, VALUE value);