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

Side by Side Diff: src/mips64/simulator-mips64.cc

Issue 1084723003: MIPS: Split TemplateHashMapImpl::Lookup into two methods. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « src/mips/simulator-mips.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <limits.h> 5 #include <limits.h>
6 #include <stdarg.h> 6 #include <stdarg.h>
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "src/v8.h" 10 #include "src/v8.h"
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 DCHECK_EQ((int64_t)0, start & CachePage::kPageMask); 812 DCHECK_EQ((int64_t)0, start & CachePage::kPageMask);
813 offset = 0; 813 offset = 0;
814 } 814 }
815 if (size != 0) { 815 if (size != 0) {
816 FlushOnePage(i_cache, start, size); 816 FlushOnePage(i_cache, start, size);
817 } 817 }
818 } 818 }
819 819
820 820
821 CachePage* Simulator::GetCachePage(v8::internal::HashMap* i_cache, void* page) { 821 CachePage* Simulator::GetCachePage(v8::internal::HashMap* i_cache, void* page) {
822 v8::internal::HashMap::Entry* entry = i_cache->Lookup(page, 822 v8::internal::HashMap::Entry* entry =
823 ICacheHash(page), 823 i_cache->LookupOrInsert(page, ICacheHash(page));
824 true);
825 if (entry->value == NULL) { 824 if (entry->value == NULL) {
826 CachePage* new_page = new CachePage(); 825 CachePage* new_page = new CachePage();
827 entry->value = new_page; 826 entry->value = new_page;
828 } 827 }
829 return reinterpret_cast<CachePage*>(entry->value); 828 return reinterpret_cast<CachePage*>(entry->value);
830 } 829 }
831 830
832 831
833 // Flush from start up to and not including start + size. 832 // Flush from start up to and not including start + size.
834 void Simulator::FlushOnePage(v8::internal::HashMap* i_cache, 833 void Simulator::FlushOnePage(v8::internal::HashMap* i_cache,
(...skipping 2788 matching lines...) Expand 10 before | Expand all | Expand 10 after
3623 } 3622 }
3624 3623
3625 3624
3626 #undef UNSUPPORTED 3625 #undef UNSUPPORTED
3627 3626
3628 } } // namespace v8::internal 3627 } } // namespace v8::internal
3629 3628
3630 #endif // USE_SIMULATOR 3629 #endif // USE_SIMULATOR
3631 3630
3632 #endif // V8_TARGET_ARCH_MIPS64 3631 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/simulator-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698