Introduce number type information in the virtual frame.
authorfschneider@chromium.org <fschneider@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 15 Feb 2010 14:24:38 +0000 (14:24 +0000)
committerfschneider@chromium.org <fschneider@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 15 Feb 2010 14:24:38 +0000 (14:24 +0000)
commitdbe99e405a594591336f82d4ffbf8f71342b89df
treea9573f7a383e2c80e053d4eb3750d024865ae90a
parentd3ce4347d93ceba31c6127c96a7f85b413f2cda6
Introduce number type information in the virtual frame.

Each frame element gets a new attribute with number type information. A frame element can be:

- smi
- heap number
- number (i.e. either of the above)
- or something else.

The type information is propagated along with all virtual frame operations.
Results popped from the frame carry the number information with them.

Two optimizations in the code generator make use of the new
information:
- GenericBinaryOpSyub omits map checks if input operands are numbers.
- Boolean conversion for numbers: Emit inline code for converting a number (smi or heap number) to boolean. Do not emit call to ToBoolean stub in this case.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3861 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
24 files changed:
src/frame-element.cc
src/frame-element.h
src/ia32/codegen-ia32.cc
src/ia32/codegen-ia32.h
src/ia32/macro-assembler-ia32.cc
src/ia32/macro-assembler-ia32.h
src/ia32/virtual-frame-ia32.cc
src/ia32/virtual-frame-ia32.h
src/jump-target-inl.h
src/jump-target.cc
src/number-info.h [new file with mode: 0644]
src/register-allocator.cc
src/register-allocator.h
src/virtual-frame.cc
src/x64/codegen-x64.cc
src/x64/codegen-x64.h
src/x64/macro-assembler-x64.cc
src/x64/macro-assembler-x64.h
src/x64/virtual-frame-x64.cc
src/x64/virtual-frame-x64.h
tools/gyp/v8.gyp
tools/visual_studio/v8_base.vcproj
tools/visual_studio/v8_base_arm.vcproj
tools/visual_studio/v8_base_x64.vcproj