83 assert(StubInfo::is_stubgen(id), "not a stubgen blob %s", StubInfo::name(id));
84 return StubInfo::name(id);
85 }
86
87 const char* StubRoutines::get_stub_name(StubId id) {
88 assert(StubInfo::is_stubgen(id), "not a stubgen stub %s", StubInfo::name(id));
89 return StubInfo::name(id);
90 }
91
92 #ifdef ASSERT
93 // translate a stub id to an associated blob id while checking that it
94 // is a stubgen stub
95
96 BlobId StubRoutines::stub_to_blob(StubId id) {
97 assert(StubInfo::is_stubgen(id), "not a stubgen stub %s", StubInfo::name(id));
98 return StubInfo::blob(id);
99 }
100
101 #endif // ASSERT
102
103 // Initialization
104
105 extern void StubGenerator_generate(CodeBuffer* code, BlobId blob_id); // only interface to generators
106
107 void UnsafeMemoryAccess::create_table(int max_size) {
108 UnsafeMemoryAccess::_table = new UnsafeMemoryAccess[max_size];
109 UnsafeMemoryAccess::_table_max_length = max_size;
110 }
111
112 bool UnsafeMemoryAccess::contains_pc(address pc) {
113 assert(UnsafeMemoryAccess::_table != nullptr, "");
114 for (int i = 0; i < UnsafeMemoryAccess::_table_length; i++) {
115 UnsafeMemoryAccess* entry = &UnsafeMemoryAccess::_table[i];
116 if (pc >= entry->start_pc() && pc < entry->end_pc()) {
117 return true;
118 }
119 }
120 return false;
121 }
122
|
83 assert(StubInfo::is_stubgen(id), "not a stubgen blob %s", StubInfo::name(id));
84 return StubInfo::name(id);
85 }
86
87 const char* StubRoutines::get_stub_name(StubId id) {
88 assert(StubInfo::is_stubgen(id), "not a stubgen stub %s", StubInfo::name(id));
89 return StubInfo::name(id);
90 }
91
92 #ifdef ASSERT
93 // translate a stub id to an associated blob id while checking that it
94 // is a stubgen stub
95
96 BlobId StubRoutines::stub_to_blob(StubId id) {
97 assert(StubInfo::is_stubgen(id), "not a stubgen stub %s", StubInfo::name(id));
98 return StubInfo::blob(id);
99 }
100
101 #endif // ASSERT
102
103 // TODO: update with 8343767
104 address StubRoutines::_load_inline_type_fields_in_regs = nullptr;
105 address StubRoutines::_store_inline_type_fields_to_buf = nullptr;
106
107
108 // Initialization
109
110 extern void StubGenerator_generate(CodeBuffer* code, BlobId blob_id); // only interface to generators
111
112 void UnsafeMemoryAccess::create_table(int max_size) {
113 UnsafeMemoryAccess::_table = new UnsafeMemoryAccess[max_size];
114 UnsafeMemoryAccess::_table_max_length = max_size;
115 }
116
117 bool UnsafeMemoryAccess::contains_pc(address pc) {
118 assert(UnsafeMemoryAccess::_table != nullptr, "");
119 for (int i = 0; i < UnsafeMemoryAccess::_table_length; i++) {
120 UnsafeMemoryAccess* entry = &UnsafeMemoryAccess::_table[i];
121 if (pc >= entry->start_pc() && pc < entry->end_pc()) {
122 return true;
123 }
124 }
125 return false;
126 }
127
|