Bug 137084 - Web Replay: code generator shouldn't complain about enums without a storage type if they are in an enclosing scope
Summary: Web Replay: code generator shouldn't complain about enums without a storage t...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brian Burg
URL:
Keywords:
: 136296 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-09-24 16:18 PDT by Brian Burg
Modified: 2015-01-18 23:02 PST (History)
3 users (show)

See Also:


Attachments
WIP (6.85 KB, patch)
2014-09-24 16:19 PDT, Brian Burg
no flags Details | Formatted Diff | Diff
Patch (15.26 KB, patch)
2014-09-26 16:30 PDT, Brian Burg
joepeck: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Burg 2014-09-24 16:18:26 PDT
.
Comment 1 Brian Burg 2014-09-24 16:19:15 PDT
Created attachment 238622 [details]
WIP
Comment 2 Joseph Pecoraro 2014-09-25 11:40:28 PDT
Comment on attachment 238622 [details]
WIP

View in context: https://bugs.webkit.org/attachment.cgi?id=238622&action=review

> Source/JavaScriptCore/replay/scripts/tests/expected/generate-enum-encoding-helpers.json-TestReplayInputs.cpp:181
> +        if (enumString == "Mouse")
> +            enumValue = static_cast<WebCore::PlatformEvent::Type>(enumValue | WebCore::PlatformEvent::Mouse);
> +        if (enumString == "Key")

Nit: Should be an else/if chain.
Comment 3 Brian Burg 2014-09-26 16:30:04 PDT
Created attachment 238746 [details]
Patch
Comment 4 WebKit Commit Bot 2014-09-26 16:32:45 PDT
This patch modifies the WEB_REPLAY inputs generator. Please ensure that you have rebaselined any generator test results (i.e., by running `Tools/Scripts/run-input-generator-tests --reset-results`)
Comment 5 Joseph Pecoraro 2014-10-16 16:53:14 PDT
Comment on attachment 238746 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=238746&action=review

r=me

> Source/JavaScriptCore/ChangeLog:11
> +        Change the generator to not require an explicit size if an enum is declared inside a struct or class definition. In that case, it must pull in headers since scoped enums can't be

Style: wrap line earlier.

> Source/JavaScriptCore/replay/scripts/tests/expected/generate-enum-encoding-helpers.json-TestReplayInputs.cpp:178
> +    for (String enumString : enumStrings) {

Nit: Unrelated to your changes, but I wonder if "for (const String& : ...)" would be better.
Comment 6 Brian Burg 2014-10-18 11:13:04 PDT
Committed r174863: <http://trac.webkit.org/changeset/174863>
Comment 7 Brian Burg 2014-10-29 20:10:14 PDT
*** Bug 136296 has been marked as a duplicate of this bug. ***