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

Side by Side Diff: src/ic/handler-compiler.cc

Issue 2624903003: [runtime] Use PropertyKind/PropertyLocation instead of PropertyType. (Closed)
Patch Set: Addressing comments 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 | « src/factory.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/ic/handler-compiler.h" 5 #include "src/ic/handler-compiler.h"
6 6
7 #include "src/field-type.h" 7 #include "src/field-type.h"
8 #include "src/ic/call-optimization.h" 8 #include "src/ic/call-optimization.h"
9 #include "src/ic/handler-configuration-inl.h" 9 #include "src/ic/handler-configuration-inl.h"
10 #include "src/ic/ic-inl.h" 10 #include "src/ic/ic-inl.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 bool inline_followup = false; 156 bool inline_followup = false;
157 switch (it->state()) { 157 switch (it->state()) {
158 case LookupIterator::TRANSITION: 158 case LookupIterator::TRANSITION:
159 UNREACHABLE(); 159 UNREACHABLE();
160 case LookupIterator::ACCESS_CHECK: 160 case LookupIterator::ACCESS_CHECK:
161 case LookupIterator::INTERCEPTOR: 161 case LookupIterator::INTERCEPTOR:
162 case LookupIterator::JSPROXY: 162 case LookupIterator::JSPROXY:
163 case LookupIterator::NOT_FOUND: 163 case LookupIterator::NOT_FOUND:
164 case LookupIterator::INTEGER_INDEXED_EXOTIC: 164 case LookupIterator::INTEGER_INDEXED_EXOTIC:
165 break; 165 break;
166 case LookupIterator::DATA: 166 case LookupIterator::DATA: {
167 inline_followup = 167 PropertyDetails details = it->property_details();
168 it->property_details().type() == DATA && !it->is_dictionary_holder(); 168 inline_followup = details.kind() == kData &&
169 details.location() == kField &&
170 !it->is_dictionary_holder();
169 break; 171 break;
172 }
170 case LookupIterator::ACCESSOR: { 173 case LookupIterator::ACCESSOR: {
171 Handle<Object> accessors = it->GetAccessors(); 174 Handle<Object> accessors = it->GetAccessors();
172 if (accessors->IsAccessorInfo()) { 175 if (accessors->IsAccessorInfo()) {
173 Handle<AccessorInfo> info = Handle<AccessorInfo>::cast(accessors); 176 Handle<AccessorInfo> info = Handle<AccessorInfo>::cast(accessors);
174 inline_followup = 177 inline_followup =
175 info->getter() != NULL && 178 info->getter() != NULL &&
176 AccessorInfo::IsCompatibleReceiverMap(isolate(), info, map()); 179 AccessorInfo::IsCompatibleReceiverMap(isolate(), info, map());
177 } else if (accessors->IsAccessorPair()) { 180 } else if (accessors->IsAccessorPair()) {
178 Handle<JSObject> property_holder(it->GetHolder<JSObject>()); 181 Handle<JSObject> property_holder(it->GetHolder<JSObject>());
179 Handle<Object> getter(Handle<AccessorPair>::cast(accessors)->getter(), 182 Handle<Object> getter(Handle<AccessorPair>::cast(accessors)->getter(),
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 270
268 switch (it->state()) { 271 switch (it->state()) {
269 case LookupIterator::ACCESS_CHECK: 272 case LookupIterator::ACCESS_CHECK:
270 case LookupIterator::INTERCEPTOR: 273 case LookupIterator::INTERCEPTOR:
271 case LookupIterator::JSPROXY: 274 case LookupIterator::JSPROXY:
272 case LookupIterator::NOT_FOUND: 275 case LookupIterator::NOT_FOUND:
273 case LookupIterator::INTEGER_INDEXED_EXOTIC: 276 case LookupIterator::INTEGER_INDEXED_EXOTIC:
274 case LookupIterator::TRANSITION: 277 case LookupIterator::TRANSITION:
275 UNREACHABLE(); 278 UNREACHABLE();
276 case LookupIterator::DATA: { 279 case LookupIterator::DATA: {
277 DCHECK_EQ(DATA, it->property_details().type()); 280 DCHECK_EQ(kData, it->property_details().kind());
281 DCHECK_EQ(kField, it->property_details().location());
278 __ Move(LoadFieldDescriptor::ReceiverRegister(), reg); 282 __ Move(LoadFieldDescriptor::ReceiverRegister(), reg);
279 Handle<Object> smi_handler = 283 Handle<Object> smi_handler =
280 LoadIC::SimpleFieldLoad(isolate(), it->GetFieldIndex()); 284 LoadIC::SimpleFieldLoad(isolate(), it->GetFieldIndex());
281 __ Move(LoadFieldDescriptor::SmiHandlerRegister(), smi_handler); 285 __ Move(LoadFieldDescriptor::SmiHandlerRegister(), smi_handler);
282 LoadFieldStub stub(isolate()); 286 LoadFieldStub stub(isolate());
283 GenerateTailCall(masm(), stub.GetCode()); 287 GenerateTailCall(masm(), stub.GetCode());
284 break; 288 break;
285 } 289 }
286 case LookupIterator::ACCESSOR: 290 case LookupIterator::ACCESSOR:
287 if (it->GetAccessors()->IsAccessorInfo()) { 291 if (it->GetAccessors()->IsAccessorInfo()) {
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 } 383 }
380 384
381 void ElementHandlerCompiler::CompileElementHandlers( 385 void ElementHandlerCompiler::CompileElementHandlers(
382 MapHandleList* receiver_maps, List<Handle<Object>>* handlers) { 386 MapHandleList* receiver_maps, List<Handle<Object>>* handlers) {
383 for (int i = 0; i < receiver_maps->length(); ++i) { 387 for (int i = 0; i < receiver_maps->length(); ++i) {
384 handlers->Add(GetKeyedLoadHandler(receiver_maps->at(i), isolate())); 388 handlers->Add(GetKeyedLoadHandler(receiver_maps->at(i), isolate()));
385 } 389 }
386 } 390 }
387 } // namespace internal 391 } // namespace internal
388 } // namespace v8 392 } // namespace v8
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698