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

Side by Side Diff: src/scopeinfo.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.cc ('k') | src/serialize.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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 number_of_locals += number_of_context_slots() - Context::MIN_CONTEXT_SLOTS; 529 number_of_locals += number_of_context_slots() - Context::MIN_CONTEXT_SLOTS;
530 } 530 }
531 return number_of_locals; 531 return number_of_locals;
532 } 532 }
533 533
534 534
535 int ContextSlotCache::Hash(Code* code, String* name) { 535 int ContextSlotCache::Hash(Code* code, String* name) {
536 // Uses only lower 32 bits if pointers are larger. 536 // Uses only lower 32 bits if pointers are larger.
537 uintptr_t addr_hash = 537 uintptr_t addr_hash =
538 static_cast<uint32_t>(reinterpret_cast<uintptr_t>(code)) >> 2; 538 static_cast<uint32_t>(reinterpret_cast<uintptr_t>(code)) >> 2;
539 return (addr_hash ^ name->Hash()) % kLength; 539 return static_cast<int>((addr_hash ^ name->Hash()) % kLength);
540 } 540 }
541 541
542 542
543 int ContextSlotCache::Lookup(Code* code, 543 int ContextSlotCache::Lookup(Code* code,
544 String* name, 544 String* name,
545 Variable::Mode* mode) { 545 Variable::Mode* mode) {
546 int index = Hash(code, name); 546 int index = Hash(code, name);
547 Key& key = keys_[index]; 547 Key& key = keys_[index];
548 if ((key.code == code) && key.name->Equals(name)) { 548 if ((key.code == code) && key.name->Equals(name)) {
549 Value result(values_[index]); 549 Value result(values_[index]);
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 } 640 }
641 #endif // DEBUG 641 #endif // DEBUG
642 642
643 643
644 // Make sure the classes get instantiated by the template system. 644 // Make sure the classes get instantiated by the template system.
645 template class ScopeInfo<FreeStoreAllocationPolicy>; 645 template class ScopeInfo<FreeStoreAllocationPolicy>;
646 template class ScopeInfo<PreallocatedStorage>; 646 template class ScopeInfo<PreallocatedStorage>;
647 template class ScopeInfo<ZoneListAllocationPolicy>; 647 template class ScopeInfo<ZoneListAllocationPolicy>;
648 648
649 } } // namespace v8::internal 649 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698