Commit Graph

1078 Commits (master)

Author SHA1 Message Date
Dibyendu Majumdar 31824e2a9b issue #169 add op_defer support in JIT backend
4 years ago
Dibyendu Majumdar 2c13ac8ee8 Merge branch 'master' of https://github.com/dibyendumajumdar/ravi
4 years ago
Dibyendu Majumdar 6967c5d54b issue #169
4 years ago
Dibyendu Majumdar 803acc3d1d issue #171
4 years ago
Dibyendu Majumdar 3e5df1fdb8 issue #171
4 years ago
Dibyendu Majumdar feae81c25f
Various updates
4 years ago
Dibyendu Majumdar 483569d8db issue #171 SETLIST is no longer an inline op code in the VM
4 years ago
Dibyendu Majumdar 8c6387facf issue #169 cleanup
4 years ago
Dibyendu Majumdar 1e85a5b37a issue #169 cleanups
4 years ago
Dibyendu Majumdar 9b477bf5fe issue #169 update to latest MIR interface
4 years ago
Dibyendu Majumdar 12eda8ca0d issue #163 fix bugs - wrong type associated with the LLVM definition of raviV_op_defer()
4 years ago
Dibyendu Majumdar aaee69bfd2 issue #163 fix bugs - in particular the offet of value in UpVal has changed
4 years ago
Dibyendu Majumdar 07a422eb74 issue #163 fixes related to loading of base following luaF_close
4 years ago
Dibyendu Majumdar 6f29bc6cd8 issue #163 add DEFER bytecode to LLVM backend
4 years ago
Dibyendu Majumdar 51eeb4e8c2 issue #163 simplify defer statement and fix memory leak
4 years ago
Dibyendu Majumdar edce55b997 issue #163 Base must be protected as luaF_close can now reallocate stack due to invocation of deferred functions
4 years ago
Dibyendu Majumdar 9a0ced9620 issue #163 First attempt to implement a Go like defer statement
4 years ago
Dibyendu Majumdar de42b8b0eb issue #98 some work work on type checking - table expressions, do while and repeat statements
4 years ago
Dibyendu Majumdar bdaa211faf Merge branch 'master' into mir
5 years ago
Dibyendu Majumdar 2e748fcefc issue #169
5 years ago
Dibyendu Majumdar 4727dd052a issue #170 Add support for LLVM 9
5 years ago
Dibyendu Majumdar 4e445f46bf issue #169 Add initial support for MIR JIT backend
5 years ago
Dibyendu Majumdar c3952c2b98 issue #98 add type conversion for some assignments
5 years ago
Dibyendu Majumdar e4f0b7aa1a issue #98 type check for statements
5 years ago
Dibyendu Majumdar 859eb75316 issue #98 type check for statements
5 years ago
Dibyendu Majumdar fecb13dbc2 issue #98 type check for statements
5 years ago
Dibyendu Majumdar db626e34c1 issue #98 type check for statements
5 years ago
Dibyendu Majumdar 99d9fcbdd2 issue #98 make the normal parser consistent with the new typechecker
5 years ago
Dibyendu Majumdar 6b5315366a issue #98 print type info for some more ast nodes
5 years ago
Dibyendu Majumdar 4ad83f8abf issue #98 typecheck expression statements
5 years ago
Dibyendu Majumdar 4c39afe84e issue #98 typecheck local stmt (incomplete)
5 years ago
Dibyendu Majumdar 5d03214477 issue #98 renaming of fields for consistency
5 years ago
Dibyendu Majumdar e2f91553b6 issue #98 more on suffixed expr typechecks
5 years ago
Dibyendu Majumdar cf7f4b33c0 issue #98 start to implement suffixed expr typechecks
5 years ago
Dibyendu Majumdar b2120b97cc issue #98 implement type checks for binary operators
5 years ago
Dibyendu Majumdar a5bfc25163 issue #98 split up the source for the AST parser to make it more workable
5 years ago
Dibyendu Majumdar 5b15a2ffce issue #164 try to get ORC v2 working
5 years ago
Dibyendu Majumdar 01e67ee61e issue #164 try to get ORC v2 working
5 years ago
Dibyendu Majumdar 58c0b2c8df issue #164 try to get ORC v2 working
5 years ago
Dibyendu Majumdar 5f8bf68a3e issue #164 simplify code as suggested by Lang Hames
5 years ago
Dibyendu Majumdar 529169d816 issue #126 fix seg fault due to attempt to remove a module was never added; also if env var RAVI_USE_DMRC_LLVM is set then enable dmrC based LLVM
5 years ago
Dibyendu Majumdar 9dfcd7c2b8 issue #126 add support for dmr_C based LLVM backend. Not enabled yet.
5 years ago
Dibyendu Majumdar b1396c8886 issue #114 experiment with for loop
5 years ago
Dibyendu Majumdar 2aa2515fe1 issue #164 optimizeModule() no longer static
5 years ago
Dibyendu Majumdar e1298a4e95 issue #164 trying our ORC v2 apis, but optimzation is broken so disable for now
5 years ago
Dibyendu Majumdar b163aab427 issue #164 added support for llvm 8.0.1
5 years ago
Dibyendu Majumdar 5ce7810402 issue #164 added support for llvm 8.0.1
5 years ago
Dibyendu Majumdar 1b45bcf320 issue #164 added support for llvm 8.0.1
5 years ago
Dibyendu Majumdar 58cc6cf5e5 issue #157 cleanup api for getting access to array raw data and revise the inline short string table lookup so that we have an inline part and a slow part
5 years ago
dibyendumajumdar 2672b86904 Merge branch 'master' of https://github.com/dibyendumajumdar/ravi
5 years ago
dibyendumajumdar 16f40a39f6 Fix gcc warning
5 years ago
Dibyendu Majumdar 16576517df issue #135 some restructuring
5 years ago
Dibyendu Majumdar 81b4b1fb35 doc updates and some minor reformatting
5 years ago
Dibyendu Majumdar 72b5dc551a issue #98 tiny bit of work in type checking - table expr
5 years ago
Dibyendu Majumdar fe3ca414f1 issue #98 tiny bit of work in type checking - table expr
5 years ago
Dibyendu Majumdar 93121f3afe issue #98 tiny bit of work in type checking, handle unary expr
5 years ago
dibyendumajumdar fe2632bad9 The simple makefile build should not enable assertions and ltests
5 years ago
Dibyendu Majumdar a92416f864 issue #98 fix compile error
5 years ago
Dibyendu Majumdar 3a98ffe3c2 issue #98 dump list of locals for each function, and start work on type checker
5 years ago
Dibyendu Majumdar f9c74b3b08 issue #98 fix bug in while parsing - remove extra endscope
5 years ago
Dibyendu Majumdar 2912415983 issue #98 fix parsing of consecutive labels
5 years ago
Dibyendu Majumdar e0b4d65402 issue #98 cleanup
5 years ago
Dibyendu Majumdar 83bcfcbed2 issue #98 add missing end_function() calls
5 years ago
Dibyendu Majumdar 2f85d6e8bc issue #98 reformat
5 years ago
Dibyendu Majumdar 06335d0d36 issue #98 cleanup
5 years ago
Dibyendu Majumdar 7385d76f12 issue #98 refactor scope and ast so that statement lists are no longer in scope
5 years ago
Dibyendu Majumdar 74e8c76f5a issue #98 fix bug - final return not handled correctly, and ensure on parser failure error message is pushed as a second value after nil
5 years ago
Dibyendu Majumdar 04b1885011 issue #98 redo upvalue implementation - wip
5 years ago
Dibyendu Majumdar abe4759bc7 issue #114 fix bug in handling of function call
5 years ago
Dibyendu Majumdar b95a2e7016 issue #98 Reformat using clangformat
5 years ago
Dibyendu Majumdar 01eb83dcfe issue #161 avoid taking address of math functions in the fast call scenario, instead assign unique codes to functions that may be inlined
5 years ago
dibyendumajumdar f057c79ccf issue #157
6 years ago
Dibyendu Majumdar d27dbd7619 issue #110
6 years ago
Dibyendu Majumdar e5b5ae9f05 issue #110
6 years ago
Dibyendu Majumdar ebff2906c7 issue #110
6 years ago
Dibyendu Majumdar ceeb4d86bf issue #110 update savedpc befaore function calls
6 years ago
Dibyendu Majumdar cb3f9282e5 issue #110 bug fix
6 years ago
Dibyendu Majumdar 08157b102c issue #157 rename bytecodes
6 years ago
Dibyendu Majumdar 5e552ab4a7 issue #157 more renaming of bytecodes
6 years ago
Dibyendu Majumdar 489e118012 issue #157 more renaming of bytecodes
6 years ago
Dibyendu Majumdar b65c595e05 issue #157 import from Lua 5.4 changes to the way number conversions are done in the VM to push string coersion down to string metamethods
6 years ago
Dibyendu Majumdar dd593cdcd5 issue #157 import from Lua 5.4 changes to the way number conversions are done in the VM to push string coersion down to string metamethods
6 years ago
Dibyendu Majumdar 21028d833b issue #157 more renaming of op codes
6 years ago
Dibyendu Majumdar 31f4e178ee issue #157 more opcode renaming
6 years ago
Dibyendu Majumdar fc6929aa58 issue #157 more opcode renaming
6 years ago
Dibyendu Majumdar edac3648f0 issue #158 import the string metamethods from 5.4
6 years ago
Dibyendu Majumdar 7041827d53 issue #157 rename the array get/set op codes
6 years ago
Dibyendu Majumdar eec9a49414 issue #157: rename GETTABLE_SK and SETTABLE_SK opcodes
6 years ago
Dibyendu Majumdar 04ca32e8f5 Remove the metatable api alternatives
6 years ago
Dibyendu Majumdar d4d679bb3c issue #156
6 years ago
Dibyendu Majumdar 2d646a0bde issue #110 Enable setting opt level
6 years ago
Dibyendu Majumdar 21427cf741 issue #98
6 years ago
Dibyendu Majumdar 478375f354 issue #98
6 years ago
Dibyendu Majumdar 1f1115eb06 issue #110 add more specific method calls for table set/get ops
6 years ago
Dibyendu Majumdar 5f4b94bed6 issue #110 dump C intermediate code if verbosity is on
6 years ago
Dibyendu Majumdar 3def57baf8 issue #110 option to inline some arithmetic ops
6 years ago
Dibyendu Majumdar 5d5d036fdc issue #110 more opcodes
6 years ago
Dibyendu Majumdar 3e1d1bc752 issue #110 add support for a few more op codes
6 years ago
Dibyendu Majumdar 31bb288c2c issue #98 rearrange code
6 years ago
Dibyendu Majumdar f6fc9b100b issue #98 rearrange code
6 years ago
Dibyendu Majumdar d3cf8fb6b4 issue #110 avoid calling functions with local vars passed by reference due to incorrect opt by OMR JIT; this also means that we cannot do implicit conversions in some opcodes such as the arith opcodes or for num loops
6 years ago
Dibyendu Majumdar 405fc20f91 issue #110 add support for omitting range checks on array read access for OMR JIT
6 years ago
Dibyendu Majumdar 9f3043dcc9 reduce compiler noise (warnings)
6 years ago
Dibyendu Majumdar 365a4157af issue #110 refactoring
6 years ago
Dibyendu Majumdar a11cf5ae66 issue #110 fix missing refresh of base pointer and define full set of loop vars even for the int loop instruction
6 years ago
Dibyendu Majumdar 1c97bd1974 issue #110 add implementations of JIT api
6 years ago
Dibyendu Majumdar 1a8c432625 issue #110 fix stupid typo bug in ravi_jitshared (emit_op_movef) and add implementations of JIT api
6 years ago
Dibyendu Majumdar 7d465a0ab5 issue #110 #154
6 years ago
Dibyendu Majumdar 74cb2401d8 issue #31 tidy up
6 years ago
Dibyendu Majumdar 471280ca3a tech debt compiler warnings
6 years ago
Dibyendu Majumdar 7a055dc0c2 formatting and compiler warnings
6 years ago
Dibyendu Majumdar 7e00e0d2e3 issue #110 prep for slow arith ops
6 years ago
Dibyendu Majumdar 5dbaf0b391 issue #110 C code gen - update to emit go to error block
6 years ago
Dibyendu Majumdar ef60e52ce4 issue #110 fix to dmrC
6 years ago
Dibyendu Majumdar 47e0cddfaf issue #110 Initial implementation of JIT backend using OMRJIT
6 years ago
Dibyendu Majumdar a3757ce010 issue #110 report omrjit
6 years ago
Dibyendu Majumdar 8f105712b5 issue #110 Bring JIT C codegen up to date
6 years ago
dibyendumajumdar 5afdd3f6bb issue #114 fix compilation error on Linux
6 years ago
Dibyendu Majumdar 1583e618ab issue #114 complete rename
6 years ago
Dibyendu Majumdar 7dec6fa08f issue #114 add new LUA_TFUNCTION subtype to allow direct (faster) calls to simple C functions
6 years ago
Dibyendu Majumdar 4676f220a4 issue #114 Prepare for implementing fast C calls; the Lua typecode is extended to 16 bits to allow more type variants to be added. The intention is that for light C functions, we can encode return type / parameter types to enable calling some C functions directly without having to go through the Lua api.
6 years ago
Dibyendu Majumdar 5c17bca34e Some cleanup
6 years ago
Dibyendu Majumdar 77c044c0cf issue #126 fix problems with symbol parser
6 years ago
Dibyendu Majumdar e10ab7b04f issue #126 dmr_C now integral part of Ravi
6 years ago
Dibyendu Majumdar be1f7e82ce issue #151 enable dlmalloc
6 years ago
Dibyendu Majumdar 60eccabd2b issue #151 enable dlmalloc by default
6 years ago
Dibyendu Majumdar aa7e271083 issue #151 adopt Doug Lea's allocator
6 years ago
Dibyendu Majumdar b584ce9862 issue #151 memory allocator updates
6 years ago
Dibyendu Majumdar 4ccf6cb2ef issue #151 fix compile on Linux
6 years ago
Dibyendu Majumdar 73c31bb59d issue #151 import LuaJIT's allocator
6 years ago
Dibyendu Majumdar 7ad859f79b issue #151 import LuaJIT's allocator
6 years ago
Dibyendu Majumdar a3fdf76103 issue #98 refactoring and start on value types
6 years ago
Dibyendu Majumdar 693c2b716e issue #98 some code cleanup
6 years ago
Dibyendu Majumdar d27e18d617 issue #98 for/while/repeat statement revision to make AST more syntax tree like, and various cleanups
6 years ago
Dibyendu Majumdar 29a507b911 issue #98 for statement parsing - wip
6 years ago
Dibyendu Majumdar 2d30da5bd0 issue #98 more on while and repeat statement parsing
6 years ago
Dibyendu Majumdar 01cb2ad69d issue #98 start on while/repeat statements
6 years ago
Dibyendu Majumdar 20c7e6c4e5 issue #98 if statement parsing
6 years ago
Dibyendu Majumdar 463d0bbd71 issue #98 added if statement parsing
6 years ago
Dibyendu Majumdar 49b8fdea0f issue #98 function call, assignment and expression statement parsing
6 years ago
Dibyendu Majumdar 7a5aef4989 issue #98 parse do statement
6 years ago
Dibyendu Majumdar b3ad4d2579 issue #98 goto and label statements parsing
6 years ago
Dibyendu Majumdar e6daa68980 issue #98 fix incorrect use of stack value, and add more tests
6 years ago
Dibyendu Majumdar 19d13d5817 issue #98 start adding some tests
6 years ago
Dibyendu Majumdar cb7977d4bb issue #98 function parameter parsing fix and a different attempt to output the parse tree
6 years ago
Dibyendu Majumdar c9b7939cc1 issue #98 instead of printing out generate a string from ast and expose as api method
6 years ago
Dibyendu Majumdar 5978dcfb42 issue #98 fix scoping
6 years ago
Dibyendu Majumdar 3a042f0ade issue #98 function statement parsing
6 years ago
Dibyendu Majumdar 5c714ff948 issue #98 function parsing, and print up-values too
6 years ago
Dibyendu Majumdar 9dc2630ecf issue #98 parse function literal
6 years ago
Dibyendu Majumdar 2e0af5cecc issue #98 local statement parsing
6 years ago
Dibyendu Majumdar 48807fb351 issue #98 local statement parsing
6 years ago
Dibyendu Majumdar fff8452d21 issue #98 start on local vars
6 years ago
Dibyendu Majumdar 8ba41946dc issue #98 improve output of AST
6 years ago
Dibyendu Majumdar 45e41e044b issue #98 improve output of AST
6 years ago
Dibyendu Majumdar ebebb72416 issue #98 return statement and more on printing out the AST
6 years ago
Dibyendu Majumdar 051f75b8c0 issue #98 block scope has statement list
6 years ago
Dibyendu Majumdar 67accd8a41 issue #98 refactor ast library to be just a library and resolve the issue with lua_lock()
6 years ago
Dibyendu Majumdar 0a69234b07 issue #98 return statement
6 years ago
Dibyendu Majumdar 417c2965cc issue #98 unary and binary sub expression parsing
6 years ago
Dibyendu Majumdar 00847ef2b8 issue #98 suffixed expr
6 years ago
Dibyendu Majumdar 79a4265962 issue #98 primary expr
6 years ago
Dibyendu Majumdar 7547883b54 issue #98 parse table constructors
6 years ago
Dibyendu Majumdar 20052594a1 issue #98 more work on basics: including searching for vars in scopes
6 years ago
Dibyendu Majumdar fc95eb1223 issue #98 more work on function and scope linkage
6 years ago
Dibyendu Majumdar e42073b064 issue #98 initial steps in setting up scope and attempt to create main function
6 years ago
Dibyendu Majumdar 7ce94baedc issue #98 more work on fleshing out function, block and ast structure
6 years ago
Dibyendu Majumdar 6a2f94953a issue #98 more work on fleshing out function, block and ast structure
6 years ago
Dibyendu Majumdar b39fdf9399 issue #98 added ptrlist and started to flesh out ast structures
6 years ago
Dibyendu Majumdar f3fed79bc7 issue #98 start changing the api so that build_ast returns a userdata object containing the AST
6 years ago
Dibyendu Majumdar c465af3465 issue #98 rename functions and start to change the api to construct AST as a userdata object
6 years ago
Dibyendu Majumdar 24ac6f29f3 issue #98 merge changes in master
6 years ago
Dibyendu Majumdar f9793dc527 issue #136 added support for user defined type names to have '.' in them
6 years ago
Dibyendu Majumdar ef66365b5d issue #148 fix bad code gen for OP_RAVI_SELF_S
6 years ago
Dibyendu Majumdar 64a6a2372b issue #146 Currently Ravi's code generator assumes that #operator returns an integer value, but if user has set a metamethod for __len the operator# might return a non-integer value. This issue came to light when testing lpeg, which redefines #operator to return userdata objects. We now try to only expect integer values when # is used in fornum loops, or applied to table or array. Additionally unless the target is an array, we also emit a TOINT opcode to validate at runtime that the value in integer type
6 years ago
Dibyendu Majumdar 94ab8ced4d try to understand and document the GC implementation
6 years ago
Dibyendu Majumdar 1ca729a4c2 issue #145 move collectable bit left by one bit to make an extra bit available for encoding typeinfo
6 years ago
Dibyendu Majumdar f62b1eb557 refactoring
6 years ago
Dibyendu Majumdar b51868d20f issue #144 fix compile error
6 years ago
Dibyendu Majumdar 95b5819cf3 issue #144
6 years ago
Dibyendu Majumdar a97f974db5 issue #144 change the size of TValue.tt to byte
6 years ago
Dibyendu Majumdar 55dc69d4c4 issue #143 Remove NanoJIT backend
6 years ago
Dibyendu Majumdar 9fa20358b2 issue #142 removed gcc jit implementation (left on a branch)
6 years ago
Dibyendu Majumdar 416bdb960b Merge branch 'master' of https://github.com/dibyendumajumdar/ravi
6 years ago
Dibyendu Majumdar 808092e17f issue #141 stop calling GC from codegen
6 years ago
Dibyendu Majumdar 2161226c14 Merge branch 'master' of https://github.com/dibyendumajumdar/ravi
6 years ago
Dibyendu Majumdar e8e68707f9 issue #140 avoid c++14 features
6 years ago
Dibyendu Majumdar 2e42d1364c issue #135 debug guards
6 years ago
Dibyendu Majumdar bb5ec933cf fix compiler warnings
6 years ago
Dibyendu Majumdar 2b4f1859c1 restore Lua Hook check in computed goto mode
6 years ago
Dibyendu Majumdar f4a5a52e89 issue #135 add OP_RAVI_FORPREP_IP/I1 and OP_RAVI_FORLOOP_IP/I1
6 years ago
Dibyendu Majumdar 95d0f3ee41 issue #135 OP_MOVE
6 years ago
Dibyendu Majumdar 1ef4e01275 issue #135 fix bugs and add some basic tests
6 years ago
Dibyendu Majumdar c83f56fcc1 issue #135 regenerate clang asm output
6 years ago
Dibyendu Majumdar e02087c201 issue #135 fix bug - KBASE was not set
6 years ago
Dibyendu Majumdar 65fc6adc0d issue #135 wiring stuff together
7 years ago
Dibyendu Majumdar aa02c2e124 issue #135 setup dispatch table, some build updates and fixes
7 years ago
Dibyendu Majumdar 0eb4464184 incorporate some upcoming Lua 5.4 changes to do with a) caching savedpc and mask, and b) fast tracking comp operators for integers
7 years ago
Dibyendu Majumdar 7577df8e80 catchup on some pending updates
7 years ago
Dibyendu Majumdar 3b16c0a902 fix compiler warnings
7 years ago