diff --git a/lang/af/af.wasm b/lang/af/af.wasm index 33f89d78..d9159187 100644 Binary files a/lang/af/af.wasm and b/lang/af/af.wasm differ diff --git a/lang/af/src/hyphenEngine.ts b/lang/af/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/af/src/hyphenEngine.ts +++ b/lang/af/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/as/as.wasm b/lang/as/as.wasm index 5372dae6..c9d1dcff 100644 Binary files a/lang/as/as.wasm and b/lang/as/as.wasm differ diff --git a/lang/as/src/hyphenEngine.ts b/lang/as/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/as/src/hyphenEngine.ts +++ b/lang/as/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/be/be.wasm b/lang/be/be.wasm index 14036e8f..6b8c9cff 100644 Binary files a/lang/be/be.wasm and b/lang/be/be.wasm differ diff --git a/lang/be/src/hyphenEngine.ts b/lang/be/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/be/src/hyphenEngine.ts +++ b/lang/be/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/bg/bg.wasm b/lang/bg/bg.wasm index bc166db5..4cde85d2 100644 Binary files a/lang/bg/bg.wasm and b/lang/bg/bg.wasm differ diff --git a/lang/bg/src/hyphenEngine.ts b/lang/bg/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/bg/src/hyphenEngine.ts +++ b/lang/bg/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/bn/bn.wasm b/lang/bn/bn.wasm index 551c4629..2ba95541 100644 Binary files a/lang/bn/bn.wasm and b/lang/bn/bn.wasm differ diff --git a/lang/bn/src/hyphenEngine.ts b/lang/bn/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/bn/src/hyphenEngine.ts +++ b/lang/bn/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/ca/ca.wasm b/lang/ca/ca.wasm index 530972ca..73cf4eec 100644 Binary files a/lang/ca/ca.wasm and b/lang/ca/ca.wasm differ diff --git a/lang/ca/src/hyphenEngine.ts b/lang/ca/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/ca/src/hyphenEngine.ts +++ b/lang/ca/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/cs/cs.wasm b/lang/cs/cs.wasm index 0ee9554b..b3fdc012 100644 Binary files a/lang/cs/cs.wasm and b/lang/cs/cs.wasm differ diff --git a/lang/cs/src/hyphenEngine.ts b/lang/cs/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/cs/src/hyphenEngine.ts +++ b/lang/cs/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/cy/cy.wasm b/lang/cy/cy.wasm index 88fb7ac2..669014df 100644 Binary files a/lang/cy/cy.wasm and b/lang/cy/cy.wasm differ diff --git a/lang/cy/src/hyphenEngine.ts b/lang/cy/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/cy/src/hyphenEngine.ts +++ b/lang/cy/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/da/da.wasm b/lang/da/da.wasm index 5bb22a2a..88673734 100644 Binary files a/lang/da/da.wasm and b/lang/da/da.wasm differ diff --git a/lang/da/src/hyphenEngine.ts b/lang/da/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/da/src/hyphenEngine.ts +++ b/lang/da/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/de-x-syllable/de-x-syllable.wasm b/lang/de-x-syllable/de-x-syllable.wasm index 618f0e4a..14fadef0 100644 Binary files a/lang/de-x-syllable/de-x-syllable.wasm and b/lang/de-x-syllable/de-x-syllable.wasm differ diff --git a/lang/de-x-syllable/src/hyphenEngine.ts b/lang/de-x-syllable/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/de-x-syllable/src/hyphenEngine.ts +++ b/lang/de-x-syllable/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/de/de.wasm b/lang/de/de.wasm index 95e167d6..0608dcba 100644 Binary files a/lang/de/de.wasm and b/lang/de/de.wasm differ diff --git a/lang/de/src/hyphenEngine.ts b/lang/de/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/de/src/hyphenEngine.ts +++ b/lang/de/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/el-monoton/el-monoton.wasm b/lang/el-monoton/el-monoton.wasm index cb40d399..4aaa6cc6 100644 Binary files a/lang/el-monoton/el-monoton.wasm and b/lang/el-monoton/el-monoton.wasm differ diff --git a/lang/el-monoton/src/hyphenEngine.ts b/lang/el-monoton/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/el-monoton/src/hyphenEngine.ts +++ b/lang/el-monoton/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/el-polyton/el-polyton.wasm b/lang/el-polyton/el-polyton.wasm index 844ae205..793dc6eb 100644 Binary files a/lang/el-polyton/el-polyton.wasm and b/lang/el-polyton/el-polyton.wasm differ diff --git a/lang/el-polyton/src/hyphenEngine.ts b/lang/el-polyton/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/el-polyton/src/hyphenEngine.ts +++ b/lang/el-polyton/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/en-gb/en-gb.wasm b/lang/en-gb/en-gb.wasm index 792dcd65..47376328 100644 Binary files a/lang/en-gb/en-gb.wasm and b/lang/en-gb/en-gb.wasm differ diff --git a/lang/en-gb/src/hyphenEngine.ts b/lang/en-gb/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/en-gb/src/hyphenEngine.ts +++ b/lang/en-gb/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/en-us/en-us.wasm b/lang/en-us/en-us.wasm index 6cdb9115..d1fff39f 100644 Binary files a/lang/en-us/en-us.wasm and b/lang/en-us/en-us.wasm differ diff --git a/lang/en-us/src/hyphenEngine.ts b/lang/en-us/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/en-us/src/hyphenEngine.ts +++ b/lang/en-us/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/eo/eo.wasm b/lang/eo/eo.wasm index 2040192e..df40e7b0 100644 Binary files a/lang/eo/eo.wasm and b/lang/eo/eo.wasm differ diff --git a/lang/eo/src/hyphenEngine.ts b/lang/eo/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/eo/src/hyphenEngine.ts +++ b/lang/eo/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/es/es.wasm b/lang/es/es.wasm index 94227785..7ae847b1 100644 Binary files a/lang/es/es.wasm and b/lang/es/es.wasm differ diff --git a/lang/es/src/hyphenEngine.ts b/lang/es/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/es/src/hyphenEngine.ts +++ b/lang/es/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/et/et.wasm b/lang/et/et.wasm index 62aef838..9e9a7228 100644 Binary files a/lang/et/et.wasm and b/lang/et/et.wasm differ diff --git a/lang/et/src/hyphenEngine.ts b/lang/et/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/et/src/hyphenEngine.ts +++ b/lang/et/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/eu/eu.wasm b/lang/eu/eu.wasm index d7f77333..0e6c9aaa 100644 Binary files a/lang/eu/eu.wasm and b/lang/eu/eu.wasm differ diff --git a/lang/eu/src/hyphenEngine.ts b/lang/eu/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/eu/src/hyphenEngine.ts +++ b/lang/eu/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/fi/fi.wasm b/lang/fi/fi.wasm index 25241d4a..77d6fbc7 100644 Binary files a/lang/fi/fi.wasm and b/lang/fi/fi.wasm differ diff --git a/lang/fi/src/hyphenEngine.ts b/lang/fi/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/fi/src/hyphenEngine.ts +++ b/lang/fi/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/fo/fo.wasm b/lang/fo/fo.wasm index a08b903c..1b824be4 100644 Binary files a/lang/fo/fo.wasm and b/lang/fo/fo.wasm differ diff --git a/lang/fo/src/hyphenEngine.ts b/lang/fo/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/fo/src/hyphenEngine.ts +++ b/lang/fo/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/fr/fr.wasm b/lang/fr/fr.wasm index 660ee49a..3e002818 100644 Binary files a/lang/fr/fr.wasm and b/lang/fr/fr.wasm differ diff --git a/lang/fr/src/hyphenEngine.ts b/lang/fr/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/fr/src/hyphenEngine.ts +++ b/lang/fr/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/fur/fur.wasm b/lang/fur/fur.wasm index af8dd55f..57c464ee 100644 Binary files a/lang/fur/fur.wasm and b/lang/fur/fur.wasm differ diff --git a/lang/fur/src/hyphenEngine.ts b/lang/fur/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/fur/src/hyphenEngine.ts +++ b/lang/fur/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/ga/ga.wasm b/lang/ga/ga.wasm index c2bace20..7944476f 100644 Binary files a/lang/ga/ga.wasm and b/lang/ga/ga.wasm differ diff --git a/lang/ga/src/hyphenEngine.ts b/lang/ga/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/ga/src/hyphenEngine.ts +++ b/lang/ga/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/gl/gl.wasm b/lang/gl/gl.wasm index 3283d6f5..b9bf3332 100644 Binary files a/lang/gl/gl.wasm and b/lang/gl/gl.wasm differ diff --git a/lang/gl/src/hyphenEngine.ts b/lang/gl/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/gl/src/hyphenEngine.ts +++ b/lang/gl/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/gu/gu.wasm b/lang/gu/gu.wasm index 10b3448e..be4b09bb 100644 Binary files a/lang/gu/gu.wasm and b/lang/gu/gu.wasm differ diff --git a/lang/gu/src/hyphenEngine.ts b/lang/gu/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/gu/src/hyphenEngine.ts +++ b/lang/gu/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/hi/hi.wasm b/lang/hi/hi.wasm index a170545b..c7310688 100644 Binary files a/lang/hi/hi.wasm and b/lang/hi/hi.wasm differ diff --git a/lang/hi/src/hyphenEngine.ts b/lang/hi/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/hi/src/hyphenEngine.ts +++ b/lang/hi/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/hr/hr.wasm b/lang/hr/hr.wasm index 10ae3180..007c8c38 100644 Binary files a/lang/hr/hr.wasm and b/lang/hr/hr.wasm differ diff --git a/lang/hr/src/hyphenEngine.ts b/lang/hr/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/hr/src/hyphenEngine.ts +++ b/lang/hr/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/hsb/hsb.wasm b/lang/hsb/hsb.wasm index fcc24925..ef0b6021 100644 Binary files a/lang/hsb/hsb.wasm and b/lang/hsb/hsb.wasm differ diff --git a/lang/hsb/src/hyphenEngine.ts b/lang/hsb/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/hsb/src/hyphenEngine.ts +++ b/lang/hsb/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/hu/hu.wasm b/lang/hu/hu.wasm index f7dfe0da..8ad53658 100644 Binary files a/lang/hu/hu.wasm and b/lang/hu/hu.wasm differ diff --git a/lang/hu/src/hyphenEngine.ts b/lang/hu/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/hu/src/hyphenEngine.ts +++ b/lang/hu/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/hy/hy.wasm b/lang/hy/hy.wasm index 44194438..1de2cf95 100644 Binary files a/lang/hy/hy.wasm and b/lang/hy/hy.wasm differ diff --git a/lang/hy/src/hyphenEngine.ts b/lang/hy/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/hy/src/hyphenEngine.ts +++ b/lang/hy/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/ia/ia.wasm b/lang/ia/ia.wasm index e2c28e69..4d7c891e 100644 Binary files a/lang/ia/ia.wasm and b/lang/ia/ia.wasm differ diff --git a/lang/ia/src/hyphenEngine.ts b/lang/ia/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/ia/src/hyphenEngine.ts +++ b/lang/ia/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/id/id.wasm b/lang/id/id.wasm index 392aafef..8bfb8774 100644 Binary files a/lang/id/id.wasm and b/lang/id/id.wasm differ diff --git a/lang/id/src/hyphenEngine.ts b/lang/id/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/id/src/hyphenEngine.ts +++ b/lang/id/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/is/is.wasm b/lang/is/is.wasm index f1ae415f..703d29a0 100644 Binary files a/lang/is/is.wasm and b/lang/is/is.wasm differ diff --git a/lang/is/src/hyphenEngine.ts b/lang/is/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/is/src/hyphenEngine.ts +++ b/lang/is/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/it/it.wasm b/lang/it/it.wasm index b9fe9a17..ad91cc7b 100644 Binary files a/lang/it/it.wasm and b/lang/it/it.wasm differ diff --git a/lang/it/src/hyphenEngine.ts b/lang/it/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/it/src/hyphenEngine.ts +++ b/lang/it/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/ka/ka.wasm b/lang/ka/ka.wasm index d0f73b13..538db9ef 100644 Binary files a/lang/ka/ka.wasm and b/lang/ka/ka.wasm differ diff --git a/lang/ka/src/hyphenEngine.ts b/lang/ka/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/ka/src/hyphenEngine.ts +++ b/lang/ka/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/kmr/kmr.wasm b/lang/kmr/kmr.wasm index 5e34644e..6269a945 100644 Binary files a/lang/kmr/kmr.wasm and b/lang/kmr/kmr.wasm differ diff --git a/lang/kmr/src/hyphenEngine.ts b/lang/kmr/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/kmr/src/hyphenEngine.ts +++ b/lang/kmr/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/kn/kn.wasm b/lang/kn/kn.wasm index fe228852..c3d6b332 100644 Binary files a/lang/kn/kn.wasm and b/lang/kn/kn.wasm differ diff --git a/lang/kn/src/hyphenEngine.ts b/lang/kn/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/kn/src/hyphenEngine.ts +++ b/lang/kn/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/la/la.wasm b/lang/la/la.wasm index 42413724..7c6e5cc7 100644 Binary files a/lang/la/la.wasm and b/lang/la/la.wasm differ diff --git a/lang/la/src/hyphenEngine.ts b/lang/la/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/la/src/hyphenEngine.ts +++ b/lang/la/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/lt/lt.wasm b/lang/lt/lt.wasm index a7c8fa48..e7d1f345 100644 Binary files a/lang/lt/lt.wasm and b/lang/lt/lt.wasm differ diff --git a/lang/lt/src/hyphenEngine.ts b/lang/lt/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/lt/src/hyphenEngine.ts +++ b/lang/lt/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/lv/lv.wasm b/lang/lv/lv.wasm index b616a55a..2e1a6894 100644 Binary files a/lang/lv/lv.wasm and b/lang/lv/lv.wasm differ diff --git a/lang/lv/src/hyphenEngine.ts b/lang/lv/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/lv/src/hyphenEngine.ts +++ b/lang/lv/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/mk/mk.wasm b/lang/mk/mk.wasm index d7b8760b..9df5aae1 100644 Binary files a/lang/mk/mk.wasm and b/lang/mk/mk.wasm differ diff --git a/lang/mk/src/hyphenEngine.ts b/lang/mk/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/mk/src/hyphenEngine.ts +++ b/lang/mk/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/ml/ml.wasm b/lang/ml/ml.wasm index 4c7a8945..72e44e8f 100644 Binary files a/lang/ml/ml.wasm and b/lang/ml/ml.wasm differ diff --git a/lang/ml/src/hyphenEngine.ts b/lang/ml/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/ml/src/hyphenEngine.ts +++ b/lang/ml/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/mn-cyrl/mn-cyrl.wasm b/lang/mn-cyrl/mn-cyrl.wasm index ab18d90d..2c01fc53 100644 Binary files a/lang/mn-cyrl/mn-cyrl.wasm and b/lang/mn-cyrl/mn-cyrl.wasm differ diff --git a/lang/mn-cyrl/src/hyphenEngine.ts b/lang/mn-cyrl/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/mn-cyrl/src/hyphenEngine.ts +++ b/lang/mn-cyrl/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/mr/mr.wasm b/lang/mr/mr.wasm index 248bb005..5cd8560f 100644 Binary files a/lang/mr/mr.wasm and b/lang/mr/mr.wasm differ diff --git a/lang/mr/src/hyphenEngine.ts b/lang/mr/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/mr/src/hyphenEngine.ts +++ b/lang/mr/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/nb/nb.wasm b/lang/nb/nb.wasm index 313698b2..258e7a50 100644 Binary files a/lang/nb/nb.wasm and b/lang/nb/nb.wasm differ diff --git a/lang/nb/src/hyphenEngine.ts b/lang/nb/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/nb/src/hyphenEngine.ts +++ b/lang/nb/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/nl/nl.wasm b/lang/nl/nl.wasm index dd4620da..0086daed 100644 Binary files a/lang/nl/nl.wasm and b/lang/nl/nl.wasm differ diff --git a/lang/nl/src/hyphenEngine.ts b/lang/nl/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/nl/src/hyphenEngine.ts +++ b/lang/nl/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/nn/nn.wasm b/lang/nn/nn.wasm index 68f50e5d..8ab1f619 100644 Binary files a/lang/nn/nn.wasm and b/lang/nn/nn.wasm differ diff --git a/lang/nn/src/hyphenEngine.ts b/lang/nn/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/nn/src/hyphenEngine.ts +++ b/lang/nn/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/no/no.wasm b/lang/no/no.wasm index bac12ae5..3e2b128a 100644 Binary files a/lang/no/no.wasm and b/lang/no/no.wasm differ diff --git a/lang/no/src/hyphenEngine.ts b/lang/no/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/no/src/hyphenEngine.ts +++ b/lang/no/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/oc/oc.wasm b/lang/oc/oc.wasm index dc45bdfa..d9cad815 100644 Binary files a/lang/oc/oc.wasm and b/lang/oc/oc.wasm differ diff --git a/lang/oc/src/hyphenEngine.ts b/lang/oc/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/oc/src/hyphenEngine.ts +++ b/lang/oc/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/or/or.wasm b/lang/or/or.wasm index dbabdeb9..8a1f9393 100644 Binary files a/lang/or/or.wasm and b/lang/or/or.wasm differ diff --git a/lang/or/src/hyphenEngine.ts b/lang/or/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/or/src/hyphenEngine.ts +++ b/lang/or/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/pa/pa.wasm b/lang/pa/pa.wasm index 68db5cc6..9b3be5bc 100644 Binary files a/lang/pa/pa.wasm and b/lang/pa/pa.wasm differ diff --git a/lang/pa/src/hyphenEngine.ts b/lang/pa/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/pa/src/hyphenEngine.ts +++ b/lang/pa/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/pi/pi.wasm b/lang/pi/pi.wasm index c9e81445..7ac7d0cd 100644 Binary files a/lang/pi/pi.wasm and b/lang/pi/pi.wasm differ diff --git a/lang/pi/src/hyphenEngine.ts b/lang/pi/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/pi/src/hyphenEngine.ts +++ b/lang/pi/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/pl/pl.wasm b/lang/pl/pl.wasm index 09882ebc..6b1880a6 100644 Binary files a/lang/pl/pl.wasm and b/lang/pl/pl.wasm differ diff --git a/lang/pl/src/hyphenEngine.ts b/lang/pl/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/pl/src/hyphenEngine.ts +++ b/lang/pl/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/pms/pms.wasm b/lang/pms/pms.wasm index ed6ab318..fda56bb4 100644 Binary files a/lang/pms/pms.wasm and b/lang/pms/pms.wasm differ diff --git a/lang/pms/src/hyphenEngine.ts b/lang/pms/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/pms/src/hyphenEngine.ts +++ b/lang/pms/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/pt/pt.wasm b/lang/pt/pt.wasm index 826e0d16..e52ffcee 100644 Binary files a/lang/pt/pt.wasm and b/lang/pt/pt.wasm differ diff --git a/lang/pt/src/hyphenEngine.ts b/lang/pt/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/pt/src/hyphenEngine.ts +++ b/lang/pt/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/rm/rm.wasm b/lang/rm/rm.wasm index 7cdc0a84..04cd16f4 100644 Binary files a/lang/rm/rm.wasm and b/lang/rm/rm.wasm differ diff --git a/lang/rm/src/hyphenEngine.ts b/lang/rm/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/rm/src/hyphenEngine.ts +++ b/lang/rm/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/ro/ro.wasm b/lang/ro/ro.wasm index 1d33a3ce..951c633e 100644 Binary files a/lang/ro/ro.wasm and b/lang/ro/ro.wasm differ diff --git a/lang/ro/src/hyphenEngine.ts b/lang/ro/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/ro/src/hyphenEngine.ts +++ b/lang/ro/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/ru/ru.wasm b/lang/ru/ru.wasm index 02089872..9d21aa8a 100644 Binary files a/lang/ru/ru.wasm and b/lang/ru/ru.wasm differ diff --git a/lang/ru/src/hyphenEngine.ts b/lang/ru/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/ru/src/hyphenEngine.ts +++ b/lang/ru/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/sh-cyrl/sh-cyrl.wasm b/lang/sh-cyrl/sh-cyrl.wasm index d3efd78a..7479532f 100644 Binary files a/lang/sh-cyrl/sh-cyrl.wasm and b/lang/sh-cyrl/sh-cyrl.wasm differ diff --git a/lang/sh-cyrl/src/hyphenEngine.ts b/lang/sh-cyrl/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/sh-cyrl/src/hyphenEngine.ts +++ b/lang/sh-cyrl/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/sh-latn/sh-latn.wasm b/lang/sh-latn/sh-latn.wasm index 5a4a9c73..1aa2096d 100644 Binary files a/lang/sh-latn/sh-latn.wasm and b/lang/sh-latn/sh-latn.wasm differ diff --git a/lang/sh-latn/src/hyphenEngine.ts b/lang/sh-latn/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/sh-latn/src/hyphenEngine.ts +++ b/lang/sh-latn/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/sk/sk.wasm b/lang/sk/sk.wasm index 8de72a73..f81ba732 100644 Binary files a/lang/sk/sk.wasm and b/lang/sk/sk.wasm differ diff --git a/lang/sk/src/hyphenEngine.ts b/lang/sk/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/sk/src/hyphenEngine.ts +++ b/lang/sk/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/sl/sl.wasm b/lang/sl/sl.wasm index 0c8ea8c9..6247970e 100644 Binary files a/lang/sl/sl.wasm and b/lang/sl/sl.wasm differ diff --git a/lang/sl/src/hyphenEngine.ts b/lang/sl/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/sl/src/hyphenEngine.ts +++ b/lang/sl/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/sq/sq.wasm b/lang/sq/sq.wasm index 3d9eed0b..6d5fc8f0 100644 Binary files a/lang/sq/sq.wasm and b/lang/sq/sq.wasm differ diff --git a/lang/sq/src/hyphenEngine.ts b/lang/sq/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/sq/src/hyphenEngine.ts +++ b/lang/sq/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/sr-cyrl/sr-cyrl.wasm b/lang/sr-cyrl/sr-cyrl.wasm index ed80f66f..5da71d85 100644 Binary files a/lang/sr-cyrl/sr-cyrl.wasm and b/lang/sr-cyrl/sr-cyrl.wasm differ diff --git a/lang/sr-cyrl/src/hyphenEngine.ts b/lang/sr-cyrl/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/sr-cyrl/src/hyphenEngine.ts +++ b/lang/sr-cyrl/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/sv/src/hyphenEngine.ts b/lang/sv/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/sv/src/hyphenEngine.ts +++ b/lang/sv/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/sv/sv.wasm b/lang/sv/sv.wasm index c5984cf9..2eb8f2a2 100644 Binary files a/lang/sv/sv.wasm and b/lang/sv/sv.wasm differ diff --git a/lang/ta/src/hyphenEngine.ts b/lang/ta/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/ta/src/hyphenEngine.ts +++ b/lang/ta/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/ta/ta.wasm b/lang/ta/ta.wasm index 0fc3cce9..0faa666f 100644 Binary files a/lang/ta/ta.wasm and b/lang/ta/ta.wasm differ diff --git a/lang/te/src/hyphenEngine.ts b/lang/te/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/te/src/hyphenEngine.ts +++ b/lang/te/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/te/te.wasm b/lang/te/te.wasm index b0d8b482..e95ce882 100644 Binary files a/lang/te/te.wasm and b/lang/te/te.wasm differ diff --git a/lang/th/src/hyphenEngine.ts b/lang/th/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/th/src/hyphenEngine.ts +++ b/lang/th/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/th/th.wasm b/lang/th/th.wasm index 25e13ad9..427200fa 100644 Binary files a/lang/th/th.wasm and b/lang/th/th.wasm differ diff --git a/lang/tk/src/hyphenEngine.ts b/lang/tk/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/tk/src/hyphenEngine.ts +++ b/lang/tk/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/tk/tk.wasm b/lang/tk/tk.wasm index 3393e9d2..ad1b57cf 100644 Binary files a/lang/tk/tk.wasm and b/lang/tk/tk.wasm differ diff --git a/lang/tr/src/hyphenEngine.ts b/lang/tr/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/tr/src/hyphenEngine.ts +++ b/lang/tr/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/tr/tr.wasm b/lang/tr/tr.wasm index e50fc51e..47028bfa 100644 Binary files a/lang/tr/tr.wasm and b/lang/tr/tr.wasm differ diff --git a/lang/uk/src/hyphenEngine.ts b/lang/uk/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/uk/src/hyphenEngine.ts +++ b/lang/uk/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/uk/uk.wasm b/lang/uk/uk.wasm index 856a012d..e5ffc6ac 100644 Binary files a/lang/uk/uk.wasm and b/lang/uk/uk.wasm differ diff --git a/lang/zh-latn-pinyin/src/hyphenEngine.ts b/lang/zh-latn-pinyin/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/lang/zh-latn-pinyin/src/hyphenEngine.ts +++ b/lang/zh-latn-pinyin/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); } diff --git a/lang/zh-latn-pinyin/zh-latn-pinyin.wasm b/lang/zh-latn-pinyin/zh-latn-pinyin.wasm index 4312e3a9..27b5b40d 100644 Binary files a/lang/zh-latn-pinyin/zh-latn-pinyin.wasm and b/lang/zh-latn-pinyin/zh-latn-pinyin.wasm differ diff --git a/patterns/af.wasm b/patterns/af.wasm index 33f89d78..d9159187 100644 Binary files a/patterns/af.wasm and b/patterns/af.wasm differ diff --git a/patterns/as.wasm b/patterns/as.wasm index 5372dae6..c9d1dcff 100644 Binary files a/patterns/as.wasm and b/patterns/as.wasm differ diff --git a/patterns/be.wasm b/patterns/be.wasm index 14036e8f..6b8c9cff 100644 Binary files a/patterns/be.wasm and b/patterns/be.wasm differ diff --git a/patterns/bg.wasm b/patterns/bg.wasm index bc166db5..4cde85d2 100644 Binary files a/patterns/bg.wasm and b/patterns/bg.wasm differ diff --git a/patterns/bn.wasm b/patterns/bn.wasm index 551c4629..2ba95541 100644 Binary files a/patterns/bn.wasm and b/patterns/bn.wasm differ diff --git a/patterns/ca.wasm b/patterns/ca.wasm index 530972ca..73cf4eec 100644 Binary files a/patterns/ca.wasm and b/patterns/ca.wasm differ diff --git a/patterns/cs.wasm b/patterns/cs.wasm index 0ee9554b..b3fdc012 100644 Binary files a/patterns/cs.wasm and b/patterns/cs.wasm differ diff --git a/patterns/cy.wasm b/patterns/cy.wasm index 88fb7ac2..669014df 100644 Binary files a/patterns/cy.wasm and b/patterns/cy.wasm differ diff --git a/patterns/da.wasm b/patterns/da.wasm index 5bb22a2a..88673734 100644 Binary files a/patterns/da.wasm and b/patterns/da.wasm differ diff --git a/patterns/de-x-syllable.wasm b/patterns/de-x-syllable.wasm index 618f0e4a..14fadef0 100644 Binary files a/patterns/de-x-syllable.wasm and b/patterns/de-x-syllable.wasm differ diff --git a/patterns/de.wasm b/patterns/de.wasm index 95e167d6..0608dcba 100644 Binary files a/patterns/de.wasm and b/patterns/de.wasm differ diff --git a/patterns/el-monoton.wasm b/patterns/el-monoton.wasm index cb40d399..4aaa6cc6 100644 Binary files a/patterns/el-monoton.wasm and b/patterns/el-monoton.wasm differ diff --git a/patterns/el-polyton.wasm b/patterns/el-polyton.wasm index 844ae205..793dc6eb 100644 Binary files a/patterns/el-polyton.wasm and b/patterns/el-polyton.wasm differ diff --git a/patterns/en-gb.wasm b/patterns/en-gb.wasm index 792dcd65..47376328 100644 Binary files a/patterns/en-gb.wasm and b/patterns/en-gb.wasm differ diff --git a/patterns/en-us.wasm b/patterns/en-us.wasm index 6cdb9115..d1fff39f 100644 Binary files a/patterns/en-us.wasm and b/patterns/en-us.wasm differ diff --git a/patterns/eo.wasm b/patterns/eo.wasm index 2040192e..df40e7b0 100644 Binary files a/patterns/eo.wasm and b/patterns/eo.wasm differ diff --git a/patterns/es.wasm b/patterns/es.wasm index 94227785..7ae847b1 100644 Binary files a/patterns/es.wasm and b/patterns/es.wasm differ diff --git a/patterns/et.wasm b/patterns/et.wasm index 62aef838..9e9a7228 100644 Binary files a/patterns/et.wasm and b/patterns/et.wasm differ diff --git a/patterns/eu.wasm b/patterns/eu.wasm index d7f77333..0e6c9aaa 100644 Binary files a/patterns/eu.wasm and b/patterns/eu.wasm differ diff --git a/patterns/fi.wasm b/patterns/fi.wasm index 25241d4a..77d6fbc7 100644 Binary files a/patterns/fi.wasm and b/patterns/fi.wasm differ diff --git a/patterns/fo.wasm b/patterns/fo.wasm index a08b903c..1b824be4 100644 Binary files a/patterns/fo.wasm and b/patterns/fo.wasm differ diff --git a/patterns/fr.wasm b/patterns/fr.wasm index 660ee49a..3e002818 100644 Binary files a/patterns/fr.wasm and b/patterns/fr.wasm differ diff --git a/patterns/fur.wasm b/patterns/fur.wasm index af8dd55f..57c464ee 100644 Binary files a/patterns/fur.wasm and b/patterns/fur.wasm differ diff --git a/patterns/ga.wasm b/patterns/ga.wasm index c2bace20..7944476f 100644 Binary files a/patterns/ga.wasm and b/patterns/ga.wasm differ diff --git a/patterns/gl.wasm b/patterns/gl.wasm index 3283d6f5..b9bf3332 100644 Binary files a/patterns/gl.wasm and b/patterns/gl.wasm differ diff --git a/patterns/gu.wasm b/patterns/gu.wasm index 10b3448e..be4b09bb 100644 Binary files a/patterns/gu.wasm and b/patterns/gu.wasm differ diff --git a/patterns/hi.wasm b/patterns/hi.wasm index a170545b..c7310688 100644 Binary files a/patterns/hi.wasm and b/patterns/hi.wasm differ diff --git a/patterns/hr.wasm b/patterns/hr.wasm index 10ae3180..007c8c38 100644 Binary files a/patterns/hr.wasm and b/patterns/hr.wasm differ diff --git a/patterns/hsb.wasm b/patterns/hsb.wasm index fcc24925..ef0b6021 100644 Binary files a/patterns/hsb.wasm and b/patterns/hsb.wasm differ diff --git a/patterns/hu.wasm b/patterns/hu.wasm index f7dfe0da..8ad53658 100644 Binary files a/patterns/hu.wasm and b/patterns/hu.wasm differ diff --git a/patterns/hy.wasm b/patterns/hy.wasm index 44194438..1de2cf95 100644 Binary files a/patterns/hy.wasm and b/patterns/hy.wasm differ diff --git a/patterns/ia.wasm b/patterns/ia.wasm index e2c28e69..4d7c891e 100644 Binary files a/patterns/ia.wasm and b/patterns/ia.wasm differ diff --git a/patterns/id.wasm b/patterns/id.wasm index 392aafef..8bfb8774 100644 Binary files a/patterns/id.wasm and b/patterns/id.wasm differ diff --git a/patterns/is.wasm b/patterns/is.wasm index f1ae415f..703d29a0 100644 Binary files a/patterns/is.wasm and b/patterns/is.wasm differ diff --git a/patterns/it.wasm b/patterns/it.wasm index b9fe9a17..ad91cc7b 100644 Binary files a/patterns/it.wasm and b/patterns/it.wasm differ diff --git a/patterns/ka.wasm b/patterns/ka.wasm index d0f73b13..538db9ef 100644 Binary files a/patterns/ka.wasm and b/patterns/ka.wasm differ diff --git a/patterns/kmr.wasm b/patterns/kmr.wasm index 5e34644e..6269a945 100644 Binary files a/patterns/kmr.wasm and b/patterns/kmr.wasm differ diff --git a/patterns/kn.wasm b/patterns/kn.wasm index fe228852..c3d6b332 100644 Binary files a/patterns/kn.wasm and b/patterns/kn.wasm differ diff --git a/patterns/la.wasm b/patterns/la.wasm index 42413724..7c6e5cc7 100644 Binary files a/patterns/la.wasm and b/patterns/la.wasm differ diff --git a/patterns/lt.wasm b/patterns/lt.wasm index a7c8fa48..e7d1f345 100644 Binary files a/patterns/lt.wasm and b/patterns/lt.wasm differ diff --git a/patterns/lv.wasm b/patterns/lv.wasm index b616a55a..2e1a6894 100644 Binary files a/patterns/lv.wasm and b/patterns/lv.wasm differ diff --git a/patterns/mk.wasm b/patterns/mk.wasm index d7b8760b..9df5aae1 100644 Binary files a/patterns/mk.wasm and b/patterns/mk.wasm differ diff --git a/patterns/ml.wasm b/patterns/ml.wasm index 4c7a8945..72e44e8f 100644 Binary files a/patterns/ml.wasm and b/patterns/ml.wasm differ diff --git a/patterns/mn-cyrl.wasm b/patterns/mn-cyrl.wasm index ab18d90d..2c01fc53 100644 Binary files a/patterns/mn-cyrl.wasm and b/patterns/mn-cyrl.wasm differ diff --git a/patterns/mr.wasm b/patterns/mr.wasm index 248bb005..5cd8560f 100644 Binary files a/patterns/mr.wasm and b/patterns/mr.wasm differ diff --git a/patterns/nb.wasm b/patterns/nb.wasm index 313698b2..258e7a50 100644 Binary files a/patterns/nb.wasm and b/patterns/nb.wasm differ diff --git a/patterns/nl.wasm b/patterns/nl.wasm index dd4620da..0086daed 100644 Binary files a/patterns/nl.wasm and b/patterns/nl.wasm differ diff --git a/patterns/nn.wasm b/patterns/nn.wasm index 68f50e5d..8ab1f619 100644 Binary files a/patterns/nn.wasm and b/patterns/nn.wasm differ diff --git a/patterns/no.wasm b/patterns/no.wasm index bac12ae5..3e2b128a 100644 Binary files a/patterns/no.wasm and b/patterns/no.wasm differ diff --git a/patterns/oc.wasm b/patterns/oc.wasm index dc45bdfa..d9cad815 100644 Binary files a/patterns/oc.wasm and b/patterns/oc.wasm differ diff --git a/patterns/or.wasm b/patterns/or.wasm index dbabdeb9..8a1f9393 100644 Binary files a/patterns/or.wasm and b/patterns/or.wasm differ diff --git a/patterns/pa.wasm b/patterns/pa.wasm index 68db5cc6..9b3be5bc 100644 Binary files a/patterns/pa.wasm and b/patterns/pa.wasm differ diff --git a/patterns/pi.wasm b/patterns/pi.wasm index c9e81445..7ac7d0cd 100644 Binary files a/patterns/pi.wasm and b/patterns/pi.wasm differ diff --git a/patterns/pl.wasm b/patterns/pl.wasm index 09882ebc..6b1880a6 100644 Binary files a/patterns/pl.wasm and b/patterns/pl.wasm differ diff --git a/patterns/pms.wasm b/patterns/pms.wasm index ed6ab318..fda56bb4 100644 Binary files a/patterns/pms.wasm and b/patterns/pms.wasm differ diff --git a/patterns/pt.wasm b/patterns/pt.wasm index 826e0d16..e52ffcee 100644 Binary files a/patterns/pt.wasm and b/patterns/pt.wasm differ diff --git a/patterns/rm.wasm b/patterns/rm.wasm index 7cdc0a84..04cd16f4 100644 Binary files a/patterns/rm.wasm and b/patterns/rm.wasm differ diff --git a/patterns/ro.wasm b/patterns/ro.wasm index 1d33a3ce..951c633e 100644 Binary files a/patterns/ro.wasm and b/patterns/ro.wasm differ diff --git a/patterns/ru.wasm b/patterns/ru.wasm index 02089872..9d21aa8a 100644 Binary files a/patterns/ru.wasm and b/patterns/ru.wasm differ diff --git a/patterns/sh-cyrl.wasm b/patterns/sh-cyrl.wasm index d3efd78a..7479532f 100644 Binary files a/patterns/sh-cyrl.wasm and b/patterns/sh-cyrl.wasm differ diff --git a/patterns/sh-latn.wasm b/patterns/sh-latn.wasm index 5a4a9c73..1aa2096d 100644 Binary files a/patterns/sh-latn.wasm and b/patterns/sh-latn.wasm differ diff --git a/patterns/sk.wasm b/patterns/sk.wasm index 8de72a73..f81ba732 100644 Binary files a/patterns/sk.wasm and b/patterns/sk.wasm differ diff --git a/patterns/sl.wasm b/patterns/sl.wasm index 0c8ea8c9..6247970e 100644 Binary files a/patterns/sl.wasm and b/patterns/sl.wasm differ diff --git a/patterns/sq.wasm b/patterns/sq.wasm index 3d9eed0b..6d5fc8f0 100644 Binary files a/patterns/sq.wasm and b/patterns/sq.wasm differ diff --git a/patterns/sr-cyrl.wasm b/patterns/sr-cyrl.wasm index ed80f66f..5da71d85 100644 Binary files a/patterns/sr-cyrl.wasm and b/patterns/sr-cyrl.wasm differ diff --git a/patterns/sv.wasm b/patterns/sv.wasm index c5984cf9..2eb8f2a2 100644 Binary files a/patterns/sv.wasm and b/patterns/sv.wasm differ diff --git a/patterns/ta.wasm b/patterns/ta.wasm index 0fc3cce9..0faa666f 100644 Binary files a/patterns/ta.wasm and b/patterns/ta.wasm differ diff --git a/patterns/te.wasm b/patterns/te.wasm index b0d8b482..e95ce882 100644 Binary files a/patterns/te.wasm and b/patterns/te.wasm differ diff --git a/patterns/th.wasm b/patterns/th.wasm index 25e13ad9..427200fa 100644 Binary files a/patterns/th.wasm and b/patterns/th.wasm differ diff --git a/patterns/tk.wasm b/patterns/tk.wasm index 3393e9d2..ad1b57cf 100644 Binary files a/patterns/tk.wasm and b/patterns/tk.wasm differ diff --git a/patterns/tr.wasm b/patterns/tr.wasm index e50fc51e..47028bfa 100644 Binary files a/patterns/tr.wasm and b/patterns/tr.wasm differ diff --git a/patterns/uk.wasm b/patterns/uk.wasm index 856a012d..e5ffc6ac 100644 Binary files a/patterns/uk.wasm and b/patterns/uk.wasm differ diff --git a/patterns/zh-latn-pinyin.wasm b/patterns/zh-latn-pinyin.wasm index 4312e3a9..27b5b40d 100644 Binary files a/patterns/zh-latn-pinyin.wasm and b/patterns/zh-latn-pinyin.wasm differ diff --git a/src/hyphenEngine.ts b/src/hyphenEngine.ts index a71e1347..8f6fc9e5 100644 --- a/src/hyphenEngine.ts +++ b/src/hyphenEngine.ts @@ -276,10 +276,10 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { let posInByte: i32 = 0; let pos: i32 = 0; let firstPos: i32 = 0; - - do { + + while (run < 2) { ith += run; - do { + while (count < ith) { if (bytePos > endByte) { return 0; } @@ -287,16 +287,14 @@ function select(ith: i32, startByte: i32, endByte: i32): i32 { dWord0Count = 64 - popcnt(dWord); count += dWord0Count; bytePos += 8; - } while (count < ith); - count -= dWord0Count; - bytePos -= 8; - posInByte = get0PosInDWord(dWord, ith - count); - pos = ((bytePos - startByte) << 3) + posInByte; + } + posInByte = get0PosInDWord(dWord, ith - (count - dWord0Count)); + pos = ((bytePos - 8 - startByte) << 3) + posInByte; if (run === 0) { firstPos = pos; } run += 1; - } while (run < 2); + } return (firstPos << 8) + (pos - firstPos - 1); }