Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/controlflow/SLBlockNode.java @ 13882:afd6fa5e8229
SL: Feedback from reviewers
author | Christian Wimmer <christian.wimmer@oracle.com> |
---|---|
date | Wed, 05 Feb 2014 08:02:15 -0800 |
parents | 64c77f0577bb |
children | a08b8694f556 |
comparison
equal
deleted
inserted
replaced
13881:272a166a9574 | 13882:afd6fa5e8229 |
---|---|
20 * or visit www.oracle.com if you need additional information or have any | 20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. | 21 * questions. |
22 */ | 22 */ |
23 package com.oracle.truffle.sl.nodes.controlflow; | 23 package com.oracle.truffle.sl.nodes.controlflow; |
24 | 24 |
25 import com.oracle.truffle.api.*; | |
25 import com.oracle.truffle.api.frame.*; | 26 import com.oracle.truffle.api.frame.*; |
26 import com.oracle.truffle.api.nodes.*; | 27 import com.oracle.truffle.api.nodes.*; |
27 import com.oracle.truffle.sl.nodes.*; | 28 import com.oracle.truffle.sl.nodes.*; |
28 | 29 |
29 /** | 30 /** |
30 * A statement node that just executes a list of other statements. | 31 * A statement node that just executes a list of other statements. |
31 */ | 32 */ |
32 @NodeInfo(shortName = "block") | 33 @NodeInfo(shortName = "block") |
33 public class SLBlockNode extends SLStatementNode { | 34 public final class SLBlockNode extends SLStatementNode { |
34 | 35 |
35 /** | 36 /** |
36 * The array of child nodes. The annotation {@link com.oracle.truffle.api.nodes.Node.Children | 37 * The array of child nodes. The annotation {@link com.oracle.truffle.api.nodes.Node.Children |
37 * Children} informs Truffle that the field contains multiple children. It is a Truffle | 38 * Children} informs Truffle that the field contains multiple children. It is a Truffle |
38 * requirement that the field is {@code final} and an array of nodes. | 39 * requirement that the field is {@code final} and an array of nodes. |
53 * all children to be inlined. | 54 * all children to be inlined. |
54 */ | 55 */ |
55 @Override | 56 @Override |
56 @ExplodeLoop | 57 @ExplodeLoop |
57 public void executeVoid(VirtualFrame frame) { | 58 public void executeVoid(VirtualFrame frame) { |
59 /* | |
60 * This assertion illustrates that the arryay length is really a constant during | |
61 * compilation. | |
62 */ | |
63 CompilerAsserts.compilationConstant(bodyNodes.length); | |
64 | |
58 for (SLStatementNode statement : bodyNodes) { | 65 for (SLStatementNode statement : bodyNodes) { |
59 statement.executeVoid(frame); | 66 statement.executeVoid(frame); |
60 } | 67 } |
61 } | 68 } |
62 } | 69 } |