OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |