Pipes refactoring, Fixes in type checker
This commit is contained in:
@@ -86,12 +86,14 @@ type
|
||||
class var
|
||||
FLock: TSpinLock;
|
||||
FRegistry: TDictionary<TArray<Integer>, IKeywordMapping<T>>;
|
||||
FEmpty: IKeywordMapping<T>;
|
||||
class constructor Create;
|
||||
class destructor Destroy;
|
||||
|
||||
public
|
||||
// Creates or gets the cached keyword mapping.
|
||||
class function Intern(const AFields: TArray<TPair<IKeyword, T>>): IKeywordMapping<T>; static;
|
||||
class property Empty: IKeywordMapping<T> read FEmpty;
|
||||
end;
|
||||
|
||||
TGenericRecord<T> = class(TInterfacedObject, IKeywordMapping<T>)
|
||||
@@ -270,6 +272,8 @@ class constructor TKeywordMappingRegistry<T>.Create;
|
||||
begin
|
||||
FRegistry := TDictionary<TArray<Integer>, IKeywordMapping<T>>.Create(TEqualityComparer<TArray<Integer>>.Default);
|
||||
FLock := TSpinLock.Create(False);
|
||||
|
||||
FEmpty := Intern([]);
|
||||
end;
|
||||
|
||||
class destructor TKeywordMappingRegistry<T>.Destroy;
|
||||
|
||||
Reference in New Issue
Block a user