about summary refs log tree commit diff stats
path: root/059generic_recipe.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-11-06 14:15:37 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-11-06 14:21:36 -0800
commitc157066cab02f91b2d5e53dbec09151936538578 (patch)
tree0125f6d42b84f470b79dc64b2b2c61364b2c2f0b /059generic_recipe.cc
parentf3760b0f2828250b4b5fb1a52601fe6b11ff328f (diff)
downloadmu-c157066cab02f91b2d5e53dbec09151936538578.tar.gz
2380 - done loading mu code
New assertions still failing during tests.

This whole implementation of generic recipes is like an extended spike.
I don't have nearly enough tests. Ideally I'd have confidence in
generics once layer 59 passed its tests.
Diffstat (limited to '059generic_recipe.cc')
-rw-r--r--059generic_recipe.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/059generic_recipe.cc b/059generic_recipe.cc
index 29850848..c3dfa486 100644
--- a/059generic_recipe.cc
+++ b/059generic_recipe.cc
@@ -20,11 +20,19 @@ recipe foo a:_t -> result:_t [
 +mem: storing 14 in location 11
 +mem: storing 15 in location 12
 
-//: Suppress unknown type checks in generic recipes. Their specializations
-//: will be checked.
+//: Before anything else, disable all previous transforms which rely on
+//: reagent.type if a recipe contains any type ingredients.
 
 :(after "void check_invalid_types(const recipe_ordinal r)")
   if (any_type_ingredient_in_header(r)) return;
+:(after "void check_header_products(const recipe_ordinal r)")
+  if (any_type_ingredient_in_header(r)) return;
+:(after "void transform_names(const recipe_ordinal r)")
+  if (any_type_ingredient_in_header(r)) return;
+:(after "void transform_new_to_allocate(const recipe_ordinal r)")
+  if (any_type_ingredient_in_header(r)) return;
+:(after "void check_instruction(const recipe_ordinal r)")
+  if (any_type_ingredient_in_header(r)) return;
 
 :(before "End Instruction Dispatch(inst, best_score)")
 if (best_score == -1) {