Commit Graph

7301 Commits

Author SHA1 Message Date
RJ
d751b9085c Update SolidityEndToEndTest.cpp 2016-01-10 01:12:52 -06:00
RJ
10a1c352b9 Update with type resolution tests for arrays 2016-01-10 01:07:02 -06:00
chriseth
b158e48c1a Merge pull request #338 from guanqun/add_paren
support syntax "(x) = 3"
2016-01-05 13:15:29 +01:00
chriseth
e27bfa023d Merge pull request #317 from chriseth/pathsEverywhere
Use paths instead of simple identifiers wherever possible.
2016-01-04 11:47:11 +01:00
Lu Guanqun
208429644d add a test case for decayed tuple expression as left value 2016-01-04 16:11:43 +08:00
chriseth
0e2fa39fad Use paths instead of simple identifiers wherever possible. 2015-12-21 18:44:21 +01:00
chriseth
2466fb68a0 Merge pull request #308 from chriseth/fixoverloadbug
Fix bug preventing overloads of different array types.
2015-12-21 15:37:51 +01:00
chriseth
54e3637d23 Add structs and enums to contract types. 2015-12-18 16:50:14 +01:00
chriseth
79c5d032fe Fix bug preventing overloads of different array types. 2015-12-18 13:56:37 +01:00
chriseth
603dc58040 Simple aliasing during import. 2015-12-18 12:46:56 +01:00
chriseth
d3c459b5a9 Parse complex import directives. 2015-12-18 12:46:54 +01:00
RJ Catalano
905d55e34f updated tests and much simpler algorithm for parsing errors 2015-12-16 16:47:37 -06:00
RJ Catalano
fe04d7f7f7 added one more test and realized that there was one last change before the parser is perfect 2015-12-16 14:50:40 -06:00
RJ Catalano
f7a1860abd forgot about this one...again making this purely about parsing...typechecking will come another day 2015-12-16 13:35:28 -06:00
RJ Catalano
df41812442 making this purely about parsing...type checking will go in a different PR 2015-12-16 13:23:05 -06:00
RJ Catalano
0ba24a5289 changed a couple of small nuances, made an attempt at fixing the parsing in the inline arrays case (fails), and added test for inline arrays per Chriseth request 2015-12-16 12:55:52 -06:00
RJ Catalano
9ab066de8c new tests 2015-12-15 14:47:09 -06:00
RJ Catalano
42c4339404 updated attempt, a couple of more things to sort through and change 2015-12-15 10:57:57 -06:00
chriseth
f8228e8ab1 Relative paths in import directives. 2015-12-09 19:21:02 +01:00
chriseth
7cb7818cea Source units are independent scopes. 2015-12-09 19:09:24 +01:00
Bob Summerwill
942666bce9 Fix a "Solidity::solidity" dependency edge in the CMake file for soltest, which got missed in the previous PR.
This change resolves an inconsistency which was discovered in the automated dependency graph generation.
softest was being declared as dependent on the Solidity module, not on just libsolidity, as it should be.
2015-12-05 19:15:53 -08:00
chriseth
8342424815 Increment version to 0.2.0 (includes breaking changes). 2015-12-01 16:06:14 +01:00
chriseth
7f415da886 Code generation for calling bound methods. 2015-12-01 12:35:34 +01:00
chriseth
e9c7837c15 Merge pull request #251 from chriseth/bind2
Bind library functions to types.
2015-11-30 16:06:44 +01:00
chriseth
a8736b7b27 Merge pull request #256 from chriseth/selfdestruct
Introduce selfdestruct alias for suicide.
2015-11-30 16:06:18 +01:00
chriseth
6796afc2f8 Bugfix for constructor unpacking with fixed-size arrays. 2015-11-29 01:03:39 +01:00
chriseth
f9e52c9db1 Also check the object type for bound functions. 2015-11-29 00:16:07 +01:00
chriseth
93b3237c6a Add bound functions to types. 2015-11-29 00:16:07 +01:00
chriseth
b97bb086de Introduce selfdestruct alias for suicide. 2015-11-29 00:10:07 +01:00
chriseth
d71cd3aa2b Added the using x for y directive. 2015-11-26 17:49:39 +01:00
chriseth
2e4f4e3363 Fix smart pointer lifetime issue in tests. 2015-11-26 15:37:55 +01:00
chriseth
b47d593252 Do not store elements of a contract by AST node type. 2015-11-26 15:37:55 +01:00
chriseth
879844dd0a Code generation for creating arrays. 2015-11-26 13:10:12 +01:00
chriseth
bf55aa6ae2 Type checking for creating new arrays. 2015-11-26 13:10:12 +01:00
chriseth
30b325fdc1 Allow "new expressions" also for general type names.
Breaking change: If you want to send value with a contract creation, you
have to use parentheses now:

