| /arkcompiler/ets_runtime/test/typeinfer/automatedcases/ |
| D | jsDeclarationsFunctionKeywordPropExhaustive.ts | 24 AssertType(foo.x = 1, "int"); 26 AssertType(1, "int"); 29 AssertType(foo.y = 1, "int"); 31 AssertType(1, "int"); 35 AssertType(foo.break = 1, "int"); 37 AssertType(1, "int"); 40 AssertType(foo.case = 1, "int"); 42 AssertType(1, "int"); 45 AssertType(foo.catch = 1, "int"); 47 AssertType(1, "int"); [all …]
|
| D | nullPropertyName.ts | 24 AssertType(foo.x = 1, "int"); 26 AssertType(1, "int"); 29 AssertType(foo.y = 1, "int"); 31 AssertType(1, "int"); 35 AssertType(foo.break = 1, "int"); 37 AssertType(1, "int"); 40 AssertType(foo.case = 1, "int"); 42 AssertType(1, "int"); 45 AssertType(foo.catch = 1, "int"); 47 AssertType(1, "int"); [all …]
|
| D | emitExponentiationOperator1.ts | 23 AssertType(1, "int"); 24 AssertType(-2, "int"); 25 AssertType(2, "int"); 29 AssertType(1, "int"); 30 AssertType(2, "int"); 34 AssertType((-1), "int"); 35 AssertType(-1, "int"); 36 AssertType(1, "int"); 37 AssertType(2, "int"); 41 AssertType(1, "int"); [all …]
|
| D | templateStringBinaryOperationsES6.ts | 24 AssertType(1, "int"); 26 AssertType(3, "int"); 31 AssertType(1, "int"); 33 AssertType(3, "int"); 38 AssertType(1, "int"); 40 AssertType(3, "int"); 45 AssertType(1, "int"); 47 AssertType(3, "int"); 53 AssertType(3, "int"); 54 AssertType(5, "int"); [all …]
|
| D | templateStringBinaryOperations.ts | 24 AssertType(1, "int"); 26 AssertType(3, "int"); 31 AssertType(1, "int"); 33 AssertType(3, "int"); 38 AssertType(1, "int"); 40 AssertType(3, "int"); 45 AssertType(1, "int"); 47 AssertType(3, "int"); 53 AssertType(3, "int"); 54 AssertType(5, "int"); [all …]
|
| D | emitExponentiationOperator3.ts | 23 AssertType(10, "int"); 31 AssertType(3, "int"); 39 AssertType(3, "int"); 47 AssertType(3, "int"); 55 AssertType(3, "int"); 63 AssertType(1, "int"); 66 AssertType(3, "int"); 74 AssertType(1, "int"); 77 AssertType(3, "int"); 85 AssertType(1, "int"); [all …]
|
| D | classStaticBlock10targetesnext.ts | 23 AssertType(1, "int"); 27 AssertType(1, "int"); 30 AssertType(b1, "int"); 31 AssertType(2, "int"); 34 AssertType(b2, "int"); 35 AssertType(2, "int"); 40 AssertType(11, "int"); 43 AssertType(b1, "int"); 44 AssertType(22, "int"); 50 AssertType(111, "int"); [all …]
|
| D | classStaticBlock10targetes2015.ts | 23 AssertType(1, "int"); 27 AssertType(1, "int"); 30 AssertType(b1, "int"); 31 AssertType(2, "int"); 34 AssertType(b2, "int"); 35 AssertType(2, "int"); 40 AssertType(11, "int"); 43 AssertType(b1, "int"); 44 AssertType(22, "int"); 50 AssertType(111, "int"); [all …]
|
| D | classStaticBlock10targetes2022.ts | 23 AssertType(1, "int"); 27 AssertType(1, "int"); 30 AssertType(b1, "int"); 31 AssertType(2, "int"); 34 AssertType(b2, "int"); 35 AssertType(2, "int"); 40 AssertType(11, "int"); 43 AssertType(b1, "int"); 44 AssertType(22, "int"); 50 AssertType(111, "int"); [all …]
|
| D | classStaticBlock10targetes5.ts | 23 AssertType(1, "int"); 27 AssertType(1, "int"); 30 AssertType(b1, "int"); 31 AssertType(2, "int"); 34 AssertType(b2, "int"); 35 AssertType(2, "int"); 40 AssertType(11, "int"); 43 AssertType(b1, "int"); 44 AssertType(22, "int"); 50 AssertType(111, "int"); [all …]
|
| D | emitExponentiationOperator2.ts | 23 AssertType(10, "int"); 29 AssertType(3, "int"); 35 AssertType(3, "int"); 41 AssertType(3, "int"); 47 AssertType(3, "int"); 55 AssertType(3, "int"); 63 AssertType(3, "int"); 71 AssertType(3, "int"); 79 AssertType(3, "int"); 87 AssertType(3, "int"); [all …]
|
| /arkcompiler/ets_runtime/ecmascript/ |
| D | tagged_list.h | 29 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 …]
|
| D | tagged_dictionary.h | 28 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); 45 static int Hash(const uint8_t* str, int strSize); 48 static bool IsMatch(const uint8_t* str, int size, const JSTaggedValue &other); 51 int numberOfElements = OrderHashTableT::DEFAULT_ELEMENTS_NUMBER); 53 PropertyAttributes GetAttributes(int entry) const; 54 void SetAttributes(const JSThread *thread, int entry, const PropertyAttributes &metaData); [all …]
|
| D | js_date.h | 26 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 …]
|
| D | linked_hash_table.h | 28 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 …]
|
| D | tagged_tree.h | 38 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 …]
|
| D | tagged_hash_table.h | 28 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()); 77 …int newSize = Derived::ComputeCompactSize(table, ComputeHashTableSize(table->Size() + numOfAddedEl… [all …]
|
| D | layout_info.h | 31 static constexpr int MIN_PROPERTIES_LENGTH = JSObject::MIN_PROPERTIES_LENGTH; 32 static constexpr int MAX_PROPERTIES_LENGTH = PropertyAttributes::MAX_CAPACITY_OF_PROPERTIES; 42 void Initialize(const JSThread *thread, int num = 0); 43 int GetPropertiesCapacity() const; 44 int NumberOfElements() const; 45 void SetNumberOfElements(const JSThread *thread, int properties); 46 uint32_t GetKeyIndex(int index) const; 47 uint32_t GetAttrIndex(int index) const; 48 …void SetPropertyInit(const JSThread *thread, int index, const JSTaggedValue &key, const PropertyAt… 49 void SetKey(const JSThread *thread, int index, const JSTaggedValue &key); [all …]
|
| D | tagged_list.cpp | 32 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() 68 …int actualArrayCapacity = (taggedArrayLength - ELEMENTS_START_INDEX - (deleteNodeNum + 1) * Derive… in GrowCapacity() 81 … const JSHandle<JSTaggedValue> &value, const int index, int prevDataIndex) in AddNode() [all …]
|
| D | date_parse.h | 24 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 …]
|
| D | global_dictionary.h | 33 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, 56 … int entry, const JSHandle<JSTaggedValue> &oldValue); 58 inline bool IsValidateBox(int entry) const; 60 inline PropertyBox *GetBox(int entry) const; 62 inline JSTaggedValue GetValue(int entry) const; [all …]
|
| D | transitions_dictionary.h | 34 static inline int Hash([[maybe_unused]] const JSTaggedValue &key) in Hash() 46 static inline int Hash(const JSTaggedValue &key, const JSTaggedValue &metaData) in Hash() 56 … int metaDataHash = metaData.IsInt() ? metaData.GetInt() : static_cast<int>(metaData.GetRawData()); in Hash() 57 return static_cast<int>(hash) + metaDataHash; in Hash() 60 inline static int GetKeyIndex(int entry) in GetKeyIndex() 64 inline static int GetValueIndex(int entry) in GetValueIndex() 68 inline static int GetEntryIndex(int entry) in GetEntryIndex() 72 inline static int GetEntrySize() in GetEntrySize() 82 static constexpr int DEFAULT_ELEMENTS_NUMBER = 16; 84 int numberOfElements = DEFAULT_ELEMENTS_NUMBER) [all …]
|
| D | layout_info-inl.h | 25 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 …]
|
| /arkcompiler/ets_runtime/ecmascript/dfx/cpu_profiler/ |
| D | samples_record.h | 32 const int MAX_STACK_SIZE = 128; // 128:the maximum size of the js stack 33 const int MAX_NODE_COUNT = 20000; // 20000:the maximum size of the array 34 const int MIN_TIME_DELTA = 10; // 10: the minimum value of the time delta 35 const int PROGRAM_NODE_ID = 2; // 2: the (program) node id 36 const int QUEUE_CAPACITY = 51; // the capacity of the circular queue is QUEUE_CAPACITY - 1 41 int scriptId = 0; 42 int lineNumber = -1; 43 int columnNumber = -1; 50 int id = 0; 51 int parentId = 0; [all …]
|
| /arkcompiler/ets_runtime/ecmascript/require/ |
| D | js_cjs_module_cache.h | 37 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 …]
|