8244146: javac changes for JEP 306

8266399: Core libs update for JEP 306

Reviewed-by: sadayapalam, bpb, naoto
This commit is contained in:
Joe Darcy 2021-06-01 21:59:39 +00:00
parent c2c0208dfd
commit 0ae4ceb413
28 changed files with 578 additions and 56 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2021, 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
@ -120,7 +120,7 @@ class FdLibm {
throw new UnsupportedOperationException();
}
public static strictfp double compute(double x) {
public static double compute(double x) {
double t = 0.0;
double sign;
@ -203,7 +203,7 @@ class FdLibm {
throw new UnsupportedOperationException();
}
public static strictfp double compute(double x, double y) {
public static double compute(double x, double y) {
double a = Math.abs(x);
double b = Math.abs(y);
@ -343,7 +343,7 @@ class FdLibm {
throw new UnsupportedOperationException();
}
public static strictfp double compute(final double x, final double y) {
public static double compute(final double x, final double y) {
double z;
double r, s, t, u, v, w;
int i, j, k, n;
@ -680,8 +680,7 @@ class FdLibm {
throw new UnsupportedOperationException();
}
// should be able to forgo strictfp due to controlled over/underflow
public static strictfp double compute(double x) {
public static double compute(double x) {
double y;
double hi = 0.0;
double lo = 0.0;

View file

@ -86,7 +86,6 @@ import jdk.internal.vm.annotation.IntrinsicCandidate;
* @author Joseph D. Darcy
* @since 1.3
*/
public final class StrictMath {
/**
@ -207,10 +206,8 @@ public final class StrictMath {
* @return the measurement of the angle {@code angdeg}
* in radians.
*/
public static strictfp double toRadians(double angdeg) {
// Do not delegate to Math.toRadians(angdeg) because
// this method has the strictfp modifier.
return angdeg * DEGREES_TO_RADIANS;
public static double toRadians(double angdeg) {
return Math.toRadians(angdeg);
}
/**
@ -224,10 +221,8 @@ public final class StrictMath {
* @return the measurement of the angle {@code angrad}
* in degrees.
*/
public static strictfp double toDegrees(double angrad) {
// Do not delegate to Math.toDegrees(angrad) because
// this method has the strictfp modifier.
return angrad * RADIANS_TO_DEGREES;
public static double toDegrees(double angrad) {
return Math.toDegrees(angrad);
}
/**