Command-line tests for linking in assembly mode

This commit is contained in:
Kamil Śliwak 2020-11-04 19:26:40 +01:00
parent a0d22422b0
commit 6ef1e4cfd4
10 changed files with 76 additions and 0 deletions

View File

@ -0,0 +1,20 @@
{
"language": "Yul",
"sources": {
"A": {
"content": "object \"a\" { code { let addr := linkersymbol(\"contract/test.sol:L\") } }"
}
},
"settings": {
"libraries": {
"contract/test.sol": {
"L": "0x1234567890123456789012345678901234567890"
}
},
"outputSelection": {
"*": {
"*": ["evm.bytecode.object", "evm.bytecode.linkReferences"]
}
}
}
}

View File

@ -0,0 +1 @@
{"errors":[{"component":"general","formattedMessage":"Field \"settings.libraries\" cannot be used for Yul.","message":"Field \"settings.libraries\" cannot be used for Yul.","severity":"error","type":"JSONError"}]}

View File

@ -0,0 +1 @@
--strict-assembly --libraries contract/test.sol:L:0x1234567890123456789012345678901234567890

View File

@ -0,0 +1 @@
Warning: Yul is still experimental. Please use the output with care.

View File

@ -0,0 +1,5 @@
object "a" {
code {
let addr := linkersymbol("contract/test.sol:L")
}
}

View File

@ -0,0 +1,18 @@
======= linking_strict_assembly/input.yul (EVM) =======
Pretty printed source:
object "a" {
code {
let addr := linkersymbol("contract/test.sol:L")
}
}
Binary representation:
73__$f919ba91ac99f96129544b80b9516b27a8$__50
Text representation:
linkerSymbol("f919ba91ac99f96129544b80b9516b27a80e376b9dc693819d0b18b7e0395612")
/* "linking_strict_assembly/input.yul":22:85 */
pop

View File

@ -0,0 +1 @@
--strict-assembly --libraries contract/test.sol:L1:0x1234567890123456789012345678901234567890

View File

@ -0,0 +1 @@
Warning: Yul is still experimental. Please use the output with care.

View File

@ -0,0 +1,6 @@
object "a" {
code {
let addr1 := linkersymbol("contract/test.sol:L1")
let addr2 := linkersymbol("contract/test.sol:L2")
}
}

View File

@ -0,0 +1,22 @@
======= linking_strict_assembly_unresolved_references/input.yul (EVM) =======
Pretty printed source:
object "a" {
code {
let addr1 := linkersymbol("contract/test.sol:L1")
let addr2 := linkersymbol("contract/test.sol:L2")
}
}
Binary representation:
<BYTECODE REMOVED>__$05b0326038374a21e0895480a58bda0768$__<BYTECODE REMOVED>__$fb58009a6b1ecea3b9d99bedd645df4ec3$__5050
Text representation:
linkerSymbol("05b0326038374a21e0895480a58bda0768cdcc04c8d18f154362d1ca5223d245")
/* "linking_strict_assembly_unresolved_references/input.yul":32:81 */
linkerSymbol("fb58009a6b1ecea3b9d99bedd645df4ec308f17bc0087e5f39d078f77f809177")
/* "linking_strict_assembly_unresolved_references/input.yul":22:145 */
pop
pop