Bug 894596 - Bake constant valued object properties into jitcode when possible, r=jandem, patch mostly written by djvj.

This commit is contained in:
Brian Hackett
2014-08-26 12:30:36 -07:00
parent 2460941a77
commit 3736f53b2c
9 changed files with 269 additions and 19 deletions

View File

@@ -4056,10 +4056,10 @@ UpdateShapeTypeAndValue(typename ExecutionModeTraits<mode>::ExclusiveContextType
jsid id = shape->propid();
if (shape->hasSlot()) {
if (mode == ParallelExecution) {
if (!obj->nativeSetSlotIfHasType(shape, value))
if (!obj->nativeSetSlotIfHasType(shape, value, /* overwriting = */ false))
return false;
} else {
obj->nativeSetSlotWithType(cx->asExclusiveContext(), shape, value);
obj->nativeSetSlotWithType(cx->asExclusiveContext(), shape, value, /* overwriting = */ false);
}
}
if (!shape->hasSlot() || !shape->hasDefaultGetter() || !shape->hasDefaultSetter()) {