Yul codegen for immutables.

This commit is contained in:
chriseth
2020-05-04 15:00:50 +02:00
parent debcc8c056
commit 51ccb1519f
11 changed files with 166 additions and 31 deletions
@@ -4,5 +4,7 @@ contract A {
return a;
}
}
// ====
// compileViaYul: also
// ----
// f() -> 2
@@ -1,5 +1,7 @@
contract C {
uint immutable public x = 1;
}
// ====
// compileViaYul: also
// ----
// x() -> 1
@@ -26,5 +26,7 @@ contract D is B, C {
return (a, b, c, d);
}
}
// ====
// compileViaYul: also
// ----
// f() -> 4, 3, 2, 1
@@ -10,6 +10,8 @@ contract C {
return z();
}
}
// ====
// compileViaYul: also
// ----
// f() -> 7
// callZ() -> 7
@@ -9,5 +9,7 @@ contract C {
return (x+x,y);
}
}
// ====
// compileViaYul: also
// ----
// f() -> 84, 23
@@ -13,6 +13,8 @@ contract C {
return (x+x,y);
}
}
// ====
// compileViaYul: also
// ----
// constructor(): 3 ->
// f() -> 84, 23