CHDK_DE Vorschauversion  Trunk Rev. 6014
 Alle Datenstrukturen Dateien Funktionen Variablen Typdefinitionen Aufzählungen Aufzählungswerte Makrodefinitionen
ldebug.h-Dateireferenz
#include "lstate.h"
+ Include-Abhängigkeitsdiagramm für ldebug.h:
+ Dieser Graph zeigt, welche Datei direkt oder indirekt diese Datei enthält:

gehe zum Quellcode dieser Datei

Makrodefinitionen

#define pcRel(pc, p)   (cast(int, (pc) - (p)->code) - 1)
 
#define getline(f, pc)   (((f)->lineinfo) ? (f)->lineinfo[pc] : 0)
 
#define resethookcount(L)   (L->hookcount = L->basehookcount)
 

Funktionen

LUAI_FUNC void luaG_typeerror (lua_State *L, const TValue *o, const char *opname)
 
LUAI_FUNC void luaG_concaterror (lua_State *L, StkId p1, StkId p2)
 
LUAI_FUNC void luaG_aritherror (lua_State *L, const TValue *p1, const TValue *p2)
 
LUAI_FUNC int luaG_ordererror (lua_State *L, const TValue *p1, const TValue *p2)
 
LUAI_FUNC void luaG_runerror (lua_State *L, const char *fmt,...)
 
LUAI_FUNC void luaG_errormsg (lua_State *L)
 
LUAI_FUNC int luaG_checkcode (const Proto *pt)
 
LUAI_FUNC int luaG_checkopenop (Instruction i)
 

Makro-Dokumentation

#define getline (   f,
  pc 
)    (((f)->lineinfo) ? (f)->lineinfo[pc] : 0)

Definiert in Zeile 16 der Datei ldebug.h.

#define pcRel (   pc,
 
)    (cast(int, (pc) - (p)->code) - 1)

Definiert in Zeile 14 der Datei ldebug.h.

#define resethookcount (   L)    (L->hookcount = L->basehookcount)

Definiert in Zeile 18 der Datei ldebug.h.

Dokumentation der Funktionen

LUAI_FUNC void luaG_aritherror ( lua_State L,
const TValue p1,
const TValue p2 
)

Definiert in Zeile 588 der Datei ldebug.c.

588  {
589  TValue temp;
590  if (luaV_tonumber(p1, &temp) == NULL)
591  p2 = p1; /* first operand is wrong */
592  luaG_typeerror(L, p2, "perform arithmetic on");
593 }
LUAI_FUNC int luaG_checkcode ( const Proto pt)

Definiert in Zeile 484 der Datei ldebug.c.

484  {
485  return (symbexec(pt, pt->sizecode, NO_REG) != 0);
486 }
LUAI_FUNC int luaG_checkopenop ( Instruction  i)

Definiert in Zeile 290 der Datei ldebug.c.

290  {
291  switch (GET_OPCODE(i)) {
292  case OP_CALL:
293  case OP_TAILCALL:
294  case OP_RETURN:
295  case OP_SETLIST: {
296  check(GETARG_B(i) == 0);
297  return 1;
298  }
299  default: return 0; /* invalid instruction after an open call */
300  }
301 }
LUAI_FUNC void luaG_concaterror ( lua_State L,
StkId  p1,
StkId  p2 
)

Definiert in Zeile 581 der Datei ldebug.c.

581  {
582  if (ttisstring(p1) || ttisnumber(p1)) p1 = p2;
583  lua_assert(!ttisstring(p1) && !ttisnumber(p1));
584  luaG_typeerror(L, p1, "concatenate");
585 }
LUAI_FUNC void luaG_errormsg ( lua_State L)

Definiert in Zeile 618 der Datei ldebug.c.

618  {
619  if (L->errfunc != 0) { /* is there an error handling function? */
620  StkId errfunc = restorestack(L, L->errfunc);
621  if (!ttisfunction(errfunc)) luaD_throw(L, LUA_ERRERR);
622  setobjs2s(L, L->top, L->top - 1); /* move argument */
623  setobjs2s(L, L->top - 1, errfunc); /* push function */
624  incr_top(L);
625  luaD_call(L, L->top - 2, 1); /* call it */
626  }
628 }
LUAI_FUNC int luaG_ordererror ( lua_State L,
const TValue p1,
const TValue p2 
)

Definiert in Zeile 596 der Datei ldebug.c.

596  {
597  const char *t1 = luaT_typenames[ttype(p1)];
598  const char *t2 = luaT_typenames[ttype(p2)];
599  if (t1[2] == t2[2])
600  luaG_runerror(L, "attempt to compare two %s values", t1);
601  else
602  luaG_runerror(L, "attempt to compare %s with %s", t1, t2);
603  return 0;
604 }
LUAI_FUNC void luaG_runerror ( lua_State L,
const char *  fmt,
  ... 
)

Definiert in Zeile 631 der Datei ldebug.c.

631  {
632  va_list argp;
633  va_start(argp, fmt);
634  addinfo(L, luaO_pushvfstring(L, fmt, argp));
635  va_end(argp);
636  luaG_errormsg(L);
637 }
LUAI_FUNC void luaG_typeerror ( lua_State L,
const TValue o,
const char *  opname 
)

Definiert in Zeile 567 der Datei ldebug.c.

567  {
568  const char *name = NULL;
569  const char *t = luaT_typenames[ttype(o)];
570  const char *kind = (isinstack(L->ci, o)) ?
571  getobjname(L, L->ci, cast_int(o - L->base), &name) :
572  NULL;
573  if (kind)
574  luaG_runerror(L, "attempt to %s %s " LUA_QS " (a %s value)",
575  op, kind, name, t);
576  else
577  luaG_runerror(L, "attempt to %s a %s value", op, t);
578 }