Skip to content

Commit

Permalink
formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
auduchinok authored and DedSec256 committed Sep 6, 2023
1 parent 5642886 commit 04534f9
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions src/Compiler/AbstractIL/ilread.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1238,6 +1238,7 @@ let seekReadIndexedRowsRange numRows binaryChop (reader: ISeekReadIndexedRowRead
fin <- true
else
reader.GetRow(curr, &row)

if reader.CompareKey(reader.GetKey(&row)) = 0 then
startRid <- curr
else
Expand All @@ -1256,6 +1257,7 @@ let seekReadIndexedRowsRange numRows binaryChop (reader: ISeekReadIndexedRowRead
fin <- true
else
reader.GetRow(curr, &row)

if reader.CompareKey(reader.GetKey(&row)) = 0 then
endRid <- curr
else
Expand All @@ -1265,16 +1267,21 @@ let seekReadIndexedRowsRange numRows binaryChop (reader: ISeekReadIndexedRowRead

else
let mutable rid = 1

while rid <= numRows && startRid = -1 do
reader.GetRow(rid, &row)

if reader.CompareKey(reader.GetKey(&row)) = 0 then
startRid <- rid
endRid <- rid

rid <- rid + 1

let mutable fin = false

while not fin do
reader.GetRow(rid, &row)

if reader.CompareKey(reader.GetKey(&row)) = 0 then
endRid <- rid
else
Expand All @@ -1284,12 +1291,15 @@ let seekReadIndexedRowsRange numRows binaryChop (reader: ISeekReadIndexedRowRead

let seekReadIndexedRowsByInterface numRows binaryChop (reader: ISeekReadIndexedRowReader<'RowT, _, _>) =
let startRid, endRid = seekReadIndexedRowsRange numRows binaryChop reader
if startRid < 0 || endRid < startRid then [||] else

Array.init (endRid - startRid + 1) (fun i ->
let mutable row = Unchecked.defaultof<'RowT>
reader.GetRow(startRid + i, &row)
reader.ConvertRow(&row))
if startRid < 0 || endRid < startRid then
[||]
else

Array.init (endRid - startRid + 1) (fun i ->
let mutable row = Unchecked.defaultof<'RowT>
reader.GetRow(startRid + i, &row)
reader.ConvertRow(&row))

[<Struct>]
type CustomAttributeRow =
Expand Down

0 comments on commit 04534f9

Please sign in to comment.