RESOLVED FIXED 54839
Remove PrototypeFunction, NativeFunctionWrapper, and GlobalEvalFunction.
https://bugs.webkit.org/show_bug.cgi?id=54839
Summary Remove PrototypeFunction, NativeFunctionWrapper, and GlobalEvalFunction.
Gavin Barraclough
Reported 2011-02-20 17:25:37 PST
Historically, Native functions used to be represented by PrototypeFunctions, however since introducing call optimizations to the JIT this has used JSFunctions for host calls too. At the point this change was made, the interpreter continued to use PrototypeFunctions, however since fallback from the JIT to interpreter was introduced the interpreter has had to be able to run using host functions represented using JSFunctions - leading to an unnecessary and redundant divergence in behaviour between interpreter only builds, and situations where the JIT has fallen back to interpreting. NativeFunctionWrapper only existed to select between PrototypeFunction and JSFunction for wrappers for host functions, and as such can also be removed. GlobalEvalFunction is a redundant wrapper that happens to be derived from PrototypeFunction. It existed to hold a reference to the global object - but since all functions how derive from JSObjectWithGlobalObject, this no longer requires an additional class to provide this functionality.
Attachments
The patch (98.89 KB, patch)
2011-02-20 17:27 PST, Gavin Barraclough
no flags
The patch, (with WebCore diffs this time!) (104.23 KB, patch)
2011-02-20 18:29 PST, Gavin Barraclough
oliver: review+
Gavin Barraclough
Comment 1 2011-02-20 17:27:42 PST
Created attachment 83111 [details] The patch Tested with JIT, interpreter, & both. No performance impact on the interpreter.
WebKit Review Bot
Comment 2 2011-02-20 17:30:41 PST
Attachment 83111 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/Android.mk', u'Sourc..." exit_code: 1 Source/JavaScriptCore/runtime/JSGlobalData.h:205: The parameter name "function" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 1 in 28 files If any of these errors are false positives, please file a bug against check-webkit-style.
Build Bot
Comment 3 2011-02-20 17:53:33 PST
Gavin Barraclough
Comment 4 2011-02-20 18:29:50 PST
Created attachment 83113 [details] The patch, (with WebCore diffs this time!)
WebKit Review Bot
Comment 5 2011-02-20 18:32:04 PST
Attachment 83113 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/JavaScriptCore/Android.mk', u'Sourc..." exit_code: 1 Source/JavaScriptCore/runtime/JSGlobalData.h:205: The parameter name "function" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 1 in 32 files If any of these errors are false positives, please file a bug against check-webkit-style.
Build Bot
Comment 6 2011-02-20 18:54:19 PST
Oliver Hunt
Comment 7 2011-02-20 19:46:56 PST
Comment on attachment 83113 [details] The patch, (with WebCore diffs this time!) r=me, but fix the style bot complaint before you land.
Gavin Barraclough
Comment 8 2011-02-20 21:20:05 PST
Fixed in r79177
Note You need to log in before you can comment on or make changes to this bug.