+ Object right = Stack_pop(stack);
+ Object left = Stack_pop(stack);
+
+ assert(left.type == INTEGER);
+ assert(right.type == INTEGER);
+
+ Object result = (Object){
+ INTEGER,
+ (Instance)(int32_t) (left.instance.integer + right.instance.integer)
+ };
+
+ return result;
+}
+Object builtin$add = { CLOSURE, (Instance)(Closure){ NULL, builtin$add$implementation } };
+
+Object builtin$subtract$implementation(
+ EnvironmentPool* environmentPool,
+ Environment* parent,
+ size_t argc,
+ Stack* stack,
+ const unsigned long line,
+ jmp_buf parentJump)
+{
+ assert(argc == 2);
+
+ Object right = Stack_pop(stack);
+ Object left = Stack_pop(stack);
+
+ assert(left.type == INTEGER);
+ assert(right.type == INTEGER);
+
+ Object result = (Object){
+ INTEGER,
+ (Instance)(int32_t) (left.instance.integer - right.instance.integer)
+ };
+
+ return result;
+}
+Object builtin$subtract = { CLOSURE, (Instance)(Closure){ NULL, builtin$subtract$implementation } };
+
+Object builtin$multiply$implementation(
+ EnvironmentPool* environmentPool,
+ Environment* parent,
+ size_t argc,
+ Stack* stack,
+ const unsigned long line,
+ jmp_buf parentJump)
+{
+ assert(argc == 2);
+
+ Object right = Stack_pop(stack);
+ Object left = Stack_pop(stack);
+
+ assert(left.type == INTEGER);
+ assert(right.type == INTEGER);
+
+ Object result = (Object){
+ INTEGER,
+ (Instance)(int32_t) (left.instance.integer * right.instance.integer)
+ };
+
+ return result;
+}
+Object builtin$multiply = { CLOSURE, (Instance)(Closure){ NULL, builtin$multiply$implementation } };
+
+Object builtin$integer_divide$implementation(
+ EnvironmentPool* environmentPool,
+ Environment* parent,
+ size_t argc,
+ Stack* stack,
+ const unsigned long line,
+ jmp_buf parentJump)
+{
+ assert(argc == 2);
+
+ Object right = Stack_pop(stack);
+ Object left = Stack_pop(stack);
+
+ assert(left.type == INTEGER);
+ assert(right.type == INTEGER);
+
+ if(right.instance.integer == 0)
+ {
+ fprintf(stderr, "DivisionByZeroError on line %zu\n", line);
+ longjmp(parentJump, 1);
+ }
+
+ Object result = (Object){
+ INTEGER,
+ (Instance)(int32_t) (left.instance.integer / right.instance.integer)
+ };
+
+ return result;
+}
+Object builtin$integer_divide = { CLOSURE, (Instance)(Closure){ NULL, builtin$integer_divide$implementation } };
+
+Object builtin$modular_divide$implementation(
+ EnvironmentPool* environmentPool,
+ Environment* parent,
+ size_t argc,
+ Stack* stack,
+ const unsigned long line,
+ jmp_buf parentJump)
+{
+ assert(argc == 2);
+
+ Object right = Stack_pop(stack);
+ Object left = Stack_pop(stack);
+
+ assert(left.type == INTEGER);
+ assert(right.type == INTEGER);
+
+ if(right.instance.integer == 0)
+ {
+ fprintf(stderr, "DivisionByZeroError on line %zu\n", line);
+ longjmp(parentJump, 1);
+ }
+
+ Object result = (Object){
+ INTEGER,
+ (Instance)(int32_t) (left.instance.integer % right.instance.integer)
+ };
+
+ return result;
+}
+Object builtin$modular_divide = { CLOSURE, (Instance)(Closure){ NULL, builtin$modular_divide$implementation } };
+
+Object builtin$field$implementation(
+ EnvironmentPool* environmentPool,
+ Environment* parent,
+ size_t argc,
+ Stack* stack,
+ const unsigned long line,
+ jmp_buf parentJump)
+{
+ assert(argc == 2);
+
+ Object right = Stack_pop(stack);
+ Object left = Stack_pop(stack);
+
+ assert(left.type == STRUCTURE);
+ assert(right.type == STRING_LITERAL);
+
+ Object result = (Object){
+ INTEGER,
+ (Instance)(int32_t) (left.instance.integer % right.instance.integer)
+ };
+
+ return result;
+}
+Object builtin$field = { CLOSURE, (Instance)(Closure){ NULL, builtin$field$implementation } };
+
+Object builtin$get$implementation(
+ EnvironmentPool* environmentPool,
+ Environment* parent,
+ size_t argc,
+ Stack* stack,
+ const unsigned long line,
+ jmp_buf parentJump)
+{
+ assert(argc == 2);
+
+ Object right = Stack_pop(stack);
+ Object left = Stack_pop(stack);
+
+ return List_get(&left, right);
+}
+Object builtin$get = { CLOSURE, (Instance)(Closure){ NULL, builtin$get$implementation } };