Use the term "Function parameter" instead of "argument".

Rename the ArgumentType type to AbiParam since it describes the ABI
characteristics of a parameter or return value, not just the value type.

In Signature, rename members argument_types and return_types to "params"
and "returns". Again, they are not just types.

Fix a couple lingering references to "EBB arguments".
This commit is contained in:
Jakob Stoklund Olesen
2017-10-19 17:39:23 -07:00
parent 921bcc6c25
commit b3fb41087e
23 changed files with 225 additions and 255 deletions

View File

@@ -9,7 +9,7 @@
//! interpreted on the fly.
use translation_utils::{type_to_type, TableIndex, FunctionIndex, GlobalIndex, SignatureIndex,
MemoryIndex, Global, GlobalInit, Table, TableElementType, Memory};
use cretonne::ir::{Signature, ArgumentType, CallConv};
use cretonne::ir::{Signature, AbiParam, CallConv};
use cretonne;
use wasmparser::{Parser, ParserState, FuncType, ImportSectionEntryType, ExternalKind, WasmDecoder,
MemoryType, Operator};
@@ -35,17 +35,17 @@ pub fn parse_function_signatures(
ref returns,
}) => {
let mut sig = Signature::new(CallConv::Native);
sig.argument_types.extend(params.iter().map(|ty| {
sig.params.extend(params.iter().map(|ty| {
let cret_arg: cretonne::ir::Type = type_to_type(ty).expect(
"only numeric types are supported in function signatures",
);
ArgumentType::new(cret_arg)
AbiParam::new(cret_arg)
}));
sig.return_types.extend(returns.iter().map(|ty| {
sig.returns.extend(returns.iter().map(|ty| {
let cret_arg: cretonne::ir::Type = type_to_type(ty).expect(
"only numeric types are supported in function signatures",
);
ArgumentType::new(cret_arg)
AbiParam::new(cret_arg)
}));
environ.declare_signature(&sig);
}