Commit Graph

252 Commits

Author SHA1 Message Date
chriseth
c0afb4549e Further fixes to the optimizer. 2016-08-01 23:41:11 +02:00
chriseth
ac0d138800 Test case. 2016-08-01 15:30:19 +02:00
chriseth
8b68d476c2 Fix optimizer tests. 2016-08-01 12:17:04 +02:00
Bob Summerwill
4ee2114127 Make the Solidity repository standalone.
This commit is the culmination of several months of work to decouple Solidity from the webthree-umbrella so that it can be developed in parallel with cpp-ethereum (the Ethereum C++ runtime) and so that even for the Solidity unit-tests there is no hard-dependency onto the C++ runtime.

The Tests-over-IPC refactoring was a major step in the same process which was already committed.

This commit contains the following changes:

- A subset of the CMake functionality in webthree-helpers was extracted and tailored for Solidity into ./cmake.   Further cleanup is certainly possible.
- A subset of the libdevcore functionality in libweb3core was extracted and tailored for Solidity into ./libdevcore.   Further cleanup is certainly possible
- The gas price constants in EVMSchedule were orphaned into libevmasm.
- Some other refactorings and cleanups were made to sever unnecessary EVM dependencies in the Solidity unit-tests.
- TravisCI and Appveyor support was added, covering builds and running of the unit-tests (Linux and macOS only for now)
- A bug-fix was made to get the Tests-over-IPC running on macOS.
- There are still reliability issues in the unit-tests, which need immediate attention.    The Travis build has been flipped to run the unit-tests 5 times, to try to flush these out.
- The Emscripten automation which was previously in webthree-umbrella was merged into the TravisCI automation here.
- The development ZIP deployment step has been commented out, but we will want to read that ONLY for release branch.

Further iteration on these changes will definitely be needed, but I feel these have got to sufficient maturity than holding them back further isn't winning us anything.    It is go time :-)
2016-08-01 01:45:11 -07:00
chriseth
58cc6cbb37 Bugfix: Allocate empty array. 2016-07-28 17:24:18 +02:00
chriseth
c55584d3e2 Source location as part of AST. 2016-07-20 19:45:43 +02:00
chriseth
67d1e4783a Rename IPCSocket and removed unused code in TestHelper. 2016-06-29 00:14:50 +02:00
chriseth
05e5bdf780 Fixes for gas tests. 2016-06-28 23:18:55 +02:00
chriseth
c0bbd1cfe5 Some more test fixes. 2016-06-28 23:18:55 +02:00
chriseth
e5db096da9 Fix some more tests. 2016-06-28 23:18:55 +02:00
chriseth
007132a78e Fix empty storage check. 2016-06-28 23:18:55 +02:00
chriseth
93c8fc094e Parse arguments in free function. 2016-06-28 23:18:55 +02:00
Dimitry
27df4b7e71 parse command line arguments
ipcPath
2016-06-28 23:18:55 +02:00
Dimitry
763faf7b0e replace BalanceAt
add addressHasCode
remove m_state and sealengine
2016-06-28 23:18:55 +02:00
chriseth
ce2258b71e Balance and storage. 2016-06-28 23:18:54 +02:00
chriseth
966709b7d7 logs 2016-06-28 23:18:54 +02:00
chriseth
d6e39054e0 Refactor testing via IPC. 2016-06-28 23:18:54 +02:00
chriseth
ad36fc3c58 Style 2016-06-28 23:18:54 +02:00
Dimitry
55cfba6514 test framework
IPC socket and RPC communication with node
2016-06-28 23:18:54 +02:00
chriseth
5aca97af0d Initial poc to test via ipc. 2016-06-28 23:18:54 +02:00
chriseth
25a64c7f8f Only warn about unused return in low-level functions. 2016-06-26 13:53:32 +02:00
chriseth
cc6314cd01 Warn about unused return values. 2016-06-26 13:53:32 +02:00
chriseth
3150ab2bcf Allow remappings to change depending on the context. 2016-06-08 18:16:46 +02:00
chriseth
a1aee031d1 Tests for implementation by constructor. 2016-06-06 19:38:22 +02:00
chriseth
1c3a64026b Add a test for a struct accessor. 2016-06-04 21:51:48 +02:00
chriseth
754a992500 Inaccessible dynamic types 2016-06-02 12:52:25 +02:00
chriseth
708129abd5 Fixes for invalid cleanups for small types. 2016-05-20 16:52:40 +02:00
chriseth
a09583a2a4 Tests for invalid cleanup and missing bool conversion code. 2016-05-20 16:52:38 +02:00
VoR0220
6289410152 explicit conversion and loosening of binary operations on integer and fixed point types...still other problems
fixed some spaces and deleted lines from failing test
2016-05-18 15:52:09 -05:00
VoR0220
3ba308fb2e current debugging info 2016-05-18 15:52:09 -05:00
chriseth
775b757d0e Merge pull request #545 from chriseth/accessFunLabels
Allow access to functions in inline assembly.
2016-05-17 23:59:13 +02:00
chriseth
4b445b898e Merge pull request #546 from chriseth/fixiszero
Correctly use not/bnot/iszero.
2016-05-14 00:58:55 +02:00
chriseth
67ca3bb4b9 Allow access to functions in inline assembly. 2016-05-12 12:30:48 +02:00
chriseth
d4206b7cd0 Remove unused tests and add asserts for not implemented parts in code generation.
quick fix on christian's rational