`(new ContractName).value(2 ether)(arg1, arg2)`
2015-11-26 13:10:12 +01:00
chriseth
588e4232eb Test for allocation bug. 2015-11-24 14:54:18 +01:00
Gav Wood
2554d6104a Merge pull request #236 from ethereum/hot_gav
Fix up for new API from EIP-1.1.
2015-11-23 12:42:28 +01:00
Gav Wood
bff172cf65 Fix up for new API from EIP-1.1. 2015-11-21 14:34:21 +01:00
Gav Wood
58110b27c1 Merge remote-tracking branch 'origin/hot_gav' into develop 2015-11-20 00:06:58 +01:00
Gav Wood
9997aac163 Fix solidity tests. 2015-11-20 00:06:02 +01:00
chriseth
8dfc964e7d Merge pull request #227 from chriseth/addmod
Addmod and mulmod.
2015-11-19 13:16:13 +01:00
Gav Wood
3be0ae6e2c Merge pull request #204 from ethereum/hot_gav
The Big Refactor
2015-11-19 12:20:46 +01:00
chriseth
0cf8d022ae Addmod and mulmod. 2015-11-18 17:12:39 +01:00
chriseth
f4de369bad Merge pull request #218 from chriseth/fix_overwriteMemory
Fix memory overwrite problem for arrays.
2015-11-17 14:46:19 +01:00
chriseth
28c3f1839b Merge pull request #216 from chriseth/dynamic_indexed_event_args
Fix dynamic indexed event arguments - applies sha3.
2015-11-17 14:46:00 +01:00
chriseth
6411bf0026 Merge pull request #214 from chriseth/fix_optimizerTest
Test fix: Do not increment iterator past end.
2015-11-17 10:57:18 +01:00
Gav Wood
ad249e5787 Fix tests for new API. 2015-11-16 21:00:05 +01:00
chriseth
0c900f9b8a Fix memory overwrite problem for arrays. 2015-11-16 18:32:21 +01:00
chriseth
a35f91816b Fix dynamic indexed event arguments - applies sha3. 2015-11-16 17:09:09 +01:00
chriseth
8bd34ee2e9 Test fix: Do not increment iterator past end. 2015-11-16 16:39:47 +01:00
chriseth
9ef67bc756 Fix segfault during test. 2015-11-16 16:32:09 +01:00
chriseth
1bdc7eed31 Work around bug in MSVC/Boost for u256->unsigned conversion. 2015-11-16 11:47:19 +01:00
LianaHus
da47f9df7b style fixes 2015-11-06 20:56:14 +01:00
LianaHus
63060fc1f0 fixed test framework 2015-11-06 18:45:06 +01:00
Gav Wood
2f85153dcc Fixups for new API. 2015-11-06 14:23:18 +01:00
Gav Wood
a89fa99994 New vocab. 2015-11-06 13:26:20 +01:00
chriseth
a5c227778d Bugfix: Returning literal strings in tuples. 2015-10-31 23:13:45 +01:00
chriseth
b4f561680a Store docstrings in AST annotations. 2015-10-26 15:24:36 +01:00
Lefteris Karapetsas
a5a41e1f22 Allow building with new boost version 1.59 2015-10-24 23:11:01 +02:00
chriseth
e3dffb611f File reorganisation. 2015-10-21 00:46:01 +02:00
chriseth
87079bd3fd Correctly parse ambiguities like A.B[10] x and x.y[10] = 3. 2015-10-16 16:12:25 +02:00
chriseth
ead0478f26 Fix errors when struct array type is used on its own. 2015-10-16 14:36:30 +02:00
chriseth
1d4219d43d Some fixes taking other pull requests into account. 2015-10-15 18:14:14 +02:00
chriseth
029b819489 Wildcards. 2015-10-15 17:38:42 +02:00
chriseth
039b2a764f Destructuring assignments. 2015-10-15 17:38:42 +02:00
chriseth
7ebd536e79 Tuple expressions. 2015-10-15 17:38:42 +02:00
chriseth
7ba42f4707 Merge pull request #130 from LefterisJP/dynamic_array_push
Dynamic array push
2015-10-15 17:37:15 +02:00
LianaHus
292fb473bf renaming in test framework 2015-10-15 16:46:02 +02:00
LianaHus
162d021c3f some more style fixes 2015-10-15 16:27:26 +02:00
Lefteris Karapetsas
a823de2d58 push() for byte arrays also properly implemented 2015-10-15 14:37:11 +02:00
LianaHus
771f20b595 mainly style fixes/renaming 2015-10-15 14:36:23 +02:00
Lefteris Karapetsas
9224c1f712 Working implementation of arraypush
ByteArrayPush() gets a test but is ignored for now, since there are
still some issues with its implementation
2015-10-15 13:54:59 +02:00
LianaHus
0d0fd31fbf fix 2015-10-15 12:16:10 +02:00
LianaHus
675aed1edf fixed new tests 2015-10-15 11:50:25 +02:00
Lefteris Karapetsas
a521843f6b Implement Dynamic array push and fix test
Still a work in progress. There is a disturbance in the stack at the
moment and that's why there are some cout statements left for debugging.
2015-10-15 10:52:30 +02:00
Lefteris Karapetsas
763b544822 Add a dynamic array push() test 2015-10-15 10:52:30 +02:00
LianaHus
c3491e4469 errors instead of exceptions
Conflicts:
	libsolidity/CompilerStack.cpp
	libsolidity/NameAndTypeResolver.cpp
	libsolidity/NameAndTypeResolver.h
	libsolidity/TypeChecker.cpp
	test/libsolidity/SolidityNameAndTypeResolution.cpp
