comparison graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/controlflow/SLRepeatingNode.java @ 17421:87ea195b66ff

Truffle: Make BranchProfile constructor private and introduce a factory Method BranchProfile.create().
author Christian Humer <christian.humer@gmail.com>
date Mon, 13 Oct 2014 17:44:40 +0200
parents 6af9d523222a
children 3844fb65016c
comparison
equal deleted inserted replaced
17420:e98150919577 17421:87ea195b66ff
44 /** 44 /**
45 * Profiling information, collected by the interpreter, capturing whether a {@code continue} 45 * Profiling information, collected by the interpreter, capturing whether a {@code continue}
46 * statement was used in this loop. This allows the compiler to generate better code for loops 46 * statement was used in this loop. This allows the compiler to generate better code for loops
47 * without a {@code continue}. 47 * without a {@code continue}.
48 */ 48 */
49 private final BranchProfile continueTaken = new BranchProfile(); 49 private final BranchProfile continueTaken = BranchProfile.create();
50 private final BranchProfile breakTaken = new BranchProfile(); 50 private final BranchProfile breakTaken = BranchProfile.create();
51 51
52 public SLRepeatingNode(SourceSection src, SLExpressionNode conditionNode, SLStatementNode bodyNode) { 52 public SLRepeatingNode(SourceSection src, SLExpressionNode conditionNode, SLStatementNode bodyNode) {
53 super(src); 53 super(src);
54 this.conditionNode = conditionNode; 54 this.conditionNode = conditionNode;
55 this.bodyNode = bodyNode; 55 this.bodyNode = bodyNode;