Improve performance of Function.prototype.call
authoroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 28 Mar 2009 03:50:39 +0000 (03:50 +0000)
committeroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 28 Mar 2009 03:50:39 +0000 (03:50 +0000)
commit5b6cc894ccc22c05afd99a5774664545fa253597
tree49c4e1ad5888edbe112d3c99f13df0b3ecb63547
parent01b331b7e46baf8610e491cae34fd7258984b0f6
Improve performance of Function.prototype.call
<https://bugs.webkit.org/show_bug.cgi?id=24907>

Reviewed by Gavin Barraclough

Optimistically assume that expression.call(..) is going to be a call to
Function.prototype.call, and handle it specially to attempt to reduce the
degree of VM reentrancy.

When everything goes right this removes the vm reentry improving .call()
by around a factor of 10.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@42065 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
JavaScriptCore/ChangeLog
JavaScriptCore/bytecode/CodeBlock.cpp
JavaScriptCore/bytecode/Opcode.h
JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
JavaScriptCore/bytecompiler/BytecodeGenerator.h
JavaScriptCore/interpreter/Interpreter.cpp
JavaScriptCore/jit/JIT.cpp
JavaScriptCore/parser/Grammar.y
JavaScriptCore/parser/Nodes.cpp
JavaScriptCore/parser/Nodes.h
JavaScriptCore/runtime/FunctionPrototype.cpp
JavaScriptCore/runtime/FunctionPrototype.h
JavaScriptCore/runtime/JSGlobalObject.cpp
JavaScriptCore/runtime/JSGlobalObject.h
LayoutTests/ChangeLog
LayoutTests/fast/js/function-call-aliased-expected.txt [new file with mode: 0644]
LayoutTests/fast/js/function-call-aliased.html [new file with mode: 0644]
LayoutTests/fast/js/resources/function-call-aliased.js [new file with mode: 0644]
LayoutTests/fast/profiler/call-expected.txt