From 203563b3465fe5f25f97e475b1a4dbe957845030 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 23 Sep 2016 23:07:58 -0700 Subject: 3412 --- html/101run_sandboxed.cc.html | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'html/101run_sandboxed.cc.html') diff --git a/html/101run_sandboxed.cc.html b/html/101run_sandboxed.cc.html index e12ec509..563c6d3a 100644 --- a/html/101run_sandboxed.cc.html +++ b/html/101run_sandboxed.cc.html @@ -169,6 +169,7 @@ map<string, type_ordinal> Type_ordinal_snap map<type_ordinal, type_info> Type_snapshot_stash; map<recipe_ordinal, map<string, int> > Name_snapshot_stash; map<string, vector<recipe_ordinal> > Recipe_variants_snapshot_stash; +map<string, type_tree*> Type_abbreviations_snapshot_stash; :(code) void run_code_begin(bool should_stash_snapshots) { @@ -211,6 +212,8 @@ map<string, vector<recipe_ordinal> > Name_snapshot_stash = Name_snapshot; assert(Recipe_variants_snapshot_stash.empty()); Recipe_variants_snapshot_stash = Recipe_variants_snapshot; + assert(Type_abbreviations_snapshot_stash.empty()); + Type_abbreviations_snapshot_stash = Type_abbreviations_snapshot; save_snapshots(); } void unstash_snapshots() { @@ -221,6 +224,7 @@ map<string, vector<recipe_ordinal> > Type_snapshot = Type_snapshot_stash; Type_snapshot_stash.clear(); Name_snapshot = Name_snapshot_stash; Name_snapshot_stash.clear(); Recipe_variants_snapshot = Recipe_variants_snapshot_stash; Recipe_variants_snapshot_stash.clear(); + Type_abbreviations_snapshot = Type_abbreviations_snapshot_stash; Type_abbreviations_snapshot_stash.clear(); } :(before "End Load Recipes") @@ -507,17 +511,7 @@ put(Recipe_ordinal,} :(before "End Primitive Recipe Implementations") case RELOAD: { - // conundrum: need to support repeated reloads of the same code, but not - // wipe out state for the current test - // hacky solution: subset of restore_snapshots() without restoring recipes { - // can't yet define containers in a test that runs 'reload' - Type_ordinal = Type_ordinal_snapshot; - Type = Type_snapshot; - // can't yet create new specializations of shape-shifting recipes in a test - // that runs 'reload' - Recipe_variants = Recipe_variants_snapshot; - Name = Name_snapshot; - // } + restore_non_recipe_snapshots(); string code = read_mu_text(ingredients.at(0).at(0)); run_code_begin(/*should_stash_snapshots*/false); routine* save_current_routine = Current_routine; -- cgit 1.4.1-2-gfad0