change so that ubuntu will stop yelling

be more specific with rational declaration for Windows sake

rational in namespace correction for windows
2016-05-10 16:03:33 -05:00
chriseth
af354d7555 Correctly handle unexpected exceptions during tests. 2016-05-10 19:33:30 +02:00
VoR0220
a6fc3c8f30 reorganized tests and fixed mobile types and implicit conversions of rationals and fixed point types
one final tweak

check for null types
2016-05-09 11:41:03 -05:00
VoR0220
bfc238c8d1 updated algorithm for bit finding...now to figure out literal value
tiny fixups

changed location of the check

got rid of extra space and fixed a couple of things

added binary results bits

change back literal value
2016-05-09 11:41:03 -05:00
VoR0220
82039b732e added bytes conversion tests, resolved that, converted to binary scaling, refactored the find algo to prevent large numbers and take into account integer bytes
think we're good on solidity type name resolution now

removed couts

updates to documentation and more removed couts along with literal value implementation

forgot semicolons
2016-05-09 11:41:03 -05:00
VoR0220
f0ea817580 fixing modulus and Solidity Name and Type Resolution
minor fixes

current attempts at binary fixup
2016-05-09 11:41:03 -05:00
VoR0220
4d283b2b30 currently what we have 2016-05-09 11:41:02 -05:00
RJ Catalano
93295ae8f8 got exponents up and working with their inverse, changed a few of the tests....something is working that likely shouldn't be
slight changes to how to flip the rational negative around...still trying to figure it out

tests added

updated tests

odd differences in trying soltest from solc binary, let me know if you can replicate

test not working for odd reason

fixed test problem with fixed literals...still need a way to log this error

broken up the tests, added some, changed some things in types and began compiler work

moar tests and prepping for rebuilding much of the types.cpp file

further fixing

infinite loop still happening but it's somewhere in the fixedPoint methodd

fractional bits needed algo improved! Eliminated 2 errors

Corrected problems with the previous commit. No infinite loops. Actually appear to have corrected an error
2016-05-09 11:41:02 -05:00
RJ Catalano
91fda50922 fixed problem with var...probably a conversion problem for fixed in size capabilities
adding fixed type tests

Removing bitshift and regrouping fixed type tests together
2016-05-09 11:41:02 -05:00
RJ Catalano
dff1a26f55 fix for token bug, also quick fix for the wei and seconds 2016-05-09 11:41:02 -05:00
RJ Catalano
6fa5e0fac9 Rational implemented...trying to figure out exponential 2016-05-09 11:41:02 -05:00
RJ Catalano
9a075458ad initial work for fixed types...potentially needing a constant literal type for this
notation

Rational implemented...trying to figure out exponential

fix for token bug, also quick fix for the wei and seconds

fixed problem with var...probably a conversion problem for fixed in size capabilities

adding fixed type tests

Removing bitshift and regrouping fixed type tests together

size capabilities functioning properly for fixed types

got exponents up and working with their inverse, changed a few of the tests....something is working that likely shouldn't be

slight changes to how to flip the rational negative around...still trying to figure it out

tests added

updated tests

odd differences in trying soltest from solc binary, let me know if you can replicate

test not working for odd reason

fixed test problem with fixed literals...still need a way to log this error

broken up the tests, added some, changed some things in types and began compiler work

moar tests and prepping for rebuilding much of the types.cpp file

further fixing

initial work for fixed types...potentially needing a constant literal type for this
2016-05-09 11:41:02 -05:00
chriseth
a927efb151 Correctly use not/bnot/iszero.
A long time ago, some opcodes were renamed. Now we should only have
not (bitwise negation) and iszero (logical negation).
2016-05-09 10:52:23 +02:00
chriseth
e79797f348 Modify failing test: Accessor functions are not available anymore in libraries. 2016-05-04 09:14:44 +02:00
chriseth
e6b6e27bd7 Some more tests. 2016-05-03 22:48:53 +02:00
chriseth
7ea3d950d7 Allow calling internal functions of libraries.
Internal functions of libraries can be called as if the library were a
base contract of the calling contract. As the calling convention for
internal functions is to not create a new call context, the code of
these functions will be pulled into the context of the caller,
duplicating their code. This might pull in code of further internal or
even private functions.

The use case for such functions is to allow libraries which can operate
on memory types such that these types can also be modified in place.
2016-05-03 22:41:18 +02:00
Bob Summerwill
7ba6c98e5f Merge pull request #507 from chriseth/sealEngine
Explicitly init seal engine.
2016-04-15 15:06:32 -04:00