I8C is now hosted at https://gitlab.com/gbenson/i8c.
gbenson / i8c Goto Github PK
View Code? Open in Web Editor NEWinfinity note compiler
License: GNU Lesser General Public License v2.1
infinity note compiler
License: GNU Lesser General Public License v2.1
I8C is now hosted at https://gitlab.com/gbenson/i8c.
i8c has no README.rst, and it should have one.
Once it's written set long_description
in setup.py
as per this example.
SSIA
SSIA
There are no tests for the call
instruction.
SSIA
i8c does not honour $CC etc, and it should. Presently it just uses "gcc" and there's no way to change this short of editing the code.
Excepting very basic cases the stack walker does not support entering a BasicBlock
that has already been entered. This means it is impossible to compile a note that contains a loop.
xderef
could easily be implemented, it just isn't.
It could piggy-back on the code and tests for deref
(only the stack walker would be different).
SSIA
SSIA
load
instructions with a constant value argument is pretty well tested, but there are no tests for load
instructions that reference a named slot.
SSIA
GCC outputs to "file.s" if invoked as gcc -S file.c
. I8C should output to file.S if invoked as i8c -S file.i8
for consistency.
i8c note.i8 main.c -o main
doesn't do anything.
i8x stack errors are just assertions (and whatever "pop from empty list" throws, for underflow). They should be proper checks that raise a subclass of ExecutionError
. stack.op
is always set for things to throw with (and set cleverly enough to do the right thing across calls), it just needs the checks writing.
Optimizer hits are adequately tested, but various optimizer misses have no coverage.
i8c currently requires Python 2.6 or 2.7. This should be fixed... sometime :)
The source language that i8c consumes is undocumented.
i8x loads user code (testcases) written in Python into itself. If i8x is GPL then testcases must also be GPL. Maybe i8x should be LGPL (with i8c remaining GPL)
So far only the cmp-bra-{const,const}
optimizer has a test. At least all block optimizers should have tests before the initial 0.0.1 release.
i8x testcases can import constants from C-style header files, but the format required is very strict. Each line must be exactly #define NAME VALUE
, and VALUE
must be numeric. Not even comments are allowed.
deref s8
, deref s16
and deref s32
emit a DW_OP_deref_size
followed by a sequence of DWARF operations to sign-extend the dereferenced value.
This sign-extension sequence is untested in that it has never been executed by a DWARF interpreter.
The format of the notes i8c emits is undocumented.
Can't really be fixed until issue #22 is done.
The hidden* option --debug=stack
is pretty useful for figuring out stack walker errors. It's output should be cleaned up** and a user*** option added for it.
By "hidden option" I mean "it's not shown in i8c --help
".
By "cleaned up" I mean, e.g., CompareOp("bne not_done_yet") is confusing. It should probably have the filename and line number and whatever the user typed
By "user option" I mean something like --trace
. Something not in the --debug=
namespace.
SSIA. Put two tests in test_compiler_driver.py
SSIA
SSIA.
On some platforms, even assembler files with no actual code need to contain certain assembler directives to be ABI-compatible with those generated by the compiler. In particular, this applies to ARM; see the
.eabi_attribute
directives in sysdeps/arm/sysdep.h.
โ Joseph Myers, https://sourceware.org/ml/libc-alpha/2015-10/msg00736.html
I8C needs to handle this somehow.
Should cast
actually emit something so bytecode can be type checked? If so deref
needs it too (or some special deref_int
with a type (signed byte, 0 means regular int, -8 means s8, etc) That would get rid of that sign-extension sequence too
Something (the entry stack builder?) should check that arguments and externs have unique names. Currently it's not possible to shadow a name with name
, but it is possible to start your function with shadowed names.
SSIA. Needs fixing for 1.0.0 release.
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.