GenerateHashValue should be usable outside CodeGeneratorJS.pm
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Mar 2013 20:45:36 +0000 (20:45 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Mar 2013 20:45:36 +0000 (20:45 +0000)
commitb92fd6415e916a7070a63497b0e79ed745570932
tree9d1826d48277575bd69ff18d2865b803134ffe59
parent1203557b85aa9de1b54f446cd8e86fe494797f33
GenerateHashValue should be usable outside CodeGeneratorJS.pm
https://bugs.webkit.org/show_bug.cgi?id=112736

Reviewed by Benjamin Poulain.

GenerateHashValue is not specific to CodeGeneratorJS.pm. Instead, the
function matches the StringHash used in WTF. This patch moves the
function into a separate Perl module so that it can be used by other
Perl scripts. For example, I plan to use this function to compute the
hash value for HTMLNames at compile time rather than at startup.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHashTable):
* bindings/scripts/Hash.pm: Added.
(leftShift):
(GenerateHashValue):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@146253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/Hasher.pm [new file with mode: 0644]