Commit Graph

809 Commits

Author SHA1 Message Date
Daniel Kirchner
5cd98006d4 Fill in junk in stack layouts on terminating control flow paths. 2022-03-15 18:36:55 +01:00
Daniel Kirchner
8cb01a9953 Fix and updated test. 2022-03-15 10:23:09 +01:00
Daniel Kirchner
db27051024 Test for old behaviour. 2022-03-15 10:23:09 +01:00
chriseth
9188519f11 Using for with global binding. 2022-03-14 17:39:14 +01:00
Daniel Kirchner
0f1a63c3fa Fix import directive visits in type checker and view pure checker. 2022-03-14 14:53:06 +01:00
hrkrshnn
672951ccc7 Extend using-for. 2022-03-14 12:33:44 +01:00
nishant-sachdeva
b7a9daa2f8 Generate warning when rational numbers are converted to their mobile type without explicit requests 2022-03-14 14:04:46 +05:30
chriseth
4f02be110c Unused store eliminator. 2022-03-10 18:25:28 +01:00
chriseth
b3fe042884 Optimize eq iszero jumpi to xor jumpi and remove double jump. 2022-03-10 14:41:41 +01:00
Daniel Kirchner
0a9d752b8b Add test case and adjust tests. 2022-03-09 17:53:28 +01:00
Daniel Kirchner
ce0a3e93f2 Store whether an evmasm Assembly is creation code. 2022-03-09 17:42:29 +01:00
chriseth
79eba921b8
Merge pull request #12659 from paarthmadan/pm/base-64-test-cases
Add Base64 test cases with and without inline assembly
2022-03-07 12:57:49 +01:00
chriseth
4f19d68ee9
Merge pull request #12620 from ethereum/assemblyAnnotation
Memory-safety annotation for inline assembly.
2022-03-07 12:48:41 +01:00
Paarth Madan
17fa85a2fb Add Base64 test cases with and without inline assembly
Adds two implementations of Base64 encoding as specified in RFC4648.
Implementation (1) uses inline assembly, while Implementation (2) is
written purely in Solidity.

Assertions are added to replicate the test vectors specified in the RFC
for Base64 to ensure both implementations to specification.
2022-03-05 19:51:46 -05:00
nishant-sachdeva
beabc51c20 returnSize assigned according to truth value of returnInfo.dynamicReturnSize 2022-03-03 18:55:10 +05:30
Daniel Kirchner
6b6e163be5 Tests. 2022-03-02 16:42:28 +01:00
chriseth
e9592c3f8e Update tests. 2022-02-21 14:32:52 +01:00
nishant-sachdeva
276851ff91 Added support for FunctionType::Kind::StringConcat and functions string.concat 2022-02-10 22:08:47 +05:30
Daniel Kirchner
290b9326e3 Move stray semantics test to proper directory. 2022-02-10 13:43:49 +01:00
hrkrshnn
0fe5811459 Fixed a ICE on calldata to struct member copy 2022-01-31 17:26:11 +01:00
nishant-sachdeva
dec511aad8 Corresponding code in the .cpp file has been commented instead of begin removed pending preliminary reviews
Code generators needed fixing of the cleanup process during typecasting of bytes and integers
2022-01-28 19:56:15 +05:30
Marenz
a550048cf0 Fix too strict assert for calldata string -> bytes conversions 2022-01-20 15:11:26 +01:00
nishant-sachdeva
27d0480e96 Adding Stack Height Checker and modifying the number of POP instructions to appropriately provide the pointer address 2022-01-20 01:15:08 +05:30
Daniel Kirchner
92c262d116
Merge pull request #12553 from ethereum/ir-ice-12546
Fix .push() not considering external functions
2022-01-19 13:41:20 +01:00
nishant-sachdeva
a0d6c11860 Equality operator allowed for external function types 2022-01-19 15:20:31 +05:30
Marenz
89d6bff72a Fix .push() not considering external functions 2022-01-18 16:30:31 +01:00
hrkrshnn
85d1a57e65 Added more tests. Updated chromosome. Remove unused headers. 2022-01-04 13:27:39 +05:30
chriseth
e7fc2a176a Test updates. 2022-01-03 15:52:05 +01:00
chriseth
4c838d9cf5 abi.encodeCall for declarations. 2021-12-29 12:26:04 +01:00
chriseth
1594518cfc
Merge pull request #12417 from nishant-sachdeva/invalid_ir_generated_during_copy_of_dynamically_sized_storage_arrays_of_function_type
Added sameType check for fromType and toType in YulUtilFunctions.cpp and relevant tests in semanticTests
2021-12-16 18:33:54 +01:00
chriseth
835efea427
Merge pull request #12287 from ethereum/abi.encodeCall
Implement typechecked abi.encodeCall()
2021-12-16 18:24:33 +01:00
Marenz
7a96953e78 Implement typechecked abi.encodeCall() 2021-12-16 17:35:58 +01:00
nishant-sachdeva
7cc7a0f183 Added sameType check for fromType and toType in YulUtilFunctions.cpp and relevant tests in semanticTests 2021-12-16 21:51:09 +05:30
nishant-sachdeva
19a74506e3 trial test cases extracted from SoliidityEndToEndTest.cpp into .sol files.
removed libevmone.so files from the directory

