Implement IS_OBJECT and IS_FUNCTION as inlined runtime functions.
authorfschneider@chromium.org <fschneider@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 19 Nov 2009 07:41:32 +0000 (07:41 +0000)
committerfschneider@chromium.org <fschneider@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 19 Nov 2009 07:41:32 +0000 (07:41 +0000)
commitd9d18b30f5f1f02a0159444f101b630f133984af
tree9834b2b8d50b60608c3451d0cc51ce723807fee2
parent3cf9ce4736ca084ddbeea4ef1c88c05a2867c93d
Implement IS_OBJECT and IS_FUNCTION as inlined runtime functions.

Summary:
This change fixes a performance regression introduced by the special
handling of regular expressions in typeof expressions.
As a result we regain ~8% speedup on 3d-raytrace and ~13% on boyer
(vs bleeding edge)

Description:
The macros IS_OBJECT and IS_FUNCTION are frequently used in the
JS runtime functions.
By introducing new inlined runtime functions %_IsFunction and %_IsObject
we avoid invoking the more expensive %_ClassOf function plus comparing
its result to a string.

Review URL: http://codereview.chromium.org/399111

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3335 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/arm/codegen-arm.cc
src/arm/codegen-arm.h
src/codegen.cc
src/ia32/codegen-ia32.cc
src/ia32/codegen-ia32.h
src/macros.py
src/x64/codegen-x64.cc
src/x64/codegen-x64.h