Skip to content

Commit

Permalink
issue #163 add DEFER bytecode to LLVM backend
Browse files Browse the repository at this point in the history
  • Loading branch information
dibyendumajumdar committed Dec 11, 2019
1 parent 51eeb4e commit 6f29bc6
Show file tree
Hide file tree
Showing 6 changed files with 906 additions and 797 deletions.
1 change: 1 addition & 0 deletions include/lvm.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,5 +161,6 @@ LUAI_FUNC void raviV_gettable_i(lua_State *L, const TValue *t, TValue *key, StkI
LUAI_FUNC void raviV_settable_i(lua_State *L, const TValue *t, TValue *key, StkId val);
LUAI_FUNC void raviV_op_totype(lua_State *L, TValue *ra, TValue *rb);
LUAI_FUNC int raviV_check_usertype(lua_State *L, TString *name, const TValue *o);
LUAI_FUNC void raviV_op_defer(lua_State *L, TValue *ra);

#endif
4 changes: 4 additions & 0 deletions include/ravi_llvmcodegen.h
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ struct LuaLLVMTypes {
llvm::FunctionType *raviV_gettable_iT;
llvm::FunctionType *raviV_settable_iT;
llvm::FunctionType *raviV_op_totypeT;
llvm::FunctionType *raviV_op_deferT;

llvm::FunctionType *raviH_set_intT;
llvm::FunctionType *raviH_set_floatT;
Expand Down Expand Up @@ -832,6 +833,7 @@ struct RaviFunctionDef {
llvm::Function *raviV_gettable_iF;
llvm::Function *raviV_settable_iF;
llvm::Function *raviV_op_totypeF;
llvm::Function *raviV_op_deferF;

// array setters
llvm::Function *raviH_set_intF;
Expand Down Expand Up @@ -1369,6 +1371,8 @@ class RaviCodeGenerator {

void emit_BNOT(RaviFunctionDef *def, int A, int B, int pc);

void emit_DEFER(RaviFunctionDef *def, int A, int pc);

void emit_bitwise_shiftl(RaviFunctionDef *def, llvm::Value *ra, int B, lua_Integer y);

private:
Expand Down
Loading

0 comments on commit 6f29bc6

Please sign in to comment.