OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 <stdarg.h> | 5 #include <stdarg.h> |
6 #include <stdlib.h> | 6 #include <stdlib.h> |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "src/v8.h" | 9 #include "src/v8.h" |
10 | 10 |
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
650 DCHECK_EQ(0, start & CachePage::kPageMask); | 650 DCHECK_EQ(0, start & CachePage::kPageMask); |
651 offset = 0; | 651 offset = 0; |
652 } | 652 } |
653 if (size != 0) { | 653 if (size != 0) { |
654 FlushOnePage(i_cache, start, size); | 654 FlushOnePage(i_cache, start, size); |
655 } | 655 } |
656 } | 656 } |
657 | 657 |
658 | 658 |
659 CachePage* Simulator::GetCachePage(v8::internal::HashMap* i_cache, void* page) { | 659 CachePage* Simulator::GetCachePage(v8::internal::HashMap* i_cache, void* page) { |
660 v8::internal::HashMap::Entry* entry = i_cache->Lookup(page, | 660 v8::internal::HashMap::Entry* entry = |
661 ICacheHash(page), | 661 i_cache->LookupOrInsert(page, ICacheHash(page)); |
662 true); | |
663 if (entry->value == NULL) { | 662 if (entry->value == NULL) { |
664 CachePage* new_page = new CachePage(); | 663 CachePage* new_page = new CachePage(); |
665 entry->value = new_page; | 664 entry->value = new_page; |
666 } | 665 } |
667 return reinterpret_cast<CachePage*>(entry->value); | 666 return reinterpret_cast<CachePage*>(entry->value); |
668 } | 667 } |
669 | 668 |
670 | 669 |
671 // Flush from start up to and not including start + size. | 670 // Flush from start up to and not including start + size. |
672 void Simulator::FlushOnePage(v8::internal::HashMap* i_cache, | 671 void Simulator::FlushOnePage(v8::internal::HashMap* i_cache, |
(...skipping 3457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4130 uintptr_t address = *stack_slot; | 4129 uintptr_t address = *stack_slot; |
4131 set_register(sp, current_sp + sizeof(uintptr_t)); | 4130 set_register(sp, current_sp + sizeof(uintptr_t)); |
4132 return address; | 4131 return address; |
4133 } | 4132 } |
4134 | 4133 |
4135 } } // namespace v8::internal | 4134 } } // namespace v8::internal |
4136 | 4135 |
4137 #endif // USE_SIMULATOR | 4136 #endif // USE_SIMULATOR |
4138 | 4137 |
4139 #endif // V8_TARGET_ARCH_ARM | 4138 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |