< prev index next >
test/testlibrary/jittester/src/jdk/test/lib/jittester/OperatorKind.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 23,83 ****
package jdk.test.lib.jittester;
// all unary and binary operator kinds
public enum OperatorKind {
! COMPOUND_ADD("+=", 1),
! COMPOUND_SUB("-=", 1),
! COMPOUND_MUL("*=", 1),
! COMPOUND_DIV("-=", 1),
! COMPOUND_MOD("%=", 1),
! COMPOUND_AND("&=", 1),
! COMPOUND_OR ("|=", 1),
! COMPOUND_XOR("^=", 1),
! COMPOUND_SHR(">>=", 1),
! COMPOUND_SHL("<<=", 1),
! COMPOUND_SAR(">>>=", 1),
! ASSIGN ("=", 1),
! OR ("||", 3),
! BIT_OR ("|", 5),
! BIT_XOR ("^", 6),
! AND ("&&", 7),
! BIT_AND ("&", 7),
! EQ ("==", 8),
! NE ("!=", 8),
! GT (">", 9),
! LT ("<", 9),
! GE (">=", 9),
! LE ("<=", 9),
! SHR (">>", 10),
! SHL ("<<", 10),
! SAR (">>>", 10),
! ADD ("+", 11),
! STRADD ("+", 11),
! SUB ("-", 11),
! MUL ("*", 12),
! DIV ("/", 12),
! MOD ("%", 12),
! NOT ("!", 14),
! BIT_NOT ("~", 14),
! UNARY_PLUS ("+", 14),
! UNARY_MINUS ("-", 14),
! PRE_DEC ("--", 15, true),
! POST_DEC ("--", 15, false),
! PRE_INC ("++", 16, true),
! POST_INC ("++", 16, false),
;
- public final String text;
public final int priority;
public final boolean isPrefix; // used for unary operators
! private OperatorKind(String text, int priority) {
! this(text, priority, true);
}
! private OperatorKind(String text, int priority, boolean isPrefix) {
! this.text = text;
this.priority = priority;
this.isPrefix = isPrefix;
}
}
--- 23,121 ----
package jdk.test.lib.jittester;
// all unary and binary operator kinds
public enum OperatorKind {
! /** a += b */
! COMPOUND_ADD(1),
! /** a -= b */
! COMPOUND_SUB(1),
! /** a *= b */
! COMPOUND_MUL(1),
! /** a /= b */
! COMPOUND_DIV(1),
! /** a %= b */
! COMPOUND_MOD(1),
! /** a &= b */
! COMPOUND_AND(1),
! /** a |= b */
! COMPOUND_OR (1),
! /** a ^= b */
! COMPOUND_XOR(1),
! /** a >>= b */
! COMPOUND_SHR(1),
! /** a <<= b */
! COMPOUND_SHL(1),
! /** a >>>= b */
! COMPOUND_SAR(1),
! /** a = b */
! ASSIGN (1),
! /** a || b */
! OR (3),
! /** a | b */
! BIT_OR (5),
! /** a ^ b */
! BIT_XOR (6),
! /** a && b */
! AND (7),
! /** a & b */
! BIT_AND (7),
! /** a == b */
! EQ (8),
! /** a != b */
! NE (8),
! /** a > b */
! GT (9),
! /** a < b */
! LT (9),
! /** a >= b */
! GE (9),
! /** a <= b */
! LE (9),
! /** a >> b */
! SHR (10),
! /** a << b */
! SHL (10),
! /** a >>> b */
! SAR (10),
! /** a + b */
! ADD (11),
! /** a.toString() + b */
! STRADD (11),
! /** a - b */
! SUB (11),
! /** a * b */
! MUL (12),
! /** a / b */
! DIV (12),
! /** a % b */
! MOD (12),
! /** !a */
! NOT (14),
! /** ~a */
! BIT_NOT (14),
! /** +a */
! UNARY_PLUS (14),
! /** -a */
! UNARY_MINUS (14),
! /** --a */
! PRE_DEC (15, true),
! /** a-- */
! POST_DEC (15, false),
! /** ++a */
! PRE_INC (16, true),
! /** a++ */
! POST_INC (16, false),
;
public final int priority;
public final boolean isPrefix; // used for unary operators
! private OperatorKind(int priority) {
! this(priority, true);
}
! private OperatorKind(int priority, boolean isPrefix) {
this.priority = priority;
this.isPrefix = isPrefix;
}
}
< prev index next >