From 49620728e805a3bbc3477c14b8b6ef7e2b5d3ead Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 12 Dec 2016 10:01:12 -0800 Subject: 3707 Be more disciplined about tagging 2 different concepts in the codebase: a) Use the phrase "later layers" to highlight places where a layer doesn't have the simplest possible self-contained implementation. b) Use the word "hook" to point out functions that exist purely to provide waypoints for extension by future layers. Since both these only make sense in the pre-tangled representation of the codebase, using '//:' and '#:' comments to get them stripped out of tangled output. (Though '#:' comments still make it to tangled output at the moment. Let's see if we use it enough to be worth supporting. Scenarios are pretty unreadable in tangled output anyway.) --- html/043space.cc.html | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'html/043space.cc.html') diff --git a/html/043space.cc.html b/html/043space.cc.html index 5de969b0..617bd873 100644 --- a/html/043space.cc.html +++ b/html/043space.cc.html @@ -106,8 +106,8 @@ absolutize(x); assert(is_raw(x)); } +//: hook replaced in a later layer int space_base(const reagent& x) { - // temporary stub; will be replaced in a later layer return current_call().default_space ? (current_call().default_space+/*skip refcount*/1) : 0; } @@ -428,10 +428,7 @@ Transform.push_back(void check_default_space(const recipe_ordinal r) { if (Hide_missing_default_space_errors) return; // skip previous core tests; this is only for Mu code const recipe& caller = get(Recipe, r); - // skip scenarios (later layer) - // user code should never create recipes with underscores in their names - if (caller.name.find("scenario_") == 0) return; // skip Mu scenarios which will use raw memory locations - if (caller.name.find("run_") == 0) return; // skip calls to 'run', which should be in scenarios and will also use raw memory locations + // End check_default_space Special-cases // assume recipes with only numeric addresses know what they're doing (usually tests) if (!contains_non_special_name(r)) return; trace(9991, "transform") << "--- check that recipe " << caller.name << " sets default-space" << end(); -- cgit 1.4.1-2-gfad0