-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
104 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 3 additions & 7 deletions
10
test/libyul/yulSyntaxTests/eof/auxdataloadn_reserved_in_eof.yul
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
object "a" { | ||
code { | ||
function auxdataloadn() {} | ||
} | ||
{ | ||
function auxdataloadn() {} | ||
} | ||
|
||
// ==== | ||
// bytecodeFormat: >=EOFv1 | ||
// ---- | ||
// ParserError 5568: (41-53): Cannot use builtin function name "auxdataloadn" as identifier name. | ||
// ParserError 8143: (41-53): Expected keyword "data" or "object" or "}". | ||
// ParserError 5568: (15-27): Cannot use builtin function name "auxdataloadn" as identifier name. |
53 changes: 25 additions & 28 deletions
53
test/libyul/yulSyntaxTests/eof/eof_identifiers_not_defined_in_legacy.yul
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,29 @@ | ||
object "a" { | ||
code { | ||
auxdataloadn(0) | ||
dataloadn(0) | ||
eofcreate("name", 0, 0, 0, 0) | ||
returncontract("name", 0, 0) | ||
rjump() | ||
rjumpi() | ||
callf(0) | ||
jumpf(0) | ||
retf() | ||
extcall(0, 1, 2, 3) | ||
extstaticcall(0, 1, 2) | ||
extdelegatecall(0, 1, 2) | ||
} | ||
{ | ||
auxdataloadn(0) | ||
dataloadn(0) | ||
eofcreate("name", 0, 0, 0, 0) | ||
returncontract("name", 0, 0) | ||
rjump() | ||
rjumpi() | ||
callf(0) | ||
jumpf(0) | ||
retf() | ||
extcall(0, 1, 2, 3) | ||
extstaticcall(0, 1, 2) | ||
extdelegatecall(0, 1, 2) | ||
} | ||
|
||
// ==== | ||
// bytecodeFormat: legacy | ||
// ---- | ||
// DeclarationError 4619: (32-44): Function "auxdataloadn" not found. | ||
// DeclarationError 4619: (56-65): Function "dataloadn" not found. | ||
// DeclarationError 4619: (77-86): Function "eofcreate" not found. | ||
// DeclarationError 4619: (115-129): Function "returncontract" not found. | ||
// DeclarationError 4619: (152-157): Function "rjump" not found. | ||
// DeclarationError 4619: (168-174): Function "rjumpi" not found. | ||
// DeclarationError 4619: (185-190): Function "callf" not found. | ||
// DeclarationError 4619: (202-207): Function "jumpf" not found. | ||
// DeclarationError 4619: (219-223): Function "retf" not found. | ||
// TypeError 4328: (234-241): The "extcall" instruction is only available in EOF. | ||
// TypeError 4328: (262-275): The "extstaticcall" instruction is only available in EOF. | ||
// TypeError 4328: (293-308): The "extdelegatecall" instruction is only available in EOF. | ||
// DeclarationError 4328: (6-18): The "auxdataloadn" instruction is only available in EOF. | ||
// DeclarationError 4619: (26-35): Function "dataloadn" not found. | ||
// DeclarationError 4328: (43-52): The "eofcreate" instruction is only available in EOF. | ||
// DeclarationError 4328: (77-91): The "returncontract" instruction is only available in EOF. | ||
// DeclarationError 4619: (110-115): Function "rjump" not found. | ||
// DeclarationError 4619: (122-128): Function "rjumpi" not found. | ||
// DeclarationError 4619: (135-140): Function "callf" not found. | ||
// DeclarationError 4619: (148-153): Function "jumpf" not found. | ||
// DeclarationError 4619: (161-165): Function "retf" not found. | ||
// TypeError 4328: (172-179): The "extcall" instruction is only available in EOF. | ||
// TypeError 4328: (196-209): The "extstaticcall" instruction is only available in EOF. | ||
// TypeError 4328: (223-238): The "extdelegatecall" instruction is only available in EOF. |
29 changes: 13 additions & 16 deletions
29
test/libyul/yulSyntaxTests/eof/eof_identifiers_not_reserved_in_legacy.yul
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,16 @@ | ||
object "a" { | ||
code { | ||
function auxdataloadn() {} | ||
function dataloadn() {} | ||
function eofcreate() {} | ||
function returncontract() {} | ||
function rjump() {} | ||
function rjumpi() {} | ||
function callf() {} | ||
function jumpf() {} | ||
function retf() {} | ||
function extcall() {} | ||
function extstaticcall() {} | ||
function extdelegatecall() {} | ||
} | ||
{ | ||
function auxdataloadn() {} | ||
function dataloadn() {} | ||
function eofcreate() {} | ||
function returncontract() {} | ||
function rjump() {} | ||
function rjumpi() {} | ||
function callf() {} | ||
function jumpf() {} | ||
function retf() {} | ||
function extcall() {} | ||
function extstaticcall() {} | ||
function extdelegatecall() {} | ||
} | ||
|
||
// ==== | ||
// bytecodeFormat: legacy |
29 changes: 13 additions & 16 deletions
29
test/libyul/yulSyntaxTests/eof/eof_opcodes_identifiers_reserved_in_eof.yul
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,17 @@ | ||
object "a" { | ||
code { | ||
function dataloadn() {} | ||
function rjump() {} | ||
function rjumpi() {} | ||
function callf() {} | ||
function jumpf() {} | ||
function retf() {} | ||
} | ||
{ | ||
function dataloadn() {} | ||
function rjump() {} | ||
function rjumpi() {} | ||
function callf() {} | ||
function jumpf() {} | ||
function retf() {} | ||
} | ||
|
||
// ==== | ||
// bytecodeFormat: >=EOFv1 | ||
// ---- | ||
// DeclarationError 5017: (32-55): The identifier "dataloadn" is reserved and can not be used. | ||
// DeclarationError 5017: (64-83): The identifier "rjump" is reserved and can not be used. | ||
// DeclarationError 5017: (92-112): The identifier "rjumpi" is reserved and can not be used. | ||
// DeclarationError 5017: (121-140): The identifier "callf" is reserved and can not be used. | ||
// DeclarationError 5017: (149-168): The identifier "jumpf" is reserved and can not be used. | ||
// DeclarationError 5017: (177-195): The identifier "retf" is reserved and can not be used. | ||
// DeclarationError 5017: (6-29): The identifier "dataloadn" is reserved and can not be used. | ||
// DeclarationError 5017: (34-53): The identifier "rjump" is reserved and can not be used. | ||
// DeclarationError 5017: (58-78): The identifier "rjumpi" is reserved and can not be used. | ||
// DeclarationError 5017: (83-102): The identifier "callf" is reserved and can not be used. | ||
// DeclarationError 5017: (107-126): The identifier "jumpf" is reserved and can not be used. | ||
// DeclarationError 5017: (131-149): The identifier "retf" is reserved and can not be used. |
10 changes: 3 additions & 7 deletions
10
test/libyul/yulSyntaxTests/eof/eofcreate_reserved_in_eof.yul
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
object "a" { | ||
code { | ||
function eofcreate() {} | ||
} | ||
{ | ||
function eofcreate() {} | ||
} | ||
|
||
// ==== | ||
// bytecodeFormat: >=EOFv1 | ||
// ---- | ||
// ParserError 5568: (41-50): Cannot use builtin function name "eofcreate" as identifier name. | ||
// ParserError 8143: (41-50): Expected keyword "data" or "object" or "}". | ||
// ParserError 5568: (15-24): Cannot use builtin function name "eofcreate" as identifier name. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
object "a" { | ||
code { | ||
function extcall() {} | ||
} | ||
{ | ||
function extcall() {} | ||
} | ||
|
||
// ==== | ||
// bytecodeFormat: >=EOFv1 | ||
// ---- | ||
// ParserError 5568: (41-48): Cannot use builtin function name "extcall" as identifier name. | ||
// ParserError 8143: (41-48): Expected keyword "data" or "object" or "}". | ||
// ParserError 5568: (15-22): Cannot use builtin function name "extcall" as identifier name. |
23 changes: 10 additions & 13 deletions
23
test/libyul/yulSyntaxTests/eof/extcalls_invalid_in_legacy.yul
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,14 @@ | ||
object "a" { | ||
code { | ||
pop(extcall(address(), 0, 0, 0)) | ||
pop(extdelegatecall(address(), 0, 0)) | ||
pop(extstaticcall(address(), 0, 0)) | ||
} | ||
{ | ||
pop(extcall(address(), 0, 0, 0)) | ||
pop(extdelegatecall(address(), 0, 0)) | ||
pop(extstaticcall(address(), 0, 0)) | ||
} | ||
|
||
// ==== | ||
// bytecodeFormat: legacy | ||
// ---- | ||
// TypeError 4328: (36-43): The "extcall" instruction is only available in EOF. | ||
// TypeError 3950: (36-63): Expected expression to evaluate to one value, but got 0 values instead. | ||
// TypeError 4328: (77-92): The "extdelegatecall" instruction is only available in EOF. | ||
// TypeError 3950: (77-109): Expected expression to evaluate to one value, but got 0 values instead. | ||
// TypeError 4328: (123-136): The "extstaticcall" instruction is only available in EOF. | ||
// TypeError 3950: (123-153): Expected expression to evaluate to one value, but got 0 values instead. | ||
// TypeError 4328: (10-17): The "extcall" instruction is only available in EOF. | ||
// TypeError 3950: (10-37): Expected expression to evaluate to one value, but got 0 values instead. | ||
// TypeError 4328: (47-62): The "extdelegatecall" instruction is only available in EOF. | ||
// TypeError 3950: (47-79): Expected expression to evaluate to one value, but got 0 values instead. | ||
// TypeError 4328: (89-102): The "extstaticcall" instruction is only available in EOF. | ||
// TypeError 3950: (89-119): Expected expression to evaluate to one value, but got 0 values instead. |
10 changes: 3 additions & 7 deletions
10
test/libyul/yulSyntaxTests/eof/extdelegatecall_reserved_in_eof.yul
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
object "a" { | ||
code { | ||
function extdelegatecall() {} | ||
} | ||
{ | ||
function extdelegatecall() {} | ||
} | ||
|
||
// ==== | ||
// bytecodeFormat: >=EOFv1 | ||
// ---- | ||
// ParserError 5568: (41-56): Cannot use builtin function name "extdelegatecall" as identifier name. | ||
// ParserError 8143: (41-56): Expected keyword "data" or "object" or "}". | ||
// ParserError 5568: (15-30): Cannot use builtin function name "extdelegatecall" as identifier name. |
10 changes: 3 additions & 7 deletions
10
test/libyul/yulSyntaxTests/eof/extstaticcall_reserved_in_eof.yul
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
object "a" { | ||
code { | ||
function extstaticcall() {} | ||
} | ||
{ | ||
function extstaticcall() {} | ||
} | ||
|
||
// ==== | ||
// bytecodeFormat: >=EOFv1 | ||
// ---- | ||
// ParserError 5568: (41-54): Cannot use builtin function name "extstaticcall" as identifier name. | ||
// ParserError 8143: (41-54): Expected keyword "data" or "object" or "}". | ||
// ParserError 5568: (15-28): Cannot use builtin function name "extstaticcall" as identifier name. |
10 changes: 3 additions & 7 deletions
10
test/libyul/yulSyntaxTests/eof/returncontract_reserved_in_eof.yul
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
object "a" { | ||
code { | ||
function returncontract() {} | ||
} | ||
{ | ||
function returncontract() {} | ||
} | ||
|
||
// ==== | ||
// bytecodeFormat: >=EOFv1 | ||
// ---- | ||
// ParserError 5568: (41-55): Cannot use builtin function name "returncontract" as identifier name. | ||
// ParserError 8143: (41-55): Expected keyword "data" or "object" or "}". | ||
// ParserError 5568: (15-29): Cannot use builtin function name "returncontract" as identifier name. |