Bug 143384 - Some JSC Options refactoring and enhancements
Summary: Some JSC Options refactoring and enhancements
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-03 13:09 PDT by Mark Lam
Modified: 2015-04-03 14:03 PDT (History)
8 users (show)

See Also:


Attachments
the patch. (10.85 KB, patch)
2015-04-03 13:35 PDT, Mark Lam
benjamin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>.