| 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-stubs.h" |    5 #include "src/code-stubs.h" | 
|    6 #include "src/compiler/change-lowering.h" |    6 #include "src/compiler/change-lowering.h" | 
|    7 #include "src/compiler/js-graph.h" |    7 #include "src/compiler/js-graph.h" | 
|    8 #include "src/compiler/linkage.h" |    8 #include "src/compiler/linkage.h" | 
|    9 #include "src/compiler/node-properties.h" |    9 #include "src/compiler/node-properties.h" | 
|   10 #include "src/compiler/simplified-operator.h" |   10 #include "src/compiler/simplified-operator.h" | 
| (...skipping 20 matching lines...) Expand all  Loading... | 
|   31  |   31  | 
|   32  protected: |   32  protected: | 
|   33   bool Is32() const { |   33   bool Is32() const { | 
|   34     return WordRepresentation() == MachineRepresentation::kWord32; |   34     return WordRepresentation() == MachineRepresentation::kWord32; | 
|   35   } |   35   } | 
|   36   bool Is64() const { |   36   bool Is64() const { | 
|   37     return WordRepresentation() == MachineRepresentation::kWord64; |   37     return WordRepresentation() == MachineRepresentation::kWord64; | 
|   38   } |   38   } | 
|   39  |   39  | 
|   40   Reduction Reduce(Node* node) { |   40   Reduction Reduce(Node* node) { | 
 |   41     GraphReducer graph_reducer(zone(), graph()); | 
|   41     MachineOperatorBuilder machine(zone(), WordRepresentation()); |   42     MachineOperatorBuilder machine(zone(), WordRepresentation()); | 
|   42     JSOperatorBuilder javascript(zone()); |   43     JSOperatorBuilder javascript(zone()); | 
|   43     JSGraph jsgraph(isolate(), graph(), common(), &javascript, nullptr, |   44     JSGraph jsgraph(isolate(), graph(), common(), &javascript, nullptr, | 
|   44                     &machine); |   45                     &machine); | 
|   45     ChangeLowering reducer(&jsgraph); |   46     ChangeLowering reducer(&graph_reducer, &jsgraph); | 
|   46     return reducer.Reduce(node); |   47     return reducer.Reduce(node); | 
|   47   } |   48   } | 
|   48  |   49  | 
|   49   SimplifiedOperatorBuilder* simplified() { return &simplified_; } |   50   SimplifiedOperatorBuilder* simplified() { return &simplified_; } | 
|   50  |   51  | 
|   51   Matcher<Node*> IsAllocateHeapNumber(const Matcher<Node*>& effect_matcher, |   52   Matcher<Node*> IsAllocateHeapNumber(const Matcher<Node*>& effect_matcher, | 
|   52                                       const Matcher<Node*>& control_matcher) { |   53                                       const Matcher<Node*>& control_matcher) { | 
|   53     return IsCall( |   54     return IsCall( | 
|   54         _, IsHeapConstant(AllocateHeapNumberStub(isolate()).GetCode()), |   55         _, IsHeapConstant(AllocateHeapNumberStub(isolate()).GetCode()), | 
|   55         IsNumberConstant(BitEq(0.0)), effect_matcher, control_matcher); |   56         IsNumberConstant(BitEq(0.0)), effect_matcher, control_matcher); | 
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  264   Reduction r = Reduce(alloc); |  265   Reduction r = Reduce(alloc); | 
|  265  |  266  | 
|  266   // Only check that we lowered, but do not specify the exact form since |  267   // Only check that we lowered, but do not specify the exact form since | 
|  267   // this is subject to change. |  268   // this is subject to change. | 
|  268   ASSERT_TRUE(r.Changed()); |  269   ASSERT_TRUE(r.Changed()); | 
|  269 } |  270 } | 
|  270  |  271  | 
|  271 }  // namespace compiler |  272 }  // namespace compiler | 
|  272 }  // namespace internal |  273 }  // namespace internal | 
|  273 }  // namespace v8 |  274 }  // namespace v8 | 
| OLD | NEW |