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

Unified Diff: src/x64/deoptimizer-x64.cc

Issue 14429003: Refactor ExternalReference::isolate_address() to not rely on Isolate::Current(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: src/x64/deoptimizer-x64.cc
diff --git a/src/x64/deoptimizer-x64.cc b/src/x64/deoptimizer-x64.cc
index bae97cd8155e5c5da166986ad243939dc316df8d..e51bdf19ea9df3089590e56dfb45318615d041f8 100644
--- a/src/x64/deoptimizer-x64.cc
+++ b/src/x64/deoptimizer-x64.cc
@@ -653,21 +653,20 @@ void Deoptimizer::EntryGenerator::Generate() {
__ Set(arg2, type());
// Args 3 and 4 are already in the right registers.
+ Isolate* isolate = masm()->isolate();
Sven Panne 2013/04/23 13:18:08 Again: Add an isolate() method to EntryGenerator (
+
// On windows put the arguments on the stack (PrepareCallCFunction
// has created space for this). On linux pass the arguments in r8 and r9.
#ifdef _WIN64
__ movq(Operand(rsp, 4 * kPointerSize), arg5);
- __ LoadAddress(arg5, ExternalReference::isolate_address());
+ __ LoadAddress(arg5, ExternalReference::isolate_address(isolate));
__ movq(Operand(rsp, 5 * kPointerSize), arg5);
#else
__ movq(r8, arg5);
- __ LoadAddress(r9, ExternalReference::isolate_address());
+ __ LoadAddress(r9, ExternalReference::isolate_address(isolate));
#endif
- Isolate* isolate = masm()->isolate();
-
- {
- AllowExternalCallThatCantCauseGC scope(masm());
+ { AllowExternalCallThatCantCauseGC scope(masm());
__ CallCFunction(ExternalReference::new_deoptimizer_function(isolate), 6);
}
// Preserve deoptimizer object in register rax and get the input
@@ -717,7 +716,7 @@ void Deoptimizer::EntryGenerator::Generate() {
__ push(rax);
__ PrepareCallCFunction(2);
__ movq(arg1, rax);
- __ LoadAddress(arg2, ExternalReference::isolate_address());
+ __ LoadAddress(arg2, ExternalReference::isolate_address(isolate));
{
AllowExternalCallThatCantCauseGC scope(masm());
__ CallCFunction(

Powered by Google App Engine
This is Rietveld 408576698