2015-10-14 20:37:41 +02:00
LianaHus
742e5b259a added Error class for all kind of errors
Conflicts:
	libsolidity/Exceptions.h
2015-10-14 20:27:41 +02:00
chriseth
72f7792f8e Some further test fixes. 2015-10-13 14:31:24 +02:00
chriseth
13d7bc4ee8 Some more tests and typos fixed. 2015-10-13 12:22:57 +02:00
chriseth
deebc7e860 Multi-variable declarations. 2015-10-13 12:16:23 +02:00
chriseth
a5d12b8761 Introduced tuple type and added multi variable declarations to type
checker.
2015-10-09 19:35:41 +02:00
chriseth
c54a033bf0 Tests for multi variable declaration. 2015-10-09 16:26:27 +02:00
chriseth
35de03626f Check invalid integer constants for functions accepting arbitrary arguments. 2015-10-07 18:13:20 +02:00
chriseth
24d04087d2 Resolve binary dependencies properly. 2015-10-07 17:35:07 +02:00
chriseth
68bf6e60c5 Merge pull request #122 from chriseth/anonymousEventsWithFourIndexedParams
Allow four indexed arguments for anynomous events.
2015-10-07 17:01:37 +02:00
chriseth
b6ddde9372 Allow four indexed arguments for anynomous events. 2015-10-07 16:40:54 +02:00
chriseth
0297a213fe Reject ether sent to library. 2015-10-06 22:55:45 +02:00
chriseth
d35a4b849d Merge pull request #117 from chriseth/internalTypesForLibrary
Internal types for library
2015-10-06 18:29:05 +02:00
chriseth
c6e637677b Merge pull request #115 from chriseth/testLongConstructorArguments
Test long constructor arguments.
2015-10-06 15:40:52 +02:00
chriseth
99351aebe0 Compiler version stamp. 2015-10-06 14:20:06 +02:00
chriseth
44e42bf52e Add structs to library interface. 2015-10-06 14:20:06 +02:00
chriseth
bf5b387954 Provide access to scoped structs. 2015-10-06 14:20:06 +02:00
chriseth
bc609c55c0 Compute canonical names of types for function signatures. 2015-10-06 14:20:06 +02:00
chriseth
ce25ddfa6a Encode storage items correctly for library calls. 2015-10-06 14:20:06 +02:00
chriseth
d2332769d3 Test for internal types. 2015-10-06 14:19:30 +02:00
chriseth
0950aa99a0 Test long constructor arguments. 2015-10-05 11:09:33 +02:00
chriseth
5e4166acb8 Report warning in tests if requested. 2015-10-02 23:18:54 +02:00
chriseth
da408640ca Store small byte arrays and strings in storage in one slot with their
length.
2015-10-02 13:12:23 +02:00
LianaHus
53d0684cb4 -fixed the warning printing
-style fixes
2015-10-02 12:38:48 +02:00
LianaHus
fe2b9a3b3c added warning for noninitialized references in storage. 2015-10-02 12:38:48 +02:00
LianaHus
db9cc9c6ef added test 2015-10-02 12:38:48 +02:00
chriseth
6161ec96ff Bugfix in calldata unpacker.
The offset was not specified correctly if memory activity preceded the
unpacker.
2015-10-01 16:50:11 +02:00
LianaHus
50827306a3 used throw statement instead of __throw() 2015-09-29 18:24:28 +02:00
chriseth
52f7e35843 Merge pull request #91 from chriseth/literalStringsToStoragePointer
Literal strings to storage pointer
2015-09-24 10:23:35 +02:00
chriseth
c4b7916c14 Test that literal strings cannot be assigned to storage pointers. 2015-09-23 17:34:03 +02:00
LianaHus
c096c3c349 improved the test 2015-09-23 17:31:47 +02:00
LianaHus
9547c4563c fixed-sized arrays as return type
Conflicts:
	test/libsolidity/SolidityEndToEndTest.cpp
