chriseth
87237281bf
Merge pull request #5630 from ethereum/warn_functions_empty_body
...
Supress unused var and state mut warnings for functions with empty body
2018-12-12 17:00:50 +01:00
Alex Beregszaszi
c863cbf80d
Add missing header guards
2018-12-12 15:47:05 +00:00
Leonardo Alt
508aae8a67
Disable state mutability warning for functions with empty body
2018-12-12 14:43:44 +01:00
Leonardo Alt
53537864a2
Disable unused var warning for functions with empty body
2018-12-12 14:43:44 +01:00
Daniel Kirchner
788612d2ef
Refactoring of the ControlFlowGraph and use for detecting all uninitialized storage accesses.
2018-12-12 04:20:53 +01:00
chriseth
fb3a0ac1c7
Codegen for object access.
2018-12-11 19:24:44 +01:00
chriseth
8d49e53995
Provide Dialect to EVMCodeTransform.
2018-12-11 19:24:31 +01:00
chriseth
9f86ede32d
Merge pull request #5454 from ethereum/smt_math_functions
...
[SMTChecker] Abstract math functions
2018-12-11 18:35:10 +01:00
chriseth
b5deca0383
Merge pull request #4779 from ethereum/optimise-string-literals
...
Decide better in storing string literals as data
2018-12-11 17:50:14 +01:00
Leonardo Alt
08737e43dc
[SMTChecker] Use SymbolicFunctionVariable for uninterpreted functions
2018-12-11 11:28:25 +01:00
chriseth
baaefb4b42
Merge pull request #5619 from ethereum/cleanup-abc
...
Some code cleanup
2018-12-10 19:22:02 +01:00
Mathias Baumann
2f6dc2e773
Replace push_back with emplace_back where it makes sense
2018-12-10 19:02:39 +01:00
Yi Huang
81f703427e
Add tests for implcit conversions from literals to fixed-point numbers.
2018-12-10 17:31:20 +01:00
chriseth
53f531ecb0
Set codecopy limit for data to 32 bytes.
2018-12-10 17:11:48 +01:00
chriseth
871ea22bb9
Merge pull request #5008 from liangdzou/yul_stack_reuse
...
Reuse stack slots in Yul codegen
2018-12-10 16:14:33 +01:00
liangdzou
362648a450
Reuse stack slots in Yul to EVM code generation.
2018-12-10 14:28:56 +01:00
Leonardo Alt
de46bb2c42
[SMTChecker] Introduce SymbolicFunctionVariable
2018-12-10 11:34:29 +01:00
Erik Kundt
e2395a3dcf
Adds more detailed type errors and tests.
2018-12-07 12:35:35 +01:00
Erik Kundt
b2afb8cdda
Adds an additional message to failing type conversions.
2018-12-07 11:55:53 +01:00
chriseth
6a9e8a6fe3
Merge pull request #4936 from ethereum/binSelect
...
Binary search for dispatch.
2018-12-07 00:55:09 +01:00
chriseth
4b2a64306a
Merge pull request #5587 from ethereum/yulCodeBuiltins
...
Builtin functions to access Yul objects.
2018-12-06 16:49:52 +01:00
chriseth
3fc118ba21
Analyze and compile sub-objects.
2018-12-06 14:32:04 +01:00
chriseth
f6ed29b88b
Extend abstract assembly to be able to handle sub-objects.
2018-12-06 14:32:04 +01:00
chriseth
4721cf332f
Expose EthAssemblyAdapter.
2018-12-06 14:32:04 +01:00
chriseth
0e8841005c
Merge pull request #5554 from ethereum/cp-SourceReferenceFormatter-refactor
...
[2/3] Refactor SourceReferenceFormatter (split-out data extraction & make use of new SourceLocation knowledge)
2018-12-06 14:01:39 +01:00
Christian Parpart
073b03d90c
liblangutil: refactor SourceReferenceFormatter, splitting out retrieval and making use of new SourceLocation's CharStream knowledge
2018-12-06 14:01:01 +01:00
chriseth
7f39c3e522
Binary search for dispatch.
2018-12-06 13:07:14 +01:00
chriseth
5fde279d2a
Merge pull request #5514 from corollari/develop
...
Remove unary + from the type system
2018-12-06 10:27:09 +01:00
Albert
df08d79623
Fix #5470
...
Remove unary + from the type system
2018-12-06 01:54:04 +01:00
chriseth
3a378eae1a
Restrict toHex to bytes
.
2018-12-05 22:37:05 +01:00
Kevin Kelley
fb6fd1b3c2
add a 'readable' format for large hex values
2018-12-05 22:15:02 +01:00
chriseth
63d67c7153
Merge pull request #5591 from ethereum/smt_simplify_sort
...
[SMTChecker] Simplify symbolic variables
2018-12-05 17:28:45 +01:00
Erik Kundt
e3accc6aa6
Simplifies Result<T> and prevents undefined behaviour.
2018-12-05 10:33:34 +01:00
Erik Kundt
05e74d096e
Introduces Result<T> for operator and implicit conversion type checks.
2018-12-05 10:33:34 +01:00
Leonardo Alt
b9f424e373
[SMTChecker] Simplify symbolic variables
2018-12-05 09:56:52 +01:00
chriseth
6efe2a5266
Merge pull request #5390 from ethereum/smt_one_loop
...
[SMTChecker] Unroll loops once
2018-12-05 09:23:19 +01:00
chriseth
c8e201e520
Provide Yul Object builtins.
2018-12-04 15:40:50 +01:00
chriseth
7ee1ddc172
Switch namespaces.
2018-12-04 15:36:03 +01:00
chriseth
0b1125281a
Remove some includes.
2018-12-04 15:31:00 +01:00
chriseth
3ebb78a886
Adjust include paths.
2018-12-04 15:20:29 +01:00
chriseth
0ec7a0e72c
Move AsmCodeGen.
2018-12-04 15:20:23 +01:00
Leonardo Alt
8069bb61da
[SMTChecker] Loops are unrolled once
2018-12-04 12:35:19 +01:00
chriseth
99db4e3ff4
Introduce the concept of builtin functions.
2018-12-04 12:06:33 +01:00
Anurag Dashputre
82f5763e7a
Fix internal compiler error for unimplemented base contract function.
2018-12-03 12:25:31 +01:00
chriseth
4b98946e5a
Merge pull request #5341 from ethereum/optimizeAssemblyCommandline
...
Apply the optimize commandline parameter to assembly mode.
2018-12-03 11:52:48 +01:00
chriseth
5897b14d63
Merge pull request #5568 from ethereum/smt_remove_unary_plus
...
[SMTChecker] Remove unary plus operator
2018-12-03 11:19:34 +01:00
chriseth
3f613a44ec
Merge pull request #5557 from ethereum/fixInterfaceImplementedByPublicStateVariable
...
Public state variables are implementing external functions.
2018-12-03 10:46:44 +01:00
chriseth
0668a9ecfb
Public state variables are implementing external functions.
2018-12-03 10:46:03 +01:00
Leonardo Alt
6d41ffb4a5
[SMTChecker] Remove unary plus operator
2018-12-03 10:35:38 +01:00
chriseth
aaeb74f592
Merge pull request #5537 from ethereum/cp-SourceLocation-related-refactoring
...
[1/3] SourceLocation related refactoring.
2018-11-30 23:45:31 +01:00
chriseth
6c44c5f0c9
Apply the optimize commandline parameter to assembly mode.
2018-11-30 23:39:05 +01:00
Christian Parpart
435f7b3b72
liblangutil: Scanner: remove superfluous sourceName field (it's in CharStream already)
...
Also, ParserBase::sourceName() was dead code. Eliminating it should
increase test coverage (how sneaky) :-)
2018-11-30 17:07:17 +01:00
Christian Parpart
c48a5264be
liblangutil: SourceLocation: adds (shared) pointer to underlying CharStream source, eliminating sourceName
...
Also, adapted affecting code to those changes.
2018-11-30 17:07:12 +01:00
chriseth
cc00d8172b
Merge pull request #5528 from ethereum/smt_sorts_virtual
...
[SMTChecker] Make smt::Sort::operator== virtual
2018-11-30 16:48:46 +01:00
chriseth
33d6a24c47
Move library related checks.
2018-11-30 16:30:20 +01:00
chriseth
4f992298c6
Move hash collisions checks.
2018-11-30 16:30:19 +01:00
chriseth
6d1644e55c
Move external type clash check.
2018-11-30 16:30:19 +01:00
chriseth
4f4f623273
Move fallback function checks.
2018-11-30 16:30:19 +01:00
chriseth
2a85152463
Move constructor checks.
2018-11-30 16:30:19 +01:00
chriseth
b610be4882
Rename functions.
2018-11-30 16:30:19 +01:00
chriseth
d1cc731843
No need to visit structs early.
2018-11-30 16:30:19 +01:00
chriseth
2c2c976697
Move base constructor argument checks.
2018-11-30 16:30:19 +01:00
chriseth
57a62429c9
Move abstract function check.
2018-11-30 16:30:19 +01:00
chriseth
89cf6a5a38
Move override checks.
2018-11-30 16:30:19 +01:00
chriseth
d054a3b85d
Move duplication checks.
2018-11-30 16:30:19 +01:00
chriseth
0bd9db480f
Add skeleton for contract level checker.
2018-11-30 16:30:19 +01:00
Leonardo Alt
2f6de12e8c
[SMTChecker] Make smt::Sort::operator== virtual
2018-11-30 10:41:15 +01:00
chriseth
d6d41b2bc7
Merge pull request #5548 from ethereum/fixMemberAccess
...
Fix bug related to state variables of function type accessed via base contract.
2018-11-30 09:26:08 +01:00
chriseth
c445e7dfa4
Disallow inline arrays of mapping type.
2018-11-29 19:45:06 +01:00
chriseth
73a64da041
Fix bug related to state variables of function type accessed via base contract.
2018-11-29 19:30:27 +01:00
chriseth
124a8def84
Merge pull request #5543 from ethereum/fixSortMOve
...
Fix move bug.
2018-11-29 16:13:24 +01:00
chriseth
9e9250c961
Fix move bug.
2018-11-29 15:32:38 +01:00
Leonardo Alt
67bbcefe6c
Report deprecation error on functions sha3 and suicide also without call.
2018-11-29 14:29:13 +01:00
Christian Parpart
22eff22492
liblangutil: extends CharStream to know about the respective (file-)name (and adapt codebase to it)
2018-11-29 12:45:27 +01:00
chriseth
f6d013237d
Merge pull request #5538 from hydai/static_uint256
...
Replace IntegerType(256) with static function IntegerType::uint256()
2018-11-29 11:17:33 +01:00
Leonardo Alt
1d47919c0c
Fix ICE when function type struct parameter has field of non-existent type
2018-11-29 10:38:47 +01:00
hydai
9326adc3db
Replace IntegerType(256) with static function IntegerType::uint256()
2018-11-29 17:07:18 +08:00
chriseth
b4086ac870
Merge pull request #5526 from ethereum/fixGetterNewCoder
...
Fix: Disallow structs in getters for old encoder.
2018-11-28 17:05:52 +01:00
chriseth
46f3da0b87
Properly check getter types to be old-abi-coder-compatible.
2018-11-28 14:08:25 +01:00
chriseth
5c0331a058
Merge pull request #5525 from ethereum/obsoleteComment
...
Remove obsolete comment.
2018-11-28 12:23:12 +01:00
chriseth
4fa47322f9
Remove obsolete comment.
2018-11-28 11:49:00 +01:00
chriseth
728119bb11
Use yul parser in assembly stack.
2018-11-27 15:59:57 +01:00
chriseth
e016cb99e6
Yul objects.
2018-11-27 15:59:57 +01:00
chriseth
240ad0e34e
Merge pull request #5382 from ethereum/libraryMappingPublic
...
Allow mapping arguments for public and external library functions.
2018-11-26 19:47:32 +01:00
chriseth
4d7799eed4
Properly disallow different return types for interface overloads with different visibilities.
2018-11-26 16:51:28 +01:00
chriseth
f937896727
Merge pull request #5445 from ethereum/publicExternalOverwrite
...
Allow overwriting external functions (with ``calldata`` arguments) with public functions (with ``memory`` arguments)
2018-11-26 16:50:40 +01:00
Daniel Kirchner
30e6f8d3fb
Allow mapping arguments for public and external library functions.
2018-11-26 16:31:46 +01:00
chriseth
f6d8810103
Merge pull request #5504 from ethereum/smt_fix_emscripten
...
[SMTChecker] Fix crash when SMTLib2Interface reports unknow for constant checks
2018-11-26 16:14:02 +01:00
chriseth
764d618c44
Merge pull request #5404 from ethereum/jumpFixes
...
Annotate jump from calldata decode to function as "jump in".
2018-11-26 16:08:04 +01:00
chriseth
a46d5c6580
Fix merge problem in CMake files.
2018-11-26 14:50:04 +01:00
chriseth
d950905a28
Merge pull request #5493 from ethereum/cmake-no-globbing
...
[WIP] CMake: Explicitly state which files to compile instead of relying on globbing
2018-11-26 14:45:35 +01:00
Christian Parpart
cdd8c72c9d
CMake: Explicitly state which files to compile instead of relying on globbing.
...
Also remove header file lists, as there is no need to add them to
add_library() or add_executable(), which should lower maintenance of the cmake files.
2018-11-26 14:39:24 +01:00
chriseth
5ec634939e
Use asCallableFunction for definition clashes in the same contract.
2018-11-26 14:30:32 +01:00
chriseth
36a369d077
Use asCallableFunction for external interface clash check.
2018-11-26 14:30:32 +01:00
chriseth
939365a1d5
Use callable types for override check.
2018-11-26 14:30:32 +01:00
chriseth
9a4968ba1d
Use asCallableFunction in override check (part 1).
2018-11-26 14:30:32 +01:00
chriseth
7921e5f0b9
Merge pull request #5486 from ethereum/allowExternalPublicOverride
...
Allow external public override
2018-11-26 14:26:55 +01:00
chriseth
9ac7c748f8
Merge pull request #5494 from ethereum/scanner-error-handling
...
Improved Scanner error diagnostics.
2018-11-26 14:17:08 +01:00
Leonardo Alt
aaaa92012c
[SMTChecker] Unknown answer for constant condition check should not do anything
2018-11-26 12:54:02 +01:00
chriseth
0b474d5299
Merge pull request #5497 from ethereum/langutil-SourceReferenceFormatter
...
Moving SourceReferenceFormatter into langutil namespace.
2018-11-26 12:44:25 +01:00
chriseth
0f0e466d36
Allow visibility change from external to public.
2018-11-26 12:41:26 +01:00
chriseth
bc137c2eeb
Merge pull request #5485 from ethereum/refactorCallableFunction
...
Refactor callable function
2018-11-26 12:34:43 +01:00
chriseth
0e08fb7469
Use "in" tag for jumps from unpacker to function.
2018-11-26 11:02:58 +01:00
Christian Parpart
e4106bd06e
Change scanner error diagnostics to be non-intrusive to the token API.
...
This also implicitly eliminates the magic-token Token::IllegalHex, and
streamlines error diagnostics over a custom enum class.
2018-11-24 12:40:51 +01:00
Christian Parpart
aeb66905de
Moving SourceReferenceFormatter into langutil namespace.
2018-11-24 12:33:36 +01:00
Lazaridis
e454737a3c
adapt to latest code changes
2018-11-23 17:27:52 +01:00
chriseth
9a94e503da
Merge pull request #5491 from ethereum/libyul-as-library
...
Libyul as static library (version 3 ;( )
2018-11-23 17:01:18 +01:00
Christian Parpart
ec47c8946b
Isolating libyul library API into its own namespace yul
.
2018-11-23 14:29:00 +01:00
Christian Parpart
3734f40d31
CMake: Isolate libyul into its own static library
2018-11-23 12:37:37 +01:00
Christian Parpart
713d94476e
Reorder some include files and group <libyul/>'s together (as much as possible)
2018-11-23 12:37:19 +01:00
Christian Parpart
0f4ed52a71
Rewrite header paths to adapt to recent git mv
of libsolidity/inlineasm to libyul
2018-11-23 11:18:57 +01:00
Christian Parpart
10e6d2897d
Moving files from libsolidity/inlineasm/*.{cpp,h} to libyul/.
2018-11-23 11:16:52 +01:00
Leonardo Alt
6251a289dd
Testing with smtlib2 interface always there
2018-11-23 09:43:49 +01:00
Leonardo Alt
dee0c4ded8
Error message stays in the SMTChecker
2018-11-23 09:43:49 +01:00
Leonardo Alt
f3c2309c73
Display better error message in SMTLib2
2018-11-23 09:43:49 +01:00
Leonardo Alt
f44be616c9
Renaming json fields smtlib2queries and smtlib2responses
2018-11-23 09:43:49 +01:00
chriseth
54bed454f6
Rename function and warn if responses are supplied for Z3.
2018-11-23 09:43:49 +01:00
chriseth
bb10be789c
Inject SMTLIB2 queries and responses via standard-json-io.
2018-11-23 09:43:49 +01:00
chriseth
d686807153
Style
2018-11-22 21:13:02 +01:00
chriseth
ecd059cb92
Merge pull request #5451 from ethereum/bound_function_tests
...
Add assert and tests for bound functions
2018-11-22 18:23:46 +01:00
chriseth
a781bda595
Correct style.
2018-11-22 17:15:25 +01:00
Leonardo Alt
ec84a7dc9b
[SMTChecker] Refactor setZeroValue and setUnknownValue
2018-11-22 16:42:51 +01:00
chriseth
62e801ed70
Use callable function for virtual resolution.
2018-11-22 15:48:12 +01:00
chriseth
92ba8a95f6
Make asCallableFunction to never fail and assert abount parameter size if bound instead.
2018-11-22 15:47:45 +01:00
chriseth
9e964852cc
Rename 'asMemberFunction' to widen its purpose.
2018-11-22 15:24:45 +01:00
Leonardo Alt
06189ae57f
Add assert and tests for bound functions
2018-11-22 14:41:39 +01:00
Leonardo Alt
20accf1a90
[SMTChecker] Add ArraySort and array operations
2018-11-22 14:04:20 +01:00
Leonardo Alt
13a142b039
[SMTChecker] Add FunctionSort and refactors the solver interface to create variables
2018-11-22 10:04:04 +01:00
Christian Parpart
d67322a186
Introduce namespace langutil
in liblangutil directory.
...
Also:
- Use {}-style list initialisation for SourceLocation construction
- Introduce new system includes
- Changes the API of the Scanner to take source as value (with move) as opposed to as a reference
2018-11-21 19:13:44 +00:00
Christian Parpart
80371e2d25
Ensure liblangutil is compiled and linked as its own static library.
2018-11-21 18:58:36 +00:00
Christian Parpart
87821c53c3
Isolating files shared between Yul- and Solidity language frontend.
2018-11-21 18:58:12 +00:00
Alex Beregszaszi
2c6e1888eb
Merge pull request #5466 from ethereum/smt_refactor_sort_patch1
...
[SMTChecker] Refactor smt::Sort and its usage
2018-11-21 15:17:58 +00:00
Leonardo Alt
01ce43e51b
[SMTChecker] Refactor smt::Sort and its usage
2018-11-21 15:46:47 +01:00
mordax
ea8b7d803e
Removing redundant virtual from override function declaration
...
Remove trailing whitespace
Remove changelog change
2018-11-21 14:37:32 +00:00
Leonardo Alt
06c3f0953a
[SMTChecker] Support bound function calls
2018-11-19 15:29:00 +01:00
Leonardo Alt
70bb0eaf95
[SMTChecker] Implement uninterpreted functions and use it for blockhash()
2018-11-15 09:12:42 +01:00
chriseth
727e3f24bc
Do not perform cleanup on unsigned integers when loading from calldata.
2018-11-14 20:52:30 +00:00
Alex Beregszaszi
d60cab1983
Add CompilerStack state assertions in internal methods
2018-11-14 10:47:26 +00:00
Alex Beregszaszi
be70703f82
Move lastContractName closer to contractNames
2018-11-14 10:29:16 +00:00
Alex Beregszaszi
5778af07a3
Do not crash on filesystemFriendlyName if no contracts were compiled
2018-11-14 10:29:16 +00:00
Leonardo Alt
9a4fd946c3
Add Scanner function that prints source based on SourceLocation
2018-11-13 13:49:29 +01:00
chriseth
7e0041cf22
Merge pull request #5406 from ethereum/uninitializedStorageUnimplemented
...
Ignore unimplemented functions for detecting uninitialized storage returns.
2018-11-13 13:22:59 +01:00
Daniel Kirchner
b5e9d849ef
Ignore unimplemented functions for storage returns.
2018-11-13 12:18:22 +01:00
Daniel Kirchner
74557ceb0e
Deterministic YulStringRepository using string hashes.
2018-11-12 23:43:16 +01:00
chriseth
2cc304fd3f
Fix for style.
2018-11-12 09:15:22 +01:00
chriseth
af65bac737
Remove trailing whitespace.
2018-11-12 09:15:22 +01:00
Kristofer Peterson
f927da9182
Refactor of bool TypeChecker::visit(FunctionCall const& _functionCall).
...
Visit method now cleanly determines if node represents a function call,
struct construction or type conversion. Type checking, validation and
error message logic is moved to separate methods.
2018-11-09 16:35:54 +00:00
chriseth
0f2ba3522f
Reset yul string repository.
2018-11-09 15:40:36 +01:00
chriseth
6bbedab383
Merge pull request #5265 from ethereum/cleanupsha3
...
Simplify sha3.
2018-11-09 15:39:57 +01:00
chriseth
b801e61611
Merge pull request #5365 from ethereum/improveNameDispenser
...
[Yul] Use single counter for name dispenser for performance reasons.
2018-11-08 12:24:21 +01:00
Daniel Kirchner
fce1c3a9e7
Merge pull request #5370 from ethereum/fixWindows
...
Fix windows build.
2018-11-08 12:06:32 +01:00
chriseth
1f4ecff446
Fix windows build.
2018-11-08 11:30:58 +01:00
chriseth
84e8a782d6
Merge pull request #5351 from ethereum/functionTypeConversion
...
Relax type equality requirement of function types during conversion in code generation.
2018-11-08 11:29:55 +01:00
chriseth
cc2de07bc6
Merge pull request #5348 from ethereum/boostRationalNegativeDenominatorFix
...
Fix negative denominator in ``boost::rational`` during exponentiation.
2018-11-08 11:25:30 +01:00
Daniel Kirchner
b16a3644fe
Function type conversion test cases.
2018-11-08 10:51:51 +01:00
chriseth
845899e305
Use single counter for name dispenser for performance reasons.
2018-11-07 23:09:33 +01:00
chriseth
674e17c2a8
Performance: Replace string by special single-copy YulString class.
2018-11-07 19:30:27 +01:00
Christian Parpart
ab0de38f16
Eliminate byte
-typedef and use uint8_t
in all their places instead.
...
This change is made to (easily) be forward compatible with future C++
standards, in order to allow compiling the code with newer standards at
some point in the future.
* Removed the `using byte = uint8_t;` line from Common.h
* Mechanically change all uses of `byte` to `uint8_t`.
Tested with GCC 7.3 in C++11/14/17 modes :-)
2018-11-07 12:17:57 +01:00
Daniel Kirchner
a3e37a9d5a
Relax identity requirement of function type conversions during code generation.
2018-11-06 13:22:33 +01:00
Daniel Kirchner
e036133d1b
Fix negative denominator in `boost::rational
` during exponentiation.
2018-11-06 10:52:10 +01:00
Erik Kundt
1d8e9af407
Fixes crash while encoding too large arrays.
2018-10-30 15:14:57 +01:00
chriseth
4d82831b06
Merge pull request #5316 from lazaridiscom/4891-memory-store-asserts
...
refine memory-store assertions, closes #4891
2018-10-28 20:50:41 +01:00
Lazaridis
cab8dea7fe
refine memory-store assertions, closes #4891
2018-10-27 00:04:54 +03:00
chriseth
39687cf110
Remove unused AST utils.
2018-10-25 14:02:09 +02:00
chriseth
c36a3bd683
Merge pull request #5283 from ethereum/smt_fixed_bytes
...
[SMTChecker] Support FixedBytes
2018-10-25 13:01:01 +02:00
chriseth
f714b0dd7c
Merge pull request #5242 from ethereum/someChecks
...
Some well-formedness checks for the Yul AST.
2018-10-25 12:44:28 +02:00
Leonardo Alt
d8cbf321da
Grouping of symbolic variables in the same file and support to FixedBytes
2018-10-25 09:30:48 +02:00
chriseth
01566c2e1a
Merge pull request #5272 from ethereum/smt_special_vars
...
[SMTChecker] Support msg.*, tx.*, block.*, gasleft and blockhash
2018-10-24 14:34:17 +02:00
Leonardo Alt
e2cf5f6ed9
Add gasleft constraint and use full member access name
2018-10-22 18:19:11 +02:00
Christian Parpart
f112377dd4
Refactor solidity::Token
into an enum class
with TokenTraits
helper namespace
2018-10-22 17:00:51 +02:00
chriseth
19be6cd818
Some well-formedness checks for the Yul AST.
2018-10-22 15:52:26 +02:00
Leonardo Alt
b46b827c30
[SMTChecker] Support msg.*, tx.*, block.*, gasleft and blockhash
2018-10-19 15:52:16 +02:00
chriseth
c13b5280c1
Merge pull request #5256 from ethereum/lvalueCleanup
...
Lvalue cleanup
2018-10-19 11:20:12 +02:00
chriseth
fed7a7d61a
Merge pull request #5257 from ethereum/assertAboutRemoved
...
Assert about some removed language concepts in the code generator.
2018-10-19 11:04:29 +02:00
chriseth
e78b95d9d4
Renamed SHA3.{h,cpp} files.
2018-10-18 14:31:36 +02:00
chriseth
97d01d9b47
Assert about some removed language concepts in the code generator.
2018-10-17 22:26:40 +02:00
chriseth
c14dfeb8c5
Removed unreachable cases in LValue.cpp.
2018-10-17 22:17:33 +02:00
Leonardo Alt
070471d8d4
Fix possibly effectless map emplace
2018-10-17 19:00:38 +02:00
Leonardo Alt
c92d3b537d
[SMTChecker] Refactor expressions such that they also use SymbolicVariable
2018-10-17 18:36:24 +02:00
Leonardo
3db1ce0e14
Merge pull request #5235 from ethereum/smt_refactor_types
...
[SMTChecker] Refactoring types
2018-10-17 18:35:48 +02:00
chriseth
9d00f710bc
Merge pull request #5224 from bshastry/compilerwarn-fix
...
Fix compiler warning
2018-10-17 17:23:22 +02:00
Bhargava Shastry
67fd3ca4a7
Retained move/copy semantics; removed const qualifier from Expression's members name (of type std::string) and arguments (of type std::vector<Expression>)
2018-10-17 16:46:18 +02:00
Bhargava Shastry
546b08c158
Fix compiler warning: clang-8 warns of explicitly-defined op implicitly deleted for Expression object's copy and move constructors
2018-10-17 16:42:51 +02:00
Leonardo Alt
afe83cc28b
Refactor SymbolicAddressVariable and SymbolicVariable allocation
2018-10-17 15:58:13 +02:00
Leonardo Alt
aa23326e06
Consistent renaming of 'counters' and 'sequence' to 'index'
2018-10-17 15:58:13 +02:00
Leonardo Alt
ec39fdcb3c
[SMTChecker] Refactoring types
2018-10-17 15:58:13 +02:00
chriseth
5e01d767d0
Prevent externally used functions from being removed.
2018-10-17 14:12:10 +02:00
chriseth
2384947521
Merge pull request #5209 from ethereum/smt_ssa_refactor
...
[SMTChecker] Refactor SSAVariable such that it only uses Type and not Declaration
2018-10-15 16:49:47 +02:00
Leonardo Alt
e4851cf59e
[SMTChecker] Inline calls to internal functions
2018-10-15 15:11:21 +02:00
Leonardo Alt
4a4620ac95
Refactor SSAVariable such that it only uses Type and not Declaration
2018-10-15 14:20:54 +02:00
chriseth
0778fb2dfc
Merge pull request #5208 from mestorlx/bug4156
...
[WIP] Bad identifier suggestion in certain cases
2018-10-15 13:03:49 +02:00
Christian Parpart
1304361b9c
Renaming namespace dev::julia to dev::yul.
2018-10-15 11:58:51 +02:00
Christian Parpart
9a4bec7e47
Renaming libjulia to libyul
2018-10-15 11:52:35 +02:00
Christian Parpart
6d815a142f
Fixes invalid function calls to literals inside tuple assignment's LHS.
2018-10-15 10:35:11 +02:00
mestorlx
1ce9566e50
Updated MAXIMUM_STRING_DISTANCE to non static maximumStringDistance taking into account length of the identifier
2018-10-13 09:54:07 -03:00
chriseth
2feaacba9d
Merge pull request #5195 from ethereum/unsigned-array-index
...
Do not crash on non-unsigned array index
2018-10-10 20:56:25 +02:00
Erik Kundt
763ae30023
Fixes crash on non-unsigned array index.
2018-10-10 19:49:25 +02:00
Martin Diz
ef25454a04
Improved error message for lookup in function types.
2018-10-10 11:53:53 -03:00
chriseth
b5399a7aa0
Merge pull request #5132 from ethereum/genericVisitor
...
Generic visitor.
2018-10-10 16:01:20 +02:00
chriseth
06200b4b64
Merge pull request #5180 from ethereum/cpp-cleanup
...
Some C++ cleanup
2018-10-10 11:43:42 +02:00
Alex Beregszaszi
6c3d12d85b
Do not require ctype/stdio if not needed
2018-10-09 19:06:22 +01:00
Alex Beregszaszi
e732c49c2f
Change find to use a single character
2018-10-09 18:06:25 +01:00
Christian Parpart
4d5216c2e0
Fixes large rational number literals being wrongly interpreted.
...
Fixes #5052 .
2018-10-09 14:36:49 +02:00
chriseth
3f216bac5e
Generic visitor.
2018-10-09 14:27:21 +02:00
chriseth
547b26d464
Merge pull request #5124 from lazaridiscom/1802-hex-error-reporting
...
use Token type for hex error, draft re #1802
2018-10-09 14:17:11 +02:00
Lazaridis
4bcd89105c
provide general hex-literal error message, fixes #1802
...
dummy
2018-10-09 06:51:19 +03:00
Alex Beregszaszi
fa0ce6a7e7
Use empty() instead of size() == 0
2018-10-09 04:29:37 +01:00
chriseth
6a0b7759ba
Fix pragma error suggestion.
2018-10-09 03:15:53 +02:00
chriseth
7ff9a27979
Merge pull request #4734 from ethereum/astUpdate
...
JSON AST: replace ``isConstructor`` by ``kind`` which also supports fallbacks
2018-10-08 21:47:27 +02:00
chriseth
d76bfcd935
Fix typos.
2018-10-04 13:28:16 +02:00
Christian Parpart
9fb835b710
Fixes #5051 (introduced in #4684 ), effectively allowing underscores in address literals.
2018-10-02 15:37:15 +02:00
chriseth
db4f780283
Merge pull request #4962 from anurag-git/anurag_issue_3667-1
...
Removed default case from "ExpressionCompiler::visit(FunctionCall...)".
2018-10-01 13:24:26 +02:00
chriseth
5ae32b24a6
Merge pull request #5113 from ethereum/compilerstack-datagas
...
Use GasEstimator::dataGas in CompilerStack
2018-10-01 13:20:38 +02:00
Anurag Dashputre
3321000f67
Removing extra default cases to force compile time error, instead of runtime.
2018-09-30 12:40:38 +05:30
Alex Beregszaszi
c4b5101b9d
Merge pull request #4676 from jwasinger/extcodehash
...
Add support for EXTCODEHASH
2018-09-28 00:04:40 +01:00
Alex Beregszaszi
d71cc66dde
Use GasEstimator::dataGas in CompilerStack
2018-09-28 00:03:35 +01:00
chriseth
f81c6e6d16
Merge pull request #5099 from ethereum/standard-json-optimiser
...
Be more strict about values in the optimizer block in StandardJSON
2018-09-26 22:31:27 +02:00
Alex Beregszaszi
384a65f660
Be more strict about values in the optimizer block in StandardJSON
2018-09-26 16:51:08 +01:00
Jared Wasinger
c6bd2979b1
Add assembly support for EXTCODEHASH (EIP-1052)
2018-09-26 16:11:02 +01:00
Alex Beregszaszi
d64be90497
Add PathGasMeter.estimateMax helper
2018-09-26 14:25:40 +01:00
chriseth
13cd7c3fed
Merge pull request #5061 from ethereum/fixedSizeArrayLength
...
Disallow fixed-size arrays with zero length
2018-09-26 14:55:07 +02:00
chriseth
46f630c5a6
Merge pull request #5092 from ethereum/create2-evmversion
...
CREATE2 is part of Constantinople now
2018-09-26 14:53:44 +02:00
Alex Beregszaszi
00b1b96eb4
Use better assertion messages for RationalNumberType::literalValue
2018-09-26 13:05:58 +01:00
Erik Kundt
466e8f56e6
Removes unnecessary check of array type.
2018-09-26 12:46:08 +02:00
Alex Beregszaszi
8cfc6c98d6
CREATE2 is part of Constantinople now
...
Also add hasCreate2 to EVMVersion
2018-09-26 01:58:10 +01:00
Nicolás Venturo
f8d43a4da5
Removed extra whitespace.
2018-09-25 14:40:39 -03:00
chriseth
64a6888aba
Merge pull request #5063 from ethereum/standard-json-bug
...
Fix typo in parsing/writing JSON error in StandardCompiler
2018-09-24 15:01:38 +02:00
chriseth
32112d6480
Merge pull request #5041 from liangdzou/fix_typo_in_doc
...
fix typo in docs and comments
2018-09-24 13:52:33 +02:00
Khan M Rashedun-Naby
376ce07915
Use 'switch' instead of 'if..else if'
2018-09-24 08:31:44 +06:00
Erik Kundt
e6d87e54c8
Simplifies zero-length check for fixed-size arrays.
2018-09-22 03:07:12 +02:00
Erik Kundt
d821cbdff5
Moves length check to reference resolver.
2018-09-22 00:25:52 +02:00
Alex Beregszaszi
abfd283af7
Fix typo in parsing/writing JSON error in StandardCompiler
2018-09-21 22:43:57 +01:00
Erik Kundt
ff5be17990
Disallows fixed-size multidim. arrays with zero-length.
2018-09-21 18:44:56 +02:00
Alex Beregszaszi
5dd3ee2d96
Merge pull request #5050 from ethereum/standard-json-crashes
...
Add proper error reporting when invalid settings are provided in StandardJSON
2018-09-21 15:48:05 +01:00
Alex Beregszaszi
8f96fe698d
Merge pull request #5049 from ethereum/structtype-assert-annotation
...
Add assertion for annotated type in Structtype::canBeUsedExternally
2018-09-21 15:02:26 +01:00
Alex Beregszaszi
a515173900
Add proper error reporting when invalid settings are provided in StandardJSON
2018-09-21 14:53:24 +01:00
Alex Beregszaszi
69ff61d149
Add assertion for annotated type in Structtype::canBeUsedExternally
2018-09-21 14:25:05 +01:00
liangdzou
f347dee812
fix typo
2018-09-21 09:27:33 +08:00
chriseth
dc9853bb6e
Merge pull request #5030 from ethereum/payableConversion
...
Make non-payable default for conversion to address.
2018-09-20 21:20:46 +02:00
liangdzou
44e8dfd393
fix typo
2018-09-20 22:54:57 +08:00
chriseth
d0461c49fe
Make non-payable default for conversion to address.
2018-09-20 14:31:04 +02:00
hydai
b409faa675
Disallow uppercase X in hex number literals
2018-09-19 22:01:15 +08:00
liangdzou
24e5dcc352
fix code format problems
2018-09-19 00:18:49 +08:00
liangdzou
808c3f3df5
fix some format typos
2018-09-17 22:13:21 +08:00
liangdzou
f3cbdadec7
Do not set to ref for explicit conversion and add assertion for array
...
type conversion. Also, add some test cases for #4901 and #4948 .
2018-09-14 08:42:40 +02:00
Jordan Last
d0497aacc0
fixing rebase conflicts
...
add ElementaryTypes::BytesMemory and ElementaryTypes::StringMemory
fix rebase conflicts
fixing rebase conflicts
use make_shared instead of new
fix tabs and StateMutability parameter
create address and addressType functions, fix spaces in comment
fix typo and switch nonpayable to payable
fix spaces
fix comment again
2018-09-13 15:53:06 -06:00
Daniel Kirchner
e7daed68c1
Merge pull request #4911 from ethereum/addressPayable
...
Payable and non-payable address type.
2018-09-13 17:30:54 +02:00
Daniel Kirchner
ae35a58124
Add `stateMutability
field to JSON AST for
address
` types.
2018-09-13 15:15:49 +02:00
Daniel Kirchner
12aaca1645
Add payable and non-payable state mutability to AddressType.
2018-09-13 15:15:49 +02:00
Anurag Dashputre
b86cea033b
Removed default case from "ExpressionCompiler::visit(FunctionCall...)".
2018-09-13 15:40:06 +05:30