Closed TAdev0 closed 3 months ago
Resolves #299
This PR implements SquashDictInnerContinueLoop hint, which checks if the squashing loop should continue or not, depending on whether there are access indices remaining or not.
SquashDictInnerContinueLoop
It writes 1 or 0 in should_continue field of loop_temps struct variable
should_continue
loop_temps
Here is the LoopTemps struct :
LoopTemps
struct LoopTemps { index_delta_minus1: felt, index_delta: felt, ptr_delta: felt, should_continue: felt, }
I added offset of 4 to write on the 4th item of the struct, as we first store the number of items and then each item contiguously in memory
@har777 comments addressed. Its nice to use the WriteToNthStructField wrapper, it reduces code size. thanks
WriteToNthStructField
Resolves #299
This PR implements
SquashDictInnerContinueLoop
hint, which checks if the squashing loop should continue or not, depending on whether there are access indices remaining or not.It writes 1 or 0 in
should_continue
field ofloop_temps
struct variableHere is the
LoopTemps
struct :I added offset of 4 to write on the 4th item of the struct, as we first store the number of items and then each item contiguously in memory