Add FuncRef and SigRef entity references.

These refer to external functions and function signatures declared in
the preamble. Since we're already using the type names 'Signature' and
'Function', these entity references don't folow the usual EntityData /
Entity naming convention.
This commit is contained in:
Jakob Stoklund Olesen
2016-10-12 14:15:29 -07:00
parent b42d85ae24
commit 7cf25a073b
7 changed files with 94 additions and 24 deletions

View File

@@ -394,11 +394,11 @@ preamble`:
This simple example illustrates direct function calls and signatures::
function gcd(i32 uext, i32 uext) -> i32 uext "C" {
f1 = function divmod(i32 uext, i32 uext) -> i32 uext, i32 uext
fn1 = function divmod(i32 uext, i32 uext) -> i32 uext, i32 uext
ebb1(v1: i32, v2: i32):
brz v2, ebb2
v3, v4 = call f1(v1, v2)
v3, v4 = call fn1(v1, v2)
br ebb1(v2, v4)
ebb2: