- if (!lookupPut<ThisImp>(exec, propertyName, value, table, thisObj, slot.isStrictMode()))
- ParentImp::put(thisObj, exec, propertyName, value, slot); // not found: forward to parent
+ BatchedTransitionOptimizer transitionOptimizer(vm, &thisObj);
+ for (auto& value : values) {
+ if (!value.m_key)
+ continue;
+
+ Identifier propertyName(&vm, reinterpret_cast<const LChar*>(value.m_key), strlen(value.m_key));
+ if (value.attributes() & Builtin) {
+ thisObj.putDirectBuiltinFunction(vm, thisObj.globalObject(), propertyName, value.builtinGenerator()(vm), value.attributes());
+ continue;
+ }
+
+ if (value.attributes() & Function) {
+ thisObj.putDirectNativeFunction(vm, thisObj.globalObject(), propertyName, value.functionLength(),
+ value.function(), value.intrinsic(), value.attributes());
+ continue;
+ }
+
+ if (value.attributes() & ConstantInteger) {
+ thisObj.putDirect(vm, propertyName, jsNumber(value.constantInteger()), value.attributes());
+ continue;
+ }
+
+ if (value.attributes() & Accessor) {
+ RELEASE_ASSERT_NOT_REACHED();
+ continue;
+ }
+
+ CustomGetterSetter* customGetterSetter = CustomGetterSetter::create(vm, value.propertyGetter(), value.propertyPutter());
+ thisObj.putDirectCustomAccessor(vm, propertyName, customGetterSetter, value.attributes());
+ }