Commit Graph

534 Commits

Author SHA1 Message Date
Erik Kundt
e2395a3dcf Adds more detailed type errors and tests. 2018-12-07 12:35:35 +01:00
Erik Kundt
b2afb8cdda Adds an additional message to failing type conversions. 2018-12-07 11:55:53 +01:00
chriseth
5fde279d2a
Merge pull request #5514 from corollari/develop
Remove unary + from the type system
2018-12-06 10:27:09 +01:00
Albert
df08d79623 Fix #5470
Remove unary + from the type system
2018-12-06 01:54:04 +01:00
chriseth
3a378eae1a Restrict toHex to bytes. 2018-12-05 22:37:05 +01:00
Erik Kundt
e3accc6aa6 Simplifies Result<T> and prevents undefined behaviour. 2018-12-05 10:33:34 +01:00
Erik Kundt
05e74d096e Introduces Result<T> for operator and implicit conversion type checks. 2018-12-05 10:33:34 +01:00
Anurag Dashputre
82f5763e7a Fix internal compiler error for unimplemented base contract function. 2018-12-03 12:25:31 +01:00
chriseth
aaeb74f592
Merge pull request #5537 from ethereum/cp-SourceLocation-related-refactoring
[1/3] SourceLocation related refactoring.
2018-11-30 23:45:31 +01:00
Christian Parpart
c48a5264be
liblangutil: SourceLocation: adds (shared) pointer to underlying CharStream source, eliminating sourceName
Also, adapted affecting code to those changes.
2018-11-30 17:07:12 +01:00
chriseth
f6d013237d
Merge pull request #5538 from hydai/static_uint256
Replace IntegerType(256) with static function IntegerType::uint256()
2018-11-29 11:17:33 +01:00
Leonardo Alt
1d47919c0c Fix ICE when function type struct parameter has field of non-existent type 2018-11-29 10:38:47 +01:00
hydai
9326adc3db Replace IntegerType(256) with static function IntegerType::uint256() 2018-11-29 17:07:18 +08:00
chriseth
bc137c2eeb
Merge pull request #5485 from ethereum/refactorCallableFunction
Refactor callable function
2018-11-26 12:34:43 +01:00
Christian Parpart
ec47c8946b
Isolating libyul library API into its own namespace yul. 2018-11-23 14:29:00 +01:00
Christian Parpart
0f4ed52a71
Rewrite header paths to adapt to recent git mv of libsolidity/inlineasm to libyul 2018-11-23 11:18:57 +01:00
chriseth
92ba8a95f6 Make asCallableFunction to never fail and assert abount parameter size if bound instead. 2018-11-22 15:47:45 +01:00
chriseth
9e964852cc Rename 'asMemberFunction' to widen its purpose. 2018-11-22 15:24:45 +01:00
Christian Parpart
d67322a186 Introduce namespace langutil in liblangutil directory.
Also:
- Use {}-style list initialisation for SourceLocation construction
- Introduce new system includes
- Changes the API of the Scanner to take source as value (with move) as opposed to as a reference
2018-11-21 19:13:44 +00:00
Christian Parpart
87821c53c3 Isolating files shared between Yul- and Solidity language frontend. 2018-11-21 18:58:12 +00:00
mordax
ea8b7d803e Removing redundant virtual from override function declaration
Remove trailing whitespace

