mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Format short blocks and loops on a single line.
This commit is contained in:
@@ -9,6 +9,4 @@
|
||||
// ====
|
||||
// step: structuralSimplifier
|
||||
// ----
|
||||
// {
|
||||
// let x := 0
|
||||
// }
|
||||
// { let x := 0 }
|
||||
|
||||
+1
-3
@@ -2,6 +2,4 @@
|
||||
// ====
|
||||
// step: structuralSimplifier
|
||||
// ----
|
||||
// {
|
||||
// pop(mload(0))
|
||||
// }
|
||||
// { pop(mload(0)) }
|
||||
|
||||
@@ -6,6 +6,4 @@
|
||||
// ====
|
||||
// step: structuralSimplifier
|
||||
// ----
|
||||
// {
|
||||
// let a := 42
|
||||
// }
|
||||
// { let a := 42 }
|
||||
|
||||
@@ -2,5 +2,4 @@
|
||||
// ====
|
||||
// step: structuralSimplifier
|
||||
// ----
|
||||
// {
|
||||
// }
|
||||
// { }
|
||||
|
||||
+1
-3
@@ -6,6 +6,4 @@
|
||||
// ====
|
||||
// step: structuralSimplifier
|
||||
// ----
|
||||
// {
|
||||
// let x, y
|
||||
// }
|
||||
// { let x, y }
|
||||
|
||||
@@ -2,6 +2,4 @@
|
||||
// ====
|
||||
// step: structuralSimplifier
|
||||
// ----
|
||||
// {
|
||||
// mstore(0, 0)
|
||||
// }
|
||||
// { mstore(0, 0) }
|
||||
|
||||
@@ -5,6 +5,4 @@
|
||||
// ====
|
||||
// step: structuralSimplifier
|
||||
// ----
|
||||
// {
|
||||
// let x
|
||||
// }
|
||||
// { let x }
|
||||
|
||||
@@ -2,6 +2,4 @@
|
||||
// ====
|
||||
// step: structuralSimplifier
|
||||
// ----
|
||||
// {
|
||||
// mstore(0, 0)
|
||||
// }
|
||||
// { mstore(0, 0) }
|
||||
|
||||
@@ -9,7 +9,5 @@
|
||||
// ----
|
||||
// {
|
||||
// let y := 200
|
||||
// {
|
||||
// y := 9
|
||||
// }
|
||||
// { y := 9 }
|
||||
// }
|
||||
|
||||
@@ -10,7 +10,5 @@
|
||||
// ----
|
||||
// {
|
||||
// let y := 200
|
||||
// {
|
||||
// y := 10
|
||||
// }
|
||||
// { y := 10 }
|
||||
// }
|
||||
|
||||
@@ -7,6 +7,4 @@
|
||||
// ====
|
||||
// step: structuralSimplifier
|
||||
// ----
|
||||
// {
|
||||
// let y := 200
|
||||
// }
|
||||
// { let y := 200 }
|
||||
|
||||
@@ -8,6 +8,4 @@
|
||||
// ====
|
||||
// step: structuralSimplifier
|
||||
// ----
|
||||
// {
|
||||
// let y := 200
|
||||
// }
|
||||
// { let y := 200 }
|
||||
|
||||
@@ -11,12 +11,7 @@
|
||||
// {
|
||||
// let y := 200
|
||||
// switch calldataload(0)
|
||||
// case 0 {
|
||||
// }
|
||||
// case 1 {
|
||||
// y := 9
|
||||
// }
|
||||
// default {
|
||||
// y := 100
|
||||
// }
|
||||
// case 0 { }
|
||||
// case 1 { y := 9 }
|
||||
// default { y := 100 }
|
||||
// }
|
||||
|
||||
@@ -6,7 +6,5 @@
|
||||
// ----
|
||||
// {
|
||||
// pop(mload(0))
|
||||
// {
|
||||
// mstore(1, 2)
|
||||
// }
|
||||
// { mstore(1, 2) }
|
||||
// }
|
||||
|
||||
@@ -11,10 +11,6 @@
|
||||
// {
|
||||
// let y := 200
|
||||
// switch calldataload(0)
|
||||
// case 1 {
|
||||
// y := 9
|
||||
// }
|
||||
// case 2 {
|
||||
// y := 10
|
||||
// }
|
||||
// case 1 { y := 9 }
|
||||
// case 2 { y := 10 }
|
||||
// }
|
||||
|
||||
@@ -10,8 +10,5 @@
|
||||
// ----
|
||||
// {
|
||||
// let y := 200
|
||||
// if eq(1, calldataload(0))
|
||||
// {
|
||||
// y := 9
|
||||
// }
|
||||
// if eq(1, calldataload(0)) { y := 9 }
|
||||
// }
|
||||
|
||||
+2
-6
@@ -11,10 +11,6 @@
|
||||
// {
|
||||
// let y := 200
|
||||
// switch calldataload(0)
|
||||
// case 1 {
|
||||
// y := 9
|
||||
// }
|
||||
// case 2 {
|
||||
// y := 10
|
||||
// }
|
||||
// case 1 { y := 9 }
|
||||
// case 2 { y := 10 }
|
||||
// }
|
||||
|
||||
@@ -5,8 +5,5 @@
|
||||
// step: structuralSimplifier
|
||||
// ----
|
||||
// {
|
||||
// if eq(2, calldataload(0))
|
||||
// {
|
||||
// mstore(0, 0)
|
||||
// }
|
||||
// if eq(2, calldataload(0)) { mstore(0, 0) }
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user