mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-28 09:08:04 +00:00
Moves the internal stack to use a pointer stack instead of the native array for improved performance (#8891)
Remove custom flags for native arrays when using flexbuffers on Wasm Co-authored-by: Wouter van Oortmerssen <aardappel@gmail.com>
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Common
|
||||
import Foundation
|
||||
|
||||
enum FlexBuffersErrors: Error {
|
||||
@@ -23,6 +24,10 @@ enum FlexBuffersErrors: Error {
|
||||
|
||||
@inline(__always)
|
||||
public func getRoot(buffer: ByteBuffer) throws -> Reference? {
|
||||
assert(
|
||||
isLitteEndian,
|
||||
"Swift FlexBuffers currently only supports little-endian systems")
|
||||
|
||||
let end = buffer.count
|
||||
if buffer.count < 3 {
|
||||
throw FlexBuffersErrors.sizeOfBufferIsTooSmall
|
||||
|
||||
Reference in New Issue
Block a user