| /arkcompiler/runtime_core/static_core/plugins/ets/templates/stdlib/ |
| D | DataView.ets.j2 | 79 {%- for bit in [8, 16, 32, 64] %} 81 {%- if mode != "Float" or bit >= 32 %} 82 // === {{mode}}{{bit}} === 83 {%- set impls = ['Little', 'Big'] if bit != 8 else ['Big'] %} 95 … {%- set methodName = ('Big' if bit == 64 and mode != 'Float' else '') + mode + '{}'.format(bit) %} 102 public get{{methodName}}(byteOffset: int): {{type2nameCompat[bit]}} { 110 public set{{methodName}}(byteOffset: int, value: {{type2name[bit]}}): void { 114 {%- if bit == 8 %} 121 public get{{methodName}}(byteOffset: number): {{type2nameCompat[bit]}} { 129 public set{{methodName}}(byteOffset: number, value: {{type2nameCompat[bit]}}): void { [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets_sdk/arkts/@arkts/collections/BitVector/ |
| D | createPushPopTests.ets | 26 … suite.addTest("Appends the bit element to the end of this bit vector.", BitVector_push_Func_001); 27 …suite.addTest("Appends multiple bit elements to the end of this bit vector in a loop.", BitVector_… 28 …suite.addTest("Appends multiple bit elements to the end of this bit vector, starting with an initi… 29 …suite.addTest("Retrieves and removes the bit element from the end of this bit vector.", BitVector_… 30 …suite.addTest("Retrieves and removes the bit elements from the end of this bit vector in a loop.",… 31 …suite.addTest("Retrieves and removes the bit elements from the end of this bit vector, leaving the… 61 * @tc.desc : Appends the bit element to the end of this bit vector. 84 * @tc.desc : Appends multiple bit elements to the end of this bit vector in a loop. 102 …* @tc.desc : Appends multiple bit elements to the end of this bit vector, starting with an in… 120 * @tc.desc : Retrieves and removes the bit element to the end of this bit vector. [all …]
|
| D | hasTests.ets | 25 …suite.addTest("Verify if bit vector correctly identifies bit values within a specified range.", Bi… 26 …suite.addTest("Verify that bit vector throws an error when toIndex is negative.", BitVector_has_Fu… 27 …suite.addTest("Verify that bit vector throws an error when fromIndex is not an integer.", BitVecto… 28 …suite.addTest("Verify that bit vector throws an error when both fromIndex and toIndex are negative… 29 …suite.addTest("Verify that bit vector throws an error when fromIndex is negative while toIndex is … 30 …suite.addTest("Verify if bit vector correctly identifies bit values in a large range spanning mult… 31 …suite.addTest("Verify if bit vector with initial length correctly identifies bit values across its… 32 …suite.addTest("Verify that bit vector throws an error when fromIndex is greater than toIndex.", Bi… 33 …suite.addTest("Verify if bit vector correctly identifies bit values in a single-element range.", B… 34 …suite.addTest("Verify if bit vector correctly identifies bit values in ranges that span across buf… [all …]
|
| D | flipBitByIndexTests.ets | 25 …suite.addTest("Verify basic bit flipping functionality in a bit vector.", BitVector_flipBitByIndex… 28 …suite.addTest("Test bit flipping operations on larger bit vector.", BitVector_flipBitByIndex_Func_… 29 …suite.addTest("Test bit flipping operations on bit vector with initial size.", BitVector_flipBitBy… 37 * @tc.desc : Test flipping bits from 1 to 0 and from 0 to 1 in a bit vector. 54 assertEQ(bitVector[0], 0, "Bit at index 0 should be flipped to 0"); 55 assertEQ(bitVector[1], 0, "Bit at index 1 should be flipped to 0"); 56 assertEQ(bitVector[2], 0, "Bit at index 2 should be flipped to 0"); 57 assertEQ(bitVector[3], 0, "Bit at index 3 should be flipped to 0"); 58 assertEQ(bitVector[4], 1, "Bit at index 4 should be flipped to 1"); 118 * @tc.desc : Test bit flipping operations on larger bit vector. [all …]
|
| D | getBitsByRangeTests.ets | 25 …suite.addTest("Returns the bit values in a valid range of indices.", BitVector_getBitsByRange_Func… 30 suite.addTest("Returns the bit values in a large range.", BitVector_getBitsByRange_Func_006); 31 …suite.addTest("Returns the bit values in a range with an initial length.", BitVector_getBitsByRang… 39 * @tc.desc : Returns the bit values in a valid range of indices in a bit vector. 52 assertEQ(result[0], 1, "Bit at index 0 should be 1"); 53 assertEQ(result[1], 1, "Bit at index 1 should be 1"); 54 assertEQ(result[2], 0, "Bit at index 2 should be 0"); 60 * @tc.desc : Throws an error for invalid 'toIndex' range in a bit vector. 86 * @tc.desc : Throws an error for non-integer 'fromIndex' in a bit vector. 112 * @tc.desc : Throws an error for negative 'fromIndex' and 'toIndex' in a bit vector. [all …]
|
| D | setBitsByRangeTests.ets | 25 …suite.addTest("Verify setting a range of bits updates the bit vector correctly.", BitVector_setBit… 30 …suite.addTest("Verify setting a large range of bits updates the bit vector correctly.", BitVector_… 31 …suite.addTest("Verify setting a range of bits with an initial offset updates the bit vector correc… 39 * @tc.desc : Verify setting a range of bits to 0 and 1 updates the bit vector correctly. 52 assertEQ(bitVector[1], 0, "Bit at index 1 should be 0"); 53 assertEQ(bitVector[2], 0, "Bit at index 2 should be 0"); 54 assertEQ(bitVector[3], 0, "Bit at index 3 should be 0"); 56 assertEQ(bitVector[1], 1, "Bit at index 1 should be 1"); 57 assertEQ(bitVector[2], 1, "Bit at index 2 should be 1"); 58 assertEQ(bitVector[3], 1, "Bit at index 3 should be 1"); [all …]
|
| D | valuesSetAllBitsTests.ets | 134 assertEQ(bitVector[0], 0, "Bit at index 0 should be 0 after setAllBits(0)"); 135 assertEQ(bitVector[1], 0, "Bit at index 1 should be 0 after setAllBits(0)"); 136 assertEQ(bitVector[2], 0, "Bit at index 2 should be 0 after setAllBits(0)"); 137 assertEQ(bitVector[3], 0, "Bit at index 3 should be 0 after setAllBits(0)"); 138 assertEQ(bitVector[4], 0, "Bit at index 4 should be 0 after setAllBits(0)"); 140 assertEQ(bitVector[0], 1, "Bit at index 0 should be 1 after setAllBits(1)"); 141 assertEQ(bitVector[1], 1, "Bit at index 1 should be 1 after setAllBits(1)"); 142 assertEQ(bitVector[2], 1, "Bit at index 2 should be 1 after setAllBits(1)"); 143 assertEQ(bitVector[3], 1, "Bit at index 3 should be 1 after setAllBits(1)"); 144 assertEQ(bitVector[4], 1, "Bit at index 4 should be 1 after setAllBits(1)"); [all …]
|
| /arkcompiler/runtime_core/libpandabase/utils/ |
| D | regmask.h | 90 constexpr bool Test(size_t bit) const in Test() argument 92 ASSERT(bit < Size()); in Test() 93 return ((value_ >> static_cast<ValueType>(bit)) & 1U) != 0; in Test() 105 constexpr void Set(size_t bit) in Set() argument 107 ASSERT(bit < Size()); in Set() 108 value_ |= (1U << bit); in Set() 111 constexpr void Set(size_t bit, bool value) in Set() argument 113 ASSERT(bit < Size()); in Set() 115 Set(bit); in Set() 117 Reset(bit); in Set() [all …]
|
| D | bit_field.h | 53 * Make BitField type that follows right after current bit range. 68 * Make Flag field that follows right after current bit range. 75 * Return maximum value that fits bit range [START_BIT : START_BIT+END_BIT] 83 * Return mask of bit range, f.e. 0b1110 for BitField<T, 1, 3> 91 * Check if given value fits into the bit field 99 * Set 'value' to current bit range [START_BIT : START_BIT+END_BIT] within the 'stor' parameter. 109 * Return bit range [START_BIT : START_BIT+END_BIT] value from given integer 'value' 117 * Encode 'value' to current bit range [START_BIT : START_BIT+END_BIT] and return it 126 * Update 'value' to current bit range [START_BIT : START_BIT+END_BIT] and return it
|
| /arkcompiler/runtime_core/static_core/libpandabase/utils/ |
| D | regmask.h | 90 constexpr bool Test(size_t bit) const in Test() argument 92 ASSERT(bit < Size()); in Test() 93 return ((value_ >> static_cast<ValueType>(bit)) & 1U) != 0; in Test() 105 constexpr void Set(size_t bit) in Set() argument 107 ASSERT(bit < Size()); in Set() 108 value_ |= (1U << bit); in Set() 111 constexpr void Set(size_t bit, bool value) in Set() argument 113 ASSERT(bit < Size()); in Set() 115 Set(bit); in Set() 117 Reset(bit); in Set() [all …]
|
| D | bit_field.h | 52 * Make BitField type that follows right after current bit range. 67 * Make Flag field that follows right after current bit range. 74 * Return maximum value that fits bit range [START_BIT : START_BIT+END_BIT] 82 * Return mask of bit range, f.e. 0b1110 for BitField<T, 1, 3> 90 * Check if given value fits into the bit field 98 * Set 'value' to current bit range [START_BIT : START_BIT+END_BIT] within the 'stor' parameter. 108 * Return bit range [START_BIT : START_BIT+END_BIT] value from given integer 'value' 116 * Encode 'value' to current bit range [START_BIT : START_BIT+END_BIT] and return it 125 * Update 'value' to current bit range [START_BIT : START_BIT+END_BIT] and return it
|
| /arkcompiler/runtime_core/static_core/runtime/mem/gc/ |
| D | bitmap.h | 71 * @brief Set the bit indexed by bit_offset. 72 * @param bit_offset - index of the bit to set. 81 * @brief Clear the bit indexed by bit_offset. 82 * @param bit_offset - index of the bit to clear. 91 * @brief Test the bit indexed by bit_offset. 92 * @param bit_offset - index of the bit to test. 93 * @return Returns value of indexed bit. 102 …* @brief Atomically set bit indexed by bit_offset. If the bit is not set, set it atomically. Other… 103 * @param bit_offset - index of the bit to set. 104 * @return Returns old value of the bit. [all …]
|
| /arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/maple_util/include/ |
| D | mpl_int_val.h | 23 …f this class provides different operations on signed and unsigned integers with arbitrary bit-width 26 /// @brief create zero value with zero bit-width 31 DEBUG_ASSERT(width <= valBitSize && width != 0, "bit-width is too wide"); in IntVal() 51 // Allow 'this' to be assigned with new bit-width and sign iff 52 // its original bit-width is zero (i.e. the value was created by the default ctor) 56 DEBUG_ASSERT(width == other.width && sign == other.sign, "different bit-width or sign"); 79 /// @return bit-width of the value 111 /// @return true if the (most significant bit) MSB is set 135 // Comparison operators that manipulate on values with the same sign and bit-width 138 DEBUG_ASSERT(width == rhs.width && sign == rhs.sign, "bit-width and sign must be the same"); [all …]
|
| /arkcompiler/runtime_core/docs/changelogs/ |
| D | 2022-08-18-isa-changelog.md | 20 8. We add 8-bit or 16-bit imm as inline cache slot for some specific opcodes. 26 We reuse the field 32-bit field `access_flags_` to encode Function Kind and Header index. 27 This will not introduce compatibility issue because the later 24-bit of `access_flags_` is unused i… 30 |<- 16-bit header index ->|<- 8-bit function kind ->|<- 8-bit original access flag ->| 39 As we use 16-bit to encode methodId, stringId and literalarrayId, the number of these Ids in one me… 45 3. In bytecode, we still use 16-bit literalarrayId rather than offset.
|
| /arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/maple_ir/include/ |
| D | cmpl.h | 36 uint8 *formalWordsTypetagged; // bit vector where the Nth bit tells whether 43 uint8 *localWordsTypetagged; // bit vector where the Nth bit tells whether 50 uint8 *formalWordsRefCounted; // bit vector where the Nth bit tells whether 57 uint8 *localWordsRefCounted; // bit vector where the Nth bit tells whether 89 uint8 *globalWordsTypetagged; // bit vector where the Nth bit tells whether 94 uint8 *globalWordsRefCounted; // bit vector where the Nth bit tells whether 141 // only support 32bit int const (lower 32bit). higher 32bit are tags 144 uint32 val[2]; // ARM target load/store 2 32bit val instead of 1 64bit 221 // typeFlag is a 8bit flag to provide short-cut information for its 228 // bit 0 - bit 3 is for type size information. (now not used in VM?) [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/runtime/interop_js/ets_proxy/ |
| D | shared_reference_flags.h | 34 enum class Bit : ValueType { enum 50 template <SharedReferenceFlags::Bit BIT> 53 static constexpr auto BIT_VALUE = static_cast<ValueType>(BIT); in SetBit() 57 template <SharedReferenceFlags::Bit BIT> 60 static constexpr auto BIT_VALUE = static_cast<ValueType>(BIT); in HasBit() 66 UnsetFlagCAS<static_cast<ValueType>(Bit::MARK)>(); in Unmark() 86 …out << "idx:" << flags.GetNextIndex() << " mark:" << flags.HasBit<SharedReferenceFlags::Bit::MARK>… 87 << " JS:" << flags.HasBit<SharedReferenceFlags::Bit::JS>() 88 << " ETS:" << flags.HasBit<SharedReferenceFlags::Bit::ETS>(); 96 static_assert(static_cast<ValueType>(Bit::MARK) < (1U << NEXT_INDEX_SHIFT));
|
| /arkcompiler/ets_runtime/ecmascript/compiler/codegen/maple/maple_be/include/cg/aarch64/ |
| D | aarch64_imm_valid.h | 94 // For the 32-bit variant: is the bitmask immediate 111 // For the 64-bit variant: is the bitmask immediate 130 // For the 32-bit variant: is the shift amount, in the range 0 to 31, opnd input is bitshiftopnd 137 // For the 64-bit variant: is the shift amount, in the range 0 to 63, opnd input is bitshiftopnd 144 // For the 32-bit variant: is the shift amount, in the range 0 to 31, opnd input is immopnd 151 // For the 64-bit variant: is the shift amount, in the range 0 to 63, opnd input is immopnd 158 // Is a 16-bit unsigned immediate, in the range 0 to 65535, used by BRK 165 // Is the flag bit specifier, an immediate in the range 0 to 15, used by CCMP 172 // For the 32-bit variant: is the bit number of the lsb of the source bitfield, in the range 0 to 31 179 // For the 32-bit variant: is the width of the bitfield, in the range 1 to 32-<lsb> [all …]
|
| /arkcompiler/ets_runtime/ecmascript/snapshot/mem/ |
| D | encode_bit.h | 29 * 16bit 8bit 1bit 1bit 1bit 8bit 1bit 18bit 10bit 44 // encode bit 52 static constexpr int UNUSED_BIT_NUMBER = 6; // unused bit number
|
| /arkcompiler/runtime_core/common_interfaces/base/ |
| D | bit_field.h | 55 * Make BitField type that follows right after current bit range. 70 * Make Flag field that follows right after current bit range. 77 * Return maximum value that fits bit range [START_BIT : START_BIT+END_BIT] 85 * Return mask of bit range, f.e. 0b1110 for BitField<T, 1, 3> 93 * Check if given value fits into the bit field 101 * Set 'value' to current bit range [START_BIT : START_BIT+END_BIT] within the 'stor' parameter. 111 * Return bit range [START_BIT : START_BIT+END_BIT] value from given integer 'value' 119 * Encode 'value' to current bit range [START_BIT : START_BIT+END_BIT] and return it 128 * Update 'value' to current bit range [START_BIT : START_BIT+END_BIT] and return it
|
| /arkcompiler/runtime_core/static_core/verification/util/ |
| D | flags.h | 52 class Bit : public ConstBit { 54 Bit(UInt bitMask, UInt &givenFlags) : ConstBit {bitMask, givenFlags} {}; in Bit() function 55 ~Bit() = default; 56 NO_COPY_SEMANTIC(Bit); 57 NO_MOVE_SEMANTIC(Bit); 59 Bit &operator=(bool b) 86 Bit operator[](Enum f) 97 Bit operator[](Enum /* unused */) 122 typename Base::Bit operator[](Enum f)
|
| D | mem.h | 29 Linux is using a split address space for 32 bit systems, although in the past there 31 …architecture that supports it, e.g. x86). Linux always uses split address space for 64 bit systems. 33 [For 32-bit Linux, the split is usually 3/1, i.e. 0x00000000-0xc0000000 is user space, 38 For a 32-bit process, the virtual address space is usually the 2-gigabyte range 0x00000000 40 For a 64-bit process on 64-bit Windows, the virtual address space is the 128-terabyte range
|
| /arkcompiler/runtime_core/compiler/docs/ |
| D | interface_inline_cache.md | 20 * must be 64bit system 27 Cache structure:(offset addr)/(class addr) 32bit/32bit 47 1. one cache is 64bit 51 5. why use 64bit? 52 because read and write 64bit is atomic, same `cache` maybe use at same time 55 1. `class addr` is just the point to a class, in ark runtime, class point is 32bit 63 because method* is 64bit, it must be indirectly stored,cache only have 32bit to use 100 because Method* is 8bit align, so Method* can be compressed. So the actual range we can store is:
|
| /arkcompiler/runtime_core/static_core/compiler/docs/ |
| D | interface_inline_cache.md | 20 * must be 64bit system 27 Cache structure:(offset addr)/(class addr) 32bit/32bit 47 1. one cache is 64bit 51 5. why use 64bit? 52 because read and write 64bit is atomic, same `cache` maybe use at same time 55 1. `class addr` is just the point to a class, in ark runtime, class point is 32bit 63 because method* is 64bit, it must be indirectly stored,cache only have 32bit to use 100 because Method* is 8bit align, so Method* can be compressed. So the actual range we can store is:
|
| /arkcompiler/ets_frontend/es2panda/util/ |
| D | base64.cpp | 30 // convert three 8bit into four 6bit; then add two 0 bit in each 6 bit in Base64Encode() 101 // the last 6 bit of the first char + the 2~3 bit of the second char(first 4 bit - 00) in Base64Decode() 109 // the last 4 bit of the second char + the 2~5 bit of the third char(first 6 bit - 00) in Base64Decode() 117 // the last 2 bit of the third char + the last 6 bit of the fourth char in Base64Decode()
|
| /arkcompiler/runtime_core/static_core/plugins/ets/sdk/arkts/ |
| D | @arkts.collections.ets | 61 * An ordered collections of bit values, which are either 0 or 1. 90 …ment number of the BitVector. This is a number one higher than the highest index in the bit vector. 98 * Appends the bit element to the end of this bit vector. 100 … * @param { number } element - Element to be appended to this bit vector (0 means 0, else means 1). 117 * Retrieves and removes the bit element to the end of this bit vector. 119 …* @returns { number | undefined } The boolean type, if the bit push successfully, return true, els… 155 * Check if bit vector contains a particular bit element. 160 …* @returns { boolean } The boolean type, if bit vector contains the specified element, return true, 197 * Returns an iterator that iterates over bit vector. 206 * Returns an iterable of values in the bit vector [all …]
|