OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |