fix errors
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user