Commit Graph

20056 Commits

Author SHA1 Message Date
chriseth
2969bc0f3e
Merge pull request #11302 from ethereum/drop-u160
Drop the util::u160 type
2021-04-26 15:12:20 +02:00
chriseth
d4ea84511f
Merge pull request #11304 from ethereum/fix_test_builtins
Fix test builtins & add simple smoke test.
2021-04-26 15:12:00 +02:00
Alexander Arlt
8239eaa1b8 Fix test builtins & add simple smoke test. 2021-04-26 07:51:43 -05:00
chriseth
dce3006723
Merge pull request #11314 from ethereum/patch-1
[DOCS] Removed an overflow check and rely on checked arithmetic
2021-04-26 14:39:17 +02:00
chriseth
ddc030267e
Merge pull request #11315 from ethereum/minor-cf
ControlFlowAnalyzer: Use temporary reference for more readable code
2021-04-26 14:21:49 +02:00
chriseth
d9df3d50e2
Merge pull request #11311 from anurag-git/issue_10738-3
Use range-v3 loops(remove_erase, remove_erase_if)
2021-04-26 14:18:15 +02:00
Mathias Baumann
5f313ee52a ControlFlowAnalyzer: Use temporary reference for more readable code 2021-04-26 13:24:17 +02:00
chriseth
659da4bdc7
Merge pull request #11047 from ethereum/bytesToBytesNNConversion
Bytes to bytesNN conversion
2021-04-26 11:51:41 +02:00
Wade Dorrell
9e0c52f621 Removed an overflow check and rely on checked arithmetic
The check `require(amount < 1e60);` was removed because it's rather confusing to reason why it
prevents overflow.

Co-authored-by: Wade Dorrell <wade@dorrells.org>
2021-04-26 09:43:16 +02:00
Harikrishnan Mulackal
83bb860e4b
Merge pull request #11313 from ethereum/fix_pylint
Fix problems detected by pylint 2.8.1.
2021-04-26 09:32:48 +02:00
Harikrishnan Mulackal
2cb525f607
Merge pull request #11306 from ethereum/toevminstruction
Add toEVMInstruction helper
2021-04-26 08:41:25 +02:00
Alexander Arlt
4e7dc24383 Fix problems detected by pylint 2.8.1. 2021-04-25 23:33:14 -05:00
anurag4u80
c4cf412fed Replaced boost remove_erase and remove_erase_if 2021-04-24 08:10:41 +05:30
Alex Beregszaszi
eed0bf580b
Merge pull request #11308 from ethereum/error-cleanup
Remove obsolete Error constructor
2021-04-24 01:57:21 +01:00
Alex Beregszaszi
60189b4f61 Remove obsolete Error constructor 2021-04-23 23:55:22 +01:00
Alex Beregszaszi
d508544340 Add toEVMInstruction helper
Co-authored-by: Harikrishnan Mulackal <webmail.hari@gmail.com>
2021-04-23 22:56:50 +01:00
Kamil Śliwak
173a511809
Merge pull request #11303 from ethereum/noncopyable
Remove the usage of boost::noncopyable
2021-04-23 22:38:49 +02:00
Kamil Śliwak
9439ff8b02
Merge pull request #11301 from ra-phael/docs-clarify-init-value
[Docs] Clarify initialisation value of state variables
2021-04-23 22:37:59 +02:00
Alex Beregszaszi
1db3278f6a
Merge pull request #11305 from ethereum/ewasm-semantic-tests
Enable more semantic tests for Ewasm
2021-04-23 20:25:57 +01:00
Alex Beregszaszi
f952f851b7 Enable more semantic tests for Ewasm 2021-04-23 17:00:01 +01:00
Alex Beregszaszi
55577cbfc3
Merge pull request #10406 from ethereum/ewasm-polyfill-callvalue-gasprice-difficulty
[ewasm] Polyfill: callvalue, gasprice & difficulty.
2021-04-23 16:36:19 +01:00
Alex Beregszaszi
73b804aff4 Update tests 2021-04-23 15:54:10 +01:00
Alexander Arlt
fc7fb3cb7d [ewasm] Polyfill: callvalue, gasprice & difficulty. 2021-04-23 15:54:10 +01:00
Alex Beregszaszi
e39433198d Remove the usage of boost::noncopyable
Prior to this half of the codebase used explicit deleted copy constructors, the others used boost::noncopyable.
2021-04-23 14:57:01 +01:00
Alex Beregszaszi
ac192ff4c1 Drop the util::u160 type 2021-04-23 14:35:06 +01:00
Alex Beregszaszi
37be1b3ed9 Remove dependency on util::160 in yulInterpreter
Instead apply explicit truncation or masking for readability.
2021-04-23 14:35:05 +01:00
Raphael Roullet
dda4b5d9d7 clarify init value by replacing zero with default value 2021-04-23 13:45:22 +02:00
Djordje Mijovic
337adee395 Documenting bytes to fixed bytes conversion.
Co-authored-by: chriseth <chris@ethereum.org>

