本文整理汇总了C++中FuncEmitter::addFPIEnt方法的典型用法代码示例。如果您正苦于以下问题:C++ FuncEmitter::addFPIEnt方法的具体用法?C++ FuncEmitter::addFPIEnt怎么用?C++ FuncEmitter::addFPIEnt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FuncEmitter
的用法示例。
在下文中一共展示了FuncEmitter::addFPIEnt方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: emit_finish_func
void emit_finish_func(const php::Func& func,
FuncEmitter& fe,
const EmitBcInfo& info) {
if (info.containsCalls) fe.containsCalls = true;;
for (auto& fpi : info.fpiRegions) {
auto& e = fe.addFPIEnt();
e.m_fpushOff = fpi.fpushOff;
e.m_fcallOff = fpi.fcallOff;
e.m_fpOff = fpi.fpDelta;
}
emit_locals_and_params(fe, func, info);
emit_ehent_tree(fe, func, info);
fe.userAttributes = func.userAttributes;
fe.retUserType = func.returnUserType;
fe.originalFilename = func.originalFilename;
fe.isClosureBody = func.isClosureBody;
fe.isAsync = func.isAsync;
fe.isGenerator = func.isGenerator;
fe.isPairGenerator = func.isPairGenerator;
if (func.nativeInfo) {
fe.returnType = func.nativeInfo->returnType;
}
fe.retTypeConstraint = func.retTypeConstraint;
fe.maxStackCells = info.maxStackDepth +
fe.numLocals() +
fe.numIterators() * kNumIterCells +
info.maxFpiDepth * kNumActRecCells;
fe.finish(fe.ue().bcPos(), false /* load */);
fe.ue().recordFunction(&fe);
}
示例2: emit_finish_func
void emit_finish_func(const php::Func& func,
FuncEmitter& fe,
const EmitBcInfo& info) {
fe.setMaxStackCells(
info.maxStackDepth + fe.numLocals() +
info.maxFpiDepth * kNumActRecCells
);
if (info.containsCalls) fe.setContainsCalls();
for (auto& fpi : info.fpiRegions) {
auto& e = fe.addFPIEnt();
e.m_fpushOff = fpi.fpushOff;
e.m_fcallOff = fpi.fcallOff;
e.m_fpOff = fpi.fpDelta;
}
emit_locals_and_params(fe, func, info);
emit_ehent_tree(fe, func, info);
fe.setUserAttributes(func.userAttributes);
fe.setReturnUserType(func.returnUserType);
fe.setOriginalFilename(func.originalFilename);
fe.setIsClosureBody(func.isClosureBody);
fe.setIsGenerator(func.isGeneratorBody);
fe.setIsGeneratorFromClosure(func.isGeneratorFromClosure);
fe.setIsPairGenerator(func.isPairGenerator);
fe.setGeneratorBodyName(func.generatorBodyName);
fe.setIsAsync(func.isAsync);
fe.finish(fe.ue().bcPos(), false /* load */);
fe.ue().recordFunction(&fe);
}