'What does the FeedbackSlot size(length) mean?
Some questions about Feedback:
as the title asked
A slot site that only encounters objects of a single hidden class is called
monomorphic; if it encounters objects of two hidden classes, it is calledpolymorphic; if it is greater than 2, it is calledmegamorphic. Is that right? Then does the slot size have anything to do with polymorphic?What is the IC handler? Is it a
<code>?
Solution 1:[1]
I don't understand the question. The class
FeedbackSlothas nosizeand nolength. Maybe you meanFeedbackMetadata::GetSlotSize? ICs of different kinds need different numbers of entries in the feedback vector (usually 1 or 2).No, polymorphic state can handle more than two cases, currently up to 4 (but that could change over time). The number of feedback vector slots that an IC can use does not (and cannot!) change depending on its state. If more data needs to be stored, indirections must be used.
No, often it's just a Smi encoding a bit field; when that isn't enough, it's a small data class, see e.g.
class LoadHandler: it derives fromDataHandlerwhich derives fromStruct.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | jmrk |
