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

Side by Side Diff: src/frames.h

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/debug/debug.cc ('k') | src/frames.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 #ifndef V8_FRAMES_H_ 5 #ifndef V8_FRAMES_H_
6 #define V8_FRAMES_H_ 6 #define V8_FRAMES_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/handles.h" 9 #include "src/handles.h"
10 #include "src/safepoint-table.h" 10 #include "src/safepoint-table.h"
(...skipping 1444 matching lines...) Expand 10 before | Expand all | Expand 10 after
1455 void Reset(ThreadLocalTop* top); 1455 void Reset(ThreadLocalTop* top);
1456 1456
1457 DISALLOW_COPY_AND_ASSIGN(StackFrameIterator); 1457 DISALLOW_COPY_AND_ASSIGN(StackFrameIterator);
1458 }; 1458 };
1459 1459
1460 // Iterator that supports iterating through all JavaScript frames. 1460 // Iterator that supports iterating through all JavaScript frames.
1461 class JavaScriptFrameIterator BASE_EMBEDDED { 1461 class JavaScriptFrameIterator BASE_EMBEDDED {
1462 public: 1462 public:
1463 inline explicit JavaScriptFrameIterator(Isolate* isolate); 1463 inline explicit JavaScriptFrameIterator(Isolate* isolate);
1464 inline JavaScriptFrameIterator(Isolate* isolate, ThreadLocalTop* top); 1464 inline JavaScriptFrameIterator(Isolate* isolate, ThreadLocalTop* top);
1465 // Skip frames until the frame with the given id is reached.
1466 JavaScriptFrameIterator(Isolate* isolate, StackFrame::Id id);
1467 1465
1468 inline JavaScriptFrame* frame() const; 1466 inline JavaScriptFrame* frame() const;
1469 1467
1470 bool done() const { return iterator_.done(); } 1468 bool done() const { return iterator_.done(); }
1471 void Advance(); 1469 void Advance();
1472 1470
1473 // Advance to the frame holding the arguments for the current 1471 // Advance to the frame holding the arguments for the current
1474 // frame. This only affects the current frame if it has adapted 1472 // frame. This only affects the current frame if it has adapted
1475 // arguments. 1473 // arguments.
1476 void AdvanceToArgumentsFrame(); 1474 void AdvanceToArgumentsFrame();
1477 1475
1478 private: 1476 private:
1479 StackFrameIterator iterator_; 1477 StackFrameIterator iterator_;
1480 }; 1478 };
1481 1479
1482 // NOTE: The stack trace frame iterator is an iterator that only traverse proper 1480 // NOTE: The stack trace frame iterator is an iterator that only traverse proper
1483 // JavaScript frames that have proper JavaScript functions and WASM frames. 1481 // JavaScript frames that have proper JavaScript functions and WASM frames.
1484 // This excludes the problematic functions in runtime.js. 1482 // This excludes the problematic functions in runtime.js.
1485 class StackTraceFrameIterator BASE_EMBEDDED { 1483 class StackTraceFrameIterator BASE_EMBEDDED {
1486 public: 1484 public:
1487 explicit StackTraceFrameIterator(Isolate* isolate); 1485 explicit StackTraceFrameIterator(Isolate* isolate);
1486 // Skip frames until the frame with the given id is reached.
1488 StackTraceFrameIterator(Isolate* isolate, StackFrame::Id id); 1487 StackTraceFrameIterator(Isolate* isolate, StackFrame::Id id);
1489 bool done() const { return iterator_.done(); } 1488 bool done() const { return iterator_.done(); }
1490 void Advance(); 1489 void Advance();
1491 1490
1492 inline StandardFrame* frame() const; 1491 inline StandardFrame* frame() const;
1493 1492
1494 inline bool is_javascript() const; 1493 inline bool is_javascript() const;
1495 inline bool is_wasm() const; 1494 inline bool is_wasm() const;
1496 inline JavaScriptFrame* javascript_frame() const; 1495 inline JavaScriptFrame* javascript_frame() const;
1497 1496
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
1549 1548
1550 1549
1551 // Reads all frames on the current stack and copies them into the current 1550 // Reads all frames on the current stack and copies them into the current
1552 // zone memory. 1551 // zone memory.
1553 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone); 1552 Vector<StackFrame*> CreateStackMap(Isolate* isolate, Zone* zone);
1554 1553
1555 } // namespace internal 1554 } // namespace internal
1556 } // namespace v8 1555 } // namespace v8
1557 1556
1558 #endif // V8_FRAMES_H_ 1557 #endif // V8_FRAMES_H_
OLDNEW
« no previous file with comments | « src/debug/debug.cc ('k') | src/frames.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698