Bläddra i källkod

Make dict_len a JIT intrinsic

jonathanvdc 8 år sedan
förälder
incheckning
4cd36fda5f
1 ändrade filer med 4 tillägg och 0 borttagningar
  1. 4 0
      kernel/modelverse_jit/intrinsics.py

+ 4 - 0
kernel/modelverse_jit/intrinsics.py

@@ -277,6 +277,7 @@ MISC_INTRINSICS = {
             a, tree_ir.ReadValueInstruction(b)),
 
     'dict_add' : __dict_add,
+    'dict_len' : __read_nr_out,
 
     # Set operations
     'set_add' : __set_add,
@@ -380,6 +381,9 @@ MISC_CFG_INTRINSICS = {
     # State reads
     'read_nr_out' : __read_nr_out_cfg,
 
+    # Dictionary operations
+    'dict_len' : __read_nr_out_cfg,
+
     # List operations
     'list_len' : __read_nr_out_cfg
 }