Comments (3)
Supporting bitwise operators like <<
>>
&
|
would be great!
There has been some past discussion on the LuaJIT repo over at LuaJIT/LuaJIT#63.
Mike wrote that "the main implementation cost [is] modifying all of the vm_*.dasc
files." This would not be a challenge anymore after we have ported the VM to C (#199) because then it would only be one C source file to update.
So perhaps we can revisit this issue once the VM port is done and then look at the best way to support these new operators (which may or may not have the same semantics as Lua 5.3 as per LuaJIT/LuaJIT#63.)
from raptorjit.
Is it planned to have a partial control on the lexer/parser at runtime ?
For now RaptorJIT is like Lua/LuaJIT, working on a fixed lexer/parser (managed in the C source) modification can be only made at the compilation time.
We have something like macro? or a way to add new operator ?
It is just a question to jump outside of the basic need to run lua 5.3 code.
For sample, I dreams to add a custom !=
MACRO for the ~=
operator ! ;-)
We can also transform foo << bar
to bit.lshift(foo, bar)
with MACRO ? it should be a way to produce change to support new feature with thirdparty (lua module) code.
I'd like to know your opinion about MACRO processing and non static grammar parser...
from raptorjit.
@tst2005 You are welcome to experiment with preprocessing and/or metaprogramming features on a branch and make that available for other people to merge :)
The nearest example that I can think of is DynASM. This is a preprocessor written in Lua coupled with a runtime library. Mike Pall did the original targeting C but @capr made a Lua version in LuaPower that lets you write inline assembler. The main limitation in LuaJIT/RaptorJIT seems to be not having a directive to preserve line numbers in the source file through preprocessing. It's a major pain when Lua errors use line numbers that don't match the source file.
This could justify a simple change to the RaptorJIT lexer to "hint" what the line number is in terms of the source file. On the other hand @CapsAdmin is working on a dynamic assembler that's like DynASM but without a preprocessor and I suspect this would make a better approach with no magic syntax. (The preprocessor is mostly there to make code generation fast but that's because DynASM was designed as a JIT backend rather than a macro-assembler.)
from raptorjit.
Related Issues (20)
- Idea: Remove Lua C-API HOT 41
- Philosophy: Who is RaptorJIT for? HOT 1
- A world on FFI HOT 6
- Benchmark: FFI
- Idea: Separate snapshot for each function call
- raptorjit release version confusion HOT 2
- Idea: Write Lua parser and bytecode compiler in Lua HOT 19
- Question: How to send relevant fixes to LuaJIT?
- Document VM bootstrap, code generation, build process HOT 2
- Idea: CNEWI sinking across trace boundaries HOT 4
- Demo: Over 50x slowdown on pointer arithmetic due to single branch
- Windows support HOT 2
- Openresty HOT 8
- Optimization: lambda lifting HOT 7
- Initial port of RaptorJIT bytecode interpreter to C
- Filling the gap with Lua 5.3 HOT 2
- Apply to GitHub sponsorship HOT 3
- LuaJIT/RaptorJIT at FOSDEM 2020?
- Linking failed on ArchLinux HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from raptorjit.