Commit Graph

1319 Commits

Author SHA1 Message Date
Matheus Aguiar
2282ea5e56 Added overflow checks after multiplication operation is executed. 2022-08-12 10:18:05 -03:00
Marenz
22c7cd22b9 Fix wrong cleanup when copying from calldata to memory
Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
2022-08-08 13:07:16 +02:00
Ishtiaque Zahid
3e70a406af fixed wrong tab alignment in YulUtilFunctions.h 2022-08-03 12:33:11 +06:00
Matheus Aguiar
4fd5c11af7 Checks for overflow/underflow after add/sub operations. 2022-06-23 14:41:12 -03:00
Daniel Kirchner
4c84b77a4b Review suggested renaming. 2022-06-16 15:05:21 +02:00
Daniel Kirchner
cdf243a9af Improved array copy routine for value type arrays from memory or calldata to storage. 2022-06-16 15:05:21 +02:00
Daniel Kirchner
7a84e9c875 Bugfix. 2022-06-14 18:26:16 +02:00
Saw-mon-and-Natalie
a265d9968a
removed a duplicate word from a comment. 2022-06-13 17:38:43 -07:00
chriseth
51ef6a62da Fix removal of memory stores in inline assembly blocks. 2022-06-10 17:32:28 +02:00
chriseth
f0e43921f7
Merge pull request #12921 from ethereum/add_event_and_error_selector_fields_on_the_line_of_function_selector_field
Adding event and error selector fields
2022-05-23 11:34:13 +02:00
chriseth
30335c13ff
Merge pull request #13001 from matheusaaguiar/develop
Don't add an empty data slot to ABI-encoded empty strings from storage
2022-05-23 10:56:30 +02:00
nishant-sachdeva
d4c06d2b4e Adding event and error selector fields on the lines of the function selector fields 2022-05-23 10:49:16 +02:00
Daniel Kirchner
953bc9fed2
Merge pull request #12983 from ethereum/hint-via-ir
Recommend `via-ir` whenever a stack too deep error is encountered.
2022-05-20 12:26:25 +02:00
Matheus Aguiar
33ea6a679d Fixed bug that added a superfluous empty slot for data when encoding an empty string coming from storage.
Added tests covering empty string, uninitialized string, emptry string literal, byte arrays and explicit call to `abi.encode`.
2022-05-18 14:50:26 -03:00
Daniel Kirchner
d3a837b340 Bugfix. 2022-05-11 18:17:47 +02:00
hrkrshnn
5ae17c8e65 Recommend via-ir whenever a stack too deep error is encountered. 2022-05-05 19:22:03 +02:00
Joshua Quinones
e1a59397c6 Renamed AssemblyStack to YulStack
All files, references, variables, comments, etc. were renamed to YulStack.
2022-04-08 20:28:55 +02:00
Daniel Kirchner
8cb01a9953 Fix and updated test. 2022-03-15 10:23:09 +01:00
Daniel Kirchner
e58c0b561d Mark viaIR code generation as non-experimental. 2022-03-14 14:48:00 +01:00
Tyler
047034544e Merge branch 'develop' of github.com:tfire/solidity into fix/remove-namespace-ast-annotations 2022-03-09 18:55:22 -05:00
Daniel Kirchner
e0c837b33b Remove isCreation flag from OptimiserSettings. 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
Tyler
519e1c9402 Specify namespaces
Fix references into solidity::util
2022-03-08 00:09:17 -05:00
chriseth
77c40cd2af
Merge pull request #12740 from ethereum/remove-locale-dependent-operations
Replace all locale-dependent operations with locale-agnostic counterparts
2022-03-07 17:56:58 +01:00
wechman
52dfccca98 Replace all locale-dependent operations with locale-agnostic counterparts 2022-03-07 17:23:08 +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
nishant-sachdeva
beabc51c20 returnSize assigned according to truth value of returnInfo.dynamicReturnSize 2022-03-03 18:55:10 +05:30
Daniel Kirchner
9bcfcc61a7 Inline assembly without memory effects is implicitly memory safe. 2022-03-02 16:42:28 +01:00
Daniel Kirchner
e6848caac1 Allow annotating inline assembly as memory-safe. 2022-03-02 16:42:28 +01:00
chriseth
106921c278 Extract external function part into its own function. 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
nishant-sachdeva
cc6344c03c Changed instaces of isByteArrayOrString() to isByteArray() where it's only supposed to return a True for Bytes Type 2022-02-02 17:05:26 +05:30
nishant-sachdeva
9043621747 Changed occurences of isByteArray() to isByteArrayOrString(). The idea
is to, in a future commit, replace such occurences of
isByteArrayOrString() which are required to return True only for Bytes
type with a new isByteArray() function.
2022-02-02 14:19:58 +05:30
nishant-sachdeva
e2711b7fab 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-02-01 16:07:55 +05:30
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
6f4709d383 Remove empty assert messages 2022-01-20 15:11:26 +01:00
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
chriseth
e3bb5ab7b2
Merge pull request #12431 from ethereum/fixFun2
Safer constructors for FunctionType
2022-01-04 18:18:21 +01:00
chriseth
4c838d9cf5 abi.encodeCall for declarations. 2021-12-29 12:26:04 +01:00
chriseth
7620bfaad8 Add option member for function type. 2021-12-23 12:05:18 +01:00
Marenz
7a96953e78 Implement typechecked abi.encodeCall() 2021-12-16 17:35:58 +01:00
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
chriseth
a1aa9d2d90 Skip extcodesize check if return data is expected. 2021-11-08 14:58:09 +01:00
Daniel Kirchner
4229369180 Compatibility with StackCompressor and StackLimitEvader. 2021-11-03 12:39:55 +01:00
chriseth
8e208f23cb Fix assignment of return variables from modifiers. 2021-11-01 14:14:50 +01:00