Closed Bug 1480020 Opened 6 years ago Closed 6 years ago

Make jit::Relocation an enum class

Categories

(Core :: JavaScript Engine: JIT, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: anba, Assigned: anba)

Details

Attachments

(1 file, 1 obsolete file)

      No description provided.
Attached patch bug1480020.patch (obsolete) — Splinter Review
Looks like an enum class, is used like an enum class, so it's probably an enum class.
Attachment #8996637 - Flags: review?(tcampbell)
Comment on attachment 8996637 [details] [diff] [review]
bug1480020.patch

Review of attachment 8996637 [details] [diff] [review]:
-----------------------------------------------------------------

Converting to an enum class is a good idea, but I think the final type should be renamed to RelocationKind.

r=me if you s/Relocation/RelocationKind/. There are not a lot of uses to change.
Attachment #8996637 - Flags: review?(tcampbell) → review+
(In reply to Ted Campbell [:tcampbell] from comment #2)
> Converting to an enum class is a good idea, but I think the final type
> should be renamed to RelocationKind.
> 
> r=me if you s/Relocation/RelocationKind/. There are not a lot of uses to
> change.

With RelocationKind as the type name, do you prefer if the RelocationKind member of RelativePatch sticks with its current name ("kind") [1], too? (In the patch the field name was changed to "relocation" to match the type name.)

[1] https://searchfox.org/mozilla-central/rev/196560b95f191b48ff7cba7c2ba9237bba6b5b6a/js/src/jit/x86-shared/Assembler-x86-shared.h#258
Flags: needinfo?(tcampbell)
(In reply to André Bargull [:anba] from comment #3)
> With RelocationKind as the type name, do you prefer if the RelocationKind
> member of RelativePatch sticks with its current name ("kind") [1], too? (In
> the patch the field name was changed to "relocation" to match the type name.)

Yes, revert this back to 'kind' please :)
Flags: needinfo?(tcampbell)
Attached patch bug1480020.patchSplinter Review
Updated per review comments, carrying r+.
Attachment #8996637 - Attachment is obsolete: true
Attachment #8997138 - Flags: review+
Pushed by cbrindusan@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/994e5a4714a2
Change js::jit::Relocation into an enum class. r=tcampbell
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/994e5a4714a2
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: