equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
99 // for example, empty blocks and statements |
99 // for example, empty blocks and statements |
100 if (entry.startPc == entry.endPc) |
100 if (entry.startPc == entry.endPc) |
101 continue; |
101 continue; |
102 |
102 |
103 SourceRange pos = positions.get(entry.tree); |
103 SourceRange pos = positions.get(entry.tree); |
104 assert pos != null : "CRT: tree source positions are undefined"; |
104 Assert.checkNonNull(pos, "CRT: tree source positions are undefined"); |
105 if ((pos.startPos == Position.NOPOS) || (pos.endPos == Position.NOPOS)) |
105 if ((pos.startPos == Position.NOPOS) || (pos.endPos == Position.NOPOS)) |
106 continue; |
106 continue; |
107 |
107 |
108 if (crtDebug) { |
108 if (crtDebug) { |
109 System.out.println("Tree: " + entry.tree + ", type:" + getTypes(entry.flags)); |
109 System.out.println("Tree: " + entry.tree + ", type:" + getTypes(entry.flags)); |
515 public void visitErroneous(JCErroneous tree) { |
515 public void visitErroneous(JCErroneous tree) { |
516 result = null; |
516 result = null; |
517 } |
517 } |
518 |
518 |
519 public void visitTree(JCTree tree) { |
519 public void visitTree(JCTree tree) { |
520 assert false; |
520 Assert.error(); |
521 } |
521 } |
522 |
522 |
523 /** The start position of given tree. |
523 /** The start position of given tree. |
524 */ |
524 */ |
525 public int startPos(JCTree tree) { |
525 public int startPos(JCTree tree) { |