本文整理汇总了C++中PropertyTable::get方法的典型用法代码示例。如果您正苦于以下问题:C++ PropertyTable::get方法的具体用法?C++ PropertyTable::get怎么用?C++ PropertyTable::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PropertyTable
的用法示例。
在下文中一共展示了PropertyTable::get方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: willStoreValueSlow
void Structure::willStoreValueSlow(
VM& vm, PropertyName propertyName, JSValue value, bool shouldOptimize,
InferredTypeTable::StoredPropertyAge age)
{
ASSERT(!isCompilationThread());
ASSERT(structure()->classInfo() == info());
ASSERT(!hasBeenDictionary());
// Create the inferred type table before doing anything else, so that we don't GC after we have already
// grabbed a pointer into the property map.
InferredTypeTable* table = m_inferredTypeTable.get();
if (!table) {
table = InferredTypeTable::create(vm);
WTF::storeStoreFence();
m_inferredTypeTable.set(vm, this, table);
}
// This only works if we've got a property table.
PropertyTable* propertyTable;
materializePropertyMapIfNecessary(vm, propertyTable);
// We must be calling this after having created the given property or confirmed that it was present
// already, so we must have a property table now.
ASSERT(propertyTable);
// ... and the property must be present.
PropertyMapEntry* entry = propertyTable->get(propertyName.uid());
ASSERT(entry);
if (shouldOptimize)
entry->hasInferredType = table->willStoreValue(vm, propertyName, value, age);
else {
table->makeTop(vm, propertyName, age);
entry->hasInferredType = false;
}
}