Skip to content

refactor(ap-change): remove unused tracking payload and redundant clones#9708

Open
Perekup1 wants to merge 1 commit intostarkware-libs:mainfrom
Perekup1:patch-3
Open

refactor(ap-change): remove unused tracking payload and redundant clones#9708
Perekup1 wants to merge 1 commit intostarkware-libs:mainfrom
Perekup1:patch-3

Conversation

@Perekup1
Copy link
Copy Markdown

This PR removes strictly redundant code paths in AP change computation without changing behavior.
Removed unused payload from ApTrackingBase::EnableStatement.

  • Replaced .cloned() with .copied() for Option<usize> values fetched from maps.
  • Simplified ApChangeCalcHelper::new to return Self instead of Result<Self, ApChangeError>.
  • Updated calc_ap_changes call site to match the constructor signature.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@reviewable-StarkWare
Copy link
Copy Markdown

This change is Reviewable

Copy link
Copy Markdown
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@orizi made 1 comment.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on Perekup1).


crates/cairo-lang-sierra-ap-change/src/compute.rs line 37 at r1 (raw file):

enum ApTrackingBase {
    FunctionStart(FunctionId),
    EnableStatement,

there on purpose - revert.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants