mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Revert this until we can figure out WB issues or remove shapes from GC
Revert "* expand tabs. [ci skip]" This reverts commit830b5b5c35
. Revert "This commit implements the Object Shapes technique in CRuby." This reverts commit9ddfd2ca00
.
This commit is contained in:
parent
b39690df3a
commit
06abfa5be6
45 changed files with 953 additions and 2555 deletions
10
marshal.c
10
marshal.c
|
@ -39,7 +39,6 @@
|
|||
#include "ruby/st.h"
|
||||
#include "ruby/util.h"
|
||||
#include "builtin.h"
|
||||
#include "shape.h"
|
||||
|
||||
#define BITSPERSHORT (2*CHAR_BIT)
|
||||
#define SHORTMASK ((1<<BITSPERSHORT)-1)
|
||||
|
@ -623,6 +622,10 @@ w_obj_each(st_data_t key, st_data_t val, st_data_t a)
|
|||
}
|
||||
return ST_CONTINUE;
|
||||
}
|
||||
if (!ivarg->num_ivar) {
|
||||
rb_raise(rb_eRuntimeError, "instance variable added to %"PRIsVALUE" instance",
|
||||
CLASS_OF(arg->obj));
|
||||
}
|
||||
--ivarg->num_ivar;
|
||||
w_symbol(ID2SYM(id), arg->arg);
|
||||
w_object(value, arg->arg, arg->limit);
|
||||
|
@ -717,7 +720,6 @@ has_ivars(VALUE obj, VALUE encname, VALUE *ivobj)
|
|||
static void
|
||||
w_ivar_each(VALUE obj, st_index_t num, struct dump_call_arg *arg)
|
||||
{
|
||||
shape_id_t shape_id = rb_shape_get_shape_id(arg->obj);
|
||||
struct w_ivar_arg ivarg = {arg, num};
|
||||
if (!num) return;
|
||||
rb_ivar_foreach(obj, w_obj_each, (st_data_t)&ivarg);
|
||||
|
@ -725,10 +727,6 @@ w_ivar_each(VALUE obj, st_index_t num, struct dump_call_arg *arg)
|
|||
rb_raise(rb_eRuntimeError, "instance variable removed from %"PRIsVALUE" instance",
|
||||
CLASS_OF(arg->obj));
|
||||
}
|
||||
if (shape_id != rb_shape_get_shape_id(arg->obj)) {
|
||||
rb_raise(rb_eRuntimeError, "instance variable added to %"PRIsVALUE" instance",
|
||||
CLASS_OF(arg->obj));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue