We'll add some extra type info to JSType to include the subclasses of ScriptExecutable and test them to determine which function to call.
Created attachment 115447 [details] Patch
Comment on attachment 115447 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=115447&action=review r=me > Source/JavaScriptCore/runtime/Executable.h:692 > + switch (structure()->typeInfo().type()) { i'd like to understand better when we use ClassInfo and when we use a JSType. Do you have a rule for that? > Source/JavaScriptCore/runtime/JSType.h:56 > + StaticScopeObjectType = 22, Yeah, I really think you want to remove the explicit numeric values for these enumerated constants.
> i'd like to understand better when we use ClassInfo and when we use a JSType. Do you have a rule for that? I don't have a specific rule. I figured it might be easier for the compiler to optimize a switch with JSType since the values we're testing are clustered together. This patch does actually seem to be a small perf win according to bencher.
Committed r100537: <http://trac.webkit.org/changeset/100537>