about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--020run.cc11
-rw-r--r--022arithmetic.cc8
-rw-r--r--044space.cc3
3 files changed, 11 insertions, 11 deletions
diff --git a/020run.cc b/020run.cc
index d135e4b5..81d0e4ae 100644
--- a/020run.cc
+++ b/020run.cc
@@ -295,17 +295,24 @@ bool size_mismatch(const reagent& x, const vector<double>& data) {
   return size_of(x) != SIZE(data);
 }
 
-bool is_dummy(const reagent& x) {
+inline bool is_dummy(const reagent& x) {
   return x.name == "_";
 }
 
-bool is_literal(const reagent& r) {
+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;
 }
 
+inline bool scalar(const vector<long long int>& x) {
+  return SIZE(x) == 1;
+}
+inline bool scalar(const vector<double>& x) {
+  return SIZE(x) == 1;
+}
+
 // hook to suppress inserting recipe name into errors and warnings (for later layers)
 string maybe(string s) {
   return s + ": ";
diff --git a/022arithmetic.cc b/022arithmetic.cc
index e5de41ec..817cd5f2 100644
--- a/022arithmetic.cc
+++ b/022arithmetic.cc
@@ -314,11 +314,3 @@ recipe main [
 ]
 # integer division can't return floating-point infinity
 +error: main: divide by zero in '1:number <- divide-with-remainder 4, 0'
-
-:(code)
-inline bool scalar(const vector<long long int>& x) {
-  return SIZE(x) == 1;
-}
-inline bool scalar(const vector<double>& x) {
-  return SIZE(x) == 1;
-}
diff --git a/044space.cc b/044space.cc
index 57faa054..ed074336 100644
--- a/044space.cc
+++ b/044space.cc
@@ -192,7 +192,8 @@ void rewrite_default_space_instruction(instruction& curr) {
 //:: helpers
 
 :(code)
-long long int space_base(const reagent& x) {  // temporary
+long long int space_base(const reagent& x) {
+  // temporary stub; will be replaced in a later layer
   return current_call().default_space;
 }