本文整理汇总了C++中JSValue::mark方法的典型用法代码示例。如果您正苦于以下问题:C++ JSValue::mark方法的具体用法?C++ JSValue::mark怎么用?C++ JSValue::mark使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JSValue
的用法示例。
在下文中一共展示了JSValue::mark方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mark
void PropertyMap::mark() const
{
if (!_table) {
#if USE_SINGLE_ENTRY
if (_singleEntry.key) {
JSValue *v = _singleEntry.value;
if (!v->marked())
v->mark();
}
#endif
return;
}
int minimumKeysToProcess = _table->keyCount;
Entry *entries = _table->entries;
for (int i = 0; i < minimumKeysToProcess; i++) {
JSValue *v = entries[i].value;
if (v) {
if (!v->marked())
v->mark();
} else {
++minimumKeysToProcess;
}
}
}
示例2: mark
EXPORT
void JSObject::mark()
{
if(checkStackDepthTooDeep())
{
return;
}
JSCell::mark();
#if JAVASCRIPT_MARK_TRACING
static int markStackDepth = 0;
markStackDepth++;
for (int i = 0; i < markStackDepth; i++)
putchar('-');
printf("%s (%p)\n", className().UTF8String().c_str(), this);
#endif
JSValue *proto = _proto;
if (!proto->marked())
proto->mark();
_prop.mark();
#if JAVASCRIPT_MARK_TRACING
markStackDepth--;
#endif
}
示例3: mark
void ArrayInstance::mark()
{
JSObject::mark();
unsigned l = storageLength;
for (unsigned i = 0; i < l; ++i) {
JSValue *imp = storage[i];
if (imp && !imp->marked())
imp->mark();
}
}
示例4: mark
void JSArray::mark()
{
JSObject::mark();
ArrayStorage* storage = m_storage;
unsigned usedVectorLength = min(storage->m_length, storage->m_vectorLength);
for (unsigned i = 0; i < usedVectorLength; ++i) {
JSValue* value = storage->m_vector[i];
if (value && !value->marked())
value->mark();
}
if (SparseArrayValueMap* map = storage->m_sparseValueMap) {
SparseArrayValueMap::iterator end = map->end();
for (SparseArrayValueMap::iterator it = map->begin(); it != end; ++it) {
JSValue* value = it->second;
if (!value->marked())
value->mark();
}
}
}
示例5: markLists
void ArgList::markLists(ListSet& markSet)
{
ListSet::iterator end = markSet.end();
for (ListSet::iterator it = markSet.begin(); it != end; ++it) {
ArgList* list = *it;
iterator end2 = list->end();
for (iterator it2 = list->begin(); it2 != end2; ++it2) {
JSValue* v = *it2;
if (!v->marked())
v->mark();
}
}
}
示例6: mark
void JSObject::mark()
{
JSOBJECT_MARK_BEGIN();
JSCell::mark();
m_structureID->mark();
size_t storageSize = m_structureID->propertyStorageSize();
for (size_t i = 0; i < storageSize; ++i) {
JSValue* v = m_propertyStorage[i];
if (!v->marked())
v->mark();
}
JSOBJECT_MARK_END();
}
示例7: mark
void JSObject::mark()
{
JSOBJECT_MARK_BEGIN();
JSCell::mark();
m_structureID->mark();
unsigned storageSize = m_structureID->propertyMap().markingCount();
if (storageSize) {
for (unsigned i = 0; i < storageSize; ++i) {
JSValue* v = m_propertyStorage[i];
if (!v->marked())
v->mark();
}
}
JSOBJECT_MARK_END();
}
示例8: markIfNeeded
static inline void markIfNeeded(JSValue v)
{
if (v && !v.marked())
v.mark();
}