NewLang Project
Yet another programm language
|
#include <object.h>
Classes | |
struct | NativeData |
Public Types | |
typedef Dict::PairType | PairType |
![]() | |
typedef std::shared_ptr< Obj > | Type |
typedef std::pair< std::string, Type > | PairType |
typedef std::list< PairType > | ListType |
Public Member Functions | |
Obj (ObjType type=ObjType::None, const char *var_name=nullptr, TermPtr func_proto=nullptr, ObjType fixed=ObjType::None, bool init=false, Sync *sync=nullptr) | |
ObjPtr | shared () |
ObjPtr | MakeConst () |
ObjPtr | MakeMutable () |
virtual ObjPtr | IteratorMake (const char *filter=nullptr, bool check_create=true) |
virtual ObjPtr | IteratorMake (Obj *args) |
virtual ObjPtr | IteratorData () |
virtual ObjPtr | IteratorReset () |
virtual ObjPtr | IteratorNext (int64_t count) |
ObjPtr | IteratorNext (ObjPtr count) |
ObjType | getType () |
ObjType | getTypeAsLimit () |
std::string & | getName () |
const std::string & | getName () const |
void | SetClassName (std::string &name) |
bool | is_const () const |
bool | is_init () const |
bool | is_none_type () const |
bool | is_bool_type () const |
bool | is_arithmetic_type () const |
bool | is_string_type () const |
bool | is_string_char_type () const |
bool | is_string_wide_type () const |
bool | is_dictionary_type () const |
bool | is_plain_type () const |
bool | is_other_type () const |
bool | is_class_type () const |
bool | is_simple_type () const |
bool | is_scalar () const |
bool | is_function_type () const |
bool | is_native () const |
bool | is_tensor_type () const |
bool | is_integer () const |
bool | is_integral () const |
bool | is_complex () const |
bool | is_floating () const |
bool | is_indexing () const |
bool | is_ellipsis () const |
bool | is_range () const |
bool | is_rational () const |
bool | is_type_name () const |
bool | is_error () const |
bool | is_return () const |
bool | is_block () const |
bool | is_defined_type () |
bool | is_any_size () |
void | SetTermProp (Term &term) |
virtual int64_t | size () const |
virtual int64_t | size (int64_t ind) const |
int64_t | resize_ (int64_t size, ObjPtr fill, const std::string="") |
virtual bool | empty () const |
Dict< Obj >::PairType & | at (const std::string name) const |
Dict< Obj >::PairType & | at (const std::string name) override |
Dict< Obj >::PairType & | at (const int64_t index) override |
const Dict< Obj >::PairType & | at (const int64_t index) const override |
Dict< Obj >::PairType & | at (ObjPtr find) |
bool | exist (ObjPtr &find, bool strong) |
size_t | ItemValueCount (ObjPtr &find, bool strong) |
ObjPtr | operator() () |
ObjPtr | op_call (ObjPtr args) |
ObjPtr | op_call (Obj &args) |
template<typename... T> | |
std::enable_if< is_all< Obj::PairType, T... >::value, ObjPtr >::type | operator() (T ... args) |
template<typename... T> | |
std::enable_if<!is_all< Obj::PairType, T... >::value, ObjPtr >::type | operator() (T ... args) |
template<typename I > | |
std::enable_if< std::is_integral< I >::value &&!std::is_pointer< I >::value, constPairType & >::type | operator[] (const I index) |
template<typename N > | |
std::enable_if< std::is_same< N, std::string >::value||std::is_pointer< N >::value, constPairType & >::type | operator[] (const N name) |
Obj::iterator | find (const std::string name) |
Obj::iterator | begin () |
Obj::iterator | end () |
Obj::const_iterator | begin () const |
Obj::const_iterator | end () const |
PairType & | push_back (const PairType &p) |
PairType & | push_back (const Type value, const std::string &name="") |
Obj::iterator | at_index (const int64_t index) |
Obj::const_iterator | at_index_const (const int64_t index) const |
Obj::const_iterator | insert (Obj::const_iterator pos, const PairType &data) |
const std::string & | name (const int64_t index) const override |
int64_t | resize (int64_t new_size, const Type fill, const std::string &name="") override |
void | erase (const size_t from, const size_t to) override |
void | erase (const int64_t index) override |
void | clear_ () override |
void | clear_ (bool clear_iterator_name) |
operator bool () const | |
operator int8_t () const | |
operator uint8_t () const | |
operator int16_t () const | |
operator uint16_t () const | |
operator int32_t () const | |
operator uint32_t () const | |
operator int64_t () const | |
operator uint64_t () const | |
operator float () const | |
operator double () const | |
operator std::string () const | |
operator std::wstring () const | |
operator void * () const | |
operator Rational () const | |
ObjPtr | operator+ () |
ObjPtr | operator- () |
ObjPtr & | operator+ (ObjPtr &obj) |
ObjPtr & | operator- (ObjPtr &obj) |
ObjPtr | operator++ () |
ObjPtr | operator++ (int) |
ObjPtr | operator-- () |
ObjPtr | operator-- (int) |
ObjPtr | operator* (ObjPtr obj) |
ObjPtr | operator* (Obj value) |
ObjPtr | operator/ (ObjPtr obj) |
ObjPtr | operator/ (Obj value) |
ObjPtr | op_div_ceil (ObjPtr obj) |
ObjPtr | op_div_ceil (Obj value) |
ObjPtr | op_concat (ObjPtr obj, ConcatMode mode=ConcatMode::Error) |
ObjPtr | op_concat (Obj &value, ConcatMode mode=ConcatMode::Error) |
ObjPtr | op_concat_ (Obj &obj, ConcatMode mode=ConcatMode::Error) |
ObjPtr | op_concat_ (ObjPtr obj, ConcatMode mode=ConcatMode::Error) |
ObjPtr | operator% (ObjPtr obj) |
ObjPtr | operator% (Obj value) |
ObjPtr | operator+ (ObjPtr obj) |
ObjPtr | operator+ (Obj value) |
ObjPtr | operator+= (ObjPtr obj) |
ObjPtr | operator+= (Obj obj) |
ObjPtr | operator- (ObjPtr obj) |
ObjPtr | operator- (Obj value) |
ObjPtr | operator-= (ObjPtr obj) |
ObjPtr | operator-= (Obj obj) |
bool | operator< (ObjPtr obj) |
bool | operator< (Obj obj) |
bool | operator<= (ObjPtr obj) |
bool | operator<= (Obj obj) |
bool | operator> (ObjPtr obj) |
bool | operator> (Obj obj) |
bool | operator>= (ObjPtr obj) |
bool | operator>= (Obj obj) |
int | op_compare (Obj &value) |
bool | op_class_test (ObjPtr obj, Context *ctx) const |
bool | op_class_test (const char *name, Context *ctx) const |
bool | op_duck_test (ObjPtr obj, bool strong) |
bool | op_duck_test (Obj *value, bool strong) |
bool | op_equal (ObjPtr value) |
bool | op_equal (Obj &value) |
bool | op_accurate (ObjPtr obj) |
bool | op_accurate (Obj &value) |
ObjPtr | op_bit_and (ObjPtr obj, bool strong) |
ObjPtr | op_bit_and (Obj &obj, bool strong) |
ObjPtr | op_pow (ObjPtr obj) const |
ObjPtr | op_pow (Obj &obj) const |
ObjPtr | op_pow_ (ObjPtr obj) |
ObjPtr | op_pow_ (Obj &obj) |
ObjPtr | op_assign (ObjPtr obj) |
ObjPtr | op_assign (Obj &obj) |
bool | operator= (Obj &obj) |
ObjPtr | operator*= (ObjPtr obj) |
ObjPtr | operator*= (Obj obj) |
ObjPtr | operator/= (ObjPtr obj) |
ObjPtr | operator/= (Obj obj) |
ObjPtr | op_div_ceil_ (ObjPtr obj) |
ObjPtr | op_div_ceil_ (Obj &obj) |
ObjPtr | operator%= (ObjPtr obj) |
ObjPtr | operator%= (Obj obj) |
ObjPtr | op_bit_and_set (Obj &obj, bool strong) |
ObjPtr | operator^= (ObjPtr obj) |
ObjPtr | operator^= (Obj) |
ObjPtr | operator|= (ObjPtr obj) |
ObjPtr | operator|= (Obj) |
ObjPtr | op_lshift_set (ObjPtr obj) |
ObjPtr | op_lshift_set (Obj) |
ObjPtr | op_rshift_set (ObjPtr obj) |
ObjPtr | op_rshift_set (Obj) |
ObjPtr | op_rrshift_set (ObjPtr obj) |
ObjPtr | op_rrshift_set (Obj) |
template<typename T > | |
bool | operator= (T value) |
void | dump_dict_ (std::string &str, bool deep=true) const |
std::string | toString (bool deep=true) const |
std::string | GetValueAsString () const |
std::wstring | GetValueAsStringWide () const |
std::shared_ptr< Rational > | GetValueAsRational () const |
int64_t | GetValueAsInteger () const |
double | GetValueAsNumber () const |
bool | GetValueAsBoolean () const |
std::vector< int64_t > | toIntVector (bool raise=true) const |
ObjPtr | CallNative (Context *ctx, Obj args) |
ObjPtr | Copy () const |
ObjPtr | Clone (const char *new_name=nullptr) const |
void | CloneTo (Obj &clone) |
void | CloneTo (ObjPtr &clone) |
void | CloneDataTo (Obj &clone) const |
void | ClonePropTo (Obj &clone) const |
ObjPtr | toType (ObjType type) const |
void | toType_ (ObjType type) |
virtual | ~Obj () |
const ObjPtr | index_get (const std::vector< Index > &index) const |
ObjPtr | index_set (const std::vector< Index > &index, const ObjPtr value) const |
ObjPtr | index_set_ (const std::vector< Index > &index, const ObjPtr value) |
ObjPtr | op_set_index (ObjPtr index, ObjPtr value) |
ObjPtr | op_set_index (int64_t index, std::string value) |
template<typename T > | |
std::enable_if< std::is_same< T, bool >::value, void >::type | SetValue_ (bool value) |
template<typename T > | |
std::enable_if< std::is_integral< T >::value, void >::type | SetValue_ (T value) |
template<typename T > | |
std::enable_if< std::is_floating_point< T >::value, void >::type | SetValue_ (T value) |
template<typename T > | |
std::enable_if< std::is_same< char *, T >::value, void >::type | SetValue_ (T text) |
template<typename T > | |
std::enable_if< std::is_same< wchar_t *, T >::value, void >::type | SetValue_ (T text) |
void | SetValue_ (std::string text) |
void | SetValue_ (std::wstring text) |
void | testConvertType (ObjType type) |
void | testResultIntegralType (ObjType type, bool upscalint) |
void | SetValue_ (ObjPtr value) |
bool | CallAll (const char *func_name, ObjPtr &arg_in, ObjPtr &result, ObjPtr object=nullptr, size_t limit=0) |
bool | CallOnce (ObjPtr &arg_in, ObjPtr &result, ObjPtr object=nullptr) |
const TermPtr | Proto () |
void | remove (const Dict::PairType &value) |
![]() | |
std::enable_if< std::is_integral< I >::value &&!std::is_pointer< I >::value, constPairType & >::type | operator[] (I index) |
std::enable_if< std::is_same< N, std::string >::value||std::is_pointer< N >::value, constPairType & >::type | operator[] (N name) |
PairType & | push_back (const PairType &p) |
PairType & | push_back (const Type value, const std::string &name="") |
ListType::iterator | find (const std::string_view name) |
virtual int64_t | index (const std::string_view field_name) |
ListType::iterator | at_index (const int64_t index) |
ListType::const_iterator | at_index_const (const int64_t index) const |
virtual | ~Dict () |
Dict () | |
Dict (PairType arg) | |
Dict (PairType arg, A... rest) | |
Static Public Member Functions | |
static PairType | ArgNull (const std::string name="") |
static PairType | Arg () |
static PairType | Arg (ObjPtr value, const std::string name="") |
template<typename T > | |
static std::enable_if< std::is_pointer< T >::value||std::is_same< std::string, T >::value, PairType >::type | Arg (T value, const std::string name="") |
template<typename T > | |
static std::enable_if<!std::is_same< PairType, T >::value &&!std::is_pointer< T >::value &&!std::is_same< std::string, T >::value, PairType >::type | Arg (T value, const std::string name="") |
static bool | is_true (const char *text) |
static bool | op_duck_test_prop (Obj *base, Obj *value, bool strong) |
static ObjPtr | GetIndex (ObjPtr obj, TermPtr index_arg) |
static ObjPtr | GetIndex (ObjPtr obj, size_t index) |
static ObjPtr | CreateType (ObjType type, ObjType fixed=ObjType::None, bool is_init=false, Sync *sync=nullptr) |
static ObjPtr | CreateRational (const Rational &val) |
static ObjPtr | CreateRational (const std::string val) |
static ObjPtr | BaseTypeConstructor (Context *ctx, Obj &in) |
static ObjPtr | ConstructorSimpleType_ (Context *ctx, Obj &args) |
static ObjPtr | ConstructorDictionary_ (Context *ctx, Obj &args) |
static ObjPtr | ConstructorNative_ (Context *ctx, Obj &args) |
static ObjPtr | ConstructorStub_ (Context *ctx, Obj &args) |
static ObjPtr | ConstructorClass_ (Context *ctx, Obj &args) |
static ObjPtr | ConstructorStruct_ (Context *ctx, Obj &args) |
static ObjPtr | ConstructorEnum_ (Context *ctx, Obj &args) |
static ObjPtr | CreateBaseType (ObjType type) |
static ObjPtr | CreateNone (Sync *sync=nullptr) |
static ObjPtr | CreateEmpty (Sync *sync=nullptr) |
static ObjPtr | CreatePointer (void *ptr=nullptr, Sync *sync=nullptr) |
static ObjPtr | CreateNil (Sync *sync=nullptr) |
static ObjPtr | CreateBool (bool value, Sync *sync=nullptr) |
template<typename T1 , typename T2 , typename T3 > | |
static ObjPtr | CreateRange (T1 start, T2 stop, T3 step, Sync *sync=nullptr) |
template<typename T1 , typename T2 > | |
static ObjPtr | CreateRange (T1 start, T2 stop, Sync *sync=nullptr) |
template<typename T > | |
static std::enable_if< std::is_same< T, std::string >::value||std::is_same< T, constchar * >::value, ObjPtr >::type | CreateValue (T value, Sync *sync=nullptr) |
template<typename T > | |
static std::enable_if< std::is_same< T, std::wstring >::value||std::is_same< T, constwchar_t * >::value, ObjPtr >::type | CreateValue (T value, Sync *sync=nullptr) |
template<typename T > | |
static std::enable_if< std::is_integral< T >::value, ObjPtr >::type | CreateValue (T value, ObjType fix_type=ObjType::None, Sync *sync=nullptr) |
template<typename T > | |
static std::enable_if< std::is_floating_point< T >::value, ObjPtr >::type | CreateValue (T value, ObjType fix_type=ObjType::None, Sync *sync=nullptr) |
static ObjPtr | CreateString (const std::string_view str, Sync *sync=nullptr) |
static ObjPtr | CreateString (const std::wstring_view str, Sync *sync=nullptr) |
static ObjPtr | Yes (Sync *sync=nullptr) |
static ObjPtr | No (Sync *sync=nullptr) |
static ObjPtr | CreateDict (Sync *sync=nullptr) |
template<typename... T> | |
static std::enable_if< is_all< PairType, T... >::value, ObjPtr >::type | CreateDict (T ... args) |
static ObjPtr | CreateDict (const std::vector< ObjPtr > &arr, Sync *sync=nullptr) |
static ObjPtr | CreateClass (std::string name) |
template<typename... T> | |
static std::enable_if< is_all< PairType, T... >::value, ObjPtr >::type | CreateClass (std::string name, T ... args) |
![]() | |
static PairType | pair (const Type value, const std::string name="") |
Public Attributes | |
ObjType | m_var_type_current |
Текущий тип значения объекта | |
ObjType | m_var_type_fixed |
Максимальный размер для арифметических типов, который задается разработчиком | |
bool | m_var_is_init |
Содержит ли объект корректное значение ??? | |
std::string | m_var_name |
Имя переменной, в которой хранится объект | |
std::string | m_class_name |
Имя класса объекта (у базовых типов отсуствует) | |
std::vector< ObjPtr > | m_class_parents |
Родительские классы (типы) | |
std::string | m_module_name |
const TermPtr | m_prototype |
Описание прототипа функции (или данных) | |
Context * | m_ctx |
ObjPtr | m_dimensions |
Размерности для ObjType::Type. | |
PairType | m_str_pair |
std::string | m_func_mangle_name |
std::variant< std::monostate, int64_t, double, void *, bool *, int8_t *, int16_t *, int32_t *, int64_t *, float *, double *, NativeData, std::string, TermPtr, Iterator< Obj > > | m_var |
std::string | m_value |
Содержит байтовую строку или байтовый массив с данными для представления в нативном виде (Struct, Unuion, Enum) | |
std::wstring | m_string |
Содержит строку широких символов | |
std::shared_ptr< torch::Tensor > | m_tensor |
Содержит только размерные тензоры (скляры хранятся в поле m_pointer и не создают m_tensor->defined()) | |
Rational | m_rational |
Содержит дробь из длинных чисел | |
std::shared_ptr< Iterator< Obj > > | m_iterator |
Итератор для данных | |
ObjPtr | m_iter_range_value |
TermPtr | m_sequence |
Последовательно распарсенных команд для выполнения | |
ObjPtr | m_return_obj |
ObjWeak | m_reference |
Sync * | m_sync |
bool | m_check_args |
bool | m_is_const |
bool | m_is_reference |
typedef Dict::PairType newlang::Obj::PairType |
Obj::Obj | ( | ObjType | type = ObjType::None, |
const char * | var_name = nullptr, | ||
TermPtr | func_proto = nullptr, | ||
ObjType | fixed = ObjType::None, | ||
bool | init = false, | ||
Sync * | sync = nullptr ) |
Definition at line 178 of file object.cpp.
References m_check_args, m_ctx, m_dimensions, m_is_const, m_is_reference, m_sync, m_tensor, m_var, m_var_is_init, and m_var_type_fixed.
|
inlinevirtual |
|
inlinestaticnodiscard |
Definition at line 363 of file object.h.
References CreateNil(), name(), and newlang::Dict< Obj >::pair().
|
inlinestaticnodiscard |
Definition at line 368 of file object.h.
References CreateNone(), and newlang::Dict< Obj >::pair().
|
inlinestaticnodiscard |
Definition at line 373 of file object.h.
References name(), and newlang::Dict< Obj >::pair().
|
inlinestatic |
Definition at line 379 of file object.h.
References CreateString(), name(), and newlang::Dict< Obj >::pair().
|
inlinestatic |
Definition at line 385 of file object.h.
References CreateValue(), name(), newlang::None, and newlang::Dict< Obj >::pair().
|
inline |
Definition at line 389 of file object.h.
References LOG_RUNTIME.
Referenced by newlang::Context::Call(), index_set_(), IteratorMake(), IteratorMake(), IteratorReset(), MakeConst(), MakeMutable(), op_assign(), op_assign(), op_bit_and_set(), op_concat_(), op_div_ceil_(), op_pow_(), op_set_index(), operator%=(), operator*=(), operator+(), operator++(), operator+=(), operator-(), operator--(), operator-=(), operator/=(), and newlang::NLC::Run().
|
inline |
Definition at line 397 of file object.h.
References m_is_const, and shared().
|
inline |
Definition at line 402 of file object.h.
References m_is_const, and shared().
|
virtual |
Definition at line 3191 of file object.cpp.
References ASSERT, CreateType(), getType(), is_indexing(), is_range(), newlang::Iterator, LOG_RUNTIME, m_var_type_current, newlang::Range, result, shared(), and toString().
Referenced by toType_().
Definition at line 3209 of file object.cpp.
References ASSERT, at(), CreateType(), GetValueAsString(), is_indexing(), is_range(), newlang::Iterator, LOG_RUNTIME, m_var_type_current, newlang::Range, result, shared(), size(), and toString().
|
virtual |
Definition at line 3240 of file object.cpp.
References ASSERT, newlang::Iterator< T >::data(), newlang::Iterator, newlang::IteratorEnd, LOG_RUNTIME, m_iterator, m_var_type_current, step(), toString(), newlang::toString(), and zero.
|
virtual |
Definition at line 3289 of file object.cpp.
References ASSERT, getSummaryTensorType(), newlang::Iterator, LOG_RUNTIME, m_iterator, m_var_type_current, newlang::None, shared(), and newlang::toString().
|
virtual |
Definition at line 3306 of file object.cpp.
References ASSERT, newlang::Iterator, LOG_RUNTIME, m_iterator, and m_var_type_current.
Referenced by IteratorNext().
Definition at line 413 of file object.h.
References IteratorNext().
|
inlinenodiscard |
Definition at line 423 of file object.h.
References m_var_type_current.
Referenced by BaseTypeConstructor(), newlang::Context::Call(), ConstructorDictionary_(), ConstructorSimpleType_(), GetGenericValueRef(), newlang::Context::HasReThrow(), IteratorMake(), op_compare(), op_equal(), op_pow_(), and newlang::Context::StringFormat().
|
inlinenodiscard |
Definition at line 428 of file object.h.
References GetValueAsInteger(), GetValueAsNumber(), is_arithmetic_type(), is_scalar(), is_type_name(), newlang::isFloatingType(), newlang::isIntegralType(), m_var_type_current, m_var_type_fixed, and newlang::typeFromLimit().
|
inlinenodiscard |
Definition at line 442 of file object.h.
References m_var_name.
|
inlinenodiscard |
Definition at line 447 of file object.h.
References m_var_name.
|
inline |
Definition at line 451 of file object.h.
References m_class_name, and name().
|
inlinenodiscard |
Definition at line 456 of file object.h.
References m_is_const.
|
inlinenodiscard |
Definition at line 461 of file object.h.
References m_var_is_init.
Referenced by newlang::CheckSystemField(), and CreateType().
|
inlinenodiscard |
Definition at line 466 of file object.h.
References m_var_type_current, and newlang::None.
Referenced by ConstructorEnum_(), empty(), is_other_type(), op_accurate(), SetValue_(), toIndex(), and toType_().
|
inlinenodiscard |
Definition at line 471 of file object.h.
References newlang::isBooleanType(), and m_var_type_current.
Referenced by is_other_type(), op_accurate(), and op_equal().
|
inlinenodiscard |
Definition at line 476 of file object.h.
References newlang::isArithmeticType(), and m_var_type_current.
Referenced by getSummaryTensorType(), getTypeAsLimit(), is_other_type(), op_accurate(), op_pow_(), operator+(), and operator-().
|
inlinenodiscard |
Definition at line 481 of file object.h.
References newlang::isString(), and m_var_type_current.
Referenced by newlang::Context::Call(), newlang::ConcatData(), ConstructorEnum_(), GetValueAsNumber(), is_other_type(), op_accurate(), op_compare(), op_duck_test(), op_equal(), operator*=(), resize_(), and SetValue_().
|
inlinenodiscard |
Definition at line 486 of file object.h.
References newlang::isStringChar(), and m_var_type_current.
Referenced by toType_().
|
inlinenodiscard |
Definition at line 491 of file object.h.
References newlang::isStringWide(), and m_var_type_current.
Referenced by toType_().
|
inlinenodiscard |
Definition at line 496 of file object.h.
References newlang::isDictionary(), and m_var_type_current.
Referenced by newlang::Context::Call(), newlang::ConcatData(), ConvertTensorToDict(), getSummaryTensorType(), index_set_(), is_other_type(), op_accurate(), op_equal(), resize_(), SetValue_(), ShapeFromDict(), toIndex(), and toType_().
|
inlinenodiscard |
Definition at line 502 of file object.h.
References newlang::isPlainDataType(), and m_var_type_current.
|
inlinenodiscard |
Definition at line 507 of file object.h.
References is_arithmetic_type(), is_bool_type(), is_dictionary_type(), is_none_type(), and is_string_type().
|
inlinenodiscard |
Definition at line 512 of file object.h.
References newlang::isClass(), and m_var_type_current.
Referenced by SetValue_().
|
inlinenodiscard |
Definition at line 517 of file object.h.
References newlang::isSimpleType(), and m_var_type_current.
Referenced by GetValueAsNumber(), and op_duck_test().
|
nodiscard |
Definition at line 2142 of file object.cpp.
References is_tensor_type(), and m_tensor.
Referenced by at(), at(), getTypeAsLimit(), GetValueAsBoolean(), GetValueAsInteger(), GetValueAsNumber(), GetValueAsString(), index_get(), index_set_(), op_compare(), op_div_ceil_(), op_equal(), op_pow_(), operator%=(), operator*=(), operator+=(), operator-=(), operator/=(), SetValue_(), ShapeFromDict(), size(), testResultIntegralType(), toIndex(), toString(), and toType_().
|
inlinenodiscard |
Definition at line 525 of file object.h.
References newlang::isFunction(), and m_var_type_current.
Referenced by newlang::Context::Call(), and op_duck_test().
|
inlinenodiscard |
Definition at line 530 of file object.h.
References newlang::isNative(), and m_var_type_current.
Referenced by newlang::Context::Call().
|
inlinenodiscard |
Definition at line 535 of file object.h.
References newlang::isTensor(), and m_var_type_current.
Referenced by at(), at(), newlang::ConcatData(), empty(), erase(), erase(), index_get(), index_set_(), is_scalar(), op_bit_and_set(), op_div_ceil_(), op_equal(), op_pow_(), operator%=(), operator*=(), operator+(), operator++(), operator+=(), operator-(), operator-(), operator--(), operator-=(), operator/=(), resize_(), SetValue_(), ShapeFromDict(), size(), toIndex(), toString(), and toType_().
|
inlinenodiscard |
Definition at line 540 of file object.h.
References newlang::isIntegralType(), and m_var_type_current.
Referenced by operator-(), and toSlice().
|
inlinenodiscard |
Definition at line 545 of file object.h.
References newlang::isIntegralType(), and m_var_type_current.
Referenced by ConstructorEnum_(), GetValueAsRational(), GetValueAsString(), op_div_ceil_(), op_pow_(), operator%=(), operator*=(), operator+=(), operator-=(), operator/=(), testResultIntegralType(), and toType_().
|
inlinenodiscard |
Definition at line 550 of file object.h.
References newlang::isComplexType(), and m_var_type_current.
Referenced by op_compare().
|
inlinenodiscard |
Definition at line 555 of file object.h.
References newlang::isFloatingType(), and m_var_type_current.
Referenced by GetValueAsRational(), GetValueAsString(), op_compare(), op_div_ceil_(), operator%=(), operator*=(), operator+=(), operator-=(), operator/=(), SetValue_(), testResultIntegralType(), and toType_().
|
inlinenodiscard |
Definition at line 560 of file object.h.
References is_error(), is_return(), newlang::isIndexingType(), m_var_type_current, and m_var_type_fixed.
Referenced by at_index(), at_index_const(), begin(), begin(), end(), end(), erase(), erase(), find(), insert(), IteratorMake(), IteratorMake(), operator[](), operator[](), push_back(), push_back(), and resize().
|
inlinenodiscard |
Definition at line 565 of file object.h.
References newlang::isEllipsis(), and m_var_type_current.
Referenced by toIndex().
|
inlinenodiscard |
Definition at line 570 of file object.h.
References newlang::isRange(), and m_var_type_current.
Referenced by getSummaryTensorType(), IteratorMake(), IteratorMake(), toIndex(), toSlice(), and toType_().
|
inlinenodiscard |
Definition at line 575 of file object.h.
References m_var_type_current, and newlang::Rational.
Referenced by op_compare(), op_equal(), and op_pow_().
|
inlinenodiscard |
Definition at line 580 of file object.h.
References newlang::isTypeName(), and m_var_type_current.
Referenced by newlang::Context::Call(), and getTypeAsLimit().
|
inlinenodiscard |
Definition at line 585 of file object.h.
References newlang::Error, newlang::ErrorParser, newlang::ErrorRunTime, newlang::ErrorSignal, m_var_type_current, and m_var_type_fixed.
Referenced by is_indexing().
|
inlinenodiscard |
Definition at line 590 of file object.h.
References m_var_type_current, newlang::RetMinus, newlang::RetPlus, and newlang::RetRepeat.
Referenced by is_indexing().
|
inlinenodiscard |
Definition at line 595 of file object.h.
References newlang::BLOCK, newlang::BLOCK_MINUS, newlang::BLOCK_PLUS, newlang::BLOCK_TRY, and m_var_type_current.
|
inlinenodiscard |
Definition at line 601 of file object.h.
References m_var_type_fixed, and newlang::None.
|
inlinenodiscard |
Definition at line 606 of file object.h.
References newlang::Ellipsis, m_var_type_current, and newlang::None.
void newlang::Obj::SetTermProp | ( | Term & | term | ) |
|
inlinevirtual |
Definition at line 624 of file object.h.
References size().
Referenced by BaseTypeConstructor(), newlang::Context::Call(), newlang::Context::CallNative_(), newlang::CheckSystemField(), ConstructorDictionary_(), ConstructorEnum_(), ConstructorSimpleType_(), getSummaryTensorType(), GetValueAsBoolean(), IteratorMake(), op_bit_and_set(), op_duck_test_prop(), op_equal(), operator+=(), operator-=(), resize_(), ShapeFromDict(), size(), newlang::Context::StringFormat(), newlang::Context::StringPrintf(), toIntVector(), toSlice(), toString(), and toType_().
|
virtual |
Definition at line 244 of file object.cpp.
References ASSERT, is_scalar(), is_tensor_type(), LOG_RUNTIME, m_string, m_tensor, m_value, m_var_type_current, newlang::StrChar, and newlang::StrWide.
int64_t Obj::resize_ | ( | int64_t | size, |
ObjPtr | fill, | ||
const std::string | name = "" ) |
Definition at line 263 of file object.cpp.
References ASSERT, CreateNone(), is_dictionary_type(), is_string_type(), is_tensor_type(), LOG_RUNTIME, m_string, m_tensor, m_value, m_var_type_current, name(), newlang::None, newlang::Dict< T, PTR >::resize(), size(), newlang::StrChar, newlang::StrWide, and newlang::toString().
|
virtual |
Definition at line 193 of file object.cpp.
References is_none_type(), is_tensor_type(), m_string, m_tensor, m_value, m_var_is_init, m_var_type_current, newlang::StrChar, and newlang::StrWide.
Referenced by BaseTypeConstructor(), ConstructorDictionary_(), ConstructorSimpleType_(), and toString().
|
inline |
Definition at line 632 of file object.h.
References newlang::CheckSystemField(), m_str_pair, and name().
Referenced by getSummaryTensorType(), index_set_(), IteratorMake(), op_bit_and_set(), op_equal(), op_set_index(), operator+=(), operator[](), operator[](), ShapeFromDict(), toIntVector(), toString(), and toType_().
|
inlineoverridevirtual |
Reimplemented from newlang::Dict< Obj >.
Definition at line 643 of file object.h.
References newlang::Dict< T, PTR >::at(), newlang::CheckSystemField(), m_str_pair, and name().
|
overridevirtual |
Reimplemented from newlang::Dict< Obj >.
Definition at line 386 of file object.cpp.
References ASSERT, newlang::Dict< T, PTR >::at(), CreateString(), CreateTensor(), newlang::Dict< Obj >::index(), is_scalar(), is_tensor_type(), LOG_RUNTIME, m_str_pair, m_string, m_tensor, m_value, m_var_type_current, newlang::Dict< Obj >::pair(), newlang::StrChar, and newlang::StrWide.
|
overridevirtual |
Reimplemented from newlang::Dict< Obj >.
Definition at line 363 of file object.cpp.
References ASSERT, newlang::Dict< T, PTR >::at(), CreateString(), CreateTensor(), newlang::Dict< Obj >::index(), is_scalar(), is_tensor_type(), LOG_RUNTIME, m_str_pair, m_string, m_tensor, m_value, m_var_type_current, newlang::Dict< Obj >::pair(), newlang::StrChar, and newlang::StrWide.
|
inline |
Definition at line 656 of file object.h.
References newlang::Dict< T, PTR >::at(), find(), and LOG_RUNTIME.
bool Obj::exist | ( | ObjPtr & | find, |
bool | strong ) |
size_t Obj::ItemValueCount | ( | ObjPtr & | find, |
bool | strong ) |
Definition at line 968 of file object.cpp.
|
inlinestatic |
|
inline |
Definition at line 672 of file object.h.
References newlang::Dictionary, and op_call().
Definition at line 677 of file object.h.
References ASSERT, and op_call().
Referenced by op_call(), operator()(), and operator()().
Definition at line 3395 of file object.cpp.
References newlang::Context::Call(), and m_ctx.
|
inline |
Definition at line 686 of file object.h.
References CreateDict(), and op_call().
|
inline |
Definition at line 697 of file object.h.
References CreateDict(), CreateValue(), and op_call().
|
inline |
Definition at line 733 of file object.h.
References at(), newlang::Dict< Obj >::index(), is_indexing(), LOG_RUNTIME, m_var_type_current, newlang::Range, and newlang::toString().
|
inline |
Definition at line 742 of file object.h.
References at(), is_indexing(), LOG_RUNTIME, m_var_type_current, name(), newlang::Range, and newlang::toString().
|
inline |
Definition at line 749 of file object.h.
References newlang::Dict< T, PTR >::find(), is_indexing(), LOG_RUNTIME, m_var_type_current, name(), newlang::Range, and newlang::toString().
Referenced by at(), exist(), ItemValueCount(), and operator-=().
|
inline |
Definition at line 756 of file object.h.
References is_indexing(), LOG_RUNTIME, m_var_type_current, newlang::Range, and newlang::toString().
Referenced by newlang::Context::Call().
|
inline |
Definition at line 763 of file object.h.
References is_indexing(), LOG_RUNTIME, m_var_type_current, newlang::Range, and newlang::toString().
Referenced by operator-=().
|
inline |
Definition at line 770 of file object.h.
References is_indexing(), LOG_RUNTIME, m_var_type_current, newlang::Range, and newlang::toString().
|
inline |
Definition at line 777 of file object.h.
References is_indexing(), LOG_RUNTIME, m_var_type_current, newlang::Range, and newlang::toString().
Definition at line 784 of file object.h.
References is_indexing(), LOG_RUNTIME, m_var_type_current, newlang::Dict< T, PTR >::push_back(), and newlang::toString().
Referenced by newlang::ConcatData(), ConvertTensorToDict(), operator+=(), and toType_().
Definition at line 791 of file object.h.
References is_indexing(), LOG_RUNTIME, m_var_type_current, name(), newlang::Dict< T, PTR >::push_back(), and newlang::toString().
|
inline |
Definition at line 798 of file object.h.
References newlang::Dict< T, PTR >::at_index(), newlang::Dict< Obj >::index(), is_indexing(), LOG_RUNTIME, m_var_type_current, and newlang::toString().
|
inline |
Definition at line 805 of file object.h.
References newlang::Dict< T, PTR >::at_index_const(), newlang::Dict< Obj >::index(), is_indexing(), LOG_RUNTIME, m_var_type_current, and newlang::toString().
|
inline |
Definition at line 812 of file object.h.
References is_indexing(), LOG_RUNTIME, m_var_type_current, and newlang::toString().
Referenced by newlang::Context::Call().
|
inlineoverridevirtual |
Reimplemented from newlang::Dict< Obj >.
Definition at line 819 of file object.h.
References newlang::Dict< Obj >::index(), and newlang::Dict< T, PTR >::name().
Referenced by Arg(), Arg(), ArgNull(), at(), at(), ClonePropTo(), ConstructorDictionary_(), ConstructorEnum_(), CreateClass(), CreateClass(), find(), op_class_test(), op_duck_test_prop(), op_equal(), operator-=(), operator[](), push_back(), resize(), resize_(), and SetClassName().
|
inlineoverridevirtual |
Reimplemented from newlang::Dict< Obj >.
Definition at line 823 of file object.h.
References is_indexing(), LOG_RUNTIME, m_var_type_current, name(), newlang::Dict< T, PTR >::resize(), and newlang::toString().
|
overridevirtual |
Reimplemented from newlang::Dict< Obj >.
Definition at line 206 of file object.cpp.
References newlang::Dict< T, PTR >::erase(), is_indexing(), is_tensor_type(), LOG_RUNTIME, m_tensor, m_var_type_current, newlang::None, and newlang::toString().
Referenced by op_bit_and_set().
|
inlineoverridevirtual |
Reimplemented from newlang::Dict< Obj >.
Definition at line 832 of file object.h.
References newlang::Dict< T, PTR >::erase(), newlang::Dict< Obj >::index(), is_indexing(), is_tensor_type(), LOG_RUNTIME, m_var_type_current, and newlang::toString().
|
inlineoverridevirtual |
Reimplemented from newlang::Dict< Obj >.
Definition at line 843 of file object.h.
References newlang::Dict< T, PTR >::clear_(), and clear_().
Referenced by clear_(), newlang::ConcatData(), op_assign(), op_assign(), operator=(), SetValue_(), SetValue_(), toType_(), and ~Obj().
void Obj::clear_ | ( | bool | clear_iterator_name | ) |
Definition at line 573 of file object.cpp.
References m_class_parents, m_rational, m_string, m_tensor, m_value, m_var, m_var_is_init, m_var_type_current, newlang::None, and newlang::Rational::set_().
|
inlineexplicit |
Definition at line 854 of file object.h.
References GetValueAsBoolean().
|
inlineexplicit |
Definition at line 878 of file object.h.
References GetValueAsInteger().
|
inlineexplicit |
Definition at line 882 of file object.h.
References GetValueAsInteger(), GetValueAsString(), LOG_RUNTIME, and result.
|
explicit |
Definition at line 1540 of file object.cpp.
References LOG_DEBUG, LOG_RUNTIME, and result.
|
explicit |
Definition at line 1554 of file object.cpp.
|
inlineexplicit |
Definition at line 896 of file object.h.
References GetValueAsString().
|
inlineexplicit |
Definition at line 900 of file object.h.
References GetValueAsStringWide().
|
inlineexplicit |
|
inlineexplicit |
Definition at line 908 of file object.h.
References GetValueAsRational().
|
inline |
Definition at line 914 of file object.h.
References is_arithmetic_type(), LOG_RUNTIME, shared(), and toString().
Referenced by operator+().
ObjPtr Obj::operator- | ( | ) |
Definition at line 590 of file object.cpp.
References GetValueAsInteger(), GetValueAsNumber(), is_arithmetic_type(), is_integer(), is_tensor_type(), newlang::isFloatingType(), LOG_RUNTIME, m_var_type_current, SetValue_(), shared(), and toString().
Referenced by operator-().
Definition at line 923 of file object.h.
References is_tensor_type(), and LOG_RUNTIME.
Definition at line 614 of file object.cpp.
References is_tensor_type(), and LOG_RUNTIME.
ObjPtr Obj::operator++ | ( | ) |
Definition at line 625 of file object.cpp.
References is_tensor_type(), LOG_RUNTIME, m_tensor, shared(), and toString().
Referenced by operator++().
|
inline |
Definition at line 940 of file object.h.
References Clone(), and operator++().
ObjPtr Obj::operator-- | ( | ) |
Definition at line 606 of file object.cpp.
References is_tensor_type(), LOG_RUNTIME, m_tensor, shared(), and toString().
Referenced by operator--().
|
inline |
Definition at line 952 of file object.h.
References Clone(), and operator--().
Definition at line 958 of file object.h.
References ASSERT, and operator*().
Referenced by operator*().
Definition at line 969 of file object.h.
References ASSERT, and operator/().
Referenced by operator/().
Definition at line 980 of file object.h.
References ASSERT, and op_div_ceil().
Referenced by op_div_ceil().
|
inline |
Definition at line 991 of file object.h.
References ASSERT, and op_concat().
Referenced by op_concat().
|
inline |
|
inline |
Definition at line 1002 of file object.h.
References newlang::ConcatData(), and shared().
Referenced by op_concat_().
|
inline |
Definition at line 1007 of file object.h.
References op_concat_().
Definition at line 1011 of file object.h.
References ASSERT, and operator%().
Referenced by operator%().
Definition at line 1022 of file object.h.
References ASSERT, and operator+().
Definition at line 1033 of file object.h.
References ASSERT, and operator+=().
Referenced by operator+=().
Definition at line 634 of file object.cpp.
References ASSERT, at(), newlang::Class, newlang::Dictionary, newlang::Float64, GetValueAsInteger(), GetValueAsNumber(), is_floating(), is_integral(), is_scalar(), is_tensor_type(), LOG_RUNTIME, m_rational, m_string, m_tensor, m_value, m_var, m_var_type_current, newlang::None, push_back(), newlang::Rational, shared(), size(), newlang::StrChar, newlang::StrWide, testResultIntegralType(), toString(), newlang::toString(), toType(), and newlang::typeFromLimit().
Definition at line 1039 of file object.h.
References ASSERT, and operator-().
Definition at line 1050 of file object.h.
References ASSERT, and operator-=().
Referenced by operator-=().
Definition at line 704 of file object.cpp.
References ASSERT, newlang::Class, newlang::Dictionary, end(), find(), newlang::Float64, GetValueAsInteger(), GetValueAsNumber(), is_floating(), is_integral(), is_scalar(), is_tensor_type(), LOG_RUNTIME, m_rational, m_tensor, m_var, m_var_type_current, name(), newlang::None, newlang::Rational, shared(), size(), testResultIntegralType(), toString(), newlang::toString(), toType(), and newlang::typeFromLimit().
|
inline |
Definition at line 1068 of file object.h.
References ASSERT, and operator<().
Referenced by operator<().
|
inline |
Definition at line 1073 of file object.h.
References op_compare().
|
inline |
Definition at line 1081 of file object.h.
References ASSERT, and operator<=().
Referenced by operator<=().
|
inline |
Definition at line 1086 of file object.h.
References op_compare().
|
inline |
Definition at line 1090 of file object.h.
References ASSERT, and operator>().
Referenced by operator>().
|
inline |
Definition at line 1095 of file object.h.
References op_compare().
|
inline |
Definition at line 1099 of file object.h.
References ASSERT, and operator>=().
Referenced by operator>=().
|
inline |
Definition at line 1104 of file object.h.
References op_compare().
int Obj::op_compare | ( | Obj & | value | ) |
Definition at line 1716 of file object.cpp.
References getType(), GetValueAsInteger(), GetValueAsNumber(), GetValueAsRational(), GetValueAsString(), GetValueAsStringWide(), is_complex(), is_floating(), is_rational(), is_scalar(), is_string_type(), LOG_RUNTIME, m_rational, m_string, m_value, m_var_type_current, newlang::Rational::op_compare(), newlang::Rational, newlang::StrChar, newlang::StrWide, and newlang::toString().
Referenced by operator<(), operator<=(), operator>(), and operator>=().
Definition at line 1874 of file object.cpp.
References op_class_test(), and newlang::toString().
Referenced by op_class_test().
bool Obj::op_class_test | ( | const char * | name, |
Context * | ctx ) const |
Definition at line 3809 of file object.cpp.
References ASSERT, newlang::RunTime::BaseTypeFromString(), newlang::isContainsType(), LOG_DEBUG, m_class_name, m_class_parents, m_ctx, newlang::Context::m_runtime, m_var_is_init, m_var_type_current, m_var_type_fixed, name(), newlang::None, newlang::toString(), and newlang::Type.
|
inline |
Definition at line 1125 of file object.h.
References ASSERT, and op_duck_test().
Referenced by op_duck_test().
bool Obj::op_duck_test | ( | Obj * | value, |
bool | strong ) |
Definition at line 1993 of file object.cpp.
References newlang::Class, newlang::Dictionary, newlang::Float64, newlang::Int64, is_function_type(), is_simple_type(), is_string_type(), m_var_type_current, newlang::None, and op_duck_test_prop().
Definition at line 1919 of file object.cpp.
References m_var_type_current, name(), newlang::None, and size().
Referenced by op_duck_test().
|
inline |
Definition at line 1132 of file object.h.
References ASSERT, and op_equal().
Referenced by op_accurate(), and op_equal().
bool Obj::op_equal | ( | Obj & | value | ) |
Definition at line 1770 of file object.cpp.
References at(), getType(), GetValueAsBoolean(), GetValueAsInteger(), GetValueAsNumber(), GetValueAsRational(), GetValueAsString(), is_bool_type(), is_dictionary_type(), is_rational(), is_scalar(), is_string_type(), is_tensor_type(), newlang::isFloatingType(), newlang::isIntegralType(), LOG_RUNTIME, m_rational, m_tensor, m_var_type_current, name(), newlang::Rational::op_equal(), newlang::Rational, size(), newlang::toString(), toTorchType(), and toType().
|
inline |
Definition at line 1142 of file object.h.
References ASSERT, and op_accurate().
Referenced by op_accurate().
bool Obj::op_accurate | ( | Obj & | value | ) |
Definition at line 1826 of file object.cpp.
References is_arithmetic_type(), is_bool_type(), is_dictionary_type(), is_none_type(), is_string_type(), and op_equal().
Definition at line 1148 of file object.h.
References ASSERT, and op_bit_and().
Referenced by op_bit_and().
Definition at line 1949 of file object.cpp.
References ASSERT, getType(), GetValueAsInteger(), GetValueAsNumber(), GetValueAsRational(), is_arithmetic_type(), is_integral(), is_rational(), is_scalar(), is_tensor_type(), LOG_ERROR, LOG_RUNTIME, m_rational, m_string, m_tensor, m_value, m_var, m_var_type_current, newlang::Rational::op_pow_(), newlang::Rational, newlang::repeat(), shared(), newlang::StrChar, newlang::StrWide, and toString().
Definition at line 1193 of file object.h.
References clear_(), op_assign(), and shared().
Referenced by op_assign().
Definition at line 1201 of file object.h.
References clear_(), CloneDataTo(), ClonePropTo(), and shared().
|
inline |
Definition at line 1208 of file object.h.
References clear_(), CloneDataTo(), and ClonePropTo().
Definition at line 1223 of file object.h.
References ASSERT, and operator*=().
Referenced by operator*=().
Definition at line 761 of file object.cpp.
References ASSERT, newlang::Class, newlang::Dict< T, PTR >::clear_(), newlang::Dictionary, newlang::Float64, GetValueAsInteger(), GetValueAsNumber(), GetValueAsString(), is_floating(), is_integral(), is_scalar(), is_string_type(), is_tensor_type(), LOG_RUNTIME, m_rational, m_string, m_tensor, m_value, m_var, m_var_type_current, newlang::None, op_bit_and_set(), newlang::Rational, newlang::repeat(), shared(), newlang::StrChar, newlang::StrWide, testResultIntegralType(), toString(), newlang::toString(), toType(), newlang::typeFromLimit(), and newlang::utf8_decode().
Definition at line 1232 of file object.h.
References ASSERT, and operator/=().
Referenced by operator/=().
Definition at line 835 of file object.cpp.
References ASSERT, newlang::Float64, GetValueAsInteger(), GetValueAsNumber(), is_floating(), is_integral(), is_scalar(), is_tensor_type(), LOG_RUNTIME, m_rational, m_tensor, m_var, m_var_type_current, newlang::Rational, shared(), testResultIntegralType(), toString(), newlang::toString(), toType(), and newlang::typeFromLimit().
Definition at line 1239 of file object.h.
References ASSERT, and op_div_ceil_().
Referenced by op_div_ceil_().
Definition at line 875 of file object.cpp.
References ASSERT, newlang::Float64, GetValueAsInteger(), GetValueAsNumber(), is_floating(), is_integral(), is_scalar(), is_tensor_type(), LOG_RUNTIME, m_rational, m_tensor, m_var, m_var_type_current, newlang::Rational::op_div_ceil_(), newlang::Rational, shared(), toString(), newlang::toString(), toTorchType(), toType(), and newlang::typeFromLimit().
Definition at line 1246 of file object.h.
References ASSERT, and operator%=().
Referenced by operator%=().
Definition at line 930 of file object.cpp.
References ASSERT, GetValueAsInteger(), GetValueAsNumber(), is_floating(), is_integral(), is_scalar(), is_tensor_type(), LOG_RUNTIME, m_rational, m_tensor, m_var, m_var_type_current, newlang::Rational, shared(), testResultIntegralType(), toString(), newlang::toString(), and toType().
Definition at line 1837 of file object.cpp.
References at(), newlang::Class, newlang::Dict< T, PTR >::clear_(), newlang::Dictionary, erase(), exist(), newlang::Int64, is_tensor_type(), LOG_RUNTIME, m_tensor, m_var_type_current, newlang::None, shared(), and size().
Referenced by operator*=().
Definition at line 1256 of file object.h.
References ASSERT, and operator^=().
Referenced by operator^=().
Definition at line 1261 of file object.h.
References LOG_RUNTIME.
Definition at line 1265 of file object.h.
References ASSERT, and operator|=().
Referenced by operator|=().
Definition at line 1270 of file object.h.
References LOG_RUNTIME.
Definition at line 1274 of file object.h.
References ASSERT, and op_lshift_set().
Referenced by op_lshift_set().
Definition at line 1279 of file object.h.
References LOG_RUNTIME.
Definition at line 1283 of file object.h.
References ASSERT, and op_rshift_set().
Referenced by op_rshift_set().
Definition at line 1288 of file object.h.
References LOG_RUNTIME.
Definition at line 1292 of file object.h.
References ASSERT, and op_rrshift_set().
Referenced by op_rrshift_set().
Definition at line 1297 of file object.h.
References LOG_RUNTIME.
|
inline |
Definition at line 1302 of file object.h.
References SetValue_().
Definition at line 757 of file term.cpp.
References ASSERT, GetIndex(), newlang::Dict< Obj >::index(), newlang::INTEGER, LOG_RUNTIME, and newlang::toString().
Referenced by GetIndex().
Definition at line 1310 of file object.h.
References newlang::Dict< Obj >::index().
|
inline |
std::string Obj::toString | ( | bool | deep = true | ) | const |
Definition at line 1049 of file object.cpp.
References ASSERT, at(), newlang::BLOCK, newlang::BLOCK_MINUS, newlang::BLOCK_PLUS, newlang::BLOCK_TRY, newlang::Break, newlang::Class, newlang::Continue, newlang::Dictionary, dump_dict_(), newlang::Ellipsis, empty(), newlang::Enum, newlang::Error, newlang::ErrorParser, newlang::ErrorRunTime, newlang::ErrorSignal, newlang::EVAL_FUNCTION, newlang::FmtChar, newlang::FmtWide, newlang::Function, newlang::Rational::GetAsString(), GetValueAsString(), is_scalar(), is_tensor_type(), newlang::isSimpleType(), newlang::Iterator, newlang::IteratorEnd, LOG_RUNTIME, m_class_name, m_dimensions, m_is_reference, m_prototype, m_rational, m_reference, m_return_obj, m_string, m_tensor, m_value, m_var, m_var_name, m_var_type_current, m_var_type_fixed, newlang::Module, newlang::NativeFunc, newlang::None, newlang::Pointer, newlang::PureFunc, newlang::Range, newlang::Rational, newlang::Reference, result, newlang::RetMinus, newlang::RetPlus, newlang::RetRepeat, size(), newlang::StrChar, newlang::Struct, newlang::StrWide, TensorToString(), newlang::toString(), newlang::Type, newlang::Union, and newlang::utf8_encode().
Referenced by newlang::Context::Call(), newlang::Context::CallNative_(), newlang::CheckSystemField(), ClonePropTo(), newlang::ConcatData(), getSummaryTensorType(), GetValueAsBoolean(), GetValueAsInteger(), GetValueAsNumber(), GetValueAsRational(), GetValueAsString(), index_set_(), IteratorData(), IteratorMake(), IteratorMake(), op_div_ceil_(), op_pow_(), operator%=(), operator*=(), operator+(), operator++(), operator+=(), operator-(), operator--(), operator-=(), operator/=(), operator<<(), toIndex(), and toType_().
std::string Obj::GetValueAsString | ( | ) | const |
Definition at line 1607 of file object.cpp.
References ASSERT, newlang::Bool, newlang::Byte, newlang::Char, newlang::Class, newlang::Complex, newlang::Complex16, newlang::Complex32, newlang::Complex64, newlang::Dictionary, newlang::Double, newlang::DWord, newlang::DWord64, newlang::Error, newlang::EVAL_FUNCTION, newlang::Float16, newlang::Float32, newlang::Float64, newlang::FmtChar, newlang::FmtWide, newlang::Function, newlang::Rational::GetAsString(), GetValueAsInteger(), GetValueAsNumber(), newlang::Int16, newlang::Int32, newlang::Int64, newlang::Int8, newlang::Integer, is_floating(), is_integral(), is_scalar(), newlang::Iterator, newlang::IteratorEnd, LOG_RUNTIME, m_class_name, m_rational, m_string, m_tensor, m_value, m_var, m_var_is_init, m_var_name, m_var_type_current, m_var_type_fixed, newlang::NativeFunc, newlang::None, newlang::Number, newlang::Pointer, newlang::PureFunc, newlang::Range, newlang::Rational, result, newlang::Single, newlang::StrChar, newlang::StrWide, newlang::Tensor, TensorToString(), toString(), newlang::toString(), newlang::trim(), newlang::utf8_encode(), and newlang::Word.
Referenced by newlang::Context::Call(), newlang::ConcatData(), ConstructorEnum_(), GetValueAsStringWide(), IteratorMake(), op_compare(), op_equal(), operator std::string(), operator uint64_t(), operator*=(), newlang::Context::StringFormat(), and toString().
|
inline |
Definition at line 1355 of file object.h.
References GetValueAsString(), and newlang::utf8_decode().
Referenced by newlang::ConcatData(), op_compare(), and operator std::wstring().
|
inline |
Definition at line 1359 of file object.h.
References ASSERT, newlang::Rational::clone(), GetValueAsInteger(), is_floating(), is_integral(), LOG_RUNTIME, m_rational, m_var_type_current, newlang::Rational, TEST_INIT_, and toString().
Referenced by op_compare(), op_equal(), op_pow_(), and operator Rational().
int64_t Obj::GetValueAsInteger | ( | ) | const |
Definition at line 1454 of file object.cpp.
References ASSERT, newlang::Bool, newlang::Byte, newlang::Char, newlang::Double, newlang::DWord, newlang::DWord64, newlang::Float16, newlang::Float32, newlang::Float64, newlang::FmtChar, newlang::FmtWide, newlang::Rational::GetAsInteger(), GetValueAsNumber(), newlang::Int16, newlang::Int32, newlang::Int64, newlang::Int8, newlang::Integer, is_scalar(), newlang::Iterator, LOG_RUNTIME, m_iterator, m_rational, m_string, m_value, m_var, m_var_type_current, m_var_type_fixed, newlang::Number, newlang::Pointer, newlang::Rational, newlang::Single, newlang::StrChar, newlang::StrWide, TEST_INIT_, toString(), and newlang::Word.
Referenced by ConstructorEnum_(), GetGenericValueRef(), getTypeAsLimit(), GetValueAsBoolean(), GetValueAsNumber(), GetValueAsRational(), GetValueAsString(), op_compare(), op_div_ceil_(), op_equal(), op_pow_(), operator int64_t(), operator uint64_t(), operator%=(), operator*=(), operator+=(), operator-(), operator-=(), operator/=(), newlang::Context::StringFormat(), testResultIntegralType(), toIndex(), toSlice(), and toType_().
double Obj::GetValueAsNumber | ( | ) | const |
Definition at line 1558 of file object.cpp.
References ASSERT, newlang::Double, newlang::Float16, newlang::Float32, newlang::Float64, newlang::Rational::GetAsNumber(), GetValueAsInteger(), is_scalar(), is_simple_type(), is_string_type(), newlang::Iterator, LOG_RUNTIME, m_iterator, m_rational, m_var, m_var_type_current, newlang::Number, newlang::Rational, newlang::Single, TEST_INIT_, and toString().
Referenced by GetGenericValueRef(), getTypeAsLimit(), GetValueAsInteger(), GetValueAsString(), op_compare(), op_div_ceil_(), op_equal(), op_pow_(), operator%=(), operator*=(), operator+=(), operator-(), operator-=(), operator/=(), newlang::Context::StringFormat(), and toType_().
bool Obj::GetValueAsBoolean | ( | ) | const |
Definition at line 1394 of file object.cpp.
References ASSERT, newlang::Class, newlang::Dictionary, newlang::Rational::GetAsBoolean(), GetValueAsInteger(), is_scalar(), newlang::isSimpleType(), newlang::Iterator, newlang::IteratorEnd, LOG_RUNTIME, m_class_parents, m_iterator, m_rational, m_string, m_tensor, m_value, m_var, m_var_type_current, newlang::None, newlang::Pointer, newlang::Range, newlang::Rational, size(), newlang::StrChar, newlang::StrWide, TEST_INIT_, and toString().
Referenced by ConstructorSimpleType_(), op_equal(), operator bool(), and toIndex().
|
inlinestatic |
Definition at line 1376 of file object.h.
References is_init().
Referenced by newlang::Context::Call(), CreateBool(), CreateClass(), CreateClass(), CreateDict(), CreateDict(), CreateDict(), CreateEmpty(), CreateFromGenericValue(), newlang::RunTime::CreateFunction(), newlang::RunTime::CreateFunction(), newlang::RunTime::CreateNative(), CreateNone(), CreatePointer(), CreateRange(), CreateRange(), CreateRational(), CreateRational(), CreateString(), CreateString(), CreateTensor(), CreateValue(), newlang::Context::EvalInterrupt_(), IteratorMake(), IteratorMake(), No(), newlang::Context::StringPrintf(), and Yes().
Definition at line 1437 of file object.h.
References CreateType(), and newlang::Rational.
Referenced by newlang::Context::EvalTerm(), newlang::Variable::GetValueAsObject(), and newlang::Variable::Object().
|
inlinestatic |
Definition at line 1443 of file object.h.
References CreateType(), LOG_RUNTIME, and newlang::Rational.
Definition at line 2577 of file object.cpp.
References newlang::Append, ASSERT, newlang::Class, Clone(), ConstructorClass_(), ConstructorDictionary_(), ConstructorEnum_(), ConstructorNative_(), ConstructorSimpleType_(), ConstructorStruct_(), CreateString(), newlang::Dictionary, empty(), newlang::Enum, getType(), newlang::isArithmeticType(), LOG_RUNTIME, m_var_type_fixed, newlang::Pointer, result, size(), newlang::StrChar, newlang::Struct, newlang::StrWide, newlang::toString(), newlang::Type, and newlang::Union.
Referenced by CreateBaseType().
Definition at line 2634 of file object.cpp.
References newlang::Append, ASSERT, newlang::Bool, Clone(), convert(), newlang::Dictionary, newlang::Ellipsis, empty(), getType(), GetValueAsBoolean(), newlang::isContainsType(), newlang::isDictionary(), newlang::isGenericType(), newlang::isString(), newlang::isTensor(), LOG_RUNTIME, m_dimensions, m_var_type_fixed, result, size(), toIndex(), newlang::toString(), toType(), and newlang::Type.
Referenced by BaseTypeConstructor().
Definition at line 2828 of file object.cpp.
References ASSERT, CreateDict(), empty(), getType(), name(), result, size(), and newlang::Type.
Referenced by BaseTypeConstructor().
Definition at line 2842 of file object.cpp.
References LOG_RUNTIME.
Referenced by BaseTypeConstructor().
Definition at line 2854 of file object.cpp.
References CreateClass().
Definition at line 2869 of file object.cpp.
References ASSERT.
Referenced by BaseTypeConstructor(), and ConstructorStruct_().
Definition at line 2914 of file object.cpp.
References ConstructorClass_(), newlang::isGenericType(), newlang::isSimpleType(), LOG_RUNTIME, result, newlang::Struct, and newlang::toString().
Referenced by BaseTypeConstructor().
Definition at line 2938 of file object.cpp.
References CreateDict(), CreateValue(), newlang::Enum, GetValueAsInteger(), GetValueAsString(), is_integral(), is_none_type(), is_string_type(), LOG_RUNTIME, name(), newlang::None, result, and size().
Referenced by BaseTypeConstructor().
Definition at line 2554 of file object.cpp.
References BaseTypeConstructor(), newlang::NormalizeName(), result, newlang::toString(), and newlang::Type.
Referenced by newlang::Context::CallNative_(), and newlang::RunTime::RegisterBuildinType().
|
inline |
Definition at line 1510 of file object.h.
References CreateType(), and newlang::None.
Referenced by newlang::runtime::Base::__assert_abort__(), newlang::runtime::Base::__thread_get_id__(), newlang::runtime::Base::__thread_join__(), newlang::runtime::Base::__thread_start__(), Arg(), newlang::Context::CallNative_(), Clone(), CloneTo(), Copy(), CreateFromGenericValue(), newlang::Context::Eval(), newlang::Context::EvalCreateAsEllipsis_(), newlang::Context::EvalFollow_(), newlang::Context::EvalInterrupt_(), newlang::Context::EvalTerm(), newlang::RunTime::GetTypeFromString(), newlang::Variable::GetValueAsObject(), resize_(), and newlang::JIT::Run().
Definition at line 1514 of file object.h.
References CreateType(), and newlang::None.
|
inlinestatic |
Definition at line 1518 of file object.h.
References CreateType(), and newlang::Pointer.
Referenced by CreateNil().
Definition at line 1524 of file object.h.
References CreatePointer().
Referenced by ArgNull(), and newlang::Context::StringPrintf().
Definition at line 1528 of file object.h.
References newlang::Bool, CreateType(), newlang::None, and result.
Referenced by newlang::runtime::Base::__thread_joinable__(), and newlang::Context::EvalOpCompare_().
|
inlinestatic |
Definition at line 1536 of file object.h.
References CreateType(), CreateValue(), newlang::Dictionary, newlang::None, newlang::Range, and step().
|
inlinestatic |
Definition at line 1546 of file object.h.
References CreateType(), CreateValue(), newlang::Dictionary, newlang::None, and newlang::Range.
|
inlinestatic |
Definition at line 1562 of file object.h.
References CreateString().
Referenced by newlang::runtime::Base::__len__(), newlang::runtime::Base::__thread_hardware_concurrency__(), newlang::runtime::Base::__thread_this_id__(), newlang::runtime::Base::__timeit__(), Arg(), newlang::Context::Call(), newlang::Context::Call(), newlang::Context::CallNative_(), newlang::CheckSystemField(), ConstructorEnum_(), CreateFromGenericValue(), newlang::Context::CreateRange(), CreateRange(), CreateRange(), CreateTensor(), newlang::Context::EvalTerm(), newlang::runtime::System::getmillisec(), newlang::runtime::System::getsysinfo(), newlang::runtime::System::gettimeofday(), newlang::Variable::GetValueAsObject(), newlang::Variable::Object(), operator()(), newlang::Context::StringPrintf(), and toType_().
|
inlinestatic |
Definition at line 1568 of file object.h.
References CreateString().
|
inlinestatic |
Definition at line 1574 of file object.h.
References newlang::canCast(), CreateType(), NL_CHECK, newlang::None, result, newlang::toString(), and newlang::typeFromLimit().
|
inlinestatic |
Definition at line 1586 of file object.h.
References newlang::canCast(), CreateType(), NL_CHECK, newlang::None, result, newlang::toString(), and newlang::typeFromLimit().
|
inlinestatic |
Definition at line 1596 of file object.h.
References CreateType(), result, newlang::StrChar, and newlang::String.
Referenced by newlang::runtime::Base::__timeit__(), Arg(), at(), at(), BaseTypeConstructor(), newlang::Context::Call(), newlang::Context::CallNative_(), newlang::CheckSystemField(), CreateFromGenericValue(), CreateValue(), newlang::Context::EvalEval_(), newlang::Context::EvalTerm(), newlang::runtime::System::getcwd(), newlang::runtime::System::getenv(), newlang::runtime::System::getenviron(), newlang::runtime::System::getlogin(), newlang::runtime::System::getname(), newlang::runtime::System::getuname(), newlang::Variable::GetValueAsObject(), index_get(), newlang::RunTime::MakeObjArgs(), newlang::Variable::Object(), newlang::NLC::Run(), newlang::Context::StringPrintf(), and newlang::runtime::System::system().
|
inlinestatic |
Definition at line 1602 of file object.h.
References CreateType(), result, newlang::String, and newlang::StrWide.
Definition at line 1609 of file object.h.
References newlang::Bool, CreateType(), and result.
Definition at line 1615 of file object.h.
References newlang::Bool, CreateType(), and result.
Definition at line 1625 of file object.h.
References CreateType(), and newlang::Dictionary.
Referenced by newlang::Context::Call(), newlang::Context::Call(), newlang::CheckSystemField(), ConstructorDictionary_(), ConstructorEnum_(), newlang::Context::CreateArgs_(), newlang::Context::CreateRange(), newlang::Context::EvalIterator_(), newlang::runtime::System::getenviron(), newlang::runtime::System::getsysinfo(), newlang::runtime::System::gettimeofday(), newlang::runtime::System::getuname(), newlang::RunTime::MakeObjArgs(), operator()(), newlang::NLC::Run(), and newlang::Context::StringPrintf().
|
inlinestatic |
Definition at line 1631 of file object.h.
References CreateType(), newlang::Dictionary, and result.
|
inlinestatic |
Definition at line 1642 of file object.h.
References CreateType(), newlang::Dictionary, newlang::None, and result.
|
inlinestatic |
Definition at line 1657 of file object.h.
References newlang::Class, CreateType(), name(), and result.
Referenced by ConstructorStub_().
|
inlinestatic |
Definition at line 1667 of file object.h.
References newlang::Class, CreateType(), name(), and result.
|
inline |
Definition at line 1682 of file object.h.
References CloneDataTo(), ClonePropTo(), and CreateNone().
|
inline |
Definition at line 1689 of file object.h.
References newlang::clone(), CloneDataTo(), ClonePropTo(), and CreateNone().
Referenced by BaseTypeConstructor(), newlang::Context::Call(), ConstructorSimpleType_(), index_set(), op_bit_and(), op_concat(), op_div_ceil(), op_pow(), operator%(), operator*(), operator+(), operator++(), operator-(), operator--(), operator/(), and toType().
|
inline |
Definition at line 1700 of file object.h.
References newlang::clone(), CloneDataTo(), and ClonePropTo().
|
inline |
Definition at line 1710 of file object.h.
References newlang::clone(), CloneDataTo(), ClonePropTo(), and CreateNone().
void Obj::CloneDataTo | ( | Obj & | clone | ) | const |
Definition at line 980 of file object.cpp.
References ASSERT, newlang::clone(), newlang::Rational::clone(), newlang::isLocalType(), m_class_name, m_class_parents, m_ctx, m_dimensions, m_is_const, m_iter_range_value, m_iterator, m_prototype, m_rational, m_reference, m_return_obj, m_sequence, m_string, m_sync, m_tensor, m_value, m_var, m_var_is_init, m_var_name, m_var_type_current, m_var_type_fixed, and NL_CHECK.
Referenced by Clone(), CloneTo(), CloneTo(), Copy(), op_assign(), and operator=().
void Obj::ClonePropTo | ( | Obj & | clone | ) | const |
Definition at line 1028 of file object.cpp.
References newlang::clone(), newlang::isLocalType(), LOG_RUNTIME, m_var_type_current, name(), NL_CHECK, and toString().
Referenced by Clone(), CloneTo(), CloneTo(), Copy(), op_assign(), and operator=().
Definition at line 1725 of file object.h.
References Clone(), and newlang::clone().
Referenced by newlang::ConcatData(), ConstructorSimpleType_(), op_div_ceil_(), op_equal(), operator%=(), operator*=(), operator+=(), operator-=(), operator/=(), and newlang::Context::StringPrintf().
void Obj::toType_ | ( | ObjType | type | ) |
Definition at line 2260 of file object.cpp.
References newlang::Any, ASSERT, at(), newlang::Dict< T, PTR >::clear_(), clear_(), ConvertStringToTensor(), ConvertTensorToDict(), ConvertTensorToString(), CreateValue(), newlang::Dictionary, fromTorchType(), getSummaryTensorType(), GetValueAsInteger(), GetValueAsNumber(), newlang::Int16, newlang::Int32, newlang::Int8, is_dictionary_type(), is_floating(), is_integral(), is_none_type(), is_range(), is_scalar(), is_string_char_type(), is_string_wide_type(), is_tensor_type(), newlang::isContainsType(), newlang::isDictionary(), newlang::isFloatingType(), newlang::isGenericType(), newlang::isIntegralType(), newlang::isString(), newlang::isStringChar(), newlang::isStringWide(), newlang::isTensor(), IteratorMake(), LOG_ERROR, LOG_RUNTIME, m_rational, m_string, m_tensor, m_value, m_var, m_var_type_current, m_var_type_fixed, newlang::None, newlang::Pointer, newlang::Dict< T, PTR >::push_back(), push_back(), newlang::Rational, size(), toString(), newlang::toString(), toTorchType(), toType_(), and newlang::Type.
Referenced by toType_().
Definition at line 411 of file object.cpp.
References ASSERT, newlang::Dict< T, PTR >::at(), CreateString(), CreateTensor(), newlang::FmtChar, newlang::FmtWide, newlang::Dict< Obj >::index(), IndexToString(), is_scalar(), is_tensor_type(), LOG_RUNTIME, m_string, m_tensor, m_value, m_var_type_current, newlang::StrChar, newlang::StrWide, and newlang::utf8_encode().
|
inline |
Definition at line 1750 of file object.h.
References Clone(), newlang::Dict< Obj >::index(), and result.
Definition at line 450 of file object.cpp.
References ASSERT, at(), fromTorchType(), newlang::Dict< Obj >::index(), IndexToString(), is_dictionary_type(), is_scalar(), is_tensor_type(), LOG_RUNTIME, m_string, m_tensor, m_value, m_var_is_init, m_var_type_current, shared(), newlang::StrChar, newlang::StrWide, and toString().
Definition at line 1758 of file object.h.
References newlang::Dict< Obj >::index(), and op_set_index().
Referenced by op_set_index().
ObjPtr Obj::op_set_index | ( | int64_t | index, |
std::string | value ) |
Definition at line 512 of file object.cpp.
References at(), newlang::Dict< Obj >::index(), LOG_RUNTIME, m_string, m_value, m_var_is_init, m_var_type_current, newlang::Dict< T, PTR >::operator[](), shared(), newlang::StrChar, newlang::StrWide, and newlang::utf8_decode().
|
inline |
Definition at line 1766 of file object.h.
References SetValue_().
Referenced by operator-(), operator=(), SetValue_(), SetValue_(), and SetValue_().
|
inline |
Definition at line 1773 of file object.h.
References ASSERT, newlang::Class, clear_(), m_var, m_var_is_init, m_var_type_current, TEST_CONST_, and newlang::typeFromLimit().
|
inline |
Definition at line 1785 of file object.h.
References ASSERT, newlang::Class, clear_(), m_var, m_var_is_init, m_var_type_current, TEST_CONST_, and newlang::typeFromLimit().
|
inline |
Definition at line 1797 of file object.h.
References SetValue_().
|
inline |
Definition at line 1805 of file object.h.
References SetValue_().
|
inline |
Definition at line 1811 of file object.h.
References m_value, m_var_is_init, m_var_type_current, newlang::StrChar, TEST_CONST_, and testConvertType().
|
inline |
Definition at line 1822 of file object.h.
References m_string, m_var_is_init, m_var_type_current, newlang::StrWide, TEST_CONST_, and testConvertType().
|
inline |
Definition at line 1833 of file object.h.
References newlang::canCast(), LOG_RUNTIME, m_var_type_fixed, newlang::None, and newlang::toString().
Referenced by SetValue_(), SetValue_(), SetValue_(), and testResultIntegralType().
void Obj::testResultIntegralType | ( | ObjType | type, |
bool | upscalint ) |
Definition at line 3399 of file object.cpp.
References ASSERT, newlang::canCast(), GetValueAsInteger(), newlang::Int64, is_floating(), is_integral(), is_scalar(), newlang::isFloatingType(), newlang::isIntegralType(), LOG_WARNING, m_tensor, m_var, m_var_type_current, m_var_type_fixed, newlang::None, testConvertType(), newlang::toString(), and toTorchType().
Referenced by operator%=(), operator*=(), operator+=(), operator-=(), and operator/=().
void Obj::SetValue_ | ( | ObjPtr | value | ) |
Definition at line 3536 of file object.cpp.
References ASSERT, newlang::Bool, newlang::Byte, newlang::canCast(), newlang::Char, clear_(), newlang::Double, newlang::DWord, newlang::DWord64, newlang::EVAL_FUNCTION, newlang::Float32, newlang::Float64, newlang::FmtChar, newlang::FmtWide, newlang::Function, newlang::Int16, newlang::Int32, newlang::Int64, newlang::Int8, is_class_type(), is_dictionary_type(), is_floating(), is_none_type(), is_scalar(), is_string_type(), is_tensor_type(), newlang::isClass(), newlang::Iterator, LOG_RUNTIME, m_class_name, m_rational, m_sequence, m_tensor, m_var, m_var_is_init, m_var_name, m_var_type_current, newlang::NativeFunc, newlang::None, newlang::Pointer, newlang::Rational, newlang::Rational::set_(), SetValue_(), newlang::Single, newlang::StrChar, newlang::StrWide, TEST_CONST_, testConvertType(), newlang::toString(), and newlang::Word.
bool newlang::Obj::CallAll | ( | const char * | func_name, |
ObjPtr & | arg_in, | ||
ObjPtr & | result, | ||
ObjPtr | object = nullptr, | ||
size_t | limit = 0 ) |
|
inline |
Definition at line 1851 of file object.h.
References m_prototype.
|
inline |
ObjType newlang::Obj::m_var_type_current |
Текущий тип значения объекта
Definition at line 1864 of file object.h.
Referenced by at(), at(), at_index(), at_index_const(), begin(), begin(), newlang::Context::CallNative_(), newlang::CheckSystemField(), clear_(), CloneDataTo(), ClonePropTo(), newlang::ConcatData(), ConvertTensorToDict(), empty(), end(), end(), erase(), erase(), find(), GetGenericValueRef(), getSummaryTensorType(), getType(), getTypeAsLimit(), GetValueAsBoolean(), GetValueAsInteger(), GetValueAsNumber(), GetValueAsRational(), GetValueAsString(), index_get(), index_set_(), insert(), is_any_size(), is_arithmetic_type(), is_block(), is_bool_type(), is_class_type(), is_complex(), is_dictionary_type(), is_ellipsis(), is_error(), is_floating(), is_function_type(), is_indexing(), is_integer(), is_integral(), is_native(), is_none_type(), is_plain_type(), is_range(), is_rational(), is_return(), is_simple_type(), is_string_char_type(), is_string_type(), is_string_wide_type(), is_tensor_type(), is_type_name(), IteratorData(), IteratorMake(), IteratorMake(), IteratorNext(), IteratorReset(), op_bit_and_set(), op_class_test(), op_compare(), op_div_ceil_(), op_duck_test(), op_duck_test_prop(), op_equal(), op_pow_(), op_set_index(), operator%=(), operator*=(), operator+=(), operator-(), operator-=(), operator/=(), operator[](), operator[](), push_back(), push_back(), resize(), resize_(), SetValue_(), SetValue_(), SetValue_(), SetValue_(), size(), newlang::Context::StringPrintf(), testResultIntegralType(), toIndex(), toString(), and toType_().
ObjType newlang::Obj::m_var_type_fixed |
Максимальный размер для арифметических типов, который задается разработчиком
Definition at line 1865 of file object.h.
Referenced by BaseTypeConstructor(), newlang::CheckSystemField(), CloneDataTo(), ConstructorSimpleType_(), getSummaryTensorType(), getTypeAsLimit(), GetValueAsInteger(), GetValueAsString(), is_defined_type(), is_error(), is_indexing(), Obj(), op_class_test(), testConvertType(), testResultIntegralType(), toString(), and toType_().
bool newlang::Obj::m_var_is_init |
Содержит ли объект корректное значение ???
Definition at line 1866 of file object.h.
Referenced by clear_(), CloneDataTo(), newlang::ConcatData(), ConvertTensorToDict(), empty(), GetValueAsString(), index_set_(), is_init(), Obj(), op_class_test(), op_set_index(), SetValue_(), SetValue_(), SetValue_(), and SetValue_().
std::string newlang::Obj::m_var_name |
Имя переменной, в которой хранится объект
Definition at line 1870 of file object.h.
Referenced by newlang::CheckSystemField(), CloneDataTo(), getName(), getName(), GetValueAsString(), SetValue_(), and toString().
std::string newlang::Obj::m_class_name |
Имя класса объекта (у базовых типов отсуствует)
Definition at line 1871 of file object.h.
Referenced by newlang::CheckSystemField(), CloneDataTo(), GetValueAsString(), op_class_test(), SetClassName(), SetValue_(), and toString().
std::vector<ObjPtr> newlang::Obj::m_class_parents |
Родительские классы (типы)
Definition at line 1872 of file object.h.
Referenced by newlang::CheckSystemField(), clear_(), CloneDataTo(), GetValueAsBoolean(), and op_class_test().
const TermPtr newlang::Obj::m_prototype |
Описание прототипа функции (или данных)
Definition at line 1874 of file object.h.
Referenced by newlang::Context::Call(), newlang::Context::CallNative_(), CloneDataTo(), Proto(), and toString().
Context* newlang::Obj::m_ctx |
Definition at line 1876 of file object.h.
Referenced by CloneDataTo(), Obj(), op_call(), and op_class_test().
ObjPtr newlang::Obj::m_dimensions |
Размерности для ObjType::Type.
Definition at line 1878 of file object.h.
Referenced by newlang::Context::Call(), CloneDataTo(), ConstructorSimpleType_(), Obj(), and toString().
|
mutable |
std::variant< std::monostate, int64_t, double, void *, bool *, int8_t *, int16_t *, int32_t *, int64_t *, float *, double *, NativeData, std::string, TermPtr, Iterator < Obj> > newlang::Obj::m_var |
Definition at line 1897 of file object.h.
Referenced by newlang::Context::Call(), newlang::Context::CallNative_(), clear_(), CloneDataTo(), GetGenericValueRef(), GetValueAsBoolean(), GetValueAsInteger(), GetValueAsNumber(), GetValueAsString(), Obj(), op_div_ceil_(), op_pow_(), operator void *(), operator%=(), operator*=(), operator+=(), operator-=(), operator/=(), SetValue_(), SetValue_(), testResultIntegralType(), toString(), and toType_().
std::string newlang::Obj::m_value |
Содержит байтовую строку или байтовый массив с данными для представления в нативном виде (Struct, Unuion, Enum)
Definition at line 1905 of file object.h.
Referenced by at(), at(), clear_(), CloneDataTo(), newlang::ConcatData(), empty(), GetGenericValueRef(), GetValueAsBoolean(), GetValueAsInteger(), GetValueAsString(), newlang::Context::HasReThrow(), index_get(), index_set_(), op_compare(), op_pow_(), op_set_index(), operator*=(), operator+=(), resize_(), SetValue_(), size(), toString(), and toType_().
std::wstring newlang::Obj::m_string |
Содержит строку широких символов
Definition at line 1906 of file object.h.
Referenced by at(), at(), clear_(), CloneDataTo(), newlang::ConcatData(), empty(), GetGenericValueRef(), GetValueAsBoolean(), GetValueAsInteger(), GetValueAsString(), index_get(), index_set_(), op_compare(), op_pow_(), op_set_index(), operator*=(), operator+=(), resize_(), SetValue_(), size(), toString(), and toType_().
std::shared_ptr<torch::Tensor> newlang::Obj::m_tensor |
Содержит только размерные тензоры (скляры хранятся в поле m_pointer и не создают m_tensor->defined())
Definition at line 1907 of file object.h.
Referenced by at(), at(), clear_(), CloneDataTo(), newlang::ConcatData(), empty(), erase(), GetValueAsBoolean(), GetValueAsString(), index_get(), index_set_(), is_scalar(), Obj(), op_bit_and_set(), op_div_ceil_(), op_equal(), op_pow_(), operator%=(), operator*=(), operator++(), operator+=(), operator--(), operator-=(), operator/=(), resize_(), SetValue_(), size(), testResultIntegralType(), toIndex(), toString(), and toType_().
Rational newlang::Obj::m_rational |
Содержит дробь из длинных чисел
Definition at line 1908 of file object.h.
Referenced by clear_(), CloneDataTo(), GetValueAsBoolean(), GetValueAsInteger(), GetValueAsNumber(), GetValueAsRational(), GetValueAsString(), op_compare(), op_div_ceil_(), op_equal(), op_pow_(), operator%=(), operator*=(), operator+=(), operator-=(), operator/=(), SetValue_(), toString(), and toType_().
Итератор для данных
Definition at line 1909 of file object.h.
Referenced by CloneDataTo(), GetValueAsBoolean(), GetValueAsInteger(), GetValueAsNumber(), IteratorData(), IteratorNext(), and IteratorReset().
|
mutable |
Definition at line 1910 of file object.h.
Referenced by CloneDataTo().
TermPtr newlang::Obj::m_sequence |
Последовательно распарсенных команд для выполнения
Definition at line 1911 of file object.h.
Referenced by newlang::Context::Call(), CloneDataTo(), and SetValue_().
ObjPtr newlang::Obj::m_return_obj |
Definition at line 1912 of file object.h.
Referenced by CloneDataTo(), newlang::Context::EvalTryBlock_(), newlang::IntAny::IntAny(), and toString().
ObjWeak newlang::Obj::m_reference |
Definition at line 1914 of file object.h.
Referenced by CloneDataTo(), and toString().
Sync* newlang::Obj::m_sync |
Definition at line 1915 of file object.h.
Referenced by CloneDataTo(), and Obj().
bool newlang::Obj::m_is_const |
Definition at line 1925 of file object.h.
Referenced by CloneDataTo(), is_const(), MakeConst(), MakeMutable(), and Obj().
bool newlang::Obj::m_is_reference |
Definition at line 1926 of file object.h.
Referenced by Obj(), and toString().