lua/lundump.c File Reference

#include "lua.h"
#include "ldebug.h"
#include "lfunc.h"
#include "lmem.h"
#include "lopcodes.h"
#include "lstring.h"
#include "lundump.h"
#include "lzio.h"

Include dependency graph for lundump.c:

Go to the source code of this file.

Data Structures

struct  LoadState

Defines

#define lundump_c
#define LoadByte   (lu_byte) ezgetc
#define TESTSIZE(s, w)   TestSize(S,s,w)
#define V(v)   v/16,v%16

Functions

static void unexpectedEOZ (LoadState *S)
static int ezgetc (LoadState *S)
static void ezread (LoadState *S, void *b, int n)
static void LoadBlock (LoadState *S, void *b, size_t size)
static void LoadVector (LoadState *S, void *b, int m, size_t size)
static int LoadInt (LoadState *S)
static size_t LoadSize (LoadState *S)
static lua_Number LoadNumber (LoadState *S)
static TStringLoadString (LoadState *S)
static void LoadCode (LoadState *S, Proto *f)
static void LoadLocals (LoadState *S, Proto *f)
static void LoadLines (LoadState *S, Proto *f)
static void LoadUpvalues (LoadState *S, Proto *f)
static ProtoLoadFunction (LoadState *S, TString *p)
static void LoadConstants (LoadState *S, Proto *f)
static void LoadSignature (LoadState *S)
static void TestSize (LoadState *S, int s, const char *what)
static void LoadHeader (LoadState *S)
static ProtoLoadChunk (LoadState *S)
ProtoluaU_undump (lua_State *L, ZIO *Z, Mbuffer *buff)
int luaU_endianness (void)


Define Documentation

#define LoadByte   (lu_byte) ezgetc
 

Definition at line 19 of file lundump.c.

Referenced by LoadConstants(), LoadFunction(), LoadHeader(), and TestSize().

#define lundump_c
 

Definition at line 7 of file lundump.c.

#define TESTSIZE s,
 )     TestSize(S,s,w)
 

Definition at line 244 of file lundump.c.

Referenced by LoadHeader().

#define V  )     v/16,v%16
 

Definition at line 245 of file lundump.c.

Referenced by LoadHeader(), and rpmdsNVRMatchesDep().


Function Documentation

static int ezgetc LoadState S  )  [static]
 

Definition at line 36 of file lundump.c.

References EOZ, unexpectedEOZ(), LoadState::Z, and zgetc.

Referenced by LoadBlock(), LoadSignature(), and LoadVector().

static void ezread LoadState S,
void *  b,
int  n
[static]
 

Definition at line 44 of file lundump.c.

References luaZ_read(), unexpectedEOZ(), and LoadState::Z.

Referenced by LoadBlock(), LoadString(), and LoadVector().

static void LoadBlock LoadState S,
void *  b,
size_t  size
[static]
 

Definition at line 51 of file lundump.c.

References ezgetc(), ezread(), and LoadState::swap.

Referenced by LoadInt(), LoadNumber(), and LoadSize().

static Proto* LoadChunk LoadState S  )  [static]
 

Definition at line 277 of file lundump.c.

References LoadFunction(), and LoadHeader().

Referenced by luaU_undump().

static void LoadCode LoadState S,
Proto f
[static]
 

Definition at line 122 of file lundump.c.

References Proto::code, LoadState::L, LoadInt(), LoadVector(), luaM_newvector, and Proto::sizecode.

Referenced by LoadFunction().

static void LoadConstants LoadState S,
Proto f
[static]
 

Definition at line 172 of file lundump.c.

References Proto::k, LoadState::L, LoadByte, LoadInt(), LoadNumber(), LoadString(), luaG_runerror(), luaM_newvector, LoadState::name, setnilvalue, setnvalue, setsvalue2n, and Proto::sizek.

Referenced by LoadFunction().

static Proto * LoadFunction LoadState S,
TString p
[static]
 

Definition at line 205 of file lundump.c.

