Skip to content

Commit ef84d94

Browse files
committed
turn all map -> dict
1 parent f22c59b commit ef84d94

File tree

10 files changed

+124
-123
lines changed

10 files changed

+124
-123
lines changed

src/finchlite/codegen/c.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
from .. import finch_assembly as asm
1818
from ..algebra import query_property, register_property
19-
from ..finch_assembly import AssemblyStructFType, BufferFType, MapFType, TupleFType
19+
from ..finch_assembly import AssemblyStructFType, BufferFType, DictFType, TupleFType
2020
from ..symbolic import Context, Namespace, ScopedDict, fisinstance, ftype
2121
from ..util import config
2222
from ..util.cache import file_cache
@@ -817,15 +817,15 @@ def __call__(self, prgm: asm.AssemblyNode):
817817
case asm.Length(buf):
818818
buf = self.resolve(buf)
819819
return buf.result_format.c_length(self, buf)
820-
case asm.LoadMap(map, idx):
820+
case asm.LoadDict(map, idx):
821821
map = self.resolve(map)
822-
return map.result_format.c_loadmap(self, map, idx)
823-
case asm.ExistsMap(map, idx):
822+
return map.result_format.c_loaddict(self, map, idx)
823+
case asm.ExistsDict(map, idx):
824824
map = self.resolve(map)
825-
return map.result_format.c_existsmap(self, map, idx)
826-
case asm.StoreMap(map, idx, val):
825+
return map.result_format.c_existsdict(self, map, idx)
826+
case asm.StoreDict(map, idx, val):
827827
map = self.resolve(map)
828-
return map.result_format.c_storemap(self, map, idx, val)
828+
return map.result_format.c_storedict(self, map, idx, val)
829829
case asm.Block(bodies):
830830
ctx_2 = self.block()
831831
for body in bodies:
@@ -970,28 +970,28 @@ def construct_from_c(self, res):
970970
"""
971971

972972

973-
class CMapFType(MapFType, CArgumentFType, ABC):
973+
class CDictFType(DictFType, CArgumentFType, ABC):
974974
"""
975-
Abstract base class for the ftype of datastructures. The ftype defines how
975+
Abstract base class for the ftype of dictionaries. The ftype defines how
976976
the data in a Map is organized and accessed.
977977
"""
978978

979979
@abstractmethod
980-
def c_existsmap(self, ctx, map, idx):
980+
def c_existsdict(self, ctx, map, idx):
981981
"""
982982
Return C code which checks whether a given key exists in a map.
983983
"""
984984
...
985985

986986
@abstractmethod
987-
def c_loadmap(self, ctx, map, idx):
987+
def c_loaddict(self, ctx, map, idx):
988988
"""
989989
Return C code which gets a value corresponding to a certain key.
990990
"""
991991
...
992992

993993
@abstractmethod
994-
def c_storemap(self, ctx, buffer, idx, value):
994+
def c_storedict(self, ctx, buffer, idx, value):
995995
"""
996996
Return C code which stores a certain value given a certain integer tuple key.
997997
"""

0 commit comments

Comments
 (0)