From 9b47ec04a89711766c4d14b6d7792fecc7c7b185 Mon Sep 17 00:00:00 2001 From: ko1 Date: Wed, 19 Jun 2013 06:26:01 +0000 Subject: * include/ruby/ruby.h (struct rb_data_type_struct), gc.c: add rb_data_type_struct::flags. Now, this flags is passed at T_DATA object creation. You can specify FL_WB_PROTECTED on this flag. * iseq.c: making non-shady iseq objects. * class.c, compile.c, proc.c, vm.c: add WB for iseq objects. * vm_core.h, iseq.h: constify fields to detect WB insertion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_core.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'vm_core.h') diff --git a/vm_core.h b/vm_core.h index 3793d47a89..f7e4c056cb 100644 --- a/vm_core.h +++ b/vm_core.h @@ -186,10 +186,10 @@ typedef struct rb_call_info_struct { GetCoreDataFromValue((obj), rb_iseq_t, (ptr)) typedef struct rb_iseq_location_struct { - VALUE path; - VALUE absolute_path; - VALUE base_label; - VALUE label; + const VALUE path; + const VALUE absolute_path; + const VALUE base_label; + const VALUE label; size_t first_lineno; } rb_iseq_location_t; @@ -217,8 +217,8 @@ struct rb_iseq_struct { VALUE *iseq; /* iseq (insn number and operands) */ VALUE *iseq_encoded; /* encoded iseq */ unsigned long iseq_size; - VALUE mark_ary; /* Array: includes operands which should be GC marked */ - VALUE coverage; /* coverage array */ + const VALUE mark_ary; /* Array: includes operands which should be GC marked */ + const VALUE coverage; /* coverage array */ /* insn info, must be freed */ struct iseq_line_info_entry *line_info_table; @@ -293,7 +293,7 @@ struct rb_iseq_struct { /****************/ VALUE self; - VALUE orig; /* non-NULL if its data have origin */ + const VALUE orig; /* non-NULL if its data have origin */ /* block inlining */ /* @@ -304,8 +304,8 @@ struct rb_iseq_struct { */ /* klass/module nest information stack (cref) */ - NODE *cref_stack; - VALUE klass; + NODE * const cref_stack; + const VALUE klass; /* misc */ ID defined_method_id; /* for define_method */ -- cgit v1.2.3