[Webkit-unassigned] [Bug 106553] [V8] Add IDL Enum support WIP

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 11 05:09:33 PST 2013


https://bugs.webkit.org/show_bug.cgi?id=106553


Nils Barth <nbarth at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #182112|0                           |1
        is obsolete|                            |




--- Comment #3 from Nils Barth <nbarth at google.com>  2013-01-11 05:11:25 PST ---
Created an attachment (id=182325)
 --> (https://bugs.webkit.org/attachment.cgi?id=182325&action=review)
Updated to address haraken's comments

Updated to address concerns (i.e., style and noise).
Still need to write Changelog (and of course implement C++ validation etc.).

(Details below.)

1. Comment:
> Source/WebCore/bindings/scripts/CodeGenerator.pm:56
>  my %stringTypeHash = ("DOMString" => 1, "AtomicString" => 1);
>  
> +my %enumTypeHash = (); # initially empty b/c populated from IDL
> +
>  my %nonPointerTypeHash = ("DOMTimeStamp" => 1, "CompareHow" => 1);

Hopefully comment is useful in context!
As noted above: other hashes statically initialized (non-empty) and immutable,
though there's no way to mark this in code, as you can't make constant hashes in core Perl.

2. Debug comments
Removed notes to self (wrote in separate doc to self),
except for debugging libraries and "working here",
as currently using these.

Only remaining note is:
> +    # nbarth: this never happens, as parseDefinitions returns
> +    # array of references to domInterface, not another document.
> +    # Maybe useful for inherits?
> +    # ...but can be simply implemented at parseDefinitions level
> +#    if ($#definitions == 0 && ref($definitions[0]) eq "idlDocument") {
> +#        $document = $definitions[0];
> +#    }
...as I'm not 100% sure about it.
This was a section of code that is never called,
and assumes a weird "document within document",
so I think it's safe to remove, as I've re-written top-level doc/definition processing,
but I wanted to flag it for review.


3. Formatting
Removed all unrelated formatting fixes.
Only remaining formatting fix is:
>  struct( idlDocument => {
> -    interfaces => '@',  # All parsed interfaces
> -    fileName => '$'  # file name
> +    interfaces => '@', # All parsed interfaces
> +    enumerations => '@', # All parsed enumerations
> +    fileName => '$', # file name
...which is b/c I'm substantively editing this code.

Formatting is make comment spacing follow WebKit "one space before EOL comments":
http://www.webkit.org/coding/coding-style.html#comments-eol
...and add trailing comma (,) as other structs use it.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list