зеркало из https://github.com/mozilla/gecko-dev.git
Bug 936403 - Make sure undefined global properties are tracked when generating baseline ICs, r=jandem.
This commit is contained in:
Родитель
3ec9e9b3af
Коммит
36a8a7fbec
|
@ -0,0 +1,21 @@
|
|||
|
||||
s = newGlobal()
|
||||
function f(code) {
|
||||
evalcx(code, s)
|
||||
}
|
||||
f("\
|
||||
c = [];\
|
||||
var x;\
|
||||
for each(z in[\
|
||||
x,,[],,new Number,,,,new Number,,,,new Number,new Number,[],\
|
||||
,,,[],,new Number,,new Number,,[],new Number,[],,,,,,[],\
|
||||
new Number,,new Number,[],,[],,,,[],,[],,,,,,,,,[],[],,[],\
|
||||
[],[],,new Number,[],[],,[],,new Number,new Number,new Number,\
|
||||
new Number,new Number,,,new Number,new Number,,[],[],[],,,[],\
|
||||
[],[],new Number,,new Number,,,,,[],new Number,new Number,[],\
|
||||
[],[],[],,x,[]]\
|
||||
) {\
|
||||
c = z\
|
||||
};\
|
||||
");
|
||||
f("c");
|
|
@ -1365,6 +1365,11 @@ ICUpdatedStub::addUpdateStubForValue(JSContext *cx, HandleScript script, HandleO
|
|||
|
||||
types::EnsureTrackPropertyTypes(cx, obj, id);
|
||||
|
||||
// Make sure that undefined values are explicitly included in the property
|
||||
// types for an object if generating a stub to write an undefined value.
|
||||
if (val.isUndefined() && types::CanHaveEmptyPropertyTypesForOwnProperty(obj))
|
||||
types::AddTypePropertyId(cx, obj, id, val);
|
||||
|
||||
if (val.isPrimitive()) {
|
||||
JSValueType type = val.isDouble() ? JSVAL_TYPE_DOUBLE : val.extractNonDoubleType();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче