diff options
author | Björn Gustavsson <[email protected]> | 2018-01-29 15:55:11 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2018-03-02 13:04:16 +0100 |
commit | eee8655788d29a88d0db37637d1973e9f0f9940c (patch) | |
tree | ceb6235397b25eb487e2c4774d9cf97beb5493bd /lib/compiler/src/cerl_sets.erl | |
parent | e5f5bebc9982ea15652dc97711b32348973905b4 (diff) | |
download | otp-eee8655788d29a88d0db37637d1973e9f0f9940c.tar.gz otp-eee8655788d29a88d0db37637d1973e9f0f9940c.tar.bz2 otp-eee8655788d29a88d0db37637d1973e9f0f9940c.zip |
beam_type: Refactor updating of the type database
The function tdb_update/2 is problematic. It does not distinguish
between assigning a register with a new value and updating information
about a register that is used a as source in a test instruction.
That was not a problem in practice when there were very few types,
but bugs started to be noticed as more types were added. (For example,
when a register was overwritten with a new value, the type for the
old value stored in the same register could linger in some cases.)
Introduce separate functions tdb_store/3 and tdb_meet/3 for assigning
a new value to a register and for updating type information for a
register referenced as as source, respectively. Also stricten
verification of the types that gets stored into the type database.
Diffstat (limited to 'lib/compiler/src/cerl_sets.erl')
0 files changed, 0 insertions, 0 deletions