diff --git a/src/compile.cpp b/src/compile.cpp index 584e39d4cf..1345834013 100644 --- a/src/compile.cpp +++ b/src/compile.cpp @@ -2922,6 +2922,8 @@ getStaticFieldValueFromReference(MyThread* t, object pair) object field = resolveField(t, pair); PROTECT(t, field); + initClass(t, fieldClass(t, field)); + ACQUIRE_FIELD_FOR_READ(t, field); return getFieldValue(t, classStaticTable(t, fieldClass(t, field)), field); @@ -2946,6 +2948,8 @@ setStaticLongFieldValueFromReference(MyThread* t, object pair, uint64_t value) object field = resolveField(t, pair); PROTECT(t, field); + initClass(t, fieldClass(t, field)); + ACQUIRE_FIELD_FOR_WRITE(t, field); cast @@ -2974,6 +2978,8 @@ setStaticObjectFieldValueFromReference(MyThread* t, object pair, object value) object field = resolveField(t, pair); PROTECT(t, field); + initClass(t, fieldClass(t, field)); + ACQUIRE_FIELD_FOR_WRITE(t, field); set(t, classStaticTable(t, fieldClass(t, field)), fieldOffset(t, field), @@ -3025,6 +3031,8 @@ setStaticFieldValueFromReference(MyThread* t, object pair, uint32_t value) object field = resolveField(t, pair); PROTECT(t, field); + initClass(t, fieldClass(t, field)); + ACQUIRE_FIELD_FOR_WRITE(t, field); setFieldValue(t, classStaticTable(t, fieldClass(t, field)), field, value); @@ -5452,7 +5460,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned ip, if (LIKELY(field)) { int fieldCode = vm::fieldCode(t, field); - Compiler::Operand* value = popField(t, frame, fieldCode); object staticTable = 0; @@ -5485,6 +5492,8 @@ compile(MyThread* t, Frame* initialFrame, unsigned ip, } } + Compiler::Operand* value = popField(t, frame, fieldCode); + Compiler::Operand* table; if (instruction == putstatic) { @@ -7828,7 +7837,7 @@ class ArgumentList { default: addInt(cast(objectArrayBody(t, arguments, index++), BytesPerWord)); - break; + break; } } }