Index: src/mips64/simulator-mips64.h |
diff --git a/src/mips64/simulator-mips64.h b/src/mips64/simulator-mips64.h |
index 68d518ea10ef31527ff21041166c797338900394..b514e45049a4c0ebf176a6acb6ef9aa310427b68 100644 |
--- a/src/mips64/simulator-mips64.h |
+++ b/src/mips64/simulator-mips64.h |
@@ -23,7 +23,7 @@ namespace v8 { |
namespace internal { |
// When running without a simulator we call the entry directly. |
-#define CALL_GENERATED_CODE(entry, p0, p1, p2, p3, p4) \ |
+#define CALL_GENERATED_CODE(isolate, entry, p0, p1, p2, p3, p4) \ |
entry(p0, p1, p2, p3, p4) |
@@ -43,9 +43,10 @@ typedef int (*mips_regexp_matcher)(String* input, |
void* return_address, |
Isolate* isolate); |
-#define CALL_GENERATED_REGEXP_CODE(entry, p0, p1, p2, p3, p4, p5, p6, p7, p8) \ |
- (FUNCTION_CAST<mips_regexp_matcher>(entry)( \ |
- p0, p1, p2, p3, p4, p5, p6, p7, NULL, p8)) |
+#define CALL_GENERATED_REGEXP_CODE(isolate, entry, p0, p1, p2, p3, p4, p5, p6, \ |
+ p7, p8) \ |
+ (FUNCTION_CAST<mips_regexp_matcher>(entry)(p0, p1, p2, p3, p4, p5, p6, p7, \ |
+ NULL, p8)) |
#else // O32 Abi. |
@@ -60,9 +61,10 @@ typedef int (*mips_regexp_matcher)(String* input, |
int32_t direct_call, |
Isolate* isolate); |
-#define CALL_GENERATED_REGEXP_CODE(entry, p0, p1, p2, p3, p4, p5, p6, p7, p8) \ |
- (FUNCTION_CAST<mips_regexp_matcher>(entry)( \ |
- p0, p1, p2, p3, NULL, p4, p5, p6, p7, p8)) |
+#define CALL_GENERATED_REGEXP_CODE(isolate, entry, p0, p1, p2, p3, p4, p5, p6, \ |
+ p7, p8) \ |
+ (FUNCTION_CAST<mips_regexp_matcher>(entry)(p0, p1, p2, p3, NULL, p4, p5, p6, \ |
+ p7, p8)) |
#endif // MIPS_ABI_N64 |
@@ -77,11 +79,13 @@ class SimulatorStack : public v8::internal::AllStatic { |
return c_limit; |
} |
- static inline uintptr_t RegisterCTryCatch(uintptr_t try_catch_address) { |
+ static inline uintptr_t RegisterCTryCatch(Isolate* isolate, |
+ uintptr_t try_catch_address) { |
+ USE(isolate); |
return try_catch_address; |
} |
- static inline void UnregisterCTryCatch() { } |
+ static inline void UnregisterCTryCatch(Isolate* isolate) { USE(isolate); } |
}; |
} // namespace internal |
@@ -430,7 +434,8 @@ class Simulator { |
void SignalException(Exception e); |
// Runtime call support. |
- static void* RedirectExternalReference(void* external_function, |
+ static void* RedirectExternalReference(Isolate* isolate, |
+ void* external_function, |
ExternalReference::Type type); |
// Handle arguments and return value for runtime FP functions. |
@@ -485,24 +490,24 @@ class Simulator { |
// When running with the simulator transition into simulated execution at this |
// point. |
-#define CALL_GENERATED_CODE(entry, p0, p1, p2, p3, p4) \ |
- reinterpret_cast<Object*>(Simulator::current(Isolate::Current())->Call( \ |
- FUNCTION_ADDR(entry), 5, reinterpret_cast<int64_t*>(p0), \ |
- reinterpret_cast<int64_t*>(p1), reinterpret_cast<int64_t*>(p2), \ |
+#define CALL_GENERATED_CODE(isolate, entry, p0, p1, p2, p3, p4) \ |
+ reinterpret_cast<Object*>(Simulator::current(isolate)->Call( \ |
+ FUNCTION_ADDR(entry), 5, reinterpret_cast<int64_t*>(p0), \ |
+ reinterpret_cast<int64_t*>(p1), reinterpret_cast<int64_t*>(p2), \ |
reinterpret_cast<int64_t*>(p3), reinterpret_cast<int64_t*>(p4))) |
#ifdef MIPS_ABI_N64 |
-#define CALL_GENERATED_REGEXP_CODE(entry, p0, p1, p2, p3, p4, p5, p6, p7, p8) \ |
- static_cast<int>(Simulator::current(Isolate::Current()) \ |
- ->Call(entry, 10, p0, p1, p2, p3, p4, \ |
- reinterpret_cast<int64_t*>(p5), p6, p7, NULL, \ |
- p8)) |
+#define CALL_GENERATED_REGEXP_CODE(isolate, entry, p0, p1, p2, p3, p4, p5, p6, \ |
+ p7, p8) \ |
+ static_cast<int>(Simulator::current(isolate)->Call( \ |
+ entry, 10, p0, p1, p2, p3, p4, reinterpret_cast<int64_t*>(p5), p6, p7, \ |
+ NULL, p8)) |
#else // Must be O32 Abi. |
-#define CALL_GENERATED_REGEXP_CODE(entry, p0, p1, p2, p3, p4, p5, p6, p7, p8) \ |
- static_cast<int>( \ |
- Simulator::current(Isolate::Current()) \ |
- ->Call(entry, 10, p0, p1, p2, p3, NULL, p4, p5, p6, p7, p8)) |
+#define CALL_GENERATED_REGEXP_CODE(isolate, entry, p0, p1, p2, p3, p4, p5, p6, \ |
+ p7, p8) \ |
+ static_cast<int>(Simulator::current(isolate)->Call( \ |
+ entry, 10, p0, p1, p2, p3, NULL, p4, p5, p6, p7, p8)) |
#endif // MIPS_ABI_N64 |
@@ -517,13 +522,14 @@ class SimulatorStack : public v8::internal::AllStatic { |
return Simulator::current(isolate)->StackLimit(c_limit); |
} |
- static inline uintptr_t RegisterCTryCatch(uintptr_t try_catch_address) { |
- Simulator* sim = Simulator::current(Isolate::Current()); |
+ static inline uintptr_t RegisterCTryCatch(Isolate* isolate, |
+ uintptr_t try_catch_address) { |
+ Simulator* sim = Simulator::current(isolate); |
return sim->PushAddress(try_catch_address); |
} |
- static inline void UnregisterCTryCatch() { |
- Simulator::current(Isolate::Current())->PopAddress(); |
+ static inline void UnregisterCTryCatch(Isolate* isolate) { |
+ Simulator::current(isolate)->PopAddress(); |
} |
}; |