Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Side by Side Diff: src/ic/stub-cache.cc

Issue 1020803004: Remove CanRetainOtherContext since embedded objects are now weak. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Less negations Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698