mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[Sol->Yul] Implementing conversion of struct to struct pointer.
Co-authored-by: Daniel Kirchner <daniel@ekpyron.org>
This commit is contained in:
co-authored by
Daniel Kirchner
parent
fa69378f4f
commit
ad8d840ee7
@@ -16,5 +16,7 @@ contract C {
|
||||
}
|
||||
}
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> true # This code interprets x as an array length and thus will go out of gas. neither of the two should throw due to out-of-bounds access #
|
||||
|
||||
@@ -31,6 +31,8 @@ contract C {
|
||||
}
|
||||
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// l() -> 0
|
||||
// f(uint256): 42 ->
|
||||
|
||||
+2
@@ -18,6 +18,8 @@ contract C {
|
||||
}
|
||||
}
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> true
|
||||
// a() -> 7
|
||||
|
||||
@@ -21,5 +21,7 @@ contract C {
|
||||
return (s.f(), h(s));
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// g() -> 7, 7
|
||||
|
||||
@@ -20,5 +20,7 @@ contract C {
|
||||
assembly { a := sload(s.slot) b := sload(slot1) c := sload(slot2) d := sload(slot3) }
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> 0, 0, 0, 0
|
||||
|
||||
@@ -16,5 +16,7 @@ contract test {
|
||||
}
|
||||
}
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// deleteMember() -> 0
|
||||
|
||||
@@ -18,6 +18,8 @@ contract test {
|
||||
inner.recursive[0].z = inner.recursive[1].z + 1;
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// check() -> false
|
||||
// set() ->
|
||||
|
||||
@@ -22,5 +22,7 @@ contract C {
|
||||
}
|
||||
}
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> true
|
||||
|
||||
Reference in New Issue
Block a user