summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
bed2032)
Signed-off-by: Jean Privat <jean@pryen.org>
# Count and update length of collisions for `node_at_idx`
# Note for dynamic call-graph analysis: callers of this functions are
# responsible of collisions.
# Count and update length of collisions for `node_at_idx`
# Note for dynamic call-graph analysis: callers of this functions are
# responsible of collisions.
- private fun gt_collide(i: Int, k: K)
+ fun gt_collide(i: Int, k: K)
do
var c = _array[i]
sys.gt_coll += 1
do
var c = _array[i]
sys.gt_coll += 1
# Count and update length of collisions for `store`
# Note for dynamic call-graph analysis: callers of this functions are
# responsible of collisions.
# Count and update length of collisions for `store`
# Note for dynamic call-graph analysis: callers of this functions are
# responsible of collisions.
- private fun st_collide(i: Int, n: N)
+ fun st_collide(i: Int, n: N)
do
var c = _array[i]
sys.st_coll += 1
do
var c = _array[i]
sys.st_coll += 1
self[key] = res
return res
end
self[key] = res
return res
end
end
# Simple way to store an `HashMap[K1, HashMap[K2, V]]`
class HashMap2[K1: Object, K2: Object, V]
end
# Simple way to store an `HashMap[K1, HashMap[K2, V]]`
class HashMap2[K1: Object, K2: Object, V]
- private var level1: HashMap[K1, HashMap[K2, V]] = new HashMap[K1, HashMap[K2, V]]
+ private var level1 = new HashMap[K1, HashMap[K2, V]]
# Return the value associated to the keys `k1` and `k2`.
# Return `null` if no such a value.
# Return the value associated to the keys `k1` and `k2`.
# Return `null` if no such a value.
# Simple way to store an `HashMap[K1, HashMap[K2, HashMap[K3, V]]]`
class HashMap3[K1: Object, K2: Object, K3: Object, V]
# Simple way to store an `HashMap[K1, HashMap[K2, HashMap[K3, V]]]`
class HashMap3[K1: Object, K2: Object, K3: Object, V]
- private var level1: HashMap[K1, HashMap2[K2, K3, V]] = new HashMap[K1, HashMap2[K2, K3, V]]
+ private var level1 = new HashMap[K1, HashMap2[K2, K3, V]]
# Return the value associated to the keys `k1`, `k2`, and `k3`.
# Return `null` if no such a value.
# Return the value associated to the keys `k1`, `k2`, and `k3`.
# Return `null` if no such a value.
# Write a ASCII-style tree and use the `display` method to label elements
redef fun write_to(stream: OStream)
do
# Write a ASCII-style tree and use the `display` method to label elements
redef fun write_to(stream: OStream)
do
for r in roots do
stream.write display(r)
stream.write "\n"
for r in roots do
stream.write display(r)
stream.write "\n"
redef fun iterator do return elements.keys.iterator
# All the nodes
redef fun iterator do return elements.keys.iterator
# All the nodes
- private var elements: HashMap[E, POSetElement[E]] = new HashMap[E, POSetElement[E]]
+ private var elements = new HashMap[E, POSetElement[E]]
redef fun has(e) do return self.elements.keys.has(e)
redef fun has(e) do return self.elements.keys.has(e)