From edb9ab3157eb4cdb5e03e106c400b4d7b22c4455 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Mon, 13 Nov 2017 20:44:23 -0500 Subject: Compile lambdas on evaluation, not on execution. This cuts down the cost of calling a function, as it now reuses an existing continuation rather than reconstructing the continuation for each call. Tail calls are now slightly more explicit. --- tests/test_evaluator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test_evaluator.py b/tests/test_evaluator.py index d989f85..dbccbce 100644 --- a/tests/test_evaluator.py +++ b/tests/test_evaluator.py @@ -13,6 +13,6 @@ from .programs import * def test_evaluator(program_result): program, result, bindings = program_result environment = Environment() - assert run(eval(program, environment, symbol_table, None)) == result + assert run(eval(program, symbol_table, None), environment) == result for symbol, value in bindings: assert environment[symbol] == value -- cgit v1.2.3