本文整理汇总了C++中atomset::Range类的典型用法代码示例。如果您正苦于以下问题:C++ Range类的具体用法?C++ Range怎么用?C++ Range使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Range类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: fprintf
js_DumpAtoms(JSContext *cx, FILE *fp)
{
JSAtomState *state = &cx->runtime->atomState;
fprintf(fp, "atoms table contents:\n");
unsigned number = 0;
for (AtomSet::Range r = state->atoms.all(); !r.empty(); r.popFront()) {
AtomEntryType entry = r.front();
fprintf(fp, "%3u ", number++);
if (entry == 0) {
fputs("<uninitialized>", fp);
} else {
JSAtom *key = AtomEntryToKey(entry);
FileEscapedString(fp, key, '"');
uintN flags = AtomEntryFlags(entry);
if (flags != 0) {
fputs((flags & (ATOM_PINNED | ATOM_INTERNED))
? " pinned | interned"
: (flags & ATOM_PINNED) ? " pinned" : " interned",
fp);
}
}
putc('\n', fp);
}
putc('\n', fp);
}
开发者ID:3l13,项目名称:APE_Server,代码行数:26,代码来源:jsatom.cpp
示例2: ClearAtomEntryFlags
void
js_FinishCommonAtoms(JSContext *cx)
{
cx->runtime->emptyString = NULL;
JSAtomState *state = &cx->runtime->atomState;
for (AtomSet::Range r = state->atoms.all(); !r.empty(); r.popFront())
ClearAtomEntryFlags(r.front(), ATOM_PINNED);
#ifdef DEBUG
memset(COMMON_ATOMS_START(state), JS_FREE_PATTERN,
ATOM_OFFSET_LIMIT - ATOM_OFFSET_START);
#endif
}
开发者ID:3l13,项目名称:APE_Server,代码行数:14,代码来源:jsatom.cpp
示例3: MarkString
void
js_TraceAtomState(JSTracer *trc)
{
JSRuntime *rt = trc->context->runtime;
JSAtomState *state = &rt->atomState;
#ifdef DEBUG
size_t number = 0;
#endif
if (rt->gcKeepAtoms) {
for (AtomSet::Range r = state->atoms.all(); !r.empty(); r.popFront()) {
JS_SET_TRACING_INDEX(trc, "locked_atom", number++);
MarkString(trc, AtomEntryToKey(r.front()));
}
} else {
for (AtomSet::Range r = state->atoms.all(); !r.empty(); r.popFront()) {
AtomEntryType entry = r.front();
uintN flags = AtomEntryFlags(entry);
if (flags & (ATOM_PINNED | ATOM_INTERNED)) {
JS_SET_TRACING_INDEX(trc,
flags & ATOM_PINNED
? "pinned_atom"
: "interned_atom",
number++);
MarkString(trc, AtomEntryToKey(entry));
}
}
}
}
开发者ID:3l13,项目名称:APE_Server,代码行数:30,代码来源:jsatom.cpp
示例4: MarkString
void
js_TraceAtomState(JSTracer *trc)
{
JSRuntime *rt = trc->context->runtime;
JSAtomState *state = &rt->atomState;
#ifdef DEBUG
size_t number = 0;
#endif
if (rt->gcKeepAtoms) {
for (AtomSet::Range r = state->atoms.all(); !r.empty(); r.popFront()) {
JS_SET_TRACING_INDEX(trc, "locked_atom", number++);
MarkString(trc, r.front().asPtr());
}
} else {
for (AtomSet::Range r = state->atoms.all(); !r.empty(); r.popFront()) {
AtomStateEntry entry = r.front();
if (!entry.isTagged())
continue;
JS_SET_TRACING_INDEX(trc, "interned_atom", number++);
MarkString(trc, entry.asPtr());
}
}
}
开发者ID:mozilla,项目名称:mozilla-history,代码行数:26,代码来源:jsatom.cpp
示例5: fprintf
js_DumpAtoms(JSContext *cx, FILE *fp)
{
JSAtomState *state = &cx->runtime->atomState;
fprintf(fp, "atoms table contents:\n");
unsigned number = 0;
for (AtomSet::Range r = state->atoms.all(); !r.empty(); r.popFront()) {
AtomStateEntry entry = r.front();
fprintf(fp, "%3u ", number++);
JSAtom *key = entry.asPtr();
FileEscapedString(fp, key, '"');
if (entry.isTagged())
fputs(" interned", fp);
putc('\n', fp);
}
putc('\n', fp);
}
开发者ID:mozilla,项目名称:mozilla-history,代码行数:17,代码来源:jsatom.cpp
注:本文中的atomset::Range类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论