Alex Beregszaszi
2067a00f22
Disallow private or internal functions in interfaces
2017-03-17 17:07:18 +00:00
Alex Beregszaszi
d5102c1db7
Disallow constructor in interfaces
2017-03-17 17:06:52 +00:00
Alex Beregszaszi
2c4bce2d62
Disallow enums in interfaces
2017-03-17 17:06:52 +00:00
Alex Beregszaszi
16a91ef90a
Use declared instead of defined
2017-03-17 17:06:52 +00:00
Alex Beregszaszi
f8da9a8fd5
Factor out tokenToContractKind
2017-03-17 17:06:52 +00:00
Alex Beregszaszi
4693aed177
Reject invalid definitions for interface contracts
2017-03-17 16:27:04 +00:00
Alex Beregszaszi
54230d2d5d
Support interface (contract) keyword in the parser
2017-03-17 16:27:04 +00:00
Alex Beregszaszi
6d4628ace4
Add ContractKind to ContractDefinition
2017-03-17 16:27:04 +00:00
chriseth
c37397c178
Merge pull request #1773 from ethereum/ASTEntry
...
Ast entry
2017-03-17 17:24:58 +01:00
chriseth
44a0329921
Comment.
2017-03-17 14:44:44 +01:00
chriseth
245c8914cf
Merge pull request #1792 from ethereum/function-kind
...
Rename FunctionType::Location to Kind
2017-03-17 10:25:58 +01:00
Alex Beregszaszi
e0ff70778a
Rename ErrorMesage to ErrorMessage
2017-03-16 23:59:36 +00:00
djudjuu
616a9854e9
AST entry for VariableDeclaration
2017-03-16 16:56:44 +01:00
Alex Beregszaszi
3ae88377d6
Change references to FunctionType::Location
2017-03-16 12:49:52 +00:00
Alex Beregszaszi
7123f25210
Rename FunctionType::Location to FunctionType::Kind
2017-03-16 12:49:17 +00:00
chriseth
0c8a766146
Merge pull request #1698 from ethereum/exp-notation
...
Fix scientific notation in number literals
2017-03-15 14:55:45 +01:00
Alex Beregszaszi
e923f27ea8
Split out parseRational from isValidLiteral
2017-03-15 13:06:27 +00:00
Alex Beregszaszi
dde87de4cf
Rename x to value
2017-03-15 13:06:27 +00:00
Alex Beregszaszi
a2b9f52ca4
Disallow radix points in hex literals
2017-03-15 13:06:27 +00:00
Alex Beregszaszi
07045d492f
Do not try parsing hex numbers as scientific notation
2017-03-15 13:06:27 +00:00
Alex Beregszaszi
dfc8f890bf
Support older version of boost
2017-03-15 13:06:27 +00:00
Alex Beregszaszi
1083e6da68
Support negative exponent
2017-03-15 13:06:26 +00:00
Alex Beregszaszi
924a8fff6b
Fix exponentional notation in number literals
2017-03-15 13:06:24 +00:00
chriseth
ab178b8bac
Mention 'transfer' in warning about unchecked 'send'.
2017-03-15 11:10:24 +01:00
Yoichi Hirai
d134fda0c0
Merge pull request #1729 from ethereum/constantvariables
...
Only allow pure expressions for constant state variables.
2017-03-15 10:03:35 +01:00
chriseth
9f328ff749
Turn non-constant constants error into warning.
2017-03-14 19:25:16 +01:00
chriseth
47cd8964b8
Require and Assert.
2017-03-14 14:21:33 +01:00
chriseth
592cec7e90
Disallow constants that are neither value types nor strings.
2017-03-13 13:30:23 +01:00
chriseth
14948e514d
Allow enum values for constants.
2017-03-13 13:30:23 +01:00
chriseth
f39763e91c
Type checking for pure expressions.
2017-03-13 13:30:21 +01:00
Yoichi Hirai
ef8b56a058
Merge pull request #1751 from ethereum/warnLiteralExpBase
...
Warn if base of exponentiation operation is a literal.
2017-03-10 19:25:47 +01:00
Ryan Casey
fe8d09a3c1
Fix 'ambiguous overload for operator==' Boost error.
2017-03-09 17:04:26 -08:00
Ryan Casey
797e05ba08
Resolve build-stopping error about 'minor' and 'major' being defined in <sys/types.h>
2017-03-09 17:03:19 -08:00
Yoichi Hirai
e364909e06
Merge pull request #1747 from ethereum/fixICEInternalConstructor
...
Move privateness of constructor into AST itself.
2017-03-08 17:49:14 +01:00
chriseth
3f9a775834
Merge pull request #1748 from ethereum/singletonArray
...
Use mobile type for singleton array.
2017-03-08 16:11:03 +01:00
chriseth
93ef7fd260
Disallow compound assignment for tuples.
2017-03-08 12:42:07 +01:00
Yoichi Hirai
78f7dd2344
Merge pull request #1750 from ethereum/asmoctal
...
Disallow octal numbers in parser.
2017-03-08 12:24:22 +01:00
Yoichi Hirai
a1e350a4ae
Merge pull request #1699 from ethereum/asmlabels
...
Assembly labels with stack information
2017-03-08 11:56:44 +01:00
chriseth
1324ebc4bf
Warn about literal constant base in exponentiation.
2017-03-07 13:44:11 +01:00
chriseth
bb06569dc6
Disallow octal literals.
2017-03-07 12:34:32 +01:00
chriseth
a2ac05e1a2
Merge pull request #1733 from ethereum/selfReferentialConstant
...
Detect cyclic dependencies between constants.
2017-03-06 17:18:39 +01:00
chriseth
2fcccb97d3
Merge pull request #1737 from ethereum/localmappings
...
Disallow uninitialized mapping variables.
2017-03-06 15:05:58 +01:00
chriseth
5c5d83fd70
Check for circular references in constant variables.
2017-03-06 15:05:09 +01:00
chriseth
c500d9f717
Convert to mobile type for array type.
2017-03-06 14:42:28 +01:00
chriseth
c126edc6ea
Disallow uninitialized mapping variables.
2017-03-06 14:27:18 +01:00
chriseth
960b5fa032
Error constructor.
2017-03-06 14:27:18 +01:00
chriseth
f300bdb020
Move public constructor property into AST itself.
2017-03-06 14:12:42 +01:00
chriseth
ca4e2933dd
Strict checking for AST annotation types.
2017-03-06 14:12:42 +01:00
chriseth
f521fd7b19
Mention way to remove warning.
2017-03-06 13:37:57 +01:00
Yoichi Hirai
cfbbd89daf
Merge pull request #1702 from ethereum/assertError
...
Change effect of assert to invalid opcode.
2017-03-03 18:25:50 +01:00
chriseth
f8ce32f2a6
Fix error message.
2017-03-03 15:41:02 +01:00
chriseth
369005fc03
Remove stack annotations again.
2017-03-03 15:41:02 +01:00
chriseth
13fd569f76
First reset stack height, then register variables.
2017-03-03 15:41:02 +01:00
chriseth
455e8a4ef8
Move lambda.
2017-03-03 15:41:02 +01:00
chriseth
41236cd08c
Slightly cleaner label ids.
2017-03-03 15:41:02 +01:00
chriseth
e963405a19
Partially add functions.
2017-03-03 15:41:02 +01:00
chriseth
647473cf01
Generic visitor.
2017-03-03 15:41:02 +01:00
chriseth
caa3761dc9
Refactor variable access.
2017-03-03 15:41:02 +01:00
chriseth
25dcfa3480
Refactor CodeGen to recurse on blocks.
2017-03-03 15:41:01 +01:00
chriseth
7f2def8971
Analysis refactoring.
2017-03-03 15:41:01 +01:00
chriseth
98e343b3fc
Parsing of labels with stack info.
2017-03-03 15:41:01 +01:00
chriseth
cc01d870ff
Disallow variable declaration with inferred empty tuple type.
2017-03-02 14:33:58 +01:00
chriseth
5c411b472b
Merge pull request #1728 from ethereum/externalfunctiontypes
...
Convert reference types to pointers in member function conversion.
2017-03-02 12:08:17 +01:00
chriseth
a689152c4b
Convert reference types to pointers in member function conversion.
2017-03-01 16:02:36 +01:00
chriseth
7a24a5764e
Add line info to serious exceptions.
2017-02-24 19:32:41 +01:00
chriseth
d2c79bf8e9
Merge pull request #1700 from ethereum/fixNoMobile
...
Some checks for the existence of mobile type.
2017-02-24 15:50:45 +01:00
chriseth
92bf5154fd
Merge branch 'develop' into fixNoMobile
2017-02-24 10:39:55 +01:00
Alex Beregszaszi
4d290e551c
Disallow setting .gas() on .transfer()
2017-02-24 00:27:36 +00:00
Alex Beregszaszi
c674155e58
Do not keep the gas stipend if sending non-zero value
2017-02-24 00:18:18 +00:00
Alex Beregszaszi
81006dae98
Support gas modifier on addr.transfer()
2017-02-24 00:18:18 +00:00
Alex Beregszaszi
4264625c69
Implement address.transfer()
2017-02-24 00:17:45 +00:00
chriseth
4b1e8111cc
Remove assert for now.
2017-02-23 19:43:40 +01:00
chriseth
c0961664f9
Deposit one stack item for non-value types in inline assembly type checking.
2017-02-20 12:33:22 +01:00
chriseth
7bdc4ddab2
Merge pull request #1627 from ethereum/asmfunctions
...
Parsing assembly function definitions and calls.
2017-02-16 20:12:31 +01:00
chriseth
811bb770c5
Change effect of assert to invalid opcode.
2017-02-16 15:54:17 +01:00
chriseth
c3c3cccbec
Fix early exist for fatal errors.
2017-02-16 14:57:00 +01:00
chriseth
dcc16c81e2
Some checks for the existence of mobile type.
2017-02-16 11:46:27 +01:00
chriseth
a5ce81100e
Assembly printer for functions.
2017-02-16 10:18:12 +01:00
chriseth
49a919b3e0
Parsing function calls.
2017-02-16 10:15:22 +01:00
chriseth
5d584aded8
Parsing function definitions.
2017-02-16 10:15:22 +01:00
chriseth
24197a2b3f
Assembly printing fixes.
2017-02-14 15:41:25 +01:00
chriseth
ca71b7624d
Review changes.
2017-02-14 15:41:25 +01:00
chriseth
80f7243786
Assembly printer.
2017-02-14 15:41:25 +01:00
chriseth
a791ec75e2
Review comments.
2017-02-14 13:32:48 +01:00
chriseth
b1bb228ab3
Allow different entry scope for registerDeclarations.
2017-02-14 13:23:44 +01:00
chriseth
e67faa9839
Extract scopes into compiler stack.
2017-02-14 13:23:44 +01:00
chriseth
c87bafd2ed
Refactor type system to allow multiple entry points.
2017-02-14 13:23:44 +01:00
chriseth
fc8e50f688
Refactor NameAndTypeResolver and SyntaxChecker to allow other entry points.
2017-02-14 13:23:44 +01:00
Alex Beregszaszi
c8ec79548b
Use the revert opcode in assert()
2017-02-10 22:53:32 +00:00
Alex Beregszaszi
586d156f33
Use the REVERT opcode for throw;
2017-02-10 22:41:09 +00:00
Alex Beregszaszi
f3158f92d6
Support revert()
2017-02-10 22:40:42 +00:00
Alex Beregszaszi
8a3d4a0500
Cleanup is not needed for assert()
2017-02-10 13:32:36 +00:00
Alex Beregszaszi
f8461e9e31
Implement assert as a global function
2017-02-10 13:29:17 +00:00
Alex Beregszaszi
693226b1ab
Rename SUICIDE opcode to SELFDESTRUCT in libevmasm
2017-02-06 20:17:52 +00:00
Alex Beregszaszi
ba0015cf25
Warn early when exhausting stack
2017-02-02 11:39:29 +00:00
Alex Beregszaszi
697db80b48
Disallow arrays with negative length
2017-02-02 00:24:45 +00:00
Alex Beregszaszi
c01f5699e6
Add isNegative to RationalNumberType
2017-02-02 00:16:50 +00:00
Alex Beregszaszi
4361797ddc
Only capture function type to address conversion
2017-02-01 12:23:47 +00:00
Alex Beregszaszi
ce62c7c01c
Be more verbose on the stack-mismatch errors
2017-02-01 12:23:47 +00:00
Alex Beregszaszi
767ec1d670
Support explicit conversion of external function type to address
2017-02-01 12:23:47 +00:00
chriseth
b2c35fb41a
Merge pull request #1598 from wuestholz/develop
...
Change translation of implicit throws
2017-01-27 14:10:22 +01:00
chriseth
636e480156
Merge pull request #1451 from LefterisJP/fix_build
...
Accept any kind of whitespace after natspec tags
2017-01-27 14:09:39 +01:00
chriseth
0e021e76a5
Minor changes.
2017-01-27 11:19:48 +01:00
chriseth
bff8fc23e6
Changelog and review suggestions.
2017-01-27 10:18:53 +01:00
Lefteris Karapetsas
98b51b378e
More verbose function naming
2017-01-27 00:09:00 +01:00
Lefteris Karapetsas
cc7834f2a9
Doc tags followed by newline are now parsed properly
2017-01-27 00:00:05 +01:00
chriseth
a9c6ff4ac8
Refactor json return type generation.
2017-01-26 18:21:19 +01:00
chriseth
a98fa41897
Uninitialized internal function should call INVALID.
2017-01-26 16:39:07 +01:00
chriseth
d9fbb83861
Allow inserting low-level functions without calling them.
2017-01-26 16:39:07 +01:00
chriseth
390bebaaf9
Split line.
2017-01-26 16:39:07 +01:00
Valentin Wüstholz
5b7cc018f0
Address feedback from code review.
2017-01-26 16:39:07 +01:00
Valentin Wüstholz
9bcbd93ac5
Change translation of implicit throws (issue #1589 ).
...
This adds a new invalid instruction that is used for encoding
implicit throws that are emitted by the compiler. This makes it
possible to distinguish such runtime errors from user-provided,
explicit throws.
2017-01-26 16:39:07 +01:00
Alex Beregszaszi
102fd7ee5d
Merge pull request #1604 from ethereum/checksums
...
Warn about invalid checksums of addresses.
2017-01-26 14:42:34 +00:00
Alex Beregszaszi
fcf483ee6b
Add option to store literal sources in metadata
2017-01-26 13:16:26 +00:00
chriseth
873f2dddd6
Update error message.
2017-01-26 13:52:02 +01:00
chriseth
525758a130
Disallow assignment to non-identifiers.
2017-01-26 13:40:40 +01:00
chriseth
f62e269115
Disallow instructions in assignment.
2017-01-25 17:29:06 +01:00
chriseth
a5696e1f0a
Renamed function.
2017-01-25 17:26:11 +01:00
chriseth
27ba665694
Moved test.
2017-01-25 17:24:43 +01:00
Alex Beregszaszi
900c56d996
Do not allow shadowing inline assembly instructions with variables
2017-01-25 11:28:09 +00:00
Lefteris Karapetsas
9ca0fde853
Fix and better output for tests
2017-01-25 11:01:52 +01:00
Lefteris Karapetsas
5738e865d5
Accept any kind of whitespace after natspec tags
2017-01-25 11:01:52 +01:00
chriseth
3949624a61
Also check library addresses.
2017-01-24 23:37:48 +01:00
chriseth
1316bb7565
Warn about invalid checksums of addresses.
2017-01-24 23:37:48 +01:00
chriseth
ead1a3b33f
Include creation code only once.
2017-01-24 17:41:31 +01:00
chriseth
7e6f1b3f00
Use int arithmetics for stack adjustment.
2017-01-24 12:07:09 +01:00
chriseth
23eca813f5
Change clearStorageLoop to TypePointer.
2017-01-24 12:07:09 +01:00
chriseth
82a00e7dc5
Use shared_ptrs to enable shared_from_this.
2017-01-24 12:06:41 +01:00
chriseth
cea020b89e
Convert ArrayUtils routines into low-level functions.
2017-01-24 12:06:40 +01:00
chriseth
b60623521f
Move some util functions to low-level functions.
2017-01-24 12:06:40 +01:00
chriseth
d0e8d340a5
Low level named functions for CompilerContext.
2017-01-24 12:06:40 +01:00
chriseth
b52a60402d
Merge pull request #1245 from ethereum/1215
...
Allow multiple events of the same name
2017-01-24 11:52:21 +01:00
Yoichi Hirai
4e1fd68b38
analysis: disallow overloading functions with events
2017-01-23 15:25:13 +01:00
Yoichi Hirai
399b7b695a
analysis: fix format
2017-01-23 15:25:13 +01:00
Yoichi Hirai
846f7dc3ea
analysis: Resolve event overloading
2017-01-23 15:25:13 +01:00
Yoichi Hirai
08015590f2
analysis: Allow multiple events of the same name
...
Fixes #1215
2017-01-23 15:25:13 +01:00
Yoichi Hirai
9c278448c8
Merge pull request #1591 from ethereum/stackTooDeepLocation
...
Report source location on "stack too deep" errors.
2017-01-23 15:02:22 +01:00
chriseth
0ef460461a
Check if constructor is public or not.
2017-01-20 19:22:39 +01:00
chriseth
2536bdd6d0
Report source location on "stack too deep" errors.
2017-01-20 19:01:19 +01:00
Yoichi Hirai
12b002b3b8
Merge pull request #1576 from ethereum/typeIdentifiers
...
Type identifiers.
2017-01-20 16:18:57 +01:00
chriseth
07b0a0a560
Make m_id const.
2017-01-20 15:56:56 +01:00
chriseth
7159944f0f
Reset AST node IDs between compilation runs.
2017-01-20 12:00:16 +01:00
chriseth
da178d967f
Properly escape user strings and lists.
2017-01-19 13:23:58 +01:00
chriseth
3fed790a56
Type identifiers.
2017-01-19 13:23:57 +01:00
chriseth
23a654ade8
Fix default function type name visibility.
2017-01-19 11:11:40 +01:00
Federico Bond
d40ae663ec
Fix typo in comment
2017-01-18 12:43:23 -03:00
chriseth
28a05e5aa3
Merge pull request #1581 from ethereum/fixosx
...
Fix JSON output on macos.
2017-01-18 15:41:39 +01:00
chriseth
005e190885
Merge pull request #1397 from roadriverrail/contract_collision
...
Error out when contracts collide on name
2017-01-18 14:28:00 +01:00
chriseth
c16e141ffb
Fix JSON output on macos.
2017-01-18 14:09:40 +01:00
Alex Beregszaszi
4675599170
Include SOL_VERSION_COMMIT/SOL_VERSION_PLATFORM in buildinfo.h
2017-01-17 12:54:58 +00:00