本文整理汇总了C++中Executer::topInt方法的典型用法代码示例。如果您正苦于以下问题:C++ Executer::topInt方法的具体用法?C++ Executer::topInt怎么用?C++ Executer::topInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Executer
的用法示例。
在下文中一共展示了Executer::topInt方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: executeExponentialIntInt
void executeExponentialIntInt(Executer &executer)
{
auto y = executer.topInt();
executer.pop();
auto x = executer.topInt();
executer.setTop(PowerIntInt{executer, x, y}());
}
示例2: executeSubtractIntInt
void executeSubtractIntInt(Executer &executer)
{
auto rhs = executer.topInt();
executer.pop();
auto result = int64_t{executer.topInt()};
result -= rhs;
checkIntegerOverflow(executer, result);
executer.setTopIntFromInt64(result);
}
示例3: popIntegerDivisor
inline int32_t popIntegerDivisor(Executer &executer)
{
auto rhs = executer.topInt();
checkDivideByZero(executer, rhs);
executer.pop();
return rhs;
}
示例4: executeRndInt
void executeRndInt(Executer &executer)
{
auto argument = executer.topInt();
if (argument <= 0) {
throw RunError {"random function on zero or negative number", executer.currentOffset()};
}
executer.setTop(executer.getRandomNumber(argument));
}
示例5: executeAbsInt
void executeAbsInt(Executer &executer)
{
auto argument = executer.topInt();
if (argument < 0) {
checkNegativeIntegerOverflow(executer, argument);
executer.setTop(-argument);
}
}
示例6: executeImp
void executeImp(Executer &executer)
{
auto rhs = executer.topInt();
executer.pop();
executer.setTop(~executer.topInt() | rhs);
}
示例7: executeEqv
void executeEqv(Executer &executer)
{
auto rhs = executer.topInt();
executer.pop();
executer.setTop(~(executer.topInt() ^ rhs));
}
示例8: executeXor
void executeXor(Executer &executer)
{
auto rhs = executer.topInt();
executer.pop();
executer.setTop(executer.topInt() ^ rhs);
}
示例9: executeAnd
void executeAnd(Executer &executer)
{
auto rhs = executer.topInt();
executer.pop();
executer.setTop(executer.topInt() & rhs);
}
示例10: executeModuloIntInt
void executeModuloIntInt(Executer &executer)
{
auto rhs = popIntegerDivisor(executer);
executer.setTop(executer.topInt() % rhs);
}
示例11: executeDivideIntInt
void executeDivideIntInt(Executer &executer)
{
auto rhs = popIntegerDivisor(executer);
executer.setTop(executer.topInt() / rhs);
}
示例12: executeNegateInt
void executeNegateInt(Executer &executer)
{
auto operand = executer.topInt();
checkNegativeIntegerOverflow(executer, operand);
executer.setTop(-operand);
}