Commit Graph

567 Commits

Author SHA1 Message Date
chriseth
9920e88eea Clear all value types prior to storing. 2016-10-31 16:40:30 +01:00
Yoichi Hirai
3ca5900b8c
ast: ban signed EXP, fixing #1246 2016-10-25 16:49:10 +02:00
chriseth
762f7ac250 Suggest correct version for pragma and complain about pre-release version. 2016-10-25 13:45:50 +02:00
chriseth
2f7c847ce4 Merge pull request #1279 from ethereum/semver-helper
Export major/minor/patch helpers on SemVerVersion
2016-10-25 13:20:08 +02:00
Alex Beregszaszi
7a988555c3 Export major/minor/patch helpers on SemVerVersion 2016-10-25 12:13:41 +01:00
chriseth
e00a4b47c0 Merge pull request #1264 from ethereum/988
State variable under contract's name
2016-10-25 12:50:24 +02:00
Yoichi Hirai
59f6c18c2b
analysis: determine if a member access on a contract is an l-value 2016-10-24 19:31:57 +02:00
chriseth
f25aa0c68b More checks for missing mobile type. 2016-10-24 16:45:25 +02:00
Yoichi Hirai
5245a3cf74
codegen: refactor common code 2016-10-24 16:34:23 +02:00
Yoichi Hirai
acba7b92e5
codegen: if a member access has been resolved as a variable, follow that
This fixes at least the first example in #988
2016-10-24 16:34:23 +02:00
Yoichi Hirai
7cee39fc17
codegen: skip contract L for L.Foo where Foo is a type
Fixes #1116
2016-10-24 15:30:26 +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
0e33b63468 Allow warnings for inline assembly block 2016-10-20 13:25:28 +01:00
Alex Beregszaszi
c3330faf21 Issue warnings if stack is not balanced after inline assembly block 2016-10-20 13:25:28 +01:00
Alex Beregszaszi
0dd75ac100 Use warning function in TypeChecker 2016-10-20 13:25:28 +01: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
d18e56661d Disallow unsupported RValues in inline assembly 2016-10-19 20:44:15 +01:00
Alex Beregszaszi
9616470f67 Disallow magic variables in inline assembly 2016-10-19 20:44:15 +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
Yoichi Hirai
8e11bac8de
Check if a fixedBytes fits an integer type
before looking up the size of the integer type.

Fixes #1150.
2016-10-13 20:17:13 +02:00
Alex Beregszaszi
48ac970677 Merge pull request #1169 from ethereum/inline-assembly-tags
Fix assignment after tags in inline assembly
2016-10-12 00:00:28 +01:00
chriseth
821fe6e916 Merge pull request #1181 from ethereum/formal_ignore_pragma
formal: ignore pragmas during Why3 code generation
2016-10-11 16:29:32 +02:00
Alex Beregszaszi
d0791fb365 Fix assignment after tags in inline assembly 2016-10-11 12:28:49 +01:00
Yoichi Hirai
ab1f4632aa Chack for non-version pragmas 2016-10-11 00:07:11 +02:00
Yoichi Hirai
092e5829d8 formal: ignore pragmas during Why3 code generation
Fixes #1177
2016-10-11 00:01:29 +02:00
Yoichi Hirai
7ae68e1e47 Fix pragma keyword check
Fixes #1192
2016-10-11 00:00:22 +02:00
chriseth
d3f410d8a8 Merge pull request #1189 from NicolaiSoeborg/develop
Add HexLiteral to grammar, fixes #1186
2016-10-10 23:41:55 +02:00
Nicolai
e923a5e190 Fix: HexLiteral must be even number of nibbles
solc even allow 0 nibbles:
bytes a = hex"";
2016-10-10 23:08:44 +02:00
chriseth
0b1d449057 Merge pull request #1168 from ethereum/rename-dev-sha3
Rename dev::sha3 to dev::keccak256
2016-10-10 21:23:27 +02:00
Nicolai
f6195c0a46 Add HexLiteral to grammar, fixes #1186 2016-10-10 19:42:42 +02:00
Alex Beregszaszi
ae0477744c Support address in inline assembly 2016-10-06 22:05:01 +01:00
Alex Beregszaszi
34df80c502 Add alias keccak256() for sha3() 2016-10-06 16:34:41 +02:00
Alex Beregszaszi
aefb6e5fcf Rename dev::sha3 to dev::keccak256 2016-10-06 14:53:40 +01:00
Alex Beregszaszi
6afdee5958 Support both suicide/selfdestruct in inline assembly 2016-10-06 12:44:33 +01:00
chriseth
212e016091 Merge pull request #1104 from ethereum/fixmemcosts
Fix memory resize costs during call
2016-09-17 12:30:41 +02:00
chriseth
5a45990458 Access output memory area so that we do not pay for resize during call. 2016-09-17 11:29:54 +02:00
chriseth
727c6fac85 Allow value transfer to library functions. 2016-09-17 11:29:27 +02:00
chriseth
031fd568cc Fix crash for TypeName[k]. 2016-09-15 18:16:34 +02:00
Yoichi Hirai
4337e70cca Prepare for leaky exceptions
Now toFormalType() reports errors by exceptions, they will be
sometimes leaked to the wider context.  This commits adds a catch.
2016-09-09 20:15:13 +02:00
Yoichi Hirai
ac7c6ae7d2 toFormalType reports errors by an exception
This allows error reporting without passing `ASTNode` to `toFormalType()`
2016-09-09 20:15:08 +02:00