-
Notifications
You must be signed in to change notification settings - Fork 549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Made arguments to functions in run injected through vm and not code. #6489
Conversation
66b8689
to
b6bceae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to make sure I understand it correctly: the header with segments initalization and function call is still appended, just not the args, rights?
Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @gilbens-starkware and @ilyalesokhin-starkware)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes - the args (including the gas builtin) are just not a part of the code - but their size is allocated in code, and the VM fills them.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @gilbens-starkware and @ilyalesokhin-starkware)
b6bceae
to
1387736
Compare
087c498
to
225228e
Compare
1387736
to
b904699
Compare
can't you put the Code quote: casm_extend!(ctx, [ap + 0] = [ap - offset], ap++;); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @gilbens-starkware and @orizi)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @gilbens-starkware and @ilyalesokhin-starkware)
crates/cairo-lang-runner/src/lib.rs
line 672 at r1 (raw file):
Previously, ilyalesokhin-starkware wrote…
can't you put the
ap_offset += params_size;
before the builtins instead of copying the parameters??
checking if knowing where to inject the params is easy on the other side.
but in general - does it matter here? in reality we do need something like that for the actual runnable format - won't we?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @gilbens-starkware)
Suggestion: for (generic_ty, ty_size) in param_types { |
do you support a param that is not a felt on an array? Code quote: ty_size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @gilbens-starkware and @orizi)
commit-id:f972f5b1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @gilbens-starkware and @ilyalesokhin-starkware)
crates/cairo-lang-runner/src/lib.rs
line 651 at r1 (raw file):
let mut used_args = 0; for ty in param_types { let (generic_ty, ty_size) = ty;
Done.
crates/cairo-lang-runner/src/lib.rs
line 671 at r1 (raw file):
Previously, ilyalesokhin-starkware wrote…
do you support a param that is not a felt on an array?
size > 1?
yes - structs that hold multiple such elements fully work.
b904699
to
16f3d2e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 1 of 2 files reviewed, all discussions resolved (waiting on @gilbens-starkware and @piotmag769)
No description provided.