Fix regression caused by earlier bitwise and optimisation. 1 & undefined != 1.
authoroliver <oliver@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Nov 2007 04:32:55 +0000 (04:32 +0000)
committeroliver <oliver@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Nov 2007 04:32:55 +0000 (04:32 +0000)
commit84b2b2ef3a374c321ef0532a0c179488a8330ace
treeffa155999be86934febde77017b4f4bda74ecc24
parent50c71702c10c28559773d458dba7bfca92076cec
Fix regression caused by earlier bitwise and optimisation.  1 & undefined != 1.

Reviewed by Maciej.

The implementation of JSImmediate::areBothImmediateNumbers relies on
(JSImmediate::getTag(immediate1) & JSImmediate::getTag(immediate2)) having
a unique result when both immediate values are numbers.

The regression was due to UndefinedType & NumberType returning NumberType (3 & 1).
By swapping the value of NumberType and UndefinedType this ceases to be a problem.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27630 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore/ChangeLog
JavaScriptCore/kjs/JSType.h
LayoutTests/ChangeLog
LayoutTests/fast/js/bitwise-and-on-undefined-expected.txt [new file with mode: 0644]
LayoutTests/fast/js/bitwise-and-on-undefined.html [new file with mode: 0644]