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

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

Issue 1703453002: [interpreter, debugger] support debug breaks via bytecode array copy (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: address comments and add ports 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/interpreter/interpreter-assembler.h ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/interpreter-assembler.cc
diff --git a/src/interpreter/interpreter-assembler.cc b/src/interpreter/interpreter-assembler.cc
index 50894ab5e65cf072c6b7bf7a09fa340ad1b838be..a53408e882e178558be9b4f5e0e505755d9f29ed 100644
--- a/src/interpreter/interpreter-assembler.cc
+++ b/src/interpreter/interpreter-assembler.cc
@@ -408,9 +408,6 @@ void InterpreterAssembler::Dispatch() {
}
void InterpreterAssembler::DispatchTo(Node* new_bytecode_offset) {
- if (FLAG_trace_ignition) {
- TraceBytecode(Runtime::kInterpreterTraceBytecodeExit);
- }
Node* target_bytecode = Load(
MachineType::Uint8(), BytecodeArrayTaggedPointer(), new_bytecode_offset);
@@ -420,24 +417,28 @@ void InterpreterAssembler::DispatchTo(Node* new_bytecode_offset) {
Load(MachineType::Pointer(), DispatchTableRawPointer(),
Word32Shl(target_bytecode, Int32Constant(kPointerSizeLog2)));
- InterpreterDispatchDescriptor descriptor(isolate());
- Node* args[] = {GetAccumulator(), RegisterFileRawPointer(),
- new_bytecode_offset, BytecodeArrayTaggedPointer(),
- DispatchTableRawPointer(), GetContext()};
- TailCall(descriptor, target_code_object, args, 0);
+ DispatchToBytecodeHandler(target_code_object, new_bytecode_offset);
}
-void InterpreterAssembler::InterpreterReturn() {
+void InterpreterAssembler::DispatchToBytecodeHandler(Node* handler,
+ Node* bytecode_offset) {
if (FLAG_trace_ignition) {
TraceBytecode(Runtime::kInterpreterTraceBytecodeExit);
}
+
+ if (bytecode_offset == nullptr) bytecode_offset = BytecodeOffset();
rmcilroy 2016/02/19 14:47:16 Could you avoid this and the default argument type
+
InterpreterDispatchDescriptor descriptor(isolate());
- Node* exit_trampoline_code_object =
- HeapConstant(isolate()->builtins()->InterpreterExitTrampoline());
Node* args[] = {GetAccumulator(), RegisterFileRawPointer(),
- BytecodeOffset(), BytecodeArrayTaggedPointer(),
+ bytecode_offset, BytecodeArrayTaggedPointer(),
DispatchTableRawPointer(), GetContext()};
- TailCall(descriptor, exit_trampoline_code_object, args, 0);
+ TailCall(descriptor, handler, args, 0);
+}
+
+void InterpreterAssembler::InterpreterReturn() {
+ Node* exit_trampoline_code_object =
+ HeapConstant(isolate()->builtins()->InterpreterExitTrampoline());
+ DispatchToBytecodeHandler(exit_trampoline_code_object);
}
void InterpreterAssembler::StackCheck() {
« no previous file with comments | « src/interpreter/interpreter-assembler.h ('k') | src/mips/builtins-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698