Closed Bug 1685836 Opened 5 years ago Closed 5 years ago

Use object literal for JSON dump for array where its elements are referred by index

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
86 Branch
Tracking Status
firefox86 --- fixed

People

(Reporter: arai, Assigned: arai)

References

(Blocks 1 open bug)

Details

Attachments

(11 files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

stencil's JSON dump currently uses list (array) for vector/span,
but some of them are referred by index (RegExp, Scope, etc).
it's better dumping them as following:

   "ScopeData": {
     "ScopeIndex(0)": {
      "kind": "global",
       ...
     },
     "ScopeIndex(1)": {
      "kind": "lexical",
      ...
     }
   }

so that the reference like the following is clearer which item it points:

      "gcThings": [
        "ScopeIndex(0)",
        "ScopeIndex(1)"
      ],

While you are here, can you add the missing args.rval().setUndefined(); to https://searchfox.org/mozilla-central/rev/dd7de907becd732c4d9f4ac321a911e6466e8144/js/src/shell/js.cpp#5578

Currently there is an extra function dumpStencil() { [native code] } message in the shell

Assignee: nobody → arai.unmht
Status: NEW → ASSIGNED
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/f4632de3fbef Part 1: Use object literal for regExpData dump. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/cc26e1db4187 Part 2: Use object literal for bigIntData dump. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/0890bbb50268 Part 3: Use object literal for objLiteralData dump. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/38ec7ac8084a Part 4: Use object literal for scopeData dump. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/c9e9d57a8815 Part 5: Use explicit ScriptIndex notation for sharedData dump. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/268730dc367e Part 6: Use object literal for scriptData dump. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/f79d48597efc Part 7: Use object literal for scriptExtra dump. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/6df8537b71d5 Part 8: Use ScriptIndex notation for asmJS dump. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/c18597050dd5 Part 9: Use object literal for trailingNames dump. r=tcampbell https://hg.mozilla.org/integration/autoland/rev/f7e5d9c17630 Part 10: Add missing args.rval().setUndefined(). r=tcampbell https://hg.mozilla.org/integration/autoland/rev/91371e0589f2 Part 11: Remove trailing underscore from json dump. r=tcampbell
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: