Skip to content

Commit

Permalink
Merge pull request #14 from costa-group/tags_dict
Browse files Browse the repository at this point in the history
Tags dict
  • Loading branch information
alexcere authored Oct 28, 2024
2 parents 497b271 + a5e1f75 commit 6997bed
Show file tree
Hide file tree
Showing 19 changed files with 2,812 additions and 133 deletions.
30 changes: 30 additions & 0 deletions examples/ambiguous_names/ambiguous_names-asm-solc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
".code": [
{
"begin": 42,
"end": 44,
"name": "PUSH",
"source": -1,
"value": "2A"
},
{
"begin": 31,
"end": 45,
"name": "DUP1",
"source": -1
},
{
"begin": 31,
"end": 45,
"name": "SSTORE",
"source": -1
},
{
"begin": 27,
"end": 49,
"name": "STOP",
"source": -1
}
],
"sourceList": []
}
26 changes: 26 additions & 0 deletions examples/ambiguous_names/ambiguous_names.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"object": {
"blocks": [
{
"exit": {
"type": "MainExit"
},
"id": "Block0",
"instructions": [
{
"in": [
"0x2a",
"0x2a"
],
"op": "sstore",
"out": []
}
],
"type": "BuiltinCall"
}
],
"functions": {}
},
"subObjects": {},
"type": "Object"
}
65 changes: 65 additions & 0 deletions examples/ambiguous_names/ambiguous_names.yul
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
a()
c()
function a() {
let x := 42
sstore(x,x)
b()
function b() {}
}
function c() {
let x := 21
mstore(x,x)
b()
function b() {}
}
}
// ----
// digraph CFG {
// nodesep=0.7;
// node[shape=box];
//
// Entry [label="Entry"];
// Entry -> Block0;
// Block0 [label="\
// a: [ RET[a] ] => [ ]\l\
// c: [ RET[c] ] => [ ]\l\
// "];
// Block0Exit [label="MainExit"];
// Block0 -> Block0Exit;
//
// FunctionEntry_a_1 [label="function a()"];
// FunctionEntry_a_1 -> Block1;
// Block1 [label="\
// Assignment(x): [ 0x2a ] => [ x ]\l\
// sstore: [ x x ] => [ ]\l\
// b: [ RET[b] ] => [ ]\l\
// "];
// Block1Exit [label="FunctionReturn[a]"];
// Block1 -> Block1Exit;
//
// FunctionEntry_b_2 [label="function b()"];
// FunctionEntry_b_2 -> Block2;
// Block2 [label="\
// "];
// Block2Exit [label="FunctionReturn[b]"];
// Block2 -> Block2Exit;
//
// FunctionEntry_c_3 [label="function c()"];
// FunctionEntry_c_3 -> Block3;
// Block3 [label="\
// Assignment(x): [ 0x15 ] => [ x ]\l\
// mstore: [ x x ] => [ ]\l\
// b: [ RET[b] ] => [ ]\l\
// "];
// Block3Exit [label="FunctionReturn[c]"];
// Block3 -> Block3Exit;
//
// FunctionEntry_b_4 [label="function b()"];
// FunctionEntry_b_4 -> Block4;
// Block4 [label="\
// "];
// Block4Exit [label="FunctionReturn[b]"];
// Block4 -> Block4Exit;
//
// }
38 changes: 38 additions & 0 deletions examples/ambiguous_names/ambiguous_names_asm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"contracts": {
"examples/ambiguous_names/ambiguous_names.cfg:object": {
".code": [
{
"name": "PUSH",
"begin": -1,
"end": -1,
"source": -1,
"value": "2a"
},
{
"name": "PUSH",
"begin": -1,
"end": -1,
"source": -1,
"value": "2a"
},
{
"name": "SSTORE",
"begin": -1,
"end": -1,
"source": -1
},
{
"name": "STOP",
"begin": -1,
"end": -1,
"source": -1
}
],
".data": {},
"sourceList": [
"examples/ambiguous_names/ambiguous_names.cfg"
]
}
}
}
1 change: 1 addition & 0 deletions examples/ambiguous_names/notes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Same code generated
Loading

0 comments on commit 6997bed

Please sign in to comment.