Merge pull request #8718 from ethereum/irConstants

IR generation for constants.
This commit is contained in:
Daniel Kirchner
2020-05-06 16:05:17 +02:00
committed by GitHub
9 changed files with 52 additions and 7 deletions
@@ -1,6 +1,7 @@
contract Lotto {
uint256 public constant ticketPrice = 555;
}
// ====
// compileViaYul: also
// ----
// ticketPrice() -> 555
@@ -5,5 +5,7 @@ contract C {
return x;
}
}
// ====
// compileViaYul: also
// ----
// f() -> 0x4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45
@@ -16,6 +16,8 @@ contract C {
}
}
// ====
// compileViaYul: also
// ----
// f() -> 0x20, 3, "\x03\x01\x02"
// g() -> 0x20, 3, "\x03\x01\x02"
@@ -6,5 +6,7 @@ contract Foo {
uint256 constant x = 56;
}
// ====
// compileViaYul: also
// ----
// getX() -> 56
@@ -9,5 +9,7 @@ contract B is A {
}
}
// ====
// compileViaYul: also
// ----
// f() -> 7
@@ -6,5 +6,7 @@ contract C {
}
}
// ====
// compileViaYul: also
// ----
// f() -> 0x57a