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

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

Issue 2103323003: [turbofan] Don't eagerly introduce machine operators in JSTypedLowering. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@TurboFan_Typing
Patch Set: Created 4 years, 5 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/cctest/compiler/test-js-typed-lowering.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/compilation-dependencies.h" 6 #include "src/compilation-dependencies.h"
7 #include "src/compiler/access-builder.h" 7 #include "src/compiler/access-builder.h"
8 #include "src/compiler/js-graph.h" 8 #include "src/compiler/js-graph.h"
9 #include "src/compiler/js-typed-lowering.h" 9 #include "src/compiler/js-typed-lowering.h"
10 #include "src/compiler/linkage.h" 10 #include "src/compiler/linkage.h"
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 } 590 }
591 r.ChangeToPureOperator(stringOp); 591 r.ChangeToPureOperator(stringOp);
592 return Changed(node); 592 return Changed(node);
593 } 593 }
594 594
595 CompareOperationHints::Hint hint = r.GetNumberCompareOperationFeedback(); 595 CompareOperationHints::Hint hint = r.GetNumberCompareOperationFeedback();
596 if (hint != CompareOperationHints::kAny || 596 if (hint != CompareOperationHints::kAny ||
597 r.OneInputCannotBe(Type::StringOrReceiver())) { 597 r.OneInputCannotBe(Type::StringOrReceiver())) {
598 const Operator* less_than; 598 const Operator* less_than;
599 const Operator* less_than_or_equal; 599 const Operator* less_than_or_equal;
600 if (r.BothInputsAre(Type::Unsigned32())) { 600 if (hint != CompareOperationHints::kAny) {
601 less_than = machine()->Uint32LessThan();
602 less_than_or_equal = machine()->Uint32LessThanOrEqual();
603 } else if (r.BothInputsAre(Type::Signed32())) {
604 less_than = machine()->Int32LessThan();
605 less_than_or_equal = machine()->Int32LessThanOrEqual();
606 } else if (hint != CompareOperationHints::kAny) {
607 less_than = simplified()->SpeculativeNumberLessThan(hint); 601 less_than = simplified()->SpeculativeNumberLessThan(hint);
608 less_than_or_equal = simplified()->SpeculativeNumberLessThanOrEqual(hint); 602 less_than_or_equal = simplified()->SpeculativeNumberLessThanOrEqual(hint);
609 } else { 603 } else {
610 // TODO(turbofan): mixed signed/unsigned int32 comparisons.
611 Node* frame_state = NodeProperties::GetFrameStateInput(node, 1); 604 Node* frame_state = NodeProperties::GetFrameStateInput(node, 1);
612 r.ConvertInputsToNumber(frame_state); 605 r.ConvertInputsToNumber(frame_state);
613 less_than = simplified()->NumberLessThan(); 606 less_than = simplified()->NumberLessThan();
614 less_than_or_equal = simplified()->NumberLessThanOrEqual(); 607 less_than_or_equal = simplified()->NumberLessThanOrEqual();
615 } 608 }
616 const Operator* comparison; 609 const Operator* comparison;
617 switch (node->opcode()) { 610 switch (node->opcode()) {
618 case IrOpcode::kJSLessThan: 611 case IrOpcode::kJSLessThan:
619 comparison = less_than; 612 comparison = less_than;
620 break; 613 break;
(...skipping 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after
2033 } 2026 }
2034 2027
2035 2028
2036 CompilationDependencies* JSTypedLowering::dependencies() const { 2029 CompilationDependencies* JSTypedLowering::dependencies() const {
2037 return dependencies_; 2030 return dependencies_;
2038 } 2031 }
2039 2032
2040 } // namespace compiler 2033 } // namespace compiler
2041 } // namespace internal 2034 } // namespace internal
2042 } // namespace v8 2035 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/cctest/compiler/test-js-typed-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698