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

Unified Diff: src/interpreter/interpreter-assembler.cc

Issue 2636913002: [liveedit] reimplement frame restarting. (Closed)
Patch Set: Created 3 years, 11 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/interpreter/interpreter-assembler.cc
diff --git a/src/interpreter/interpreter-assembler.cc b/src/interpreter/interpreter-assembler.cc
index 1ccd342f0662470b54d283ea416cc361244ba2ef..c50bcba24b9f2a80bacc4bec649ee069ff8b2c58 100644
--- a/src/interpreter/interpreter-assembler.cc
+++ b/src/interpreter/interpreter-assembler.cc
@@ -1183,6 +1183,25 @@ void InterpreterAssembler::AbortIfWordNotEqual(Node* lhs, Node* rhs,
Bind(&ok);
}
+void InterpreterAssembler::MaybeDropFrames(Node* context) {
+ Node* new_fp_address =
+ ExternalConstant(ExternalReference::debug_new_fp_address(isolate()));
+ Node* new_fp = Load(MachineType::TaggedPointer(), new_fp_address);
jgruber 2017/01/17 13:29:58 Is new_fp really a TaggedPointer? Looking at the F
Michael Starzinger 2017/01/17 14:45:27 +1, nice catch, I totally missed that!
Yang 2017/01/18 07:49:08 Done.
+ Node* null = IntPtrConstant(static_cast<intptr_t>(0));
jgruber 2017/01/17 13:29:58 Nit: we don't need the static_cast.
Yang 2017/01/18 07:49:08 Done.
+
+ Label ok(this), drop_frames(this);
+ Branch(IntPtrEqual(new_fp, null), &ok, &drop_frames);
+
+ Bind(&drop_frames);
+ // We don't expect this call to return since the frame dropper tears down
+ // the stack and jumps into the function on the target frame to restart it.
+ CallStub(CodeFactory::FrameDropperTrampoline(isolate()), context, new_fp);
+ Abort(kUnexpectedReturnFromFrameDropper);
+ Goto(&ok);
+
+ Bind(&ok);
+}
+
void InterpreterAssembler::TraceBytecode(Runtime::FunctionId function_id) {
CallRuntime(function_id, GetContext(), BytecodeArrayTaggedPointer(),
SmiTag(BytecodeOffset()), GetAccumulatorUnchecked());

Powered by Google App Engine
This is Rietveld 408576698