projects
/
cdsspec-compiler.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
model: remove DEBUG action print
[cdsspec-compiler.git]
/
action.cc
diff --git
a/action.cc
b/action.cc
index 4b380c2dd404fafc1b4be9846433967daa8cd167..6e765fd638ac982ea22d47944983cab90452b815 100644
(file)
--- a/
action.cc
+++ b/
action.cc
@@
-1,7
+1,6
@@
#include <stdio.h>
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#include <stdio.h>
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
-#include <vector>
#include "model.h"
#include "action.h"
#include "model.h"
#include "action.h"
@@
-78,6
+77,11
@@
bool ModelAction::is_thread_start() const
return type == THREAD_START;
}
return type == THREAD_START;
}
+bool ModelAction::is_thread_join() const
+{
+ return type == THREAD_JOIN;
+}
+
bool ModelAction::is_relseq_fixup() const
{
return type == MODEL_FIXUP_RELSEQ;
bool ModelAction::is_relseq_fixup() const
{
return type == MODEL_FIXUP_RELSEQ;
@@
-604,7
+608,7
@@
void ModelAction::print() const
if (idx >= 0)
model_print(" Rf: P%-2d", idx);
else
if (idx >= 0)
model_print(" Rf: P%-2d", idx);
else
- model_print(" R
F
: P? ");
+ model_print(" R
f
: P? ");
} else
model_print(" Rf: ? ");
}
} else
model_print(" Rf: ? ");
}
@@
-626,8
+630,13
@@
unsigned int ModelAction::hash() const
hash ^= seq_number << 5;
hash ^= id_to_int(tid) << 6;
hash ^= seq_number << 5;
hash ^= id_to_int(tid) << 6;
- if (is_read() && reads_from)
- hash ^= reads_from->get_seq_number();
+ if (is_read()) {
+ if (reads_from)
+ hash ^= reads_from->get_seq_number();
+ else if (reads_from_promise)
+ hash ^= model->get_promise_number(reads_from_promise);
+ hash ^= get_reads_from_value();
+ }
return hash;
}
return hash;
}