cairo-vm-go
cairo-vm-go copied to clipboard
Implement `DictSquashCopyDict` hint
This PR implements DictSquashCopyDict hint, which prepares arguments for creating a new dictionary with dict_new function. It copies the existing squashed dictionary in the current scope
@har777 i'm not 100% sure i'm implementing correctly this python code
dict(__dict_manager.get_dict(ids.dict_accesses_end))
could you check this?
I guess this code only retrieves from operanders the address dict_accesses_end , uses GetDictionary to retrieve the dictionary (a copy) and assign it in scope?
could you resolve conflits? It will be easier to review ✅
@har777 @MaksymMalicki just updated, now making a deep copy of the ZeroDict before assign it in the new scope. I added only one test for now with an empty dictionaryManager, will add other tests tomorrow
currently FreeOffset field of the ZeroDict struct is of type *uint64 , any reason?
@har777 ready for review, i think this is the last dict hint
i guess we should use FreeOffset uint64 in ZeroDictionary, there is no benefit of using a pointer here, we can modify this later
@har777 now only the dict Data is copied and I inlined the copy