Remove changelog change
2018-11-21 14:37:32 +00:00
chriseth
2cc304fd3f Fix for style. 2018-11-12 09:15:22 +01:00
chriseth
6bbedab383
Merge pull request #5265 from ethereum/cleanupsha3
Simplify sha3.
2018-11-09 15:39:57 +01:00
chriseth
cc2de07bc6
Merge pull request #5348 from ethereum/boostRationalNegativeDenominatorFix
Fix negative denominator in ``boost::rational`` during exponentiation.
2018-11-08 11:25:30 +01:00
chriseth
674e17c2a8 Performance: Replace string by special single-copy YulString class. 2018-11-07 19:30:27 +01:00
Daniel Kirchner
e036133d1b Fix negative denominator in `boost::rational` during exponentiation. 2018-11-06 10:52:10 +01:00
Erik Kundt
1d8e9af407 Fixes crash while encoding too large arrays. 2018-10-30 15:14:57 +01:00
chriseth
39687cf110 Remove unused AST utils. 2018-10-25 14:02:09 +02:00
Christian Parpart
f112377dd4
Refactor solidity::Token into an enum class with TokenTraits helper namespace 2018-10-22 17:00:51 +02:00
chriseth
e78b95d9d4 Renamed SHA3.{h,cpp} files. 2018-10-18 14:31:36 +02:00
Christian Parpart
4d5216c2e0 Fixes large rational number literals being wrongly interpreted.
Fixes #5052.
2018-10-09 14:36:49 +02:00
chriseth
7ff9a27979
Merge pull request #4734 from ethereum/astUpdate
JSON AST: replace ``isConstructor`` by ``kind`` which also supports fallbacks
2018-10-08 21:47:27 +02:00
Christian Parpart
9fb835b710 Fixes #5051 (introduced in #4684), effectively allowing underscores in address literals. 2018-10-02 15:37:15 +02:00
chriseth
db4f780283
Merge pull request #4962 from anurag-git/anurag_issue_3667-1
Removed default case from "ExpressionCompiler::visit(FunctionCall...)".
2018-10-01 13:24:26 +02:00
Anurag Dashputre
3321000f67 Removing extra default cases to force compile time error, instead of runtime. 2018-09-30 12:40:38 +05:30
Alex Beregszaszi
00b1b96eb4 Use better assertion messages for RationalNumberType::literalValue 2018-09-26 13:05:58 +01:00
chriseth
32112d6480
Merge pull request #5041 from liangdzou/fix_typo_in_doc
fix typo in docs and comments
2018-09-24 13:52:33 +02:00
Alex Beregszaszi
8f96fe698d
Merge pull request #5049 from ethereum/structtype-assert-annotation
Add assertion for annotated type in Structtype::canBeUsedExternally
2018-09-21 15:02:26 +01:00
Alex Beregszaszi
69ff61d149 Add assertion for annotated type in Structtype::canBeUsedExternally 2018-09-21 14:25:05 +01:00
liangdzou
f347dee812 fix typo 2018-09-21 09:27:33 +08:00
chriseth
dc9853bb6e
Merge pull request #5030 from ethereum/payableConversion
Make non-payable default for conversion to address.
2018-09-20 21:20:46 +02:00
liangdzou
44e8dfd393 fix typo 2018-09-20 22:54:57 +08:00
chriseth
d0461c49fe Make non-payable default for conversion to address. 2018-09-20 14:31:04 +02:00
Jordan Last
d0497aacc0 fixing rebase conflicts
add ElementaryTypes::BytesMemory and ElementaryTypes::StringMemory

fix rebase conflicts

fixing rebase conflicts

use make_shared instead of new

fix tabs and StateMutability parameter

create address and addressType functions, fix spaces in comment

fix typo and switch nonpayable to payable

fix spaces

fix comment again
2018-09-13 15:53:06 -06:00
Daniel Kirchner
ae35a58124 Add `stateMutability field to JSON AST for address` types. 2018-09-13 15:15:49 +02:00
Daniel Kirchner
12aaca1645 Add payable and non-payable state mutability to AddressType. 2018-09-13 15:15:49 +02:00
Daniel Kirchner
1ce3581a52 Accept `address payable` during parsing. 2018-09-11 14:52:23 +02:00
Daniel Kirchner
a434896458 Restore `isConstructor` in the legacy AST. 2018-09-11 14:47:25 +02:00
Daniel Kirchner
395ab9a872 Replace `isConstructor field in the JSON AST by a kind` field. 2018-09-11 14:47:25 +02:00
Daniel Kirchner
87804b6419 Split IntegerType into IntegerType and AddressType. 2018-09-05 12:19:14 +02:00