Separated string lifetime bits from character buffer state bits
https://bugs.webkit.org/show_bug.cgi?id=70673

Source/JavaScriptCore: 

Reviewed by Anders Carlsson.
        
Moved the static/immortal bit into the bottom bit of the refcount, and
moved all other bits into the high bits of the hash code.
        
This is the first step toward a new Characters/PassString class, and it
makes ref/deref slightly more efficient.

* create_hash_table:
* wtf/StringHasher.h:
(WTF::StringHasher::hash): Tweaked the string hashing function to leave
the top bits clear, so they can be used as flags.
        
Fixed some small differences between the PERL copy of this function and
the C++ copy of this function, which could have in theory caused subtle
crashes.

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::sharedBuffer):
(WTF::StringImpl::createWithTerminatingNullCharacter):
* wtf/text/StringImpl.h:
(WTF::StringImpl::StringImpl):
(WTF::StringImpl::cost): Renamed s_refCountFlagShouldReportedCost to
s_didReportExtraCost, since the original name was both self-contradictory
and used as a double-negative.

(WTF::StringImpl::isIdentifier):
(WTF::StringImpl::setIsIdentifier):
(WTF::StringImpl::hasTerminatingNullCharacter):
(WTF::StringImpl::isAtomic):
(WTF::StringImpl::setIsAtomic):
(WTF::StringImpl::setHash):
(WTF::StringImpl::rawHash):
(WTF::StringImpl::hasHash):
(WTF::StringImpl::existingHash):
(WTF::StringImpl::hash):
(WTF::StringImpl::hasOneRef):
(WTF::StringImpl::ref):
(WTF::StringImpl::deref):
(WTF::StringImpl::bufferOwnership):
(WTF::StringImpl::isStatic): Moved the static/immortal bit into the bottom
bit of the refcount. Now, all lifetime information lives in the refcount
field. Moved the other bits into the hash code field.

Source/WebCore: 

Reviewed by Anders Carlsson.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHashValue): Updated for string hashing changes in JavaScriptCore.

LayoutTests: 

Reviewed by Anders Carlsson.
        
These tests depended on non-deterministic effects of hash order, so I
had to update them:

* fast/dom/prototype-inheritance-2-expected.txt: Updated for slightly
different order of discovering properties.

* fast/js/delete-syntax-expected.txt:
* fast/js/script-tests/delete-syntax.js: Updated not to depend on iteration
order, since that's not what this test is about.

* http/tests/inspector/inspector-test.js: Updated not to depend on
global function iteration order. This test setup is pretty spaghetti.
I think I avoided making it even more spaghetti.

* inspector/storage-panel-dom-storage-expected.txt: Updated for changed
iteration order.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/fast/js/delete-syntax-expected.txt b/LayoutTests/fast/js/delete-syntax-expected.txt
index bae23c0..42ae10d 100644
--- a/LayoutTests/fast/js/delete-syntax-expected.txt
+++ b/LayoutTests/fast/js/delete-syntax-expected.txt
@@ -29,7 +29,7 @@
 PASS RegExp.prototype.compile is regExpPrototypeCompile
 PASS RegExp.prototype.exec is undefined
 PASS RegExp.prototype.test is null
-PASS String(Object.getOwnPropertyNames(Object.prototype)) is "constructor,valueOf,__lookupGetter__,toLocaleString,__defineGetter__,hasOwnProperty,propertyIsEnumerable,toString,__lookupSetter__,isPrototypeOf"
+PASS Object.getOwnPropertyNames(Object.prototype).indexOf('__defineSetter__') is -1
 PASS successfullyParsed is true
 
 TEST COMPLETE