778 }
779
780 const TypeFunc* OptoRuntime::checkcast_arraycopy_Type() {
781 // An extension of fast_arraycopy_Type which adds type checking.
782 return make_arraycopy_Type(ac_checkcast);
783 }
784
785 const TypeFunc* OptoRuntime::slow_arraycopy_Type() {
786 // This signature is exactly the same as System.arraycopy.
787 // There are no intptr_t (int/long) arguments.
788 return make_arraycopy_Type(ac_slow);
789 }
790
791 const TypeFunc* OptoRuntime::generic_arraycopy_Type() {
792 // This signature is like System.arraycopy, except that it returns status.
793 return make_arraycopy_Type(ac_generic);
794 }
795
796
797 const TypeFunc* OptoRuntime::array_fill_Type() {
798 // create input type (domain): pointer, int, size_t
799 const Type** fields = TypeTuple::fields(3 LP64_ONLY( + 1));
800 int argp = TypeFunc::Parms;
801 fields[argp++] = TypePtr::NOTNULL;
802 fields[argp++] = TypeInt::INT;
803 fields[argp++] = TypeX_X; // size in whatevers (size_t)
804 LP64_ONLY(fields[argp++] = Type::HALF); // other half of long length
805 const TypeTuple *domain = TypeTuple::make(argp, fields);
806
807 // create result type
808 fields = TypeTuple::fields(1);
809 fields[TypeFunc::Parms+0] = NULL; // void
810 const TypeTuple *range = TypeTuple::make(TypeFunc::Parms, fields);
811
812 return TypeFunc::make(domain, range);
813 }
814
815 // for aescrypt encrypt/decrypt operations, just three pointers returning void (length is constant)
816 const TypeFunc* OptoRuntime::aescrypt_block_Type() {
817 // create input type (domain)
818 int num_args = 3;
819 int argcnt = num_args;
820 const Type** fields = TypeTuple::fields(argcnt);
821 int argp = TypeFunc::Parms;
822 fields[argp++] = TypePtr::NOTNULL; // src
|
778 }
779
780 const TypeFunc* OptoRuntime::checkcast_arraycopy_Type() {
781 // An extension of fast_arraycopy_Type which adds type checking.
782 return make_arraycopy_Type(ac_checkcast);
783 }
784
785 const TypeFunc* OptoRuntime::slow_arraycopy_Type() {
786 // This signature is exactly the same as System.arraycopy.
787 // There are no intptr_t (int/long) arguments.
788 return make_arraycopy_Type(ac_slow);
789 }
790
791 const TypeFunc* OptoRuntime::generic_arraycopy_Type() {
792 // This signature is like System.arraycopy, except that it returns status.
793 return make_arraycopy_Type(ac_generic);
794 }
795
796
797 const TypeFunc* OptoRuntime::array_fill_Type() {
798 const Type** fields;
799 int argp = TypeFunc::Parms;
800 // create input type (domain): pointer, int, size_t
801 if (SharedRuntime::c_calling_convention_requires_ints_as_longs()) {
802 fields = TypeTuple::fields(3 LP64_ONLY( + 2));
803 fields[argp++] = TypePtr::NOTNULL;
804 fields[argp++] = TypeLong::LONG;
805 fields[argp++] = Type::HALF;
806 } else {
807 fields = TypeTuple::fields(3 LP64_ONLY( + 1));
808 fields[argp++] = TypePtr::NOTNULL;
809 fields[argp++] = TypeInt::INT;
810 }
811 fields[argp++] = TypeX_X; // size in whatevers (size_t)
812 LP64_ONLY(fields[argp++] = Type::HALF); // other half of long length
813 const TypeTuple *domain = TypeTuple::make(argp, fields);
814
815 // create result type
816 fields = TypeTuple::fields(1);
817 fields[TypeFunc::Parms+0] = NULL; // void
818 const TypeTuple *range = TypeTuple::make(TypeFunc::Parms, fields);
819
820 return TypeFunc::make(domain, range);
821 }
822
823 // for aescrypt encrypt/decrypt operations, just three pointers returning void (length is constant)
824 const TypeFunc* OptoRuntime::aescrypt_block_Type() {
825 // create input type (domain)
826 int num_args = 3;
827 int argcnt = num_args;
828 const Type** fields = TypeTuple::fields(argcnt);
829 int argp = TypeFunc::Parms;
830 fields[argp++] = TypePtr::NOTNULL; // src
|