remove unecessary PROTECT statements

Since there's no possibility of garbage collection during the
lifetimes of these local variables, there's no need to protect the
references.
This commit is contained in:
Joel Dice 2013-05-14 14:33:37 -06:00
parent e088fa07ae
commit 84e23659f9
2 changed files with 0 additions and 3 deletions

View File

@ -267,7 +267,6 @@ clone(Thread* t, object o)
size - BytesPerWord);
} else {
object classNameSlash = className(t, objectClass(t, o));
PROTECT(t, classNameSlash);
THREAD_RUNTIME_ARRAY(t, char, classNameDot, byteArrayLength(t, classNameSlash));
replace('/', '.', RUNTIME_ARRAY_BODY(classNameDot),
reinterpret_cast<char*>(&byteArrayBody(t, classNameSlash, 0)));

View File

@ -3036,8 +3036,6 @@ checkCast(MyThread* t, object class_, object o)
if (UNLIKELY(o and not isAssignableFrom(t, class_, objectClass(t, o)))) {
object classNameFrom = className(t, objectClass(t, o));
object classNameTo = className(t, class_);
PROTECT(t, classNameFrom);
PROTECT(t, classNameTo);
THREAD_RUNTIME_ARRAY(t, char, classFrom, byteArrayLength(t, classNameFrom));
THREAD_RUNTIME_ARRAY(t, char, classTo, byteArrayLength(t, classNameTo));
replace('/', '.', RUNTIME_ARRAY_BODY(classFrom),