diff options
Diffstat (limited to 'src/jdk/nashorn/internal/ir/Block.java')
-rw-r--r-- | src/jdk/nashorn/internal/ir/Block.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/jdk/nashorn/internal/ir/Block.java b/src/jdk/nashorn/internal/ir/Block.java index c1576265..86a84ca6 100644 --- a/src/jdk/nashorn/internal/ir/Block.java +++ b/src/jdk/nashorn/internal/ir/Block.java @@ -277,6 +277,14 @@ public class Block extends Node implements BreakableNode, Terminal, Flags<Block> } /** + * Returns the number of statements in the block. + * @return the number of statements in the block. + */ + public int getStatementCount() { + return statements.size(); + } + + /** * Returns the line number of the first statement in the block. * @return the line number of the first statement in the block, or -1 if the block has no statements. */ |