Allow and require use-src to be repeated for each object.

This commit is contained in:
chriseth
2021-09-02 11:29:42 +02:00
parent 13691dfbaa
commit 5caa15879b
31 changed files with 67 additions and 41 deletions
@@ -21,6 +21,7 @@ object "C_12" {
return(128, _1)
}
}
/// @use-src 0:"constant_optimizer_yul/input.sol", 1:"#utility.yul"
object "C_12_deployed" {
code {
{
@@ -38,6 +38,7 @@ object "C_81" {
}
}
/// @use-src 0:"exp_base_literal/input.sol", 1:"#utility.yul"
object "C_81_deployed" {
code {
/// @src 0:82:370
@@ -18,6 +18,7 @@ object "C_7" {
return(128, _1)
}
}
/// @use-src 0:"ir_compiler_inheritance_nosubobjects/input.sol", 1:"#utility.yul"
object "C_7_deployed" {
code {
{
@@ -50,6 +51,7 @@ object "D_10" {
return(128, _1)
}
}
/// @use-src 0:"ir_compiler_inheritance_nosubobjects/input.sol", 1:"#utility.yul"
object "D_10_deployed" {
code {
{
@@ -18,6 +18,7 @@ object "C_3" {
return(128, _1)
}
}
/// @use-src 0:"ir_compiler_subobjects/input.sol", 1:"#utility.yul"
object "C_3_deployed" {
code {
{
@@ -50,6 +51,7 @@ object "D_16" {
return(128, _1)
}
}
/// @use-src 0:"ir_compiler_subobjects/input.sol", 1:"#utility.yul"
object "D_16_deployed" {
code {
{
@@ -88,6 +90,7 @@ object "D_16" {
revert(0, 0)
}
}
/// @use-src 0:"ir_compiler_subobjects/input.sol", 1:"#utility.yul"
object "C_3" {
code {
{
@@ -99,6 +102,7 @@ object "D_16" {
return(128, _1)
}
}
/// @use-src 0:"ir_compiler_subobjects/input.sol", 1:"#utility.yul"
object "C_3_deployed" {
code {
{
@@ -18,6 +18,7 @@ object "D_12" {
return(128, _1)
}
}
/// @use-src 0:"ir_with_assembly_no_memoryguard_creation/input.sol", 1:"#utility.yul"
object "D_12_deployed" {
code {
{
@@ -18,6 +18,7 @@ object "D_8" {
return(128, _1)
}
}
/// @use-src 0:"ir_with_assembly_no_memoryguard_runtime/input.sol", 1:"#utility.yul"
object "D_8_deployed" {
code {
{
@@ -22,6 +22,7 @@ object "C_12" {
return(128, _1)
}
}
/// @use-src 0:"keccak_optimization_deploy_code/input.sol", 1:"#utility.yul"
object "C_12_deployed" {
code {
{
@@ -18,6 +18,7 @@ object "C_7" {
return(128, _1)
}
}
/// @use-src 0:"keccak_optimization_low_runs/input.sol", 1:"#utility.yul"
object "C_7_deployed" {
code {
{
+1
View File
@@ -18,6 +18,7 @@ object "C_59" {
return(128, _1)
}
}
/// @use-src 0:"name_simplifier/input.sol", 1:"#utility.yul"
object "C_59_deployed" {
code {
{
@@ -18,6 +18,7 @@ object "Arraysum_34" {
return(128, _1)
}
}
/// @use-src 0:"optimizer_array_sload/input.sol", 1:"#utility.yul"
object "Arraysum_34_deployed" {
code {
{
+1
View File
@@ -53,6 +53,7 @@ object "C_15" {
}
}
/// @use-src 0:"revert_strings/input.sol", 1:"#utility.yul"
object "C_15_deployed" {
code {
/// @src 0:59:147
@@ -25,6 +25,7 @@ object \"C_7\" {
function revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb()
{ revert(0, 0) }
}
/// @use-src 0:\"A\", 1:\"#utility.yul\"
object \"C_7_deployed\" {
code {
/// @src 0:79:121
@@ -37,6 +37,7 @@ object \"C_7\" {
}
}
/// @use-src 0:\"A\", 1:\"#utility.yul\"
object \"C_7_deployed\" {
code {
/// @src 0:79:121
@@ -37,6 +37,7 @@ object \"C_3\" {
}
}
/// @use-src 0:\"A\", 1:\"#utility.yul\"
object \"C_3_deployed\" {
code {
/// @src 0:79:92
@@ -113,6 +114,7 @@ object \"D_16\" {
}
}
/// @use-src 0:\"A\", 1:\"#utility.yul\"
object \"D_16_deployed\" {
code {
/// @src 0:93:146
@@ -244,6 +246,7 @@ object \"D_16\" {
}
}
/// @use-src 0:\"A\", 1:\"#utility.yul\"
object \"C_3_deployed\" {
code {
/// @src 0:79:92
@@ -38,6 +38,7 @@ object "test_11" {
}
}
/// @use-src 0:"viair_abicoder_v1/input.sol", 1:"#utility.yul"
object "test_11_deployed" {
code {
/// @src 0:79:169
@@ -24,6 +24,7 @@ object "C_3" {
return(128, _1)
}
}
/// @use-src 0:"viair_subobjects/input.sol", 1:"#utility.yul"
object "C_3_deployed" {
code {
{
@@ -62,6 +63,7 @@ object "D_16" {
return(128, _1)
}
}
/// @use-src 0:"viair_subobjects/input.sol", 1:"#utility.yul"
object "D_16_deployed" {
code {
{
@@ -100,6 +102,7 @@ object "D_16" {
revert(0, 0)
}
}
/// @use-src 0:"viair_subobjects/input.sol", 1:"#utility.yul"
object "C_3" {
code {
{
@@ -111,6 +114,7 @@ object "D_16" {
return(128, _1)
}
}
/// @use-src 0:"viair_subobjects/input.sol", 1:"#utility.yul"
object "C_3_deployed" {
code {
{
@@ -25,6 +25,7 @@ object "C_7" {
function revert_error_ca66f745a3ce8ff40e2ccaf1ad45db7774001b90d25810abd9040049be7bf4bb()
{ revert(0, 0) }
}
/// @use-src 0:"yul_optimizer_steps/input.sol", 1:"#utility.yul"
object "C_7_deployed" {
code {
{
@@ -156,6 +156,7 @@ object \"C_54\" {
}
}
/// @use-src 0:\"C\", 1:\"D\", 2:\"#utility.yul\"
object \"C_54_deployed\" {
code {
/// @src 0:79:428
@@ -780,6 +781,7 @@ object \"D_72\" {
}
}
/// @use-src 0:\"C\", 1:\"D\", 2:\"#utility.yul\"
object \"D_72_deployed\" {
code {
/// @src 1:91:166
@@ -37,6 +37,7 @@ object \"C_11\" {
}
}
/// @use-src 0:\"A\", 1:\"#utility.yul\"
object \"C_11_deployed\" {
code {
/// @src 0:78:164
@@ -37,6 +37,7 @@ object \"C_11\" {
}
}
/// @use-src 0:\"A\", 1:\"#utility.yul\"
object \"C_11_deployed\" {
code {
/// @src 0:78:158
@@ -37,6 +37,7 @@ object \"C_11\" {
}
}
/// @use-src 0:\"A\", 1:\"#utility.yul\"
object \"C_11_deployed\" {
code {
/// @src 0:78:159
@@ -37,6 +37,7 @@ object \"C_11\" {
}
}
/// @use-src 0:\"A\", 1:\"#utility.yul\"
object \"C_11_deployed\" {
code {
/// @src 0:78:243
@@ -37,6 +37,7 @@ object \"C_11\" {
}
}
/// @use-src 0:\"A\", 1:\"#utility.yul\"
object \"C_11_deployed\" {
code {
/// @src 0:78:159
+3 -2
View File
@@ -121,8 +121,9 @@ tuple<optional<SourceNameMap>, ErrorList> tryGetSourceLocationMapping(string _so
Dialect const& dialect = yul::EVMDialect::strictAssemblyForEVM(EVMVersion::berlin());
ObjectParser objectParser{reporter, dialect};
CharStream stream(move(source), "");
objectParser.parse(make_shared<Scanner>(stream), false);
return {objectParser.sourceNameMapping(), std::move(errors)};
auto object = objectParser.parse(make_shared<Scanner>(stream), false);
BOOST_REQUIRE(object && object->debugData);
return {object->debugData->sourceNames, std::move(errors)};
}
}
@@ -10,6 +10,7 @@ object "a" {
datasize("sub")
)
}
/// @use-src 3: "abc.sol" , 2: "def.sol"
object "sub" {
code {
/// @src 2:70:72