njwest
51b4dc3752
fixed grammar in error in CompilerUtils.cpp line 399, 'less variables.' should be 'fewer variables.'
2018-05-06 18:52:12 -04:00
daniel
aa1542a9e1
Change bytes to unsigned in FixedBytesType
2018-05-03 23:11:34 +01:00
chriseth
2968639406
Removed signed shift right from the utilities.
2018-04-30 20:34:43 +01:00
Alex Beregszaszi
52c9441879
Do not use SAR instead of SDIV in shifts because it rounds differently
2018-04-30 20:34:43 +01:00
Alex Beregszaszi
22bfd3da41
Use native shift instructions on Constantinople
2018-04-30 20:34:43 +01:00
chriseth
4c1d39b7a2
Properly force-clean for shortening bytesXX conversions.
2018-04-16 12:47:38 +02:00
chriseth
4faa839813
Use error signature for revert data.
2018-04-12 13:09:38 +02:00
chriseth
7a9ee69e98
Bubble up error messages.
2018-04-12 13:09:38 +02:00
chriseth
0cbe55005d
Create empty dynamic memory arrays more efficiently.
2018-04-04 12:37:04 +02:00
chriseth
6777f7a57f
Optimize across MLOAD if MSIZE is not used.
2018-04-03 14:34:32 +02:00
chriseth
5c8a6aac69
Prevent encoding of weird types and support packed encoding of external function types.
2018-03-29 09:57:11 +01:00
Alex Beregszaszi
fab527c414
Add runtimeOnly option to pushCombinedFunctionEntryLabel
2018-03-27 04:00:12 +01:00
chriseth
c2709a2d8e
Decode dynamic data.
2018-03-21 14:53:29 +00:00
chriseth
32c94f5059
Simple size check for old ABI decoder.
2018-03-21 14:53:25 +00:00
chriseth
2cdf44f65c
Move the old ABI decoder code.
2018-03-20 15:20:43 +00:00
chriseth
bdc1ff8ec7
ABI decoder.
2017-11-29 17:08:44 +01:00
Alex Beregszaszi
c1e202618c
Add explanation to unimplemented assertions
2017-11-15 17:19:29 +00:00
Alex Beregszaszi
204214f070
Split encodeToMemory to packedEncode and abiEncode
2017-09-27 11:32:19 +01:00
Alex Beregszaszi
ee65ecfb3b
Ensure that address types are always declared as 160bit
2017-09-26 22:46:33 +01:00
Alex Beregszaszi
cb6cdfe780
Simplify switch statements by refactoring internal break statements
2017-09-25 10:57:21 +01:00
Alex Beregszaszi
3e5d81578a
Avoid switch fallthrough in CompilerUtils
2017-09-25 10:51:58 +01:00
chriseth
70d70e7816
Implement struct encoder.
2017-09-16 12:31:12 +01:00
chriseth
80ce3ca66f
Move ABI encoder into its own function.
2017-09-15 20:46:32 +01:00
chriseth
73771f5bb2
Named assembly labels.
2017-09-15 20:44:49 +01:00
Alex Beregszaszi
51d6141f7e
Mark to places fall-through
2017-08-25 16:00:36 +01:00
chriseth
d1ad62fccc
Experimental feature switch for ABI encoder.
2017-08-14 13:11:41 +01:00
chriseth
4630b3315a
Interface for new ABI encoder.
2017-08-14 12:44:25 +02: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
677700d5ac
Add assert to shift helper
2017-07-02 23:41:22 +01:00
Alex Beregszaszi
68b0ac4fdd
More uses of shift helper
2017-07-02 23:40:51 +01:00
Alex Beregszaszi
8fd1d4167d
Change shiftNumberOnStack to bits
2017-07-02 23:40:47 +01:00
Alex Beregszaszi
c7ae042114
Use shift helper
2017-07-02 23:37:47 +01:00
Alex Beregszaszi
0494fa98c0
Add shift helper to CompilerUtils
2017-07-02 23:37:47 +01:00
chriseth
71d866cd7a
Abort early if there is nothing to encode or decode.
2017-06-30 14:16:16 +02:00
chriseth
d94a12a34c
Reformat.
2017-06-26 09:19:11 +02:00
chriseth
0aaa6d876d
Use for loop for assembly memcopy.
2017-06-26 09:18:14 +02:00
chriseth
831ed08387
Change invalid opcode to revert for input validation.
2017-06-23 19:29:11 +02:00
chriseth
83ea7793d9
Fix ABI encoding of empty string literal.
2017-06-22 17:55:06 +02:00
Alex Beregszaszi
0c8beac357
Rename the SHA3 assembly instruction to KECCAK256
2017-05-30 10:54:29 +01:00
chriseth
28f10f4783
Remove error label / invalid jump label.
2017-04-28 13:14:52 +02:00
Alex Beregszaszi
3ae88377d6
Change references to FunctionType::Location
2017-03-16 12:49:52 +00:00
Alex Beregszaszi
ba0015cf25
Warn early when exhausting stack
2017-02-02 11:39:29 +00:00
Alex Beregszaszi
4361797ddc
Only capture function type to address conversion
2017-02-01 12:23:47 +00:00
Alex Beregszaszi
767ec1d670
Support explicit conversion of external function type to address
2017-02-01 12:23:47 +00:00
chriseth
a98fa41897
Uninitialized internal function should call INVALID.
2017-01-26 16:39:07 +01:00
Valentin Wüstholz
9bcbd93ac5
Change translation of implicit throws (issue #1589 ).
...
This adds a new invalid instruction that is used for encoding
implicit throws that are emitted by the compiler. This makes it
possible to distinguish such runtime errors from user-provided,
explicit throws.
2017-01-26 16:39:07 +01:00
chriseth
b60623521f
Move some util functions to low-level functions.
2017-01-24 12:06:40 +01:00
chriseth
0e0d5d47c0
Renamed padToWordBoundaries -> padToWords
2016-12-12 23:43:21 +01:00
chriseth
bfa4f45116
Split memcopy into three functions.
2016-12-11 17:57:15 +01:00
Alex Beregszaszi
b93589b3b6
Implement identity call in inline assembly
2016-12-11 17:57:15 +01:00
Alex Beregszaszi
1bf412d9fd
Implement CompilerUtils::memoryCopy using inline assembly
2016-12-11 17:57:15 +01:00
Alex Beregszaszi
4abc8ab5a9
Add usingIdentity option to CompilerUtils::memoryCopy
2016-12-11 17:57:15 +01:00
chriseth
84443eb560
Merge pull request #1351 from ethereum/truncate_bit
...
Truncate a boolean from calldata into one bit
2016-12-08 16:15:35 +01:00
Alex Beregszaszi
86d54c02cd
Throw if calling the identity precompile (memoryCopy) failed
2016-12-02 13:18:39 +00:00
Yoichi Hirai
d77c8f730c
codegen: clean not only booleans but all types before storing them into memory
2016-11-30 17:42:21 +01:00
Yoichi Hirai
547deec4be
codegen: clean any data from the input
2016-11-30 17:42:03 +01:00
Yoichi Hirai
0123e74a2e
codegen: cleanup booleans before storing them into memory
2016-11-30 17:41:46 +01:00
Yoichi Hirai
03ccc6df70
codegen: truncate a boolean calldata down to one bit
2016-11-30 17:41:38 +01:00
Yoichi Hirai
0be5859503
codegen: cleanup values to fit in storage bytes
2016-11-25 15:50:46 +01:00
Yoichi Hirai
fa486f5b44
codegen: shorten the bit truncation
2016-11-25 15:45:18 +01:00
Yoichi Hirai
ea628001d5
codegen: add an option to CovertType so that it can truncate sign bits
2016-11-25 15:45:16 +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
e543bd34c0
Stored combined creation and runtime tags.
...
Includes a change to Assembly to allow tags from sub-assemblies to be
used.
Sorry, this get a bit bigger than I thought.
2016-11-16 14:37:18 +01:00
chriseth
ff3553a348
Change alignment.
2016-11-16 14:37:18 +01:00
chriseth
95d7555e3c
External functions in storage.
2016-11-16 14:37:17 +01:00
chriseth
dd173f83e3
Code generator for function types.
2016-11-16 14:37:17 +01:00
Rhett Aultman
58e75c7a48
Unimplemented features moved to their own exception ( #1361 )
...
Unimplemented features moved to their own exception
InternalCompilerError is an exception that really should be reserved for
actual internal errors of the compiler. Unimplemented features can now
use either solUnimplemented( ) or, if it should be conditional, then
solUnimplementedAssert( ).
* Revert some unimplemented exceptions, add handlers
The jsonCompiler and CommandLineInterface needed handlers for the
new UnimplementedFeatureException, and some cases I had moved on to
the new exception were better treated as real internal compiler
errors.
* Standardize on "Unimplemented feature" message
2016-11-14 20:41:58 +00:00
chriseth
07e4cd6e32
Merge pull request #1372 from ethereum/invalid_enum_as_external_ret
...
Invalid enum as external ret
2016-11-14 19:46:25 +01:00
Yoichi Hirai
dbcbfafda8
codegen: overflow checking also during conversion from enums
2016-11-14 17:09:53 +01:00
Yoichi Hirai
1ff67b492a
codegen: add a missing break;
2016-11-14 16:14:59 +01:00
Yoichi Hirai
81f5734cbe
codegen: move the enum overflow checking closer to the conversion into enums
2016-11-14 11:11:39 +01:00
Yoichi Hirai
20c2ca3992
ast, codegen: disallow conversion between different enum types
2016-11-11 17:48:03 +01:00
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
chriseth
f25aa0c68b
More checks for missing mobile type.
2016-10-24 16:45:25 +02:00
chriseth
bf3f45c948
Improve error message.
2016-09-05 17:11:23 +02:00
chriseth
4134834ff3
Guard encoding crashes with assertions.
2016-09-01 20:07:14 +02:00
Alex Beregszaszi
17f760e2a9
Fix identity precompile gas calculation
2016-08-06 00:18:21 +01:00
chriseth
708129abd5
Fixes for invalid cleanups for small types.
2016-05-20 16:52:40 +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
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
RJ Catalano
9a075458ad
initial work for fixed types...potentially needing a constant literal type for this
...
notation
Rational implemented...trying to figure out exponential
fix for token bug, also quick fix for the wei and seconds
fixed problem with var...probably a conversion problem for fixed in size capabilities
adding fixed type tests
Removing bitshift and regrouping fixed type tests together
size capabilities functioning properly for fixed types
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
initial work for fixed types...potentially needing a constant literal type for this
2016-05-09 11:41:02 -05:00
Dimitry
d2cee6f9c6
reduce unnecessary solidity:: namespace
2016-04-04 15:41:35 +04:00
Dimitry
858c41260d
rename namespace for instruction.h/cpp in libevmasm
2016-04-02 15:56:43 +03:00
Dimitry
ccbd3ff63f
move libevmcore to solidity
2016-04-01 23:11:01 +03:00
chriseth
35b310cfaf
Simplify and optimise stack rotation.
2015-11-30 18:50:47 +01:00
chriseth
86495dfc57
Make members context-sensitive.
2015-11-26 15:37:55 +01:00
chriseth
879844dd0a
Code generation for creating arrays.
2015-11-26 13:10:12 +01:00
chriseth
68f1da1e3a
Fixed string inside struct allocation bug.
2015-11-24 14:54:37 +01:00
Gav Wood
bff172cf65
Fix up for new API from EIP-1.1.
2015-11-21 14:34:21 +01:00
Gav Wood
938b6793f1
Minor API change - must provide SealEngine to Executive now.
2015-11-19 10:19:53 +01:00
chriseth
a5c227778d
Bugfix: Returning literal strings in tuples.
2015-10-31 23:13:45 +01:00
chriseth
e3dffb611f
File reorganisation.
2015-10-21 00:46:01 +02:00