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