Macros | Functions | Variables
luac.c File Reference
#include "lprefix.h"
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "lua.h"
#include "lauxlib.h"
#include "ldebug.h"
#include "lobject.h"
#include "lopcodes.h"
#include "lopnames.h"
#include "lstate.h"
#include "lundump.h"
Include dependency graph for luac.c:

Go to the source code of this file.

Macros

#define COMMENT   "\t; "
 
#define eventname(i)   (getstr(tmname[i]))
 
#define EXTRAARG   GETARG_Ax(code[pc+1])
 
#define EXTRAARGC   (EXTRAARG*(MAXARG_C+1))
 
#define FUNCTION   "(function()end)();"
 
#define IS(s)   (strcmp(argv[i],s)==0)
 
#define ISK   (isk ? "k" : "")
 
#define LUA_CORE
 
#define luac_c
 
#define luaU_print   PrintFunction
 
#define OUTPUT   PROGNAME ".out" /* default output file */
 
#define PROGNAME   "luac" /* default program name */
 
#define S(x)   (int)(x),SS(x)
 
#define SS(x)   ((x==1)?"":"s")
 
#define toproto(L, i)   getproto(s2v(L->top+(i)))
 
#define UPVALNAME(x)   ((f->upvalues[x].name) ? getstr(f->upvalues[x].name) : "-")
 
#define VOID(p)   ((const void*)(p))
 

Functions

static void cannot (const char *what)
 
static const Protocombine (lua_State *L, int n)
 
static int doargs (int argc, char *argv[])
 
static void fatal (const char *message)
 
int main (int argc, char *argv[])
 
static int pmain (lua_State *L)
 
static void PrintCode (const Proto *f)
 
static void PrintConstant (const Proto *f, int i)
 
static void PrintDebug (const Proto *f)
 
static void PrintFunction (const Proto *f, int full)
 
static void PrintHeader (const Proto *f)
 
static void PrintString (const TString *ts)
 
static void PrintType (const Proto *f, int i)
 
static const char * reader (lua_State *L, void *ud, size_t *size)
 
static void usage (const char *message)
 
static int writer (lua_State *L, const void *p, size_t size, void *u)
 

Variables

static int dumping =1
 
static int listing =0
 
static char Output [] ={ OUTPUT }
 
static const char * output =Output
 
static const char * progname =PROGNAME
 
static int stripping =0
 
static TString ** tmname
 

Macro Definition Documentation

◆ COMMENT

#define COMMENT   "\t; "

Definition at line 330 of file luac.c.

◆ eventname

#define eventname (   i)    (getstr(tmname[i]))

Definition at line 219 of file luac.c.

◆ EXTRAARG

#define EXTRAARG   GETARG_Ax(code[pc+1])

Definition at line 331 of file luac.c.

◆ EXTRAARGC

#define EXTRAARGC   (EXTRAARG*(MAXARG_C+1))

Definition at line 332 of file luac.c.

◆ FUNCTION

#define FUNCTION   "(function()end)();"

Definition at line 124 of file luac.c.

◆ IS

#define IS (   s)    (strcmp(argv[i],s)==0)

Definition at line 74 of file luac.c.

◆ ISK

#define ISK   (isk ? "k" : "")

Definition at line 333 of file luac.c.

◆ LUA_CORE

#define LUA_CORE

Definition at line 8 of file luac.c.

◆ luac_c

#define luac_c

Definition at line 7 of file luac.c.

◆ luaU_print

#define luaU_print   PrintFunction

Definition at line 29 of file luac.c.

◆ OUTPUT

#define OUTPUT   PROGNAME ".out" /* default output file */

Definition at line 32 of file luac.c.

◆ PROGNAME

#define PROGNAME   "luac" /* default program name */

Definition at line 31 of file luac.c.

◆ S

#define S (   x)    (int)(x),SS(x)

Definition at line 667 of file luac.c.

◆ SS

#define SS (   x)    ((x==1)?"":"s")

Definition at line 666 of file luac.c.

◆ toproto

#define toproto (   L,
 
)    getproto(s2v(L->top+(i)))

Definition at line 141 of file luac.c.

◆ UPVALNAME

#define UPVALNAME (   x)    ((f->upvalues[x].name) ? getstr(f->upvalues[x].name) : "-")

Definition at line 217 of file luac.c.

◆ VOID

#define VOID (   p)    ((const void*)(p))

Definition at line 218 of file luac.c.

Function Documentation

◆ cannot()

static void cannot ( const char *  what)
static

Definition at line 48 of file luac.c.

◆ combine()

static const Proto* combine ( lua_State L,
int  n 
)
static

Definition at line 143 of file luac.c.

◆ doargs()

static int doargs ( int  argc,
char *  argv[] 
)
static

Definition at line 76 of file luac.c.

◆ fatal()

static void fatal ( const char *  message)
static

Definition at line 42 of file luac.c.

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 197 of file luac.c.

◆ pmain()

static int pmain ( lua_State L)
static

Definition at line 169 of file luac.c.

◆ PrintCode()

static void PrintCode ( const Proto f)
static

Definition at line 335 of file luac.c.

◆ PrintConstant()

static void PrintConstant ( const Proto f,
int  i 
)
static

Definition at line 295 of file luac.c.

◆ PrintDebug()

static void PrintDebug ( const Proto f)
static

Definition at line 689 of file luac.c.

◆ PrintFunction()

static void PrintFunction ( const Proto f,
int  full 
)
static

Definition at line 717 of file luac.c.

◆ PrintHeader()

static void PrintHeader ( const Proto f)
static

Definition at line 669 of file luac.c.

◆ PrintString()

static void PrintString ( const TString ts)
static

Definition at line 221 of file luac.c.

◆ PrintType()

static void PrintType ( const Proto f,
int  i 
)
static

Definition at line 266 of file luac.c.

◆ reader()

static const char* reader ( lua_State L,
void *  ud,
size_t *  size 
)
static

Definition at line 126 of file luac.c.

◆ usage()

static void usage ( const char *  message)
static

Definition at line 54 of file luac.c.

◆ writer()

static int writer ( lua_State L,
const void *  p,
size_t  size,
void *  u 
)
static

Definition at line 163 of file luac.c.

Variable Documentation

◆ dumping

int dumping =1
static

Definition at line 35 of file luac.c.

◆ listing

int listing =0
static

Definition at line 34 of file luac.c.

◆ Output

char Output[] ={ OUTPUT }
static

Definition at line 37 of file luac.c.

◆ output

const char* output =Output
static

Definition at line 38 of file luac.c.

◆ progname

const char* progname =PROGNAME
static

Definition at line 39 of file luac.c.

◆ stripping

int stripping =0
static

Definition at line 36 of file luac.c.

◆ tmname

TString** tmname
static

Definition at line 40 of file luac.c.



plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:49