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

Unified Diff: src/deoptimizer.cc

Issue 1684073002: [Interpreter] Save and restore dispatch table pointer during calls. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@int_assm
Patch Set: Address review comments Created 4 years, 10 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
« no previous file with comments | « src/arm64/builtins-arm64.cc ('k') | src/frames.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/deoptimizer.cc
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc
index f7791d210ec3c6dde23c3f060775a5b976412b47..532b96f47c8b03db9b5651bf65789e1df2509c57 100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.cc
@@ -11,6 +11,7 @@
#include "src/frames-inl.h"
#include "src/full-codegen/full-codegen.h"
#include "src/global-handles.h"
+#include "src/interpreter/interpreter.h"
#include "src/macro-assembler.h"
#include "src/profiler/cpu-profiler.h"
#include "src/v8.h"
@@ -1180,13 +1181,21 @@ void Deoptimizer::DoComputeInterpretedFrame(int frame_index) {
DCHECK(!is_bottommost || input_->GetFrameSlot(input_offset) == value);
WriteValueToOutput(function, 0, frame_index, output_offset, "function ");
- // TODO(rmcilroy): Deal with new.target correctly - currently just set it to
+ // The new.target slot is only used during function activiation which is
+ // before the first deopt point, so should never be needed. Just set it to
// undefined.
output_offset -= kPointerSize;
input_offset -= kPointerSize;
Object* new_target = isolate_->heap()->undefined_value();
WriteValueToOutput(new_target, 0, frame_index, output_offset, "new_target ");
+ // Set the dispatch table pointer.
+ output_offset -= kPointerSize;
+ input_offset -= kPointerSize;
+ Address dispatch_table = isolate()->interpreter()->dispatch_table_address();
+ WriteValueToOutput(reinterpret_cast<Object*>(dispatch_table), 0, frame_index,
+ output_offset, "dispatch_table ");
+
// The bytecode offset was mentioned explicitly in the BEGIN_FRAME.
output_offset -= kPointerSize;
input_offset -= kPointerSize;
« no previous file with comments | « src/arm64/builtins-arm64.cc ('k') | src/frames.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698