From 276282f37ac0aca6c3ba3bcdb4695cba8618fcd2 Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Thu, 24 Oct 2024 14:33:09 +0530 Subject: [PATCH] init change --- src/hotspot/share/opto/callnode.hpp | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/hotspot/share/opto/callnode.hpp b/src/hotspot/share/opto/callnode.hpp index 2d3835b71ad42..c5f2c83ecb50f 100644 --- a/src/hotspot/share/opto/callnode.hpp +++ b/src/hotspot/share/opto/callnode.hpp @@ -1193,19 +1193,22 @@ class LockNode : public AbstractLockNode { public: static const TypeFunc *lock_type() { - // create input type (domain) - const Type **fields = TypeTuple::fields(3); - fields[TypeFunc::Parms+0] = TypeInstPtr::NOTNULL; // Object to be Locked - fields[TypeFunc::Parms+1] = TypeRawPtr::BOTTOM; // Address of stack location for lock - fields[TypeFunc::Parms+2] = TypeInt::BOOL; // FastLock - const TypeTuple *domain = TypeTuple::make(TypeFunc::Parms+3,fields); - - // create result type (range) - fields = TypeTuple::fields(0); - - const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+0,fields); - - return TypeFunc::make(domain,range); + static const TypeFunc *tf = []() -> const TypeFunc* { + // create input type (domain) + const Type **fields = TypeTuple::fields(3); + fields[TypeFunc::Parms + 0] = TypeInstPtr::NOTNULL; // Object to be Locked + fields[TypeFunc::Parms + 1] = TypeRawPtr::BOTTOM; // Address of stack location for lock + fields[TypeFunc::Parms + 2] = TypeInt::BOOL; // FastLock + const TypeTuple *domain = TypeTuple::make(TypeFunc::Parms + 3, fields); + + // create result type (range) + fields = TypeTuple::fields(0); + + const TypeTuple *range = TypeTuple::make(TypeFunc::Parms + 0, fields); + + return TypeFunc::make(domain, range); + }(); + return tf; } virtual int Opcode() const;