References Proto::is_vararg, LoadState::L, Proto::lineDefined, LoadByte, LoadCode(), LoadConstants(), LoadInt(), LoadLines(), LoadLocals(), LoadString(), LoadUpvalues(), luaF_newproto(), luaG_checkcode(), luaG_runerror(), Proto::maxstacksize, LoadState::name, Proto::numparams, Proto::nups, and Proto::source.

Referenced by LoadChunk().

static void LoadHeader LoadState S  )  [static]
 

Definition at line 247 of file lundump.c.

References LoadState::L, LoadByte, LoadNumber(), LoadSignature(), luaG_runerror(), luaU_endianness(), LoadState::name, SIZE_A, SIZE_B, SIZE_C, SIZE_OP, LoadState::swap, TEST_NUMBER, TESTSIZE, V, VERSION, and VERSION0.

Referenced by LoadChunk().

static int LoadInt LoadState S  )  [static]
 

Definition at line 82 of file lundump.c.

References LoadState::L, LoadBlock(), luaG_runerror(), and LoadState::name.

Referenced by LoadCode(), LoadConstants(), LoadFunction(), LoadLines(), LoadLocals(), and LoadUpvalues().

static void LoadLines LoadState S,
Proto f
[static]
 

Definition at line 146 of file lundump.c.

References LoadState::L, Proto::lineinfo, LoadInt(), LoadVector(), luaM_newvector, and Proto::sizelineinfo.

Referenced by LoadFunction().

static void LoadLocals LoadState S,
Proto f
[static]
 

Definition at line 131 of file lundump.c.

References LocVar::endpc, LoadState::L, LoadInt(), LoadString(), Proto::locvars, luaM_newvector, Proto::sizelocvars, LocVar::startpc, and LocVar::varname.

Referenced by LoadFunction().

static lua_Number LoadNumber LoadState S  )  [static]
 

Definition at line 99 of file lundump.c.

References LoadBlock().

Referenced by LoadConstants(), and LoadHeader().

static void LoadSignature LoadState S  )  [static]
 

Definition at line 226 of file lundump.c.

References ezgetc(), LoadState::L, LUA_SIGNATURE, luaG_runerror(), and LoadState::name.

Referenced by LoadHeader().

static size_t LoadSize LoadState S  )  [static]
 

Definition at line 91 of file lundump.c.

References LoadBlock().

Referenced by LoadString().

static TString* LoadString LoadState S  )  [static]
 

Definition at line 108 of file lundump.c.

References LoadState::b, ezread(), LoadState::L, LoadSize(), luaS_newlstr(), and luaZ_openspace().

Referenced by LoadConstants(), LoadFunction(), LoadLocals(), and LoadUpvalues().

static void LoadUpvalues LoadState S,
Proto f
[static]
 

Definition at line 155 of file lundump.c.

References LoadState::L, LoadInt(), LoadString(), luaG_runerror(), luaM_newvector, LoadState::name, Proto::nups, Proto::sizeupvalues, and Proto::upvalues.

Referenced by LoadFunction().

static void LoadVector LoadState S,
void *  b,
int  m,
size_t  size
[static]
 

Definition at line 64 of file lundump.c.

References ezgetc(), ezread(), and LoadState::swap.

Referenced by LoadCode(), and LoadLines().

int luaU_endianness void   ) 
 

Definition at line 306 of file lundump.c.

Referenced by DumpHeader(), and LoadHeader().

Proto* luaU_undump lua_State L,
ZIO Z,
Mbuffer buff
 

Definition at line 287 of file lundump.c.

References LoadState::b, LoadState::L, LoadChunk(), LUA_SIGNATURE, LoadState::name, LoadState::Z, and zname.

Referenced by f_parser().

static void TestSize LoadState S,
int  s,
const char *  what
[static]
 

Definition at line 235 of file lundump.c.

References LoadState::L, LoadByte, luaG_runerror(), and LoadState::name.

static void unexpectedEOZ LoadState S  )  [static]
 

Definition at line 30 of file lundump.c.

References LoadState::L, luaG_runerror(), and LoadState::name.

Referenced by ezgetc(), and ezread().


Generated on Tue Sep 4 14:27:08 2007 for rpm by  doxygen 1.4.6