Index: src/arm64/simulator-arm64.h |
diff --git a/src/arm64/simulator-arm64.h b/src/arm64/simulator-arm64.h |
index 3d7c15cfd0053f8d8374d832081bac3253506090..724c767ab726d04ab31549460c837621f872bf82 100644 |
--- a/src/arm64/simulator-arm64.h |
+++ b/src/arm64/simulator-arm64.h |
@@ -24,7 +24,7 @@ namespace internal { |
// Running without a simulator on a native ARM64 platform. |
// 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)) |
typedef int (*arm64_regexp_matcher)(String* input, |
@@ -42,24 +42,29 @@ typedef int (*arm64_regexp_matcher)(String* input, |
// should act as a function matching the type arm64_regexp_matcher. |
// The ninth argument is a dummy that reserves the space used for |
// the return address added by the ExitFrame in native calls. |
-#define CALL_GENERATED_REGEXP_CODE(entry, p0, p1, p2, p3, p4, p5, p6, p7, p8) \ |
- (FUNCTION_CAST<arm64_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<arm64_regexp_matcher>(entry)(p0, p1, p2, p3, p4, p5, p6, p7, \ |
+ NULL, p8)) |
// Running without a simulator there is nothing to do. |
class SimulatorStack : public v8::internal::AllStatic { |
public: |
static uintptr_t JsLimitFromCLimit(v8::internal::Isolate* isolate, |
- uintptr_t c_limit) { |
+ uintptr_t c_limit) { |
USE(isolate); |
return c_limit; |
} |
- static uintptr_t RegisterCTryCatch(uintptr_t try_catch_address) { |
+ static uintptr_t RegisterCTryCatch(v8::internal::Isolate* isolate, |
+ uintptr_t try_catch_address) { |
+ USE(isolate); |
return try_catch_address; |
} |
- static void UnregisterCTryCatch() { } |
+ static void UnregisterCTryCatch(v8::internal::Isolate* isolate) { |
+ USE(isolate); |
+ } |
}; |
#else // !defined(USE_SIMULATOR) |
@@ -272,7 +277,8 @@ class Simulator : public DecoderVisitor { |
void ResetState(); |
// Runtime call support. |
- static void* RedirectExternalReference(void* external_function, |
+ static void* RedirectExternalReference(Isolate* isolate, |
+ void* external_function, |
ExternalReference::Type type); |
void DoRuntimeCall(Instruction* instr); |
@@ -871,15 +877,14 @@ class Simulator : public DecoderVisitor { |
// 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())->CallJS( \ |
- FUNCTION_ADDR(entry), \ |
- p0, p1, p2, p3, p4)) |
+#define CALL_GENERATED_CODE(isolate, entry, p0, p1, p2, p3, p4) \ |
+ reinterpret_cast<Object*>(Simulator::current(isolate)->CallJS( \ |
+ FUNCTION_ADDR(entry), p0, p1, p2, p3, p4)) |
-#define CALL_GENERATED_REGEXP_CODE(entry, p0, p1, p2, p3, p4, p5, p6, p7, p8) \ |
- static_cast<int>( \ |
- Simulator::current(Isolate::Current()) \ |
- ->CallRegExp(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) \ |
+ static_cast<int>(Simulator::current(isolate)->CallRegExp( \ |
+ entry, p0, p1, p2, p3, p4, p5, p6, p7, NULL, p8)) |
// The simulator has its own stack. Thus it has a different stack limit from |
@@ -893,13 +898,14 @@ class SimulatorStack : public v8::internal::AllStatic { |
return Simulator::current(isolate)->StackLimit(c_limit); |
} |
- static uintptr_t RegisterCTryCatch(uintptr_t try_catch_address) { |
- Simulator* sim = Simulator::current(Isolate::Current()); |
+ static uintptr_t RegisterCTryCatch(v8::internal::Isolate* isolate, |
+ uintptr_t try_catch_address) { |
+ Simulator* sim = Simulator::current(isolate); |
return sim->PushAddress(try_catch_address); |
} |
- static void UnregisterCTryCatch() { |
- Simulator::current(Isolate::Current())->PopAddress(); |
+ static void UnregisterCTryCatch(v8::internal::Isolate* isolate) { |
+ Simulator::current(isolate)->PopAddress(); |
} |
}; |