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

Side by Side Diff: src/compiler/access-info.cc

Issue 2625413003: [turbofan] Fix deopt loop due to forgetting maps on Merge. (Closed)
Patch Set: Update. Created 3 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 <ostream> 5 #include <ostream>
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/compilation-dependencies.h" 8 #include "src/compilation-dependencies.h"
9 #include "src/compiler/access-info.h" 9 #include "src/compiler/access-info.h"
10 #include "src/compiler/type-cache.h" 10 #include "src/compiler/type-cache.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 field_map_(field_map) {} 139 field_map_(field_map) {}
140 140
141 bool PropertyAccessInfo::Merge(PropertyAccessInfo const* that) { 141 bool PropertyAccessInfo::Merge(PropertyAccessInfo const* that) {
142 if (this->kind_ != that->kind_) return false; 142 if (this->kind_ != that->kind_) return false;
143 if (this->holder_.address() != that->holder_.address()) return false; 143 if (this->holder_.address() != that->holder_.address()) return false;
144 144
145 switch (this->kind_) { 145 switch (this->kind_) {
146 case kInvalid: 146 case kInvalid:
147 break; 147 break;
148 148
149 case kNotFound:
150 return true;
151
152 case kDataField: { 149 case kDataField: {
153 // Check if we actually access the same field. 150 // Check if we actually access the same field.
154 if (this->transition_map_.address() == that->transition_map_.address() && 151 if (this->transition_map_.address() == that->transition_map_.address() &&
155 this->field_index_ == that->field_index_ && 152 this->field_index_ == that->field_index_ &&
156 this->field_type_->Is(that->field_type_) && 153 this->field_type_->Is(that->field_type_) &&
157 that->field_type_->Is(this->field_type_) && 154 that->field_type_->Is(this->field_type_) &&
158 this->field_representation_ == that->field_representation_) { 155 this->field_representation_ == that->field_representation_) {
159 this->receiver_maps_.insert(this->receiver_maps_.end(), 156 this->receiver_maps_.insert(this->receiver_maps_.end(),
160 that->receiver_maps_.begin(), 157 that->receiver_maps_.begin(),
161 that->receiver_maps_.end()); 158 that->receiver_maps_.end());
162 return true; 159 return true;
163 } 160 }
164 return false; 161 return false;
165 } 162 }
166 163
167 case kDataConstant: 164 case kDataConstant:
168 case kAccessorConstant: { 165 case kAccessorConstant: {
169 // Check if we actually access the same constant. 166 // Check if we actually access the same constant.
170 if (this->constant_.address() == that->constant_.address()) { 167 if (this->constant_.address() == that->constant_.address()) {
171 this->receiver_maps_.insert(this->receiver_maps_.end(), 168 this->receiver_maps_.insert(this->receiver_maps_.end(),
172 that->receiver_maps_.begin(), 169 that->receiver_maps_.begin(),
173 that->receiver_maps_.end()); 170 that->receiver_maps_.end());
174 return true; 171 return true;
175 } 172 }
176 return false; 173 return false;
177 } 174 }
175
176 case kNotFound:
178 case kGeneric: { 177 case kGeneric: {
179 this->receiver_maps_.insert(this->receiver_maps_.end(), 178 this->receiver_maps_.insert(this->receiver_maps_.end(),
180 that->receiver_maps_.begin(), 179 that->receiver_maps_.begin(),
181 that->receiver_maps_.end()); 180 that->receiver_maps_.end());
182 return true; 181 return true;
183 } 182 }
184 } 183 }
185 184
186 UNREACHABLE(); 185 UNREACHABLE();
187 return false; 186 return false;
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 } 557 }
559 return false; 558 return false;
560 } 559 }
561 560
562 561
563 Factory* AccessInfoFactory::factory() const { return isolate()->factory(); } 562 Factory* AccessInfoFactory::factory() const { return isolate()->factory(); }
564 563
565 } // namespace compiler 564 } // namespace compiler
566 } // namespace internal 565 } // namespace internal
567 } // namespace v8 566 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698