hrkrshnn
d176716d47
Added extra commands that needs to be run before brew update
...
Fixes the following issue:
Error:
homebrew-core is a shallow clone.
homebrew-cask is a shallow clone.
To `brew update`, first run:
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask fetch --unshallow
These commands may take a few minutes to run due to the large size of the repositories.
This restriction has been made on GitHub's request because updating shallow
clones is an extremely expensive operation due to the tree layout and traffic of
Homebrew/homebrew-core and Homebrew/homebrew-cask. We don't do this for you
automatically to avoid repeatedly performing an expensive unshallow operation in
CI systems (which should instead be fixed to not use shallow clones). Sorry for
the inconvenience!
2021-06-17 10:34:57 +02:00
hrkrshnn
eb04dfcd3e
Updated expectation of FixedFeeRegistrar.sol
2021-06-17 10:09:47 +02:00
Harikrishnan Mulackal
215bbe2e6d
Merge pull request #11498 from ethereum/script_gas_test
...
A script to summarize gas differences from isoltest for PRs.
2021-06-08 13:07:42 +02:00
hrkrshnn
a4fd7c56a4
A script to summarize gas differences from isoltest for PRs.
2021-06-08 11:38:58 +02:00
Harikrishnan Mulackal
424edcc562
Merge pull request #11475 from ethereum/receive-override
...
Fix ICE related to receive function having parameters.
2021-06-03 14:10:23 +02:00
hrkrshnn
c3eef8af91
Fix ICE related to receive function having parameters.
2021-06-03 13:08:57 +02:00
hrkrshnn
2309ae3edd
Added tests for internal or recursive types as event / error param
...
After converting the error about mapping parameter in event / error into a fatal type error, we were
missing tests that reached the "internal or recursive types" error.
2021-06-03 11:02:27 +02:00
hrkrshnn
cc915f023e
Errors about nested mapping in event parameter are fatal.
...
(Also applies for error parameters.)
2021-06-03 11:02:27 +02:00
Harikrishnan Mulackal
8ecf79474b
Merge pull request #11458 from ethereum/event_indexed_mixed
...
Add test with event where indexed parameters are not the first.
2021-05-31 16:19:52 +02:00
hrkrshnn
138873d918
Fix ICE related to mapping types in abstract contract constructor
2021-05-31 14:56:49 +02:00
hrkrshnn
f582d48f7b
Error message: try-catch parameter cannot be in storage.
2021-05-31 11:25:08 +02:00
Harikrishnan Mulackal
9cffaddadc
Merge pull request #11448 from ethereum/docs-staticcall-value
...
[DOCS] Clarification about value option for staticcall.
2021-05-27 17:52:21 +02:00
hrkrshnn
b8d5d5744e
Clarification about value option for staticcall.
2021-05-27 11:21:15 +02:00
hrkrshnn
dc15e31605
Increased the tolerance for two GasMeter tests.
2021-05-26 12:23:06 +02:00
hrkrshnn
97c9d21376
Force two tests to go out of gas.
2021-05-26 12:23:06 +02:00
hrkrshnn
4d6c951396
Isoltest gas update after Berlin gas cost changes
2021-05-26 12:23:06 +02:00
hrkrshnn
180e00f56d
Updated tests after changing EVM version to Berlin
2021-05-26 12:23:06 +02:00
hrkrshnn
d5564a0304
Set default EVM version to Berlin
2021-05-26 12:23:06 +02:00
hrkrshnn
7d28ea3746
Updated gas costs for Berlin
2021-05-26 11:36:43 +02:00
hrkrshnn
d80a92752a
Added a gas test for storage costs
2021-05-25 12:42:32 +02:00
hrkrshnn
1839d195be
Clears EIP-2929 account and storage access indicator on new blocks.
...
For semantic tests each test (in the same test file) happens on a new block, however the storage and
account access indicators were not reset.
2021-05-25 12:32:59 +02:00
Harikrishnan Mulackal
4d23c301c5
Merge pull request #11428 from Lisanaaa/patch-1
...
array type is not callable
2021-05-25 12:26:45 +02:00
Harikrishnan Mulackal
d07c85db67
Merge pull request #11360 from maurelian/patch-2
...
Some improvements to optimizer documentation
2021-05-19 13:24:05 +02:00
Harikrishnan Mulackal
21af5408d9
Merge pull request #11397 from ethereum/v1-test-cleanup
...
Cleanup ABICoder V1 tests
2021-05-17 16:20:22 +02:00
Harikrishnan Mulackal
72b071c3c3
Merge pull request #11400 from blishko/smt-struct-constructor-fix
...
SMTChecker: Fix struct constructor where fixed-bytes member is initialized with a string literal
2021-05-17 14:32:17 +02:00
Harikrishnan Mulackal
1d41ceaed4
Merge pull request #11402 from ethereum/gcc11
...
Fix compilation errors with GCC 11
2021-05-17 13:27:54 +02:00
Harikrishnan Mulackal
55506418bc
Merge pull request #11394 from fulldecent/patch-21
...
Allow NatSpec to apply to Libraries just as Contracts
2021-05-17 12:30:45 +02:00
Harikrishnan Mulackal
85552b58d8
Merge pull request #11392 from ethereum/evmc-transfer
...
EVMHost: Fix selfdestruct with non-zero value at beneficiary and value-transfers with insufficient funds
2021-05-17 12:27:41 +02:00
Harikrishnan Mulackal
e76a8cbc31
Merge pull request #11395 from ethereum/prbmath
...
Fix prbmath.exp tests
2021-05-17 11:28:15 +02:00
Harikrishnan Mulackal
299dae4d1a
Merge pull request #11376 from fulldecent/patch-19
...
Specify how blockhash will act for invalid inputs, fixes #11364
2021-05-11 10:11:52 +02:00
hrkrshnn
39b23420ec
Extracted the class SMT Solver from ReasoningBasedSimplifier
2021-05-06 11:26:26 +02:00
Harikrishnan Mulackal
6820735a20
Merge pull request #11338 from ethereum/yulhexvalue
...
Properly treat utf8-non-encodable yul literals.
2021-05-05 11:07:28 +02:00
hrkrshnn
8b4eaeabbf
Added a few optimizer tests for Verbatim
2021-04-28 09:56:45 +02:00
Harikrishnan Mulackal
a942e630d4
Merge pull request #11320 from irnb/develop
...
change variable declaration place
2021-04-27 13:56:11 +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
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
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
hrkrshnn
7882a2a89d
Added documentation about --asm flag
2021-04-22 11:05:44 +02:00
Harikrishnan Mulackal
1eff128b6d
Merge pull request #11287 from ethereum/isoltest-minor
...
Small refactorings for isoltest
2021-04-22 10:11:50 +02:00
hrkrshnn
382c488edd
Fix missing error when events are used without an emit statement.
...
Whenever there was a proper invocation of events, the compiler assumed that all the subsequent
invocations were proper.
2021-04-12 10:23:05 +02:00
hrkrshnn
d9c57dd1fb
Added index for safemath in docs
2021-04-08 17:39:04 +02:00
hrkrshnn
e96a161115
Tests and changelog
2021-04-08 17:06:24 +02:00
hrkrshnn
b7795b86c1
Allow notice tag for non-public state variable.
...
This won't be part of NatSpec JSON, but will show up under documentation node in AST.
2021-04-08 17:06:14 +02:00
hrkrshnn
39e3da1905
Allow NatSpec documentation for local variable declarations
...
This won't be part of NatSpec JSON, but in AST, under the field documentation.
2021-04-08 17:06:14 +02:00
Harikrishnan Mulackal
c060bd5633
Merge pull request #11211 from ethereum/someTests
...
Add some bytecode reference tests.
2021-04-08 09:29:51 +02:00
Harikrishnan Mulackal
717a1c9905
Update docs/080-breaking-changes.rst
2021-04-06 11:48:04 +02:00
Harikrishnan Mulackal
b605211d53
Merge pull request #11170 from ethereum/natspec-doc
...
Move improvements to the NatSpec documentation
2021-03-31 13:18:55 +02:00
Harikrishnan Mulackal
24536f7f8e
Merge pull request #11186 from ethereum/docs_readme
...
Docs: Update Readme "contact us" sentence and add social badges
2021-03-30 13:12:02 +02:00
hrkrshnn
0100f48e05
FunctionSpecializer: skip specializing recursive functions
...
This avoids potential pathological behaviour, like in Ackermann function.
2021-03-29 11:02:31 +02:00
hrkrshnn
bd5e47dc55
Changelog and adding the name to the doc
2021-03-29 11:02:31 +02:00
hrkrshnn
2c75d1dfe4
Isoltest gas update for FunctionSpecializer
2021-03-29 11:02:31 +02:00
hrkrshnn
09998ceb0c
Tests for FunctionSpecializer
2021-03-29 11:02:18 +02:00
hrkrshnn
45a3747701
Added FunctionSpecializer to the optimization suite
2021-03-29 11:02:18 +02:00
hrkrshnn
22ebdc7438
Implemented FunctionSpecializer
...
Optimiser step that specializes the function with its literal arguments.
2021-03-29 11:02:18 +02:00
hrkrshnn
8564d08228
Added a helper class FunctionCopier in ASTCopier
...
Helper class that creates a copy of the function definition, replacing the names of the variable
declaration with a new name.
2021-03-29 11:02:18 +02:00
hrkrshnn
b42fc2015c
NameCollecter can now only collect VariableDeclarations
...
This is done to help with the optimizer step FunctionSpecializer
2021-03-25 11:49:16 +01:00
hrkrshnn
4fbf5a3f12
Added few more tests for low level inliner.
2021-03-24 13:50:24 +01:00
hrkrshnn
30e08ee3a5
Changelog and test for the KeccakCaching bug
2021-03-23 11:09:00 +01:00
hrkrshnn
2ecb20589b
Fix bug about incorrect caching on Keccak256 hashes
2021-03-23 10:49:24 +01:00
hrkrshnn
6d9e9e1b1e
Fix small bug in GasMeter calculation in creation context
...
Old calculation did not ignore `optimize-runs` parameter, when creation code gas computations were
done. This would lead to expanding values such as `shl(180, 1)` inside constructor code, even for
the default value for `--optimize-runs`, i.e., 200.
2021-03-17 12:33:10 +01:00
Harikrishnan Mulackal
35da404ca9
Merge pull request #11091 from ethereum/modifierInvocationAST
...
Add "kind" field to ModifierInvocation AST json element.
2021-03-16 19:44:40 +01:00
Harikrishnan Mulackal
0e22d0bd40
Merge pull request #11079 from ethereum/fix-visibility-warning
...
AST import: constructors have default visibility
2021-03-11 12:23:46 +01:00
hrkrshnn
ef0c4cc39f
AST Import: For constructors, a public visibility is ignored.
2021-03-11 10:44:19 +01:00
hrkrshnn
2c2c7a4473
Fix IR bug on deleting storage variables of function type.
...
Calling the zeroing function assumed that the stack slots needed for the type was always 1. This is
false for function types.
2021-02-24 12:43:33 +01:00
Harikrishnan Mulackal
58e0977647
Merge pull request #10994 from ethereum/remove-remains-of-ast-json-option
...
Remove the last remains of --ast-json option
2021-02-24 10:21:30 +01:00
hrkrshnn
66d6d20f65
Converted hash collision error into a fatal type error.
...
The check is performed during ContractLevelChecker. However, the TypeChecker throws in certain cases
when it encounters functions, whose hashes collide.
2021-02-23 17:09:40 +01:00
Harikrishnan Mulackal
148e1150f2
Merge pull request #10992 from ethereum/detectAssignToFunction
...
Detect assignment to function in inline assembly.
2021-02-23 13:26:45 +01:00
Harikrishnan Mulackal
6fd5ea01d1
Merge pull request #10971 from ethereum/onlyWarnAboutVariables
...
Only warn about variables being shadowed in inline assembly.
2021-02-19 16:17:02 +01:00
hrkrshnn
f336a68009
Added syntax tests for constructors with function parameter
2021-02-17 17:12:02 +01:00
hrkrshnn
2608c56d32
Make an assert less strict
...
Even though one can convert from, say, a pure function to a function without a state mutability
specified, in ABIFunctions.cpp, there was an assert that checked if the types were exactly equal.
This assert had to be loosened up.
2021-02-17 17:12:02 +01:00
hrkrshnn
e24a23edcd
Semantic test where constructor has a function as parameter
2021-02-15 14:16:28 +01:00
hrkrshnn
0135cae222
Fix IR bug: constructor parameter that needs multiple stack slots
...
When an argument had multiple stack slots, like `function() external`, there wasn't enough variables
assigned for the constructor. This lead to some mismatch between return values and arguments between
some functions.
2021-02-12 17:42:02 +01:00
hrkrshnn
a76ff8af1d
Added tests for modifiers whose input is a function return value
2021-02-11 16:48:00 +01:00
hrkrshnn
7786e6d561
Fix IR bug when modifier parameter was function return variable
...
The bug was that function return variables were not part of the m_context.localVariable during
the modifier generation and a looking up them was throwing.
2021-02-11 14:44:55 +01:00
Harikrishnan Mulackal
215233d5c8
Merge pull request #10945 from ethereum/constructor-modifier-bugfix
...
Fix IR bug about calling the wrong modifier during construction
2021-02-10 21:42:45 +01:00
hrkrshnn
2f30fdaa21
Fix IR bug about calling the wrong modifier during construction
2021-02-10 20:53:11 +01:00
Harikrishnan Mulackal
43319574e7
Merge pull request #10925 from ethereum/fixedPointAssertionSol2Yul
...
[Sol->Yul] Adding unimplemented assert for fixed point types on righ shift
2021-02-09 17:27:19 +01:00
hrkrshnn
8167029dc1
Updating tests after improving Yul error reporting
2021-02-09 16:55:33 +01:00
hrkrshnn
5a21e33743
Improve error reporting for Yul parser errors
...
This makes debugging Sol2Yul codegen bugs slightly easier.
2021-02-09 15:40:25 +01:00
Harikrishnan Mulackal
9e58a568a9
Fixed links in Docs
2021-02-08 14:30:09 +01:00
Harikrishnan Mulackal
47d5939dbd
Improved wording in documentation
2021-02-08 14:21:37 +01:00
Harikrishnan Mulackal and Alex Beregszaszi
9a5a4dfc6c
Added a note about 63/64 rule
...
Co-authored-by: Alex Beregszaszi <alex@rtfs.hu >
2021-02-08 14:19:13 +01:00
hrkrshnn
133bc72970
Tests and changelog for <address>.code.length shortcut
2021-01-26 11:08:39 +01:00
hrkrshnn
526ceec152
Implement IR shortcut for <address>.code.length
2021-01-26 11:07:04 +01:00
hrkrshnn
d6d880dc53
Old codegen: implemented shortcut for <address>.code.length
2021-01-26 11:07:04 +01:00
hrkrshnn
ec57c791ef
Fix infinite loop when accessing circular constants from inline assembly.
2021-01-26 09:22:05 +01:00
Harikrishnan Mulackal
bad8d23802
Merge pull request #10830 from az1az1/develop
...
Update value-types.rst
2021-01-21 12:41:46 +01:00
hrkrshnn
e107d51f46
Disallow certain implicit conversions between integer types.
...
Disallow implicit conversion from ``uintN`` and ``intM`` when ``M > N``, and by extension, explicit
conversion between the same types are also disallowed.
2021-01-12 08:23:47 +01:00
Harikrishnan Mulackal
5241b7b761
Merge pull request #10684 from ethereum/fixIRWrappingExp
...
Use wrapping arithmetic for exp in unchecked blocks.
2021-01-06 18:53:54 +01:00
Harikrishnan Mulackal
591f04e41c
Merge pull request #10718 from ethereum/gitignoreClion
...
Extend .gitignore to all CLion build directories and allow "build" to be a symlink.
2021-01-06 12:45:30 +01:00