From 17e1c5f9f4006399398e8bb7e219a79962ebf3f0 Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Mon, 6 Oct 2014 21:03:03 -0500 Subject: go: add step5_tco. Refactor env. Move EnvType interface definition to types.go. Remove Env pointers. --- docs/step_notes.txt | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'docs') diff --git a/docs/step_notes.txt b/docs/step_notes.txt index 02ad305..5d29888 100644 --- a/docs/step_notes.txt +++ b/docs/step_notes.txt @@ -233,9 +233,9 @@ Step Notes: - step5_tco - types module: - mal function type: - - stores: func, exp, env, params - - func is EVAL in native mal case, otherwise reference to - platform function + - stores: eval, exp, env, params + - eval is EVAL in native mal case (needed for map function + later), otherwise reference to platform function - if metadata support, then store exp, env, params as metadata - printer @@ -245,8 +245,19 @@ Step Notes: - cases where we directly return result of EVAL, instead set ast and env to what would be put in the EVAL, then loop. - do, if, "apply" - - for "apply" case, set env to new Env based on properties - on the function + - "apply" + - if mal function type + - set env to new Env based on properties on the function + - if native function, same as before + - Details: + - types.EXT + - create Mal function type to store eval, exp, env, params + - cp step4_if_fn_do.EXT to step5_tco.EXT + - wrap EVAL in infinite while loop + - in let*, do, and if: + - set ast and env and loop (no return) + - in fn* create Mal function type + - step6_file - core module: -- cgit v1.2.3