2015-09-23 17:31:37 +02:00
chriseth
efdea76d5e Merge pull request #85 from chriseth/warnings
Support mulitple errors and warnings.
2015-09-23 14:42:54 +02:00
LianaHus
ed76798406 fixed the test 2015-09-22 14:03:09 +02:00
chriseth
34a81fd60e Refactoring: Check types outside of AST and recover from some errors. 2015-09-21 20:03:05 +02:00
LianaHus
e50400082b fixed using string as a type for struct member 2015-09-17 15:15:46 +02:00
LianaHus
e89b8d516b test
Conflicts:
	test/libsolidity/SolidityEndToEndTest.cpp
2015-09-17 15:15:36 +02:00
LianaHus
279a36b6f8 throw statement implementation 2015-09-16 13:25:32 +02:00
LianaHus
152bc642a6 style fix 2015-09-15 12:10:23 +02:00
LianaHus
dbb36a7a7b fixed rebase 2015-09-15 11:44:04 +02:00
LianaHus
9d44e65932 moved the test
Conflicts:
	test/libsolidity/SolidityEndToEndTest.cpp
	test/libsolidity/SolidityNameAndTypeResolution.cpp
2015-09-15 11:41:40 +02:00
LianaHus
466f5a4b88 returned test for exceptions in constructor 2015-09-15 11:40:20 +02:00
LianaHus
bc91464131 - changed implementation
- style fixes
2015-09-15 11:40:19 +02:00
LianaHus
7dbff2489f some fixes in tests 2015-09-15 11:40:19 +02:00
LianaHus
e21632555c added compile time check for out of bounds access for ordinary arrays
todo: check for dynamicaly sized arrays

Conflicts:
	test/libsolidity/SolidityEndToEndTest.cpp
