Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Support [Custom] for static functions
https://bugs.webkit.org/show_bug.cgi?id=80573 Reviewed by Kentaro Hara. * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): If the function is static, add static qualifier to cpp function. (GenerateImplementation): Reorganize the function to split out based on the static attribute, instead of checking for it at every line we output. If the function is static and not custom, the listed code should be the code in the rest of the function that did not have the static check. If it is custom, then we check the number of arguments, and then call the static impl function directly. If the function is not static, all of the "unless ($function->isStatic)" checks are removed since it is not necessary. * bindings/scripts/test/TestObj.idl: Added new test case. * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore): (WebCore::jsTestObjConstructorFunctionClassMethod2): * bindings/scripts/test/JS/JSTestObj.h: (JSTestObj): (WebCore): * bindings/scripts/test/ObjC/DOMTestObj.h: * bindings/scripts/test/ObjC/DOMTestObj.mm: (-[DOMTestObj classMethod2]): * bindings/scripts/test/V8/V8TestObj.cpp: (WebCore::ConfigureV8TestObjTemplate): * bindings/scripts/test/V8/V8TestObj.h: (V8TestObj): Canonical link: https://commits.webkit.org/97830@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@110232 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
117 additions
and 49 deletions.
- +33 −0 Source/WebCore/ChangeLog
- +64 −48 Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
- +8 −0 Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
- +2 −0 Source/WebCore/bindings/scripts/test/JS/JSTestObj.h
- +1 −0 Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h
- +6 −0 Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm
- +1 −1 Source/WebCore/bindings/scripts/test/TestObj.idl
- +1 −0 Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
- +1 −0 Source/WebCore/bindings/scripts/test/V8/V8TestObj.h
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -206,6 +206,7 @@ enum { | ||
#endif | ||
- (void)classMethod; | ||
- (int)classMethodWithOptional:(int)arg; | ||
- (void)classMethod2:(int)arg; | ||
#if ENABLE(Condition1) | ||
- (void)overloadedMethod1:(int)arg; | ||
#endif | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters