mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge remote-tracking branch 'origin/develop' into breaking
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
},
|
||||
"settings": {
|
||||
"libraries": {
|
||||
"contract/test.sol": {
|
||||
"A": {
|
||||
"L": "0x1234567890123456789012345678901234567890"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"language": "Solidity",
|
||||
"sources": {
|
||||
"A": {
|
||||
"A\"B": {
|
||||
"content": "
|
||||
// SPDX-License-Identifier: GPL-3.0
|
||||
pragma solidity >=0.0;
|
||||
@@ -20,7 +20,7 @@
|
||||
},
|
||||
"settings": {
|
||||
"libraries": {
|
||||
"contract/test\"test.sol": {
|
||||
"A\"B": {
|
||||
"L": "0x1234567890123456789012345678901234567890"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"contracts":{"A":{"C":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"<BYTECODE REMOVED>","opcodes":"<OPCODES REMOVED>","sourceMap":"<SOURCEMAP REMOVED>"}}}}},"sources":{"A":{"id":0}}}
|
||||
{"contracts":{"A\"B":{"C":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"<BYTECODE REMOVED>","opcodes":"<OPCODES REMOVED>","sourceMap":"<SOURCEMAP REMOVED>"}}}}},"sources":{"A\"B":{"id":0}}}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
},
|
||||
"settings": {
|
||||
"libraries": {
|
||||
"contract/test.sol": {
|
||||
"A": {
|
||||
"L1": "0x1234567890123456789012345678901234567890"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
--strict-assembly --libraries library.sol:L:0x1234567890123456789012345678901234567890,library.sol:L:0x0987654321098765432109876543210987654321
|
||||
@@ -0,0 +1 @@
|
||||
Address specified more than once for library "library.sol:L".
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -0,0 +1,5 @@
|
||||
object "a" {
|
||||
code {
|
||||
let addr := linkersymbol("library.sol:L")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
--strict-assembly --libraries L:0x1234567890123456789012345678901234567890
|
||||
@@ -0,0 +1 @@
|
||||
Warning: Yul is still experimental. Please use the output with care.
|
||||
@@ -0,0 +1,5 @@
|
||||
object "a" {
|
||||
code {
|
||||
let addr := linkersymbol("L")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
|
||||
======= linking_strict_assembly_no_file_name_in_link_reference/input.yul (EVM) =======
|
||||
|
||||
Pretty printed source:
|
||||
object "a" {
|
||||
code { let addr := linkersymbol("L") }
|
||||
}
|
||||
|
||||
|
||||
Binary representation:
|
||||
73123456789012345678901234567890123456789050
|
||||
|
||||
Text representation:
|
||||
linkerSymbol("8aa64f937099b65a4febc243a5ae0f2d6416bb9e473c30dd29c1ee498fb7c5a8")
|
||||
/* "linking_strict_assembly_no_file_name_in_link_reference/input.yul":22:67 */
|
||||
pop
|
||||
@@ -0,0 +1 @@
|
||||
--strict-assembly --libraries library1.sol:L:0x1111111111111111111111111111111111111111,library2.sol:L:0x2222222222222222222222222222222222222222
|
||||
@@ -0,0 +1 @@
|
||||
Warning: Yul is still experimental. Please use the output with care.
|
||||
@@ -0,0 +1,6 @@
|
||||
object "a" {
|
||||
code {
|
||||
let addr1 := linkersymbol("library1.sol:L")
|
||||
let addr2 := linkersymbol("library2.sol:L")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
|
||||
======= linking_strict_assembly_same_library_name_different_files/input.yul (EVM) =======
|
||||
|
||||
Pretty printed source:
|
||||
object "a" {
|
||||
code {
|
||||
let addr1 := linkersymbol("library1.sol:L")
|
||||
let addr2 := linkersymbol("library2.sol:L")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Binary representation:
|
||||
7311111111111111111111111111111111111111117322222222222222222222222222222222222222225050
|
||||
|
||||
Text representation:
|
||||
linkerSymbol("f3ffc10c396a7cc41ae954b050792839d20947bf73497d30c49a9fda1ea477ec")
|
||||
/* "linking_strict_assembly_same_library_name_different_files/input.yul":32:75 */
|
||||
linkerSymbol("c3523432985587641d17c68161d2f700c57aaf4ed21cda4f25d76193c831f97f")
|
||||
/* "linking_strict_assembly_same_library_name_different_files/input.yul":22:133 */
|
||||
pop
|
||||
pop
|
||||
+1
@@ -0,0 +1 @@
|
||||
--strict-assembly --libraries library1.sol:L:0x1234567890123456789012345678901234567890
|
||||
+1
@@ -0,0 +1 @@
|
||||
Warning: Yul is still experimental. Please use the output with care.
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
object "a" {
|
||||
code {
|
||||
let addr1 := linkersymbol("library1.sol:L")
|
||||
let addr2 := linkersymbol("library2.sol:L")
|
||||
}
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
|
||||
======= linking_strict_assembly_same_library_name_different_files_in_link_references/input.yul (EVM) =======
|
||||
|
||||
Pretty printed source:
|
||||
object "a" {
|
||||
code {
|
||||
let addr1 := linkersymbol("library1.sol:L")
|
||||
let addr2 := linkersymbol("library2.sol:L")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Binary representation:
|
||||
73123456789012345678901234567890123456789073__$c3523432985587641d17c68161d2f700c5$__5050
|
||||
|
||||
Text representation:
|
||||
linkerSymbol("f3ffc10c396a7cc41ae954b050792839d20947bf73497d30c49a9fda1ea477ec")
|
||||
/* "linking_strict_assembly_same_library_name_different_files_in_link_references/input.yul":32:75 */
|
||||
linkerSymbol("c3523432985587641d17c68161d2f700c57aaf4ed21cda4f25d76193c831f97f")
|
||||
/* "linking_strict_assembly_same_library_name_different_files_in_link_references/input.yul":22:133 */
|
||||
pop
|
||||
pop
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
},
|
||||
"outputSelection":
|
||||
{
|
||||
"*": { "*": ["ewasm.wast"] }
|
||||
"*": { "*": ["ewasm.wast", "ewasm.wasm"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
{"contracts":{"A":{"C":{"ewasm":{"wast":"(module
|
||||
{"contracts":{"A":{"C":{"ewasm":{"wasm":"0061736d01000000013a0860000060017e017e60047e7e7e7e017f60087e7e7e7e7e7e7e7e00600c7e7e7e7e7e7e7e7e7e7e7e7e0060017f0060027f7f0060037f7f7f0002510408657468657265756d08636f6465436f7079000708657468657265756d06726576657274000608657468657265756d0c67657443616c6c56616c7565000508657468657265756d0666696e6973680006030a090002020401010103030503010001060100071102066d656d6f72790200046d61696e0004009d030c435f325f6465706c6f7965640061736d0100000001160460000060017e017e60047e7e7e7e017f60027f7f0002130108657468657265756d067265766572740003030504000201010503010001060100071102066d656d6f72790200046d61696e00010ab60204ca0104017e027f057e037f02404200210020002000200042c00010022101200141c0006a210220022001490440000b20001003421086210320032000421088100384422086210420042000422088100484210520022005370000200241086a2005370000200241106a20053700004280011003421086210620064280014210881003844220862107200241186a2007428001422088100484370000200020002000200010022108200020002000200010022109200941c0006a210a200a2009490440000b200a200810000b0b2901017f024042002000200184200284520440000b42002003422088520440000b2003a721040b20040b1f01017e024020004208864280fe0383200042088842ff01838421010b20010b1e01027e02402000100342108621022002200042108810038421010b20010b0aec0309dc0103017e027f057e02404200210020002000200042c00010052101200141c0006a210220022001490440000b2000100a210320022003370000200241086a2003370000200241106a2003370000200241186a428001100a370000410010024100290000100a2104410041086a290000100a2105410041106a290000100a210620042005842006410041186a290000100a84845045044020002000200020002000200020002000100c0b4290032107200020002000200020002000200042ce012000200020002007100720002000200020002000200020002007100b0b0b2901017f024042002000200184200284520440000b42002003422088520440000b2003a721040b20040b2601027f0240200020012002200310052105200541c0006a210420042005490440000b0b20040b25000240200020012002200310062004200520062007100520082009200a200b100510000b0b1f01017e024020004208864280fe0383200042088842ff01838421010b20010b1e01027e02402000100842108621022002200042108810088421010b20010b1e01027e02402000100942208621022002200042208810098421010b20010b1b000240200020012002200310062004200520062007100510030b0b1b000240200020012002200310062004200520062007100510010b0b","wast":"(module
|
||||
;; custom section for sub-module
|
||||
;; The Keccak-256 hash of the text representation of \"C_2_deployed\": f03f5b9154b9eb6803a947177e38e92e2860de95e90ba0e75eb71a58f18ed589
|
||||
;; (@custom \"C_2_deployed\" \"0061736d0100000001160460000060017e017e60047e7e7e7e017f60027f7f0002130108657468657265756d067265766572740003030504000201010503010001060100071102066d656d6f72790200046d61696e00010ab60204ca0104017e027f057e037f02404200210020002000200042c00010022101200141c0006a210220022001490440000b20001003421086210320032000421088100384422086210420042000422088100484210520022005370000200241086a2005370000200241106a20053700004280011003421086210620064280014210881003844220862107200241186a2007428001422088100484370000200020002000200010022108200020002000200010022109200941c0006a210a200a2009490440000b200a200810000b0b2901017f024042002000200184200284520440000b42002003422088520440000b2003a721040b20040b1f01017e024020004208864280fe0383200042088842ff01838421010b20010b1e01027e02402000100342108621022002200042108810038421010b20010b\")
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"language": "Solidity",
|
||||
"sources":
|
||||
{
|
||||
"A":
|
||||
{
|
||||
"content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.0; abstract contract C { }"
|
||||
}
|
||||
},
|
||||
"settings":
|
||||
{
|
||||
"optimizer":
|
||||
{
|
||||
"enabled": true,
|
||||
"details": {"yul": true}
|
||||
},
|
||||
"outputSelection":
|
||||
{
|
||||
"*": { "*": ["ewasm.wast", "ewasm.wasm"] }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"contracts":{"A":{"C":{"ewasm":{"wasm":"","wast":""}}}},"sources":{"A":{"id":0}}}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"language": "Solidity",
|
||||
"sources":
|
||||
{
|
||||
"A":
|
||||
{
|
||||
"content": "// SPDX-License-Identifier: GPL-3.0\npragma solidity >=0.0; contract C {} contract D { function f() public { C c = new C(); } }"
|
||||
}
|
||||
},
|
||||
"settings":
|
||||
{
|
||||
"optimizer": {
|
||||
"enabled": true
|
||||
},
|
||||
"outputSelection":
|
||||
{
|
||||
"*": { "*": ["ir", "evm.bytecode.object", "evm.bytecode.generatedSources", "evm.deployedBytecode.object"] }
|
||||
},
|
||||
"viaIR": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,210 @@
|
||||
{"contracts":{"A":{"C":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"<BYTECODE REMOVED>","opcodes":"<OPCODES REMOVED>","sourceMap":""},"deployedBytecode":{"generatedSources":[],"immutableReferences":{},"linkReferences":{},"object":"","opcodes":"","sourceMap":""}},"ir":"/*******************************************************
|
||||
* WARNING *
|
||||
* Solidity to Yul compilation is still EXPERIMENTAL *
|
||||
* It can result in LOSS OF FUNDS or worse *
|
||||
* !USE AT YOUR OWN RISK! *
|
||||
*******************************************************/
|
||||
|
||||
|
||||
object \"C_2\" {
|
||||
code {
|
||||
mstore(64, 128)
|
||||
if callvalue() { revert(0, 0) }
|
||||
|
||||
constructor_C_2()
|
||||
|
||||
codecopy(0, dataoffset(\"C_2_deployed\"), datasize(\"C_2_deployed\"))
|
||||
|
||||
return(0, datasize(\"C_2_deployed\"))
|
||||
|
||||
function constructor_C_2() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
object \"C_2_deployed\" {
|
||||
code {
|
||||
mstore(64, 128)
|
||||
|
||||
if iszero(lt(calldatasize(), 4))
|
||||
{
|
||||
let selector := shift_right_224_unsigned(calldataload(0))
|
||||
switch selector
|
||||
|
||||
default {}
|
||||
}
|
||||
if iszero(calldatasize()) { }
|
||||
revert(0, 0)
|
||||
|
||||
function shift_right_224_unsigned(value) -> newValue {
|
||||
newValue :=
|
||||
|
||||
shr(224, value)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
"},"D":{"evm":{"bytecode":{"generatedSources":[],"linkReferences":{},"object":"<BYTECODE REMOVED>","opcodes":"<OPCODES REMOVED>","sourceMap":""},"deployedBytecode":{"generatedSources":[],"immutableReferences":{},"linkReferences":{},"object":"","opcodes":"","sourceMap":""}},"ir":"/*******************************************************
|
||||
* WARNING *
|
||||
* Solidity to Yul compilation is still EXPERIMENTAL *
|
||||
* It can result in LOSS OF FUNDS or worse *
|
||||
* !USE AT YOUR OWN RISK! *
|
||||
*******************************************************/
|
||||
|
||||
|
||||
object \"D_13\" {
|
||||
code {
|
||||
mstore(64, 128)
|
||||
if callvalue() { revert(0, 0) }
|
||||
|
||||
constructor_D_13()
|
||||
|
||||
codecopy(0, dataoffset(\"D_13_deployed\"), datasize(\"D_13_deployed\"))
|
||||
|
||||
return(0, datasize(\"D_13_deployed\"))
|
||||
|
||||
function constructor_D_13() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
object \"D_13_deployed\" {
|
||||
code {
|
||||
mstore(64, 128)
|
||||
|
||||
if iszero(lt(calldatasize(), 4))
|
||||
{
|
||||
let selector := shift_right_224_unsigned(calldataload(0))
|
||||
switch selector
|
||||
|
||||
case 0x26121ff0
|
||||
{
|
||||
// f()
|
||||
if callvalue() { revert(0, 0) }
|
||||
abi_decode_tuple_(4, calldatasize())
|
||||
fun_f_12()
|
||||
let memPos := allocateMemory(0)
|
||||
let memEnd := abi_encode_tuple__to__fromStack(memPos )
|
||||
return(memPos, sub(memEnd, memPos))
|
||||
}
|
||||
|
||||
default {}
|
||||
}
|
||||
if iszero(calldatasize()) { }
|
||||
revert(0, 0)
|
||||
|
||||
function abi_decode_tuple_(headStart, dataEnd) {
|
||||
if slt(sub(dataEnd, headStart), 0) { revert(0, 0) }
|
||||
|
||||
}
|
||||
|
||||
function abi_encode_tuple__to__fromStack(headStart ) -> tail {
|
||||
tail := add(headStart, 0)
|
||||
|
||||
}
|
||||
|
||||
function allocateMemory(size) -> memPtr {
|
||||
memPtr := mload(64)
|
||||
let newFreePtr := add(memPtr, size)
|
||||
// protect against overflow
|
||||
if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error() }
|
||||
mstore(64, newFreePtr)
|
||||
}
|
||||
|
||||
function allocateTemporaryMemory() -> memPtr {
|
||||
memPtr := mload(64)
|
||||
}
|
||||
|
||||
function fun_f_12() {
|
||||
|
||||
let _1 := allocateTemporaryMemory()
|
||||
let _2 := add(_1, datasize(\"C_2\"))
|
||||
if or(gt(_2, 0xffffffffffffffff), lt(_2, _1)) { panic_error() }
|
||||
datacopy(_1, dataoffset(\"C_2\"), datasize(\"C_2\"))
|
||||
_2 := abi_encode_tuple__to__fromStack(_2)
|
||||
|
||||
let expr_9_address := create(0, _1, sub(_2, _1))
|
||||
|
||||
releaseTemporaryMemory()
|
||||
let vloc_c_6_address := expr_9_address
|
||||
|
||||
}
|
||||
|
||||
function panic_error() {
|
||||
invalid()
|
||||
}
|
||||
|
||||
function releaseTemporaryMemory() {
|
||||
}
|
||||
|
||||
function shift_right_224_unsigned(value) -> newValue {
|
||||
newValue :=
|
||||
|
||||
shr(224, value)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
/*******************************************************
|
||||
* WARNING *
|
||||
* Solidity to Yul compilation is still EXPERIMENTAL *
|
||||
* It can result in LOSS OF FUNDS or worse *
|
||||
* !USE AT YOUR OWN RISK! *
|
||||
*******************************************************/
|
||||
|
||||
object \"C_2\" {
|
||||
code {
|
||||
mstore(64, 128)
|
||||
if callvalue() { revert(0, 0) }
|
||||
|
||||
constructor_C_2()
|
||||
|
||||
codecopy(0, dataoffset(\"C_2_deployed\"), datasize(\"C_2_deployed\"))
|
||||
|
||||
return(0, datasize(\"C_2_deployed\"))
|
||||
|
||||
function constructor_C_2() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
object \"C_2_deployed\" {
|
||||
code {
|
||||
mstore(64, 128)
|
||||
|
||||
if iszero(lt(calldatasize(), 4))
|
||||
{
|
||||
let selector := shift_right_224_unsigned(calldataload(0))
|
||||
switch selector
|
||||
|
||||
default {}
|
||||
}
|
||||
if iszero(calldatasize()) { }
|
||||
revert(0, 0)
|
||||
|
||||
function shift_right_224_unsigned(value) -> newValue {
|
||||
newValue :=
|
||||
|
||||
shr(224, value)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
"}}},"errors":[{"component":"general","errorCode":"2072","formattedMessage":"A:2:73: Warning: Unused local variable.
|
||||
pragma solidity >=0.0; contract C {} contract D { function f() public { C c = new C(); } }
|
||||
^-^
|
||||
","message":"Unused local variable.","severity":"warning","sourceLocation":{"end":111,"file":"A","start":108},"type":"Warning"}],"sources":{"A":{"id":0}}}
|
||||
@@ -0,0 +1 @@
|
||||
--ir-optimized --experimental-via-ir --optimize --bin --bin-runtime
|
||||
@@ -0,0 +1,5 @@
|
||||
Warning: Unused local variable.
|
||||
--> viair_subobjects/input.sol:7:9:
|
||||
|
|
||||
7 | C c = new C();
|
||||
| ^^^
|
||||
@@ -0,0 +1,9 @@
|
||||
// SPDX-License-Identifier: GPL-3.0
|
||||
pragma solidity >=0.6.0;
|
||||
|
||||
contract C {}
|
||||
contract D {
|
||||
function f() public {
|
||||
C c = new C();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
|
||||
======= viair_subobjects/input.sol:C =======
|
||||
Binary:
|
||||
60806040523415600f5760006000fd5b600a80601e600039806000f350fe608060405260006000fd
|
||||
Binary of the runtime part:
|
||||
|
||||
Optimized IR:
|
||||
/*******************************************************
|
||||
* WARNING *
|
||||
* Solidity to Yul compilation is still EXPERIMENTAL *
|
||||
* It can result in LOSS OF FUNDS or worse *
|
||||
* !USE AT YOUR OWN RISK! *
|
||||
*******************************************************/
|
||||
|
||||
object "C_2" {
|
||||
code {
|
||||
{
|
||||
mstore(64, 128)
|
||||
if callvalue() { revert(0, 0) }
|
||||
let _1 := datasize("C_2_deployed")
|
||||
codecopy(0, dataoffset("C_2_deployed"), _1)
|
||||
return(0, _1)
|
||||
}
|
||||
}
|
||||
object "C_2_deployed" {
|
||||
code {
|
||||
{
|
||||
mstore(64, 128)
|
||||
revert(0, 0)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
======= viair_subobjects/input.sol:D =======
|
||||
Binary:
|
||||
608060405234156100105760006000fd5b60d380610020600039806000f350fe6080604052600436101515610074576000803560e01c6326121ff0141561007257341561002a578081fd5b806003193601121561003a578081fd5b6028806080016080811067ffffffffffffffff8211171561005757fe5b50806100ab60803980608083f05050806100708261007e565bf35b505b60006000fd6100a9565b6000604051905081810181811067ffffffffffffffff8211171561009e57fe5b80604052505b919050565bfe60806040523415600f5760006000fd5b600a80601e600039806000f350fe608060405260006000fd
|
||||
Binary of the runtime part:
|
||||
|
||||
Optimized IR:
|
||||
/*******************************************************
|
||||
* WARNING *
|
||||
* Solidity to Yul compilation is still EXPERIMENTAL *
|
||||
* It can result in LOSS OF FUNDS or worse *
|
||||
* !USE AT YOUR OWN RISK! *
|
||||
*******************************************************/
|
||||
|
||||
object "D_13" {
|
||||
code {
|
||||
{
|
||||
mstore(64, 128)
|
||||
if callvalue() { revert(0, 0) }
|
||||
let _1 := datasize("D_13_deployed")
|
||||
codecopy(0, dataoffset("D_13_deployed"), _1)
|
||||
return(0, _1)
|
||||
}
|
||||
}
|
||||
object "D_13_deployed" {
|
||||
code {
|
||||
{
|
||||
mstore(64, 128)
|
||||
if iszero(lt(calldatasize(), 4))
|
||||
{
|
||||
let _1 := 0
|
||||
if eq(0x26121ff0, shr(224, calldataload(_1)))
|
||||
{
|
||||
if callvalue() { revert(_1, _1) }
|
||||
if slt(add(calldatasize(), not(3)), _1) { revert(_1, _1) }
|
||||
let _2 := datasize("C_2")
|
||||
let _3 := add(128, _2)
|
||||
if or(gt(_3, 0xffffffffffffffff), lt(_3, 128)) { invalid() }
|
||||
datacopy(128, dataoffset("C_2"), _2)
|
||||
pop(create(_1, 128, _2))
|
||||
return(allocateMemory(_1), _1)
|
||||
}
|
||||
}
|
||||
revert(0, 0)
|
||||
}
|
||||
function allocateMemory(size) -> memPtr
|
||||
{
|
||||
memPtr := mload(64)
|
||||
let newFreePtr := add(memPtr, size)
|
||||
if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { invalid() }
|
||||
mstore(64, newFreePtr)
|
||||
}
|
||||
}
|
||||
object "C_2" {
|
||||
code {
|
||||
{
|
||||
mstore(64, 128)
|
||||
if callvalue() { revert(0, 0) }
|
||||
let _1 := datasize("C_2_deployed")
|
||||
codecopy(0, dataoffset("C_2_deployed"), _1)
|
||||
return(0, _1)
|
||||
}
|
||||
}
|
||||
object "C_2_deployed" {
|
||||
code {
|
||||
{
|
||||
mstore(64, 128)
|
||||
revert(0, 0)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Error (1834): Unimplemented feature error: Copying from storage to storage is not yet implemented. in <FILENAME REMOVED>
|
||||
--> yul_unimplemented/input.sol:7:9:
|
||||
Error (1834): Unimplemented feature error in <FILENAME REMOVED>
|
||||
--> yul_unimplemented/input.sol:8:9:
|
||||
|
|
||||
7 | a = b;
|
||||
8 | x.f();
|
||||
| ^^^^^
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
// SPDX-License-Identifier: GPL-3.0
|
||||
pragma solidity >=0.0;
|
||||
library L { function f(uint) public {} }
|
||||
contract test {
|
||||
bytes a;
|
||||
bytes b;
|
||||
using L for uint;
|
||||
function f() public {
|
||||
a = b;
|
||||
uint x;
|
||||
x.f();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user