Add a "colocated" flag to symbol references. (#298)
This adds a "colocated" flag to function and symbolic global variables which indicates that they are defined along with the current function, so they can use PC-relative addressing. This also changes the function decl syntax; the name now always precedes the signature, and the "function" keyword is no longer included.
This commit is contained in:
@@ -42,14 +42,14 @@ function %type_mismatch_controlling_variable() {
|
||||
}
|
||||
|
||||
function %fn_call_too_few_args() {
|
||||
fn2 = function %great_fn(i32, f32)
|
||||
fn2 = %great_fn(i32, f32)
|
||||
ebb0:
|
||||
call fn2() ; error: mismatched argument count, got 0, expected 2
|
||||
return
|
||||
}
|
||||
|
||||
function %fn_call_too_many_args() {
|
||||
fn5 = function %best_fn()
|
||||
fn5 = %best_fn()
|
||||
ebb0:
|
||||
v0 = iconst.i64 56
|
||||
v1 = f32const 0.0
|
||||
|
||||
Reference in New Issue
Block a user