Bug 143384

Summary: Some JSC Options refactoring and enhancements
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, commit-queue, fpizlo, ggaren, mhahnenb, mmirman, msaboff, oliver
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
the patch. benjamin: review+

Description Mark Lam 2015-04-03 13:09:22 PDT
Create a better encapsulated Option class to make working with options easier.  This is a building block towards a JIT policy scaling debugging option I will introduce later.

This work entails:
1. Convert Options::Option into a public class Option (who works closely with Options).
2. Convert Options::EntryType into an enum class Options::Type and make it public.
3. Renamed Options::OPT_<option name> to Options::<option name>ID because it reads better.
4. Add misc methods to class Option to make it more useable.
Comment 1 Mark Lam 2015-04-03 13:35:55 PDT
Created attachment 250095 [details]
the patch.
Comment 2 WebKit Commit Bot 2015-04-03 13:37:17 PDT
Attachment 250095 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/runtime/Options.h:324:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/runtime/Options.h:331:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/runtime/Options.h:332:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/runtime/Options.h:333:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/runtime/Options.h:334:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/runtime/Options.h:335:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/runtime/Options.h:336:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/runtime/Options.h:337:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
Total errors found: 8 in 3 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Mark Lam 2015-04-03 13:39:48 PDT
(In reply to comment #2)
> Attachment 250095 [details] did not pass style-queue:

FYI, these style violations are intentional and needed to be able to automtically synthesize Options functions via macros.  These warning only surfaced because I moved the Options::EntryType enums into the new Options::Type enums.
Comment 4 Benjamin Poulain 2015-04-03 13:59:10 PDT
Comment on attachment 250095 [details]
the patch.

Sure, rs=me
Comment 5 Mark Lam 2015-04-03 14:03:06 PDT
Thanks.  Landed in r182331: <http://trac.webkit.org/r182331>.