Fri, 05 Jun 2015 14:46:52 +0530
8081809: Missing final modifier in method parameters (nashorn code convention)
Reviewed-by: attila, lagergren
attila@1064 | 1 | /* |
attila@1064 | 2 | * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. |
attila@1064 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
attila@1064 | 4 | * |
attila@1064 | 5 | * This code is free software; you can redistribute it and/or modify it |
attila@1064 | 6 | * under the terms of the GNU General Public License version 2 only, as |
attila@1064 | 7 | * published by the Free Software Foundation. Oracle designates this |
attila@1064 | 8 | * particular file as subject to the "Classpath" exception as provided |
attila@1064 | 9 | * by Oracle in the LICENSE file that accompanied this code. |
attila@1064 | 10 | * |
attila@1064 | 11 | * This code is distributed in the hope that it will be useful, but WITHOUT |
attila@1064 | 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
attila@1064 | 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
attila@1064 | 14 | * version 2 for more details (a copy is included in the LICENSE file that |
attila@1064 | 15 | * accompanied this code). |
attila@1064 | 16 | * |
attila@1064 | 17 | * You should have received a copy of the GNU General Public License version |
attila@1064 | 18 | * 2 along with this work; if not, write to the Free Software Foundation, |
attila@1064 | 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
attila@1064 | 20 | * |
attila@1064 | 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
attila@1064 | 22 | * or visit www.oracle.com if you need additional information or have any |
attila@1064 | 23 | * questions. |
attila@1064 | 24 | */ |
attila@1064 | 25 | |
attila@1064 | 26 | package jdk.nashorn.internal.ir; |
attila@1064 | 27 | |
attila@1064 | 28 | import jdk.nashorn.internal.ir.visitor.NodeVisitor; |
attila@1064 | 29 | |
attila@1064 | 30 | /** |
attila@1064 | 31 | * Synthetic AST node that represents return from a split fragment of a split function for control flow reasons (break |
attila@1064 | 32 | * or continue into a target outside the current fragment). It has no JavaScript source representation and only occurs |
attila@1064 | 33 | * in synthetic functions created by the split-into-functions transformation. It is different from a return node in |
attila@1064 | 34 | * that the return value is irrelevant, and doesn't affect the function's return type calculation. |
attila@1064 | 35 | */ |
attila@1064 | 36 | public final class SplitReturn extends Statement { |
attila@1064 | 37 | private static final long serialVersionUID = 1L; |
attila@1064 | 38 | |
attila@1064 | 39 | /** The sole instance of this AST node. */ |
attila@1064 | 40 | public static final SplitReturn INSTANCE = new SplitReturn(); |
attila@1064 | 41 | |
attila@1064 | 42 | private SplitReturn() { |
attila@1064 | 43 | super(NO_LINE_NUMBER, NO_TOKEN, NO_FINISH); |
attila@1064 | 44 | } |
attila@1064 | 45 | |
attila@1064 | 46 | @Override |
attila@1064 | 47 | public boolean isTerminal() { |
attila@1064 | 48 | return true; |
attila@1064 | 49 | } |
attila@1064 | 50 | |
attila@1064 | 51 | @Override |
attila@1064 | 52 | public Node accept(final NodeVisitor<? extends LexicalContext> visitor) { |
attila@1064 | 53 | return visitor.enterSplitReturn(this) ? visitor.leaveSplitReturn(this) : this; |
attila@1064 | 54 | } |
attila@1064 | 55 | |
attila@1064 | 56 | @Override |
sundar@1397 | 57 | public void toString(final StringBuilder sb, final boolean printType) { |
attila@1064 | 58 | sb.append(":splitreturn;"); |
attila@1064 | 59 | } |
attila@1064 | 60 | |
attila@1064 | 61 | private Object readResolve() { |
attila@1064 | 62 | return INSTANCE; |
attila@1064 | 63 | } |
attila@1064 | 64 | } |