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

Side by Side Diff: src/wasm/wasm-debug.cc

Issue 2651043004: [wasm] Add inspector test for stepping (Closed)
Patch Set: Beautification 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
« no previous file with comments | « no previous file | src/wasm/wasm-interpreter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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/assembler-inl.h" 5 #include "src/assembler-inl.h"
6 #include "src/assert-scope.h" 6 #include "src/assert-scope.h"
7 #include "src/compiler/wasm-compiler.h" 7 #include "src/compiler/wasm-compiler.h"
8 #include "src/debug/debug.h" 8 #include "src/debug/debug.h"
9 #include "src/factory.h" 9 #include "src/factory.h"
10 #include "src/frames-inl.h" 10 #include "src/frames-inl.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 } 158 }
159 159
160 WasmInterpreter::State ContinueExecution(WasmInterpreter::Thread* thread) { 160 WasmInterpreter::State ContinueExecution(WasmInterpreter::Thread* thread) {
161 switch (next_step_action_) { 161 switch (next_step_action_) {
162 case StepNone: 162 case StepNone:
163 return thread->Run(); 163 return thread->Run();
164 case StepIn: 164 case StepIn:
165 return thread->Step(); 165 return thread->Step();
166 case StepOut: 166 case StepOut:
167 thread->AddBreakFlags(WasmInterpreter::BreakFlag::AfterReturn); 167 thread->AddBreakFlags(WasmInterpreter::BreakFlag::AfterReturn);
168 return thread->Step(); 168 return thread->Run();
169 case StepNext: { 169 case StepNext: {
170 int stack_depth = thread->GetFrameCount(); 170 int stack_depth = thread->GetFrameCount();
171 if (stack_depth == last_step_stack_depth_) return thread->Step(); 171 if (stack_depth == last_step_stack_depth_) return thread->Step();
172 thread->AddBreakFlags(stack_depth > last_step_stack_depth_ 172 thread->AddBreakFlags(stack_depth > last_step_stack_depth_
173 ? WasmInterpreter::BreakFlag::AfterReturn 173 ? WasmInterpreter::BreakFlag::AfterReturn
174 : WasmInterpreter::BreakFlag::AfterCall); 174 : WasmInterpreter::BreakFlag::AfterCall);
175 return thread->Run(); 175 return thread->Run();
176 } 176 }
177 case StepFrame: 177 case StepFrame:
178 thread->AddBreakFlags(WasmInterpreter::BreakFlag::AfterCall | 178 thread->AddBreakFlags(WasmInterpreter::BreakFlag::AfterCall |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 427
428 std::vector<std::pair<uint32_t, int>> WasmDebugInfo::GetInterpretedStack( 428 std::vector<std::pair<uint32_t, int>> WasmDebugInfo::GetInterpretedStack(
429 Address frame_pointer) { 429 Address frame_pointer) {
430 return GetInterpreterHandle(this)->GetInterpretedStack(frame_pointer); 430 return GetInterpreterHandle(this)->GetInterpretedStack(frame_pointer);
431 } 431 }
432 432
433 std::unique_ptr<wasm::InterpretedFrame> WasmDebugInfo::GetInterpretedFrame( 433 std::unique_ptr<wasm::InterpretedFrame> WasmDebugInfo::GetInterpretedFrame(
434 Address frame_pointer, int idx) { 434 Address frame_pointer, int idx) {
435 return GetInterpreterHandle(this)->GetInterpretedFrame(frame_pointer, idx); 435 return GetInterpreterHandle(this)->GetInterpretedFrame(frame_pointer, idx);
436 } 436 }
OLDNEW
« no previous file with comments | « no previous file | src/wasm/wasm-interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698