本文整理汇总了C++中IonFrameIterator::isOOLPropertyOp方法的典型用法代码示例。如果您正苦于以下问题:C++ IonFrameIterator::isOOLPropertyOp方法的具体用法?C++ IonFrameIterator::isOOLPropertyOp怎么用?C++ IonFrameIterator::isOOLPropertyOp使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IonFrameIterator
的用法示例。
在下文中一共展示了IonFrameIterator::isOOLPropertyOp方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
static void
MarkIonExitFrame(JSTracer *trc, const IonFrameIterator &frame)
{
IonExitFooterFrame *footer = frame.exitFrame()->footer();
// Mark the code of the code handling the exit path. This is needed because
// invalidated script are no longer marked because data are erased by the
// invalidation and relocation data are no longer reliable. So the VM
// wrapper or the invalidation code may be GC if no IonCode keep reference
// on them.
JS_ASSERT(uintptr_t(footer->ionCode()) != uintptr_t(-1));
// This correspond to the case where we have build a fake exit frame in
// CodeGenerator.cpp which handle the case of a native function call. We
// need to mark the argument vector of the function call.
if (frame.isNative()) {
IonNativeExitFrameLayout *native = frame.exitFrame()->nativeExit();
size_t len = native->argc() + 2;
Value *vp = native->vp();
gc::MarkValueRootRange(trc, len, vp, "ion-native-args");
return;
}
if (frame.isOOLNativeGetter()) {
IonOOLNativeGetterExitFrameLayout *oolgetter = frame.exitFrame()->oolNativeGetterExit();
gc::MarkIonCodeRoot(trc, oolgetter->stubCode(), "ion-ool-getter-code");
gc::MarkValueRoot(trc, oolgetter->vp(), "ion-ool-getter-callee");
gc::MarkValueRoot(trc, oolgetter->thisp(), "ion-ool-getter-this");
return;
}
if (frame.isOOLPropertyOp()) {
IonOOLPropertyOpExitFrameLayout *oolgetter = frame.exitFrame()->oolPropertyOpExit();
gc::MarkIonCodeRoot(trc, oolgetter->stubCode(), "ion-ool-property-op-code");
gc::MarkValueRoot(trc, oolgetter->vp(), "ion-ool-property-op-vp");
gc::MarkIdRoot(trc, oolgetter->id(), "ion-ool-property-op-id");
gc::MarkObjectRoot(trc, oolgetter->obj(), "ion-ool-property-op-obj");
return;
}
if (frame.isDOMExit()) {
IonDOMExitFrameLayout *dom = frame.exitFrame()->DOMExit();
gc::MarkObjectRoot(trc, dom->thisObjAddress(), "ion-dom-args");
if (dom->isSetterFrame()) {
gc::MarkValueRoot(trc, dom->vp(), "ion-dom-args");
} else if (dom->isMethodFrame()) {
IonDOMMethodExitFrameLayout *method =
reinterpret_cast<IonDOMMethodExitFrameLayout *>(dom);
size_t len = method->argc() + 2;
Value *vp = method->vp();
gc::MarkValueRootRange(trc, len, vp, "ion-dom-args");
}
return;
}
MarkIonCodeRoot(trc, footer->addressOfIonCode(), "ion-exit-code");
const VMFunction *f = footer->function();
if (f == NULL || f->explicitArgs == 0)
return;
// Mark arguments of the VM wrapper.
uint8 *argBase = frame.exitFrame()->argBase();
for (uint32 explicitArg = 0; explicitArg < f->explicitArgs; explicitArg++) {
switch (f->argRootType(explicitArg)) {
case VMFunction::RootNone:
break;
case VMFunction::RootObject: {
// Sometimes we can bake in HandleObjects to NULL.
JSObject **pobj = reinterpret_cast<JSObject **>(argBase);
if (*pobj)
gc::MarkObjectRoot(trc, pobj, "ion-vm-args");
break;
}
case VMFunction::RootString:
case VMFunction::RootPropertyName:
gc::MarkStringRoot(trc, reinterpret_cast<JSString**>(argBase), "ion-vm-args");
break;
case VMFunction::RootFunction:
gc::MarkObjectRoot(trc, reinterpret_cast<JSFunction**>(argBase), "ion-vm-args");
break;
case VMFunction::RootValue:
gc::MarkValueRoot(trc, reinterpret_cast<Value*>(argBase), "ion-vm-args");
break;
case VMFunction::RootCell:
gc::MarkGCThingRoot(trc, reinterpret_cast<void **>(argBase), "ion-vm-args");
break;
}
switch (f->argProperties(explicitArg)) {
case VMFunction::WordByValue:
case VMFunction::WordByRef:
argBase += sizeof(void *);
break;
case VMFunction::DoubleByValue:
case VMFunction::DoubleByRef:
argBase += 2 * sizeof(void *);
break;
}
}
//.........这里部分代码省略.........