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

Unified Diff: src/ast/ast.h

Issue 2672823007: Revert of [debugger] remove debugger statement support from FCG/CS. (Closed)
Patch Set: Created 3 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/assembler.cc ('k') | src/ast/ast-numbering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/ast.h
diff --git a/src/ast/ast.h b/src/ast/ast.h
index c2d9cc4c78ed616a3eb95f6506186ee01005ba86..e5c7646ef3a342794ad5db1ded50b13ecd425e73 100644
--- a/src/ast/ast.h
+++ b/src/ast/ast.h
@@ -1146,10 +1146,26 @@
class DebuggerStatement final : public Statement {
- private:
- friend class AstNodeFactory;
-
- explicit DebuggerStatement(int pos) : Statement(pos, kDebuggerStatement) {}
+ public:
+ void set_base_id(int id) { base_id_ = id; }
+ static int num_ids() { return parent_num_ids() + 1; }
+ BailoutId DebugBreakId() const { return BailoutId(local_id(0)); }
+
+ private:
+ friend class AstNodeFactory;
+
+ explicit DebuggerStatement(int pos)
+ : Statement(pos, kDebuggerStatement),
+ base_id_(BailoutId::None().ToInt()) {}
+
+ static int parent_num_ids() { return 0; }
+ int base_id() const {
+ DCHECK(!BailoutId(base_id_).IsNone());
+ return base_id_;
+ }
+ int local_id(int n) const { return base_id() + parent_num_ids() + n; }
+
+ int base_id_;
};
« no previous file with comments | « src/assembler.cc ('k') | src/ast/ast-numbering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698