Closed Bug 1608629 Opened 4 years ago Closed 4 years ago

Split up builtin/Promise.*

Categories

(Core :: JavaScript Engine, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: Waldo, Assigned: Waldo)

Details

Attachments

(1 file)

Changes to builtin/Promise.h effectively rebuild the world. JSRuntime needs OffThreadPromiseRuntimeState's definition, various headers want PromiseObject but don't much care about anything else, vm/Realm.h wants PromiseLookup (and nothing else) (and nothing else wants PromiseLookup), and so on.

If we split out PromiseLookup and OffThreadPromiseTask/OffThreadPromiseRuntimeState and PromiseObject to separate headers (and implementations to separate files, although this is more a matter of cleanliness than necessity), we have to rebuild a whole lot less stuff when something in promise code changes. Let's do that.

I went with the new headers

  • vm/PromiseLookup.h
  • vm/PromiseObject.h
  • vm/OffThreadPromiseRuntimeState.h

for this. We do not have clear rules about when to have *Object.h files live in builtin/ versus vm/. I concluded object layout info is more structural than stdlib-ish, so I put the object header in vm/. The other two seem pretty clearly vm/ without much to debate there.

Assignee: nobody → jwalden
Status: NEW → ASSIGNED
Pushed by jwalden@mit.edu:
https://hg.mozilla.org/integration/autoland/rev/488210936716
Split builtin/Promise.* into several different headers/files so that touching builtin/Promise.h doesn't rebuild the world.  r=arai
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: