From ee67ca534b88ceff30f3c00b7c0ab13456c8ed84 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 31 Oct 2016 21:43:57 -0700 Subject: 3613 --- html/013update_operation.cc.html | 11 +++++++++++ html/070table.mu.html | 11 +++++------ html/071recipe.cc.html | 9 +++++++-- 3 files changed, 23 insertions(+), 8 deletions(-) (limited to 'html') diff --git a/html/013update_operation.cc.html b/html/013update_operation.cc.html index 132553c4..7dd7e69f 100644 --- a/html/013update_operation.cc.html +++ b/html/013update_operation.cc.html @@ -14,6 +14,9 @@ pre { white-space: pre-wrap; font-family: monospace; color: #eeeeee; background- body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color: #080808; } * { font-size: 12pt; font-size: 1em; } .Constant { color: #00a0a0; } +.Special { color: #c00000; } +.muRecipe { color: #ff8700; } +.traceContains { color: #008000; } .Comment { color: #9090ff; } .Delimiter { color: #800080; } .cSpecial { color: #008000; } @@ -58,6 +61,14 @@ Transform.push_back((string s) { return s + ": "; } + +:(scenarios transform) +:(scenario missing_arrow) +% Hide_errors = true; +def main [ + 1:number , copy 0 # typo: ',' instead of '<-' +] ++error: main: instruction '1:number' has no recipe diff --git a/html/070table.mu.html b/html/070table.mu.html index 91999624..61e1466b 100644 --- a/html/070table.mu.html +++ b/html/070table.mu.html @@ -13,9 +13,9 @@ pre { white-space: pre-wrap; font-family: monospace; color: #eeeeee; background-color: #080808; } body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color: #080808; } * { font-size: 12pt; font-size: 1em; } -.Delimiter { color: #800080; } -.muControl { color: #c0a020; } .muData { color: #ffff00; } +.muControl { color: #c0a020; } +.Delimiter { color: #800080; } .Comment { color: #9090ff; } .Constant { color: #00a0a0; } .Special { color: #c00000; } @@ -49,11 +49,10 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color scenario table-read-write-non-integer [ local-scope - key:text <- new [abc def] - {tab: (address table text number)} <- new-table 30 + tab:&:table:text:num <- new-table 30 run [ - put-index tab, key, 34 - 1:num/raw <- index tab, key + put-index tab, [abc def], 34 + 1:num/raw <- index tab, [abc def] ] memory-should-contain [ 1 <- 34 diff --git a/html/071recipe.cc.html b/html/071recipe.cc.html index 7db245d8..b5ac57d7 100644 --- a/html/071recipe.cc.html +++ b/html/071recipe.cc.html @@ -196,9 +196,10 @@ Transform.push_back(const recipe& caller = get(Recipe, r); for (int i = 0; i < SIZE(caller.steps); ++i) { const instruction& inst = caller.steps.at(i); - if (inst.ingredients.empty()) continue; // if indirect call, error raised above + if (!is_indirect_call(inst.operation)) continue; + if (inst.ingredients.empty()) continue; // error raised above const reagent& callee = inst.ingredients.at(0); - if (!is_mu_recipe(callee)) continue; // if indirect call, error raised above + if (!is_mu_recipe(callee)) continue; // error raised above const recipe callee_header = is_literal(callee) ? get(Recipe, callee.value) : from_reagent(inst.ingredients.at(0)); if (!callee_header.has_header) continue; if (is_indirect_call_with_ingredients(inst.operation)) { @@ -217,6 +218,10 @@ Transform.push_back(} } +bool is_indirect_call(const recipe_ordinal r) { + return is_indirect_call_with_ingredients(r) || is_indirect_call_with_products(r); +} + bool is_indirect_call_with_ingredients(const recipe_ordinal r) { if (r == CALL) return true; // End is_indirect_call_with_ingredients Special-cases -- cgit 1.4.1-2-gfad0