Commit 9016235
authored
Remove source map 'names' field support (emscripten-core#26149)
We used 'names' field to encode the enclosing function name of a given
offset, so that we can provide the correct source location + function
info that can be used in displaying stack traces.
I wasn't aware JS uses it for a very different purpose. JS uses it to
display original variable/function names for minified names. In JS an
'offset' is a location in the minified JS code, and if that location
happens to point to a minified variable name `a` whose original name was
`apple`, its mapping contains `apple`.
So while we can use this field to support emsymbolizer, the browser
devtools is unlikely to ever implement the support for our 'names' field
for stack traces, which is basically unrelated from what JS does.
So this removes the support for the 'names' field. But it doesn't
actually remove the implementation; it just puts it behind a fake flag
that is set to `False` for now. The reason is, we want to provide this
function info anyway for better stack traces support, and "Scopes"
proposal for source maps, which was recently added, seems designed for
this purpose. And I think we can reuse much of our current
implementation (`extract_func_ranges`) to generate that format.
Fixes emscripten-core#26100.1 parent aad5488 commit 9016235
3 files changed
+32
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9651 | 9651 | | |
9652 | 9652 | | |
9653 | 9653 | | |
9654 | | - | |
| 9654 | + | |
| 9655 | + | |
9655 | 9656 | | |
9656 | 9657 | | |
9657 | 9658 | | |
9658 | 9659 | | |
9659 | | - | |
9660 | | - | |
9661 | | - | |
| 9660 | + | |
| 9661 | + | |
| 9662 | + | |
| 9663 | + | |
9662 | 9664 | | |
9663 | 9665 | | |
9664 | 9666 | | |
9665 | 9667 | | |
9666 | | - | |
| 9668 | + | |
9667 | 9669 | | |
9668 | 9670 | | |
9669 | | - | |
9670 | | - | |
9671 | | - | |
9672 | | - | |
| 9671 | + | |
| 9672 | + | |
9673 | 9673 | | |
9674 | 9674 | | |
9675 | | - | |
9676 | | - | |
9677 | | - | |
9678 | 9675 | | |
9679 | 9676 | | |
9680 | | - | |
| 9677 | + | |
9681 | 9678 | | |
9682 | | - | |
9683 | | - | |
| 9679 | + | |
9684 | 9680 | | |
9685 | 9681 | | |
9686 | 9682 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
| |||
399 | 402 | | |
400 | 403 | | |
401 | 404 | | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
408 | 416 | | |
409 | 417 | | |
410 | 418 | | |
| |||
481 | 489 | | |
482 | 490 | | |
483 | 491 | | |
484 | | - | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
485 | 496 | | |
486 | 497 | | |
487 | 498 | | |
| |||
0 commit comments