Commits

rkruppe committed d8ccf30

Fix typos and add lru cache

  • Participants
  • Parent commits b59cc92
  • Branches experiments

Comments (0)

Files changed (1)

tutagx/meta/encode.py

+from functools import lru_cache
+
 from tutagx.util import codegen as cg
 from tutagx.meta import model, process
 from tutagx.meta.model import ModelMeta
 from tutagx.meta.common import wrap_model, typeident
 
 
+@lru_cache()
 @process.oneshot
 def make_encoder():
     RESERVED = ('item', 'synth_id', 'oid', 'result', 'CLASSES', 'kind')
         if isinstance(t, (model.Integer, model.Float, model.String)):
             return expr
         if isinstance(t, model.List):
-            list_conv = yield from list_conv(t, expr)
+            conv = yield from _list_conv(t, expr)
             return conv
         if isinstance(t, model.Maybe):
             t_conv = yield from conversion(expr, t.t)