Home
last modified time | relevance | path

Searched full:int (Results 1 – 25 of 1148) sorted by relevance

12345678910>>...46

/arkcompiler/ets_runtime/ecmascript/
Dtagged_list.h29 static const int NUMBER_OF_NODE_INDEX = 0;
30 static const int NUMBER_OF_DELETED_NODES_INDEX = 1;
31 static const int HEAD_TABLE_INDEX = 2;
32 static const int TAIL_TABLE_INDEX = 3;
33 static const int ELEMENTS_START_INDEX = 4;
34 static const int DEFAULT_ARRAY_LENGHT = 10;
35 static const int NEXT_PTR_OFFSET = 1;
36 static const int PREV_PTR_OFFSET = 2;
38 … static JSHandle<Derived> Create(const JSThread *thread, int numberOfNodes = DEFAULT_ARRAY_LENGHT);
41 … const JSHandle<JSTaggedValue> &value, const int index, int prevDataIndex);
[all …]
Dtagged_dictionary.h28 inline static int GetKeyIndex(int entry) in GetKeyIndex()
32 inline static int GetValueIndex(int entry) in GetValueIndex()
36 inline static int GetEntryIndex(int entry) in GetEntryIndex()
40 inline static int GetEntrySize() in GetEntrySize()
44 static int Hash(const JSTaggedValue &key);
47 int numberOfElements = OrderHashTableT::DEFAULT_ELEMENTS_NUMBER);
49 PropertyAttributes GetAttributes(int entry) const;
50 void SetAttributes(const JSThread *thread, int entry, const PropertyAttributes &metaData);
51 …void SetEntry(const JSThread *thread, int entry, const JSTaggedValue &key, const JSTaggedValue &va…
53 void UpdateValueAndAttributes(const JSThread *thread, int entry, const JSTaggedValue &value,
[all …]
Dlinked_hash_table.h28 static int Hash(JSTaggedValue key);
41 static const int MIN_CAPACITY = 4;
42 static const int NUMBER_OF_ELEMENTS_INDEX = 0;
43 static const int NUMBER_OF_DELETED_ELEMENTS_INDEX = 1;
44 static const int CAPACITY_INDEX = 2;
45 static const int NEXT_TABLE_INDEX = 3;
46 static const int ELEMENTS_START_INDEX = 4;
48 static const int MIN_SHRINK_CAPACITY = 16;
50 static JSHandle<Derived> Create(const JSThread *thread, int numberOfElements);
59 int numberOfAddedElements = 1);
[all …]
Djs_date.h26 static constexpr std::array<int, 2> APPROXIMATION_NUMBER = {100000, 3652425};
29 static constexpr int CHINA_BEFORE_1901_ADDMS = 343000;
30 static constexpr int MS_PER_SECOND = 1000;
31 static constexpr int SEC_PER_MINUTE = 60;
32 static constexpr int SEC_PER_HOUR = 3600;
33 static constexpr int MIN_PER_HOUR = 60;
34 static constexpr int MS_PER_HOUR = 3600 * 1000;
35 static constexpr int MS_PER_DAY = 86400000;
36 static constexpr int DAY_PER_WEEK = 7;
37 static constexpr int DATE_LENGTH = 9;
[all …]
Dtagged_tree.h38 static constexpr int MIN_CAPACITY = 7;
39 static constexpr int NUMBER_OF_ELEMENTS_INDEX = 0;
40 static constexpr int NUMBER_OF_HOLE_ENTRIES_INDEX = 1;
41 static constexpr int CAPACITY_INDEX = 2;
42 static constexpr int ROOT_INDEX = 3;
43 static constexpr int COMPARE_FUNCTION_INDEX = 4;
44 static constexpr int ELEMENTS_START_INDEX = 5;
45 static constexpr int MIN_SHRINK_CAPACITY = 15;
47 static JSHandle<Derived> Create(const JSThread *thread, int numberOfElements);
54 inline static int ComputeCapacity(int oldCapacity) in ComputeCapacity()
[all …]
Dtagged_list.cpp32 JSHandle<Derived> TaggedList<Derived>::Create(const JSThread *thread, int numberOfNodes) in Create()
36 int length = ELEMENTS_START_INDEX + Derived::ENTRY_SIZE + numberOfNodes * Derived::ENTRY_SIZE; in Create()
52 int capacity = GetCapacityFromTaggedArray(); in CopyArray()
54 for (int i = 0; i < capacity; i++) { in CopyArray()
64 int actualNodeNum = taggedList->NumberOfNodes(); in GrowCapacity()
65 int deleteNodeNum = taggedList->NumberOfDeletedNodes(); in GrowCapacity()
66 int needCapacity = actualNodeNum + 1; in GrowCapacity()
67 int taggedArrayLength = taggedList->GetCapacityFromTaggedArray(); in GrowCapacity()
68int actualArrayCapacity = (taggedArrayLength - ELEMENTS_START_INDEX - (deleteNodeNum + 1) * Derive… in GrowCapacity()
81 … const JSHandle<JSTaggedValue> &value, const int index, int prevDataIndex) in AddNode()
[all …]
Dtagged_hash_table.h28 inline int EntriesCount() const in EntriesCount()
33 inline int HoleEntriesCount() const in HoleEntriesCount()
38 inline int Size() const in Size()
48 inline void IncreaseHoleEntriesCount(const JSThread *thread, int number = 1)
54 inline static int ComputeHashTableSize(uint32_t atLeastSize) in ComputeHashTableSize()
58 int newSize = static_cast<int>(helpers::math::GetPowerOfTwoValue32(rawSize)); in ComputeHashTableSize()
63 int numOfAddedElements = 1)
67 int freeSize = table->Size() - table->EntriesCount() - numOfAddedElements;
69 int copyLength = Derived::GetEntryIndex(table->Size());
77int newSize = Derived::ComputeCompactSize(table, ComputeHashTableSize(table->Size() + numOfAddedEl…
[all …]
Ddate_parse.h24 static bool ParseDateString(const char *str, int length, int *time);
27 static bool IsBetween(int n, int lower, int hign) in IsBetween()
36 explicit StringReader(const char *str, int length) : data_(str), length_(length) in StringReader()
47 int GetIndex() const in GetIndex()
52 int ReadNumber(int *len) in ReadNumber()
54 int index = 0; in ReadNumber()
55 int num = 0; in ReadNumber()
57 // 9 : max decimal of int in ReadNumber()
68 int ReadAlphabet(char *word, int size) in ReadAlphabet()
70 int length = 0; in ReadAlphabet()
[all …]
Dlayout_info.h31 static constexpr int MIN_PROPERTIES_LENGTH = JSObject::MIN_PROPERTIES_LENGTH;
32 static constexpr int MAX_PROPERTIES_LENGTH = PropertyAttributes::MAX_CAPACITY_OF_PROPERTIES;
42 int GetPropertiesCapacity() const;
43 int NumberOfElements() const;
44 void SetNumberOfElements(const JSThread *thread, int properties);
45 uint32_t GetKeyIndex(int index) const;
46 uint32_t GetAttrIndex(int index) const;
47 …void SetPropertyInit(const JSThread *thread, int index, const JSTaggedValue &key, const PropertyAt…
48 void SetKey(const JSThread *thread, int index, const JSTaggedValue &key);
49 void SetNormalAttr(const JSThread *thread, int index, const PropertyAttributes &attr);
[all …]
Dglobal_dictionary.h33 inline static int GetKeyIndex(int entry) in GetKeyIndex()
37 inline static int GetValueIndex(int entry) in GetValueIndex()
41 inline static int GetEntryIndex(int entry) in GetEntryIndex()
45 inline static int GetEntrySize() in GetEntrySize()
51 static inline int Hash(const JSTaggedValue &key);
52 …id InvalidatePropertyBox(JSThread *thread, const JSHandle<GlobalDictionary> &dictHandle, int entry,
56int entry, const JSHandle<JSTaggedValue> &oldValue);
58 inline PropertyBox *GetBox(int entry) const;
60 inline JSTaggedValue GetValue(int entry) const;
62 inline PropertyAttributes GetAttributes(int entry) const;
[all …]
Dtransitions_dictionary.h33 static inline int Hash([[maybe_unused]] const JSTaggedValue &key) in Hash()
44 static inline int Hash(const JSTaggedValue &key, const JSTaggedValue &metaData) in Hash()
54int metaDataHash = metaData.IsInt() ? metaData.GetInt() : static_cast<int>(metaData.GetRawData()); in Hash()
55 return static_cast<int>(hash) + metaDataHash; in Hash()
58 inline static int GetKeyIndex(int entry) in GetKeyIndex()
62 inline static int GetValueIndex(int entry) in GetValueIndex()
66 inline static int GetEntryIndex(int entry) in GetEntryIndex()
70 inline static int GetEntrySize() in GetEntrySize()
80 static constexpr int DEFAULT_ELEMENTS_NUMBER = 16;
82 int numberOfElements = DEFAULT_ELEMENTS_NUMBER)
[all …]
Dlayout_info-inl.h25 inline int LayoutInfo::GetPropertiesCapacity() const in GetPropertiesCapacity()
27 return static_cast<int>((GetLength()) >> ELEMENTS_INDEX_LOG2); in GetPropertiesCapacity()
30 inline int LayoutInfo::NumberOfElements() const in NumberOfElements()
35 inline void LayoutInfo::SetNumberOfElements([[maybe_unused]] const JSThread *thread, int properties) in SetNumberOfElements()
40 inline uint32_t LayoutInfo::GetKeyIndex(int index) const in GetKeyIndex()
45 inline uint32_t LayoutInfo::GetAttrIndex(int index) const in GetAttrIndex()
50 inline void LayoutInfo::SetPropertyInit(const JSThread *thread, int index, const JSTaggedValue &key, in SetPropertyInit()
58 inline void LayoutInfo::SetNormalAttr(const JSThread *thread, int index, const PropertyAttributes &… in SetNormalAttr()
66 inline JSTaggedValue LayoutInfo::GetKey(int index) const in GetKey()
72 inline PropertyAttributes LayoutInfo::GetAttr(int index) const in GetAttr()
[all …]
Dtemplate_map.h30 static inline int Hash(const JSTaggedValue &obj) in Hash()
37 inline static int GetKeyIndex(int entry) in GetKeyIndex()
41 inline static int GetValueIndex(int entry) in GetValueIndex()
45 inline static int GetEntryIndex(int entry) in GetEntryIndex()
49 inline static int GetEntrySize() in GetEntrySize()
57 static const int DEFAULT_ELEMENTS_NUMBER = 16;
58 …static JSHandle<TemplateMap> Create(JSThread *thread, int numberOfElements = DEFAULT_ELEMENTS_NUMB…
62 …static int ComputeCompactSize([[maybe_unused]] const JSHandle<TemplateMap> &table, int computeHash… in ComputeCompactSize()
63 [[maybe_unused]] int tableSize, [[maybe_unused]] int addedElements) in ComputeCompactSize()
67 static const int ENTRY_SIZE = 2;
[all …]
Dtagged_dictionary.cpp21 int NameDictionary::Hash(const JSTaggedValue &key) in Hash()
43 void NameDictionary::GetAllKeys(const JSThread *thread, int offset, TaggedArray *keyArray) const in GetAllKeys()
45 int arrayIndex = 0; in GetAllKeys()
46 int size = Size(); in GetAllKeys()
48 for (int hashIndex = 0; hashIndex < size; hashIndex++) { in GetAllKeys()
63 void NameDictionary::GetAllEnumKeys(const JSThread *thread, int offset, TaggedArray *keyArray, uint… in GetAllEnumKeys()
66 int size = Size(); in GetAllEnumKeys()
68 for (int hashIndex = 0; hashIndex < size; hashIndex++) { in GetAllEnumKeys()
86 JSHandle<NameDictionary> NameDictionary::Create(const JSThread *thread, int numberOfElements) in Create()
91 PropertyAttributes NameDictionary::GetAttributes(int entry) const in GetAttributes()
[all …]
Dsymbol_table.h34 inline static int GetKeyIndex(int entry) in GetKeyIndex()
38 inline static int GetValueIndex(int entry) in GetValueIndex()
42 inline static int GetEntryIndex(int entry) in GetEntryIndex()
46 inline static int GetEntrySize() in GetEntrySize()
72 static const int DEFAULT_ELEMENTS_NUMBER = 64;
73 …static JSHandle<SymbolTable> Create(JSThread *thread, int numberOfElements = DEFAULT_ELEMENTS_NUMB…
80 int entry = FindEntry(key); in ContainsKey()
86 int entry = FindEntry(key); in GetSymbol()
102 …static int ComputeCompactSize([[maybe_unused]] const JSHandle<SymbolTable> &table, int computeHash… in ComputeCompactSize()
103 [[maybe_unused]] int tableSize, [[maybe_unused]] int addedElements) in ComputeCompactSize()
[all …]
Dglobal_dictionary-inl.h27 int GlobalDictionary::Hash(const JSTaggedValue &key) in Hash()
48 PropertyBox *GlobalDictionary::GetBox(int entry) const in GetBox()
50 int index = GetEntryIndex(entry) + ENTRY_VALUE_INDEX; in GetBox()
54 JSTaggedValue GlobalDictionary::GetValue(int entry) const in GetValue()
59 PropertyAttributes GlobalDictionary::GetAttributes(int entry) const in GetAttributes()
61 int index = GetEntryIndex(entry) + ENTRY_DETAILS_INDEX; in GetAttributes()
65 void GlobalDictionary::SetEntry(const JSThread *thread, int entry, const JSTaggedValue &key, const … in SetEntry()
73 void GlobalDictionary::ClearEntry(const JSThread *thread, int entry) in ClearEntry()
80 void GlobalDictionary::UpdateValueAndAttributes(const JSThread *thread, int entry, const JSTaggedVa… in UpdateValueAndAttributes()
87 void GlobalDictionary::SetAttributes(const JSThread *thread, int entry, const PropertyAttributes &m… in SetAttributes()
[all …]
/arkcompiler/runtime_core/verification/util/
Drange.h29 template <typename Int>
30 class Range<Int> {
34 typedef Int value_type;
35 typedef Int *pointer;
36 typedef Int &reference;
37 typedef std::make_signed_t<Int> difference_type;
40 Iterator(const Int val) : Val_ {val} {} in Iterator()
47 Iterator operator++(int)
58 Iterator operator--(int)
77 Int operator*()
[all …]
Dabstract_index.h25 template <typename Int, typename Friend>
26 class AbstractIndex : private Index<Int> {
27 using Base = Index<Int>;
44 …return static_cast<Int>(static_cast<const Base &>(*this)) == static_cast<Int>(static_cast<const Ba…
54 …return static_cast<Int>(static_cast<const Base &>(*this)) < static_cast<Int>(static_cast<const Bas…
59 …return static_cast<Int>(static_cast<const Base &>(*this)) <= static_cast<Int>(static_cast<const Ba…
63 AbstractIndex(Int val) : Base {val} {} in AbstractIndex()
65 AbstractIndex &operator=(Int val)
76 operator Int() const in Int() function
78 return Base::operator Int(); in Int()
[all …]
Dtagged_index.h58 template <typename Int, const size_t Shift>
59 static constexpr void SetTags([[maybe_unused]] Int &val) in SetTags()
82 template <typename Int, const size_t Shift>
85 using UInt = std::make_unsigned_t<Int>; in GetMask()
89 template <typename Int, const size_t Shift>
92 using UInt = std::make_unsigned_t<Int>; in GetTagMask()
93 …return std::tuple_cat(std::tuple<UInt> {GetMask<Int, Shift>()}, Base::template GetTagMask<Int, Shi… in GetTagMask()
100 template <typename Int, const size_t Shift>
101 …c constexpr void SetTags(const typename T::type &tag, const typename Tag::type &... tags, Int &val) in SetTags()
103 using UInt = std::make_unsigned_t<Int>; in SetTags()
[all …]
/arkcompiler/ets_runtime/ecmascript/dfx/cpu_profiler/
Dsamples_record.h33 const int MAX_STACK_SIZE = 128; // 128:the maximum size of the js stack
34 const int MAX_NODE_COUNT = 20000; // 20000:the maximum size of the array
35 const int MIN_TIME_DELTA = 10; // 10: the minimum value of the time delta
36 const int QUEUE_CAPACITY = 51; // the capacity of the circular queue is QUEUE_CAPACITY - 1
66 int parentId = 0;
77 int columnNumber = 0;
78 int lineNumber = 0;
79 int scriptId = 0;
84 int id = 0;
85 int parentId = 0;
[all …]
/arkcompiler/ets_runtime/ecmascript/require/
Djs_cjs_module_cache.h37 inline static int GetKeyIndex(int entry) in GetKeyIndex()
42 inline static int GetValueIndex(int entry) in GetValueIndex()
47 inline static int GetEntryIndex(int entry) in GetEntryIndex()
52 inline static int GetEntrySize() in GetEntrySize()
68 static inline int Hash(const JSTaggedValue &key) in Hash()
72 return static_cast<int>(EcmaStringAccessor(nameStr).GetHashcode()); in Hash()
75 static const int DEFAULT_ELEMENTS_NUMBER = 64;
77 …static JSHandle<CjsModuleCache> Create(JSThread *thread, int numberOfElements = DEFAULT_ELEMENTS_N…
82 inline int FindEntry(const JSTaggedValue &key) in FindEntry()
84 int size = Size(); in FindEntry()
[all …]
/arkcompiler/runtime_core/tests/cts-assembly/
Darrays-06.pa36 #int foo4(int n) {
37 # int sum = 0;
40 # int *arr = new int[n];
41 # for (int i = 0; i < n; i++) {
48 #int foo3(int n) {
49 # int sum = 0;
50 # int *arr = new int[n];
51 # for (int i = 0; i < n; i++) {
60 #int foo2(int n) {
61 # int sum = 0;
[all …]
/arkcompiler/runtime_core/verification/util/tests/
Dcallable_test.cpp24 int func(int x, int y) in func()
30 int operator()(int x, int y) const in operator ()()
34 int some_method(int x, int y) const in some_method()
42 callable<int(int, int)> cal {}; in TEST_F()
51 cal = callable<int(int, int)> {obj_example, &obj::some_method}; in TEST_F()
/arkcompiler/runtime_core/libziparchive/
Dzip_archive.cpp32 int OpenArchive(ZipArchiveHandle &handle, const char *path) in OpenArchive()
42 int OpenArchiveFile(ZipArchiveHandle &handle, FILE *fp) in OpenArchiveFile()
52 int CloseArchive(ZipArchiveHandle &handle) in CloseArchive()
58 int err = unzClose(handle); in CloseArchive()
66 int CloseArchiveFile(ZipArchiveHandle &handle) in CloseArchiveFile()
72 int err = unzCloseFile(handle); in CloseArchiveFile()
80 int GetGlobalFileInfo(ZipArchiveHandle &handle, GlobalStat *gstat) in GetGlobalFileInfo()
82 int err = unzGetGlobalInfo(handle, &gstat->ginfo); in GetGlobalFileInfo()
90 int GoToNextFile(ZipArchiveHandle &handle) in GoToNextFile()
92 int err = unzGoToNextFile(handle); in GoToNextFile()
[all …]
/arkcompiler/ets_runtime/ecmascript/base/
Dnumber_helper.h51 static constexpr int DOUBLE_MAX_PRECISION = 17;
52 static constexpr int DOUBLE_EXPONENT_BIAS = 0x3FF;
69 static constexpr int LEFT52 = 52 ;
70 static constexpr int RIGHT12 = 12;
72 static constexpr int SECONDS_TO_SUBTLE = 1000000;
73 static constexpr int RIGHT27 = 27;
74 static constexpr int LEFT25 = 25;
97 static JSTaggedValue DoubleToString(JSThread *thread, double number, int radix);
105 static JSTaggedValue DoubleToExponential(JSThread *thread, double number, int digit);
106 static JSTaggedValue DoubleToFixed(JSThread *thread, double number, int digit);
[all …]

12345678910>>...46