示例#1
0
文件: lcode.c 项目: OLR-xray/XRay-NEW
static void removevalues (FuncState *fs, int list) {
  for (; list != NO_JUMP; list = getjump(fs, list)) {
    Instruction *i = getjumpcontrol(fs, list);
    if (GET_OPCODE(*i) == OP_TESTSET)
      patchtestreg(i, NO_REG);
  }
}
示例#2
0
static void patchlistaux (FuncState *fs, int list, int vtarget, int reg, int dtarget) {
    while (list != NO_JUMP) {
        int next = getjump(fs, list);
        if (patchtestreg(fs, list, reg))
            fixjump(fs, list, vtarget);
        else
            fixjump(fs, list, dtarget);    /* jump to default target */
        list = next;
    }
}
示例#3
0
文件: lcode.c 项目: OLR-xray/XRay-NEW
static void patchlistaux (FuncState *fs, int list, int vtarget, int reg,
                          int dtarget) {
  while (list != NO_JUMP) {
    int next = getjump(fs, list);
    Instruction *i = getjumpcontrol(fs, list);
    if (GET_OPCODE(*i) == OP_TESTSET) {
      patchtestreg(i, reg);
      fixjump(fs, list, vtarget);
    }
    else
      fixjump(fs, list, dtarget);  /* jump to default target */
    list = next;
  }
}
示例#4
0
static void luaK_patchlistaux (FuncState *fs, int list,
          int ttarget, int treg, int ftarget, int freg, int dtarget) {
  while (list != NO_JUMP) {
    int next = luaK_getjump(fs, list);
    Instruction *i = getjumpcontrol(fs, list);
    if (GET_OPCODE(*i) != OP_TEST) {
      lua_assert(dtarget != NO_JUMP);
      luaK_fixjump(fs, list, dtarget);  /* jump to default target */
    }
    else {
      if (GETARG_C(*i)) {
        lua_assert(ttarget != NO_JUMP);
        patchtestreg(i, treg);
        luaK_fixjump(fs, list, ttarget);
      }
      else {
        lua_assert(ftarget != NO_JUMP);
        patchtestreg(i, freg);
        luaK_fixjump(fs, list, ftarget);
      }
    }
    list = next;
  }
}
示例#5
0
文件: lcode.c 项目: celskeggs/selkie
/*
** Traverse a list of tests ensuring no one produces a value
*/
static void removevalues (FuncState *fs, int list) {
  for (; list != NO_JUMP; list = getjump(fs, list))
      patchtestreg(fs, list, NO_REG);
}
示例#6
0
文件: lcode.cpp 项目: swizl/lua
/*static*/ void FuncState::removevalues (/*FuncState *fs,*/ int list) {
	for (; list != NO_JUMP; list = getjump(list))
			patchtestreg(list, NO_REG);
}