Stabilize "seal1" seal_call (#10366)

This commit is contained in:
Alexander Theißen
2021-11-24 18:20:55 +01:00
committed by GitHub
parent 48b03c3732
commit 6a8c22aafd
2 changed files with 5 additions and 8 deletions
+3 -6
View File
@@ -541,11 +541,10 @@ mod tests {
}
#[test]
#[cfg(feature = "unstable-interface")]
fn contract_call_forward_input() {
const CODE: &str = r#"
(module
(import "__unstable__" "seal_call" (func $seal_call (param i32 i32 i64 i32 i32 i32 i32 i32) (result i32)))
(import "seal1" "seal_call" (func $seal_call (param i32 i32 i64 i32 i32 i32 i32 i32) (result i32)))
(import "seal0" "seal_input" (func $seal_input (param i32 i32)))
(import "env" "memory" (memory 1 1))
(func (export "call")
@@ -596,11 +595,10 @@ mod tests {
}
#[test]
#[cfg(feature = "unstable-interface")]
fn contract_call_clone_input() {
const CODE: &str = r#"
(module
(import "__unstable__" "seal_call" (func $seal_call (param i32 i32 i64 i32 i32 i32 i32 i32) (result i32)))
(import "seal1" "seal_call" (func $seal_call (param i32 i32 i64 i32 i32 i32 i32 i32) (result i32)))
(import "seal0" "seal_input" (func $seal_input (param i32 i32)))
(import "seal0" "seal_return" (func $seal_return (param i32 i32 i32)))
(import "env" "memory" (memory 1 1))
@@ -652,11 +650,10 @@ mod tests {
}
#[test]
#[cfg(feature = "unstable-interface")]
fn contract_call_tail_call() {
const CODE: &str = r#"
(module
(import "__unstable__" "seal_call" (func $seal_call (param i32 i32 i64 i32 i32 i32 i32 i32) (result i32)))
(import "seal1" "seal_call" (func $seal_call (param i32 i32 i64 i32 i32 i32 i32 i32) (result i32)))
(import "env" "memory" (memory 1 1))
(func (export "call")
(drop
@@ -928,7 +928,7 @@ define_env!(Env, <E: Ext>,
// `ReturnCode::BelowSubsistenceThreshold`
// `ReturnCode::TransferFailed`
// `ReturnCode::NotCallable`
[__unstable__] seal_call(
[seal1] seal_call(
ctx,
flags: u32,
callee_ptr: u32,
@@ -940,7 +940,7 @@ define_env!(Env, <E: Ext>,
output_len_ptr: u32
) -> ReturnCode => {
ctx.call(
CallFlags::from_bits(flags).ok_or_else(|| "used rerved bit in CallFlags")?,
CallFlags::from_bits(flags).ok_or_else(|| "used reserved bit in CallFlags")?,
callee_ptr,
gas,
value_ptr,