ldump.c File Reference

Go to the source code of this file.

Classes

struct  DumpState

Defines

#define ldump_c
#define LUA_CORE
#define DumpMem(b, n, size, D)   DumpBlock(b,(n)*(size),D)
#define DumpVar(x, D)   DumpMem(&x,1,sizeof(x),D)
#define DumpCode(f, D)   DumpVector(f->code,f->sizecode,sizeof(Instruction),D)

Functions

static void DumpBlock (const void *b, size_t size, DumpState *D)
static void DumpChar (int y, DumpState *D)
static void DumpInt (int x, DumpState *D)
static void DumpNumber (lua_Number x, DumpState *D)
static void DumpVector (const void *b, int n, size_t size, DumpState *D)
static void DumpString (const TString *s, DumpState *D)
static void DumpFunction (const Proto *f, const TString *p, DumpState *D)
static void DumpConstants (const Proto *f, DumpState *D)
static void DumpDebug (const Proto *f, DumpState *D)
static void DumpHeader (DumpState *D)
int luaU_dump (lua_State *L, const Proto *f, lua_Writer w, void *data, int strip)

Define Documentation

#define DumpCode ( f,
 )     DumpVector(f->code,f->sizecode,sizeof(Instruction),D)

Definition at line 76 of file ldump.c.

Referenced by DumpFunction().

#define DumpMem ( b,
n,
size,
 )     DumpBlock(b,(n)*(size),D)

Definition at line 26 of file ldump.c.

Referenced by DumpVector().

#define DumpVar ( x,
 )     DumpMem(&x,1,sizeof(x),D)

Definition at line 27 of file ldump.c.

Referenced by DumpChar(), DumpInt(), DumpNumber(), and DumpString().

#define ldump_c

Definition at line 9 of file ldump.c.

#define LUA_CORE

Definition at line 10 of file ldump.c.


Function Documentation

static void DumpBlock ( const void *  b,
size_t  size,
DumpState D 
) [static]

Definition at line 29 of file ldump.c.

References DumpState::data, DumpState::L, lua_lock, lua_unlock, DumpState::status, and DumpState::writer.

Referenced by DumpHeader(), and DumpString().

static void DumpChar ( int  y,
DumpState D 
) [static]

Definition at line 39 of file ldump.c.

References DumpVar.

Referenced by DumpConstants(), and DumpFunction().

static void DumpConstants ( const Proto f,
DumpState D 
) [static]
static void DumpDebug ( const Proto f,
DumpState D 
) [static]
static void DumpFunction ( const Proto f,
const TString p,
DumpState D 
) [static]
static void DumpHeader ( DumpState D  )  [static]

Definition at line 143 of file ldump.c.

References DumpBlock(), LUAC_HEADERSIZE, and luaU_header().

Referenced by luaU_dump().

static void DumpInt ( int  x,
DumpState D 
) [static]

Definition at line 45 of file ldump.c.

References DumpVar.

Referenced by DumpConstants(), DumpDebug(), DumpFunction(), and DumpVector().

static void DumpNumber ( lua_Number  x,
DumpState D 
) [static]

Definition at line 50 of file ldump.c.

References DumpVar.

Referenced by DumpConstants().

static void DumpString ( const TString s,
DumpState D 
) [static]

Definition at line 61 of file ldump.c.

References DumpBlock(), DumpVar, getstr, TString::len, and TString::tsv.

Referenced by DumpConstants(), DumpDebug(), and DumpFunction().

static void DumpVector ( const void *  b,
int  n,
size_t  size,
DumpState D 
) [static]

Definition at line 55 of file ldump.c.

References DumpInt(), and DumpMem.

Referenced by DumpDebug().

int luaU_dump ( lua_State L,
const Proto f,
lua_Writer  w,
void *  data,
int  strip 
)

ContextLogger2—ContextLogger2 Logger Daemon Internals—Generated on Mon May 2 13:49:59 2011 by Doxygen 1.6.1