Skip to content

Build and use static debug info to show local variables in backtrace #96

@stephanemagnenat

Description

@stephanemagnenat

Currently, in release mode, Ferlium only shows functions in the backtrace upon an execution error. In debug mode, it also shows the local variable names, but it achieves that by modifying the IR instructions to maintain this locals vector, which is slow and does not scale to release mode.

A better solution is to build a static debug information data structure, that maps local names to spans (and later to instruction index), and use this structure to look the local names up when printing the backtrace, regardless of the mode.

This will also allow to scale this display up to lower IR than the current tree-based IR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    error messagesMake users understand why their code is wrong

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions