Merge branch 'fixedConversionRules' into convertMerge

This commit is contained in:
chriseth
2021-08-13 16:06:46 +02:00
158 changed files with 2614 additions and 1797 deletions
@@ -0,0 +1,22 @@
contract C {
function f() public view returns (uint ret) {
assembly {
let basefee := sload(0)
ret := basefee
}
}
function g() public pure returns (uint ret) {
assembly {
function basefee() -> r {
r := 1000
}
ret := basefee()
}
}
}
// ====
// compileViaYul: also
// EVMVersion: <=berlin
// ----
// f() -> 0
// g() -> 1000
@@ -0,0 +1,12 @@
contract C {
function f() public returns (uint x) {
assembly {
function g() -> f { f := 2 }
x := g()
}
}
}
// ====
// compileViaYul: also
// ----
// f() -> 2
@@ -0,0 +1,18 @@
contract C {
function f() public view returns (uint) {
return block.basefee;
}
function g() public view returns (uint ret) {
assembly {
ret := basefee()
}
}
}
// ====
// EVMVersion: >=london
// compileViaYul: also
// ----
// f() -> 7
// g() -> 7
// f() -> 7
// g() -> 7