Bug 133399

Summary: Allow enum guards to be generated from the replay json files
Product: WebKit Reporter: Zsolt Borbely <zsborbely.u-szeged>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: burg, commit-queue, timothy
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Proposed patch
ossy: review-, ossy: commit-queue-
Proposed patch none

Description Zsolt Borbely 2014-05-30 01:10:17 PDT
$ Tools/Scripts/build-webkit --efl --web-replay
...
[ 12%] In file included from /home/bzsolt/webkit/EflWebKit/WebKitBuild/Release/DerivedSources/JavaScriptCore/JSReplayInputs.h:34:0,
                 from /home/bzsolt/webkit/EflWebKit/Source/JavaScriptCore/runtime/JSGlobalObject.cpp:135:
/home/bzsolt/webkit/EflWebKit/Source/JavaScriptCore/replay/EncodedValue.h:159:19: error: redefinition of 'struct JSC::EncodingTraits<long unsigned int>'
/home/bzsolt/webkit/EflWebKit/Source/JavaScriptCore/replay/EncodedValue.h:158:19: error: previous definition of 'struct JSC::EncodingTraits<long unsigned int>'
Comment 1 Zsolt Borbely 2014-05-30 01:15:43 PDT
Created attachment 232283 [details]
Proposed patch
Comment 2 Zsolt Borbely 2014-05-30 02:26:51 PDT
(In reply to comment #0)
> $ Tools/Scripts/build-webkit --efl --web-replay
> ...
> [ 12%] In file included from /home/bzsolt/webkit/EflWebKit/WebKitBuild/Release/DerivedSources/JavaScriptCore/JSReplayInputs.h:34:0,
>                  from /home/bzsolt/webkit/EflWebKit/Source/JavaScriptCore/runtime/JSGlobalObject.cpp:135:
> /home/bzsolt/webkit/EflWebKit/Source/JavaScriptCore/replay/EncodedValue.h:159:19: error: redefinition of 'struct JSC::EncodingTraits<long unsigned int>'
> /home/bzsolt/webkit/EflWebKit/Source/JavaScriptCore/replay/EncodedValue.h:158:19: error: previous definition of 'struct JSC::EncodingTraits<long unsigned int>'

Oops the description is wrong, the correct output:

/home/bzsolt/webkit/EflWebKit/WebKitBuild/Release/DerivedSources/WebCore/WebReplayInputs.cpp: In static member function ‘static JSC::EncodedValue JSC::EncodingTraits<WebCore::PlatformWheelEventPhase>::encodeValue(const WebCore::PlatformWheelEventPhase&)’:
/home/bzsolt/webkit/EflWebKit/WebKitBuild/Release/DerivedSources/WebCore/WebReplayInputs.cpp:744:21: error: ‘PlatformWheelEventPhaseNone’ is not a member of ‘WebCore’
     if (enumValue & WebCore::PlatformWheelEventPhaseNone) {
                     ^
/home/bzsolt/webkit/EflWebKit/WebKitBuild/Release/DerivedSources/WebCore/WebReplayInputs.cpp:746:26: error: ‘PlatformWheelEventPhaseNone’ is not a member of ‘WebCore’
         if (enumValue == WebCore::PlatformWheelEventPhaseNone)
                          ^
/home/bzsolt/webkit/EflWebKit/WebKitBuild/Release/DerivedSources/WebCore/WebReplayInputs.cpp:749:21: error: ‘PlatformWheelEventPhaseBegan’ is not a member of ‘WebCore’
     if (enumValue & WebCore::PlatformWheelEventPhaseBegan) {
                     ^
/home/bzsolt/webkit/EflWebKit/WebKitBuild/Release/DerivedSources/WebCore/WebReplayInputs.cpp:751:26: error: ‘PlatformWheelEventPhaseBegan’ is not a member of ‘WebCore’
         if (enumValue == WebCore::PlatformWheelEventPhaseBegan)
                          ^
/home/bzsolt/webkit/EflWebKit/WebKitBuild/Release/DerivedSources/WebCore/WebReplayInputs.cpp:754:21: error: ‘PlatformWheelEventPhaseStationary’ is not a member of ‘WebCore’
     if (enumValue & WebCore::PlatformWheelEventPhaseStationary) {
                     ^
/home/bzsolt/webkit/EflWebKit/WebKitBuild/Release/DerivedSources/WebCore/WebReplayInputs.cpp:756:26: error: ‘PlatformWheelEventPhaseStationary’ is not a member of ‘WebCore’
         if (enumValue == WebCore::PlatformWheelEventPhaseStationary)
                          ^
/home/bzsolt/webkit/EflWebKit/WebKitBuild/Release/DerivedSources/WebCore/WebReplayInputs.cpp:759:21: error: ‘PlatformWheelEventPhaseChanged’ is not a member of ‘WebCore’
     if (enumValue & WebCore::PlatformWheelEventPhaseChanged) {
                     ^
/home/bzsolt/webkit/EflWebKit/WebKitBuild/Release/DerivedSources/WebCore/WebReplayInputs.cpp:761:26: error: ‘PlatformWheelEventPhaseChanged’ is not a member of ‘WebCore’
         if (enumValue == WebCore::PlatformWheelEventPhaseChanged)
                          ^
/home/bzsolt/webkit/EflWebKit/WebKitBuild/Release/DerivedSources/WebCore/WebReplayInputs.cpp:764:21: error: ‘PlatformWheelEventPhaseEnded’ is not a member of ‘WebCore’
     if (enumValue & WebCore::PlatformWheelEventPhaseEnded) {
                     ^
/home/bzsolt/webkit/EflWebKit/WebKitBuild/Release/DerivedSources/WebCore/WebReplayInputs.cpp:766:26: error: ‘PlatformWheelEventPhaseEnded’ is not a member of ‘WebCore’
         if (enumValue == WebCore::PlatformWheelEventPhaseEnded)
                          ^
/home/bzsolt/webkit/EflWebKit/WebKitBuild/Release/DerivedSources/WebCore/WebReplayInputs.cpp:769:21: error: ‘PlatformWheelEventPhaseCancelled’ is not a member of ‘WebCore’
     if (enumValue & WebCore::PlatformWheelEventPhaseCancelled) {
                     ^
/home/bzsolt/webkit/EflWebKit/WebKitBuild/Release/DerivedSources/WebCore/WebReplayInputs.cpp:771:26: error: ‘PlatformWheelEventPhaseCancelled’ is not a member of ‘WebCore’
         if (enumValue == WebCore::PlatformWheelEventPhaseCancelled)
                          ^
/home/bzsolt/webkit/EflWebKit/WebKitBuild/Release/DerivedSources/WebCore/WebReplayInputs.cpp:774:21: error: ‘PlatformWheelEventPhaseMayBegin’ is not a member of ‘WebCore’
     if (enumValue & WebCore::PlatformWheelEventPhaseMayBegin) {
                     ^
/home/bzsolt/webkit/EflWebKit/WebKitBuild/Release/DerivedSources/WebCore/WebReplayInputs.cpp:776:26: error: ‘PlatformWheelEventPhaseMayBegin’ is not a member of ‘WebCore’
         if (enumValue == WebCore::PlatformWheelEventPhaseMayBegin)
                          ^
/home/bzsolt/webkit/EflWebKit/WebKitBuild/Release/DerivedSources/WebCore/WebReplayInputs.cpp: In static member function ‘static bool JSC::EncodingTraits<WebCore::PlatformWheelEventPhase>::decodeValue(JSC::EncodedValue&, WebCore::PlatformWheelEventPhase&)’:
/home/bzsolt/webkit/EflWebKit/WebKitBuild/Release/DerivedSources/WebCore/WebReplayInputs.cpp:790:83: error: ‘PlatformWheelEventPhaseNone’ is not a member of ‘WebCore’
             enumValue = static_cast<WebCore::PlatformWheelEventPhase>(enumValue | WebCore::PlatformWheelEventPhaseNone);
                                                                                   ^
/home/bzsolt/webkit/EflWebKit/WebKitBuild/Release/DerivedSources/WebCore/WebReplayInputs.cpp:792:83: error: ‘PlatformWheelEventPhaseBegan’ is not a member of ‘WebCore’
             enumValue = static_cast<WebCore::PlatformWheelEventPhase>(enumValue | WebCore::PlatformWheelEventPhaseBegan);
                                                                                   ^
/home/bzsolt/webkit/EflWebKit/WebKitBuild/Release/DerivedSources/WebCore/WebReplayInputs.cpp:794:83: error: ‘PlatformWheelEventPhaseStationary’ is not a member of ‘WebCore’
             enumValue = static_cast<WebCore::PlatformWheelEventPhase>(enumValue | WebCore::PlatformWheelEventPhaseStationary);
                                                                                   ^
/home/bzsolt/webkit/EflWebKit/WebKitBuild/Release/DerivedSources/WebCore/WebReplayInputs.cpp:796:83: error: ‘PlatformWheelEventPhaseChanged’ is not a member of ‘WebCore’
             enumValue = static_cast<WebCore::PlatformWheelEventPhase>(enumValue | WebCore::PlatformWheelEventPhaseChanged);
                                                                                   ^
/home/bzsolt/webkit/EflWebKit/WebKitBuild/Release/DerivedSources/WebCore/WebReplayInputs.cpp:798:83: error: ‘PlatformWheelEventPhaseEnded’ is not a member of ‘WebCore’
             enumValue = static_cast<WebCore::PlatformWheelEventPhase>(enumValue | WebCore::PlatformWheelEventPhaseEnded);
                                                                                   ^
/home/bzsolt/webkit/EflWebKit/WebKitBuild/Release/DerivedSources/WebCore/WebReplayInputs.cpp:800:83: error: ‘PlatformWheelEventPhaseCancelled’ is not a member of ‘WebCore’
             enumValue = static_cast<WebCore::PlatformWheelEventPhase>(enumValue | WebCore::PlatformWheelEventPhaseCancelled);
                                                                                   ^
/home/bzsolt/webkit/EflWebKit/WebKitBuild/Release/DerivedSources/WebCore/WebReplayInputs.cpp:802:83: error: ‘PlatformWheelEventPhaseMayBegin’ is not a member of ‘WebCore’
             enumValue = static_cast<WebCore::PlatformWheelEventPhase>(enumValue | WebCore::PlatformWheelEventPhaseMayBegin);
Comment 3 Brian Burg 2014-05-30 07:18:13 PDT
Comment on attachment 232283 [details]
Proposed patch

LGTM, but can you add/edit a test case and include any rebaselined test results? They are in Source/JavaScriptCore/replay/scripts/tests/ and you can run with Tools/Scripts/run-input-generator-tests.
Comment 4 Csaba Osztrogonác 2014-06-04 02:58:03 PDT
Comment on attachment 232283 [details]
Proposed patch

r- for now based on #3
Comment 5 Zsolt Borbely 2014-06-10 04:48:03 PDT
Created attachment 232785 [details]
Proposed patch
Comment 6 Csaba Osztrogonác 2014-06-12 02:39:33 PDT
Comment on attachment 232785 [details]
Proposed patch

LGTM
Comment 7 WebKit Commit Bot 2014-06-12 03:11:23 PDT
Comment on attachment 232785 [details]
Proposed patch

Clearing flags on attachment: 232785

Committed r169889: <http://trac.webkit.org/changeset/169889>
Comment 8 WebKit Commit Bot 2014-06-12 03:11:26 PDT
All reviewed patches have been landed.  Closing bug.