implementation of BREAK

This commit is contained in:
Roberto Ierusalimschy
2000-04-05 14:51:58 -03:00
parent 9f734094f9
commit 22329e4cdf
6 changed files with 168 additions and 117 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lcode.h,v 1.8 2000/03/15 20:50:33 roberto Exp roberto $
** $Id: lcode.h,v 1.9 2000/03/17 13:09:46 roberto Exp roberto $
** Code generator for Lua
** See Copyright Notice in lua.h
*/
@@ -13,6 +13,9 @@
#include "lparser.h"
#define NO_JUMP (-1) /* marks end of patch list */
void luaK_error (LexState *ls, const char *msg);
int luaK_0(FuncState *fs, OpCode o, int d);
int luaK_U(FuncState *fs, OpCode o, int u, int d);
@@ -20,8 +23,9 @@ int luaK_S(FuncState *fs, OpCode o, int s, int d);
int luaK_AB(FuncState *fs, OpCode o, int a, int b, int d);
int luaK_code (FuncState *fs, Instruction i, int delta);
void luaK_retcode (FuncState *fs, int nlocals, int nexps);
void luaK_fixjump (FuncState *fs, int pc, int dest);
int luaK_jump (FuncState *fs);
void luaK_patchlist (FuncState *fs, int list, int target);
void luaK_concat (FuncState *fs, int *l1, int l2);
void luaK_goiftrue (FuncState *fs, expdesc *v, int keepvalue);
void luaK_goiffalse (FuncState *fs, expdesc *v, int keepvalue);
int luaK_getlabel (FuncState *fs);