fix: __topo_path_bridges()
authoryu.dongliang <18588496441@163.com>
Tue, 14 Nov 2023 06:27:03 +0000 (14:27 +0800)
committeryu.dongliang <18588496441@163.com>
Tue, 14 Nov 2023 06:27:03 +0000 (14:27 +0800)
ses_step_topo.c
ses_steps.c

index af5a4bd85f14903d643b0fc5456ef1d18bf90c72..87b42efbe1b58c779deabaa0aefbf53861af84bf 100644 (file)
@@ -207,6 +207,11 @@ static int __topo_path_bridges(ScfEfunction* f, ses_path_t* path)
                for (j = i + 1; j < path->childs->size; ) {
                        sp1           = path->childs->data[j];
 
+                       if (sp0->parent_p1 <= sp1->parent_p0 || sp0->parent_p0 >= sp1->parent_p1) {
+                               j++;
+                               continue;
+                       }
+
                        if (sp0->parent_p0 <= sp1->parent_p0 && sp0->parent_p1 >= sp1->parent_p1) {
                                j++;
                                continue;
@@ -891,11 +896,11 @@ static int _topo_handler(ScfEfunction* f, int64_t ns, int64_t count, ses_ctx_t*
        int ret = _topo_paths(f, el, ctx->paths);
        if (ret < 0)
                return ret;
-
+#if 1
        ret = _topo_path_completes(f, ctx->paths);
        if (ret < 0)
                return ret;
-
+#endif
        for (i = 0; i < ctx->paths->size; i++) {
                path      = ctx->paths->data[i];
 
index 204bbab7b4fa979f9735dc2d6e97ebde6dd05495..044cbc92bcf8c946bf7e101167eb50e19858cc48 100644 (file)
@@ -144,7 +144,7 @@ int ses_steps_analyse(ScfEfunction* f, int64_t ns, int64_t count)
                        return ret;
 
                int j;
-               for (j = 0; j < 1; j++) {
+               for (j = 0; j < 3; j++) {
                        printf("\n\033[33m%s(), %d(), j: %d\033[0m\n", __func__, __LINE__, j);
 
                        ret = __ses_steps_analyse(f, ns, i, ctx);