Commit Graph

2485 Commits

Author SHA1 Message Date
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