| 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 27 matching lines...) Expand all  Loading... | 
|   38  |   38  | 
|   39 Reduction JSGenericLowering::Reduce(Node* node) { |   39 Reduction JSGenericLowering::Reduce(Node* node) { | 
|   40   switch (node->opcode()) { |   40   switch (node->opcode()) { | 
|   41 #define DECLARE_CASE(x)  \ |   41 #define DECLARE_CASE(x)  \ | 
|   42     case IrOpcode::k##x: \ |   42     case IrOpcode::k##x: \ | 
|   43       Lower##x(node);    \ |   43       Lower##x(node);    \ | 
|   44       break; |   44       break; | 
|   45     JS_OP_LIST(DECLARE_CASE) |   45     JS_OP_LIST(DECLARE_CASE) | 
|   46 #undef DECLARE_CASE |   46 #undef DECLARE_CASE | 
|   47     case IrOpcode::kBranch: |   47     case IrOpcode::kBranch: | 
 |   48     case IrOpcode::kDeoptimizeIf: | 
 |   49     case IrOpcode::kDeoptimizeUnless: | 
|   48       // TODO(mstarzinger): If typing is enabled then simplified lowering will |   50       // TODO(mstarzinger): If typing is enabled then simplified lowering will | 
|   49       // have inserted the correct ChangeBoolToBit, otherwise we need to perform |   51       // have inserted the correct ChangeBoolToBit, otherwise we need to perform | 
|   50       // poor-man's representation inference here and insert manual change. |   52       // poor-man's representation inference here and insert manual change. | 
|   51       if (!is_typing_enabled_) { |   53       if (!is_typing_enabled_) { | 
|   52         Node* condition = node->InputAt(0); |   54         Node* condition = node->InputAt(0); | 
|   53         Node* test = graph()->NewNode(machine()->WordEqual(), condition, |   55         Node* test = graph()->NewNode(machine()->WordEqual(), condition, | 
|   54                                       jsgraph()->TrueConstant()); |   56                                       jsgraph()->TrueConstant()); | 
|   55         node->ReplaceInput(0, test); |   57         node->ReplaceInput(0, test); | 
|   56       } |   58       } | 
|   57       // Fall-through. |   59       // Fall-through. | 
| (...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  861 } |  863 } | 
|  862  |  864  | 
|  863  |  865  | 
|  864 MachineOperatorBuilder* JSGenericLowering::machine() const { |  866 MachineOperatorBuilder* JSGenericLowering::machine() const { | 
|  865   return jsgraph()->machine(); |  867   return jsgraph()->machine(); | 
|  866 } |  868 } | 
|  867  |  869  | 
|  868 }  // namespace compiler |  870 }  // namespace compiler | 
|  869 }  // namespace internal |  871 }  // namespace internal | 
|  870 }  // namespace v8 |  872 }  // namespace v8 | 
| OLD | NEW |