| 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 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |