X-Git-Url: https://code.kerkeslager.com/?p=fur;a=blobdiff_plain;f=crossplatform_ir_generation.py;h=f9c7fa9d4c0c16211fca73974804b415ccdd162a;hp=089b0766bc1dc9d6133803e5e96adfebde23e091;hb=4f86ad3f093ca0c51e77a28b208e7751629d4948;hpb=b7a244b6319f5c770582283097f6184e5a6ec192 diff --git a/crossplatform_ir_generation.py b/crossplatform_ir_generation.py index 089b076..f9c7fa9 100644 --- a/crossplatform_ir_generation.py +++ b/crossplatform_ir_generation.py @@ -39,11 +39,27 @@ def generate_symbol_literal(symbol): def generate_instruction_name_from_builtin(builtin): try: return { + # Environment operations + '__get__': 'get', + + # Integer operations '__add__': 'add', - '__subtract__': 'sub', - '__multiply__': 'mul', '__integer_divide__': 'idiv', '__modular_divide__': 'mod', + '__multiply__': 'mul', + '__negate__': 'neg', + '__subtract__': 'sub', + + # Boolean operations + '__eq__': 'eq', + '__neq__': 'neq', + '__lt__': 'lt', + '__lte__': 'lte', + '__gt__': 'gt', + '__gte__': 'gte', + + # String operations + '__concat__': 'concat', }[builtin] except KeyError: