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

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

Issue 2852983002: [simulator] Make reference redirection thread-safe. (Closed)
Patch Set: Created 3 years, 7 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/mips64/simulator-mips64.h ('k') | src/ppc/simulator-ppc.h » ('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 #if V8_TARGET_ARCH_MIPS64 10 #if V8_TARGET_ARCH_MIPS64
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after
942 delete static_cast<CachePage*>(entry->value); 942 delete static_cast<CachePage*>(entry->value);
943 } 943 }
944 delete i_cache; 944 delete i_cache;
945 } 945 }
946 } 946 }
947 947
948 948
949 void* Simulator::RedirectExternalReference(Isolate* isolate, 949 void* Simulator::RedirectExternalReference(Isolate* isolate,
950 void* external_function, 950 void* external_function,
951 ExternalReference::Type type) { 951 ExternalReference::Type type) {
952 base::LockGuard<base::Mutex> lock_guard(
953 isolate->simulator_redirection_mutex());
952 Redirection* redirection = Redirection::Get(isolate, external_function, type); 954 Redirection* redirection = Redirection::Get(isolate, external_function, type);
953 return redirection->address_of_swi_instruction(); 955 return redirection->address_of_swi_instruction();
954 } 956 }
955 957
956 958
957 // Get the active Simulator for the current thread. 959 // Get the active Simulator for the current thread.
958 Simulator* Simulator::current(Isolate* isolate) { 960 Simulator* Simulator::current(Isolate* isolate) {
959 v8::internal::Isolate::PerIsolateThreadData* isolate_data = 961 v8::internal::Isolate::PerIsolateThreadData* isolate_data =
960 isolate->FindOrAllocatePerThreadDataForThisThread(); 962 isolate->FindOrAllocatePerThreadDataForThisThread();
961 DCHECK(isolate_data != NULL); 963 DCHECK(isolate_data != NULL);
(...skipping 4184 matching lines...) Expand 10 before | Expand all | Expand 10 after
5146 } 5148 }
5147 5149
5148 5150
5149 #undef UNSUPPORTED 5151 #undef UNSUPPORTED
5150 } // namespace internal 5152 } // namespace internal
5151 } // namespace v8 5153 } // namespace v8
5152 5154
5153 #endif // USE_SIMULATOR 5155 #endif // USE_SIMULATOR
5154 5156
5155 #endif // V8_TARGET_ARCH_MIPS64 5157 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips64/simulator-mips64.h ('k') | src/ppc/simulator-ppc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698