Revision: 24635
Author: [email protected]
Date: Wed Oct 15 13:07:18 2014 UTC
Log: Fix bug in NodeCache::GetCachedNodes
[email protected]
BUG=
Review URL: https://codereview.chromium.org/656033003
https://code.google.com/p/v8/source/detail?r=24635
Modified:
/branches/bleeding_edge/src/compiler/node-cache.cc
/branches/bleeding_edge/test/cctest/compiler/test-js-constant-cache.cc
=======================================
--- /branches/bleeding_edge/src/compiler/node-cache.cc Wed Oct 15 12:29:39
2014 UTC
+++ /branches/bleeding_edge/src/compiler/node-cache.cc Wed Oct 15 13:07:18
2014 UTC
@@ -94,7 +94,7 @@
template <typename Key, typename Hash, typename Pred>
void NodeCache<Key, Hash, Pred>::GetCachedNodes(NodeVector* nodes) {
if (entries_) {
- for (size_t i = 0; i < size_; i++) {
+ for (size_t i = 0; i < size_ + kLinearProbe; i++) {
if (entries_[i].value_ != NULL) nodes->push_back(entries_[i].value_);
}
}
=======================================
--- /branches/bleeding_edge/test/cctest/compiler/test-js-constant-cache.cc
Wed Oct 15 12:29:39 2014 UTC
+++ /branches/bleeding_edge/test/cctest/compiler/test-js-constant-cache.cc
Wed Oct 15 13:07:18 2014 UTC
@@ -329,8 +329,10 @@
TEST(JSGraph_GetCachedNodes_int32) {
JSConstantCacheTester T;
- int32_t constants[] = {0, 11, 12, 13, 14, 55, -55, -44, -33, -22, -11,
- 0, 11, 11, 12, 12, 11, 11, -33, -33, -22, -11};
+ int32_t constants[] = {0, 1, 1, 1, 1, 2, 3, 4, 11, 12, 13,
+ 14, 55, -55, -44, -33, -22, -11, 16, 16, 17, 17,
+ 18, 18, 19, 19, 20, 20, 21, 21, 22, 23, 24,
+ 25, 15, 30, 31, 45, 46, 47, 48};
for (size_t i = 0; i < arraysize(constants); i++) {
int count_before = T.graph()->NodeCount();
@@ -372,8 +374,9 @@
TEST(JSGraph_GetCachedNodes_int64) {
JSConstantCacheTester T;
- int32_t constants[] = {0, 11, 12, 13, 14, 55, -55, -44, -33, -22, -11,
- 0, 11, 11, 12, 12, 11, 11, -33, -33, -22, -11};
+ int32_t constants[] = {0, 11, 12, 13, 14, 55, -55, -44, -33,
+ -22, -11, 16, 16, 17, 17, 18, 18, 19,
+ 19, 20, 20, 21, 21, 22, 23, 24, 25};
for (size_t i = 0; i < arraysize(constants); i++) {
int count_before = T.graph()->NodeCount();
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.