mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8256254: Convert vmIntrinsics::ID to enum class
Reviewed-by: redestad, kvn
This commit is contained in:
parent
b5ce8af3d7
commit
f48737c7b3
52 changed files with 199 additions and 124 deletions
|
@ -26,6 +26,7 @@
|
|||
#define SHARE_INTERPRETER_ABSTRACTINTERPRETER_HPP
|
||||
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "classfile/vmIntrinsics.hpp"
|
||||
#include "code/stubs.hpp"
|
||||
#include "interpreter/bytecodes.hpp"
|
||||
#include "runtime/frame.hpp"
|
||||
|
@ -65,8 +66,8 @@ class AbstractInterpreter: AllStatic {
|
|||
abstract, // abstract method (throws an AbstractMethodException)
|
||||
method_handle_invoke_FIRST, // java.lang.invoke.MethodHandles::invokeExact, etc.
|
||||
method_handle_invoke_LAST = (method_handle_invoke_FIRST
|
||||
+ (vmIntrinsics::LAST_MH_SIG_POLY
|
||||
- vmIntrinsics::FIRST_MH_SIG_POLY)),
|
||||
+ (static_cast<int>(vmIntrinsics::LAST_MH_SIG_POLY)
|
||||
- static_cast<int>(vmIntrinsics::FIRST_MH_SIG_POLY))),
|
||||
java_lang_math_sin, // implementation of java.lang.Math.sin (x)
|
||||
java_lang_math_cos, // implementation of java.lang.Math.cos (x)
|
||||
java_lang_math_tan, // implementation of java.lang.Math.tan (x)
|
||||
|
@ -95,7 +96,7 @@ class AbstractInterpreter: AllStatic {
|
|||
// Conversion from the part of the above enum to vmIntrinsics::_invokeExact, etc.
|
||||
static vmIntrinsics::ID method_handle_intrinsic(MethodKind kind) {
|
||||
if (kind >= method_handle_invoke_FIRST && kind <= method_handle_invoke_LAST)
|
||||
return (vmIntrinsics::ID)( vmIntrinsics::FIRST_MH_SIG_POLY + (kind - method_handle_invoke_FIRST) );
|
||||
return vmIntrinsics::ID_from(static_cast<int>(vmIntrinsics::FIRST_MH_SIG_POLY) + (kind - method_handle_invoke_FIRST));
|
||||
else
|
||||
return vmIntrinsics::_none;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue