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

Side by Side Diff: src/compiler/js-typed-lowering.cc

Issue 1154303002: [turbofan] Optimize strict equality of unique values. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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 | test/unittests/compiler/js-typed-lowering-unittest.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/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/compiler/access-builder.h" 6 #include "src/compiler/access-builder.h"
7 #include "src/compiler/js-graph.h" 7 #include "src/compiler/js-graph.h"
8 #include "src/compiler/js-typed-lowering.h" 8 #include "src/compiler/js-typed-lowering.h"
9 #include "src/compiler/linkage.h" 9 #include "src/compiler/linkage.h"
10 #include "src/compiler/node-matchers.h" 10 #include "src/compiler/node-matchers.h"
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 invert); 559 invert);
560 } 560 }
561 if (r.OneInputIs(Type::Object())) { 561 if (r.OneInputIs(Type::Object())) {
562 return r.ChangeToPureOperator(simplified()->ReferenceEqual(Type::Object()), 562 return r.ChangeToPureOperator(simplified()->ReferenceEqual(Type::Object()),
563 invert); 563 invert);
564 } 564 }
565 if (r.OneInputIs(Type::Receiver())) { 565 if (r.OneInputIs(Type::Receiver())) {
566 return r.ChangeToPureOperator( 566 return r.ChangeToPureOperator(
567 simplified()->ReferenceEqual(Type::Receiver()), invert); 567 simplified()->ReferenceEqual(Type::Receiver()), invert);
568 } 568 }
569 if (r.BothInputsAre(Type::Unique())) {
570 return r.ChangeToPureOperator(simplified()->ReferenceEqual(Type::Unique()),
571 invert);
572 }
569 if (r.BothInputsAre(Type::String())) { 573 if (r.BothInputsAre(Type::String())) {
570 return r.ChangeToPureOperator(simplified()->StringEqual(), invert); 574 return r.ChangeToPureOperator(simplified()->StringEqual(), invert);
571 } 575 }
572 if (r.BothInputsAre(Type::Number())) { 576 if (r.BothInputsAre(Type::Number())) {
573 return r.ChangeToPureOperator(simplified()->NumberEqual(), invert); 577 return r.ChangeToPureOperator(simplified()->NumberEqual(), invert);
574 } 578 }
575 // TODO(turbofan): js-typed-lowering of StrictEqual(mixed types) 579 // TODO(turbofan): js-typed-lowering of StrictEqual(mixed types)
576 return NoChange(); 580 return NoChange();
577 } 581 }
578 582
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
1203 } 1207 }
1204 1208
1205 1209
1206 MachineOperatorBuilder* JSTypedLowering::machine() const { 1210 MachineOperatorBuilder* JSTypedLowering::machine() const {
1207 return jsgraph()->machine(); 1211 return jsgraph()->machine();
1208 } 1212 }
1209 1213
1210 } // namespace compiler 1214 } // namespace compiler
1211 } // namespace internal 1215 } // namespace internal
1212 } // namespace v8 1216 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/unittests/compiler/js-typed-lowering-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698