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

Side by Side Diff: src/mips/simulator-mips.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 | « no previous file | src/mips64/simulator-mips64.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 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 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
882 DCHECK_EQ(0, start & CachePage::kPageMask); 882 DCHECK_EQ(0, start & CachePage::kPageMask);
883 offset = 0; 883 offset = 0;
884 } 884 }
885 if (size != 0) { 885 if (size != 0) {
886 FlushOnePage(i_cache, start, size); 886 FlushOnePage(i_cache, start, size);
887 } 887 }
888 } 888 }
889 889
890 890
891 CachePage* Simulator::GetCachePage(v8::internal::HashMap* i_cache, void* page) { 891 CachePage* Simulator::GetCachePage(v8::internal::HashMap* i_cache, void* page) {
892 v8::internal::HashMap::Entry* entry = i_cache->Lookup(page, 892 v8::internal::HashMap::Entry* entry =
893 ICacheHash(page), 893 i_cache->LookupOrInsert(page, ICacheHash(page));
894 true);
895 if (entry->value == NULL) { 894 if (entry->value == NULL) {
896 CachePage* new_page = new CachePage(); 895 CachePage* new_page = new CachePage();
897 entry->value = new_page; 896 entry->value = new_page;
898 } 897 }
899 return reinterpret_cast<CachePage*>(entry->value); 898 return reinterpret_cast<CachePage*>(entry->value);
900 } 899 }
901 900
902 901
903 // Flush from start up to and not including start + size. 902 // Flush from start up to and not including start + size.
904 void Simulator::FlushOnePage(v8::internal::HashMap* i_cache, 903 void Simulator::FlushOnePage(v8::internal::HashMap* i_cache,
(...skipping 2537 matching lines...) Expand 10 before | Expand all | Expand 10 after
3442 } 3441 }
3443 3442
3444 3443
3445 #undef UNSUPPORTED 3444 #undef UNSUPPORTED
3446 3445
3447 } } // namespace v8::internal 3446 } } // namespace v8::internal
3448 3447
3449 #endif // USE_SIMULATOR 3448 #endif // USE_SIMULATOR
3450 3449
3451 #endif // V8_TARGET_ARCH_MIPS 3450 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | src/mips64/simulator-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698