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

Unified Diff: src/ast.h

Issue 850093004: Remove dead TargetCollector code from the parser (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix -Wpedantic error, restoring bogus kInvalid NodeType Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/ast.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index d562e91d981042edc30479fe125fe8fb8fda5bfd..6bc811c9fe7904dbe6bf93f5921460a1c15d47c3 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -114,7 +114,6 @@ class Expression;
class IterationStatement;
class MaterializedLiteral;
class Statement;
-class TargetCollector;
class TypeFeedbackOracle;
class RegExpAlternative;
@@ -225,7 +224,6 @@ class AstNode: public ZoneObject {
AST_NODE_LIST(DECLARE_NODE_FUNCTIONS)
#undef DECLARE_NODE_FUNCTIONS
- virtual TargetCollector* AsTargetCollector() { return NULL; }
virtual BreakableStatement* AsBreakableStatement() { return NULL; }
virtual IterationStatement* AsIterationStatement() { return NULL; }
virtual MaterializedLiteral* AsMaterializedLiteral() { return NULL; }
@@ -1230,53 +1228,20 @@ class IfStatement FINAL : public Statement {
};
-// NOTE: TargetCollectors are represented as nodes to fit in the target
-// stack in the compiler; this should probably be reworked.
-class TargetCollector FINAL : public AstNode {
- public:
- explicit TargetCollector(Zone* zone)
- : AstNode(RelocInfo::kNoPosition), targets_(0, zone) { }
-
- // Adds a jump target to the collector. The collector stores a pointer not
- // a copy of the target to make binding work, so make sure not to pass in
- // references to something on the stack.
- void AddTarget(Label* target, Zone* zone);
-
- // Virtual behaviour. TargetCollectors are never part of the AST.
- void Accept(AstVisitor* v) OVERRIDE { UNREACHABLE(); }
- NodeType node_type() const OVERRIDE { return kInvalid; }
- TargetCollector* AsTargetCollector() OVERRIDE { return this; }
-
- ZoneList<Label*>* targets() { return &targets_; }
-
- private:
- ZoneList<Label*> targets_;
-};
-
-
class TryStatement : public Statement {
public:
- void set_escaping_targets(ZoneList<Label*>* targets) {
- escaping_targets_ = targets;
- }
-
int index() const { return index_; }
Block* try_block() const { return try_block_; }
- ZoneList<Label*>* escaping_targets() const { return escaping_targets_; }
protected:
TryStatement(Zone* zone, int index, Block* try_block, int pos)
- : Statement(zone, pos),
- index_(index),
- try_block_(try_block),
- escaping_targets_(NULL) { }
+ : Statement(zone, pos), index_(index), try_block_(try_block) {}
private:
// Unique (per-function) index of this handler. This is not an AST ID.
int index_;
Block* try_block_;
- ZoneList<Label*>* escaping_targets_;
};
« no previous file with comments | « no previous file | src/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698