summaryrefslogtreecommitdiff
path: root/vm_core.h
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-22 06:18:03 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-04-22 06:18:03 +0000
commitb0f5d2eb2c4dea86287a6896e980c6ba6289dc0e (patch)
tree7b7cdf63729a3cc9314eba22ae7da1f5fd72b467 /vm_core.h
parentaef285f5dfb184e1a8a83eb5eb9146ba0f378e54 (diff)
merge revision(s) 54484: [Backport #12095]
* vm_core.h (rb_vm_struct): make at_exit a single linked list but not RArray, not to mark the registered functions by the write barrier. based on the patches by Evan Phoenix. [ruby-core:73908] [Bug #12095] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@54683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/vm_core.h b/vm_core.h
index 9079130677..479f79b7e9 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -385,6 +385,13 @@ enum ruby_basic_operators {
#define GetVMPtr(obj, ptr) \
GetCoreDataFromValue((obj), rb_vm_t, (ptr))
+struct rb_vm_struct;
+typedef void rb_vm_at_exit_func(struct rb_vm_struct*);
+typedef struct rb_at_exit_list {
+ rb_vm_at_exit_func *func;
+ struct rb_at_exit_list *next;
+} rb_at_exit_list;
+
#if defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE
struct rb_objspace;
void rb_objspace_free(struct rb_objspace *);
@@ -459,11 +466,7 @@ typedef struct rb_vm_struct {
struct rb_objspace *objspace;
#endif
- /*
- * @shyouhei notes that this is not for storing normal Ruby
- * objects so do *NOT* mark this when you GC.
- */
- struct RArray at_exit;
+ rb_at_exit_list *at_exit;
VALUE *defined_strings;
st_table *frozen_strings;