rerumu / lau Goto Github PK
View Code? Open in Web Editor NEWLua 5.4 assembler and disassembler
License: GNU General Public License v3.0
Lua 5.4 assembler and disassembler
License: GNU General Public License v3.0
Lua 5.4 implements the 4 for loop instructions by storing the offset of the jump in Bx
. This makes sense, as the compiler will never need to generate a FORPREP
that jumps backwards or a FORLOOP
that jumps forwards. However, it's less than ideal for code produced by any source other than the vanilla compiler.
The proposed solution is to generate a surrogate JMP
after 1-way instructions and zero-out their jump target. It's important to note that FORPREP
is an odd one in the bunch, and will advance the program counter by Bx + 1
, not just Bx
.
Points of interest:
LFALSESKIP
is a special opcode which loads a false
into a register and skips the next instruction unconditionally. Generally, the next instruction is a LOADTRUE
, but this is not guaranteed in an altered environment. This seems to be strictly an assembling issue, but in the case where LFALSESKIP
is not followed by exactly 1 instruction, or its target is not the instruction directly after that one, a miscompilation will happen.
Proposed solutions, on invalid target...
LFALSESKIP
with LOADFALSE
and a JMP
to the appropriate target.LFALSESKIP
followed by a dummy instruction and then a JMP
to the appropriate target.Points of interest:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.