Implement various stuff #1
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Moved from: bext-lang/b#240
I want to first apologize for the second time for the size of this PR, I know this is bad and I know I was told to keep it small, I really tried to split this into multiple PRs but couldn't figure out the best way to do that since most of stuff depend on each others and each part alone isn't useful in any way (as in doesn't make any more examples run on its own), so I'm really really really sorry for that, and I really hope I'm not annoying you with that in any way.
List of changes:
ilasm_mono
executables directly on Windows, skippingmono
, this will make the executable run via .NET Framework 4.x which is equivalent to Monoilasm-core
) target, including emittingruntimeconfig.json
files, bothilasm-core
andilasm-mono
share the same backend code,ilasm-core
emits a dll rather than an exe due toilasm
emitting wrong .NET version (hardcoded?) in the PE metadata resulting in it loading the wrong runtime when ran directlyusleep
(because Windows), andchar
Op::Index
,Op::Store
,Op::Return
, andOp::ExternalAssign
Binop::Mult
,Binop::NotEqual
Arg::Deref
,Arg::External
,Arg::RefExternal
malloc
in the static constructor ofProgram
for all cases, maybe in the future consider using data sections in cases where all values are immediate valuesOp::UnaryNot
andOp::Negate
(by @failaip12)These changes resulted in making the following
examples
compiling and running:mandelbrot
name
duffs_device
rule110
game_of_life
langtons_ants
fib
raylib
brainfck
snake
(only on Linux/Unix)