Co-authored-by: Alex Beregszaszi <alex@rtfs.hu>
2021-04-23 13:30:19 +02:00
Djordje Mijovic
eb457064b1 Adding semantic tests for bytes to bytesNN conversion. 2021-04-23 13:30:19 +02:00
Djordje Mijovic
cbb7e53b22 Activating bytes to bytesNN for legacy codegen by calling yul util function. 2021-04-23 13:30:19 +02:00
Djordje Mijovic
52538558b1 [Sol->Yul] Implementing bytes to bytesNN for IR codegen.
Co-authored-by: Alex Beregszaszi <alex@rtfs.hu>
2021-04-23 13:30:15 +02:00
Djordje Mijovic
ece42c07df Adding syntax test for bytes to bytesNN conversion. 2021-04-23 13:19:19 +02:00
Djordje Mijovic
b40c3bcc32 Allowing conversion from bytes to bytesNN in type checker. 2021-04-23 13:19:19 +02:00
Leonardo
15decd2413
Merge pull request #11298 from ethereum/docs-no-external-constructors
[Docs] 0.7.0 breaking changes: There were no external constructors
2021-04-23 10:42:04 +02:00
Kamil Śliwak
f479aceb4c 0.7.0 breaking changes: There were no external constructors 2021-04-22 21:57:20 +02:00
Harikrishnan Mulackal
f162c484ca
Merge pull request #11026 from ethereum/resolve-keccak
Evaluate ``keccak256(a, const)``, when the value at memory location ``a`` is known at compile time and ``const <= 32``
2021-04-22 19:18:19 +02:00
hrkrshnn
b599235b8d Skip resolving Keccak if AST contains msize.
Also a refactoring changing `m_optimizeMLoad` to `m_containsMSize`.
2021-04-22 18:19:47 +02:00
hrkrshnn
3d29ae73e7 Isoltest: updated the gas tests. 2021-04-22 18:19:47 +02:00
hrkrshnn
b636ef881e Added command line tests for keccak optimization with low runs
The value of keccak256(0, 32) should not be replaced by the big constant
2021-04-22 18:19:47 +02:00
hrkrshnn
221292c278 Tests and changelog 2021-04-22 18:19:47 +02:00
hrkrshnn
3bc4f5708a Evaluate keccak(a, const) if value at memory location a is known
Here the value of constant can be at most 32.
2021-04-22 18:19:47 +02:00
hrkrshnn
011f8d3ff7 Changed the type of gas calculation to bigint instead of size_t
Since the gas calculation can involve multiplication by ``--optimize-runs``, it is possible that
`size_t` is not enough to represent the total gas.
2021-04-22 18:19:47 +02:00
Harikrishnan Mulackal
ecf9a44dac
Merge pull request #11212 from ethereum/docs-asm
[DOCS] Added documentation about --asm flag
2021-04-22 18:11:24 +02:00
chriseth
277e6005e1
Merge pull request #11296 from ethereum/returnVariableZeroReplacementAddendum
Add test.
2021-04-22 17:53:02 +02:00
hrkrshnn
94f9410abe Added hashFunction to Dialect. For EVMDialect, it is keccak256
In a later PR, the functions `storageLoadFunction`, `storageStoreFunctions`, etc will be refactored
to return a YulString instead of a pointer to a BuiltinFunction.
2021-04-22 17:27:57 +02:00
hrkrshnn
dd6300a53e GasMeter can now account for gas of Keccak-256 2021-04-22 17:27:57 +02:00
hrkrshnn
1f5b874eaf Optimizer context has parameter expectedExecutionsPerDeployment 2021-04-22 17:27:57 +02:00
chriseth
a6a3af58a0 Add test. 2021-04-22 17:23:56 +02:00
chriseth
074f22f22c
Merge pull request #11246 from ethereum/returnVariableZeroReplacement
Do not replace zeros by return variable.
2021-04-22 17:16:16 +02:00
chriseth
ec4558a245 Update gas costs. 2021-04-22 16:54:02 +02:00