Skip to content

Some implementation details are dictated by Kotlin/Native shortcomings #5

Closed
@dkhalanskyjb

Description

@dkhalanskyjb
  • In several places, x in A..B is replaced with the non-idiomatic x >= A && x <= B. This is due to the fact that Kotlin/Native does not yet optimize such constructs outside of for-loops. In particular, in LocalTime#ofSecondOfDay about half the time of the function execution was spent in argument validity checks, allocating several objects in the meantime. https://youtrack.jetbrains.com/issue/KT-38787
  • Parsers are not singleton objects but are instead functions that return newly-constructed parsers. This is done to sidestep a bug that led to an unchecked null value dereferencing as a result of wrong initialization order of values: parser A, referencing parser B, was being initialized before B, which led to it dereferencing a null value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions