WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
149923
Rationalize JSXXConstructor class definition generated from WebIDL
https://bugs.webkit.org/show_bug.cgi?id=149923
Summary
Rationalize JSXXConstructor class definition generated from WebIDL
youenn fablet
Reported
2015-10-08 05:42:19 PDT
Depending on the WebIDL and options, the JSXXConstructor generated class declaration is changing. It may be useful to rationalize this so that it can be later templated, which would simplify the binding generator work.
Attachments
Patch
(30.22 KB, patch)
2015-10-08 07:16 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch for landing
(30.06 KB, patch)
2015-10-09 05:59 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
youenn fablet
Comment 1
2015-10-08 07:16:46 PDT
Created
attachment 262693
[details]
Patch
youenn fablet
Comment 2
2015-10-08 08:13:49 PDT
(In reply to
comment #1
)
> Created
attachment 262693
[details]
> Patch
mac-wk2 compilation is failing for an unrelated reason, see
bug 149751
.
Darin Adler
Comment 3
2015-10-08 08:38:49 PDT
Comment on
attachment 262693
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=262693&action=review
> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:4836 > + my $overloadedIndexString .= $function->{overloadedIndex};
I don’t understand the use of ".=" instead of "=" here.
> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:5021 > + push(@$outputArray, "#endif // $conditionalString\n");
I don’t think comments like this one are useful when the entire body of #if/#else/#endif is only 6 lines long. Especially in generated code that people should typically not be reading.
youenn fablet
Comment 4
2015-10-08 08:57:40 PDT
(In reply to
comment #3
)
> Comment on
attachment 262693
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=262693&action=review
> > > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:4836 > > + my $overloadedIndexString .= $function->{overloadedIndex}; > > I don’t understand the use of ".=" instead of "=" here.
Right. Let's also remove $overloadedIndexString at the same time.
> > > Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:5021 > > + push(@$outputArray, "#endif // $conditionalString\n"); > > I don’t think comments like this one are useful when the entire body of > #if/#else/#endif is only 6 lines long. Especially in generated code that > people should typically not be reading.
OK
youenn fablet
Comment 5
2015-10-09 05:59:44 PDT
Created
attachment 262764
[details]
Patch for landing
WebKit Commit Bot
Comment 6
2015-10-09 06:45:15 PDT
Comment on
attachment 262764
[details]
Patch for landing Clearing flags on attachment: 262764 Committed
r190785
: <
http://trac.webkit.org/changeset/190785
>
WebKit Commit Bot
Comment 7
2015-10-09 06:45:20 PDT
All reviewed patches have been landed. Closing bug.
Csaba Osztrogonác
Comment 8
2015-10-09 08:45:29 PDT
Comment on
attachment 262764
[details]
Patch for landing View in context:
https://bugs.webkit.org/attachment.cgi?id=262764&action=review
> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:5020 > - push(@$outputArray, "#if $conditionalString\n") if $conditionalString; > push(@$outputArray, "ConstructType ${constructorClassName}::getConstructData(JSCell*, ConstructData& constructData)\n"); > push(@$outputArray, "{\n"); > - push(@$outputArray, " constructData.native.function = construct${className};\n"); > - push(@$outputArray, " return ConstructTypeHost;\n"); > + if ($conditionalString) { > + push(@$outputArray, "#if $conditionalString\n"); > + push(@$outputArray, " constructData.native.function = construct;\n"); > + push(@$outputArray, " return ConstructTypeHost;\n"); > + push(@$outputArray, "#else\n"); > + push(@$outputArray, " return Base::getConstructData(cell, constructData);\n"); > + push(@$outputArray, "#endif\n");
The #else case causes build failure, because there is no cell named variable/argument here.
Csaba Osztrogonác
Comment 9
2015-10-09 08:47:10 PDT
I'm going to fix this in
bug149956
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug