argotorg / argotorg/solidity

Question about the evaluation order of built-in functions

Open
#16,115 0 comments 0 reactions 0 assignees View on GitHub
documentation :book:
Dominant language
C++
Stars
25.7k
Forks
6.2k
Avg merge
1d 11h
Merged PRs (30d)
21

Description

As mentioned in [ir-breaking-changes](https://docs.soliditylang.org/en/latest/ir-breaking-changes.html#), **addmod** is evaluated from right to left in the legacy codegen, but from left to right in the IR-based codegen. I would like to understand the reason behind this difference. What determines the evaluation order of arguments, and is there a specific part of the source code that defines this behavior?

Contributor guide

Open the contributing guide

Research direction

Start with the ir-breaking-changes documentation section linked in the issue, then trace addmod argument evaluation through the legacy and IR-based codegen paths. Identify what determines each order and document the relevant source locations and rationale. Done means the difference and its source are clearly explained.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, solidity
Domain
compilers
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.