ncannasse / castle

A structured database with a local web service to edit it
ISC License
558 stars 78 forks source link

Hashed Kind #155

Open ncannasse opened 5 months ago

ncannasse commented 5 months ago

In order to speedup performances at runtime, we could use either represent kind id that is currently a String as an hashed id or an index based id to perform kind-kind comparison (in switch/case XXX or inf.id == XXX). But then the debugger would only display the hashed id instead of the actual identifier, which would be make everything more complicated to debug.

In order to fix this we would need to be able to tag specific ints in the HL debugger (same as we are planning for EnumFlags, but using an abstract such has hl.HashedIdent) and be able to reverse the hash based on the cache from the VM. Ping @yuxiaomao

yuxiaomao commented 5 months ago

For now, we can imagine some handling similar to CDB Enum type (based on index), like this : https://github.com/vshaxe/hashlink-debugger/commit/868f79ffd563bbb43f5656147380057a91bf8376 However, the display hint must be set manually in the watch section for each variable

ncannasse commented 5 months ago

Yes but in the case of CDB ids we really need them to be working without any manual hint :'(