diff options
author | Nilay Vaish <nilay@cs.wisc.edu> | 2015-08-14 19:28:43 -0500 |
---|---|---|
committer | Nilay Vaish <nilay@cs.wisc.edu> | 2015-08-14 19:28:43 -0500 |
commit | 9648c05db19292ddd285a80914593cc0631403ff (patch) | |
tree | 501c8342d95b1c87f988a2fd3be2d17f63b86f0e /src/mem/ruby/structures/LRUPolicy.cc | |
parent | 7fc725fdb55e192520c148c87ec44f75f5d07ad0 (diff) | |
download | gem5-9648c05db19292ddd285a80914593cc0631403ff.tar.xz |
ruby: slicc: use default argument value
Before this patch, while one could declare / define a function with default
argument values, but the actual function call would require one to specify
all the arguments. This patch changes the check for function arguments.
Now a function call needs to specify arguments that are at least as much as
those with default values and at most the total number of arguments taken
as input by the function.
Diffstat (limited to 'src/mem/ruby/structures/LRUPolicy.cc')
-rw-r--r-- | src/mem/ruby/structures/LRUPolicy.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mem/ruby/structures/LRUPolicy.cc b/src/mem/ruby/structures/LRUPolicy.cc index a1e3b277e..286d19772 100644 --- a/src/mem/ruby/structures/LRUPolicy.cc +++ b/src/mem/ruby/structures/LRUPolicy.cc @@ -50,7 +50,7 @@ LRUReplacementPolicyParams::create() void -LRUPolicy::touch(int64 set, int64 index, Tick time) +LRUPolicy::touch(int64_t set, int64_t index, Tick time) { assert(index >= 0 && index < m_assoc); assert(set >= 0 && set < m_num_sets); @@ -58,11 +58,11 @@ LRUPolicy::touch(int64 set, int64 index, Tick time) m_last_ref_ptr[set][index] = time; } -int64 -LRUPolicy::getVictim(int64 set) const +int64_t +LRUPolicy::getVictim(int64_t set) const { Tick time, smallest_time; - int64 smallest_index; + int64_t smallest_index; smallest_index = 0; smallest_time = m_last_ref_ptr[set][0]; |