Skip to content

Commit

Permalink
StandardCompiler: Don't include empty generatedSources key for Yul co…
Browse files Browse the repository at this point in the history
…mpilation and assembly import
  • Loading branch information
cameel committed Dec 10, 2024
1 parent e8cfe0b commit 11d8fdd
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 15 deletions.
6 changes: 0 additions & 6 deletions libsolidity/interface/StandardCompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1235,8 +1235,6 @@ Json StandardCompiler::importEVMAssembly(StandardCompiler::InputsAndSettings _in
creationJSON["functionDebugData"] = formatFunctionDebugData(stack.object(sourceName).functionDebugData);
if (evmCreationArtifactRequested("linkReferences"))
creationJSON["linkReferences"] = formatLinkReferences(stack.object(sourceName).linkReferences);
if (evmCreationArtifactRequested("generatedSources"))
creationJSON["generatedSources"] = {};
evmData["bytecode"] = creationJSON;
}

Expand Down Expand Up @@ -1265,8 +1263,6 @@ Json StandardCompiler::importEVMAssembly(StandardCompiler::InputsAndSettings _in
deployedJSON["linkReferences"] = formatLinkReferences(stack.runtimeObject(sourceName).linkReferences);
if (evmDeployedArtifactRequested("immutableReferences"))
deployedJSON["immutableReferences"] = formatImmutableReferences(stack.runtimeObject(sourceName).immutableReferences);
if (evmDeployedArtifactRequested("generatedSources"))
deployedJSON["generatedSources"] = {};
evmData["deployedBytecode"] = deployedJSON;
}

Expand Down Expand Up @@ -1691,8 +1687,6 @@ Json StandardCompiler::compileYul(InputsAndSettings _inputsAndSettings)
bytecodeJSON["linkReferences"] = formatLinkReferences(selectedObject.bytecode->linkReferences);
if (isDeployed && evmArtifactRequested(kind, "immutableReferences"))
bytecodeJSON["immutableReferences"] = formatImmutableReferences(selectedObject.bytecode->immutableReferences);
if (evmArtifactRequested(kind, "generatedSources"))
bytecodeJSON["generatedSources"] = Json::array();
output["contracts"][sourceName][contractName]["evm"][kind] = bytecodeJSON;
}
}
Expand Down
1 change: 0 additions & 1 deletion test/cmdlineTests/standard_yul/output.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
",
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "<BYTECODE REMOVED>",
"opcodes":"<OPCODES REMOVED>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@
"evm": {
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "<BYTECODE REMOVED>",
"opcodes":"<OPCODES REMOVED>",
"sourceMap":"<SOURCEMAP REMOVED>"
},
"deployedBytecode": {
"functionDebugData": {},
"generatedSources": [],
"immutableReferences": {
"test": [
{
Expand Down
1 change: 0 additions & 1 deletion test/cmdlineTests/standard_yul_object/output.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ data_4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45 616263
",
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "<BYTECODE REMOVED>",
"opcodes":"<OPCODES REMOVED>",
Expand Down
2 changes: 0 additions & 2 deletions test/cmdlineTests/standard_yul_object_name/output.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,13 @@ sub_0: assembly {
",
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "<BYTECODE REMOVED>",
"opcodes":"<OPCODES REMOVED>",
"sourceMap":"<SOURCEMAP REMOVED>"
},
"deployedBytecode": {
"functionDebugData": {},
"generatedSources": [],
"immutableReferences": {},
"linkReferences": {},
"object": "<BYTECODE REMOVED>",
Expand Down
1 change: 0 additions & 1 deletion test/cmdlineTests/standard_yul_optimiserSteps/output.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
",
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "<BYTECODE REMOVED>",
"opcodes":"<OPCODES REMOVED>",
Expand Down
1 change: 0 additions & 1 deletion test/cmdlineTests/standard_yul_optimized/output.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
",
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "<BYTECODE REMOVED>",
"opcodes":"<OPCODES REMOVED>",
Expand Down
1 change: 0 additions & 1 deletion test/cmdlineTests/standard_yul_output_warning/output.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
",
"bytecode": {
"functionDebugData": {},
"generatedSources": [],
"linkReferences": {},
"object": "<BYTECODE REMOVED>",
"opcodes":"<OPCODES REMOVED>",
Expand Down

0 comments on commit 11d8fdd

Please sign in to comment.