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

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

Issue 2893263002: [turbofan] Add Symbol feedback to Equal/StrictEqual. (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 | « 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 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 break; 634 break;
635 case IrOpcode::kCheckMaps: 635 case IrOpcode::kCheckMaps:
636 result = LowerCheckMaps(node, frame_state); 636 result = LowerCheckMaps(node, frame_state);
637 break; 637 break;
638 case IrOpcode::kCheckNumber: 638 case IrOpcode::kCheckNumber:
639 result = LowerCheckNumber(node, frame_state); 639 result = LowerCheckNumber(node, frame_state);
640 break; 640 break;
641 case IrOpcode::kCheckReceiver: 641 case IrOpcode::kCheckReceiver:
642 result = LowerCheckReceiver(node, frame_state); 642 result = LowerCheckReceiver(node, frame_state);
643 break; 643 break;
644 case IrOpcode::kCheckSymbol:
645 result = LowerCheckSymbol(node, frame_state);
646 break;
644 case IrOpcode::kCheckString: 647 case IrOpcode::kCheckString:
645 result = LowerCheckString(node, frame_state); 648 result = LowerCheckString(node, frame_state);
646 break; 649 break;
647 case IrOpcode::kCheckInternalizedString: 650 case IrOpcode::kCheckInternalizedString:
648 result = LowerCheckInternalizedString(node, frame_state); 651 result = LowerCheckInternalizedString(node, frame_state);
649 break; 652 break;
650 case IrOpcode::kCheckIf: 653 case IrOpcode::kCheckIf:
651 result = LowerCheckIf(node, frame_state); 654 result = LowerCheckIf(node, frame_state);
652 break; 655 break;
653 case IrOpcode::kCheckedInt32Add: 656 case IrOpcode::kCheckedInt32Add:
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
1293 __ LoadField(AccessBuilder::ForMapInstanceType(), value_map); 1296 __ LoadField(AccessBuilder::ForMapInstanceType(), value_map);
1294 1297
1295 STATIC_ASSERT(LAST_TYPE == LAST_JS_RECEIVER_TYPE); 1298 STATIC_ASSERT(LAST_TYPE == LAST_JS_RECEIVER_TYPE);
1296 Node* check = __ Uint32LessThanOrEqual( 1299 Node* check = __ Uint32LessThanOrEqual(
1297 __ Uint32Constant(FIRST_JS_RECEIVER_TYPE), value_instance_type); 1300 __ Uint32Constant(FIRST_JS_RECEIVER_TYPE), value_instance_type);
1298 __ DeoptimizeUnless(DeoptimizeReason::kNotAJavaScriptObject, check, 1301 __ DeoptimizeUnless(DeoptimizeReason::kNotAJavaScriptObject, check,
1299 frame_state); 1302 frame_state);
1300 return value; 1303 return value;
1301 } 1304 }
1302 1305
1306 Node* EffectControlLinearizer::LowerCheckSymbol(Node* node, Node* frame_state) {
1307 Node* value = node->InputAt(0);
1308
1309 Node* value_map = __ LoadField(AccessBuilder::ForMap(), value);
1310
1311 Node* check =
1312 __ WordEqual(value_map, __ HeapConstant(factory()->symbol_map()));
1313 __ DeoptimizeUnless(DeoptimizeReason::kNotASymbol, check, frame_state);
1314 return value;
1315 }
1316
1303 Node* EffectControlLinearizer::LowerCheckString(Node* node, Node* frame_state) { 1317 Node* EffectControlLinearizer::LowerCheckString(Node* node, Node* frame_state) {
1304 Node* value = node->InputAt(0); 1318 Node* value = node->InputAt(0);
1305 1319
1306 Node* value_map = __ LoadField(AccessBuilder::ForMap(), value); 1320 Node* value_map = __ LoadField(AccessBuilder::ForMap(), value);
1307 Node* value_instance_type = 1321 Node* value_instance_type =
1308 __ LoadField(AccessBuilder::ForMapInstanceType(), value_map); 1322 __ LoadField(AccessBuilder::ForMapInstanceType(), value_map);
1309 1323
1310 Node* check = __ Uint32LessThan(value_instance_type, 1324 Node* check = __ Uint32LessThan(value_instance_type,
1311 __ Uint32Constant(FIRST_NONSTRING_TYPE)); 1325 __ Uint32Constant(FIRST_NONSTRING_TYPE));
1312 __ DeoptimizeUnless(DeoptimizeReason::kWrongInstanceType, check, frame_state); 1326 __ DeoptimizeUnless(DeoptimizeReason::kWrongInstanceType, check, frame_state);
(...skipping 1680 matching lines...) Expand 10 before | Expand all | Expand 10 after
2993 return isolate()->factory(); 3007 return isolate()->factory();
2994 } 3008 }
2995 3009
2996 Isolate* EffectControlLinearizer::isolate() const { 3010 Isolate* EffectControlLinearizer::isolate() const {
2997 return jsgraph()->isolate(); 3011 return jsgraph()->isolate();
2998 } 3012 }
2999 3013
3000 } // namespace compiler 3014 } // namespace compiler
3001 } // namespace internal 3015 } // namespace internal
3002 } // namespace v8 3016 } // 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