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

Side by Side Diff: src/compiler/effect-control-linearizer.cc

Issue 2639883002: [turbofan] Add Receiver feedback for abstract/strict equality. (Closed)
Patch Set: 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/compiler/effect-control-linearizer.h ('k') | src/compiler/js-operator.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 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/effect-control-linearizer.h" 5 #include "src/compiler/effect-control-linearizer.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/compiler/access-builder.h" 8 #include "src/compiler/access-builder.h"
9 #include "src/compiler/compiler-source-position-table.h" 9 #include "src/compiler/compiler-source-position-table.h"
10 #include "src/compiler/js-graph.h" 10 #include "src/compiler/js-graph.h"
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 break; 641 break;
642 case IrOpcode::kCheckBounds: 642 case IrOpcode::kCheckBounds:
643 result = LowerCheckBounds(node, frame_state); 643 result = LowerCheckBounds(node, frame_state);
644 break; 644 break;
645 case IrOpcode::kCheckMaps: 645 case IrOpcode::kCheckMaps:
646 result = LowerCheckMaps(node, frame_state); 646 result = LowerCheckMaps(node, frame_state);
647 break; 647 break;
648 case IrOpcode::kCheckNumber: 648 case IrOpcode::kCheckNumber:
649 result = LowerCheckNumber(node, frame_state); 649 result = LowerCheckNumber(node, frame_state);
650 break; 650 break;
651 case IrOpcode::kCheckReceiver:
652 result = LowerCheckReceiver(node, frame_state);
653 break;
651 case IrOpcode::kCheckString: 654 case IrOpcode::kCheckString:
652 result = LowerCheckString(node, frame_state); 655 result = LowerCheckString(node, frame_state);
653 break; 656 break;
654 case IrOpcode::kCheckInternalizedString: 657 case IrOpcode::kCheckInternalizedString:
655 result = LowerCheckInternalizedString(node, frame_state); 658 result = LowerCheckInternalizedString(node, frame_state);
656 break; 659 break;
657 case IrOpcode::kCheckIf: 660 case IrOpcode::kCheckIf:
658 result = LowerCheckIf(node, frame_state); 661 result = LowerCheckIf(node, frame_state);
659 break; 662 break;
660 case IrOpcode::kCheckedInt32Add: 663 case IrOpcode::kCheckedInt32Add:
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
1147 __ Bind(&if_not_smi); 1150 __ Bind(&if_not_smi);
1148 Node* value_map = __ LoadField(AccessBuilder::ForMap(), value); 1151 Node* value_map = __ LoadField(AccessBuilder::ForMap(), value);
1149 Node* check1 = __ WordEqual(value_map, __ HeapNumberMapConstant()); 1152 Node* check1 = __ WordEqual(value_map, __ HeapNumberMapConstant());
1150 __ DeoptimizeUnless(DeoptimizeReason::kNotAHeapNumber, check1, frame_state); 1153 __ DeoptimizeUnless(DeoptimizeReason::kNotAHeapNumber, check1, frame_state);
1151 __ Goto(&done); 1154 __ Goto(&done);
1152 1155
1153 __ Bind(&done); 1156 __ Bind(&done);
1154 return value; 1157 return value;
1155 } 1158 }
1156 1159
1160 Node* EffectControlLinearizer::LowerCheckReceiver(Node* node,
1161 Node* frame_state) {
1162 Node* value = node->InputAt(0);
1163
1164 Node* value_map = __ LoadField(AccessBuilder::ForMap(), value);
1165 Node* value_instance_type =
1166 __ LoadField(AccessBuilder::ForMapInstanceType(), value_map);
1167
1168 STATIC_ASSERT(LAST_TYPE == LAST_JS_RECEIVER_TYPE);
1169 Node* check = __ Uint32LessThanOrEqual(
1170 __ Uint32Constant(FIRST_JS_RECEIVER_TYPE), value_instance_type);
1171 __ DeoptimizeUnless(DeoptimizeReason::kNotAJavaScriptObject, check,
1172 frame_state);
1173 return value;
1174 }
1175
1157 Node* EffectControlLinearizer::LowerCheckString(Node* node, Node* frame_state) { 1176 Node* EffectControlLinearizer::LowerCheckString(Node* node, Node* frame_state) {
1158 Node* value = node->InputAt(0); 1177 Node* value = node->InputAt(0);
1159 1178
1160 Node* value_map = __ LoadField(AccessBuilder::ForMap(), value); 1179 Node* value_map = __ LoadField(AccessBuilder::ForMap(), value);
1161 Node* value_instance_type = 1180 Node* value_instance_type =
1162 __ LoadField(AccessBuilder::ForMapInstanceType(), value_map); 1181 __ LoadField(AccessBuilder::ForMapInstanceType(), value_map);
1163 1182
1164 Node* check = __ Uint32LessThan(value_instance_type, 1183 Node* check = __ Uint32LessThan(value_instance_type,
1165 __ Uint32Constant(FIRST_NONSTRING_TYPE)); 1184 __ Uint32Constant(FIRST_NONSTRING_TYPE));
1166 __ DeoptimizeUnless(DeoptimizeReason::kWrongInstanceType, check, frame_state); 1185 __ DeoptimizeUnless(DeoptimizeReason::kWrongInstanceType, check, frame_state);
(...skipping 1529 matching lines...) Expand 10 before | Expand all | Expand 10 after
2696 return isolate()->factory(); 2715 return isolate()->factory();
2697 } 2716 }
2698 2717
2699 Isolate* EffectControlLinearizer::isolate() const { 2718 Isolate* EffectControlLinearizer::isolate() const {
2700 return jsgraph()->isolate(); 2719 return jsgraph()->isolate();
2701 } 2720 }
2702 2721
2703 } // namespace compiler 2722 } // namespace compiler
2704 } // namespace internal 2723 } // namespace internal
2705 } // namespace v8 2724 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/effect-control-linearizer.h ('k') | src/compiler/js-operator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698