Skip to content

Commit

Permalink
Disable bad optim (#260)
Browse files Browse the repository at this point in the history
disable bad optim
  • Loading branch information
gares authored Aug 18, 2024
1 parent d0bbea5 commit 6493e38
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/runtime.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1255,16 +1255,16 @@ and deref_uv ?avoid ~from ~to_ args t =
(* TODO: when the UVar/Arg is not C.dummy, we call deref_uv that
will call move that will call_deref_uv again. Optimize the
path *)
| UVar(t,depth,args2) when from = depth+args2 ->
UVar(t,depth,args2+args')
| UVar(t,depth,0) when from = depth ->
UVar(t,depth,args')
| AppUVar (r,depth,args2) ->
let args = C.mkinterval from args' 0 in
AppUVar (r,depth,args2 @ args)
| UVar (r,vardepth,argsno) ->
let args1 = C.mkinterval vardepth argsno 0 in
let args2 = C.mkinterval from args' 0 in
let args = args1 @ args2 in
AppUVar (r,vardepth,args)
mkAppUVar r vardepth args
| Cons _ | Nil -> type_error "deref_uv: applied list"
| Discard -> type_error "deref_uv: applied Discard"
| CData _ -> t
Expand Down

0 comments on commit 6493e38

Please sign in to comment.