예제 #1
0
NativeObject *
BaselineInspector::getTemplateObjectForNative(jsbytecode *pc, Native native)
{
    if (!hasBaselineScript())
        return nullptr;

    const ICEntry &entry = icEntryFromPC(pc);
    for (ICStub *stub = entry.firstStub(); stub; stub = stub->next()) {
        if (stub->isCall_Native() && stub->toCall_Native()->callee()->native() == native)
            return stub->toCall_Native()->templateObject();
        if (stub->isCall_StringSplit() && native == js::str_split)
            return stub->toCall_StringSplit()->templateObject();
    }

    return nullptr;
}