Revert "Type: Add TypeManager->TypeList() and use for ListVal()"

This reverts commit 24c606b4df.

This commit introduced a memory leak ListVal::Append() modifying
the cached TYPE_ANY type list.
This commit is contained in:
Arne Welzel 2023-04-13 16:55:11 +02:00
parent 10f96aeba3
commit a0540f96a1
4 changed files with 4 additions and 36 deletions

View file

@ -2,7 +2,6 @@
#pragma once
#include <array>
#include <list>
#include <map>
#include <optional>
@ -867,21 +866,6 @@ protected:
TypePtr yield_type;
};
// Holds pre-allocated Type objects.
class TypeManager
{
public:
TypeManager();
// Get a Typelist instance with the given type tag.
const TypeListPtr& TypeList(TypeTag t) const;
private:
std::array<TypeListPtr, NUM_TYPES> base_list_types;
};
extern TypeManager* type_mgr;
// True if the two types are equivalent. If is_init is true then the test is
// done in the context of an initialization. If match_record_field_names is
// true then for record types the field names have to match, too.