@@ -198,10 +198,6 @@ void CodePatcher::PatchStaticCallAt(uword return_address,
198198 });
199199}
200200
201- void CodePatcher::InsertDeoptimizationCallAt (uword start) {
202- UNREACHABLE ();
203- }
204-
205201CodePtr CodePatcher::GetInstanceCallAt (uword return_address,
206202 const Code& caller_code,
207203 Object* data) {
@@ -258,18 +254,13 @@ void CodePatcher::PatchSwitchableCallAt(uword return_address,
258254 const Code& caller_code,
259255 const Object& data,
260256 const Code& target) {
261- // Switchable instance calls only generated for precompilation.
262- UNREACHABLE ();
257+ PatchInstanceCallAt (return_address, caller_code, data, target);
263258}
264259
265- void CodePatcher::PatchSwitchableCallAtWithMutatorsStopped (
266- Thread* thread,
267- uword return_address,
268- const Code& caller_code,
269- const Object& data,
270- const Code& target) {
271- // Switchable instance calls only generated for precompilation.
272- UNREACHABLE ();
260+ ObjectPtr CodePatcher::GetSwitchableCallTargetAt (uword return_address,
261+ const Code& caller_code) {
262+ InstanceCall call (return_address, caller_code);
263+ return call.target ();
273264}
274265
275266uword CodePatcher::GetSwitchableCallTargetEntryAt (uword return_address,
@@ -281,9 +272,8 @@ uword CodePatcher::GetSwitchableCallTargetEntryAt(uword return_address,
281272
282273ObjectPtr CodePatcher::GetSwitchableCallDataAt (uword return_address,
283274 const Code& caller_code) {
284- // Switchable instance calls only generated for precompilation.
285- UNREACHABLE ();
286- return Object::null ();
275+ InstanceCall call (return_address, caller_code);
276+ return call.data ();
287277}
288278
289279void CodePatcher::PatchNativeCallAt (uword return_address,
0 commit comments