diff options
author | Hans Bolinder <[email protected]> | 2015-10-09 11:38:49 +0200 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2015-10-09 11:38:49 +0200 |
commit | 593383928d42ecf355ba51c70e5149a25d43d56d (patch) | |
tree | 9128fe70fa559aeed8d518782ea4f91c09be5ace /lib/hipe/icode/hipe_icode_exceptions.erl | |
parent | 7d88a6e607b0bc06a0d0cab0afbf81abfe9bef41 (diff) | |
parent | 13c39e40ff18ab1ab5ddeb0a5bde99658e3fab74 (diff) | |
download | otp-593383928d42ecf355ba51c70e5149a25d43d56d.tar.gz otp-593383928d42ecf355ba51c70e5149a25d43d56d.tar.bz2 otp-593383928d42ecf355ba51c70e5149a25d43d56d.zip |
Merge branch 'ks/dialyzer/undefined_record_fields/OTP-12719'
* ks/dialyzer/undefined_record_fields/OTP-12719:
Update Debugger
Update Diameter
Update Eunit
Update Inets
Update Reltool
Update SSL
Update Test Server
Update Syntax Tools
Update Tools
Update and cleanup HiPE records
Fix errors in dialyzer_{coordinator,worker} specs
Update Dialyzer
Update Compiler
stdlib: Refactor the supervisor module's state
Update Kernel and STDLIB
Take out automatic insertion of 'undefined' from typed record fields
Diffstat (limited to 'lib/hipe/icode/hipe_icode_exceptions.erl')
-rw-r--r-- | lib/hipe/icode/hipe_icode_exceptions.erl | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/lib/hipe/icode/hipe_icode_exceptions.erl b/lib/hipe/icode/hipe_icode_exceptions.erl index 41556ab80f..f03ce2faaa 100644 --- a/lib/hipe/icode/hipe_icode_exceptions.erl +++ b/lib/hipe/icode/hipe_icode_exceptions.erl @@ -2,7 +2,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2004-2014. All Rights Reserved. +%% Copyright Ericsson AB 2004-2015. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -85,7 +85,7 @@ %%---------------------------------------------------------------------------- --spec fix_catches(#cfg{}) -> #cfg{}. +-spec fix_catches(cfg()) -> cfg(). fix_catches(CFG) -> {Map, State} = build_mapping(find_catches(init_state(CFG))), @@ -393,10 +393,10 @@ get_renaming(C, Map) -> %%--------------------------------------------------------------------- %% State abstraction --record(state, {cfg :: #cfg{}, +-record(state, {cfg :: cfg(), changed = false :: boolean(), - succ :: #cfg{}, - pred :: #cfg{}, + succ :: cfg(), + pred :: cfg(), start_labels :: [icode_lbl(),...], visited = hipe_icode_cfg:none_visited() :: gb_sets:set(), out = gb_trees:empty() :: gb_trees:tree(), @@ -404,13 +404,8 @@ get_renaming(C, Map) -> }). init_state(CFG) -> - State = #state{cfg = CFG}, - refresh_state_cache(State). - -refresh_state_cache(State) -> - CFG = State#state.cfg, SLs = [hipe_icode_cfg:start_label(CFG)], - State#state{succ = CFG, pred = CFG, start_labels = SLs}. + #state{cfg = CFG, succ = CFG, pred = CFG, start_labels = SLs}. get_cfg(State) -> State#state.cfg. @@ -466,7 +461,8 @@ get_bb_code(L, State) -> set_bb_code(L, Code, State) -> CFG = State#state.cfg, CFG1 = hipe_icode_cfg:bb_add(CFG, L, hipe_bb:mk_bb(Code)), - refresh_state_cache(State#state{cfg = CFG1}). + SLs = [hipe_icode_cfg:start_label(CFG1)], + State#state{cfg = CFG1, succ = CFG1, pred = CFG1, start_labels = SLs}. get_new_catches_in(L, State) -> Ps = get_pred(L, State), |