Commit Graph
100 Commits
Author SHA1 Message Date
Christian Parpart f15d47f165 Yul: Remove obsoleted FunctionalInstruction. 2019-11-11 16:04:39 +01:00
Christian Parpart cf82bc04d2 Fix compilation error on CI (due to "possibly uninitialized field member"). 2019-11-04 13:45:26 +01:00
Christian Parpart 112e63fe15 libyul: AST cleanup, eliminating dead Instruction AST type. 2019-11-01 12:32:25 +01:00
Christian Parpart df729b3084 Make use of C++17 std::optional<> instead of boost::optional<>. 2019-10-28 11:39:30 +01:00
Christian Parpart 30a99e0df4 test: Adapts InlineAssembly test case for jump instruction (which doesn't "exist" in strict assembly). 2019-10-28 10:03:16 +01:00
Christian Parpart f45c3124f8 libyul: Small code improvements. 2019-10-25 15:39:44 +02:00
Christian Parpart 2890e4888f AsmAnalyzer: Eliminate dead code. 2019-10-25 15:39:16 +02:00
Christian Parpart f05718ef5d Syntax tests: Adapted to changes. 2019-10-25 15:01:27 +02:00
Christian Parpart ee5826b261 AsmAnalyzer: Improve warnOnInstructions(...) implementation. 2019-10-25 15:01:27 +02:00
Christian Parpart 044eb2d161 Assembly: Finally removing AsmFlavour::Loose 2019-10-25 15:01:26 +02:00
Christian Parpart 3c1d12b16c Assembly: Remove errorTypeForLoose property from AsmAnalyzer. 2019-10-25 15:01:26 +02:00
Christian Parpart 6659720776 Assembly: Remove checkLooseFeature(...) from AsmAnalyzer. 2019-10-25 15:01:26 +02:00
Christian Parpart 3df5dbbca4 Assembly: Remove some explicit checks for Loose Assembly 2019-10-25 15:01:26 +02:00
Christian Parpart d659dbd49c Assembly: Defaulting Dialect's flavor to Strict 2019-10-25 15:01:26 +02:00
Christian Parpart dc2adb3d9d Assembly: Removing EVMDialect::looseAssemblyForEVM(). 2019-10-25 15:01:26 +02:00
Christian Parpart fdbbf75e78 Assembly: Removing some more strict-assembly syntax from parser. 2019-10-25 15:01:26 +02:00
Christian Parpart e23998fc6e Assembly: Remove Label instruction. 2019-10-25 15:01:25 +02:00
Christian Parpart 5e8d348f66 Assembly: Remove StackAssignment instruction. 2019-10-25 15:01:25 +02:00
Christian Parpart 5a52fa547e Assembly: Changed parser to use strict assembly mode. 2019-10-25 15:01:25 +02:00
Christian Parpart 99034abcbf ChangeLog: Adds entry changing inline assembly to strict mode. 2019-10-25 15:01:25 +02:00
Christian Parpart e40c498260 Adapting the tests to strict inline assembly. 2019-10-25 15:01:25 +02:00
Christian Parpart c6152b8059 Compile fix. 2019-10-23 13:08:17 +02:00
Christian Parpart f85f6ba7e0 Fixes doxygen style multiline comment parsing for files with CRLF as line terminators. 2019-09-25 12:59:46 +02:00
Christian Parpart 59955bed5d Adds reserved keyword virtual, and adjusting affected tests/docs respectively. 2019-09-09 13:41:43 +02:00
Christian Parpart b94bdfcec0 Merges soltest tests per EVM/flags into a single one.
Because of EVMONE, speeds up test runs we can do that now.
2019-08-14 16:51:52 +02:00
Christian Parpart a075588618 circleci: Fixes logfile naming, not accidentally overriding others 2019-08-14 16:51:52 +02:00
Christian Parpart e91c6acbc3 Defaulting to C++17 for building. 2019-08-13 16:19:18 +02:00
Christian Parpart b6446aa615 Extracting more end-to-end tests. 2019-07-22 16:31:46 +02:00
Christian Parpart cb5df90251 Change the way release_ppa.sh treats branches.
Only release branch is treated release branch,
and everything else is treated a development branch.
2019-07-22 14:49:30 +02:00
Christian Parpart 58d8243921 isoltest: Fixes parsing and printing strings with *basic* escape sequences in it.
We explicitly did not implement a fully conformant ANSI escape sequence
parser but only what is needed for now.
2019-07-22 11:32:17 +02:00
Christian Parpart 810a0de1aa Add evmc and host interface implementation. Modify fuzzer harness to make use of evmc host/vm. 2019-07-17 10:55:33 +02:00
Christian Parpart a9a56bc6dd Extracting more end-to-end tests. 2019-07-08 16:04:52 +02:00
Christian Parpart 7ba9537ae1 yul::reindent() to reindent with spaces instead of tabs (width: 4) 2019-07-08 11:43:11 +02:00
Christian Parpart 62f6e4bad3 Extracting some Solidity end-to-end tests. 2019-07-01 15:37:46 +02:00
Christian Parpart 7b3aba81fb Adds a test to check_style.sh to check for spaces before colon (:) in range based for loops. 2019-06-24 17:32:58 +02:00
Christian Parpart 0fd1db533e yul: adds reindent() function to reindent yul source code and makes use of it in IRGenerator.
This function does count curly and round braces and reindents
accordingly the beginning of each line.

It does consider line-comments (// and ///) but not multiline comments (/* ... */).
2019-06-24 12:53:50 +02:00
Christian Parpart b58170f890 Refactor & Speedups on CircleCI; split out out codecov into dedicated tests. 2019-06-21 20:26:10 +02:00
Christian Parpart 9733ae7483 [libsolidity] TypeProvider: cleanup unnecessary std:: qualifiers 2019-04-17 14:45:29 +02:00
Christian Parpart 721bf367a3 [libsolidity] TypeProvider: eliminate redundant "Type" suffix in provider function signatures. 2019-04-17 14:42:07 +02:00
Christian Parpart 862b65d6e3 [libsolidity] remove ReferenceType::copyForLocationIfReference (use TypeProvider instead) 2019-04-17 13:25:03 +02:00
Christian Parpart b83097bdc6 [libsolidity] Types: eliminate redundant MagicType::metaType() (use TypeProvider instead) 2019-04-17 12:59:48 +02:00
Christian Parpart a99a460c79 [libsolidity] Types: remove some old comments 2019-04-17 12:00:33 +02:00
Christian Parpart 58a45f2cb6 [libsolidity] TypeProvider: adds explicit uint256() accessor and removes default params in integerType(...). 2019-04-16 18:28:40 +02:00
Christian Parpart 59d4f54729 libsolidity: Be more restrictive to not allow any copy constructors at all in Type system.
This enforces us to be a little bit more historical in how to initialize
our std::array<>'s in TypeProvider.
2019-04-16 18:26:46 +02:00
Christian Parpart a2a3b007f3 TypeProvider: storageType() to make all parameters explicit 2019-04-16 18:26:46 +02:00
Christian Parpart bf43eebea9 libsolidity: Introducing TypeProvider API, for clear type system ownership. 2019-04-16 18:26:45 +02:00
Christian Parpart 862d798047 [test] AnalysisFramework's instance of CompilerStack to be lazily instanciated. 2019-04-16 18:25:03 +02:00
Christian Parpart a1ec49409d Yul] RedundantAssignEliminator: Implements break/continue handling within ForLoop. 2019-03-26 17:36:43 +01:00
Christian Parpart 89f1dbfbb6 [Yul] Refactors RedundantAssignEliminator for future changes wrt. break/continue statements. 2019-03-19 12:24:45 +01:00
Christian Parpart 82ced641e5 [Yul] Adds another test case for multiple continue statements within a for-loop 2019-03-18 12:43:20 +01:00
Christian Parpart 05e2d362c8 [Yul] Adds break/continue statements and some general tests for for-loop syntax. 2019-03-11 15:05:05 +01:00
Christian Parpart 609855546e Yul: Adds optimizer pass to make variable names suffix-canonical. 2019-03-04 17:26:56 +01:00
Christian Parpart 3d4b0f45da liblangutil: refactors SourceReferenceFormatter error formatting for pretty and colored output.
* Refactors output format in a way it is (or should at least be) more readable.
  (NB.: As source of inspiration, I chose the rustc compiler output.)
* Adds color support to the stream output.
* Also improves multiline source formatting
  (i.e. truncating too long lines, like done with single lines already)
* solc: adds flags --color (force terminal colors) and --no-color (disable autodetection)
* solc: adds --new-reporter to give output in *new* formatting (colored or not)
* Changelog adapted accordingly.
2019-02-07 12:55:14 +01:00
Christian Parpart ef6a76ce67 libdevcore: Introduces a generalized AnsiColorized, an improved FormattedScope
a future commit/PR could replace existing code to use AnsiColorized and
remove the old implementation of FormattedScope.
2019-02-07 12:55:14 +01:00
Christian Parpart 065c3c87af libyul: changing some AST members from shared_ptr<> to unique_ptr<>
* Some spaces look a little more verbose now, but that shouln't be a problem as it also should raise readability, too.
* This makes some use of return-value-optimizations also.
2019-01-16 14:58:59 +01:00
Christian Parpart b7eaa4f8d3 Ensuring we use at least boost 1.65, build static on Xenial, and adapt CircleCI accordingly. 2019-01-14 16:10:26 +01:00
Christian Parpart 9e61dbad07 Adds new test for SourceReferenceExtractor to extract multiline location with a too long first line. 2019-01-07 11:56:43 +01:00
Christian Parpart c7074a365e Fixes SourceLocation extraction on multiline locations with a too long first line. 2019-01-07 11:33:14 +01:00
Christian Parpart 639622c6d7 cmake: Do not depend on a C compiler to be present by explicitly stating that this is a C++ project.
CMake defaults to C *and* C++ toolchain, in case nothing has been specified.
This means that cmake always checks for both, which is more than needed.

This PR cuts off C toolchain requirement from /CMakeLists.txt and ensures that we
don't pass along any `..._C_...` variables in EthCompilerSettings.cake nor jsoncpp.cmake.
2018-12-20 09:02:00 +01:00
Christian Parpart 62fe57479e make use of C++ = default constructor declarations as well as more non-static member initialization syntax. 2018-12-19 11:26:42 +01:00
Christian Parpart d10bae245e liblangutil: SourceLocation to default initialize data members (w/o the use of ctor)
See: http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c45-dont-define-a-default-constructor-that-only-initializes-data-members-use-in-class-member-initializers-instead
2018-12-19 11:21:45 +01:00
Christian Parpart 5b86e3ec50 Enables C++14 standard (was C++11) within the Solidity compiler project. 2018-12-11 21:28:05 +01:00
Christian Parpart a3829516f0 build.sh bash script cleanup
* use `set -e` to abort script execution when error codes fail (and haven't been checked)
* use [[ ]] instead of [ ] or test.
* use ROOTDIR/BUILDDIR variables for better readability
* use mktemp in order to avoid accidental name clashes.
* use `make install` instead of `install ...` as cleaner installation process
  * this however doesn't install soltest anymore, which I believe is
    right, as normal users should not need it installed in their system.
    Those who want to run the test suite, can do so manually
* allow optional passing of more additional custom args to cmake
2018-12-10 14:59:55 +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
Christian Parpart 757623e381 liblangutil: SourceLocation: Retricts == and != operator 2018-11-30 17:34:54 +01:00
Christian Parpart 18e3d6dbca liblangutil: small refactors wrt. API cleanups
Especially also remove SourceLocation ctor's that the compiler can default-implement.
2018-11-30 17:10:39 +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
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
Christian Parpart 6060a3682c liblangutil: adds Scanner.charStream() accessor 2018-11-29 12:28:57 +01:00
Christian Parpart 5ec67ee477 liblangutil: adds ParserBase::charStream() accessor 2018-11-29 01:15:24 +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
Christian Parpart 0ad56bca79 Adapting tests to Scanner's lexical error diagnostics change. 2018-11-24 12:59:37 +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
Christian Parpart 8dd0338d12 Remove superfluous libyul/ASTDataForward.h and include libyul/AsmDataForward directly instead. 2018-11-23 14:29:05 +01:00
Christian Parpart ec47c8946b Isolating libyul library API into its own namespace yul. 2018-11-23 14:29:00 +01:00
Christian Parpart 58a744f06d Replace all occurrences of NULL with nullptr. 2018-11-23 12:57:31 +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
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 2518b5314c Splitting out CharStream from Scanner. 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
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
Christian Parpart f112377dd4 Refactor solidity::Token into an enum class with TokenTraits helper namespace 2018-10-22 17:00:51 +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 d1e05bf647 soltest: provides sane defaults for --testpath command line option 2018-10-08 10:58:52 +02:00
Christian Parpart 39ffd7500e solc: Fixes double-quoting path names on stderr and adds tests for it.
Before it was possible to get a failure message, such as:

    ""notfound.sol"" is not found

whereas it should be:

    "notfound.sol" is not found.
2018-08-07 14:55:22 +02:00
Christian Parpart 4c90ddf64a libsolidity: Remove dead code wrt. VariableDeclaration::canHaveAutoType()
Closes #4667
2018-08-07 11:34:13 +02:00
Christian Parpart 43c01361f3 Drops tests for inline assembly jumps and function access as both isn't possible anymore. 2018-08-02 13:37:22 +01:00
Christian Parpart a4ab305347 Drop swap_peephole_optimization test from EndToEndTests
Already covered by libevmasm/Optimiser: peephole_noncommutative_swap1, peephole_commutative_swap1 and peephole_swap_comparison
2018-08-02 13:37:22 +01:00
Christian Parpart 9b8a05ebfb Update tests to remove support for loose assembly 2018-08-02 13:37:13 +01:00
Christian Parpart ed3cb327ea Remove loose assembly features from the documentation 2018-08-02 13:36:48 +01:00
Christian Parpart 5d9320c70b Disallow loos assembly in Solidity by permanently setting it to SyntaxError (from Warning) 2018-08-02 13:36:05 +01:00
Christian Parpart cb200cf7e1 Adds positive/negative tests for checking error on cyclic dependency checker exhaustion 2018-08-01 12:04:08 +01:00
Christian Parpart 594102de6b fixes tests.sh to not use hard-coded working dir and adds proper cleanup
* Implicitely also allows concurrent runs.
* Properly cleanup of any working files created during runtime.
* Properly cleanup upon singals.
* Allow early-abort during cmdline tests without leaking processes.
2018-08-01 10:25:24 +02:00