De-virtualize ExecutableBase::intrinsic
authormhahnenberg@apple.com <mhahnenberg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Nov 2011 22:13:37 +0000 (22:13 +0000)
committermhahnenberg@apple.com <mhahnenberg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Nov 2011 22:13:37 +0000 (22:13 +0000)
commitc91dd0d0c0c0a5fd2255c4c9318deed9094c3ef8
tree69bf73d7551a72c0af525e8652745c23a31dbe49
parent154701b7aaf7d854c24ea24753e086d7b675f0e0
De-virtualize ExecutableBase::intrinsic
https://bugs.webkit.org/show_bug.cgi?id=72548

Reviewed by Oliver Hunt.

* runtime/Executable.cpp:
(JSC::ExecutableBase::intrinsic): Dynamic cast to NativeExecutable. If successful, call intrinsic, otherwise return default value.
* runtime/Executable.h:
* runtime/JSCell.h:
(JSC::jsDynamicCast): Add jsDynamicCast that duplicates the functionality of dynamic_cast in C++ but uses ClassInfo
rather than requiring C++ RTTI.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@100810 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/Executable.cpp
Source/JavaScriptCore/runtime/Executable.h
Source/JavaScriptCore/runtime/JSCell.h