RB_OBJ_FREEZE_RAW: Set the object shape
This commit is contained in:
parent
39b13e5818
commit
7380e3d30f
@ -905,6 +905,10 @@ RB_OBJ_FROZEN(VALUE obj)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RUBY_SYMBOL_EXPORT_BEGIN
|
||||||
|
void rb_obj_freeze_inline(VALUE obj);
|
||||||
|
RUBY_SYMBOL_EXPORT_END
|
||||||
|
|
||||||
RBIMPL_ATTR_ARTIFICIAL()
|
RBIMPL_ATTR_ARTIFICIAL()
|
||||||
/**
|
/**
|
||||||
* This is an implementation detail of RB_OBJ_FREEZE(). 3rd parties need not
|
* This is an implementation detail of RB_OBJ_FREEZE(). 3rd parties need not
|
||||||
@ -915,14 +919,7 @@ RBIMPL_ATTR_ARTIFICIAL()
|
|||||||
static inline void
|
static inline void
|
||||||
RB_OBJ_FREEZE_RAW(VALUE obj)
|
RB_OBJ_FREEZE_RAW(VALUE obj)
|
||||||
{
|
{
|
||||||
RB_FL_SET_RAW(obj, RUBY_FL_FREEZE);
|
rb_obj_freeze_inline(obj);
|
||||||
if (TYPE(obj) == T_STRING) {
|
|
||||||
RB_FL_UNSET_RAW(obj, FL_USER3); // STR_CHILLED
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
RUBY_SYMBOL_EXPORT_BEGIN
|
|
||||||
void rb_obj_freeze_inline(VALUE obj);
|
|
||||||
RUBY_SYMBOL_EXPORT_END
|
|
||||||
|
|
||||||
#endif /* RBIMPL_FL_TYPE_H */
|
#endif /* RBIMPL_FL_TYPE_H */
|
||||||
|
@ -1815,7 +1815,10 @@ rb_shape_set_shape_id(VALUE obj, shape_id_t shape_id)
|
|||||||
void rb_obj_freeze_inline(VALUE x)
|
void rb_obj_freeze_inline(VALUE x)
|
||||||
{
|
{
|
||||||
if (RB_FL_ABLE(x)) {
|
if (RB_FL_ABLE(x)) {
|
||||||
RB_OBJ_FREEZE_RAW(x);
|
RB_FL_SET_RAW(x, RUBY_FL_FREEZE);
|
||||||
|
if (TYPE(x) == T_STRING) {
|
||||||
|
RB_FL_UNSET_RAW(x, FL_USER3); // STR_CHILLED
|
||||||
|
}
|
||||||
|
|
||||||
rb_shape_t * next_shape = rb_shape_transition_shape_frozen(x);
|
rb_shape_t * next_shape = rb_shape_transition_shape_frozen(x);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user