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

Side by Side Diff: src/heap.cc

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 | « src/heap.h ('k') | src/scopeinfo.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 4093 matching lines...) Expand 10 before | Expand all | Expand 10 after
4104 : "Mark-sweep"; 4104 : "Mark-sweep";
4105 } 4105 }
4106 return "Unknown GC"; 4106 return "Unknown GC";
4107 } 4107 }
4108 4108
4109 4109
4110 int KeyedLookupCache::Hash(Map* map, String* name) { 4110 int KeyedLookupCache::Hash(Map* map, String* name) {
4111 // Uses only lower 32 bits if pointers are larger. 4111 // Uses only lower 32 bits if pointers are larger.
4112 uintptr_t addr_hash = 4112 uintptr_t addr_hash =
4113 static_cast<uint32_t>(reinterpret_cast<uintptr_t>(map)) >> kMapHashShift; 4113 static_cast<uint32_t>(reinterpret_cast<uintptr_t>(map)) >> kMapHashShift;
4114 return (addr_hash ^ name->Hash()) & kCapacityMask; 4114 return static_cast<uint32_t>((addr_hash ^ name->Hash()) & kCapacityMask);
4115 } 4115 }
4116 4116
4117 4117
4118 int KeyedLookupCache::Lookup(Map* map, String* name) { 4118 int KeyedLookupCache::Lookup(Map* map, String* name) {
4119 int index = Hash(map, name); 4119 int index = Hash(map, name);
4120 Key& key = keys_[index]; 4120 Key& key = keys_[index];
4121 if ((key.map == map) && key.name->Equals(name)) { 4121 if ((key.map == map) && key.name->Equals(name)) {
4122 return field_offsets_[index]; 4122 return field_offsets_[index];
4123 } 4123 }
4124 return -1; 4124 return -1;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
4219 void ExternalStringTable::TearDown() { 4219 void ExternalStringTable::TearDown() {
4220 new_space_strings_.Free(); 4220 new_space_strings_.Free();
4221 old_space_strings_.Free(); 4221 old_space_strings_.Free();
4222 } 4222 }
4223 4223
4224 4224
4225 List<Object*> ExternalStringTable::new_space_strings_; 4225 List<Object*> ExternalStringTable::new_space_strings_;
4226 List<Object*> ExternalStringTable::old_space_strings_; 4226 List<Object*> ExternalStringTable::old_space_strings_;
4227 4227
4228 } } // namespace v8::internal 4228 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.h ('k') | src/scopeinfo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698