This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(module | |
(type (;0;) (func (param i32 i32 i32 i32 i32 i32 i32))) | |
(type (;1;) (func (result i32))) | |
(type (;2;) (func (param i32 i32 i32))) | |
(type (;3;) (func (param i32 i32))) | |
(type (;4;) (func)) | |
(type (;5;) (func (param i32))) | |
(type (;6;) (func (param i32 i32) (result i32))) | |
(type (;7;) (func (param i32) (result i64))) | |
(import "ethereum" "log" (func $ethereum_log (type 0))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
block = { soi? ~ "{" ~ (statement)* ~ "}" ~ eoi? } | |
statement = { | |
(block | |
| function_definition | |
| variable_declaration | |
| assignment | |
| if_statement | |
| for_loop | |
| expression |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
if [[ $1 == "--help" ]]; then | |
echo "Usage: compile-test <source>" | |
echo "Utility for small evm backend test cases. Takes a C source file, compiles it to llvm IR, and runs the backend." | |
echo "All data, including the source file, llvm IR, output, and logs are moved to a directory of the same name for ease of organization." | |
echo "IMPORTANT: a symlink to the correct llc must be present in the current directory. Please make one, or this will fail silently." | |
exit 0 | |
fi |