File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -233,6 +233,9 @@ class VirtualMachine super NaiveInterpreter
233233 redef fun send (mproperty : MMethod , args : Array [Instance ]): nullable Instance
234234 do
235235 var recv = args .first
236+ if self .routine_types .has (recv .mtype .name ) then
237+ return super
238+ end
236239 var mtype = recv .mtype
237240 var ret = send_commons (mproperty , args , mtype )
238241 if ret != null then return ret
Original file line number Diff line number Diff line change @@ -24,10 +24,14 @@ redef class VirtualMachine
2424 # Add optimization of the method dispatch
2525 redef fun callsite (callsite : nullable CallSite , arguments : Array [Instance ]): nullable Instance
2626 do
27+ if routine_types .has (callsite .recv .name ) then
28+ return super
29+ end
2730 var initializers = callsite .mpropdef .initializers
2831 if initializers .is_empty then return send_optimize (callsite .as (not null ), arguments )
2932
3033 var recv = arguments .first
34+
3135 var i = 1
3236 for p in initializers do
3337 if p isa MMethod then
You can’t perform that action at this time.
0 commit comments