trial test cases extracted from SoliidityEndToEndTest.cpp into .sol files. Corresponding code in the .cpp file has been commented instead of begin removed pending preliminary reviews

removed libevmone files

Added testcase packed_storage_structs_delete

added test case invalid_enum_logged

added test case enum_referencing

added test case memory_types_initialisation

added test case return string

added test case constant_string_literal.sol

removed extractable keyword from solidityEndtoEnd.cpp, moved copying_bytes_multiassigned.sol to array/copying folder, added recv() function to copying_bytes_multiassigned.sol but this test case is failing now

change typo error in the name of test case library_staticcall_delegatecal.sol to library_staticcall_delegatecall.sol

Added compileToEwasm:false to call_forward_bytes.sol test case and moved it to semanticTests/fallback

added compileToEwasm:false line to library_call_in_homestead

added compileToEwasm: false line to copying_bytes_multiassign, copy_from_calldata_removes_bytes, enum_referencing, library_call_in_homestead, struct_referencing

Added test case internal_types_in_library

Added test case mapping_arguments_in_library

Added test case mapping_returns_in_library

Added test case mapping_returns_in_library_named

Added test case using_library_mappings_public

Added test case library_function_external

Added test case library_stray_values

added test case using_library_mappings_return

added test case using_library_structs

Added test case using_for_function_on_struct and corrections to using_library_structs, using_library_mpapings_return, library_stray_values

Added test case using_for_overload

added test case using_for_by_name

added test case bound_function_in_function

added test case bound_function_in_var

added test case bound_function_to_string

added test case payable_function_calls_library

added function call corrections to copying_bytes_multiassign and call_forward_bytes

Made changes to the test cases as per comments on PR #12289

mentioned in Changelog.md : Extraced some test cases from SolEndToEnd.cpp
2021-12-16 16:56:38 +05:30
nishant-sachdeva
9b55d4788e Added sameType check for fromType and toType in YulUtilFunctions.cpp and relevant tests in semanticTests 2021-12-15 23:50:25 +05:30
nishant-sachdeva
49d9f334aa Extracted some test cases from SolidityEndToEnd.cpp 2021-11-29 21:27:43 +05:30
chriseth
defc74c8a2
Merge pull request #12282 from ethereum/fix-gas-test-enforcement
Fix gas cost enforcement for constructors and make `--enforce-gas-cost-min-value` actually work
2021-11-22 12:39:07 +01:00
Kamil Śliwak
90fdea95e7 TestFunctionCall::formatRawParameters(): Ensure that uint8_t overload of toHex() is called
- Wrong overload results in isoltest padding each char to 32 bytes
2021-11-15 20:52:25 +01:00
Kamil Śliwak
27dc77be5d Fix typo in test name: ihneritance -> inheritance 2021-11-15 16:32:45 +01:00
Kamil Śliwak
032f2d8f9f Update gas expectations 2021-11-15 16:32:45 +01:00
chriseth
080c7245ae Update tests. 2021-11-08 14:59:00 +01:00
chriseth
31c504c5ba Add test for extcodesize check. 2021-11-08 14:58:09 +01:00
chriseth
a1aa9d2d90 Skip extcodesize check if return data is expected. 2021-11-08 14:58:09 +01:00
Daniel Kirchner
1a0605c594 Update tests. 2021-11-03 12:39:55 +01:00
chriseth
5eb97fa6ee
Merge pull request #12219 from ethereum/precompile-extcodesize-check-test
Semantic test for high level call to precompiles.
2021-11-01 15:08:52 +01:00
hrkrshnn
7683442ce2 Semantic test for high level call to precompiles.
Because of the extcodesize check, the high level call will fail. Even though the low level call can
succeed and return data.
2021-11-01 14:22:48 +01:00
chriseth
8e208f23cb Fix assignment of return variables from modifiers. 2021-11-01 14:14:50 +01:00
Kamil Śliwak
464ac18a1f Rename negation_bug.yul to negation_bug.sol 2021-10-29 00:19:43 +02:00
chriseth
e6e30f82ca
Merge pull request #12139 from ethereum/nonamedlabelsifnotunique
Do not use named function labels if function names are not unique.
2021-10-25 17:50:29 +02:00
soroosh-sdi
816d8021e4 Remove linking to unqualified library name
- SemanticTests accepts fully qualified library name and also unqualifed library name when
the library is defined in the same file for convenience.
- commandline tests are added!

Signed-off-by: soroosh-sdi <soroosh.sardari@gmail.com>
2021-10-20 18:11:58 +03:30