Skip to content
Snippets Groups Projects
Commit 0991027f authored by Virgile Prevosto's avatar Virgile Prevosto Committed by David Bühler
Browse files

[kernel] Ast-diff mark func with different code annot has having changed body

parent cfda0d11
No related branches found
No related tags found
No related merge requests found
...@@ -268,6 +268,9 @@ let make_correspondence candidate has_same_spec code_corres = ...@@ -268,6 +268,9 @@ let make_correspondence candidate has_same_spec code_corres =
| true, ((`Body_changed|`Callees_changed) as c) -> | true, ((`Body_changed|`Callees_changed) as c) ->
`Partial(candidate, c) `Partial(candidate, c)
let make_body_correspondence has_same_spec code_corres =
if has_same_spec then code_corres else `Body_changed
let (&&>) (res,env) f = let (&&>) (res,env) f =
match res with match res with
| `Body_changed -> `Body_changed, env | `Body_changed -> `Body_changed, env
...@@ -1169,8 +1172,9 @@ and is_same_stmt s s' env = ...@@ -1169,8 +1172,9 @@ and is_same_stmt s s' env =
| _ -> `Body_changed, env | _ -> `Body_changed, env
end else `Body_changed, env end else `Body_changed, env
in in
let res = make_correspondence s' annot_res code_res in let corres = make_correspondence s' annot_res code_res in
Stmt.add s res; code_res, env let res = make_body_correspondence annot_res code_res in
Stmt.add s corres; res, env
(* is_same_block will return its modified environment in order (* is_same_block will return its modified environment in order
to update correspondence table with respect to locals, in case to update correspondence table with respect to locals, in case
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
[AST diff test] Variable has_static_local_x: => has_static_local_y [AST diff test] Variable has_static_local_x: => has_static_local_y
[AST diff test] Variable i: => i [AST diff test] Variable i: => i
[AST diff test] Variable i_0: => i_0 [AST diff test] Variable i_0: => i_0
[AST diff test] Variable i_0: => i_0
[AST diff test] Variable local_var_use: => local_var_use [AST diff test] Variable local_var_use: => local_var_use
[AST diff test] Variable ptr_func: => ptr_func [AST diff test] Variable ptr_func: => ptr_func
[AST diff test] Variable s: => s [AST diff test] Variable s: => s
...@@ -47,5 +46,5 @@ ...@@ -47,5 +46,5 @@
[AST diff test] Function use_s: => use_s [AST diff test] Function use_s: => use_s
[AST diff test] Function with_goto_changed: -> with_goto_changed (body changed) [AST diff test] Function with_goto_changed: -> with_goto_changed (body changed)
[AST diff test] Function with_goto_unchanged: => with_goto_unchanged [AST diff test] Function with_goto_unchanged: => with_goto_unchanged
[AST diff test] Function with_loop_unroll_diff: => with_loop_unroll_diff [AST diff test] Function with_loop_unroll_diff: -> with_loop_unroll_diff (body changed)
[AST diff test] Function with_loop_unroll_same: => with_loop_unroll_same [AST diff test] Function with_loop_unroll_same: => with_loop_unroll_same
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
[AST diff test] Variable has_static_local_x: => has_static_local_y [AST diff test] Variable has_static_local_x: => has_static_local_y
[AST diff test] Variable i: => i [AST diff test] Variable i: => i
[AST diff test] Variable i_0: => i_0 [AST diff test] Variable i_0: => i_0
[AST diff test] Variable i_0: => i_0
[AST diff test] Variable local_var_use: => local_var_use [AST diff test] Variable local_var_use: => local_var_use
[AST diff test] Variable ptr_func: => ptr_func [AST diff test] Variable ptr_func: => ptr_func
[AST diff test] Variable s: N/A [AST diff test] Variable s: N/A
...@@ -45,5 +44,5 @@ ...@@ -45,5 +44,5 @@
[AST diff test] Function use_s: N/A [AST diff test] Function use_s: N/A
[AST diff test] Function with_goto_changed: -> with_goto_changed (body changed) [AST diff test] Function with_goto_changed: -> with_goto_changed (body changed)
[AST diff test] Function with_goto_unchanged: => with_goto_unchanged [AST diff test] Function with_goto_unchanged: => with_goto_unchanged
[AST diff test] Function with_loop_unroll_diff: => with_loop_unroll_diff [AST diff test] Function with_loop_unroll_diff: -> with_loop_unroll_diff (body changed)
[AST diff test] Function with_loop_unroll_same: => with_loop_unroll_same [AST diff test] Function with_loop_unroll_same: => with_loop_unroll_same
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment