fix errors

This commit is contained in:
Redo
2022-11-04 13:14:05 -06:00
parent cdbf3ed089
commit 0ac3f3e495
4 changed files with 20 additions and 28 deletions

View File

@@ -2,33 +2,15 @@
local ffi = FFI or require("ffi")
Simulation = Simulation or {}
ffi.cdef[[
struct Net {
int in_queue;
int num_out_ports_on;
int state;
int update_tick;
struct Gate* gates_update[0];
};
struct OutPort {
struct Net* net;
int state;
};
struct Gate {
int in_queue;
struct OutPort out_ports[0];
};
]]
function Simulation.compile_code(sim, text)
-- todo: compile some kind of DSL into machine code
return code, size
end
local net_program_code = Simulation.compile_code( [[
]] )
--local net_program_code = Simulation.compile_code( [[
--
--]] )
function Simulation.compile(sim)
sim.compilation = {