Commit Graph

179 Commits

Author SHA1 Message Date
chriseth
0ef460461a Check if constructor is public or not. 2017-01-20 19:22:39 +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
chriseth
99eaadd2cd Deterministic AST node identifiers. 2017-01-17 10:45:45 +01:00
Rhett Aultman
f10bf36ae3 Move fullyQualified() name to Declaration 2017-01-16 12:32:57 -05:00
Rhett Aultman
0c98e4b2da Stylistic corrections 2017-01-16 12:32:57 -05:00
Rhett Aultman
8f25bd54e3 Drop ':' if the source file name is empty
A large number of tests compile contracts while passing in an empty
string for the source name.  This leads to it being keyed by the name
":<contract>", while the tests try to look it up under the name
"<contract>".  This change resolves that issue by dropping the ':' in
cases where there is, effectively, no source file to prepend anyway.
2017-01-16 12:32:57 -05:00
Rhett Aultman
071b936b37 Only avoid collision if it's the same file
@chriseth had suggested that it would be better if contracts were
referenced in a file:contract notation, and that we output .bin files
that prepend original path names if necessary to avoid a collision.

This commit is mostly a draft; it still needs to be run through the test
suite.
2017-01-16 12:32:57 -05:00
Yoichi Hirai
abc24420a7
ast: events have FunctionType too 2017-01-11 20:06:59 +01:00
Yoichi Hirai
eda147f47b
ast: add Declaration::functionType() 2017-01-11 19:55:50 +01:00
Yoichi Hirai
6a312233fc
ast, codegen: enable accessing events through contract names.
Fixes #1286
2017-01-02 17:59:20 +01:00
Yoichi Hirai
f8fe6e4f7c Merge pull request #1503 from federicobond/json-visibility
Include visibility level for functions in AST
2016-12-14 17:23:14 +01:00
Yoichi Hirai
18f8f29c0a Merge pull request #1487 from ethereum/shift-ops
Shift operators
2016-12-14 16:31:27 +01:00
Federico Bond
de720e643d Improve error message when trying to modify constant variables 2016-12-13 00:32:37 -03:00
Federico Bond
9ed65f2ab9 Include visibility level for functions in AST 2016-12-12 16:21:57 -03:00
chriseth
2738045030 Cleaner shift handling and type conversion for binary operations. 2016-12-12 11:12:12 +01:00
chriseth
2df60bec92 Type after shift should be type of left operand. 2016-12-12 11:12:12 +01:00
Alex Beregszaszi
b8b4f5e9f9 Support bitshifting in variables 2016-12-12 11:12:10 +01:00
chriseth
d2b8bdd016 Merge pull request #1464 from federicobond/warn-msgvalue
Warn about using msg.value in non-payable function
2016-12-11 16:46:06 +01:00
Federico Bond
df76230240 Fix names of JSON AST nodes 2016-12-11 02:07:08 -03:00
Federico Bond
05139500fb Warn about using msg.value in non-payable function 2016-12-08 16:22:13 -03:00
chriseth
91ecc4533d Add swarm hash to the end of the bytecode. 2016-12-01 16:03:59 +01:00
chriseth
5789eaa78d Metadata stamp. 2016-12-01 16:03:59 +01:00
Alex Beregszaszi
a9e92cb686 Rename dev::validate to dev::validateUTF8 2016-11-28 22:28:21 +00:00
Alex Beregszaszi
c01426efec Make position optional in dev::validate 2016-11-28 22:27:55 +00:00
chriseth
da566b956e Indentation. 2016-11-25 14:36:44 +01:00
Yoichi Hirai
e136ec8704
ast: string literals that are not valid UTF are not convertible to strings 2016-11-25 13:36:06 +01:00
VoR0220
3f9f725737 Fix licensing headers
Signed-off-by: VoR0220 <rj@erisindustries.com>
2016-11-23 12:22:33 +01:00
chriseth
2c14a96820 Some more assertions and style changes. 2016-11-16 15:09:01 +01:00
chriseth
ec31d08775 Change encoding to address-funid and add "function" as ABI type. 2016-11-16 14:37:19 +01:00
chriseth
22b4d1b29a Check that no internals are used in any external function type. 2016-11-16 14:37:18 +01:00
chriseth
925d674146 Disallow payable internal functions. 2016-11-16 14:37:18 +01:00
chriseth
f21f794f3c delete for function types 2016-11-16 14:37:18 +01:00
chriseth
ff3553a348 Change alignment. 2016-11-16 14:37:18 +01:00
chriseth
62492b67e7 Changelog entry and small fixes. 2016-11-16 14:37:18 +01:00
chriseth
6f19559de0 Fix some type checks and tests for internal / external function parameters. 2016-11-16 14:37:17 +01:00
chriseth
dd173f83e3 Code generator for function types. 2016-11-16 14:37:17 +01:00
chriseth
cc8583ec7d Function types. 2016-11-16 14:37:17 +01:00
Alex Beregszaszi
9719cf38e6 Move InterfaceHandler from string to JSON 2016-11-15 15:55:25 +00:00
Alex Sinyagin
6db9fd498a Print canonical names of structs and enums in AST 2016-11-14 13:39:46 +00:00
Yoichi Hirai
20c2ca3992
ast, codegen: disallow conversion between different enum types 2016-11-11 17:48:03 +01:00
Yoichi Hirai
e6098f0039
ast: add EnumType::numberOfMembers() 2016-11-11 17:47:48 +01:00