diff --git a/irtoc_scripts/interpreter_handlers.irt b/irtoc_scripts/interpreter_handlers.irt index 346231c7d6ba7b99538aef6bd3dea4d9ab989078..6fbbad07df7df791c0d8d32af88ea1c538d00b04 100644 --- a/irtoc_scripts/interpreter_handlers.irt +++ b/irtoc_scripts/interpreter_handlers.irt @@ -1084,6 +1084,7 @@ macro(:handle_ecma_getnextpropname) do |iter| StoreObject(iter_ptr, new_fast_rem_tag) .ObjField("runtime->GetFieldByOffset(#{Constants::ECMASCRIPT_JSFORINITERATOR_FAST_REMAINING_INDEX_OFFSET})") + .SetNeedBarrier(true) .any # Get next key at new_pos index. @@ -1180,11 +1181,7 @@ end macro(:store_global_var_ic) do |key, value, ic_slot| access_global_var_ic(key, value, ic_slot, lambda do |box, value| - IfImm(cmpanyheapobj(value)).Imm(0).CC(:CC_EQ).b { - StoreObject(box, value).ObjField(Constants::JS_PROPERTY_BOX_VALUE_FIELD).any - } Else { - StoreObject(box, value).ObjField(Constants::JS_PROPERTY_BOX_VALUE_FIELD).SetNeedBarrier(true).any - } + StoreObject(box, value).ObjField(Constants::JS_PROPERTY_BOX_VALUE_FIELD).SetNeedBarrier(true).any NOP() Constants::TAGGED_UNDEFINED end) @@ -1265,11 +1262,7 @@ Label(:ExitLoad) end macro(:store_obj_dyn) do |obj, index, value| - IfImm(cmpanyheapobj(value)).Imm(0).CC(:CC_EQ).b { - Store(obj, Mul(index, Constants::TAGGED_TYPE_SIZE).i32, value).any - } Else { - Store(obj, Mul(index, Constants::TAGGED_TYPE_SIZE).i32, value).SetNeedBarrier(true).any - } + Store(obj, Mul(index, Constants::TAGGED_TYPE_SIZE).i32, value).SetNeedBarrier(true).any NOP() end diff --git a/irtoc_scripts/object.irt b/irtoc_scripts/object.irt index f91f898b8a614f72bc75b25dd4f51a5ea9856f89..2ec92d391e96d40734fa5485b18ed65684cfe4bc 100644 --- a/irtoc_scripts/object.irt +++ b/irtoc_scripts/object.irt @@ -525,7 +525,7 @@ scoped_macro(:obj_set_property) do |obj, attributes, value, update_ic| IfImm(prop_is_inlined(attributes)).Imm(0).CC(:CC_NE).b { offset := get_inlined_props_offset(cls, attr_index) update_ic.call(cls, Div(offset, Constants::TAGGED_TYPE_SIZE).i32, 1) - Store(obj, offset, value).any + Store(obj, offset, value).SetNeedBarrier(true).any } Else { index := Sub(attr_index, get_inlined_properties(cls)).i32 update_ic.call(cls, index, 0) @@ -544,7 +544,7 @@ scoped_macro(:update_ic) do |hclass, offset, is_inlined, ic_slot| idx := map_ic_slot(ic_slot) IfImm(cmpanyundefined(ic)).Imm(0).CC(:CC_EQ).b { StoreArray(anytoheapobj(ic), idx, heapobjtoany(hclass)).SetNeedBarrier(true).any - StoreArray(anytoheapobj(ic), AddI(idx).Imm(1).i32, i32toany(handler)).any + StoreArray(anytoheapobj(ic), AddI(idx).Imm(1).i32, i32toany(handler)).SetNeedBarrier(true).any } end diff --git a/irtoc_scripts/object_helpers.irt b/irtoc_scripts/object_helpers.irt index 388361c31365df6e8181203233dbdc0a1d343cf8..4212c04d3d7b6bb5a7d8953b74b76c761c47d8ff 100644 --- a/irtoc_scripts/object_helpers.irt +++ b/irtoc_scripts/object_helpers.irt @@ -32,7 +32,7 @@ scoped_macro(:get_array_length) do |obj| end scoped_macro(:set_array_length) do |obj, length| - StoreObject(anytoheapobj(obj), i32toanychecked(length)).ObjField(Constants::JS_ARRAY_LENGTH_FIELD).any + StoreObject(anytoheapobj(obj), i32toanychecked(length)).ObjField(Constants::JS_ARRAY_LENGTH_FIELD).SetNeedBarrier(true).any end scoped_macro(:is_dictionary_element) do |arg, props| @@ -52,11 +52,7 @@ scoped_macro(:is_extensible) do |arg| end scoped_macro(:store_element) do |elements, index, value| - IfImm(cmpanyheapobj(value)).Imm(0).CC(:CC_EQ).b { - StoreArray(elements, index, value).any - } Else { - StoreArray(elements, index, value).SetNeedBarrier(true).any - } + StoreArray(elements, index, value).SetNeedBarrier(true).any end scoped_macro(:store_value_to_elements) do |obj, elements, index, value|