Skip to content

Commit

Permalink
adding switch example files
Browse files Browse the repository at this point in the history
  • Loading branch information
tutugordillo committed Nov 22, 2024
1 parent 6db06e3 commit 67b1b32
Show file tree
Hide file tree
Showing 4 changed files with 472 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/switch/switch-asm-json-importer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{".code":[{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"0"},{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"0"},{"begin":-1,"end":-1,"name":"SSTORE","source":-1},{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"0"},{"begin":-1,"end":-1,"name":"SLOAD","source":-1},{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"0"},{"begin":-1,"end":-1,"name":"DUP2","source":-1},{"begin":-1,"end":-1,"name":"EQ","source":-1},{"begin":-1,"end":-1,"name":"PUSH [tag]","source":-1,"value":"1"},{"begin":-1,"end":-1,"name":"JUMPI","source":-1},{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"1"},{"begin":-1,"end":-1,"name":"EQ","source":-1},{"begin":-1,"end":-1,"name":"PUSH [tag]","source":-1,"value":"2"},{"begin":-1,"end":-1,"name":"JUMPI","source":-1},{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"101"},{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"3"},{"begin":-1,"end":-1,"name":"SSTORE","source":-1},{"begin":-1,"end":-1,"name":"PUSH [tag]","source":-1,"value":"3"},{"begin":-1,"end":-1,"name":"JUMP","source":-1},{"begin":-1,"end":-1,"name":"tag","source":-1,"value":"3"},{"begin":-1,"end":-1,"name":"JUMPDEST","source":-1},{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"101"},{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"4"},{"begin":-1,"end":-1,"name":"SSTORE","source":-1},{"begin":-1,"end":-1,"name":"STOP","source":-1},{"begin":-1,"end":-1,"name":"tag","source":-1,"value":"2"},{"begin":-1,"end":-1,"name":"JUMPDEST","source":-1},{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"101"},{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"2"},{"begin":-1,"end":-1,"name":"SSTORE","source":-1},{"begin":-1,"end":-1,"name":"PUSH [tag]","source":-1,"value":"3"},{"begin":-1,"end":-1,"name":"JUMP","source":-1},{"begin":-1,"end":-1,"name":"tag","source":-1,"value":"1"},{"begin":-1,"end":-1,"name":"JUMPDEST","source":-1},{"begin":-1,"end":-1,"name":"POP","source":-1},{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"101"},{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"1"},{"begin":-1,"end":-1,"name":"SSTORE","source":-1},{"begin":-1,"end":-1,"name":"PUSH [tag]","source":-1,"value":"3"},{"begin":-1,"end":-1,"name":"JUMP","source":-1}],"sourceList":["examples/switch/switch.cfg"]}
252 changes: 252 additions & 0 deletions examples/switch/switch-asm-solc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,252 @@
{
".code": [
{
"begin": 61,
"end": 62,
"name": "PUSH",
"source": -1,
"value": "0"
},
{
"begin": 51,
"end": 63,
"name": "DUP1",
"source": -1
},
{
"begin": 51,
"end": 63,
"name": "SSTORE",
"source": -1
},
{
"begin": 89,
"end": 90,
"name": "PUSH",
"source": -1,
"value": "0"
},
{
"begin": 83,
"end": 91,
"name": "SLOAD",
"source": -1
},
{
"begin": 104,
"end": 135,
"name": "DUP1",
"source": -1
},
{
"begin": 109,
"end": 110,
"name": "PUSH",
"source": -1,
"value": "0"
},
{
"begin": 104,
"end": 135,
"name": "EQ",
"source": -1
},
{
"begin": 104,
"end": 135,
"name": "PUSH [tag]",
"source": -1,
"value": "1"
},
{
"begin": 104,
"end": 135,
"name": "JUMPI",
"source": -1
},
{
"begin": 153,
"end": 154,
"name": "PUSH",
"source": -1,
"value": "1"
},
{
"begin": 148,
"end": 179,
"name": "EQ",
"source": -1
},
{
"begin": 148,
"end": 179,
"name": "PUSH [tag]",
"source": -1,
"value": "3"
},
{
"begin": 148,
"end": 179,
"name": "JUMPI",
"source": -1
},
{
"begin": 215,
"end": 221,
"name": "PUSH",
"source": -1,
"value": "101"
},
{
"begin": 209,
"end": 213,
"name": "PUSH",
"source": -1,
"value": "3"
},
{
"begin": 202,
"end": 222,
"name": "SSTORE",
"source": -1
},
{
"begin": 76,
"end": 224,
"name": "tag",
"source": -1,
"value": "5"
},
{
"begin": 76,
"end": 224,
"name": "JUMPDEST",
"source": -1
},
{
"begin": 250,
"end": 256,
"name": "PUSH",
"source": -1,
"value": "101"
},
{
"begin": 244,
"end": 248,
"name": "PUSH",
"source": -1,
"value": "4"
},
{
"begin": 237,
"end": 257,
"name": "SSTORE",
"source": -1
},
{
"begin": 76,
"end": 224,
"name": "STOP",
"source": -1
},
{
"begin": 155,
"end": 179,
"name": "tag",
"source": -1,
"value": "3"
},
{
"begin": 155,
"end": 179,
"name": "JUMPDEST",
"source": -1
},
{
"begin": 170,
"end": 176,
"name": "PUSH",
"source": -1,
"value": "101"
},
{
"begin": 164,
"end": 168,
"name": "PUSH",
"source": -1,
"value": "2"
},
{
"begin": 157,
"end": 177,
"name": "SSTORE",
"source": -1
},
{
"begin": 155,
"end": 179,
"name": "PUSH [tag]",
"source": -1,
"value": "5"
},
{
"begin": 155,
"end": 179,
"name": "JUMP",
"source": -1
},
{
"begin": 111,
"end": 135,
"name": "tag",
"source": -1,
"value": "1"
},
{
"begin": 111,
"end": 135,
"name": "JUMPDEST",
"source": -1
},
{
"begin": 113,
"end": 133,
"name": "POP",
"source": -1
},
{
"begin": 126,
"end": 132,
"name": "PUSH",
"source": -1,
"value": "101"
},
{
"begin": 120,
"end": 124,
"name": "PUSH",
"source": -1,
"value": "1"
},
{
"begin": 113,
"end": 133,
"name": "SSTORE",
"source": -1
},
{
"begin": 111,
"end": 135,
"name": "PUSH [tag]",
"source": -1,
"value": "5"
},
{
"begin": 111,
"end": 135,
"name": "JUMP",
"source": -1
}
],
"sourceList": []
}
Loading

0 comments on commit 67b1b32

Please sign in to comment.