Closed Bug 787760 Opened 9 years ago Closed 9 years ago

use strong enum class for StrictModeState

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: Benjamin, Assigned: Benjamin)

Details

Attachments

(1 file)

MFBT now has macros for strong enumerations. StrictMode::StrictModeState should take advantage of this to avoid using a namespace for scoping the enumeration.
Assignee: general → benjamin
Attachment #657628 - Flags: review?(n.nethercote)
Comment on attachment 657628 [details] [diff] [review]
convert to strong enum

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

This is fine.

Relatedly:  the strict mode/defaults handling is the only thing keeping FunctionBox::{siblings,kids} and ParseContext::functionList alive, and the former two are a problem for lazy bytecode.  Benjamin, do you see any way siblings/kids could be removed?  In bug 769072 comment 2 and bug 769072 comment 6 you mentioned alternative ways to handle strict mode in the presence of defaults... I wonder if we should have taken one of the other routes.
Attachment #657628 - Flags: review?(n.nethercote) → review+
https://hg.mozilla.org/mozilla-central/rev/1272677b5816
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in before you can comment on or make changes to this bug.