Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8251046: [lworld] [lw3] C1 should avoid heap allocations in withfield when possible #137

Closed
wants to merge 10 commits into from
@@ -423,34 +423,34 @@ StoreField::StoreField(Value obj, int offset, ciField* field, Value value, bool
ValueStack* state_before, bool needs_patching)
: AccessField(obj, offset, field, is_static, state_before, needs_patching)
, _value(value)
{
set_flag(NeedsWriteBarrierFlag, as_ValueType(field_type())->is_object());
{
set_flag(NeedsWriteBarrierFlag, as_ValueType(field_type())->is_object());
#ifdef ASSERT
AssertValues assert_value;
values_do(&assert_value);
#endif
pin();
if (value->as_NewInlineTypeInstance() != NULL) {
value->as_NewInlineTypeInstance()->set_not_larva_anymore();
}
pin();
if (value->as_NewInlineTypeInstance() != NULL) {
value->as_NewInlineTypeInstance()->set_not_larva_anymore();
}
}

StoreIndexed::StoreIndexed(Value array, Value index, Value length, BasicType elt_type, Value value,
ValueStack* state_before, bool check_boolean, bool mismatched)
: AccessIndexed(array, index, length, elt_type, state_before, mismatched)
, _value(value), _check_boolean(check_boolean)
{
set_flag(NeedsWriteBarrierFlag, (as_ValueType(elt_type)->is_object()));
set_flag(NeedsStoreCheckFlag, (as_ValueType(elt_type)->is_object()));
{
set_flag(NeedsWriteBarrierFlag, (as_ValueType(elt_type)->is_object()));
set_flag(NeedsStoreCheckFlag, (as_ValueType(elt_type)->is_object()));
#ifdef ASSERT
AssertValues assert_value;
values_do(&assert_value);
#endif
pin();
if (value->as_NewInlineTypeInstance() != NULL) {
value->as_NewInlineTypeInstance()->set_not_larva_anymore();
}
pin();
if (value->as_NewInlineTypeInstance() != NULL) {
value->as_NewInlineTypeInstance()->set_not_larva_anymore();
}
}


// Implementation of Invoke