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

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

Issue 2883883002: [turbofan] Properly merge compatible field access infos. (Closed)
Patch Set: Created 3 years, 7 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 AccessMode access_mode, Zone* zone) { 138 AccessMode access_mode, Zone* zone) {
139 if (this->kind_ != that->kind_) return false; 139 if (this->kind_ != that->kind_) return false;
140 if (this->holder_.address() != that->holder_.address()) return false; 140 if (this->holder_.address() != that->holder_.address()) return false;
141 141
142 switch (this->kind_) { 142 switch (this->kind_) {
143 case kInvalid: 143 case kInvalid:
144 break; 144 break;
145 145
146 case kDataField: 146 case kDataField:
147 case kDataConstantField: { 147 case kDataConstantField: {
148 // Check if we actually access the same field. 148 // Check if we actually access the same field (we use the
149 if (this->kind_ == that->kind_ && 149 // GetFieldAccessStubKey method here just like the ICs do
150 this->field_index_ == that->field_index_) { 150 // since that way we only compare the relevant bits of the
151 // field indices).
152 if (this->field_index_.GetFieldAccessStubKey() ==
153 that->field_index_.GetFieldAccessStubKey()) {
151 switch (access_mode) { 154 switch (access_mode) {
152 case AccessMode::kLoad: { 155 case AccessMode::kLoad: {
153 if (this->field_representation_ != that->field_representation_) { 156 if (this->field_representation_ != that->field_representation_) {
154 if (!IsAnyTagged(this->field_representation_) || 157 if (!IsAnyTagged(this->field_representation_) ||
155 !IsAnyTagged(that->field_representation_)) { 158 !IsAnyTagged(that->field_representation_)) {
156 return false; 159 return false;
157 } 160 }
158 this->field_representation_ = MachineRepresentation::kTagged; 161 this->field_representation_ = MachineRepresentation::kTagged;
159 } 162 }
160 if (this->field_map_.address() != that->field_map_.address()) { 163 if (this->field_map_.address() != that->field_map_.address()) {
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 } 650 }
648 return false; 651 return false;
649 } 652 }
650 653
651 654
652 Factory* AccessInfoFactory::factory() const { return isolate()->factory(); } 655 Factory* AccessInfoFactory::factory() const { return isolate()->factory(); }
653 656
654 } // namespace compiler 657 } // namespace compiler
655 } // namespace internal 658 } // namespace internal
656 } // namespace v8 659 } // 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