Merge pull request #13010 from ethereum/reenable-ext-test-presets-failing-due-to-stack-too-deep

Re-enable the optimized IR preset in all external tests
This commit is contained in:
Kamil Śliwak 2022-05-20 20:56:02 +02:00 committed by GitHub
commit 02567fd3b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 3 deletions

View File

@ -49,7 +49,7 @@ function euler_test
"${compile_only_presets[@]}"
#ir-no-optimize # Compilation fails with "YulException: Variable var_utilisation_307 is 6 slot(s) too deep inside the stack."
#ir-optimize-evm-only # Compilation fails with "YulException: Variable var_utilisation_307 is 6 slot(s) too deep inside the stack."
#ir-optimize-evm+yul # Compilation fails with "YulException: Variable var_status_mpos is 3 too deep in the stack"
ir-optimize-evm+yul
legacy-optimize-evm-only
legacy-optimize-evm+yul
legacy-no-optimize
@ -61,6 +61,11 @@ function euler_test
setup_solc "$DIR" "$BINARY_TYPE" "$BINARY_PATH"
download_project "$repo" "$ref_type" "$ref" "$DIR"
# Disable tests that won't pass on the ir presets due to Hardhat heuristics. Note that this also disables
# them for other presets but that's fine - we want same code run for benchmarks to be comparable.
# TODO: Remove this when https://github.com/NomicFoundation/hardhat/issues/2453 gets fixed.
sed -i "/expectError: 'JUNK_UPGRADE_TEST_FAILURE'/d" test/moduleUpgrade.js
neutralize_package_lock
neutralize_package_json_hooks
force_hardhat_compiler_binary "$config_file" "$BINARY_TYPE" "$BINARY_PATH"

View File

@ -47,7 +47,7 @@ function perpetual_pools_test
"${compile_only_presets[@]}"
#ir-no-optimize # Compilation fails with "YulException: Variable var_amount_527 is 9 slot(s) too deep inside the stack."
#ir-optimize-evm-only # Compilation fails with "YulException: Variable var_amount_527 is 9 slot(s) too deep inside the stack."
#ir-optimize-evm+yul # Compilation fails with "YulException: Variable expr_mpos is 1 too deep in the stack"
ir-optimize-evm+yul
legacy-no-optimize
legacy-optimize-evm-only
legacy-optimize-evm+yul
@ -59,6 +59,12 @@ function perpetual_pools_test
setup_solc "$DIR" "$BINARY_TYPE" "$BINARY_PATH"
download_project "$repo" "$ref_type" "$ref" "$DIR"
# Disable tests that won't pass on the ir presets due to Hardhat heuristics. Note that this also disables
# them for other presets but that's fine - we want same code run for benchmarks to be comparable.
# TODO: Remove this when Hardhat adjusts heuristics for IR (https://github.com/nomiclabs/hardhat/issues/2115).
sed -i 's|\(it\)\(("Should not allow commits that are too large"\)|\1.skip\2|g' test/PoolCommitter/commit.spec.ts
sed -i 's|\(it\)\(("Should not allow for too many commitments (that bring amount over a user'\''s balance)"\)|\1.skip\2|g' test/PoolCommitter/commit.spec.ts
neutralize_package_lock
neutralize_package_json_hooks
force_hardhat_compiler_binary "$config_file" "$BINARY_TYPE" "$BINARY_PATH"

View File

@ -47,7 +47,7 @@ function uniswap_test
"${compile_only_presets[@]}"
#ir-no-optimize # Compilation fails with: "YulException: Variable ret_0 is 1 slot(s) too deep inside the stack."
#ir-optimize-evm-only # Compilation fails with: "YulException: Variable ret_0 is 1 slot(s) too deep inside the stack."
#ir-optimize-evm+yul # Compilation fails with: "YulException: Variable var_slot0Start_mpos is 1 too deep in the stack"
ir-optimize-evm+yul
legacy-no-optimize
legacy-optimize-evm-only
legacy-optimize-evm+yul