Fix wrong frame offsets for locals of alternate event/hook prototypes

Local frame offsets were being assigned based on number of the alternate
prototype's parameters, which may end up having less total parameters
than the canonical prototype, causing the local value to incorrectly
overwrite an event/hook argument value.
This commit is contained in:
Jon Siwek 2020-07-10 01:53:26 -07:00
parent 8597b998bb
commit 20294d372c
5 changed files with 71 additions and 14 deletions

View file

@ -429,6 +429,8 @@ public:
bool deprecated;
std::string deprecation_msg;
RecordTypePtr args;
// Maps from parameter index in canonical prototype to
// parameter index in this alternate prorotype.
std::map<int, int> offsets;
};