From 44c1aeef226542d692f0002b5cca5a3c30935d18 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 10 Sep 2016 10:43:19 -0700 Subject: 3315 --- html/020run.cc.html | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'html/020run.cc.html') diff --git a/html/020run.cc.html b/html/020run.cc.html index 31a8e9ad..bf415da3 100644 --- a/html/020run.cc.html +++ b/html/020run.cc.html @@ -149,23 +149,23 @@ map<string, int> //: We'll need to override these later as we change the definition of routine. //: Important that they return referrences into the routine. -inline int& current_step_index() { +int& current_step_index() { return Current_routine->running_step_index; } -inline const string& current_recipe_name() { +const string& current_recipe_name() { return get(Recipe, Current_routine->running_recipe).name; } -inline const instruction& current_instruction() { +const instruction& current_instruction() { return get(Recipe, Current_routine->running_recipe).steps.at(Current_routine->running_step_index); } -inline bool routine::completed() const { +bool routine::completed() const { return running_step_index >= SIZE(get(Recipe, running_recipe).steps); } -inline const vector<instruction>& routine::steps() const { +const vector<instruction>& routine::steps() const { return get(Recipe, running_recipe).steps; } @@ -363,17 +363,19 @@ vector<double> read_memoryreturn size_of(x) != SIZE(data); } -inline bool is_literal(const reagent& r) { - if (!r.type) return false; - if (r.type->value == 0) - assert(!r.type->left && !r.type->right); - return r.type->value == 0; +bool is_literal(const reagent& r) { + return is_literal(r.type); +} +bool is_literal(const type_tree* type) { + if (!type) return false; + if (!type->atom) return false; + return type->value == 0; } -inline bool scalar(const vector<int>& x) { +bool scalar(const vector<int>& x) { return SIZE(x) == 1; } -inline bool scalar(const vector<double>& x) { +bool scalar(const vector<double>& x) { return SIZE(x) == 1; } -- cgit 1.4.1-2-gfad0