diff options
author | Björn Gustavsson <[email protected]> | 2011-03-18 07:17:08 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2011-08-16 08:58:46 +0200 |
commit | c3d796e5080a44da039bdfb42fbfcfc1e757397e (patch) | |
tree | 80d4c66d7767d22c38958dddec310cbda90d4384 | |
parent | 0d32172b03e2c1e9d5cbca2f350888a4803564c9 (diff) | |
download | otp-c3d796e5080a44da039bdfb42fbfcfc1e757397e.tar.gz otp-c3d796e5080a44da039bdfb42fbfcfc1e757397e.tar.bz2 otp-c3d796e5080a44da039bdfb42fbfcfc1e757397e.zip |
Remove the special handling of spawn BIFs
BIFs that spawn new processes once upon a time needed/benefited
from special handling, but now they are handled in exactly the
same way as an unsafe BIF (except for a bug in the handling of
the return value trace). Therefore, treat spawn BIFs as unsafe
BIFs.
-rw-r--r-- | lib/debugger/src/dbg_ieval.erl | 11 | ||||
-rw-r--r-- | lib/debugger/src/dbg_iload.erl | 4 |
2 files changed, 0 insertions, 15 deletions
diff --git a/lib/debugger/src/dbg_ieval.erl b/lib/debugger/src/dbg_ieval.erl index d63e315614..9739e9569d 100644 --- a/lib/debugger/src/dbg_ieval.erl +++ b/lib/debugger/src/dbg_ieval.erl @@ -1017,17 +1017,6 @@ expr({bif,Line,M,F,As0}, Bs0, #ieval{level=Le}=Ieval0) -> pop(), Res; -%% Call to a BIF that spawns a new process -expr({spawn_bif,Line,M,F,As0}, Bs0, #ieval{level=Le}=Ieval0) -> - Ieval = Ieval0#ieval{line=Line}, - {As,Bs} = eval_list(As0, Bs0, Ieval), - trace(bif, {Le,Line,M,F,As}), - push({M,F,As}, Bs0, Ieval), - Res = debugged_cmd({apply,M,F,As}, Bs,Ieval#ieval{level=Le+1}), - trace(return, {Le,Res}), - pop(), - Res; - %% Call to an operation expr({op,Line,Op,As0}, Bs0, Ieval0) -> Ieval = Ieval0#ieval{line=Line}, diff --git a/lib/debugger/src/dbg_iload.erl b/lib/debugger/src/dbg_iload.erl index b259c2299f..459c6ee960 100644 --- a/lib/debugger/src/dbg_iload.erl +++ b/lib/debugger/src/dbg_iload.erl @@ -417,7 +417,6 @@ expr({call,Line,{remote,_,{atom,_,Mod},{atom,_,Func}},As0}) -> true -> case bif_type(Mod, Func, length(As0)) of safe -> {safe_bif,Line,Mod,Func,As}; - spawn -> {spawn_bif,Line,Mod,Func,As}; unsafe ->{bif,Line,Mod,Func,As} end end; @@ -632,7 +631,4 @@ bif_type(hash) -> safe; bif_type(pre_loaded) -> safe; bif_type(set_cookie) -> safe; bif_type(get_cookie) -> safe; -bif_type(spawn) -> spawn; -bif_type(spawn_link) -> spawn; -bif_type(spawn_opt) -> spawn; bif_type(_) -> unsafe. |