Refactor type checks in v8natives.js and runtime.js.
authorricow@chromium.org <ricow@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 16 Jul 2010 11:21:08 +0000 (11:21 +0000)
committerricow@chromium.org <ricow@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 16 Jul 2010 11:21:08 +0000 (11:21 +0000)
commit49573265210c672dfee5576e8a4bb21ff4acb195
treebc2e959d88856a5864f78468e8a5f62f11685f69
parent931bf1d63d7dc7ddea89ccd86fad3885df18152f
Refactor type checks in v8natives.js and runtime.js.

This includes adding a new inline IsSpecObject method to the code
generator.  The old approach was somehow ineffecient since we would
call both IsObject, IsUndetectable and IsFunction to determine if
something was an object according to the spec. This change introduces
a new macro that determines if something is an object according to the
spec (and this does not include null).

This change also corrects a few places where undetectable objects was
not allowed even when they should be (priorly they would use only
IS_SPEC_OBJECT_OR_NULL, which would return false on an undetectable
object, the new IS_SPEC_OBJECT returns true on an undetectable object.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5087 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
17 files changed:
src/arm/codegen-arm.cc
src/arm/codegen-arm.h
src/arm/full-codegen-arm.cc
src/codegen.h
src/full-codegen.cc
src/full-codegen.h
src/ia32/codegen-ia32.cc
src/ia32/codegen-ia32.h
src/ia32/full-codegen-ia32.cc
src/macros.py
src/mips/codegen-mips.cc
src/mips/codegen-mips.h
src/runtime.js
src/v8natives.js
src/x64/codegen-x64.cc
src/x64/codegen-x64.h
src/x64/full-codegen-x64.cc