Yoichi Hirai
0a6c937dcb
codegen: shorten the overflow checking when converting into enums
2016-11-11 17:48:03 +01:00
Yoichi Hirai
98dcd883e4
codegen: check the value range after converting something to an enum element
2016-11-11 17:48:03 +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
chriseth
9920e88eea
Clear all value types prior to storing.
2016-10-31 16:40:30 +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
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
Alex Beregszaszi
0e33b63468
Allow warnings for inline assembly block
2016-10-20 13:25:28 +01:00
Alex Beregszaszi
aefb6e5fcf
Rename dev::sha3 to dev::keccak256
2016-10-06 14:53:40 +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
9ca7472089
Provide gas stipend manually for send(0).
2016-09-06 12:37:01 +02:00
chriseth
f687635e47
Merge pull request #665 from axic/feature/accept-ether
...
BREAKING: Add payable modifier
2016-09-06 12:25:19 +02:00
chriseth
114502f8ad
Merge pull request #1006 from ethereum/nenewaccountgas
...
Do not pay new account gas.
2016-09-06 11:13:31 +02:00
chriseth
9c64edf110
Change function type to include and propagate payable and constant modifier.
2016-09-05 21:28:28 +02:00
Alex Beregszaszi
962531af96
Merged in changes from chriseth/payable
2016-09-05 21:28:28 +02:00
Alex Beregszaszi
a34f2f1a31
Support payable keyword for functions
2016-09-05 21:28:18 +02:00
chriseth
bf3f45c948
Improve error message.
2016-09-05 17:11:23 +02:00
chriseth
69c175fe22
Do not pay new account gas.
...
If we checked that the target contract exists, we do not have
to pay the "new account gas".
2016-09-05 15:52:44 +02:00
chriseth
4134834ff3
Guard encoding crashes with assertions.
2016-09-01 20:07:14 +02:00
chriseth
4bfe09897e
Make fallback function throw by default.
2016-08-30 15:31:50 +02:00
chriseth
b2507e9f10
Merge pull request #839 from chriseth/checkcode
...
BREAKING: Make function calls throw if target does not have code.
2016-08-17 16:44:15 +02:00
chriseth
d6579a0a5f
Merge pull request #888 from chriseth/throwOnDivZero
...
Throw on division by zero.
2016-08-17 16:43:13 +02:00
chriseth
774bb8ab3b
Make function calls throw if target does not have code.
...
Low-level calls still just execute and will actually report "success".
This allows `x.call.value(y)()` for x being a non-contract account.
2016-08-17 11:30:40 +02:00
chriseth
9c83109549
BREAKING: return only exits current function/modifier
2016-08-17 11:29:31 +02:00
chriseth
e7084d9e16
Throw on division by zero.
2016-08-17 11:27:15 +02:00
chriseth
d5505e21eb
Merge pull request #838 from chriseth/ecrecover
...
Make ecrecover return zero for malformed input.
2016-08-17 11:05:20 +02:00
chriseth
77f4424589
Provide inline assembly to the code generator. ( #840 )
...
* Directly usable inline assembly.
* Add missing header.
2016-08-16 16:27:20 +02:00
chriseth
d731225d02
Actually better to return zero on error.
2016-08-16 14:53:01 +02:00
chriseth
034d436933
Make ecrecover throw for malformed input.
2016-08-16 14:53:01 +02:00
chriseth
2a560b798b
Throw if contract creation fails.
2016-08-16 14:49:44 +02:00
Denton Liu
5ee846e39f
Remove After from ExpressionCompiler
2016-08-11 10:15:59 -04:00
chriseth
b7c26f4628
Merge pull request #722 from NicolaiSoeborg/develop
...
Fixes to grammar.txt [WIP]
2016-08-10 21:18:56 +02:00
Alex Beregszaszi
17f760e2a9
Fix identity precompile gas calculation
2016-08-06 00:18:21 +01:00
chriseth
58cc6cbb37
Bugfix: Allocate empty array.
2016-07-28 17:24:18 +02:00
Nicolai
c800f8c97d
Remove the remains of "expresison"
2016-07-14 22:56:45 +02:00
chriseth
d593166d66
Merge pull request #641 from axic/patch/shift-parser
...
Trivial shift parser fixes
2016-06-09 00:21:51 +02:00
Alex Beregszaszi
0cb820cf98
Include SHR case in ExpressionCompiler::appendShiftOperatorCode
2016-06-07 19:39:14 +01:00
chriseth
ab7a22f4a0
Disallow implementation of abstract function by constructor of derived class.
2016-06-06 19:38:22 +02:00
chriseth
708129abd5
Fixes for invalid cleanups for small types.
2016-05-20 16:52:40 +02:00
chriseth
6b859a2bff
Refactor compiler to avoid weird swap of contexts
2016-05-20 14:20:45 +02:00
chriseth
67ca3bb4b9
Allow access to functions in inline assembly.
2016-05-12 12:30:48 +02:00
chriseth
d4206b7cd0
Remove unused tests and add asserts for not implemented parts in code generation.
...
quick fix on christian's rational
change so that ubuntu will stop yelling
be more specific with rational declaration for Windows sake
rational in namespace correction for windows
2016-05-10 16:03:33 -05:00
VoR0220
82039b732e
added bytes conversion tests, resolved that, converted to binary scaling, refactored the find algo to prevent large numbers and take into account integer bytes
...
think we're good on solidity type name resolution now
removed couts
updates to documentation and more removed couts along with literal value implementation
forgot semicolons
2016-05-09 11:41:03 -05:00
VoR0220
f0ea817580
fixing modulus and Solidity Name and Type Resolution
...
minor fixes
current attempts at binary fixup
2016-05-09 11:41:03 -05:00
VoR0220
4b749fc333
changed names for Rational Constants and categories
2016-05-09 11:41:02 -05:00
RJ Catalano
93295ae8f8
got exponents up and working with their inverse, changed a few of the tests....something is working that likely shouldn't be
...
slight changes to how to flip the rational negative around...still trying to figure it out
tests added
updated tests
odd differences in trying soltest from solc binary, let me know if you can replicate
test not working for odd reason
fixed test problem with fixed literals...still need a way to log this error
broken up the tests, added some, changed some things in types and began compiler work
moar tests and prepping for rebuilding much of the types.cpp file
further fixing
infinite loop still happening but it's somewhere in the fixedPoint methodd
fractional bits needed algo improved! Eliminated 2 errors
Corrected problems with the previous commit. No infinite loops. Actually appear to have corrected an error
2016-05-09 11:41:02 -05:00