OLD | NEW |
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 #undef DECLARE_CASE | 47 #undef DECLARE_CASE |
48 case IrOpcode::kBranch: | 48 case IrOpcode::kBranch: |
49 // TODO(mstarzinger): If typing is enabled then simplified lowering will | 49 // TODO(mstarzinger): If typing is enabled then simplified lowering will |
50 // have inserted the correct ChangeBoolToBit, otherwise we need to perform | 50 // have inserted the correct ChangeBoolToBit, otherwise we need to perform |
51 // poor-man's representation inference here and insert manual change. | 51 // poor-man's representation inference here and insert manual change. |
52 if (!is_typing_enabled_) { | 52 if (!is_typing_enabled_) { |
53 Node* condition = node->InputAt(0); | 53 Node* condition = node->InputAt(0); |
54 Node* test = graph()->NewNode(machine()->WordEqual(), condition, | 54 Node* test = graph()->NewNode(machine()->WordEqual(), condition, |
55 jsgraph()->TrueConstant()); | 55 jsgraph()->TrueConstant()); |
56 node->ReplaceInput(0, test); | 56 node->ReplaceInput(0, test); |
57 break; | |
58 } | 57 } |
59 // Fall-through. | 58 // Fall-through. |
60 default: | 59 default: |
61 // Nothing to see. | 60 // Nothing to see. |
62 return NoChange(); | 61 return NoChange(); |
63 } | 62 } |
64 return Changed(node); | 63 return Changed(node); |
65 } | 64 } |
66 | 65 |
67 | 66 |
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
771 } | 770 } |
772 | 771 |
773 | 772 |
774 MachineOperatorBuilder* JSGenericLowering::machine() const { | 773 MachineOperatorBuilder* JSGenericLowering::machine() const { |
775 return jsgraph()->machine(); | 774 return jsgraph()->machine(); |
776 } | 775 } |
777 | 776 |
778 } // namespace compiler | 777 } // namespace compiler |
779 } // namespace internal | 778 } // namespace internal |
780 } // namespace v8 | 779 } // namespace v8 |
OLD | NEW |