[WASM] More optimal way to keep regex decomposition table
This commit is contained in:
@@ -243,7 +243,7 @@ private fun getDecomposition(codePoint: Int): IntArray? {
|
||||
if (index == -1 || decompositionKeys[index] != codePoint) {
|
||||
return null
|
||||
}
|
||||
return decompositionValues[index]
|
||||
return getDecompositionByIndex(index)
|
||||
}
|
||||
|
||||
/** Gets canonical class for given codepoint from decomposition mappings table. */
|
||||
@@ -257,9 +257,6 @@ internal fun hasSingleCodepointDecompositionInternal(ch: Int): Boolean {
|
||||
return index != -1 && singleDecompositions[index] == ch
|
||||
}
|
||||
|
||||
/** Returns a decomposition for a given codepoint. */
|
||||
internal fun getDecompositionInternal(ch: Int): IntArray? = getDecomposition(ch)
|
||||
|
||||
/**
|
||||
* Decomposes the given string represented as an array of codepoints. Saves the decomposition into [outputCodepoints] array.
|
||||
* Returns the length of the decomposition.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user