2015-09-15 11:40:14 +02:00
LianaHus
626a57826c test 2015-09-15 11:37:56 +02:00
chriseth
4360e04596 Merge pull request #66 from chriseth/sol_libraries
Calling libraries.
2015-09-11 19:35:31 +02:00
chriseth
3c25420b84 Merge pull request #69 from LianaHus/sol_enum_too_many_indexed_args
too many indexed arguments for event
2015-09-11 15:48:43 +02:00
LianaHus
1d1386a58c add call for EventDefinition::checkTypeRequirements() 2015-09-11 15:24:11 +02:00
chriseth
976c380b61 Possibility to call library functions. 2015-09-11 15:21:37 +02:00
chriseth
a9edc7b1a6 Transition from bytecode to more general linker objects. 2015-09-11 15:21:37 +02:00
chriseth
337fde9d11 Parsing and type checking of libraries without inheritance. 2015-09-11 15:21:37 +02:00
chriseth
c5b6d9d2a9 Merge pull request #65 from LianaHus/sol_Creating_a_contract_from_within_itself
Added error when creating a contract from within itself
2015-09-11 15:19:58 +02:00
LianaHus
f5fc119dc8 added test
Conflicts:
	test/libsolidity/SolidityEndToEndTest.cpp
2015-09-11 14:59:54 +02:00
LianaHus
d570ab44c8 style fixes 2015-09-11 14:31:00 +02:00
LianaHus
47e42430f2 added type check if the type of the var decl is one of base contract type 2015-09-10 17:17:13 +02:00
LianaHus
30e89b3d9a added test
Conflicts:
	test/libsolidity/SolidityEndToEndTest.cpp
2015-09-10 15:05:10 +02:00
LianaHus
845bcf8db0 - added tests to test empty comment
- fixed skipSingleLineComment
- some style fixes
2015-09-10 14:26:34 +02:00
chriseth
3fc2561223 Merge pull request #51 from ethereum/revert-25-sol_strings_as_mapping_keys
Revert "added check for string as mapping key for local var."
2015-09-09 16:30:54 +02:00
chriseth
9967ae4038 Stylistic corrections. 2015-09-09 16:15:35 +02:00
chriseth
985eb80695 Fix for constant strings. 2015-09-08 16:51:14 +02:00
LianaHus
df8c82bc60 - renamed AST to ast and ABI to abi
- style fixes
2015-09-08 14:30:21 +02:00
LianaHus
02d4198242 removed get prefix
style fixes
2015-09-08 13:12:00 +02:00
LianaHus
1b5e6fc9e7 renamed getter functions 2015-09-08 13:12:00 +02:00
chriseth
9fc775269b Revert "added check for string as mapping key for local var." 2015-09-07 22:43:23 +02:00
Gav Wood
714223f552 Merge pull request #25 from LianaHus/sol_strings_as_mapping_keys
added check for string as mapping key for local var.
2015-08-27 22:36:35 +02:00
debris
1741e89c09 client refactor 2015-08-27 14:28:31 +02:00
Paweł Bylica
e4858023be Fix "add_sources" cmake macro. 2015-08-25 15:38:41 +02:00
Marek Kotewicz
40e65295ff Merge pull request #26 from arkpar/cmake
Refactored CMakeLists for new module system
2015-08-24 15:57:48 +02:00
arkpar
3ea1a62fa9 Refactoreed CMakeLists for new module system 2015-08-24 15:51:52 +02:00
LianaHus
4c7777128b added check for string as mapping key for local var. 2015-08-24 14:24:10 +02:00
LianaHus
ffcf18406b added test to check string as mapping key 2015-08-24 13:48:20 +02:00
LianaHus
1af8ff0121 add tests for state variables accessors. normal and constant
fixed the issue with accessors for constant state variables
2015-08-21 17:57:57 +02:00
chriseth
8d9eb68307 Modularise CMakeLists files and integrate tests. 2015-08-20 00:55:41 +02:00
chriseth
e985b285be Move Solidity tests. 2015-08-19 21:54:09 +02:00