diff --git a/include/xo/expression/FunctionInterface.hpp b/include/xo/expression/FunctionExprInterface.hpp similarity index 74% rename from include/xo/expression/FunctionInterface.hpp rename to include/xo/expression/FunctionExprInterface.hpp index a568a71d..62756654 100644 --- a/include/xo/expression/FunctionInterface.hpp +++ b/include/xo/expression/FunctionExprInterface.hpp @@ -10,14 +10,14 @@ namespace xo { namespace scm { - class FunctionInterface : public Expression { + class FunctionExprInterface : public Expression { public: - FunctionInterface(exprtype extype, TypeDescr fn_type) + FunctionExprInterface(exprtype extype, TypeDescr fn_type) : Expression(extype, fn_type) {} /** downcast from Expression **/ - static bp from(bp x) { - return bp::from(x); + static bp from(bp x) { + return bp::from(x); } virtual const std::string & name() const = 0; diff --git a/include/xo/expression/Lambda.hpp b/include/xo/expression/Lambda.hpp index 81a872b6..e4d24cd6 100644 --- a/include/xo/expression/Lambda.hpp +++ b/include/xo/expression/Lambda.hpp @@ -6,13 +6,12 @@ #pragma once #include "Expression.hpp" -#include "FunctionInterface.hpp" +#include "FunctionExprInterface.hpp" #include "Variable.hpp" #include "LocalSymtab.hpp" #include #include #include -//#include namespace xo { namespace scm { @@ -20,7 +19,7 @@ namespace xo { * @brief abstract syntax tree for a function definition * **/ - class Lambda : public FunctionInterface { + class Lambda : public FunctionExprInterface { public: /** * @p name. Name for this lambda -- must be unique diff --git a/include/xo/expression/Primitive.hpp b/include/xo/expression/Primitive.hpp index 6c1c12bc..e53bbcb9 100644 --- a/include/xo/expression/Primitive.hpp +++ b/include/xo/expression/Primitive.hpp @@ -5,7 +5,7 @@ #pragma once -#include "PrimitiveInterface.hpp" +#include "PrimitiveExprInterface.hpp" #include "pretty_expression.hpp" #include "llvmintrinsic.hpp" #include "xo/reflect/Reflect.hpp" @@ -38,7 +38,7 @@ namespace xo { * won't work here. **/ template - class Primitive: public PrimitiveInterface { + class Primitive: public PrimitiveExprInterface { public: using Reflect = xo::reflect::Reflect; using TaggedPtr = xo::reflect::TaggedPtr; @@ -111,7 +111,7 @@ namespace xo { FunctionPointer fnptr, bool explicit_symbol_def, llvmintrinsic intrinsic) - : PrimitiveInterface(fn_type), + : PrimitiveExprInterface(fn_type), name_{name}, value_td_{Reflect::require_function()}, value_{fnptr}, diff --git a/include/xo/expression/PrimitiveInterface.hpp b/include/xo/expression/PrimitiveExprInterface.hpp similarity index 82% rename from include/xo/expression/PrimitiveInterface.hpp rename to include/xo/expression/PrimitiveExprInterface.hpp index c9e5660e..1011e5dc 100644 --- a/include/xo/expression/PrimitiveInterface.hpp +++ b/include/xo/expression/PrimitiveExprInterface.hpp @@ -1,29 +1,27 @@ -/** @file PrimitiveInterface.hpp +/** @file PrimitiveExprInterface.hpp * * Author: Roland Conybeare **/ #pragma once -#include "FunctionInterface.hpp" +#include "FunctionExprInterface.hpp" #include "llvmintrinsic.hpp" - -//#include - #include + namespace xo { namespace scm { - class PrimitiveInterface : public FunctionInterface { + class PrimitiveExprInterface : public FunctionExprInterface { public: using void_function_type = void (*)(); public: - explicit PrimitiveInterface(TypeDescr fn_type) - : FunctionInterface(exprtype::primitive, fn_type) {} + explicit PrimitiveExprInterface(TypeDescr fn_type) + : FunctionExprInterface(exprtype::primitive, fn_type) {} /** downcast from Expression **/ - static bp from(bp x) { - return bp::from(x); + static bp from(bp x) { + return bp::from(x); } /** if true, Jit will try to explicitly symbol for this primitive diff --git a/src/expression/Lambda.cpp b/src/expression/Lambda.cpp index 7a140f04..d944b690 100644 --- a/src/expression/Lambda.cpp +++ b/src/expression/Lambda.cpp @@ -259,7 +259,7 @@ namespace xo { TypeDescr lambda_td, const rp & local_env, const rp & body) - : FunctionInterface(exprtype::lambda, lambda_td), + : FunctionExprInterface(exprtype::lambda, lambda_td), name_{name}, body_{body}, local_env_{local_env}