OLD | NEW |
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 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1216 Label ok(this), abort(this, Label::kDeferred); | 1216 Label ok(this), abort(this, Label::kDeferred); |
1217 Branch(WordEqual(lhs, rhs), &ok, &abort); | 1217 Branch(WordEqual(lhs, rhs), &ok, &abort); |
1218 | 1218 |
1219 Bind(&abort); | 1219 Bind(&abort); |
1220 Abort(bailout_reason); | 1220 Abort(bailout_reason); |
1221 Goto(&ok); | 1221 Goto(&ok); |
1222 | 1222 |
1223 Bind(&ok); | 1223 Bind(&ok); |
1224 } | 1224 } |
1225 | 1225 |
| 1226 void InterpreterAssembler::MaybeDropFrames(Node* context) { |
| 1227 Node* restart_fp_address = |
| 1228 ExternalConstant(ExternalReference::debug_restart_fp_address(isolate())); |
| 1229 |
| 1230 Node* restart_fp = Load(MachineType::Pointer(), restart_fp_address); |
| 1231 Node* null = IntPtrConstant(0); |
| 1232 |
| 1233 Label ok(this), drop_frames(this); |
| 1234 Branch(IntPtrEqual(restart_fp, null), &ok, &drop_frames); |
| 1235 |
| 1236 Bind(&drop_frames); |
| 1237 // We don't expect this call to return since the frame dropper tears down |
| 1238 // the stack and jumps into the function on the target frame to restart it. |
| 1239 CallStub(CodeFactory::FrameDropperTrampoline(isolate()), context, restart_fp); |
| 1240 Abort(kUnexpectedReturnFromFrameDropper); |
| 1241 Goto(&ok); |
| 1242 |
| 1243 Bind(&ok); |
| 1244 } |
| 1245 |
1226 void InterpreterAssembler::TraceBytecode(Runtime::FunctionId function_id) { | 1246 void InterpreterAssembler::TraceBytecode(Runtime::FunctionId function_id) { |
1227 CallRuntime(function_id, GetContext(), BytecodeArrayTaggedPointer(), | 1247 CallRuntime(function_id, GetContext(), BytecodeArrayTaggedPointer(), |
1228 SmiTag(BytecodeOffset()), GetAccumulatorUnchecked()); | 1248 SmiTag(BytecodeOffset()), GetAccumulatorUnchecked()); |
1229 } | 1249 } |
1230 | 1250 |
1231 void InterpreterAssembler::TraceBytecodeDispatch(Node* target_bytecode) { | 1251 void InterpreterAssembler::TraceBytecodeDispatch(Node* target_bytecode) { |
1232 Node* counters_table = ExternalConstant( | 1252 Node* counters_table = ExternalConstant( |
1233 ExternalReference::interpreter_dispatch_counters(isolate())); | 1253 ExternalReference::interpreter_dispatch_counters(isolate())); |
1234 Node* source_bytecode_table_index = IntPtrConstant( | 1254 Node* source_bytecode_table_index = IntPtrConstant( |
1235 static_cast<int>(bytecode_) * (static_cast<int>(Bytecode::kLast) + 1)); | 1255 static_cast<int>(bytecode_) * (static_cast<int>(Bytecode::kLast) + 1)); |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1343 Goto(&loop); | 1363 Goto(&loop); |
1344 } | 1364 } |
1345 Bind(&done_loop); | 1365 Bind(&done_loop); |
1346 | 1366 |
1347 return array; | 1367 return array; |
1348 } | 1368 } |
1349 | 1369 |
1350 } // namespace interpreter | 1370 } // namespace interpreter |
1351 } // namespace internal | 1371 } // namespace internal |
1352 } // namespace v8 | 1372 } // namespace v8 |
OLD | NEW |