OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/ic/stub-cache.h" | 8 #include "src/ic/stub-cache.h" |
9 #include "src/type-info.h" | 9 #include "src/type-info.h" |
10 | 10 |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 Zone* zone) { | 111 Zone* zone) { |
112 for (int i = 0; i < kPrimaryTableSize; i++) { | 112 for (int i = 0; i < kPrimaryTableSize; i++) { |
113 if (primary_[i].key == *name) { | 113 if (primary_[i].key == *name) { |
114 Map* map = primary_[i].map; | 114 Map* map = primary_[i].map; |
115 // Map can be NULL, if the stub is constant function call | 115 // Map can be NULL, if the stub is constant function call |
116 // with a primitive receiver. | 116 // with a primitive receiver. |
117 if (map == NULL) continue; | 117 if (map == NULL) continue; |
118 | 118 |
119 int offset = PrimaryOffset(*name, flags, map); | 119 int offset = PrimaryOffset(*name, flags, map); |
120 if (entry(primary_, offset) == &primary_[i] && | 120 if (entry(primary_, offset) == &primary_[i] && |
121 !TypeFeedbackOracle::CanRetainOtherContext(map, *native_context)) { | 121 TypeFeedbackOracle::IsRelevantFeedback(map, *native_context)) { |
122 types->AddMapIfMissing(Handle<Map>(map), zone); | 122 types->AddMapIfMissing(Handle<Map>(map), zone); |
123 } | 123 } |
124 } | 124 } |
125 } | 125 } |
126 | 126 |
127 for (int i = 0; i < kSecondaryTableSize; i++) { | 127 for (int i = 0; i < kSecondaryTableSize; i++) { |
128 if (secondary_[i].key == *name) { | 128 if (secondary_[i].key == *name) { |
129 Map* map = secondary_[i].map; | 129 Map* map = secondary_[i].map; |
130 // Map can be NULL, if the stub is constant function call | 130 // Map can be NULL, if the stub is constant function call |
131 // with a primitive receiver. | 131 // with a primitive receiver. |
132 if (map == NULL) continue; | 132 if (map == NULL) continue; |
133 | 133 |
134 // Lookup in primary table and skip duplicates. | 134 // Lookup in primary table and skip duplicates. |
135 int primary_offset = PrimaryOffset(*name, flags, map); | 135 int primary_offset = PrimaryOffset(*name, flags, map); |
136 | 136 |
137 // Lookup in secondary table and add matches. | 137 // Lookup in secondary table and add matches. |
138 int offset = SecondaryOffset(*name, flags, primary_offset); | 138 int offset = SecondaryOffset(*name, flags, primary_offset); |
139 if (entry(secondary_, offset) == &secondary_[i] && | 139 if (entry(secondary_, offset) == &secondary_[i] && |
140 !TypeFeedbackOracle::CanRetainOtherContext(map, *native_context)) { | 140 TypeFeedbackOracle::IsRelevantFeedback(map, *native_context)) { |
141 types->AddMapIfMissing(Handle<Map>(map), zone); | 141 types->AddMapIfMissing(Handle<Map>(map), zone); |
142 } | 142 } |
143 } | 143 } |
144 } | 144 } |
145 } | 145 } |
146 } | 146 } |
147 } // namespace v8::internal | 147 } // namespace v8::internal |
OLD | NEW |