Merge pull request #14455 from ethereum/fix-yul-id

Yul AST IDs should start from 0 instead of 1.
This commit is contained in:
Daniel 2023-08-01 17:37:21 +02:00 committed by GitHub
commit 2c70255617
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 7 additions and 6 deletions

View File

@ -7,6 +7,7 @@ Compiler Features:
Bugfixes:
* AST: Fix wrong initial ID for Yul nodes in the AST.
* NatSpec: Fix internal error when requesting userdoc or devdoc for a contract that emits an event defined in a foreign contract or interface.
* SMTChecker: Fix encoding error that causes loops to unroll after completion.

View File

@ -1553,7 +1553,7 @@ Json::Value StandardCompiler::compileYul(InputsAndSettings _inputsAndSettings)
if (isArtifactRequested(_inputsAndSettings.outputSelection, sourceName, contractName, "ast", wildcardMatchesExperimental))
{
Json::Value sourceResult = Json::objectValue;
sourceResult["id"] = 1;
sourceResult["id"] = 0;
sourceResult["ast"] = stack.astJson();
output["sources"][sourceName] = sourceResult;
}

View File

@ -169,7 +169,7 @@
"nodeType": "YulObject",
"subObjects": []
},
"id": 1
"id": 0
}
}
}

View File

@ -179,7 +179,7 @@ data_4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45 616263
}
]
},
"id": 1
"id": 0
}
}
}

View File

@ -258,7 +258,7 @@ sub_0: assembly {
}
]
},
"id": 1
"id": 0
}
}
}

View File

@ -166,7 +166,7 @@
"nodeType": "YulObject",
"subObjects": []
},
"id": 1
"id": 0
}
}
}

View File

@ -161,7 +161,7 @@
"nodeType": "YulObject",
"subObjects": []
},
"id": 1
"id": 0
}
}
}