|
@@ -585,16 +585,11 @@ and expr dce e =
|
|
|
| TThrow e ->
|
|
|
check_and_add_feature dce "has_throw";
|
|
|
expr dce e;
|
|
|
- (*
|
|
|
- TODO: Simon, save me! \o
|
|
|
- This is a hack needed to keep toString field of the actual exception objects
|
|
|
- that are thrown, but are wrapped into HaxeError before DCE comes into play.
|
|
|
- *)
|
|
|
- let e = (match e.eexpr with
|
|
|
- | TNew({cl_path=(["js";"_Boot"],"HaxeError")}, _, [eoriginal]) -> eoriginal
|
|
|
- | _ -> e
|
|
|
- ) in
|
|
|
- to_string dce e.etype
|
|
|
+ let rec loop e =
|
|
|
+ to_string dce e.etype;
|
|
|
+ Type.iter loop e
|
|
|
+ in
|
|
|
+ loop e
|
|
|
| _ ->
|
|
|
Type.iter (expr dce) e
|
|
|
|