ymandel added a comment.

In D126973#3556312 <https://reviews.llvm.org/D126973#3556312>, @xazax.hun wrote:

> Does this mean you want to use `StructValue`s for non-struct types to have 
> access to properties? I wonder if it would be a cleaner approach to be able 
> to assign properties to any type of values instead of weakening the type 
> system. E.g., properties could be a table on the side, a mapping from any 
> kind of values to a set of properties.

Indeed! That would definitely be an improvement. This was motivated by actual 
crashes in the existing code which relied on this feature. It's fair to say 
that the assertion was trying to enforce reasonable behavior (just not 
*required*).  We definitely we need a more general properties mechanism. I 
could put in a FIXME to put back the assert pending that change, but I'm 
generally hesitant about assertions that don't enforce necessary properties 
(only "nice").  Ideally, we'd have a way to log places (say, debug only) where 
we hit a surprising but not illegal condition.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126973/new/

https://reviews.llvm.org/D126973

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to