mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 845841 - Don't inline object element read if the value may be a string. r=bhackett
This commit is contained in:
parent
15c976f003
commit
6c55b391b3
@ -298,6 +298,9 @@ TypeInferenceOracle::elementReadIsDenseNative(RawScript script, jsbytecode *pc)
|
||||
if (idType != JSVAL_TYPE_INT32 && idType != JSVAL_TYPE_DOUBLE)
|
||||
return false;
|
||||
|
||||
if (obj->hasType(types::Type::StringType()))
|
||||
return false;
|
||||
|
||||
Class *clasp = obj->getKnownClass();
|
||||
return clasp && clasp->isNative();
|
||||
}
|
||||
@ -313,6 +316,9 @@ TypeInferenceOracle::elementReadIsTypedArray(RawScript script, jsbytecode *pc, i
|
||||
if (idType != JSVAL_TYPE_INT32 && idType != JSVAL_TYPE_DOUBLE)
|
||||
return false;
|
||||
|
||||
if (obj->hasType(types::Type::StringType()))
|
||||
return false;
|
||||
|
||||
*arrayType = obj->getTypedArrayType();
|
||||
if (*arrayType == TypedArray::TYPE_MAX)
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user