projects
/
c11tester.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
changes
[c11tester.git]
/
nodestack.cc
diff --git
a/nodestack.cc
b/nodestack.cc
index 6295442606612f0feff684f3657756b167239628..082835802629ac989c13e57ed4adbdd8de81eb48 100644
(file)
--- a/
nodestack.cc
+++ b/
nodestack.cc
@@
-62,11
+62,12
@@
void Node::print_may_read_from()
* @param value is the value to backtrack to.
*/
* @param value is the value to backtrack to.
*/
-
void
Node::add_future_value(uint64_t value) {
+
bool
Node::add_future_value(uint64_t value) {
for(int i=0;i<future_values.size();i++)
if (future_values[i]==value)
for(int i=0;i<future_values.size();i++)
if (future_values[i]==value)
- return;
+ return
false
;
future_values.push_back(value);
future_values.push_back(value);
+ return true;
}
}
@@
-184,8
+185,10
@@
uint64_t Node::get_future_value() {
* @return The first element in may_read_from
*/
const ModelAction * Node::get_read_from() {
* @return The first element in may_read_from
*/
const ModelAction * Node::get_read_from() {
- ASSERT(read_from_index<may_read_from.size());
- return may_read_from[read_from_index];
+ if (read_from_index<may_read_from.size())
+ return may_read_from[read_from_index];
+ else
+ return NULL;
}
/**
}
/**