throw an error if a volatile field is encountered, since we don't yet support them properly

This commit is contained in:
Joel Dice
2008-12-18 16:32:18 -07:00
parent c479bccdb4
commit 5e727c8c5d
3 changed files with 23 additions and 0 deletions

View File

@ -1452,6 +1452,7 @@ interpret(Thread* t)
object field = resolveField(t, codePool(t, code), index - 1);
if (UNLIKELY(exception)) goto throw_;
if (throwIfVolatileField(t, field)) goto throw_;
pushField(t, popObject(t), field);
} else {
@ -1465,6 +1466,8 @@ interpret(Thread* t)
object field = resolveField(t, codePool(t, code), index - 1);
if (UNLIKELY(exception)) goto throw_;
if (throwIfVolatileField(t, field)) goto throw_;
PROTECT(t, field);
if (UNLIKELY(classInit(t, fieldClass(t, field), 3))) goto invoke;
@ -2396,6 +2399,7 @@ interpret(Thread* t)
object field = resolveField(t, codePool(t, code), index - 1);
if (UNLIKELY(exception)) goto throw_;
if (throwIfVolatileField(t, field)) goto throw_;
switch (fieldCode(t, field)) {
case ByteField:
@ -2461,6 +2465,8 @@ interpret(Thread* t)
object field = resolveField(t, codePool(t, code), index - 1);
if (UNLIKELY(exception)) goto throw_;
if (throwIfVolatileField(t, field)) goto throw_;
PROTECT(t, field);
if (UNLIKELY(classInit(t, fieldClass(t, field), 3))) goto invoke;