Project

General

Profile

Actions

Misc #20260

closed

ISEQ flag for prism compiler

Added by kddnewton (Kevin Newton) 3 months ago. Updated 3 months ago.

Status:
Closed
Assignee:
-
[ruby-core:116681]

Description

In order to support error highlight, there's needs to be a way to tell which compiler generated an instruction sequence (compile.c or prism_compile.c). That's because when the file is reparsed to find the node based on the node id, we need to know which parser to use. We can't look at the current parser because it may have been dumped to binary and the parser/compile pair might not match up to the current running process.

I would like to add a flag to rb_iseq_constant_body that indicates it came from prism, as well as the :prism hash key to the misc hash in the array form of iseqs. This will allow us to determine the source of the iseq from both C and Ruby.

Since this is user-facing (albeit from an experimental library that shouldn't be relied upon) I wanted to make sure this way okay before merging.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0