summaryrefslogtreecommitdiff
path: root/ast.c
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2021-06-08 13:22:27 +0900
committerYusuke Endoh <mame@ruby-lang.org>2021-06-18 03:35:38 +0900
commitea6062898ad0d66ede0a1866028c0605c357e2cb (patch)
treeede5a37dd7a2490d424c408dc3e230cd2e17df8b /ast.c
parented3e30fc09b79d025cdcaedd7bc10b04fd8514fe (diff)
Remove LOCATION_TYPE_ISEQ_CALCED state from Backtrace::Location
Previously Backtrace::Location had two possible states: LOCATION_TYPE_ISEQ and LOCATION_TYPE_ISEQ_CALCED. The former had the location information as PC, and the latter had it as lineno. Once lineno was caluculated, the state was changed to LOCATION_TYPE_ISEQ_CALCED and the caluculated result was kept. This change removes LOCATION_TYPE_ISEQ_CALCED, so lineno is calculated whenever it is needed. It will be slow a little, but lineno is typically needed only when its backtrace is shown, so I believe that it does not matter. This is a preparation to add column information to Backtrace::Location because PC is needed to caluculate node_id for AST::Node even after lineno is calculated. This change is approved by ko1.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4558
Diffstat (limited to 'ast.c')
0 files changed, 0 insertions, 0 deletions