Alex Beregszaszi
9aafa32825
Disallow empty import statements
2019-01-28 13:52:15 +00:00
Mudit Gupta
2f91781a80
useLiteralContent data validation
...
Squashed commit of the following:
commit bbceee6997c1b951eb6054f7d5b7560fe1773690
Author: Mudit Gupta <guptamudit@ymail.com>
Date: Tue Jan 22 23:27:49 2019 +0530
Removed extra check
commit 4f7c3cc58e94836b1dddcc5f2938da14adad6252
Author: Mudit Gupta <guptamudit@ymail.com>
Date: Tue Jan 22 17:51:05 2019 +0530
Updated test error message
commit 5da45f2a23840e7bb1978853e1c184faec65b3e0
Author: Mudit Gupta <guptamudit@ymail.com>
Date: Tue Jan 22 17:46:09 2019 +0530
Renamed test
commit e661418deac25f31c49091be3c80244f566fc14c
Author: Leonardo <leo@ethereum.org>
Date: Tue Jan 22 17:41:56 2019 +0530
Update libsolidity/interface/StandardCompiler.cpp
Co-Authored-By: maxsam4 <guptamudit@ymail.com>
commit d289b4dc1956ab736aada613e810cf2e2d124d4d
Author: Mudit Gupta <guptamudit@ymail.com>
Date: Tue Jan 22 17:29:40 2019 +0530
changed style
commit 5a7cf08db3027d75081d2e698dd51b807bef5abb
Author: Mudit Gupta <guptamudit@ymail.com>
Date: Tue Jan 22 17:20:37 2019 +0530
Added test case for missing useLiteralContent
commit 6e866c46aa92d6a89f2b341bd717c3886946f3ff
Author: Mudit Gupta <guptamudit@ymail.com>
Date: Tue Jan 22 17:09:30 2019 +0530
input check for useLiteralContent
2019-01-23 10:22:27 +05:30
chriseth
a9fa2658d8
Add helper to show if contract can be deployed.
2019-01-17 20:36:48 +01:00
chriseth
e6fee257e6
Code generation for access to contract code.
2019-01-17 20:36:48 +01:00
chriseth
9222eff08f
Make the dialect available everywhere.
2019-01-07 16:41:03 +01:00
chriseth
4c7151e57f
Do not include empty JSON objects in output.
2018-12-19 14:59:29 +01:00
chriseth
beae2a608b
Only fully compile if binaries requested.
2018-12-19 12:58:17 +01:00
chriseth
4e89945d82
Some more compiler state tests.
2018-12-19 12:58:17 +01:00
chriseth
20189c3f3b
Merge pull request #5637 from ethereum/better-json-error-reporting
...
Json: Provide better error message when 'settings' is not an object
2018-12-18 19:39:46 +01:00
Mathias Baumann
c43d96f2bf
Json: Provide better error messages for wrong types
2018-12-18 18:36:50 +01:00
chriseth
bd52beedff
Cache hash computations.
2018-12-18 16:38:25 +01:00
Leonardo Alt
340ee4156d
Sort includes in libsolidity/interface
2018-12-17 19:24:42 +01:00
Leonardo Alt
8cd2ac8462
Disallow unknown JSON keys in standard-json
2018-12-12 17:32:42 +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
liangdzou
362648a450
Reuse stack slots in Yul to EVM code generation.
2018-12-10 14:28:56 +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
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
3a378eae1a
Restrict toHex to bytes
.
2018-12-05 22:37:05 +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
3ebb78a886
Adjust include paths.
2018-12-04 15:20:29 +01:00
chriseth
99db4e3ff4
Introduce the concept of builtin functions.
2018-12-04 12:06:33 +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
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
0bd9db480f
Add skeleton for contract level checker.
2018-11-30 16:30:19 +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
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
Christian Parpart
aeb66905de
Moving SourceReferenceFormatter into langutil namespace.
2018-11-24 12:33:36 +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
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
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
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
87821c53c3
Isolating files shared between Yul- and Solidity language frontend.
2018-11-21 18:58:12 +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
Daniel Kirchner
74557ceb0e
Deterministic YulStringRepository using string hashes.
2018-11-12 23:43:16 +01: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
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
chriseth
e78b95d9d4
Renamed SHA3.{h,cpp} files.
2018-10-18 14:31:36 +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
Alex Beregszaszi
e732c49c2f
Change find to use a single character
2018-10-09 18:06:25 +01:00
Alex Beregszaszi
fa0ce6a7e7
Use empty() instead of size() == 0
2018-10-09 04:29:37 +01: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
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
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
Alex Beregszaszi
d64be90497
Add PathGasMeter.estimateMax helper
2018-09-26 14:25:40 +01:00
Alex Beregszaszi
8cfc6c98d6
CREATE2 is part of Constantinople now
...
Also add hasCreate2 to EVMVersion
2018-09-26 01:58:10 +01: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
Alex Beregszaszi
abfd283af7
Fix typo in parsing/writing JSON error in StandardCompiler
2018-09-21 22:43:57 +01:00
Alex Beregszaszi
a515173900
Add proper error reporting when invalid settings are provided in StandardJSON
2018-09-21 14:53:24 +01: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
558a4ac49c
give more information (at most 35 chars before and after) for too long lines
...
add tests for giving more informations for too long lines
add edge tests for giving more informations for too long lines
avoid printing out tailing white space
update test case after avoiding printing out trailing whitespace
update test case for removing the pre-release warning from reference
refactor the code to if-else flavor
rename folder to cmdlineErrorReports under test
rename folder to cmdlineErrorReports under test
ignore whitespace for reference files
avoiding to modify the file stderr_path by call sed without -i option
print ' ...' instead of ' ... ' at the end of a line
2018-09-13 09:55:54 +08:00
chriseth
8f27fb1f4a
Merge pull request #4542 from aarlt/constructor_natspec
...
Fix: natspec annotations on constructors
2018-08-14 19:13:25 +02:00
Daniel Kirchner
954d7433bd
Disallow remappings with empty prefix.
2018-08-10 19:26:48 +02:00
Alexander Arlt
f76d4d5919
Fix: natspec annotations on constructors
...
- natspec annotations on constructore where ignored.
2018-08-08 21:53:35 +02:00
Alex Beregszaszi
9062704054
Merge pull request #4753 from mattaereal/boost-to-string-patch
...
Replace boost:lexical_cast<std::string> for std::to_string.
2018-08-08 16:07:25 +01:00
Matías Aereal Aeón
e902ce1aa0
Removing std:: from std::to_string and include for boost/lexical_cast
2018-08-08 11:26:30 -03:00
Alex Beregszaszi
5b4ad10b3c
Mark StandardCompiler::compile as noexcept
...
It has a generic catch statement and shouldn't leak out exceptions.
2018-08-08 13:22:40 +01:00
Matías Aereal Aeón
7dae58cbcc
Replace boost:lexical_cast<std::string> for std::to_string.
2018-08-08 03:55:43 -03:00
chriseth
901550e473
Merge pull request #4692 from ethereum/devcore-path
...
Move absolutePath/sanitizePath helpers from CompilerStack to libdevcore
2018-08-07 16:15:49 +02:00
chriseth
71e26f6adb
Remove clone feature.
2018-08-07 11:10:50 +01:00
Alex Beregszaszi
3de0b8b7f0
Move absolutePath/sanitizePath helpers from CompilerStack to libdevcore
2018-08-06 12:54:22 +01:00
Alex Beregszaszi
f74cff622d
Properly explain all the analsys steps in CompilerStack
2018-07-31 00:39:18 +01:00
Alex Beregszaszi
a5a61a0b77
More consistent catch statements
...
Also take const& in all cases.
2018-07-25 01:18:09 +01:00
Matt Little
4efe3544f7
Fix NatSpec json output for "@notice" and "@dev" tags on contract definitions.
2018-07-12 14:39:13 +02:00
chriseth
238dbe1b99
Merge pull request #4388 from ethereum/noPackedLiterals
...
Disallow packed encoding of literals.
2018-07-11 14:28:20 +02:00
Cryptomental
140dbfdbd8
Code, Changelog, ReleaseChecklist: Fix typos.
...
Refs: #4442
2018-07-11 00:26:23 +02:00
chriseth
f7a9c4203e
Disallow packed encoding of literals.
2018-07-03 01:02:00 +02:00
Alex Beregszaszi
5aa8c7ed1a
Document the internal API of CompilerStack
2018-06-25 23:51:40 +02:00
Alex Beregszaszi
3fc7da11db
Pull out createCBORMetadata helper
2018-06-25 22:17:33 +02:00
Alex Beregszaszi
a392e0f046
Properly catch optimizer/assembly exception in CompilerStack
2018-06-20 23:19:06 +02:00
Alex Beregszaszi
0a632011be
CompilerStack absolutePath/sanitizePath can be made static
2018-06-20 17:04:22 +02:00
Alex Beregszaszi
dcee8e11ad
Reorder some of the flow in CompilerStack::compileContract for readability
2018-06-20 17:01:17 +02:00
Alex Beregszaszi
782bc41dbd
Rename JULIA/IULIA to Yul in assembly interface
2018-06-14 09:31:28 +01:00
Julius Huelsmann
9e26f5fa0a
Do not catch exceptions by value in StandardCompiler
2018-05-17 14:44:01 +02:00
Daniel Kirchner
16e966dea0
Add control flow analyzer and test for uninitialized storage returns.
2018-05-14 20:23:40 +02:00
Daniel Kirchner
995623f0fa
Add control flow graph.
2018-05-14 20:23:40 +02:00
Alex Beregszaszi
059e232e69
Support shifts in gas estimator
2018-04-30 21:22:59 +01:00
chriseth
928ce08845
Correctly ignore costs of fallback for other functions.
2018-04-11 19:42:34 +01:00
Alex Beregszaszi
43d2954de8
Do not abort excessive warnings, just ignore them.
2018-04-06 14:44:03 +02:00
Alex Beregszaszi
0812d1189a
Ignore warnings when limited errors to 256
2018-04-06 13:52:19 +02:00
Alex Beregszaszi
3730f68d4b
reindent
2018-04-06 13:52:19 +02:00