tc39 / source-map

Source map specification, RFCs and new proposals.
https://tc39.es/source-map/
Other
130 stars 17 forks source link

Scopes: what is `GeneratedRange.isScope`? #112

Open connor4312 opened 5 months ago

connor4312 commented 5 months ago

It's missing jsdocs and I don't see it referenced in text/issues anywhere, was curious 🙂

szuend commented 3 months ago

Initially this was planned to mark generated ranges that are actual JS scopes in the generated code (opposed to e.g. an inlined function body). But it turned out that debuggers don't really need this info.

I propose a change with #114 where we re-use the flag to mean "this generated range is a function/arrow function/constructor in the generated code (aka it can be called)". This would allow stack trace processors to effectively determine whether a stack frame can be omitted or not.