32
33 // Static initialization
34 const u2 ConstMethod::MAX_IDNUM = 0xFFFE;
35 const u2 ConstMethod::UNSET_IDNUM = 0xFFFF;
36
37 ConstMethod* ConstMethod::allocate(ClassLoaderData* loader_data,
38 int byte_code_size,
39 InlineTableSizes* sizes,
40 MethodType method_type,
41 TRAPS) {
42 int size = ConstMethod::size(byte_code_size, sizes);
43 return new (loader_data, size, true, MetaspaceObj::ConstMethodType, THREAD) ConstMethod(
44 byte_code_size, sizes, method_type, size);
45 }
46
47 ConstMethod::ConstMethod(int byte_code_size,
48 InlineTableSizes* sizes,
49 MethodType method_type,
50 int size) {
51
52 No_Safepoint_Verifier no_safepoint;
53 init_fingerprint();
54 set_constants(NULL);
55 set_stackmap_data(NULL);
56 set_code_size(byte_code_size);
57 set_constMethod_size(size);
58 set_inlined_tables_length(sizes); // sets _flags
59 set_method_type(method_type);
60 assert(this->size() == size, "wrong size for object");
61 set_name_index(0);
62 set_signature_index(0);
63 set_constants(NULL);
64 set_max_stack(0);
65 set_max_locals(0);
66 set_method_idnum(0);
67 set_size_of_parameters(0);
68 }
69
70 // Accessor that copies to metadata.
71 void ConstMethod::copy_stackmap_data(ClassLoaderData* loader_data,
72 u1* sd, int length, TRAPS) {
|
32
33 // Static initialization
34 const u2 ConstMethod::MAX_IDNUM = 0xFFFE;
35 const u2 ConstMethod::UNSET_IDNUM = 0xFFFF;
36
37 ConstMethod* ConstMethod::allocate(ClassLoaderData* loader_data,
38 int byte_code_size,
39 InlineTableSizes* sizes,
40 MethodType method_type,
41 TRAPS) {
42 int size = ConstMethod::size(byte_code_size, sizes);
43 return new (loader_data, size, true, MetaspaceObj::ConstMethodType, THREAD) ConstMethod(
44 byte_code_size, sizes, method_type, size);
45 }
46
47 ConstMethod::ConstMethod(int byte_code_size,
48 InlineTableSizes* sizes,
49 MethodType method_type,
50 int size) {
51
52 NoSafepointVerifier no_safepoint;
53 init_fingerprint();
54 set_constants(NULL);
55 set_stackmap_data(NULL);
56 set_code_size(byte_code_size);
57 set_constMethod_size(size);
58 set_inlined_tables_length(sizes); // sets _flags
59 set_method_type(method_type);
60 assert(this->size() == size, "wrong size for object");
61 set_name_index(0);
62 set_signature_index(0);
63 set_constants(NULL);
64 set_max_stack(0);
65 set_max_locals(0);
66 set_method_idnum(0);
67 set_size_of_parameters(0);
68 }
69
70 // Accessor that copies to metadata.
71 void ConstMethod::copy_stackmap_data(ClassLoaderData* loader_data,
72 u1* sd, int length, TRAPS) {
|