Skip to content

Commit

Permalink
OptoRuntime::new_instance_Type
Browse files Browse the repository at this point in the history
  • Loading branch information
offamitkumar committed Oct 30, 2024
1 parent 7205302 commit 7c8f3ae
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/hotspot/share/opto/runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -499,18 +499,21 @@ JRT_BLOCK_ENTRY(void, OptoRuntime::monitor_notifyAll_C(oopDesc* obj, JavaThread*
JRT_END

const TypeFunc *OptoRuntime::new_instance_Type() {
// create input type (domain)
const Type **fields = TypeTuple::fields(1);
fields[TypeFunc::Parms+0] = TypeInstPtr::NOTNULL; // Klass to be allocated
const TypeTuple *domain = TypeTuple::make(TypeFunc::Parms+1, fields);
const TypeFunc* tf = []() -> const TypeFunc* {
// create input type (domain)
const Type **fields = TypeTuple::fields(1);
fields[TypeFunc::Parms + 0] = TypeInstPtr::NOTNULL; // Klass to be allocated
const TypeTuple *domain = TypeTuple::make(TypeFunc::Parms + 1, fields);

// create result type (range)
fields = TypeTuple::fields(1);
fields[TypeFunc::Parms+0] = TypeRawPtr::NOTNULL; // Returned oop
// create result type (range)
fields = TypeTuple::fields(1);
fields[TypeFunc::Parms + 0] = TypeRawPtr::NOTNULL; // Returned oop

const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+1, fields);
const TypeTuple *range = TypeTuple::make(TypeFunc::Parms + 1, fields);

return TypeFunc::make(domain, range);
return TypeFunc::make(domain, range);
};
return tf;
}

#if INCLUDE_JVMTI
Expand Down
1 change: 1 addition & 0 deletions src/hotspot/share/opto/type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include "opto/matcher.hpp"
#include "opto/node.hpp"
#include "opto/opcodes.hpp"
#include "opto/runtime.hpp"
#include "opto/type.hpp"
#include "utilities/checkedCast.hpp"
#include "utilities/powerOfTwo.hpp"
Expand Down

0 comments on commit 7c8f3ae

Please sign in to comment.