This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Generic helper functions for handling permutations. | |
/// @a _n Specifies the size of the permutation. | |
/// @a _getTargetPosition A function that takes an offset as unsigned integer as argument and returns the desired target position | |
/// of the element at that offset as integer or -1, if the element is to be discarded. | |
/// @a _swap Takes a (zero-based) depth as unsigned integer as argument and swaps the currently last element with the | |
/// element at the given depth. | |
/// @a _pop Pops the last element. | |
template<typename GetTargetPosition, typename Swap, typename Pop> | |
void permute(unsigned _n, GetTargetPosition _getTargetPosition, Swap _swap, Pop _pop) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
mstore(0x40, memoryguard(0x0580)) | |
{ | |
function fo_0() -> x_4, _ | |
{ x_4 := mod(0x800, 0) } | |
let x_5117 | |
function foo_m_3(x_27, _288, x_9, x_290, x_291, x_292, x_23, x_294, x_295, x6, _297, x_298, x_299, _300, x_301, x_302, x_303, _304, x30, x_306, x_307, x_30, x_309, x_310, x_311, x_312) -> x_327, x_28, x_29, x_330, __1, x_332, x_, x_334, x_3, _36, x_337, x_38, x39, x0, x_31, x_342 | |
{ | |
mstore(0x0560, x_27) | |
mstore(0x0540, _288) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Optimized IR: | |
/******************************************************* | |
* WARNING * | |
* Solidity to Yul compilation is still EXPERIMENTAL * | |
* It can result in LOSS OF FUNDS or worse * | |
* !USE AT YOUR OWN RISK! * | |
*******************************************************/ | |
object "c_145" { | |
code { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Optimized IR: | |
/******************************************************* | |
* WARNING * | |
* Solidity to Yul compilation is still EXPERIMENTAL * | |
* It can result in LOSS OF FUNDS or worse * | |
* !USE AT YOUR OWN RISK! * | |
*******************************************************/ | |
object "Test_79" { | |
code { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
======= /tmp/snark.yul (EVM) ======= | |
Pretty printed source: | |
object "Test_1595" { | |
code { | |
{ | |
mstore(64, 128) | |
if callvalue() { revert(0, 0) } | |
let _1 := datasize("Test_1595_deployed") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(set-logic QF_LIA) | |
(declare-fun yul_x () Int) | |
(declare-fun expr_0 () Int) | |
(assert (and (<= 0 expr_0) (< expr_0 115792089237316195423570985008687907853269984665640564039457584007913129639936))) | |
(assert (= yul_x expr_0)) | |
(declare-fun yul_t () Int) | |
(assert (= yul_t (ite (< yul_x 20) 1 0))) | |
(assert (not (= yul_t 0))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol b/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol | |
index f2888369f..660726693 100644 | |
--- a/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol | |
+++ b/test/libsolidity/semanticTests/abiEncoderV1/abi_decode_v2_storage.sol | |
@@ -27,4 +27,4 @@ contract C { | |
// gas ir: 199675 | |
// gas irOptimized: 194189 | |
// gas legacy: 196426 | |
-// gas legacyOptimized: 193470 | |
+// gas legacyOptimized: 193424 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For ``for``: | |
{ | |
let a := 1 | |
let b := 0 | |
mstore(key, a) | |
for {} mload(key) {} { | |
mstore(key, b) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <z3++.h> | |
#include <dlfcn.h> | |
#include <iostream> | |
void* z3handle = nullptr; | |
void* loadZ3Symbol(const char* name) | |
{ | |
if (!z3handle) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
import sys | |
import re | |
# Patterns to match Z3 API entry point definitions. | |
def_pat = re.compile(" *def_API(.*)") | |
extradef_pat = re.compile(" *extra_API(.*)") | |
# Pattern to extract name and arguments from the above. |