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

Side by Side Diff: src/ast.h

Issue 1388813002: Remove dead helper methods from Block AST node (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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 | « no previous file | no next file » | 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_AST_H_ 5 #ifndef V8_AST_H_
6 #define V8_AST_H_ 6 #define V8_AST_H_
7 7
8 #include "src/assembler.h" 8 #include "src/assembler.h"
9 #include "src/ast-value-factory.h" 9 #include "src/ast-value-factory.h"
10 #include "src/bailout-reason.h" 10 #include "src/bailout-reason.h"
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 BreakableType breakable_type_; 451 BreakableType breakable_type_;
452 Label break_target_; 452 Label break_target_;
453 int base_id_; 453 int base_id_;
454 }; 454 };
455 455
456 456
457 class Block final : public BreakableStatement { 457 class Block final : public BreakableStatement {
458 public: 458 public:
459 DECLARE_NODE_TYPE(Block) 459 DECLARE_NODE_TYPE(Block)
460 460
461 void AddStatement(Statement* statement, Zone* zone) {
462 statements_.Add(statement, zone);
463 }
464
465 void InsertStatementAt(int index, Statement* statement, Zone* zone) {
466 statements_.InsertAt(index, statement, zone);
467 }
468
469 ZoneList<Statement*>* statements() { return &statements_; } 461 ZoneList<Statement*>* statements() { return &statements_; }
470 bool ignore_completion_value() const { return ignore_completion_value_; } 462 bool ignore_completion_value() const { return ignore_completion_value_; }
471 463
472 static int num_ids() { return parent_num_ids() + 1; } 464 static int num_ids() { return parent_num_ids() + 1; }
473 BailoutId DeclsId() const { return BailoutId(local_id(0)); } 465 BailoutId DeclsId() const { return BailoutId(local_id(0)); }
474 466
475 bool IsJump() const override { 467 bool IsJump() const override {
476 return !statements_.is_empty() && statements_.last()->IsJump() 468 return !statements_.is_empty() && statements_.last()->IsJump()
477 && labels() == NULL; // Good enough as an approximation... 469 && labels() == NULL; // Good enough as an approximation...
478 } 470 }
(...skipping 3139 matching lines...) Expand 10 before | Expand all | Expand 10 after
3618 // the parser-level zone. 3610 // the parser-level zone.
3619 Zone* parser_zone_; 3611 Zone* parser_zone_;
3620 AstValueFactory* ast_value_factory_; 3612 AstValueFactory* ast_value_factory_;
3621 }; 3613 };
3622 3614
3623 3615
3624 } // namespace internal 3616 } // namespace internal
3625 } // namespace v8 3617 } // namespace v8
3626 3618
3627 #endif // V8_AST_H_ 3619 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698