RESOLVED FIXED 81345
IDLParser.pm should support sequence<T> type
https://bugs.webkit.org/show_bug.cgi?id=81345
Summary IDLParser.pm should support sequence<T> type
Kentaro Hara
Reported 2012-03-16 06:28:01 PDT
Currently IDLParser.pm cannot understand sequence<T> type. We should support it. This is a preparing patch for fixing 80696.
Attachments
Patch (34.00 KB, patch)
2012-03-16 06:36 PDT, Kentaro Hara
abarth: review+
Kentaro Hara
Comment 1 2012-03-16 06:36:54 PDT
WebKit Review Bot
Comment 2 2012-03-16 06:39:58 PDT
Attachment 132270 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h:154: Extra space before ) [whitespace/parens] [2] Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:63: "webkit/WebKitDOMsequence<ScriptProfile" already included at Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:62 [build/include] [4] Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:175: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:188: Local variables should never be PassRefPtr (see http://webkit.org/coding/RefPtr.html). [readability/pass_ptr] [5] Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:819: Local variables should never be PassRefPtr (see http://webkit.org/coding/RefPtr.html). [readability/pass_ptr] [5] Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:832: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] Total errors found: 6 in 12 files If any of these errors are false positives, please file a bug against check-webkit-style.
Kentaro Hara
Comment 3 2012-03-16 06:39:59 PDT
Comment on attachment 132270 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=132270&action=review > Source/WebCore/bindings/scripts/IDLStructure.pm:106 > +our $interfaceSelector = 'interface\s*((?:' . $extendedAttributeSyntax . ' )?)(' . $idlIdNs . '*)\s*(?::(\s*[^{]*))?{([-a-zA-Z0-9_"=\s(),;:\[\]<>&\|]*)'; It took me one hour to notice this change...:-) Maybe it is time to refactor the IDL parser to a recursive parser.
Adam Barth
Comment 4 2012-03-16 06:56:40 PDT
Comment on attachment 132270 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=132270&action=review I suspect you need to update the CodeGenerator pm files to do something sane with this type. Maybe the way we handle Foo[] is a good example to build from there? > Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp:46 > +#include "JSsequence<ScriptProfile>.h" This looks pretty broken. > Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp:55 > +#include "V8sequence<ScriptProfile>.h" This too.
Adam Barth
Comment 5 2012-03-16 06:57:03 PDT
I see. You're just going to do the code generation parts later.... Ok.
Adam Barth
Comment 6 2012-03-16 06:57:49 PDT
Comment on attachment 132270 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=132270&action=review >> Source/WebCore/bindings/scripts/IDLStructure.pm:106 >> +our $interfaceSelector = 'interface\s*((?:' . $extendedAttributeSyntax . ' )?)(' . $idlIdNs . '*)\s*(?::(\s*[^{]*))?{([-a-zA-Z0-9_"=\s(),;:\[\]<>&\|]*)'; > > It took me one hour to notice this change...:-) Maybe it is time to refactor the IDL parser to a recursive parser. We have a recursive version in Python, but I'm not sure we want to re-write everything in Python...
Kentaro Hara
Comment 7 2012-03-16 06:58:23 PDT
(In reply to comment #5) > I see. You're just going to do the code generation parts later.... Ok. Yes, I was just asked to fix the parser side.
Kentaro Hara
Comment 8 2012-03-16 07:01:32 PDT
Vineet Chaudhary (vineetc)
Comment 9 2012-03-16 20:15:03 PDT
(In reply to comment #7) > (In reply to comment #5) > > I see. You're just going to do the code generation parts later.... Ok. > > Yes, I was just asked to fix the parser side. Thank you haraken for the fix. I am to provide codegenerator fix.
Note You need to log in before you can comment on or make changes to this bug.