Alex Beregszaszi
6d37f30d76
Rename Bare to Barecall
2017-08-01 10:47:10 +01:00
Alex Beregszaszi
d4e44ecb46
Disallow externalSignature for fallback functions
2017-07-27 21:52:58 +01:00
Alex Beregszaszi
9fc6eccc26
Add isFallback() helper
2017-07-27 21:52:57 +01:00
Alex Beregszaszi
89fadd6935
Merge pull request #2645 from ethereum/asserts
...
Use solAssert where possible
2017-07-27 11:12:30 +01:00
chriseth
1298a8df14
Merge pull request #2566 from ethereum/metadata-only-relevant
...
Metadata: only include relevant files in the source list
2017-07-27 11:07:15 +02:00
Alex Beregszaszi
8098030986
Use solAssert instead of boost throw where possible
2017-07-26 22:23:21 +01:00
chriseth
72917c4f35
Cleanup fixed point type changes
2017-07-19 22:13:42 +01:00
VoR0220
78769f3b39
Change fixed point types to have digit count
...
Signed-off-by: VoR0220 <rj@erisindustries.com>
2017-07-19 21:49:01 +01:00
Alex Beregszaszi
f3e591eedd
Add template for merging sets
2017-07-19 14:56:40 +01:00
Alex Beregszaszi
89a1e97e7d
Avoid cyclic imports in referencedSourceUnits
2017-07-19 14:56:40 +01:00
Alex Beregszaszi
ed592d6ccb
Add option to recurse referencedSourceUnits
2017-07-19 14:56:40 +01:00
Alex Beregszaszi
a9bddf71aa
Add referencedSourceUnits() helper
2017-07-19 14:56:40 +01:00
Alex Beregszaszi
1b0ef0b785
Add sourceUnit() helper to Declaration
2017-07-19 14:56:40 +01:00
Alex Beregszaszi
644de755dc
Mark modifiers as internal
2017-07-18 23:00:17 +01:00
Alex Beregszaszi
cb4875a28b
Issue error properly for oversized arrays for calldata
2017-07-13 22:33:46 +02:00
chriseth
d1c3ecc94a
Merge pull request #2567 from ethereum/refactorExceptions
...
Refactor exceptions and provide comment function.
2017-07-13 16:56:03 +02:00
chriseth
09e821619e
Refactor exceptions and provide comment function.
2017-07-13 11:34:03 +02:00
Federico Bond
f20b150f38
Add type error when attempting value transfer to a non-payable contract
2017-07-12 23:57:53 -03:00
chriseth
b7a59652f1
Merge pull request #2501 from ethereum/undef-macros
...
Move UndefMacros from libdevcore to libsolidity/parsing
2017-07-12 15:07:20 +02:00
chriseth
01a1296e90
Helper functions.
2017-07-11 11:24:41 +02:00
Alex Beregszaszi
b615b01449
Move UndefMacros from libdevcore to libsolidity/parsing
2017-07-02 00:09:46 +01:00
Alex Beregszaszi
c70d73809a
Use boost::starts_with
2017-06-28 17:01:55 +01:00
Alex Beregszaszi
06fe61f89b
Rename to isHexNumber()
2017-06-28 17:01:55 +01:00
Alex Beregszaszi
8b0c866f02
Add hasHexPrefix() to AST::Literal
2017-06-28 16:57:32 +01:00
chriseth
4407a13c17
Only allow equality checks for internal function types.
2017-06-26 16:30:37 +02:00
chriseth
f47e6e90fb
Disallow comparisons between some types.
2017-06-26 16:30:36 +02:00
chriseth
f340ff8764
Fix strings interpreted as addresses.
2017-06-22 16:48:44 +02:00
Alex Beregszaszi
d5f8ce90c7
Merge interface/Exceptions and interface/Utils
2017-06-22 11:25:07 +01:00
chriseth
21aafaa704
Merge pull request #2331 from ethereum/ASTDocumentationEntry
...
documentation field added to ContractDefinition-Node
2017-06-14 14:32:27 +02:00
djudjuu
62eafdd010
adjusted testcase and renaming
2017-06-06 13:26:23 +02:00
djudjuu
597bf8a43d
fix Literalprint
2017-05-30 19:53:32 +02:00
djudjuu
2e7190534b
documentation field added to ContractDefinition-Node
2017-05-30 18:52:43 +02:00
chriseth
451acd4c9f
Merge pull request #2301 from ethereum/ASTFunctionTypeFix
...
insert ParameterList-node in FunctionType-json
2017-05-24 14:28:07 +02:00
djudjuu
26abd61d9b
insert ParameterList-node in FunctionType-json
2017-05-24 13:52:16 +02:00
Alex Beregszaszi
604d254e8c
Fix AST JSON converter type lookup
2017-05-23 23:12:40 +01:00
djudjuu
e82df073d1
minor fixes and changelog update
2017-05-22 12:25:50 +02:00
djudjuu
1d22233a43
refactoring functionCallAnnotation
2017-05-19 15:48:07 +02:00
djudjuu
6316a76ab9
testsuite adjustment
2017-05-19 09:51:23 +02:00
djudjuu
e3583d04f7
include new InlineAssemblyInformation into JSON
2017-05-17 15:58:28 +02:00
djuju
a4ba5ace8a
prefixChanges and contractKind-field
2017-05-17 11:14:33 +02:00
djuju
2fa7646944
fixed styletypos, renaming and added helperfunction
2017-05-17 11:14:33 +02:00
Alex Beregszaszi
487eef18cc
Use different AST node names in legacy and new format
2017-05-17 11:14:33 +02:00
chriseth
dea7b864e6
Compact format for AST-Json with backwards compatibility
2017-05-17 11:14:33 +02:00
chriseth
f3ec2ba39e
Refactor to combined scope and stack height info.
2017-04-26 17:12:04 +02:00
chriseth
478f2997ea
Storage access from inline assembly.
2017-04-25 16:49:04 +02:00
chriseth
dfb7d5ebd9
Move analysis out of code generator.
2017-04-25 16:49:04 +02:00
chriseth
e0849f2f3b
Split external identifier access into resolving and code generation.
2017-04-25 16:49:03 +02: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
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
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
47cd8964b8
Require and Assert.
2017-03-14 14:21:33 +01:00
chriseth
f39763e91c
Type checking for pure expressions.
2017-03-13 13:30:21 +01:00
Ryan Casey
fe8d09a3c1
Fix 'ambiguous overload for operator==' Boost error.
2017-03-09 17:04:26 -08: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
a689152c4b
Convert reference types to pointers in member function conversion.
2017-03-01 16:02:36 +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
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
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
Alex Beregszaszi
f3158f92d6
Support revert()
2017-02-10 22:40:42 +00:00
Alex Beregszaszi
f8461e9e31
Implement assert as a global function
2017-02-10 13:29:17 +00:00
Alex Beregszaszi
c01f5699e6
Add isNegative to RationalNumberType
2017-02-02 00:16:50 +00:00
Alex Beregszaszi
767ec1d670
Support explicit conversion of external function type to address
2017-02-01 12:23:47 +00:00
chriseth
a9c6ff4ac8
Refactor json return type generation.
2017-01-26 18:21:19 +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
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
Yoichi Hirai
6c15757618
Type checker: move the burden of computing mobile type to commonType
...
This solves #621
2016-11-11 15:51:54 +01:00
Rhett Aultman
4524ad0870
Add support for do/while loops
...
This commit adds support for a standard do <statement> while <expr>;
form of statement. While loops were already being supported; supporting
a do/while loop mostly involves reusing code from while loops but putting
the conditional checking last.
2016-11-10 07:07:25 -08:00
yann300
02416d4460
add payable to AST
2016-11-03 16:36:38 +01:00
Yoichi Hirai
3ca5900b8c
ast: ban signed EXP, fixing #1246
2016-10-25 16:49:10 +02:00
chriseth
f25aa0c68b
More checks for missing mobile type.
2016-10-24 16:45:25 +02:00
chriseth
2b00804d1d
Fix crash in throw.
2016-10-24 14:32:49 +02:00
chriseth
cb1fcaf6f6
Merge pull request #1240 from ethereum/1151
...
ast: super contract type does not contain native members
2016-10-24 11:45:54 +02:00
Yoichi Hirai
9d9380d30e
ast: add a null check
2016-10-21 13:01:45 +02:00
Yoichi Hirai
83e8fdecc5
ast: ContractDefinition::inheritableMembers contains enums as well as structs
...
This fixes #1131
2016-10-21 13:01:45 +02:00
Alex Beregszaszi
7b0fb5d06b
Support variable references within modifiers for inline assembly
2016-10-20 23:45:13 +01:00
Yoichi Hirai
7887045a48
ast: simplifications suggested by @chriseth
2016-10-20 16:09:52 +02:00
Yoichi Hirai
ff9039b2a8
When a contract type is super, its members do not contain the functions of itself
...
Fixes #1151
2016-10-20 16:09:52 +02:00
Alex Beregszaszi
7ac27c957e
Use >> (SAR) to denote constant shifts
2016-10-20 00:03:09 +01:00
Alex Beregszaszi
33250eef9e
Reject negative shifts within constants
2016-10-20 00:03:09 +01:00
RJ
48f2028911
Support shifting constants
2016-10-20 00:03:09 +01:00
Alex Beregszaszi
fdd1108c1c
Omit non-convertible bound functions
2016-10-19 10:41:04 +01:00
Alex Beregszaszi
003359a0b6
Ensure that bound functions cannot be defined without self type
2016-10-19 10:41:04 +01:00
Yoichi Hirai
d2470a3e39
super
's size on stack is zero, because the expression compiler does not push an address.
...
This is different from `this`, which is translated to `ADDRESS` instruction.
2016-10-18 14:17:49 +02:00