NewLang Project
Yet another programm language
|
#include <string>
#include <stdexcept>
#include <stdint.h>
#include <algorithm>
#include <vector>
#include <unordered_set>
Go to the source code of this file.
Classes | |
class | newlang::StringMatcher |
class | newlang::ParserError |
class | newlang::Logger |
Namespaces | |
namespace | newlang |
Macros | |
#define | INCLUDED_LOGGER_H_ |
#define | LOG_PRINTF_FUNCTION newlang::Logger::log_printf |
#define | LOG_MAKE(level, prefix, ...) LOG_PRINTF_FUNCTION(level, prefix, __FILE__, __LINE__, ##__VA_ARGS__) |
#define | LOG_THROW(EXCEPT, LEVEL, PREFIX, ...) throw EXCEPT(LOG_MAKE(LEVEL, PREFIX, ##__VA_ARGS__)) |
#define | LOG_PARSER(format, ...) LOG_THROW(newlang::ParserError, LOG_LEVEL_ERROR, "P:", format, ##__VA_ARGS__) |
#define | LOG_RUNTIME(format, ...) LOG_THROW(std::runtime_error, LOG_LEVEL_ABORT, "R:", format, ##__VA_ARGS__) |
#define | LOG_TEST(...) |
#define | LOG_TEST_DUMP(...) |
#define | SCOPE(scope) scope |
#define | TO_STR2(ARG) #ARG |
#define | TO_STR(ARG) TO_STR2(ARG) |
#define | WARNING(exp) ("WARNING: " exp) |
#define | STATIC_ASSERT(expr) static_assert((expr), #expr) |
#define | ASSERT_EXCEPTION(text) do { LOG_MAKE(LOG_LEVEL_ABORT, "[ASSERT]:", "%s%s", text, newlang::Logger::GetStackTrace().c_str()); abort(); } while(0) |
#define | ASSERT(condition) |
#define | VERIFY(exp) ASSERT(exp) |
#define | LOG_LEVEL_DEFAULT 0 |
#define | LOG_LEVEL_DUMP 7 |
#define | LOG_LEVEL_DEBUG 6 |
#define | LOG_LEVEL_INFO 5 |
#define | LOG_LEVEL_WARNING 4 |
#define | LOG_LEVEL_ERROR 3 |
#define | LOG_LEVEL_FAULT 2 |
#define | LOG_LEVEL_ABORT 1 |
#define | LOG_LEVEL_MAX LOG_LEVEL_DUMP |
#define | LOG_LEVEL_NORMAL LOG_LEVEL_INFO |
#define | LOG_DUMP(...) LOG_MAKE(LOG_LEVEL_DUMP, "DUMP:", ##__VA_ARGS__) |
#define | LOG_DEBUG(...) LOG_MAKE(LOG_LEVEL_DEBUG, "D:", ##__VA_ARGS__) |
#define | LOG_INFO(...) LOG_MAKE(LOG_LEVEL_INFO, NULL, ##__VA_ARGS__) |
#define | LOG_WARNING(...) LOG_MAKE(LOG_LEVEL_WARNING, "W:", ##__VA_ARGS__) |
#define | LOG_ERROR(...) LOG_MAKE(LOG_LEVEL_ERROR, "E:", ##__VA_ARGS__) |
#define | LOG_FAULT(...) LOG_MAKE(LOG_LEVEL_FAULT, "F:", ##__VA_ARGS__) |
#define | LOG_ABORT(...) LOG_MAKE(LOG_LEVEL_ABORT, "A:", ##__VA_ARGS__) |
Functions | |
std::string | BinToHex (const uint8_t *buffer, const size_t size) |
std::string | HexStrToBinStr (std::string &hex_str) |
uint8_t | HexToByte (const char c) |
size_t | HexToBin (const char *str, uint8_t *buffer, const size_t size) |
int | HexToBinEq (const char *str, const uint8_t *buffer, const size_t size) |
size_t | BinToHexBuffer (const uint8_t *buffer, const size_t size, char *str, const size_t str_size) |
void | newlang::SplitString (const ::std::string &str, char delimiter, ::std::vector< ::std::string > *dest) |
static bool | newlang::PatternMatchesString (const std::string &name_str, const char *pattern, const char *pattern_end) |
bool | newlang::IsGlobPattern (const std::string &pattern) |
template<typename T > | |
std::enable_if< std::is_same< T, std::string >::value, std::string >::type | newlang::DumpToString (const T &obj) |
template<typename T > | |
std::enable_if<!std::is_same< T, std::string >::value, std::string >::type | newlang::DumpToString (const T &obj) |
template<typename T > | |
std::string | newlang::Dump (const T &iterable) |
#define LOG_PRINTF_FUNCTION newlang::Logger::log_printf |
#define LOG_MAKE | ( | level, | |
prefix, | |||
... ) LOG_PRINTF_FUNCTION(level, prefix, __FILE__, __LINE__, ##__VA_ARGS__) |
#define LOG_THROW | ( | EXCEPT, | |
LEVEL, | |||
PREFIX, | |||
... ) throw EXCEPT(LOG_MAKE(LEVEL, PREFIX, ##__VA_ARGS__)) |
#define LOG_PARSER | ( | format, | |
... ) LOG_THROW(newlang::ParserError, LOG_LEVEL_ERROR, "P:", format, ##__VA_ARGS__) |
Definition at line 25 of file logger.h.
Referenced by newlang::AstAnalysis::Analyze(), newlang::AstAnalysis::CheckError(), and newlang::JIT::Run().
#define LOG_RUNTIME | ( | format, | |
... ) LOG_THROW(std::runtime_error, LOG_LEVEL_ABORT, "R:", format, ##__VA_ARGS__) |
Definition at line 26 of file logger.h.
Referenced by newlang::runtime::Base::__assert_abort__(), __attribute__(), newlang::VariableOp::__clone__(), newlang::VariableOp::__copy__(), newlang::VariableOp::__eq__(), newlang::runtime::Base::__len__(), newlang::BigNum::add(), newlang::runtime::Buildin::AddMethod(), newlang::NameLookupStack::AddName(), newlang::Diag::Apply(), newlang::Dict< T, PTR >::at(), newlang::Obj::at(), newlang::Obj::at(), newlang::Obj::at(), newlang::Dict< T, PTR >::at_index(), newlang::Obj::at_index(), newlang::Dict< T, PTR >::at_index_const(), newlang::Obj::at_index_const(), newlang::Obj::BaseTypeConstructor(), newlang::RunTime::BaseTypeFromString(), newlang::Obj::begin(), newlang::Obj::begin(), newlang::runtime::Buildin::Buildin(), newlang::Context::Call(), newlang::Context::Call(), newlang::Context::CallNative_(), newlang::NameLookupStack::CheckInterrupt(), newlang::Context::CheckTargetScope(), newlang::clone(), newlang::Obj::ClonePropTo(), newlang::Iterator< T >::CompareFuncDefault(), newlang::ConcatData(), newlang::const_(), newlang::Obj::ConstructorEnum_(), newlang::Obj::ConstructorNative_(), newlang::Obj::ConstructorSimpleType_(), newlang::Obj::ConstructorStruct_(), ConvertStringToTensor(), ConvertStringToTensor(), ConvertTensorToStringTemplate(), newlang::AstAnalysis::ConvertToVFormat_(), CreateFromGenericValue(), newlang::RunTime::CreateNative(), newlang::Obj::CreateRational(), CreateTensor(), newlang::BigNum::div(), newlang::Diag::Emit(), newlang::Obj::end(), newlang::Obj::end(), newlang::Obj::erase(), newlang::Obj::erase(), newlang::Context::Eval(), newlang::Context::EvalDoWhile_(), newlang::Context::EvalIterator_(), newlang::Macro::EvalOpMacros(), newlang::Context::EvalTerm(), newlang::Context::EvalTryBlock_(), newlang::Context::EvalWhile_(), newlang::RunTime::ExecModule(), newlang::Macro::ExpandMacros(), newlang::Parser::ExpandPredefMacro(), newlang::Macro::ExpandString(), newlang::ExpandTermMacro(), newlang::Macro::ExtractArgs(), newlang::Obj::find(), newlang::Context::FindLocalVar(), newlang::Context::FindObject(), newlang::Macro::FindTerm(), fromTorchType(), newlang::BigNum::GetAsInteger(), newlang::Rational::GetAsInteger(), newlang::Rational::GetAsNumber(), newlang::GetBaseTypeFromString(), newlang::runtime::System::getenv(), newlang::NameLookupStack::GetFuntionName(), GetGenericValueRef(), newlang::Obj::GetIndex(), newlang::Macro::GetMacroId(), newlang::InternalName::getMangledName(), newlang::Macro::GetObj(), getSummaryTensorType(), newlang::runtime::System::getsysinfo(), GetTensorType(), newlang::Macro::GetTerm(), newlang::RunTime::GetTypeFromString(), newlang::runtime::System::getuname(), newlang::Obj::GetValueAsBoolean(), newlang::Variable::GetValueAsBoolean(), newlang::Obj::GetValueAsInteger(), newlang::Variable::GetValueAsInteger(), newlang::Obj::GetValueAsNumber(), newlang::Variable::GetValueAsNumber(), newlang::Variable::GetValueAsObject(), newlang::Variable::GetValueAsPointer(), newlang::Obj::GetValueAsRational(), newlang::Variable::GetValueAsRational(), newlang::Obj::GetValueAsString(), newlang::Variable::GetValueAsString(), newlang::Variable::GetValueAsStringWide(), newlang::LatterType::GetVariablePair(), HexToByte(), newlang::Obj::index_get(), newlang::Obj::index_set_(), newlang::IndexArg(), newlang::Diag::Init(), newlang::RunTime::InitInternal(), newlang::Obj::insert(), newlang::Macro::InsertArg_(), newlang::isValidReference(), newlang::Obj::IteratorData(), newlang::Obj::IteratorMake(), newlang::Obj::IteratorMake(), newlang::Obj::IteratorNext(), newlang::Obj::IteratorReset(), newlang::Scanner::LexerError(), newlang::JIT::LLVMInitialize(), newlang::JIT::MakeApplicationSource(), newlang::AstAnalysis::MakeFormat(), newlang::JIT::MakeLLVMModule(), newlang::Macro::MakeMacroId(), newlang::Term::MakeRef(), newlang::RunTime::ModuleRead(), newlang::RunTime::ModuleSave(), newlang::BigNum::mul(), newlang::mutable_(), newlang::Variable::Object(), newlang::Obj::op_bit_and_set(), newlang::Obj::op_compare(), newlang::Obj::op_div_ceil_(), newlang::Rational::op_div_ceil_(), newlang::Obj::op_equal(), newlang::Obj::op_lshift_set(), newlang::Rational::op_lshift_set(), newlang::Obj::op_pow_(), newlang::Rational::op_pow_(), newlang::Obj::op_rrshift_set(), newlang::Rational::op_rrshift_set(), newlang::Obj::op_rshift_set(), newlang::Rational::op_rshift_set(), newlang::Obj::op_set_index(), newlang::Obj::operator float(), newlang::Obj::operator uint64_t(), newlang::Variable::operator uint64_t(), newlang::Obj::operator%=(), newlang::Rational::operator%=(), newlang::Obj::operator*=(), newlang::Obj::operator+(), newlang::Obj::operator+(), newlang::Obj::operator++(), newlang::Obj::operator+=(), newlang::Obj::operator-(), newlang::Obj::operator-(), newlang::Obj::operator--(), newlang::Obj::operator-=(), newlang::Obj::operator/=(), newlang::Obj::operator[](), newlang::Obj::operator[](), newlang::Obj::operator^=(), newlang::Rational::operator^=(), newlang::Obj::operator|=(), newlang::Rational::operator|=(), newlang::RunTime::ParseArgs(), newlang::RunTime::ParseBuildin(), newlang::parseComplex(), newlang::parseDouble(), newlang::Parser::ParseFile(), newlang::parseInteger(), newlang::Parser::Parser(), newlang::Parser::ParseTerm(), newlang::Parser::ParseTerm(), newlang::Diag::Pop(), newlang::Parser::PragmaEval(), newlang::Obj::push_back(), newlang::Obj::push_back(), newlang::Rational::reduce(), newlang::Variable::Ref(), newlang::RefTypeFromString(), newlang::Obj::resize(), newlang::Obj::resize_(), newlang::JIT::Run(), newlang::NLC::Run(), newlang::JIT::RunFile(), newlang::NLC::RunREPL(), newlang::RunTime::RunTime(), newlang::BigNum::SetFromString(), newlang::Obj::SetValue_(), ShapeFromDict(), newlang::Obj::shared(), newlang::Obj::size(), newlang::BigNum::sub(), newlang::Sync::Sync(), newlang::Sync::SyncLock(), newlang::runtime::System::system(), TensorToString(), newlang::Obj::testConvertType(), newlang::toCXXRef(), newlang::toCXXType(), toIndex(), newlang::Obj::toIntVector(), toLLVMType(), newlang::Obj::toString(), newlang::Term::toString(), newlang::toString(), toTorchType(), newlang::Obj::toType_(), newlang::VariableCaseToString(), and zip_save().
#define LOG_TEST | ( | ... | ) |
Definition at line 36 of file logger.h.
Referenced by newlang::AstAnalysis::CheckOpType(), newlang::Context::Eval(), newlang::Context::EvalDoWhile_(), and newlang::AstAnalysis::MakeFormat().
#define STATIC_ASSERT | ( | expr | ) | static_assert((expr), #expr) |
Definition at line 55 of file logger.h.
Referenced by newlang::Variable::is_taked(), nlc_prinft_sub_(), and newlang::RunTime::RunTime().
#define ASSERT_EXCEPTION | ( | text | ) | do { LOG_MAKE(LOG_LEVEL_ABORT, "[ASSERT]:", "%s%s", text, newlang::Logger::GetStackTrace().c_str()); abort(); } while(0) |
#define ASSERT | ( | condition | ) |
Definition at line 60 of file logger.h.
Referenced by newlang::NameLookupStack::AddName(), newlang::Term::AppendBlock(), newlang::Term::AppendLeft(), newlang::Term::AppendRight(), newlang::Parser::AstAddTerm(), newlang::Obj::at(), newlang::Obj::at(), newlang::Obj::BaseTypeConstructor(), newlang::BigNum::BigNum(), BinToHexBuffer(), newlang::runtime::Buildin::Buildin(), newlang::AstAnalysis::CalcSummaryType(), newlang::Context::Call(), newlang::Context::Call(), newlang::Context::CallNative_(), newlang::AstAnalysis::CheckArgs_(), newlang::AstAnalysis::CheckAssignRef(), newlang::AstAnalysis::CheckCall(), newlang::AstAnalysis::CheckCallArg(), newlang::AstAnalysis::CheckDoWhile_(), newlang::AstAnalysis::CheckFollow_(), newlang::AstAnalysis::CheckIndex_(), newlang::Macro::CheckMacro(), newlang::AstAnalysis::CheckNative_(), newlang::AstAnalysis::CheckReference(), newlang::AstAnalysis::CheckStrFormat(), newlang::AstAnalysis::CheckStrPrintf(), newlang::AstAnalysis::CheckTake_(), newlang::AstAnalysis::CheckWhile_(), newlang::Obj::CloneDataTo(), newlang::ConcatData(), newlang::Obj::ConstructorClass_(), newlang::Obj::ConstructorDictionary_(), newlang::Obj::ConstructorSimpleType_(), ConvertTensorToDict(), ConvertTensorToStringTemplate(), newlang::AstAnalysis::ConvertToVFormat_(), newlang::Context::CreateArgs_(), newlang::runtime::Buildin::CreateMethod(), newlang::runtime::Buildin::CreateMethodNative(), newlang::RunTime::CreateNative(), newlang::RunTime::CreateNative(), newlang::AstAnalysis::CreateOp_(), newlang::Context::CreateRange(), CreateTensor(), newlang::Context::CreateTensor(), newlang::BigNum::CtxHelper::CtxHelper(), newlang::Dict< T, PTR >::erase(), newlang::Context::EvalCreate_(), newlang::Context::EvalCreateAsEllipsis_(), newlang::Context::EvalCreateAsFunc_(), newlang::Context::EvalCreateAsValue_(), newlang::Context::EvalDoWhile_(), newlang::Context::EvalFollow_(), newlang::Context::EvalInterrupt_(), newlang::Context::EvalIterator_(), newlang::Context::EvalLeftVars_(), newlang::Context::EvalOpBitwise_(), newlang::Context::EvalOpCompare_(), newlang::Context::EvalOpLogical_(), newlang::Macro::EvalOpMacros(), newlang::Context::EvalOpMath_(), newlang::Context::EvalTerm(), newlang::Context::EvalTryBlock_(), newlang::Context::EvalWhile_(), newlang::Macro::ExpandMacros(), newlang::Parser::ExpandPredefMacro(), newlang::Macro::ExpandString(), newlang::ExpandTermMacro(), newlang::Macro::ExtractArgs(), newlang::BigNum::GetAsNumber(), newlang::JIT::GetCtx(), newlang::getDefaultType(), newlang::NameLookupStack::GetFuntionName(), GetGenericValueRef(), newlang::Obj::GetIndex(), newlang::Context::GetIndexValue(), newlang::Macro::GetMacroId(), newlang::NameLookupStack::GetNamespace(), newlang::Parser::GetNextToken(), newlang::Obj::GetValueAsBoolean(), newlang::Obj::GetValueAsInteger(), newlang::Obj::GetValueAsNumber(), newlang::Obj::GetValueAsRational(), newlang::Obj::GetValueAsString(), newlang::Context::HasReThrow(), HexToBin(), HexToBinEq(), newlang::Obj::index_get(), newlang::Obj::index_set_(), newlang::IndexArg(), newlang::InternalName::InternalName(), newlang::InternalName::InternalName(), newlang::isGlobalScope(), newlang::AstAnalysis::Iterator_(), newlang::Obj::IteratorData(), newlang::Obj::IteratorMake(), newlang::Obj::IteratorMake(), newlang::Obj::IteratorNext(), newlang::Obj::IteratorReset(), newlang::RunTime::LoadModuleFromFile(), newlang::NameLookupStack::LookupBlock_(), newlang::AstAnalysis::LookupName(), newlang::MakeConstructorName(), newlang::AstAnalysis::MakeFormat(), newlang::JIT::MakeFunctionPrototype(), newlang::AstAnalysis::MakeInclude(), newlang::NameLookupStack::MakeInternalName(), newlang::NameLookupStack::MakeInternalName(), newlang::Module::Module(), newlang::RunTime::NativeNameMangling(), newlang::NormalizeName(), newlang::Obj::op_accurate(), newlang::Obj::op_bit_and(), newlang::Obj::op_call(), newlang::Obj::op_class_test(), newlang::Rational::op_compare(), newlang::Obj::op_concat(), newlang::Obj::op_div_ceil(), newlang::Obj::op_div_ceil_(), newlang::Obj::op_div_ceil_(), newlang::Obj::op_duck_test(), newlang::Obj::op_equal(), newlang::Obj::op_lshift_set(), newlang::Obj::op_pow(), newlang::Obj::op_pow_(), newlang::Obj::op_pow_(), newlang::Obj::op_rrshift_set(), newlang::Obj::op_rshift_set(), newlang::Obj::operator%(), newlang::Obj::operator%=(), newlang::Obj::operator%=(), newlang::VirtualFuncImpl< R, Args >::operator()(), newlang::Obj::operator*(), newlang::VariableTaken::operator*(), newlang::VariableTaken::operator*(), newlang::Obj::operator*=(), newlang::Obj::operator*=(), newlang::Obj::operator+(), newlang::Obj::operator+=(), newlang::Obj::operator+=(), newlang::Obj::operator-(), newlang::Obj::operator-=(), newlang::Obj::operator-=(), newlang::Obj::operator/(), newlang::Obj::operator/=(), newlang::Obj::operator/=(), newlang::Obj::operator<(), newlang::Obj::operator<=(), newlang::InternalName::operator=(), newlang::Obj::operator>(), newlang::Obj::operator>=(), newlang::Obj::operator^=(), newlang::Obj::operator|=(), newlang::RunTime::OpLoadModule(), newlang::Context::PopScope(), newlang::NameLookupStack::PopScope(), newlang::Parser::PragmaEval(), newlang::Diag::Push(), newlang::AstAnalysis::RecursiveAnalyzer(), newlang::Rational::reduce(), newlang::Diag::Register(), newlang::RunTime::RegisterBuildinType(), newlang::StorageTerm::RegisterName(), newlang::GlobalObjects::RegisterObject(), newlang::RunTime::RegisterSystemFunc(), newlang::Diag::RemoveDiagPrefix(), newlang::Macro::RemoveMacro(), newlang::Obj::resize_(), newlang::JIT::Run(), newlang::NLC::Run(), newlang::BigNum::SetFromString(), newlang::Context::SetIndexValue(), newlang::Obj::SetValue_(), newlang::Obj::SetValue_(), newlang::Obj::size(), newlang::Context::StringPrintf(), newlang::Sync::Sync(), newlang::Sync::SyncLock(), newlang::Sync::SyncUnLock(), TensorToString_(), newlang::Diag::Test(), newlang::Obj::testResultIntegralType(), newlang::Macro::toMacroHash(), toSlice(), newlang::Obj::toString(), newlang::Term::toString(), newlang::Obj::toType_(), newlang::typeFromLimit(), and newlang::AstAnalysis::UpcastOpType().
#define VERIFY | ( | exp | ) | ASSERT(exp) |
Definition at line 65 of file logger.h.
Referenced by newlang::runtime::Base::Base(), newlang::BigNum::BigNum(), newlang::Diag::Diag(), newlang::RunTime::GlobalNameBuildinRegister(), newlang::RunTime::InitInternal(), newlang::Parser::InitPredefMacro(), newlang::JIT::JIT(), newlang::Logger::log_printf(), newlang::RunTime::RegisterBuildinType(), newlang::BigNum::set_(), and newlang::runtime::System::System().
#define LOG_LEVEL_DEFAULT 0 |
Definition at line 83 of file logger.h.
Referenced by newlang::Logger::GetLogLevelDesc().
#define LOG_LEVEL_DUMP 7 |
Definition at line 85 of file logger.h.
Referenced by newlang::Logger::GetLogLevelDesc(), and newlang::Logger::log_printf().
#define LOG_LEVEL_DEBUG 6 |
Definition at line 86 of file logger.h.
Referenced by newlang::Logger::GetLogLevelDesc().
#define LOG_LEVEL_INFO 5 |
Definition at line 87 of file logger.h.
Referenced by newlang::NameLookupStack::AddName(), newlang::AstAnalysis::CalcSummaryType(), newlang::AstAnalysis::CheckAssignRef(), newlang::AstAnalysis::CheckCall(), newlang::AstAnalysis::CheckCallArg(), newlang::AstAnalysis::CheckDims(), newlang::AstAnalysis::CheckField_(), newlang::AstAnalysis::CheckFollow_(), newlang::AstAnalysis::CheckIndex_(), newlang::AstAnalysis::CheckMatching_(), newlang::AstAnalysis::CheckNative_(), newlang::AstAnalysis::CheckOpType(), newlang::AstAnalysis::CheckReference(), newlang::AstAnalysis::CheckStrFormat(), newlang::AstAnalysis::CheckStrPrintf(), newlang::AstAnalysis::CheckWith_(), newlang::AstAnalysis::CkeckRange_(), newlang::AstAnalysis::CreateOp_(), newlang::Logger::GetLogLevelDesc(), newlang::Logger::log_printf(), newlang::NameLookupStack::LookupBlock_(), newlang::AstAnalysis::LookupName(), nlc_prinft_sub_(), newlang::Parser::PragmaEval(), newlang::AstAnalysis::RecursiveAnalyzer(), newlang::GlobalObjects::RegisterObject(), and newlang::NameLookupStack::SetLookupNamespace().
#define LOG_LEVEL_WARNING 4 |
Definition at line 88 of file logger.h.
Referenced by newlang::Diag::Emit(), and newlang::Logger::GetLogLevelDesc().
#define LOG_LEVEL_ERROR 3 |
Definition at line 89 of file logger.h.
Referenced by newlang::Logger::GetLogLevelDesc().
#define LOG_LEVEL_FAULT 2 |
Definition at line 90 of file logger.h.
Referenced by newlang::Logger::GetLogLevelDesc().
#define LOG_LEVEL_ABORT 1 |
Definition at line 91 of file logger.h.
Referenced by newlang::Logger::GetLogLevelDesc(), and newlang::Logger::SetLogLevel().
#define LOG_LEVEL_MAX LOG_LEVEL_DUMP |
Максимально возможный уровень логирования для конкретно сборки Все сообщения с бОльшим уровнем удаляются на этапе компиляции исходников
Definition at line 101 of file logger.h.
Referenced by newlang::Logger::SetLogLevel().
#define LOG_LEVEL_NORMAL LOG_LEVEL_INFO |
Уровень логирования по умолчанию при запуске приложения Его можно повысить до уровня не выше LOG_LEVEL_MAX
Definition at line 113 of file logger.h.
Referenced by newlang::Logger::GetLogLevelNormal(), newlang::Logger::Logger(), and newlang::Logger::SetLogLevel().
#define LOG_DUMP | ( | ... | ) | LOG_MAKE(LOG_LEVEL_DUMP, "DUMP:", ##__VA_ARGS__) |
Definition at line 118 of file logger.h.
Referenced by newlang::Term::~Term().
#define LOG_DEBUG | ( | ... | ) | LOG_MAKE(LOG_LEVEL_DEBUG, "D:", ##__VA_ARGS__) |
Definition at line 119 of file logger.h.
Referenced by newlang::AstAnalysis::CheckCallArg(), newlang::isVariableName(), newlang::Obj::op_class_test(), newlang::Obj::operator float(), newlang::Parser::PragmaEval(), and newlang::RunTime::RegisterBuildinType().
#define LOG_INFO | ( | ... | ) | LOG_MAKE(LOG_LEVEL_INFO, NULL, ##__VA_ARGS__) |
Definition at line 120 of file logger.h.
Referenced by newlang::runtime::Base::__timeit__(), newlang::RunTime::ModuleRead(), newlang::Parser::PragmaEval(), and newlang::NLC::Run().
#define LOG_WARNING | ( | ... | ) | LOG_MAKE(LOG_LEVEL_WARNING, "W:", ##__VA_ARGS__) |
Definition at line 121 of file logger.h.
Referenced by newlang::Context::Call(), newlang::Diag::Emit(), newlang::Macro::EvalOpMacros(), newlang::Parser::PragmaEval(), and newlang::Obj::testResultIntegralType().
#define LOG_ERROR | ( | ... | ) | LOG_MAKE(LOG_LEVEL_ERROR, "E:", ##__VA_ARGS__) |
Definition at line 122 of file logger.h.
Referenced by newlang::runtime::Buildin::CreateMethod(), newlang::runtime::Buildin::CreateMethodNative(), HexStrToBinStr(), newlang::RunTime::LoadModuleFromFile(), newlang::JIT::MakeObjFile(), newlang::Obj::op_pow_(), newlang::Parser::RegisterPredefMacro(), newlang::toString(), and newlang::Obj::toType_().
#define LOG_FAULT | ( | ... | ) | LOG_MAKE(LOG_LEVEL_FAULT, "F:", ##__VA_ARGS__) |
#define LOG_ABORT | ( | ... | ) | LOG_MAKE(LOG_LEVEL_ABORT, "A:", ##__VA_ARGS__) |
Definition at line 124 of file logger.h.
Referenced by newlang::Term::toString().
std::string BinToHex | ( | const uint8_t * | buffer, |
const size_t | size ) |
Definition at line 168 of file logger.cpp.
References bin_to_hex_chars, and result.
std::string HexStrToBinStr | ( | std::string & | hex_str | ) |
Definition at line 179 of file logger.cpp.
uint8_t HexToByte | ( | const char | c | ) |
Definition at line 117 of file logger.cpp.
References LOG_RUNTIME.
Referenced by HexToBin(), and HexToBinEq().
size_t HexToBin | ( | const char * | str, |
uint8_t * | buffer, | ||
const size_t | size ) |
Definition at line 130 of file logger.cpp.
References ASSERT, and HexToByte().
int HexToBinEq | ( | const char * | str, |
const uint8_t * | buffer, | ||
const size_t | size ) |
Definition at line 147 of file logger.cpp.
References ASSERT, and HexToByte().
size_t BinToHexBuffer | ( | const uint8_t * | buffer, |
const size_t | size, | ||
char * | str, | ||
const size_t | str_size ) |
Definition at line 249 of file logger.cpp.
References ASSERT, and bin_to_hex_chars.