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

Side by Side Diff: src/heap.h

Issue 650140: Add integer casts to make v8 compile without warnings on 64-bit Visual Studio (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 10 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
« no previous file with comments | « no previous file | src/heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after
1376 } 1376 }
1377 } 1377 }
1378 1378
1379 // Clear the cache. 1379 // Clear the cache.
1380 static void Clear(); 1380 static void Clear();
1381 1381
1382 static const int kAbsent = -2; 1382 static const int kAbsent = -2;
1383 private: 1383 private:
1384 static int Hash(DescriptorArray* array, String* name) { 1384 static int Hash(DescriptorArray* array, String* name) {
1385 // Uses only lower 32 bits if pointers are larger. 1385 // Uses only lower 32 bits if pointers are larger.
1386 uintptr_t array_hash = 1386 uint32_t array_hash =
1387 static_cast<uint32_t>(reinterpret_cast<uintptr_t>(array)) >> 2; 1387 static_cast<uint32_t>(reinterpret_cast<uintptr_t>(array)) >> 2;
1388 uintptr_t name_hash = 1388 uint32_t name_hash =
1389 static_cast<uint32_t>(reinterpret_cast<uintptr_t>(name)) >> 2; 1389 static_cast<uint32_t>(reinterpret_cast<uintptr_t>(name)) >> 2;
1390 return (array_hash ^ name_hash) % kLength; 1390 return (array_hash ^ name_hash) % kLength;
1391 } 1391 }
1392 1392
1393 static const int kLength = 64; 1393 static const int kLength = 64;
1394 struct Key { 1394 struct Key {
1395 DescriptorArray* array; 1395 DescriptorArray* array;
1396 String* name; 1396 String* name;
1397 }; 1397 };
1398 1398
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
1694 1694
1695 // To speed up scavenge collections new space string are kept 1695 // To speed up scavenge collections new space string are kept
1696 // separate from old space strings. 1696 // separate from old space strings.
1697 static List<Object*> new_space_strings_; 1697 static List<Object*> new_space_strings_;
1698 static List<Object*> old_space_strings_; 1698 static List<Object*> old_space_strings_;
1699 }; 1699 };
1700 1700
1701 } } // namespace v8::internal 1701 } } // namespace v8::internal
1702 1702
1703 #endif // V8_HEAP_H_ 1703 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698