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

Side by Side Diff: src/frames.cc

Issue 2649533002: [wasm] Implement stepping in wasm code (Closed)
Patch Set: Rebase 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 | « src/frames.h ('k') | src/runtime/runtime-debug.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/frames.h" 5 #include "src/frames.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 STACK_FRAME_TYPE_LIST(FRAME_TYPE_CASE) 124 STACK_FRAME_TYPE_LIST(FRAME_TYPE_CASE)
125 default: break; 125 default: break;
126 } 126 }
127 return NULL; 127 return NULL;
128 128
129 #undef FRAME_TYPE_CASE 129 #undef FRAME_TYPE_CASE
130 } 130 }
131 131
132 // ------------------------------------------------------------------------- 132 // -------------------------------------------------------------------------
133 133
134 JavaScriptFrameIterator::JavaScriptFrameIterator(Isolate* isolate,
135 StackFrame::Id id)
136 : iterator_(isolate) {
137 while (!done()) {
138 Advance();
139 if (frame()->id() == id) return;
140 }
141 }
142
143
144 void JavaScriptFrameIterator::Advance() { 134 void JavaScriptFrameIterator::Advance() {
145 do { 135 do {
146 iterator_.Advance(); 136 iterator_.Advance();
147 } while (!iterator_.done() && !iterator_.frame()->is_java_script()); 137 } while (!iterator_.done() && !iterator_.frame()->is_java_script());
148 } 138 }
149 139
150 140
151 void JavaScriptFrameIterator::AdvanceToArgumentsFrame() { 141 void JavaScriptFrameIterator::AdvanceToArgumentsFrame() {
152 if (!frame()->has_adapted_arguments()) return; 142 if (!frame()->has_adapted_arguments()) return;
153 iterator_.Advance(); 143 iterator_.Advance();
(...skipping 2083 matching lines...) Expand 10 before | Expand all | Expand 10 after
2237 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) { 2227 for (StackFrameIterator it(isolate); !it.done(); it.Advance()) {
2238 StackFrame* frame = AllocateFrameCopy(it.frame(), zone); 2228 StackFrame* frame = AllocateFrameCopy(it.frame(), zone);
2239 list.Add(frame, zone); 2229 list.Add(frame, zone);
2240 } 2230 }
2241 return list.ToVector(); 2231 return list.ToVector();
2242 } 2232 }
2243 2233
2244 2234
2245 } // namespace internal 2235 } // namespace internal
2246 } // namespace v8 2236 } // namespace v8
OLDNEW
« no previous file with comments | « src/frames.h ('k') | src/runtime/runtime-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698