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

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

Issue 1872333002: [turbofan] Remove support for --turbo-types. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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/js-generic-lowering.h ('k') | src/compiler/pipeline.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/code-stubs.h" 6 #include "src/code-stubs.h"
7 #include "src/compiler/common-operator.h" 7 #include "src/compiler/common-operator.h"
8 #include "src/compiler/js-generic-lowering.h" 8 #include "src/compiler/js-generic-lowering.h"
9 #include "src/compiler/js-graph.h" 9 #include "src/compiler/js-graph.h"
10 #include "src/compiler/machine-operator.h" 10 #include "src/compiler/machine-operator.h"
(...skipping 10 matching lines...) Expand all
21 if (count > 1) { 21 if (count > 1) {
22 int index = NodeProperties::FirstFrameStateIndex(node) + 1; 22 int index = NodeProperties::FirstFrameStateIndex(node) + 1;
23 do { 23 do {
24 node->RemoveInput(index); 24 node->RemoveInput(index);
25 } while (--count > 1); 25 } while (--count > 1);
26 } 26 }
27 return count > 0 ? CallDescriptor::kNeedsFrameState 27 return count > 0 ? CallDescriptor::kNeedsFrameState
28 : CallDescriptor::kNoFlags; 28 : CallDescriptor::kNoFlags;
29 } 29 }
30 30
31 31 JSGenericLowering::JSGenericLowering(JSGraph* jsgraph) : jsgraph_(jsgraph) {}
32 JSGenericLowering::JSGenericLowering(bool is_typing_enabled, JSGraph* jsgraph)
33 : is_typing_enabled_(is_typing_enabled), jsgraph_(jsgraph) {}
34
35 32
36 JSGenericLowering::~JSGenericLowering() {} 33 JSGenericLowering::~JSGenericLowering() {}
37 34
38 35
39 Reduction JSGenericLowering::Reduce(Node* node) { 36 Reduction JSGenericLowering::Reduce(Node* node) {
40 switch (node->opcode()) { 37 switch (node->opcode()) {
41 #define DECLARE_CASE(x) \ 38 #define DECLARE_CASE(x) \
42 case IrOpcode::k##x: \ 39 case IrOpcode::k##x: \
43 Lower##x(node); \ 40 Lower##x(node); \
44 break; 41 break;
45 JS_OP_LIST(DECLARE_CASE) 42 JS_OP_LIST(DECLARE_CASE)
46 #undef DECLARE_CASE 43 #undef DECLARE_CASE
47 case IrOpcode::kBranch:
48 case IrOpcode::kDeoptimizeIf:
49 case IrOpcode::kDeoptimizeUnless:
50 // TODO(mstarzinger): If typing is enabled then simplified lowering will
51 // have inserted the correct ChangeBoolToBit, otherwise we need to perform
52 // poor-man's representation inference here and insert manual change.
53 if (!is_typing_enabled_) {
54 Node* condition = node->InputAt(0);
55 Node* test = graph()->NewNode(machine()->WordEqual(), condition,
56 jsgraph()->TrueConstant());
57 node->ReplaceInput(0, test);
58 }
59 // Fall-through.
60 default: 44 default:
61 // Nothing to see. 45 // Nothing to see.
62 return NoChange(); 46 return NoChange();
63 } 47 }
64 return Changed(node); 48 return Changed(node);
65 } 49 }
66 50
67 #define REPLACE_BINARY_OP_IC_CALL(Op, token) \ 51 #define REPLACE_BINARY_OP_IC_CALL(Op, token) \
68 void JSGenericLowering::Lower##Op(Node* node) { \ 52 void JSGenericLowering::Lower##Op(Node* node) { \
69 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); \ 53 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); \
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 } 730 }
747 731
748 732
749 MachineOperatorBuilder* JSGenericLowering::machine() const { 733 MachineOperatorBuilder* JSGenericLowering::machine() const {
750 return jsgraph()->machine(); 734 return jsgraph()->machine();
751 } 735 }
752 736
753 } // namespace compiler 737 } // namespace compiler
754 } // namespace internal 738 } // namespace internal
755 } // namespace v8 739 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-generic-lowering.h ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698