Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(377)

Side by Side Diff: Source/build/scripts/hasher.py

Issue 26414004: Move core/scripts to build/scripts so that platform can use them. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (C) 2013 Google, Inc. 2 # Copyright (C) 2013 Google, Inc.
3 # 3 #
4 # This library is free software; you can redistribute it and/or 4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Library General Public 5 # modify it under the terms of the GNU Library General Public
6 # License as published by the Free Software Foundation; either 6 # License as published by the Free Software Foundation; either
7 # version 2 of the License, or (at your option) any later version. 7 # version 2 of the License, or (at your option) any later version.
8 # 8 #
9 # This library is distributed in the hope that it will be useful, 9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 result ^= (result << 10) 74 result ^= (result << 10)
75 75
76 # Save 8 bits for StringImpl to use as flags. 76 # Save 8 bits for StringImpl to use as flags.
77 result &= 0xffffff 77 result &= 0xffffff
78 78
79 # This avoids ever returning a hash code of 0, since that is used to 79 # This avoids ever returning a hash code of 0, since that is used to
80 # signal "hash not computed yet". 80 # signal "hash not computed yet".
81 assert result != 0 81 assert result != 0
82 82
83 return result 83 return result
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698