Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippGrulich committed Mar 23, 2024
1 parent b540f38 commit da41db6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
10 changes: 5 additions & 5 deletions nautilus-api/include/Interface/DataTypes/Val.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ namespace nautilus {

#ifdef ENABLE_TRACING

inline val<ValueType>(tracing::value_ref &tc) : state(tc) {
explicit inline val<ValueType>(tracing::value_ref &tc) : state(tc) {
// auto tag = tracing::getTag();
tracing::getVarRefMap()[state]++;
// std::cout << "trace constructor " << state << " - " << tag << std::endl;
Expand Down Expand Up @@ -352,7 +352,7 @@ namespace nautilus {
#define TRAC_BINARY_OP(OP) \
if (tracing::inTracer()) {\
auto tc = tracing::traceBinaryOp<tracing::OP, commonType>(lValue.state, rValue.state);\
return val<commonType>(tc);\
return val<commonType>((tracing::value_ref)tc);\
}
#else
#define TRAC_OP(OP)
Expand Down Expand Up @@ -461,23 +461,23 @@ namespace nautilus {
val<bool> inline lOr(val<bool> &left, val<bool> &right) {
if (tracing::inTracer()) {
auto tc = tracing::traceBinaryOp<tracing::OR, bool>(left.state, right.state);
return {tc};
return val<bool>{tc};
}
return left.value || right.value;
}

val<bool> inline lAnd(val<bool> &left, val<bool> &right) {
if (tracing::inTracer()) {
auto tc = tracing::traceBinaryOp<tracing::AND, bool>(left.state, right.state);
return {tc};
return val<bool>{tc};
}
return left.value && right.value;
}

val<bool> inline lNot(val<bool> &val) {
if (tracing::inTracer()) {
auto tc = tracing::traceUnaryOp<tracing::NOT, bool>(val.state);
return {tc};
return ::nautilus::val<bool>{tc};
}
return !val.value;
}
Expand Down
5 changes: 3 additions & 2 deletions nautilus-jit/src/Tracing/tracing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,10 @@ template value_ref traceUnaryOp<OP, double>(value_ref leftState); \
template value_ref traceConstant<uint16_t>(uint16_t value);

template value_ref traceConstant<uint32_t>(uint32_t value);

template value_ref traceConstant<uint64_t>(uint64_t value);

#if __APPLE__
template value_ref traceConstant<size_t>(size_t value);
#endif
template value_ref traceConstant<float>(float value);

template value_ref traceConstant<double>(double value);
Expand Down

0 comments on commit da41db6

Please sign in to comment.