-
Notifications
You must be signed in to change notification settings - Fork 47
Review TODO comments #1227
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
Review TODO comments #1227
Conversation
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.
Hey @hakymulla, I left you some comments!
Hey @hakymulla, could you update the links to not include the trailing As an example:
|
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.
LGTM
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1227 +/- ##
=======================================
Coverage 80.18% 80.18%
=======================================
Files 112 112
Lines 29980 29979 -1
=======================================
Hits 24040 24040
+ Misses 5940 5939 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
CI is failing because code is not formatted, Could you fix these errors? Thanks! |
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.
LGTM
* Move cairo-lang dependencies to workspace * Remove sierra-emu/.gitignore * Update lock * Add fibonacci.cairo example for sierra emulator * Simplify Makefile * Simplify README and improve documentation on how to use the binary * Add make check * Improve examples * Document make check * Remove unused script * Add fibonacci_contract.cairo * Fix typo in Makefile * Fix CI * Use cairo2/corelib instead of corelib for symlinking in sierra emu * Improve Sierra Emulator descritopn * Move more dependencies to workspace * Fix whitespace * Fix whitespace (again) --------- Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com>
* Add trace dump support in compiler * Add sierra emu dependency with trace-dump feature * Add trace dump metadata * Register trace dump symbols on executors * Use trace dump feature in cairo-native-run * Remove unused feature * Rename trace_id symbol * Don't generate trace dump on return when no tail recursion target has been found * Update lock * Derive Eq,PartialEq on TraceDump * Substract initial required gas in sierra emu * Print error when trace dump is not found, but ignore * Add trace dump test * Fix clippy * Remove `get_layout` from trace dump * Rename variables * Minor improvements * Add documentation * Improve documentation * Improve documentation on trace dump runtime functions * Fix typo Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * Fix warning * Update usage docs * Document trace dump feature for programs * Add txt to blockquote to avoid executing in doc test --------- Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com>
…lass#1205) * Add sierra-emu as a debug utility * Change working dir in sierra-emu job * Remove repeated lines in sierra-emu gitignore * Exclude debug_utils from coverage job * remove some todos from value and implement Coupon libfunc * start adding corelib test * run tests from corelib * remove unwanted file * remove not related things * get return_value from trace * replace ids for debug info * add common folder for integration tests * fix tests * remove todo * ignore test for now * filter ignored tests * Update debug_utils/sierra-emu/tests/common/mod.rs Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * run ignored test from the ci * better ignoring * remove debug_name in enums * refactor * remove unused dependency * More expressive naming for the workflow Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * reviews * reviews * fmt * fmt ci * revert last commit * fmt * accidentally removed rayon usage * avoid map's short-circuiting * catch panics the avoid loosing the test name * log ignored tests * clippy * Add "(WIP)" to corelib's test job Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * print progress as the test runs * fmt * format makefile Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * fix name test in ci * add dependencies removed in merge * dependencies * clippy * remove unused import * better indent in makefile * uppercase tests summary comment for better sight * add starknet missing libfuncs * cargo.lock * add null, nullable_from_box and match_nullable libfuncs * clippyt * add forward_snapshot libfunc + fix is() for nullable * refactor syscall handler * add some felt types to match * remove type_to_name() call in is() function --------- Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com> Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com>
…ambdaclass#1191) * Add sierra-emu as a debug utility * Change working dir in sierra-emu job * Remove repeated lines in sierra-emu gitignore * Exclude debug_utils from coverage job * remove some todos from value and implement Coupon libfunc * start adding corelib test * run tests from corelib * remove unwanted file * remove not related things * get return_value from trace * replace ids for debug info * add common folder for integration tests * fix tests * remove todo * ignore test for now * add enum in const::inner * remove todos and fix some failures * filter ignored tests * Update debug_utils/sierra-emu/tests/common/mod.rs Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * run ignored test from the ci * better ignoring * ignore test * fmt * remove debug_name in enums * refactor * remove unused dependency * More expressive naming for the workflow Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * reviews * reviews * fmt * fmt ci * revert last commit * fmt * accidentally removed rayon usage * avoid map's short-circuiting * catch panics the avoid loosing the test name * log ignored tests * clippy * Add "(WIP)" to corelib's test job Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * print progress as the test runs * fmt * format makefile Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * fix name test in ci * add dependencies removed in merge * dependencies * clippy * remove unused import * better indent in makefile * uppercase tests summary comment for better sight * fix clippy * clippy * remove unnecesary pubs * better docs * better panic message in get_numberic_args_as_bigints() Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * reviews * remove unnecessary comment Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * use slices in get_numeric_args_as_bigints * fmt * remove unnecesary to_vec * fmt * use iter instead of into_iter * reviews changes * better error message * fix typo --------- Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com> Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com>
* implement las gas libfunc * remove unnecesary pubs
* Add sierra2casm-dbg * Sync cairo version between sierra2casm-dbg and root * Bump Cairo VM version in sierra2casm-dbg * Fix compilation and linter errors * Bump Cairo in sierra2casm-dbg * Remove unused serde dep in sierra2casm-dbg * Remove Rust toolchain in sierra2casm-dbg * Add sierra2casm-dbg CI job (lambdaclass#1201) * Move cairo-lang dependencies to workspace * Remove sierra-emu/.gitignore * Update lock * Add fibonacci.cairo example for sierra emulator * Simplify Makefile * Simplify README and improve documentation on how to use the binary * Add make check * Improve examples * Document make check * Remove unused script * Add fibonacci_contract.cairo * Fix typo in Makefile * Fix CI * Use cairo2/corelib instead of corelib for symlinking in sierra emu * Improve Sierra Emulator descritopn * Move more dependencies to workspace * Rename to casm-data-flow * Add Makefile * Add basic run-contract example * Add fibonacci_starknet.cairo * Fix hint format * Add basic README.md * Update dependencies * Print gas usage * Finish README.md * Add .PHONY * Fix paragraph * Move deps to workspace * Fix whitespace * Fix whitespace * Fix README.md --------- Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com>
…ambdaclass#1200) * Add sierra-emu as a debug utility * Change working dir in sierra-emu job * Remove repeated lines in sierra-emu gitignore * Exclude debug_utils from coverage job * remove some todos from value and implement Coupon libfunc * start adding corelib test * run tests from corelib * remove unwanted file * remove not related things * get return_value from trace * replace ids for debug info * add common folder for integration tests * fix tests * remove todo * ignore test for now * filter ignored tests * Update debug_utils/sierra-emu/tests/common/mod.rs Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * run ignored test from the ci * better ignoring * remove debug_name in enums * refactor * remove unused dependency * More expressive naming for the workflow Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * reviews * reviews * fmt * fmt ci * revert last commit * fmt * accidentally removed rayon usage * avoid map's short-circuiting * catch panics the avoid loosing the test name * log ignored tests * clippy * Add "(WIP)" to corelib's test job Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * print progress as the test runs * fmt * format makefile Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * fix name test in ci * add dependencies removed in merge * dependencies * clippy * remove unused import * better indent in makefile * uppercase tests summary comment for better sight * implement int_range libfuncs * implement missing array libfuncs * fmt * add is() for IntRange * remove unnecesary pubs * reviews * reviews * fix branching in int_range_try_new * clippy * reviews * fmt --------- Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com> Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com>
* Add sierra-emu as a debug utility * Change working dir in sierra-emu job * Remove repeated lines in sierra-emu gitignore * Exclude debug_utils from coverage job * remove some todos from value and implement Coupon libfunc * start adding corelib test * run tests from corelib * remove unwanted file * remove not related things * get return_value from trace * replace ids for debug info * add common folder for integration tests * fix tests * remove todo * ignore test for now * filter ignored tests * Update debug_utils/sierra-emu/tests/common/mod.rs Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * run ignored test from the ci * better ignoring * remove debug_name in enums * refactor * remove unused dependency * implement missing libfuncs from int * fmt * More expressive naming for the workflow Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * reviews * reviews * fmt * fmt ci * revert last commit * fmt * accidentally removed rayon usage * avoid map's short-circuiting * catch panics the avoid loosing the test name * log ignored tests * clippy * Add "(WIP)" to corelib's test job Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * add general libfuncs: const, equal, to_felt, from_felt * add diff libfunc * print progress as the test runs * fmt * fix from_felt * remove unused files + fix issue with non-integer * format makefile Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * try fix from_felt * fix name test in ci * add dependencies removed in merge * dependencies * clippy * remove unused import * better indent in makefile * uppercase tests summary comment for better sight * simplify a little apply_wrapping_op * merge test-corelib * remove unnecesary pubs * also match builtins instead of filtering them * format * use slices in get_numeric_args_as_bigints * fmt * remove unnecesary to_vec * fmt * use iter instead of into_iter * clippy * reviews + remove uint128 file * rename uint252 file to uint256 * fix clippy --------- Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com> Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com>
…#1212) * implement circuit_single_limb_less_than_guarantee_verify * fmt * clippy * Fix comment Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> --------- Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com>
…t missing EcPoint libfunc (lambdaclass#1208) * change initial gas due to overflows * fix some libfuncs in circuits * fix is() for circuits * remove Value::Unit from return values in get_output * match U96LimbsLessThanGuarantee correctly * some corrections to circuits * some corrections to circuits * fix failure_guarantee_verify to avoid panicking * fix circuits * more fixes to circuits + implement ec_zero libfunc * clippy * remove unnecesary tests * remove unnecesary file * fix branch index * add comment * fix eval_u96_limbs_less_than_guarantee_verify * remove circuit failure test * update trace dump with new Value::CircitOutputs * fmt * reviews + fix modulus in trace dump * remove unnecesary file * fix clippy * implement circuit_single_limb_less_than_guarantee_verify * fix trace dump for circuit outputs * fix felt_dict_get * fix felt_dict_get * implement U96LimbsLessThanGuarantee for trace dump * remove unnecessary code * fmt * fix felt_dict_entry_get * revert change in circuits.rs * remove unwanted file * revert unwanted change * revert unwanted change * make trace dump for circuit outputs cleaner * remove unwanted code * increase felt dict count always during get() * doc function + merge main * reviews * use elemts stride for offseting u384 structs * forgot to update one stride --------- Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com>
* change initial gas due to overflows * fix some libfuncs in circuits * fix is() for circuits * remove Value::Unit from return values in get_output * match U96LimbsLessThanGuarantee correctly * some corrections to circuits * some corrections to circuits * fix failure_guarantee_verify to avoid panicking * fix circuits * more fixes to circuits + implement ec_zero libfunc * clippy * remove unnecesary tests * remove unnecesary file * fix branch index * add comment * fix eval_u96_limbs_less_than_guarantee_verify * remove circuit failure test * update trace dump with new Value::CircitOutputs * fmt * reviews + fix modulus in trace dump * remove unnecesary file * fix clippy * implement circuit_single_limb_less_than_guarantee_verify * fix trace dump for circuit outputs * fix felt_dict_get * fix felt_dict_get * implement U96LimbsLessThanGuarantee for trace dump * remove unnecessary code * fmt * fix felt_dict_entry_get * revert change in circuits.rs * remove unwanted file * revert unwanted change * revert unwanted change * fix cast and int range libfuncs * make trace dump for circuit outputs cleaner * remove unwanted code * increase felt dict count always during get() * doc function + merge main * fix some libfuncs * implement CouponCall not working * all tests passing * remove WIP for corelib tests in sierra-emu's ci * remove WIP for corelib tests in sierra-emu's ci * fmt! * pop unused argument in coupon_call * better error messages in utils
* Add basic Statistics struct and its builder * Add Serialzie to Statistics * Generate basic sierra statistics * Add stats argument to compile * Save sierra to mlir and mlir passes time * Add stats argument to object_to_shared_lib * Save linking time * Add stats argument to module_to_object * Save llvm time * Save total compilation time * Save object size in statistics * Remove StatisticsBuilder * Add libfunc frequency * Remove work * Assert frequency map is not empty * Save mlir operation count * Save llvmir instructions and opcode frequency * Save llvmir virtual register count * Adapt trace_dump.rs * Don't rely on transmute * Move MLIR walking logic to walk_ir module * Move LLVMIR walking to walk_ir module * Improve comments * Pass statistics to compile stats * Save MLIR operations by libfunc * Add clone_option_mut macro * Validate statistics * Use clone_option_mut * Document statistics * Document walk_ir module * Add API to statistics * Add support for saving stats on `starknet-native-compile` * Add documentation * Fix clippy * Update starknet-blocks.yml ref * Rephrase docs Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * Update script for comparing state dumps --------- Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com>
b427425
to
6858c37
Compare
I resigned all commits so that we can merge it. |
There are failing CI jobs because this PR is an external contribution. However we can merge this PR safely because it only changes documentation, not code. |
* Review TODO comments * Minor improvements to Sierra Emu crate (#1202) * Move cairo-lang dependencies to workspace * Remove sierra-emu/.gitignore * Update lock * Add fibonacci.cairo example for sierra emulator * Simplify Makefile * Simplify README and improve documentation on how to use the binary * Add make check * Improve examples * Document make check * Remove unused script * Add fibonacci_contract.cairo * Fix typo in Makefile * Fix CI * Use cairo2/corelib instead of corelib for symlinking in sierra emu * Improve Sierra Emulator descritopn * Move more dependencies to workspace * Fix whitespace * Fix whitespace (again) --------- Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * Add Trace Dump feature (#1199) * Add trace dump support in compiler * Add sierra emu dependency with trace-dump feature * Add trace dump metadata * Register trace dump symbols on executors * Use trace dump feature in cairo-native-run * Remove unused feature * Rename trace_id symbol * Don't generate trace dump on return when no tail recursion target has been found * Update lock * Derive Eq,PartialEq on TraceDump * Substract initial required gas in sierra emu * Print error when trace dump is not found, but ignore * Add trace dump test * Fix clippy * Remove `get_layout` from trace dump * Rename variables * Minor improvements * Add documentation * Improve documentation * Improve documentation on trace dump runtime functions * Fix typo Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * Fix warning * Update usage docs * Document trace dump feature for programs * Add txt to blockquote to avoid executing in doc test --------- Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * [Sierra-Emu] Implement missing syscall and nullable libfuncs (#1205) * Add sierra-emu as a debug utility * Change working dir in sierra-emu job * Remove repeated lines in sierra-emu gitignore * Exclude debug_utils from coverage job * remove some todos from value and implement Coupon libfunc * start adding corelib test * run tests from corelib * remove unwanted file * remove not related things * get return_value from trace * replace ids for debug info * add common folder for integration tests * fix tests * remove todo * ignore test for now * filter ignored tests * Update debug_utils/sierra-emu/tests/common/mod.rs Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * run ignored test from the ci * better ignoring * remove debug_name in enums * refactor * remove unused dependency * More expressive naming for the workflow Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * reviews * reviews * fmt * fmt ci * revert last commit * fmt * accidentally removed rayon usage * avoid map's short-circuiting * catch panics the avoid loosing the test name * log ignored tests * clippy * Add "(WIP)" to corelib's test job Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * print progress as the test runs * fmt * format makefile Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * fix name test in ci * add dependencies removed in merge * dependencies * clippy * remove unused import * better indent in makefile * uppercase tests summary comment for better sight * add starknet missing libfuncs * cargo.lock * add null, nullable_from_box and match_nullable libfuncs * clippyt * add forward_snapshot libfunc + fix is() for nullable * refactor syscall handler * add some felt types to match * remove type_to_name() call in is() function --------- Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com> Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * [Sierra-Emu] implement some todos from `const` and `cast` libfuncs (#1191) * Add sierra-emu as a debug utility * Change working dir in sierra-emu job * Remove repeated lines in sierra-emu gitignore * Exclude debug_utils from coverage job * remove some todos from value and implement Coupon libfunc * start adding corelib test * run tests from corelib * remove unwanted file * remove not related things * get return_value from trace * replace ids for debug info * add common folder for integration tests * fix tests * remove todo * ignore test for now * add enum in const::inner * remove todos and fix some failures * filter ignored tests * Update debug_utils/sierra-emu/tests/common/mod.rs Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * run ignored test from the ci * better ignoring * ignore test * fmt * remove debug_name in enums * refactor * remove unused dependency * More expressive naming for the workflow Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * reviews * reviews * fmt * fmt ci * revert last commit * fmt * accidentally removed rayon usage * avoid map's short-circuiting * catch panics the avoid loosing the test name * log ignored tests * clippy * Add "(WIP)" to corelib's test job Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * print progress as the test runs * fmt * format makefile Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * fix name test in ci * add dependencies removed in merge * dependencies * clippy * remove unused import * better indent in makefile * uppercase tests summary comment for better sight * fix clippy * clippy * remove unnecesary pubs * better docs * better panic message in get_numberic_args_as_bigints() Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * reviews * remove unnecessary comment Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * use slices in get_numeric_args_as_bigints * fmt * remove unnecesary to_vec * fmt * use iter instead of into_iter * reviews changes * better error message * fix typo --------- Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com> Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * [Sierra-Emu] implement `get_available_gas` libfunc (#1210) * implement las gas libfunc * remove unnecesary pubs * Improve sierra2casm-dbg (#1206) * Add sierra2casm-dbg * Sync cairo version between sierra2casm-dbg and root * Bump Cairo VM version in sierra2casm-dbg * Fix compilation and linter errors * Bump Cairo in sierra2casm-dbg * Remove unused serde dep in sierra2casm-dbg * Remove Rust toolchain in sierra2casm-dbg * Add sierra2casm-dbg CI job (#1201) * Move cairo-lang dependencies to workspace * Remove sierra-emu/.gitignore * Update lock * Add fibonacci.cairo example for sierra emulator * Simplify Makefile * Simplify README and improve documentation on how to use the binary * Add make check * Improve examples * Document make check * Remove unused script * Add fibonacci_contract.cairo * Fix typo in Makefile * Fix CI * Use cairo2/corelib instead of corelib for symlinking in sierra emu * Improve Sierra Emulator descritopn * Move more dependencies to workspace * Rename to casm-data-flow * Add Makefile * Add basic run-contract example * Add fibonacci_starknet.cairo * Fix hint format * Add basic README.md * Update dependencies * Print gas usage * Finish README.md * Add .PHONY * Fix paragraph * Move deps to workspace * Fix whitespace * Fix whitespace * Fix README.md --------- Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * [Sierra-Emu] implement missing libfuncs from `int_range` and `array` (#1200) * Add sierra-emu as a debug utility * Change working dir in sierra-emu job * Remove repeated lines in sierra-emu gitignore * Exclude debug_utils from coverage job * remove some todos from value and implement Coupon libfunc * start adding corelib test * run tests from corelib * remove unwanted file * remove not related things * get return_value from trace * replace ids for debug info * add common folder for integration tests * fix tests * remove todo * ignore test for now * filter ignored tests * Update debug_utils/sierra-emu/tests/common/mod.rs Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * run ignored test from the ci * better ignoring * remove debug_name in enums * refactor * remove unused dependency * More expressive naming for the workflow Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * reviews * reviews * fmt * fmt ci * revert last commit * fmt * accidentally removed rayon usage * avoid map's short-circuiting * catch panics the avoid loosing the test name * log ignored tests * clippy * Add "(WIP)" to corelib's test job Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * print progress as the test runs * fmt * format makefile Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * fix name test in ci * add dependencies removed in merge * dependencies * clippy * remove unused import * better indent in makefile * uppercase tests summary comment for better sight * implement int_range libfuncs * implement missing array libfuncs * fmt * add is() for IntRange * remove unnecesary pubs * reviews * reviews * fix branching in int_range_try_new * clippy * reviews * fmt --------- Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com> Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * [Sierra-Emu] Implement missing libfuncs from int (#1192) * Add sierra-emu as a debug utility * Change working dir in sierra-emu job * Remove repeated lines in sierra-emu gitignore * Exclude debug_utils from coverage job * remove some todos from value and implement Coupon libfunc * start adding corelib test * run tests from corelib * remove unwanted file * remove not related things * get return_value from trace * replace ids for debug info * add common folder for integration tests * fix tests * remove todo * ignore test for now * filter ignored tests * Update debug_utils/sierra-emu/tests/common/mod.rs Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * run ignored test from the ci * better ignoring * remove debug_name in enums * refactor * remove unused dependency * implement missing libfuncs from int * fmt * More expressive naming for the workflow Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * reviews * reviews * fmt * fmt ci * revert last commit * fmt * accidentally removed rayon usage * avoid map's short-circuiting * catch panics the avoid loosing the test name * log ignored tests * clippy * Add "(WIP)" to corelib's test job Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * add general libfuncs: const, equal, to_felt, from_felt * add diff libfunc * print progress as the test runs * fmt * fix from_felt * remove unused files + fix issue with non-integer * format makefile Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * try fix from_felt * fix name test in ci * add dependencies removed in merge * dependencies * clippy * remove unused import * better indent in makefile * uppercase tests summary comment for better sight * simplify a little apply_wrapping_op * merge test-corelib * remove unnecesary pubs * also match builtins instead of filtering them * format * use slices in get_numeric_args_as_bigints * fmt * remove unnecesary to_vec * fmt * use iter instead of into_iter * clippy * reviews + remove uint128 file * rename uint252 file to uint256 * fix clippy --------- Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com> Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * Update arch.rs * Update main.rs * Update arch.rs * Update enum.rs * Update arch.rs * Update executor.rs * Update contract.rs * Update bytes31.rs * Update felt252.rs * Update starknet.rs * Update starknet.rs * implement circuit_single_limb_less_than_guarantee_verify (#1212) * implement circuit_single_limb_less_than_guarantee_verify * fmt * clippy * Fix comment Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> --------- Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * [Sierra-Emu] Fix felt-dict's overflow, circuits libfuncs and implement missing EcPoint libfunc (#1208) * change initial gas due to overflows * fix some libfuncs in circuits * fix is() for circuits * remove Value::Unit from return values in get_output * match U96LimbsLessThanGuarantee correctly * some corrections to circuits * some corrections to circuits * fix failure_guarantee_verify to avoid panicking * fix circuits * more fixes to circuits + implement ec_zero libfunc * clippy * remove unnecesary tests * remove unnecesary file * fix branch index * add comment * fix eval_u96_limbs_less_than_guarantee_verify * remove circuit failure test * update trace dump with new Value::CircitOutputs * fmt * reviews + fix modulus in trace dump * remove unnecesary file * fix clippy * implement circuit_single_limb_less_than_guarantee_verify * fix trace dump for circuit outputs * fix felt_dict_get * fix felt_dict_get * implement U96LimbsLessThanGuarantee for trace dump * remove unnecessary code * fmt * fix felt_dict_entry_get * revert change in circuits.rs * remove unwanted file * revert unwanted change * revert unwanted change * make trace dump for circuit outputs cleaner * remove unwanted code * increase felt dict count always during get() * doc function + merge main * reviews * use elemts stride for offseting u384 structs * forgot to update one stride --------- Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * cherry: Use dynamic arrays instead of static arrays for circuit data (#1233) (#1237) * [Serra-Emu] Fix some libfuncs (#1223) * change initial gas due to overflows * fix some libfuncs in circuits * fix is() for circuits * remove Value::Unit from return values in get_output * match U96LimbsLessThanGuarantee correctly * some corrections to circuits * some corrections to circuits * fix failure_guarantee_verify to avoid panicking * fix circuits * more fixes to circuits + implement ec_zero libfunc * clippy * remove unnecesary tests * remove unnecesary file * fix branch index * add comment * fix eval_u96_limbs_less_than_guarantee_verify * remove circuit failure test * update trace dump with new Value::CircitOutputs * fmt * reviews + fix modulus in trace dump * remove unnecesary file * fix clippy * implement circuit_single_limb_less_than_guarantee_verify * fix trace dump for circuit outputs * fix felt_dict_get * fix felt_dict_get * implement U96LimbsLessThanGuarantee for trace dump * remove unnecessary code * fmt * fix felt_dict_entry_get * revert change in circuits.rs * remove unwanted file * revert unwanted change * revert unwanted change * fix cast and int range libfuncs * make trace dump for circuit outputs cleaner * remove unwanted code * increase felt dict count always during get() * doc function + merge main * fix some libfuncs * implement CouponCall not working * all tests passing * remove WIP for corelib tests in sierra-emu's ci * remove WIP for corelib tests in sierra-emu's ci * fmt! * pop unused argument in coupon_call * better error messages in utils * Fix format * Gather compilation statistics (#1236) * Add basic Statistics struct and its builder * Add Serialzie to Statistics * Generate basic sierra statistics * Add stats argument to compile * Save sierra to mlir and mlir passes time * Add stats argument to object_to_shared_lib * Save linking time * Add stats argument to module_to_object * Save llvm time * Save total compilation time * Save object size in statistics * Remove StatisticsBuilder * Add libfunc frequency * Remove work * Assert frequency map is not empty * Save mlir operation count * Save llvmir instructions and opcode frequency * Save llvmir virtual register count * Adapt trace_dump.rs * Don't rely on transmute * Move MLIR walking logic to walk_ir module * Move LLVMIR walking to walk_ir module * Improve comments * Pass statistics to compile stats * Save MLIR operations by libfunc * Add clone_option_mut macro * Validate statistics * Use clone_option_mut * Document statistics * Document walk_ir module * Add API to statistics * Add support for saving stats on `starknet-native-compile` * Add documentation * Fix clippy * Update starknet-blocks.yml ref * Rephrase docs Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * Update script for comparing state dumps --------- Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * Don't fail on empty programs (#1248) * Update version (#1249) --------- Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> Co-authored-by: Franco Giachetta <francogiachetta27@gmail.com> Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com>
* Review TODO comments * Minor improvements to Sierra Emu crate (#1202) * Move cairo-lang dependencies to workspace * Remove sierra-emu/.gitignore * Update lock * Add fibonacci.cairo example for sierra emulator * Simplify Makefile * Simplify README and improve documentation on how to use the binary * Add make check * Improve examples * Document make check * Remove unused script * Add fibonacci_contract.cairo * Fix typo in Makefile * Fix CI * Use cairo2/corelib instead of corelib for symlinking in sierra emu * Improve Sierra Emulator descritopn * Move more dependencies to workspace * Fix whitespace * Fix whitespace (again) --------- Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * Add Trace Dump feature (#1199) * Add trace dump support in compiler * Add sierra emu dependency with trace-dump feature * Add trace dump metadata * Register trace dump symbols on executors * Use trace dump feature in cairo-native-run * Remove unused feature * Rename trace_id symbol * Don't generate trace dump on return when no tail recursion target has been found * Update lock * Derive Eq,PartialEq on TraceDump * Substract initial required gas in sierra emu * Print error when trace dump is not found, but ignore * Add trace dump test * Fix clippy * Remove `get_layout` from trace dump * Rename variables * Minor improvements * Add documentation * Improve documentation * Improve documentation on trace dump runtime functions * Fix typo Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * Fix warning * Update usage docs * Document trace dump feature for programs * Add txt to blockquote to avoid executing in doc test --------- Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * [Sierra-Emu] Implement missing syscall and nullable libfuncs (#1205) * Add sierra-emu as a debug utility * Change working dir in sierra-emu job * Remove repeated lines in sierra-emu gitignore * Exclude debug_utils from coverage job * remove some todos from value and implement Coupon libfunc * start adding corelib test * run tests from corelib * remove unwanted file * remove not related things * get return_value from trace * replace ids for debug info * add common folder for integration tests * fix tests * remove todo * ignore test for now * filter ignored tests * Update debug_utils/sierra-emu/tests/common/mod.rs Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * run ignored test from the ci * better ignoring * remove debug_name in enums * refactor * remove unused dependency * More expressive naming for the workflow Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * reviews * reviews * fmt * fmt ci * revert last commit * fmt * accidentally removed rayon usage * avoid map's short-circuiting * catch panics the avoid loosing the test name * log ignored tests * clippy * Add "(WIP)" to corelib's test job Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * print progress as the test runs * fmt * format makefile Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * fix name test in ci * add dependencies removed in merge * dependencies * clippy * remove unused import * better indent in makefile * uppercase tests summary comment for better sight * add starknet missing libfuncs * cargo.lock * add null, nullable_from_box and match_nullable libfuncs * clippyt * add forward_snapshot libfunc + fix is() for nullable * refactor syscall handler * add some felt types to match * remove type_to_name() call in is() function --------- Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com> Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * [Sierra-Emu] implement some todos from `const` and `cast` libfuncs (#1191) * Add sierra-emu as a debug utility * Change working dir in sierra-emu job * Remove repeated lines in sierra-emu gitignore * Exclude debug_utils from coverage job * remove some todos from value and implement Coupon libfunc * start adding corelib test * run tests from corelib * remove unwanted file * remove not related things * get return_value from trace * replace ids for debug info * add common folder for integration tests * fix tests * remove todo * ignore test for now * add enum in const::inner * remove todos and fix some failures * filter ignored tests * Update debug_utils/sierra-emu/tests/common/mod.rs Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * run ignored test from the ci * better ignoring * ignore test * fmt * remove debug_name in enums * refactor * remove unused dependency * More expressive naming for the workflow Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * reviews * reviews * fmt * fmt ci * revert last commit * fmt * accidentally removed rayon usage * avoid map's short-circuiting * catch panics the avoid loosing the test name * log ignored tests * clippy * Add "(WIP)" to corelib's test job Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * print progress as the test runs * fmt * format makefile Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * fix name test in ci * add dependencies removed in merge * dependencies * clippy * remove unused import * better indent in makefile * uppercase tests summary comment for better sight * fix clippy * clippy * remove unnecesary pubs * better docs * better panic message in get_numberic_args_as_bigints() Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * reviews * remove unnecessary comment Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * use slices in get_numeric_args_as_bigints * fmt * remove unnecesary to_vec * fmt * use iter instead of into_iter * reviews changes * better error message * fix typo --------- Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com> Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * [Sierra-Emu] implement `get_available_gas` libfunc (#1210) * implement las gas libfunc * remove unnecesary pubs * Improve sierra2casm-dbg (#1206) * Add sierra2casm-dbg * Sync cairo version between sierra2casm-dbg and root * Bump Cairo VM version in sierra2casm-dbg * Fix compilation and linter errors * Bump Cairo in sierra2casm-dbg * Remove unused serde dep in sierra2casm-dbg * Remove Rust toolchain in sierra2casm-dbg * Add sierra2casm-dbg CI job (#1201) * Move cairo-lang dependencies to workspace * Remove sierra-emu/.gitignore * Update lock * Add fibonacci.cairo example for sierra emulator * Simplify Makefile * Simplify README and improve documentation on how to use the binary * Add make check * Improve examples * Document make check * Remove unused script * Add fibonacci_contract.cairo * Fix typo in Makefile * Fix CI * Use cairo2/corelib instead of corelib for symlinking in sierra emu * Improve Sierra Emulator descritopn * Move more dependencies to workspace * Rename to casm-data-flow * Add Makefile * Add basic run-contract example * Add fibonacci_starknet.cairo * Fix hint format * Add basic README.md * Update dependencies * Print gas usage * Finish README.md * Add .PHONY * Fix paragraph * Move deps to workspace * Fix whitespace * Fix whitespace * Fix README.md --------- Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * [Sierra-Emu] implement missing libfuncs from `int_range` and `array` (#1200) * Add sierra-emu as a debug utility * Change working dir in sierra-emu job * Remove repeated lines in sierra-emu gitignore * Exclude debug_utils from coverage job * remove some todos from value and implement Coupon libfunc * start adding corelib test * run tests from corelib * remove unwanted file * remove not related things * get return_value from trace * replace ids for debug info * add common folder for integration tests * fix tests * remove todo * ignore test for now * filter ignored tests * Update debug_utils/sierra-emu/tests/common/mod.rs Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * run ignored test from the ci * better ignoring * remove debug_name in enums * refactor * remove unused dependency * More expressive naming for the workflow Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * reviews * reviews * fmt * fmt ci * revert last commit * fmt * accidentally removed rayon usage * avoid map's short-circuiting * catch panics the avoid loosing the test name * log ignored tests * clippy * Add "(WIP)" to corelib's test job Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * print progress as the test runs * fmt * format makefile Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * fix name test in ci * add dependencies removed in merge * dependencies * clippy * remove unused import * better indent in makefile * uppercase tests summary comment for better sight * implement int_range libfuncs * implement missing array libfuncs * fmt * add is() for IntRange * remove unnecesary pubs * reviews * reviews * fix branching in int_range_try_new * clippy * reviews * fmt --------- Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com> Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * [Sierra-Emu] Implement missing libfuncs from int (#1192) * Add sierra-emu as a debug utility * Change working dir in sierra-emu job * Remove repeated lines in sierra-emu gitignore * Exclude debug_utils from coverage job * remove some todos from value and implement Coupon libfunc * start adding corelib test * run tests from corelib * remove unwanted file * remove not related things * get return_value from trace * replace ids for debug info * add common folder for integration tests * fix tests * remove todo * ignore test for now * filter ignored tests * Update debug_utils/sierra-emu/tests/common/mod.rs Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * run ignored test from the ci * better ignoring * remove debug_name in enums * refactor * remove unused dependency * implement missing libfuncs from int * fmt * More expressive naming for the workflow Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * reviews * reviews * fmt * fmt ci * revert last commit * fmt * accidentally removed rayon usage * avoid map's short-circuiting * catch panics the avoid loosing the test name * log ignored tests * clippy * Add "(WIP)" to corelib's test job Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * add general libfuncs: const, equal, to_felt, from_felt * add diff libfunc * print progress as the test runs * fmt * fix from_felt * remove unused files + fix issue with non-integer * format makefile Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * try fix from_felt * fix name test in ci * add dependencies removed in merge * dependencies * clippy * remove unused import * better indent in makefile * uppercase tests summary comment for better sight * simplify a little apply_wrapping_op * merge test-corelib * remove unnecesary pubs * also match builtins instead of filtering them * format * use slices in get_numeric_args_as_bigints * fmt * remove unnecesary to_vec * fmt * use iter instead of into_iter * clippy * reviews + remove uint128 file * rename uint252 file to uint256 * fix clippy --------- Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com> Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * Update arch.rs * Update main.rs * Update arch.rs * Update enum.rs * Update arch.rs * Update executor.rs * Update contract.rs * Update bytes31.rs * Update felt252.rs * Update starknet.rs * Update starknet.rs * implement circuit_single_limb_less_than_guarantee_verify (#1212) * implement circuit_single_limb_less_than_guarantee_verify * fmt * clippy * Fix comment Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> --------- Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * [Sierra-Emu] Fix felt-dict's overflow, circuits libfuncs and implement missing EcPoint libfunc (#1208) * change initial gas due to overflows * fix some libfuncs in circuits * fix is() for circuits * remove Value::Unit from return values in get_output * match U96LimbsLessThanGuarantee correctly * some corrections to circuits * some corrections to circuits * fix failure_guarantee_verify to avoid panicking * fix circuits * more fixes to circuits + implement ec_zero libfunc * clippy * remove unnecesary tests * remove unnecesary file * fix branch index * add comment * fix eval_u96_limbs_less_than_guarantee_verify * remove circuit failure test * update trace dump with new Value::CircitOutputs * fmt * reviews + fix modulus in trace dump * remove unnecesary file * fix clippy * implement circuit_single_limb_less_than_guarantee_verify * fix trace dump for circuit outputs * fix felt_dict_get * fix felt_dict_get * implement U96LimbsLessThanGuarantee for trace dump * remove unnecessary code * fmt * fix felt_dict_entry_get * revert change in circuits.rs * remove unwanted file * revert unwanted change * revert unwanted change * make trace dump for circuit outputs cleaner * remove unwanted code * increase felt dict count always during get() * doc function + merge main * reviews * use elemts stride for offseting u384 structs * forgot to update one stride --------- Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * cherry: Use dynamic arrays instead of static arrays for circuit data (#1233) (#1237) * [Serra-Emu] Fix some libfuncs (#1223) * change initial gas due to overflows * fix some libfuncs in circuits * fix is() for circuits * remove Value::Unit from return values in get_output * match U96LimbsLessThanGuarantee correctly * some corrections to circuits * some corrections to circuits * fix failure_guarantee_verify to avoid panicking * fix circuits * more fixes to circuits + implement ec_zero libfunc * clippy * remove unnecesary tests * remove unnecesary file * fix branch index * add comment * fix eval_u96_limbs_less_than_guarantee_verify * remove circuit failure test * update trace dump with new Value::CircitOutputs * fmt * reviews + fix modulus in trace dump * remove unnecesary file * fix clippy * implement circuit_single_limb_less_than_guarantee_verify * fix trace dump for circuit outputs * fix felt_dict_get * fix felt_dict_get * implement U96LimbsLessThanGuarantee for trace dump * remove unnecessary code * fmt * fix felt_dict_entry_get * revert change in circuits.rs * remove unwanted file * revert unwanted change * revert unwanted change * fix cast and int range libfuncs * make trace dump for circuit outputs cleaner * remove unwanted code * increase felt dict count always during get() * doc function + merge main * fix some libfuncs * implement CouponCall not working * all tests passing * remove WIP for corelib tests in sierra-emu's ci * remove WIP for corelib tests in sierra-emu's ci * fmt! * pop unused argument in coupon_call * better error messages in utils * Fix format * Gather compilation statistics (#1236) * Add basic Statistics struct and its builder * Add Serialzie to Statistics * Generate basic sierra statistics * Add stats argument to compile * Save sierra to mlir and mlir passes time * Add stats argument to object_to_shared_lib * Save linking time * Add stats argument to module_to_object * Save llvm time * Save total compilation time * Save object size in statistics * Remove StatisticsBuilder * Add libfunc frequency * Remove work * Assert frequency map is not empty * Save mlir operation count * Save llvmir instructions and opcode frequency * Save llvmir virtual register count * Adapt trace_dump.rs * Don't rely on transmute * Move MLIR walking logic to walk_ir module * Move LLVMIR walking to walk_ir module * Improve comments * Pass statistics to compile stats * Save MLIR operations by libfunc * Add clone_option_mut macro * Validate statistics * Use clone_option_mut * Document statistics * Document walk_ir module * Add API to statistics * Add support for saving stats on `starknet-native-compile` * Add documentation * Fix clippy * Update starknet-blocks.yml ref * Rephrase docs Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * Update script for comparing state dumps --------- Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * Don't fail on empty programs (#1248) * Update version (#1249) --------- Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> Co-authored-by: Franco Giachetta <francogiachetta27@gmail.com> Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com>
* Review TODO comments * Minor improvements to Sierra Emu crate (#1202) * Move cairo-lang dependencies to workspace * Remove sierra-emu/.gitignore * Update lock * Add fibonacci.cairo example for sierra emulator * Simplify Makefile * Simplify README and improve documentation on how to use the binary * Add make check * Improve examples * Document make check * Remove unused script * Add fibonacci_contract.cairo * Fix typo in Makefile * Fix CI * Use cairo2/corelib instead of corelib for symlinking in sierra emu * Improve Sierra Emulator descritopn * Move more dependencies to workspace * Fix whitespace * Fix whitespace (again) --------- Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * Add Trace Dump feature (#1199) * Add trace dump support in compiler * Add sierra emu dependency with trace-dump feature * Add trace dump metadata * Register trace dump symbols on executors * Use trace dump feature in cairo-native-run * Remove unused feature * Rename trace_id symbol * Don't generate trace dump on return when no tail recursion target has been found * Update lock * Derive Eq,PartialEq on TraceDump * Substract initial required gas in sierra emu * Print error when trace dump is not found, but ignore * Add trace dump test * Fix clippy * Remove `get_layout` from trace dump * Rename variables * Minor improvements * Add documentation * Improve documentation * Improve documentation on trace dump runtime functions * Fix typo Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * Fix warning * Update usage docs * Document trace dump feature for programs * Add txt to blockquote to avoid executing in doc test --------- Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * [Sierra-Emu] Implement missing syscall and nullable libfuncs (#1205) * Add sierra-emu as a debug utility * Change working dir in sierra-emu job * Remove repeated lines in sierra-emu gitignore * Exclude debug_utils from coverage job * remove some todos from value and implement Coupon libfunc * start adding corelib test * run tests from corelib * remove unwanted file * remove not related things * get return_value from trace * replace ids for debug info * add common folder for integration tests * fix tests * remove todo * ignore test for now * filter ignored tests * Update debug_utils/sierra-emu/tests/common/mod.rs Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * run ignored test from the ci * better ignoring * remove debug_name in enums * refactor * remove unused dependency * More expressive naming for the workflow Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * reviews * reviews * fmt * fmt ci * revert last commit * fmt * accidentally removed rayon usage * avoid map's short-circuiting * catch panics the avoid loosing the test name * log ignored tests * clippy * Add "(WIP)" to corelib's test job Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * print progress as the test runs * fmt * format makefile Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * fix name test in ci * add dependencies removed in merge * dependencies * clippy * remove unused import * better indent in makefile * uppercase tests summary comment for better sight * add starknet missing libfuncs * cargo.lock * add null, nullable_from_box and match_nullable libfuncs * clippyt * add forward_snapshot libfunc + fix is() for nullable * refactor syscall handler * add some felt types to match * remove type_to_name() call in is() function --------- Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com> Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * [Sierra-Emu] implement some todos from `const` and `cast` libfuncs (#1191) * Add sierra-emu as a debug utility * Change working dir in sierra-emu job * Remove repeated lines in sierra-emu gitignore * Exclude debug_utils from coverage job * remove some todos from value and implement Coupon libfunc * start adding corelib test * run tests from corelib * remove unwanted file * remove not related things * get return_value from trace * replace ids for debug info * add common folder for integration tests * fix tests * remove todo * ignore test for now * add enum in const::inner * remove todos and fix some failures * filter ignored tests * Update debug_utils/sierra-emu/tests/common/mod.rs Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * run ignored test from the ci * better ignoring * ignore test * fmt * remove debug_name in enums * refactor * remove unused dependency * More expressive naming for the workflow Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * reviews * reviews * fmt * fmt ci * revert last commit * fmt * accidentally removed rayon usage * avoid map's short-circuiting * catch panics the avoid loosing the test name * log ignored tests * clippy * Add "(WIP)" to corelib's test job Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * print progress as the test runs * fmt * format makefile Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * fix name test in ci * add dependencies removed in merge * dependencies * clippy * remove unused import * better indent in makefile * uppercase tests summary comment for better sight * fix clippy * clippy * remove unnecesary pubs * better docs * better panic message in get_numberic_args_as_bigints() Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * reviews * remove unnecessary comment Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * use slices in get_numeric_args_as_bigints * fmt * remove unnecesary to_vec * fmt * use iter instead of into_iter * reviews changes * better error message * fix typo --------- Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com> Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * [Sierra-Emu] implement `get_available_gas` libfunc (#1210) * implement las gas libfunc * remove unnecesary pubs * Improve sierra2casm-dbg (#1206) * Add sierra2casm-dbg * Sync cairo version between sierra2casm-dbg and root * Bump Cairo VM version in sierra2casm-dbg * Fix compilation and linter errors * Bump Cairo in sierra2casm-dbg * Remove unused serde dep in sierra2casm-dbg * Remove Rust toolchain in sierra2casm-dbg * Add sierra2casm-dbg CI job (#1201) * Move cairo-lang dependencies to workspace * Remove sierra-emu/.gitignore * Update lock * Add fibonacci.cairo example for sierra emulator * Simplify Makefile * Simplify README and improve documentation on how to use the binary * Add make check * Improve examples * Document make check * Remove unused script * Add fibonacci_contract.cairo * Fix typo in Makefile * Fix CI * Use cairo2/corelib instead of corelib for symlinking in sierra emu * Improve Sierra Emulator descritopn * Move more dependencies to workspace * Rename to casm-data-flow * Add Makefile * Add basic run-contract example * Add fibonacci_starknet.cairo * Fix hint format * Add basic README.md * Update dependencies * Print gas usage * Finish README.md * Add .PHONY * Fix paragraph * Move deps to workspace * Fix whitespace * Fix whitespace * Fix README.md --------- Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * [Sierra-Emu] implement missing libfuncs from `int_range` and `array` (#1200) * Add sierra-emu as a debug utility * Change working dir in sierra-emu job * Remove repeated lines in sierra-emu gitignore * Exclude debug_utils from coverage job * remove some todos from value and implement Coupon libfunc * start adding corelib test * run tests from corelib * remove unwanted file * remove not related things * get return_value from trace * replace ids for debug info * add common folder for integration tests * fix tests * remove todo * ignore test for now * filter ignored tests * Update debug_utils/sierra-emu/tests/common/mod.rs Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * run ignored test from the ci * better ignoring * remove debug_name in enums * refactor * remove unused dependency * More expressive naming for the workflow Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * reviews * reviews * fmt * fmt ci * revert last commit * fmt * accidentally removed rayon usage * avoid map's short-circuiting * catch panics the avoid loosing the test name * log ignored tests * clippy * Add "(WIP)" to corelib's test job Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * print progress as the test runs * fmt * format makefile Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * fix name test in ci * add dependencies removed in merge * dependencies * clippy * remove unused import * better indent in makefile * uppercase tests summary comment for better sight * implement int_range libfuncs * implement missing array libfuncs * fmt * add is() for IntRange * remove unnecesary pubs * reviews * reviews * fix branching in int_range_try_new * clippy * reviews * fmt --------- Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com> Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * [Sierra-Emu] Implement missing libfuncs from int (#1192) * Add sierra-emu as a debug utility * Change working dir in sierra-emu job * Remove repeated lines in sierra-emu gitignore * Exclude debug_utils from coverage job * remove some todos from value and implement Coupon libfunc * start adding corelib test * run tests from corelib * remove unwanted file * remove not related things * get return_value from trace * replace ids for debug info * add common folder for integration tests * fix tests * remove todo * ignore test for now * filter ignored tests * Update debug_utils/sierra-emu/tests/common/mod.rs Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * run ignored test from the ci * better ignoring * remove debug_name in enums * refactor * remove unused dependency * implement missing libfuncs from int * fmt * More expressive naming for the workflow Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * reviews * reviews * fmt * fmt ci * revert last commit * fmt * accidentally removed rayon usage * avoid map's short-circuiting * catch panics the avoid loosing the test name * log ignored tests * clippy * Add "(WIP)" to corelib's test job Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * add general libfuncs: const, equal, to_felt, from_felt * add diff libfunc * print progress as the test runs * fmt * fix from_felt * remove unused files + fix issue with non-integer * format makefile Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * try fix from_felt * fix name test in ci * add dependencies removed in merge * dependencies * clippy * remove unused import * better indent in makefile * uppercase tests summary comment for better sight * simplify a little apply_wrapping_op * merge test-corelib * remove unnecesary pubs * also match builtins instead of filtering them * format * use slices in get_numeric_args_as_bigints * fmt * remove unnecesary to_vec * fmt * use iter instead of into_iter * clippy * reviews + remove uint128 file * rename uint252 file to uint256 * fix clippy --------- Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com> Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * Update arch.rs * Update main.rs * Update arch.rs * Update enum.rs * Update arch.rs * Update executor.rs * Update contract.rs * Update bytes31.rs * Update felt252.rs * Update starknet.rs * Update starknet.rs * implement circuit_single_limb_less_than_guarantee_verify (#1212) * implement circuit_single_limb_less_than_guarantee_verify * fmt * clippy * Fix comment Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> --------- Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * [Sierra-Emu] Fix felt-dict's overflow, circuits libfuncs and implement missing EcPoint libfunc (#1208) * change initial gas due to overflows * fix some libfuncs in circuits * fix is() for circuits * remove Value::Unit from return values in get_output * match U96LimbsLessThanGuarantee correctly * some corrections to circuits * some corrections to circuits * fix failure_guarantee_verify to avoid panicking * fix circuits * more fixes to circuits + implement ec_zero libfunc * clippy * remove unnecesary tests * remove unnecesary file * fix branch index * add comment * fix eval_u96_limbs_less_than_guarantee_verify * remove circuit failure test * update trace dump with new Value::CircitOutputs * fmt * reviews + fix modulus in trace dump * remove unnecesary file * fix clippy * implement circuit_single_limb_less_than_guarantee_verify * fix trace dump for circuit outputs * fix felt_dict_get * fix felt_dict_get * implement U96LimbsLessThanGuarantee for trace dump * remove unnecessary code * fmt * fix felt_dict_entry_get * revert change in circuits.rs * remove unwanted file * revert unwanted change * revert unwanted change * make trace dump for circuit outputs cleaner * remove unwanted code * increase felt dict count always during get() * doc function + merge main * reviews * use elemts stride for offseting u384 structs * forgot to update one stride --------- Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * cherry: Use dynamic arrays instead of static arrays for circuit data (#1233) (#1237) * [Serra-Emu] Fix some libfuncs (#1223) * change initial gas due to overflows * fix some libfuncs in circuits * fix is() for circuits * remove Value::Unit from return values in get_output * match U96LimbsLessThanGuarantee correctly * some corrections to circuits * some corrections to circuits * fix failure_guarantee_verify to avoid panicking * fix circuits * more fixes to circuits + implement ec_zero libfunc * clippy * remove unnecesary tests * remove unnecesary file * fix branch index * add comment * fix eval_u96_limbs_less_than_guarantee_verify * remove circuit failure test * update trace dump with new Value::CircitOutputs * fmt * reviews + fix modulus in trace dump * remove unnecesary file * fix clippy * implement circuit_single_limb_less_than_guarantee_verify * fix trace dump for circuit outputs * fix felt_dict_get * fix felt_dict_get * implement U96LimbsLessThanGuarantee for trace dump * remove unnecessary code * fmt * fix felt_dict_entry_get * revert change in circuits.rs * remove unwanted file * revert unwanted change * revert unwanted change * fix cast and int range libfuncs * make trace dump for circuit outputs cleaner * remove unwanted code * increase felt dict count always during get() * doc function + merge main * fix some libfuncs * implement CouponCall not working * all tests passing * remove WIP for corelib tests in sierra-emu's ci * remove WIP for corelib tests in sierra-emu's ci * fmt! * pop unused argument in coupon_call * better error messages in utils * Fix format * Gather compilation statistics (#1236) * Add basic Statistics struct and its builder * Add Serialzie to Statistics * Generate basic sierra statistics * Add stats argument to compile * Save sierra to mlir and mlir passes time * Add stats argument to object_to_shared_lib * Save linking time * Add stats argument to module_to_object * Save llvm time * Save total compilation time * Save object size in statistics * Remove StatisticsBuilder * Add libfunc frequency * Remove work * Assert frequency map is not empty * Save mlir operation count * Save llvmir instructions and opcode frequency * Save llvmir virtual register count * Adapt trace_dump.rs * Don't rely on transmute * Move MLIR walking logic to walk_ir module * Move LLVMIR walking to walk_ir module * Improve comments * Pass statistics to compile stats * Save MLIR operations by libfunc * Add clone_option_mut macro * Validate statistics * Use clone_option_mut * Document statistics * Document walk_ir module * Add API to statistics * Add support for saving stats on `starknet-native-compile` * Add documentation * Fix clippy * Update starknet-blocks.yml ref * Rephrase docs Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * Update script for comparing state dumps --------- Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * Don't fail on empty programs (#1248) * Update version (#1249) --------- Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> Co-authored-by: Franco Giachetta <francogiachetta27@gmail.com> Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com>
* Review TODO comments * Minor improvements to Sierra Emu crate (#1202) * Move cairo-lang dependencies to workspace * Remove sierra-emu/.gitignore * Update lock * Add fibonacci.cairo example for sierra emulator * Simplify Makefile * Simplify README and improve documentation on how to use the binary * Add make check * Improve examples * Document make check * Remove unused script * Add fibonacci_contract.cairo * Fix typo in Makefile * Fix CI * Use cairo2/corelib instead of corelib for symlinking in sierra emu * Improve Sierra Emulator descritopn * Move more dependencies to workspace * Fix whitespace * Fix whitespace (again) --------- Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * Add Trace Dump feature (#1199) * Add trace dump support in compiler * Add sierra emu dependency with trace-dump feature * Add trace dump metadata * Register trace dump symbols on executors * Use trace dump feature in cairo-native-run * Remove unused feature * Rename trace_id symbol * Don't generate trace dump on return when no tail recursion target has been found * Update lock * Derive Eq,PartialEq on TraceDump * Substract initial required gas in sierra emu * Print error when trace dump is not found, but ignore * Add trace dump test * Fix clippy * Remove `get_layout` from trace dump * Rename variables * Minor improvements * Add documentation * Improve documentation * Improve documentation on trace dump runtime functions * Fix typo Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * Fix warning * Update usage docs * Document trace dump feature for programs * Add txt to blockquote to avoid executing in doc test --------- Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * [Sierra-Emu] Implement missing syscall and nullable libfuncs (#1205) * Add sierra-emu as a debug utility * Change working dir in sierra-emu job * Remove repeated lines in sierra-emu gitignore * Exclude debug_utils from coverage job * remove some todos from value and implement Coupon libfunc * start adding corelib test * run tests from corelib * remove unwanted file * remove not related things * get return_value from trace * replace ids for debug info * add common folder for integration tests * fix tests * remove todo * ignore test for now * filter ignored tests * Update debug_utils/sierra-emu/tests/common/mod.rs Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * run ignored test from the ci * better ignoring * remove debug_name in enums * refactor * remove unused dependency * More expressive naming for the workflow Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * reviews * reviews * fmt * fmt ci * revert last commit * fmt * accidentally removed rayon usage * avoid map's short-circuiting * catch panics the avoid loosing the test name * log ignored tests * clippy * Add "(WIP)" to corelib's test job Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * print progress as the test runs * fmt * format makefile Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * fix name test in ci * add dependencies removed in merge * dependencies * clippy * remove unused import * better indent in makefile * uppercase tests summary comment for better sight * add starknet missing libfuncs * cargo.lock * add null, nullable_from_box and match_nullable libfuncs * clippyt * add forward_snapshot libfunc + fix is() for nullable * refactor syscall handler * add some felt types to match * remove type_to_name() call in is() function --------- Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com> Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * [Sierra-Emu] implement some todos from `const` and `cast` libfuncs (#1191) * Add sierra-emu as a debug utility * Change working dir in sierra-emu job * Remove repeated lines in sierra-emu gitignore * Exclude debug_utils from coverage job * remove some todos from value and implement Coupon libfunc * start adding corelib test * run tests from corelib * remove unwanted file * remove not related things * get return_value from trace * replace ids for debug info * add common folder for integration tests * fix tests * remove todo * ignore test for now * add enum in const::inner * remove todos and fix some failures * filter ignored tests * Update debug_utils/sierra-emu/tests/common/mod.rs Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * run ignored test from the ci * better ignoring * ignore test * fmt * remove debug_name in enums * refactor * remove unused dependency * More expressive naming for the workflow Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * reviews * reviews * fmt * fmt ci * revert last commit * fmt * accidentally removed rayon usage * avoid map's short-circuiting * catch panics the avoid loosing the test name * log ignored tests * clippy * Add "(WIP)" to corelib's test job Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * print progress as the test runs * fmt * format makefile Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * fix name test in ci * add dependencies removed in merge * dependencies * clippy * remove unused import * better indent in makefile * uppercase tests summary comment for better sight * fix clippy * clippy * remove unnecesary pubs * better docs * better panic message in get_numberic_args_as_bigints() Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * reviews * remove unnecessary comment Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * use slices in get_numeric_args_as_bigints * fmt * remove unnecesary to_vec * fmt * use iter instead of into_iter * reviews changes * better error message * fix typo --------- Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com> Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * [Sierra-Emu] implement `get_available_gas` libfunc (#1210) * implement las gas libfunc * remove unnecesary pubs * Improve sierra2casm-dbg (#1206) * Add sierra2casm-dbg * Sync cairo version between sierra2casm-dbg and root * Bump Cairo VM version in sierra2casm-dbg * Fix compilation and linter errors * Bump Cairo in sierra2casm-dbg * Remove unused serde dep in sierra2casm-dbg * Remove Rust toolchain in sierra2casm-dbg * Add sierra2casm-dbg CI job (#1201) * Move cairo-lang dependencies to workspace * Remove sierra-emu/.gitignore * Update lock * Add fibonacci.cairo example for sierra emulator * Simplify Makefile * Simplify README and improve documentation on how to use the binary * Add make check * Improve examples * Document make check * Remove unused script * Add fibonacci_contract.cairo * Fix typo in Makefile * Fix CI * Use cairo2/corelib instead of corelib for symlinking in sierra emu * Improve Sierra Emulator descritopn * Move more dependencies to workspace * Rename to casm-data-flow * Add Makefile * Add basic run-contract example * Add fibonacci_starknet.cairo * Fix hint format * Add basic README.md * Update dependencies * Print gas usage * Finish README.md * Add .PHONY * Fix paragraph * Move deps to workspace * Fix whitespace * Fix whitespace * Fix README.md --------- Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * [Sierra-Emu] implement missing libfuncs from `int_range` and `array` (#1200) * Add sierra-emu as a debug utility * Change working dir in sierra-emu job * Remove repeated lines in sierra-emu gitignore * Exclude debug_utils from coverage job * remove some todos from value and implement Coupon libfunc * start adding corelib test * run tests from corelib * remove unwanted file * remove not related things * get return_value from trace * replace ids for debug info * add common folder for integration tests * fix tests * remove todo * ignore test for now * filter ignored tests * Update debug_utils/sierra-emu/tests/common/mod.rs Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * run ignored test from the ci * better ignoring * remove debug_name in enums * refactor * remove unused dependency * More expressive naming for the workflow Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * reviews * reviews * fmt * fmt ci * revert last commit * fmt * accidentally removed rayon usage * avoid map's short-circuiting * catch panics the avoid loosing the test name * log ignored tests * clippy * Add "(WIP)" to corelib's test job Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * print progress as the test runs * fmt * format makefile Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * fix name test in ci * add dependencies removed in merge * dependencies * clippy * remove unused import * better indent in makefile * uppercase tests summary comment for better sight * implement int_range libfuncs * implement missing array libfuncs * fmt * add is() for IntRange * remove unnecesary pubs * reviews * reviews * fix branching in int_range_try_new * clippy * reviews * fmt --------- Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com> Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * [Sierra-Emu] Implement missing libfuncs from int (#1192) * Add sierra-emu as a debug utility * Change working dir in sierra-emu job * Remove repeated lines in sierra-emu gitignore * Exclude debug_utils from coverage job * remove some todos from value and implement Coupon libfunc * start adding corelib test * run tests from corelib * remove unwanted file * remove not related things * get return_value from trace * replace ids for debug info * add common folder for integration tests * fix tests * remove todo * ignore test for now * filter ignored tests * Update debug_utils/sierra-emu/tests/common/mod.rs Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * run ignored test from the ci * better ignoring * remove debug_name in enums * refactor * remove unused dependency * implement missing libfuncs from int * fmt * More expressive naming for the workflow Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * reviews * reviews * fmt * fmt ci * revert last commit * fmt * accidentally removed rayon usage * avoid map's short-circuiting * catch panics the avoid loosing the test name * log ignored tests * clippy * Add "(WIP)" to corelib's test job Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * add general libfuncs: const, equal, to_felt, from_felt * add diff libfunc * print progress as the test runs * fmt * fix from_felt * remove unused files + fix issue with non-integer * format makefile Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * try fix from_felt * fix name test in ci * add dependencies removed in merge * dependencies * clippy * remove unused import * better indent in makefile * uppercase tests summary comment for better sight * simplify a little apply_wrapping_op * merge test-corelib * remove unnecesary pubs * also match builtins instead of filtering them * format * use slices in get_numeric_args_as_bigints * fmt * remove unnecesary to_vec * fmt * use iter instead of into_iter * clippy * reviews + remove uint128 file * rename uint252 file to uint256 * fix clippy --------- Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com> Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * Update arch.rs * Update main.rs * Update arch.rs * Update enum.rs * Update arch.rs * Update executor.rs * Update contract.rs * Update bytes31.rs * Update felt252.rs * Update starknet.rs * Update starknet.rs * implement circuit_single_limb_less_than_guarantee_verify (#1212) * implement circuit_single_limb_less_than_guarantee_verify * fmt * clippy * Fix comment Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> --------- Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * [Sierra-Emu] Fix felt-dict's overflow, circuits libfuncs and implement missing EcPoint libfunc (#1208) * change initial gas due to overflows * fix some libfuncs in circuits * fix is() for circuits * remove Value::Unit from return values in get_output * match U96LimbsLessThanGuarantee correctly * some corrections to circuits * some corrections to circuits * fix failure_guarantee_verify to avoid panicking * fix circuits * more fixes to circuits + implement ec_zero libfunc * clippy * remove unnecesary tests * remove unnecesary file * fix branch index * add comment * fix eval_u96_limbs_less_than_guarantee_verify * remove circuit failure test * update trace dump with new Value::CircitOutputs * fmt * reviews + fix modulus in trace dump * remove unnecesary file * fix clippy * implement circuit_single_limb_less_than_guarantee_verify * fix trace dump for circuit outputs * fix felt_dict_get * fix felt_dict_get * implement U96LimbsLessThanGuarantee for trace dump * remove unnecessary code * fmt * fix felt_dict_entry_get * revert change in circuits.rs * remove unwanted file * revert unwanted change * revert unwanted change * make trace dump for circuit outputs cleaner * remove unwanted code * increase felt dict count always during get() * doc function + merge main * reviews * use elemts stride for offseting u384 structs * forgot to update one stride --------- Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * cherry: Use dynamic arrays instead of static arrays for circuit data (#1233) (#1237) * [Serra-Emu] Fix some libfuncs (#1223) * change initial gas due to overflows * fix some libfuncs in circuits * fix is() for circuits * remove Value::Unit from return values in get_output * match U96LimbsLessThanGuarantee correctly * some corrections to circuits * some corrections to circuits * fix failure_guarantee_verify to avoid panicking * fix circuits * more fixes to circuits + implement ec_zero libfunc * clippy * remove unnecesary tests * remove unnecesary file * fix branch index * add comment * fix eval_u96_limbs_less_than_guarantee_verify * remove circuit failure test * update trace dump with new Value::CircitOutputs * fmt * reviews + fix modulus in trace dump * remove unnecesary file * fix clippy * implement circuit_single_limb_less_than_guarantee_verify * fix trace dump for circuit outputs * fix felt_dict_get * fix felt_dict_get * implement U96LimbsLessThanGuarantee for trace dump * remove unnecessary code * fmt * fix felt_dict_entry_get * revert change in circuits.rs * remove unwanted file * revert unwanted change * revert unwanted change * fix cast and int range libfuncs * make trace dump for circuit outputs cleaner * remove unwanted code * increase felt dict count always during get() * doc function + merge main * fix some libfuncs * implement CouponCall not working * all tests passing * remove WIP for corelib tests in sierra-emu's ci * remove WIP for corelib tests in sierra-emu's ci * fmt! * pop unused argument in coupon_call * better error messages in utils * Fix format * Gather compilation statistics (#1236) * Add basic Statistics struct and its builder * Add Serialzie to Statistics * Generate basic sierra statistics * Add stats argument to compile * Save sierra to mlir and mlir passes time * Add stats argument to object_to_shared_lib * Save linking time * Add stats argument to module_to_object * Save llvm time * Save total compilation time * Save object size in statistics * Remove StatisticsBuilder * Add libfunc frequency * Remove work * Assert frequency map is not empty * Save mlir operation count * Save llvmir instructions and opcode frequency * Save llvmir virtual register count * Adapt trace_dump.rs * Don't rely on transmute * Move MLIR walking logic to walk_ir module * Move LLVMIR walking to walk_ir module * Improve comments * Pass statistics to compile stats * Save MLIR operations by libfunc * Add clone_option_mut macro * Validate statistics * Use clone_option_mut * Document statistics * Document walk_ir module * Add API to statistics * Add support for saving stats on `starknet-native-compile` * Add documentation * Fix clippy * Update starknet-blocks.yml ref * Rephrase docs Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * Update script for comparing state dumps --------- Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * Don't fail on empty programs (#1248) * Update version (#1249) --------- Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> Co-authored-by: Franco Giachetta <francogiachetta27@gmail.com> Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com>
* Review TODO comments * Minor improvements to Sierra Emu crate (#1202) * Move cairo-lang dependencies to workspace * Remove sierra-emu/.gitignore * Update lock * Add fibonacci.cairo example for sierra emulator * Simplify Makefile * Simplify README and improve documentation on how to use the binary * Add make check * Improve examples * Document make check * Remove unused script * Add fibonacci_contract.cairo * Fix typo in Makefile * Fix CI * Use cairo2/corelib instead of corelib for symlinking in sierra emu * Improve Sierra Emulator descritopn * Move more dependencies to workspace * Fix whitespace * Fix whitespace (again) --------- Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * Add Trace Dump feature (#1199) * Add trace dump support in compiler * Add sierra emu dependency with trace-dump feature * Add trace dump metadata * Register trace dump symbols on executors * Use trace dump feature in cairo-native-run * Remove unused feature * Rename trace_id symbol * Don't generate trace dump on return when no tail recursion target has been found * Update lock * Derive Eq,PartialEq on TraceDump * Substract initial required gas in sierra emu * Print error when trace dump is not found, but ignore * Add trace dump test * Fix clippy * Remove `get_layout` from trace dump * Rename variables * Minor improvements * Add documentation * Improve documentation * Improve documentation on trace dump runtime functions * Fix typo Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * Fix warning * Update usage docs * Document trace dump feature for programs * Add txt to blockquote to avoid executing in doc test --------- Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * [Sierra-Emu] Implement missing syscall and nullable libfuncs (#1205) * Add sierra-emu as a debug utility * Change working dir in sierra-emu job * Remove repeated lines in sierra-emu gitignore * Exclude debug_utils from coverage job * remove some todos from value and implement Coupon libfunc * start adding corelib test * run tests from corelib * remove unwanted file * remove not related things * get return_value from trace * replace ids for debug info * add common folder for integration tests * fix tests * remove todo * ignore test for now * filter ignored tests * Update debug_utils/sierra-emu/tests/common/mod.rs Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * run ignored test from the ci * better ignoring * remove debug_name in enums * refactor * remove unused dependency * More expressive naming for the workflow Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * reviews * reviews * fmt * fmt ci * revert last commit * fmt * accidentally removed rayon usage * avoid map's short-circuiting * catch panics the avoid loosing the test name * log ignored tests * clippy * Add "(WIP)" to corelib's test job Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * print progress as the test runs * fmt * format makefile Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * fix name test in ci * add dependencies removed in merge * dependencies * clippy * remove unused import * better indent in makefile * uppercase tests summary comment for better sight * add starknet missing libfuncs * cargo.lock * add null, nullable_from_box and match_nullable libfuncs * clippyt * add forward_snapshot libfunc + fix is() for nullable * refactor syscall handler * add some felt types to match * remove type_to_name() call in is() function --------- Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com> Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * [Sierra-Emu] implement some todos from `const` and `cast` libfuncs (#1191) * Add sierra-emu as a debug utility * Change working dir in sierra-emu job * Remove repeated lines in sierra-emu gitignore * Exclude debug_utils from coverage job * remove some todos from value and implement Coupon libfunc * start adding corelib test * run tests from corelib * remove unwanted file * remove not related things * get return_value from trace * replace ids for debug info * add common folder for integration tests * fix tests * remove todo * ignore test for now * add enum in const::inner * remove todos and fix some failures * filter ignored tests * Update debug_utils/sierra-emu/tests/common/mod.rs Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * run ignored test from the ci * better ignoring * ignore test * fmt * remove debug_name in enums * refactor * remove unused dependency * More expressive naming for the workflow Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * reviews * reviews * fmt * fmt ci * revert last commit * fmt * accidentally removed rayon usage * avoid map's short-circuiting * catch panics the avoid loosing the test name * log ignored tests * clippy * Add "(WIP)" to corelib's test job Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * print progress as the test runs * fmt * format makefile Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * fix name test in ci * add dependencies removed in merge * dependencies * clippy * remove unused import * better indent in makefile * uppercase tests summary comment for better sight * fix clippy * clippy * remove unnecesary pubs * better docs * better panic message in get_numberic_args_as_bigints() Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * reviews * remove unnecessary comment Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * use slices in get_numeric_args_as_bigints * fmt * remove unnecesary to_vec * fmt * use iter instead of into_iter * reviews changes * better error message * fix typo --------- Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com> Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * [Sierra-Emu] implement `get_available_gas` libfunc (#1210) * implement las gas libfunc * remove unnecesary pubs * Improve sierra2casm-dbg (#1206) * Add sierra2casm-dbg * Sync cairo version between sierra2casm-dbg and root * Bump Cairo VM version in sierra2casm-dbg * Fix compilation and linter errors * Bump Cairo in sierra2casm-dbg * Remove unused serde dep in sierra2casm-dbg * Remove Rust toolchain in sierra2casm-dbg * Add sierra2casm-dbg CI job (#1201) * Move cairo-lang dependencies to workspace * Remove sierra-emu/.gitignore * Update lock * Add fibonacci.cairo example for sierra emulator * Simplify Makefile * Simplify README and improve documentation on how to use the binary * Add make check * Improve examples * Document make check * Remove unused script * Add fibonacci_contract.cairo * Fix typo in Makefile * Fix CI * Use cairo2/corelib instead of corelib for symlinking in sierra emu * Improve Sierra Emulator descritopn * Move more dependencies to workspace * Rename to casm-data-flow * Add Makefile * Add basic run-contract example * Add fibonacci_starknet.cairo * Fix hint format * Add basic README.md * Update dependencies * Print gas usage * Finish README.md * Add .PHONY * Fix paragraph * Move deps to workspace * Fix whitespace * Fix whitespace * Fix README.md --------- Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * [Sierra-Emu] implement missing libfuncs from `int_range` and `array` (#1200) * Add sierra-emu as a debug utility * Change working dir in sierra-emu job * Remove repeated lines in sierra-emu gitignore * Exclude debug_utils from coverage job * remove some todos from value and implement Coupon libfunc * start adding corelib test * run tests from corelib * remove unwanted file * remove not related things * get return_value from trace * replace ids for debug info * add common folder for integration tests * fix tests * remove todo * ignore test for now * filter ignored tests * Update debug_utils/sierra-emu/tests/common/mod.rs Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * run ignored test from the ci * better ignoring * remove debug_name in enums * refactor * remove unused dependency * More expressive naming for the workflow Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * reviews * reviews * fmt * fmt ci * revert last commit * fmt * accidentally removed rayon usage * avoid map's short-circuiting * catch panics the avoid loosing the test name * log ignored tests * clippy * Add "(WIP)" to corelib's test job Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * print progress as the test runs * fmt * format makefile Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * fix name test in ci * add dependencies removed in merge * dependencies * clippy * remove unused import * better indent in makefile * uppercase tests summary comment for better sight * implement int_range libfuncs * implement missing array libfuncs * fmt * add is() for IntRange * remove unnecesary pubs * reviews * reviews * fix branching in int_range_try_new * clippy * reviews * fmt --------- Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com> Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * [Sierra-Emu] Implement missing libfuncs from int (#1192) * Add sierra-emu as a debug utility * Change working dir in sierra-emu job * Remove repeated lines in sierra-emu gitignore * Exclude debug_utils from coverage job * remove some todos from value and implement Coupon libfunc * start adding corelib test * run tests from corelib * remove unwanted file * remove not related things * get return_value from trace * replace ids for debug info * add common folder for integration tests * fix tests * remove todo * ignore test for now * filter ignored tests * Update debug_utils/sierra-emu/tests/common/mod.rs Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * run ignored test from the ci * better ignoring * remove debug_name in enums * refactor * remove unused dependency * implement missing libfuncs from int * fmt * More expressive naming for the workflow Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * reviews * reviews * fmt * fmt ci * revert last commit * fmt * accidentally removed rayon usage * avoid map's short-circuiting * catch panics the avoid loosing the test name * log ignored tests * clippy * Add "(WIP)" to corelib's test job Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * add general libfuncs: const, equal, to_felt, from_felt * add diff libfunc * print progress as the test runs * fmt * fix from_felt * remove unused files + fix issue with non-integer * format makefile Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> * try fix from_felt * fix name test in ci * add dependencies removed in merge * dependencies * clippy * remove unused import * better indent in makefile * uppercase tests summary comment for better sight * simplify a little apply_wrapping_op * merge test-corelib * remove unnecesary pubs * also match builtins instead of filtering them * format * use slices in get_numeric_args_as_bigints * fmt * remove unnecesary to_vec * fmt * use iter instead of into_iter * clippy * reviews + remove uint128 file * rename uint252 file to uint256 * fix clippy --------- Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com> Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * Update arch.rs * Update main.rs * Update arch.rs * Update enum.rs * Update arch.rs * Update executor.rs * Update contract.rs * Update bytes31.rs * Update felt252.rs * Update starknet.rs * Update starknet.rs * implement circuit_single_limb_less_than_guarantee_verify (#1212) * implement circuit_single_limb_less_than_guarantee_verify * fmt * clippy * Fix comment Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> --------- Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * [Sierra-Emu] Fix felt-dict's overflow, circuits libfuncs and implement missing EcPoint libfunc (#1208) * change initial gas due to overflows * fix some libfuncs in circuits * fix is() for circuits * remove Value::Unit from return values in get_output * match U96LimbsLessThanGuarantee correctly * some corrections to circuits * some corrections to circuits * fix failure_guarantee_verify to avoid panicking * fix circuits * more fixes to circuits + implement ec_zero libfunc * clippy * remove unnecesary tests * remove unnecesary file * fix branch index * add comment * fix eval_u96_limbs_less_than_guarantee_verify * remove circuit failure test * update trace dump with new Value::CircitOutputs * fmt * reviews + fix modulus in trace dump * remove unnecesary file * fix clippy * implement circuit_single_limb_less_than_guarantee_verify * fix trace dump for circuit outputs * fix felt_dict_get * fix felt_dict_get * implement U96LimbsLessThanGuarantee for trace dump * remove unnecessary code * fmt * fix felt_dict_entry_get * revert change in circuits.rs * remove unwanted file * revert unwanted change * revert unwanted change * make trace dump for circuit outputs cleaner * remove unwanted code * increase felt dict count always during get() * doc function + merge main * reviews * use elemts stride for offseting u384 structs * forgot to update one stride --------- Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * cherry: Use dynamic arrays instead of static arrays for circuit data (#1233) (#1237) * [Serra-Emu] Fix some libfuncs (#1223) * change initial gas due to overflows * fix some libfuncs in circuits * fix is() for circuits * remove Value::Unit from return values in get_output * match U96LimbsLessThanGuarantee correctly * some corrections to circuits * some corrections to circuits * fix failure_guarantee_verify to avoid panicking * fix circuits * more fixes to circuits + implement ec_zero libfunc * clippy * remove unnecesary tests * remove unnecesary file * fix branch index * add comment * fix eval_u96_limbs_less_than_guarantee_verify * remove circuit failure test * update trace dump with new Value::CircitOutputs * fmt * reviews + fix modulus in trace dump * remove unnecesary file * fix clippy * implement circuit_single_limb_less_than_guarantee_verify * fix trace dump for circuit outputs * fix felt_dict_get * fix felt_dict_get * implement U96LimbsLessThanGuarantee for trace dump * remove unnecessary code * fmt * fix felt_dict_entry_get * revert change in circuits.rs * remove unwanted file * revert unwanted change * revert unwanted change * fix cast and int range libfuncs * make trace dump for circuit outputs cleaner * remove unwanted code * increase felt dict count always during get() * doc function + merge main * fix some libfuncs * implement CouponCall not working * all tests passing * remove WIP for corelib tests in sierra-emu's ci * remove WIP for corelib tests in sierra-emu's ci * fmt! * pop unused argument in coupon_call * better error messages in utils * Fix format * Gather compilation statistics (#1236) * Add basic Statistics struct and its builder * Add Serialzie to Statistics * Generate basic sierra statistics * Add stats argument to compile * Save sierra to mlir and mlir passes time * Add stats argument to object_to_shared_lib * Save linking time * Add stats argument to module_to_object * Save llvm time * Save total compilation time * Save object size in statistics * Remove StatisticsBuilder * Add libfunc frequency * Remove work * Assert frequency map is not empty * Save mlir operation count * Save llvmir instructions and opcode frequency * Save llvmir virtual register count * Adapt trace_dump.rs * Don't rely on transmute * Move MLIR walking logic to walk_ir module * Move LLVMIR walking to walk_ir module * Improve comments * Pass statistics to compile stats * Save MLIR operations by libfunc * Add clone_option_mut macro * Validate statistics * Use clone_option_mut * Document statistics * Document walk_ir module * Add API to statistics * Add support for saving stats on `starknet-native-compile` * Add documentation * Fix clippy * Update starknet-blocks.yml ref * Rephrase docs Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * Update script for comparing state dumps --------- Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> * Don't fail on empty programs (#1248) * Update version (#1249) --------- Co-authored-by: Julian Gonzalez Calderon <gonzalezcalderonjulian@gmail.com> Co-authored-by: Gabriel Bosio <38794644+gabrielbosio@users.noreply.github.com> Co-authored-by: Franco Giachetta <francogiachetta27@gmail.com> Co-authored-by: gabrielbosio <gabrielbosio95@gmail.com>
Review TODO comments #1190
Checklist