Changeset 169703 in webkit for trunk/Source/JavaScriptCore/runtime/JSObject.h
- Timestamp:
- Jun 9, 2014, 11:53:32 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/JSObject.h
r169668 r169703 468 468 void putDirectNonIndexAccessor(VM&, PropertyName, JSValue, unsigned attributes); 469 469 void putDirectAccessor(ExecState*, PropertyName, JSValue, unsigned attributes); 470 JS_EXPORT_PRIVATE void putDirectCustomAccessor(VM&, PropertyName, JSValue, unsigned attributes); 470 471 471 472 JS_EXPORT_PRIVATE bool hasProperty(ExecState*, PropertyName) const; … … 574 575 bool hasCustomProperties() { return structure()->didTransition(); } 575 576 bool hasGetterSetterProperties() { return structure()->hasGetterSetterProperties(); } 577 bool hasCustomGetterSetterProperties() { return structure()->hasCustomGetterSetterProperties(); } 576 578 577 579 // putOwnDataProperty has 'put' like semantics, however this method: … … 588 590 589 591 JS_EXPORT_PRIVATE void putDirectNativeFunction(VM&, JSGlobalObject*, const PropertyName&, unsigned functionLength, NativeFunction, Intrinsic, unsigned attributes); 590 JS Function* putDirectBuiltinFunction(VM&, JSGlobalObject*, const PropertyName&, FunctionExecutable*, unsigned attributes);592 JS_EXPORT_PRIVATE JSFunction* putDirectBuiltinFunction(VM&, JSGlobalObject*, const PropertyName&, FunctionExecutable*, unsigned attributes); 591 593 JSFunction* putDirectBuiltinFunctionWithoutTransition(VM&, JSGlobalObject*, const PropertyName&, FunctionExecutable*, unsigned attributes); 592 594 void putDirectNativeFunctionWithoutTransition(VM&, JSGlobalObject*, const PropertyName&, unsigned functionLength, NativeFunction, Intrinsic, unsigned attributes); … … 623 625 void setStructureAndReallocateStorageIfNecessary(VM&, unsigned oldCapacity, Structure*); 624 626 void setStructureAndReallocateStorageIfNecessary(VM&, Structure*); 627 628 void convertToDictionary(VM& vm) 629 { 630 setStructure(vm, Structure::toCacheableDictionaryTransition(vm, structure(vm))); 631 } 625 632 626 633 void flattenDictionaryObject(VM& vm) … … 953 960 bool inlineGetOwnPropertySlot(ExecState*, VM&, Structure&, PropertyName, PropertySlot&); 954 961 JS_EXPORT_PRIVATE void fillGetterPropertySlot(PropertySlot&, JSValue, unsigned, PropertyOffset); 962 JS_EXPORT_PRIVATE void fillCustomGetterPropertySlot(PropertySlot&, JSValue, unsigned); 955 963 956 964 const HashTableValue* findPropertyHashEntry(VM&, PropertyName) const; … … 965 973 unsigned getNewVectorLength(unsigned desiredLength); 966 974 967 JS_EXPORT_PRIVATEbool getOwnPropertySlotSlow(ExecState*, PropertyName, PropertySlot&);975 bool getOwnPropertySlotSlow(ExecState*, PropertyName, PropertySlot&); 968 976 969 977 ArrayStorage* constructConvertedArrayStorageWithoutCopyingElements(VM&, unsigned neededLength); … … 1214 1222 if (structure.hasGetterSetterProperties() && value.isGetterSetter()) 1215 1223 fillGetterPropertySlot(slot, value, attributes, offset); 1224 else if (structure.hasCustomGetterSetterProperties() && value.isCustomGetterSetter()) 1225 fillCustomGetterPropertySlot(slot, value, attributes); 1216 1226 else 1217 1227 slot.setValue(this, attributes, value, offset); … … 1220 1230 1221 1231 return getOwnPropertySlotSlow(exec, propertyName, slot); 1232 } 1233 1234 inline bool JSObject::getOwnPropertySlotSlow(ExecState* exec, PropertyName propertyName, PropertySlot& slot) 1235 { 1236 unsigned i = propertyName.asIndex(); 1237 if (i != PropertyName::NotAnIndex) 1238 return getOwnPropertySlotByIndex(this, exec, i, slot); 1239 return false; 1222 1240 } 1223 1241 … … 1441 1459 ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this)); 1442 1460 ASSERT(!structure()->hasGetterSetterProperties()); 1461 ASSERT(!structure()->hasCustomGetterSetterProperties()); 1443 1462 1444 1463 return putDirectInternal<PutModePut>(vm, propertyName, value, 0, slot, getCallableObject(value)); … … 1448 1467 { 1449 1468 ASSERT(!value.isGetterSetter() && !(attributes & Accessor)); 1469 ASSERT(!value.isCustomGetterSetter()); 1450 1470 PutPropertySlot slot(this); 1451 1471 putDirectInternal<PutModeDefineOwnProperty>(vm, propertyName, value, attributes, slot, getCallableObject(value)); … … 1455 1475 { 1456 1476 ASSERT(!value.isGetterSetter()); 1477 ASSERT(!value.isCustomGetterSetter()); 1457 1478 putDirectInternal<PutModeDefineOwnProperty>(vm, propertyName, value, 0, slot, getCallableObject(value)); 1458 1479 } … … 1462 1483 DeferGC deferGC(vm.heap); 1463 1484 ASSERT(!value.isGetterSetter() && !(attributes & Accessor)); 1485 ASSERT(!value.isCustomGetterSetter()); 1464 1486 Butterfly* newButterfly = m_butterfly.get(); 1465 1487 if (structure()->putWillGrowOutOfLineStorage())
Note:
See TracChangeset
for help on using the changeset viewer.