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

Side by Side Diff: src/compiler/js-native-context-specialization.cc

Issue 2662113005: [ic] Introduce IsXyzIC() predicates. (Closed)
Patch Set: Created 3 years, 10 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 | src/crankshaft/hydrogen.cc » ('j') | src/type-feedback-vector.cc » ('J')
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 "src/compiler/js-native-context-specialization.h" 5 #include "src/compiler/js-native-context-specialization.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/compilation-dependencies.h" 9 #include "src/compilation-dependencies.h"
10 #include "src/compiler/access-builder.h" 10 #include "src/compiler/access-builder.h"
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 for (const auto& access_info : access_infos) { 557 for (const auto& access_info : access_infos) {
558 if (access_info.IsAccessorConstant()) { 558 if (access_info.IsAccessorConstant()) {
559 // Accessor in try-blocks are not supported yet. 559 // Accessor in try-blocks are not supported yet.
560 if (is_exceptional || !(flags() & kAccessorInliningEnabled)) { 560 if (is_exceptional || !(flags() & kAccessorInliningEnabled)) {
561 return NoChange(); 561 return NoChange();
562 } 562 }
563 } else if (access_info.IsGeneric()) { 563 } else if (access_info.IsGeneric()) {
564 // We do not handle generic calls in try blocks. 564 // We do not handle generic calls in try blocks.
565 if (is_exceptional) return NoChange(); 565 if (is_exceptional) return NoChange();
566 // We only handle the generic store IC case. 566 // We only handle the generic store IC case.
567 if (vector->GetKind(slot) != FeedbackVectorSlotKind::STORE_IC) { 567 if (!vector->IsStoreIC(slot)) {
568 return NoChange(); 568 return NoChange();
569 } 569 }
570 } 570 }
571 } 571 }
572 572
573 // Nothing to do if we have no non-deprecated maps. 573 // Nothing to do if we have no non-deprecated maps.
574 if (access_infos.empty()) { 574 if (access_infos.empty()) {
575 return ReduceSoftDeoptimize( 575 return ReduceSoftDeoptimize(
576 node, DeoptimizeReason::kInsufficientTypeFeedbackForGenericNamedAccess); 576 node, DeoptimizeReason::kInsufficientTypeFeedbackForGenericNamedAccess);
577 } 577 }
(...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after
1551 effect = graph()->NewNode(simplified()->StoreField(field_access), storage, 1551 effect = graph()->NewNode(simplified()->StoreField(field_access), storage,
1552 value, effect, control); 1552 value, effect, control);
1553 if (access_info.HasTransitionMap()) { 1553 if (access_info.HasTransitionMap()) {
1554 effect = graph()->NewNode(common()->FinishRegion(), 1554 effect = graph()->NewNode(common()->FinishRegion(),
1555 jsgraph()->UndefinedConstant(), effect); 1555 jsgraph()->UndefinedConstant(), effect);
1556 } 1556 }
1557 } 1557 }
1558 } else { 1558 } else {
1559 DCHECK(access_info.IsGeneric()); 1559 DCHECK(access_info.IsGeneric());
1560 DCHECK_EQ(AccessMode::kStore, access_mode); 1560 DCHECK_EQ(AccessMode::kStore, access_mode);
1561 DCHECK_EQ(FeedbackVectorSlotKind::STORE_IC, vector->GetKind(slot)); 1561 DCHECK(vector->IsStoreIC(slot));
1562 Callable callable = 1562 Callable callable =
1563 CodeFactory::StoreICInOptimizedCode(isolate(), language_mode); 1563 CodeFactory::StoreICInOptimizedCode(isolate(), language_mode);
1564 const CallInterfaceDescriptor& descriptor = callable.descriptor(); 1564 const CallInterfaceDescriptor& descriptor = callable.descriptor();
1565 CallDescriptor* desc = Linkage::GetStubCallDescriptor( 1565 CallDescriptor* desc = Linkage::GetStubCallDescriptor(
1566 isolate(), graph()->zone(), descriptor, 1566 isolate(), graph()->zone(), descriptor,
1567 descriptor.GetStackParameterCount(), CallDescriptor::kNeedsFrameState, 1567 descriptor.GetStackParameterCount(), CallDescriptor::kNeedsFrameState,
1568 Operator::kNoProperties); 1568 Operator::kNoProperties);
1569 Node* stub_code = jsgraph()->HeapConstant(callable.code()); 1569 Node* stub_code = jsgraph()->HeapConstant(callable.code());
1570 Node* name_node = jsgraph()->HeapConstant(name); 1570 Node* name_node = jsgraph()->HeapConstant(name);
1571 Node* slot_node = jsgraph()->Constant(vector->GetIndex(slot)); 1571 Node* slot_node = jsgraph()->Constant(vector->GetIndex(slot));
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
2258 return jsgraph()->javascript(); 2258 return jsgraph()->javascript();
2259 } 2259 }
2260 2260
2261 SimplifiedOperatorBuilder* JSNativeContextSpecialization::simplified() const { 2261 SimplifiedOperatorBuilder* JSNativeContextSpecialization::simplified() const {
2262 return jsgraph()->simplified(); 2262 return jsgraph()->simplified();
2263 } 2263 }
2264 2264
2265 } // namespace compiler 2265 } // namespace compiler
2266 } // namespace internal 2266 } // namespace internal
2267 } // namespace v8 2267 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/crankshaft/hydrogen.cc » ('j') | src/type-feedback-vector.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698