Commit Graph

841 Commits

Author SHA1 Message Date
benjaminion
0175008ffa LLL: Fix msg macro with six arguments.
The previous macro used the set built-in in a way incompatible with the current
implementation of set. This commit updates the macro to be more transparent in how it's
working and avoids the use of the set and alloc built-ins.
2017-06-22 13:46:52 +01:00
chriseth
de7a488f82 Merge pull request #2415 from benjaminion/lll-fix-create-macro
LLL: Fix for edge case in the create macros.
2017-06-22 12:33:45 +02:00
chriseth
1c54ce2a2c Merge pull request #2399 from ethereum/lll-if
LLL: Replace obsolete assembly code
2017-06-22 12:22:28 +02:00
benjaminion
9954c5c0fa LLL: Testcases for the two create built-in macros. 2017-06-22 09:45:23 +01:00
benjaminion
35bf91407e LLL: Test case for ecrecover built-in macro. 2017-06-21 23:35:27 +01:00
Alex Beregszaszi
3515ee98ff Add tests for when/unless/if in LLL 2017-06-21 21:23:20 +01:00
chriseth
b3a7b5a145 Merge pull request #2416 from federicobond/multiple-specifiers
Display error if payable or constant is specified multiple times
2017-06-19 12:00:04 +02:00
chriseth
0c75afb2c1 Merge pull request #2225 from ethereum/julia-for
Implement for statement in assembly parser / printer / code generator
2017-06-19 11:53:22 +02:00
Federico Bond
d170ceaf3d Display error if payable or constant is specified multiple times 2017-06-17 12:21:46 -03:00
Alex Beregszaszi
d7e63f23de Fix UTF-8 validation for high codepoints (>10000) 2017-06-16 16:41:29 +02:00
Alex Beregszaszi
c5339037e9 Test for variable redeclaration in for loops 2017-06-16 11:30:03 +01:00
chriseth
0fd73e5832 Fix test. 2017-06-16 11:29:41 +01:00
chriseth
ea0a86a995 Some more parsing tests. 2017-06-16 11:29:35 +01:00
chriseth
2f0826ffd7 Functionality tests for for. 2017-06-16 10:56:21 +01:00
chriseth
1b3ba7bc57 Some more tests. 2017-06-16 10:56:21 +01:00
Alex Beregszaszi
47925bc14e Parse for statement in assembly parser / printer 2017-06-16 10:56:21 +01:00
chriseth
fb5db94879 Merge pull request #2397 from ethereum/doublepush
Peephole optimizer for double push.
2017-06-15 10:50:07 +02:00
chriseth
7af9d10006 Fix lll test. 2017-06-15 10:07:17 +02:00
chriseth
66881bd675 Merge branch 'develop' into asm-aux 2017-06-15 08:39:02 +02:00
Alex Beregszaszi
42b61171d9 Merge pull request #2192 from winsvega/develop
add STATICCALL instruction
2017-06-14 21:03:32 +01:00
Alex Beregszaszi
3c4671a2da Match substring in tests to avoid metadata issues 2017-06-14 20:31:20 +01:00
Alex Beregszaszi
585b3ea3e3 Print auxiliary data in the assembly 2017-06-14 20:14:15 +01:00
chriseth
e5b0ad562e Peephole optimizer for double push. 2017-06-14 20:02:45 +02:00
chriseth
f008ddf836 Merge pull request #2381 from ethereum/fixcrash
Fix a crash about a non-callable expression.
2017-06-14 18:35:38 +02:00
chriseth
fd5bf16101 Merge pull request #2384 from ethereum/parseFunctionalInstructions
Enforce function arguments when parsing functional instructions.
2017-06-14 18:35:16 +02:00
Dimitry
c20cdd0a05 add new opcode instructions to the parser
STATICCALL        0xfa  6 inputs  (gas address mem1 mem2 mem3 mem4)
2017-06-14 18:18:12 +02:00
chriseth
d693822a6f Merge pull request #2394 from ethereum/lll-shifts
Support shl/shr in LLL
2017-06-14 18:04:40 +02:00
chriseth
2b3b00776e Additional test. 2017-06-14 16:06:48 +02:00
chriseth
1ae0e082b3 Merge pull request #2392 from federicobond/disallow-trailing-commas
Forbid trailing commas in named arguments
2017-06-14 15:31:40 +02:00
Alex Beregszaszi
600e3ad240 Support shl/shr in LLL 2017-06-14 14:08:28 +01:00
chriseth
1b1f35762e Enforce function arguments when parsing functional instructions. 2017-06-14 14:51:47 +02:00
chriseth
21aafaa704 Merge pull request #2331 from ethereum/ASTDocumentationEntry
documentation field added to ContractDefinition-Node
2017-06-14 14:32:27 +02:00
chriseth
07cc84fade Fix a crash about a non-callable expression. 2017-06-14 14:26:20 +02:00
Federico Bond
fd8365df08 Forbid trailing commas in named arguments 2017-06-14 00:15:27 -03:00
benjaminion
3299c479b6 LLL: fix handling of "sha3" expression
When PR #2317 changed the EVM opcode from SHA3 to KECCAK256 it broke the `(sha3 loc len)` expression in LLL. This PR fixes things while allowing existing code using the sha3 expression (such as the ENS registrar) to continue to compile.  I.e. both `(keccak256 loc len)` and `(sha3 loc len)` may be used, and the existing related sha3 macros continue to work.

Three end-to-end test cases have been added for kekkac256 and sha3.
2017-06-13 22:20:14 +01:00
Yoichi Hirai
8775e77305
Add a warning about a varialbe of the name of an instruction 2017-06-13 16:57:08 +02:00
Yoichi Hirai
a7241df4b7
Add a failing test as suggested in
https://github.com/ethereum/solidity/pull/2275#discussion_r121438333
2017-06-13 16:57:08 +02:00
Yoichi Hirai
a0f8c94dad
Add a test about checking a warning 2017-06-13 16:57:08 +02:00
Yoichi Hirai
464dea2459
test: Add different styles of returndatacopy and returndatasize 2017-06-13 16:57:08 +02:00
Yoichi Hirai
0b22154a75
libevmasm: add RETURNDATACOPY and RETURNDATASIZE 2017-06-13 16:57:02 +02:00
Yoichi Hirai
c4f0608b68
More informative test 2017-06-13 12:28:03 +02:00
Yoichi Hirai
0909ffc26e
Fix the expectation about the parse 2017-06-13 12:21:28 +02:00
Yoichi Hirai
a03913427f
Add an end-to-end test about LLL macro with zero arguments 2017-06-12 15:16:08 +02:00
Yoichi Hirai
b86b084bc6
Add a test that fails about an LLL macro with no arguments 2017-06-12 15:16:03 +02:00
chriseth
bf2b5c746a Use lowercase when reporting instruction error. 2017-06-09 15:17:29 +02:00
Alex Beregszaszi
80227af08a Add test for two functions calling eachother 2017-06-09 10:46:13 +01:00
chriseth
b098b363b5 Test for embedded functions. 2017-06-08 15:52:45 +02:00
chriseth
b75c7b5775 Move inline assembly to new abstraction and test both backends. 2017-06-08 15:52:45 +02:00
chriseth
64ddb176bb Test for accessing outer inline assembly scope. 2017-06-08 15:52:45 +02:00
chriseth
97cc968a13 Initial EVM1.5 assembly implementation. 2017-06-08 15:52:44 +02:00