[Sol->Yul] Implementing conversion of struct to struct pointer.

Co-authored-by: Daniel Kirchner <daniel@ekpyron.org>
This commit is contained in:
Djordje Mijovic
2020-10-08 16:37:57 +02:00
co-authored by Daniel Kirchner
parent fa69378f4f
commit ad8d840ee7
9 changed files with 43 additions and 21 deletions
@@ -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 ->
@@ -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