Skip to content

Commit 346a850

Browse files
committed
Improve test.
1 parent b3d9d9f commit 346a850

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed
Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
contract C {
2-
function f() public pure returns (uint r) {
2+
uint x;
3+
modifier m() {
4+
uint t;
5+
assembly {
6+
function f() -> x { x := 8 }
7+
t := f()
8+
}
9+
x = t;
10+
_;
11+
}
12+
function f() m m public returns (uint r) {
313
assembly { function f() -> x { x := 1 } r := f() }
414
}
5-
function g() public pure returns (uint r) {
15+
function g() m m public returns (uint r) {
616
assembly { function f() -> x { x := 2 } r := f() }
717
}
8-
}
9-
// ====
10-
// compileViaYul: also
11-
// ----
12-
// f() -> 1
13-
// g() -> 2
18+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"contracts":{"inline_assembly_function_name_clash/input.sol:C":{"function-debug-runtime":{"abi_decode_tuple_":{"entryPoint":216,"parameterSlots":2,"returnSlots":0},"abi_encode_t_uint256_to_t_uint256_fromStack":{"entryPoint":250,"parameterSlots":2,"returnSlots":0},"abi_encode_tuple_t_uint256__to_t_uint256__fromStack":{"entryPoint":265,"parameterSlots":2,"returnSlots":1},"allocate_unbounded":{"entryPoint":196,"parameterSlots":0,"returnSlots":1},"cleanup_t_uint256":{"entryPoint":240,"parameterSlots":1,"returnSlots":1},"fun_f_7":{"entryPoint":302,"id":7,"parameterSlots":0,"returnSlots":1},"fun_g_14":{"entryPoint":343,"id":14,"parameterSlots":0,"returnSlots":1},"revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74":{"entryPoint":292,"parameterSlots":0,"returnSlots":0},"revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb":{"entryPoint":206,"parameterSlots":0,"returnSlots":0},"revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b":{"entryPoint":211,"parameterSlots":0,"returnSlots":0},"shift_right_224_unsigned":{"entryPoint":183,"parameterSlots":1,"returnSlots":1},"usr$f":{"entryPoint":320,"parameterSlots":0,"returnSlots":1},"zero_value_for_split_t_uint256":{"entryPoint":297,"parameterSlots":0,"returnSlots":1}}}},"version": "<VERSION REMOVED>"}
1+
{"contracts":{"inline_assembly_function_name_clash/input.sol:C":{"function-debug-runtime":{"abi_decode_tuple_":{"entryPoint":216,"parameterSlots":2,"returnSlots":0},"abi_encode_t_uint256_to_t_uint256_fromStack":{"entryPoint":250,"parameterSlots":2,"returnSlots":0},"abi_encode_tuple_t_uint256__to_t_uint256__fromStack":{"entryPoint":265,"parameterSlots":2,"returnSlots":1},"allocate_unbounded":{"entryPoint":196,"parameterSlots":0,"returnSlots":1},"cleanup_t_uint256":{"entryPoint":240,"parameterSlots":1,"returnSlots":1},"convert_t_uint256_to_t_uint256":{"entryPoint":391,"parameterSlots":1,"returnSlots":1},"fun_f_25":{"entryPoint":658,"id":25,"parameterSlots":0,"returnSlots":1},"fun_f_25_inner":{"entryPoint":624,"parameterSlots":1,"returnSlots":1},"fun_g_36":{"entryPoint":874,"id":36,"parameterSlots":0,"returnSlots":1},"fun_g_36_inner":{"entryPoint":840,"parameterSlots":1,"returnSlots":1},"identity":{"entryPoint":381,"parameterSlots":1,"returnSlots":1},"modifier_m_17":{"entryPoint":470,"id":14,"parameterSlots":1,"returnSlots":1},"modifier_m_19":{"entryPoint":547,"id":14,"parameterSlots":1,"returnSlots":1},"modifier_m_28":{"entryPoint":686,"id":14,"parameterSlots":1,"returnSlots":1},"modifier_m_30":{"entryPoint":763,"id":14,"parameterSlots":1,"returnSlots":1},"prepare_store_t_uint256":{"entryPoint":425,"parameterSlots":1,"returnSlots":1},"revert_error_42b3090547df1d2001c96683413b8cf91c1b902ef5e3cb8d9f6f304cf7446f74":{"entryPoint":292,"parameterSlots":0,"returnSlots":0},"revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb":{"entryPoint":206,"parameterSlots":0,"returnSlots":0},"revert_error_dbdddcbe895c83990c08b3492a0e83918d802a52331272ac6fdb6a7c4aea3b1b":{"entryPoint":211,"parameterSlots":0,"returnSlots":0},"shift_left_0":{"entryPoint":302,"parameterSlots":1,"returnSlots":1},"shift_right_224_unsigned":{"entryPoint":183,"parameterSlots":1,"returnSlots":1},"update_byte_slice_32_shift_0":{"entryPoint":315,"parameterSlots":2,"returnSlots":1},"update_storage_value_offset_0t_uint256_to_t_uint256":{"entryPoint":435,"parameterSlots":2,"returnSlots":0},"usr$f":{"entryPoint":493,"parameterSlots":0,"returnSlots":1},"zero_value_for_split_t_uint256":{"entryPoint":297,"parameterSlots":0,"returnSlots":1}}}},"version": "<VERSION REMOVED>"}

0 commit comments

Comments
 (0)