Skip to content

Idea: Expose CompilationPolicy/FindMethodSpec to enable better testing of structural features #18

@hyperpape

Description

@hyperpape

The DFAClassBuilder has several different ways of compiling a DFA to a Java class. The choice of which optimizations to apply is extremely important for performance, and can be easily modified by changes that don't break any functional tests.

We currently avoid regressions using the SnapshotTests, and the benchmarks. These are reasonably effective, but the benchmarks are too slow for the edit-compile-test cycle, and creating dozens of snapshot tests seems likely to become cumbersome (they produce binary files included in the repository, and the output when they fail is JVM bytecode diffs).

An alternate approach would be to allow tests to access the FindMethodSpec and CompilationPolicy from the DFAClassBuilder and make assertions about it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions