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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/interpreter/interpreter-assembler.h" 5 #include "src/interpreter/interpreter-assembler.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <ostream> 8 #include <ostream>
9 9
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1176 Label ok(this), abort(this, Label::kDeferred); 1176 Label ok(this), abort(this, Label::kDeferred);
1177 Branch(WordEqual(lhs, rhs), &ok, &abort); 1177 Branch(WordEqual(lhs, rhs), &ok, &abort);
1178 1178
1179 Bind(&abort); 1179 Bind(&abort);
1180 Abort(bailout_reason); 1180 Abort(bailout_reason);
1181 Goto(&ok); 1181 Goto(&ok);
1182 1182
1183 Bind(&ok); 1183 Bind(&ok);
1184 } 1184 }
1185 1185
1186 void InterpreterAssembler::MaybeDropFrames(Node* context) {
1187 Node* new_fp_address =
1188 ExternalConstant(ExternalReference::debug_new_fp_address(isolate()));
1189 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.
1190 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.
1191
1192 Label ok(this), drop_frames(this);
1193 Branch(IntPtrEqual(new_fp, null), &ok, &drop_frames);
1194
1195 Bind(&drop_frames);
1196 // We don't expect this call to return since the frame dropper tears down
1197 // the stack and jumps into the function on the target frame to restart it.
1198 CallStub(CodeFactory::FrameDropperTrampoline(isolate()), context, new_fp);
1199 Abort(kUnexpectedReturnFromFrameDropper);
1200 Goto(&ok);
1201
1202 Bind(&ok);
1203 }
1204
1186 void InterpreterAssembler::TraceBytecode(Runtime::FunctionId function_id) { 1205 void InterpreterAssembler::TraceBytecode(Runtime::FunctionId function_id) {
1187 CallRuntime(function_id, GetContext(), BytecodeArrayTaggedPointer(), 1206 CallRuntime(function_id, GetContext(), BytecodeArrayTaggedPointer(),
1188 SmiTag(BytecodeOffset()), GetAccumulatorUnchecked()); 1207 SmiTag(BytecodeOffset()), GetAccumulatorUnchecked());
1189 } 1208 }
1190 1209
1191 void InterpreterAssembler::TraceBytecodeDispatch(Node* target_bytecode) { 1210 void InterpreterAssembler::TraceBytecodeDispatch(Node* target_bytecode) {
1192 Node* counters_table = ExternalConstant( 1211 Node* counters_table = ExternalConstant(
1193 ExternalReference::interpreter_dispatch_counters(isolate())); 1212 ExternalReference::interpreter_dispatch_counters(isolate()));
1194 Node* source_bytecode_table_index = IntPtrConstant( 1213 Node* source_bytecode_table_index = IntPtrConstant(
1195 static_cast<int>(bytecode_) * (static_cast<int>(Bytecode::kLast) + 1)); 1214 static_cast<int>(bytecode_) * (static_cast<int>(Bytecode::kLast) + 1));
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
1303 Goto(&loop); 1322 Goto(&loop);
1304 } 1323 }
1305 Bind(&done_loop); 1324 Bind(&done_loop);
1306 1325
1307 return array; 1326 return array;
1308 } 1327 }
1309 1328
1310 } // namespace interpreter 1329 } // namespace interpreter
1311 } // namespace internal 1330 } // namespace internal
1312 } // namespace v8 1331 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698