| 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/bootstrapper.h" | 5 #include "src/bootstrapper.h" |
| 6 #include "src/compiler/graph-inl.h" | 6 #include "src/compiler/graph-inl.h" |
| 7 #include "src/compiler/graph-reducer.h" | 7 #include "src/compiler/graph-reducer.h" |
| 8 #include "src/compiler/js-operator.h" | 8 #include "src/compiler/js-operator.h" |
| 9 #include "src/compiler/node.h" | 9 #include "src/compiler/node.h" |
| 10 #include "src/compiler/node-properties-inl.h" | 10 #include "src/compiler/node-properties-inl.h" |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 | 216 |
| 217 Typer::~Typer() { | 217 Typer::~Typer() { |
| 218 graph_->RemoveDecorator(decorator_); | 218 graph_->RemoveDecorator(decorator_); |
| 219 } | 219 } |
| 220 | 220 |
| 221 | 221 |
| 222 class Typer::Visitor : public Reducer { | 222 class Typer::Visitor : public Reducer { |
| 223 public: | 223 public: |
| 224 explicit Visitor(Typer* typer) : typer_(typer) {} | 224 explicit Visitor(Typer* typer) : typer_(typer) {} |
| 225 | 225 |
| 226 virtual Reduction Reduce(Node* node) OVERRIDE { | 226 Reduction Reduce(Node* node) OVERRIDE { |
| 227 if (node->op()->ValueOutputCount() == 0) return NoChange(); | 227 if (node->op()->ValueOutputCount() == 0) return NoChange(); |
| 228 switch (node->opcode()) { | 228 switch (node->opcode()) { |
| 229 #define DECLARE_CASE(x) \ | 229 #define DECLARE_CASE(x) \ |
| 230 case IrOpcode::k##x: \ | 230 case IrOpcode::k##x: \ |
| 231 return UpdateBounds(node, TypeBinaryOp(node, x##Typer)); | 231 return UpdateBounds(node, TypeBinaryOp(node, x##Typer)); |
| 232 JS_SIMPLE_BINOP_LIST(DECLARE_CASE) | 232 JS_SIMPLE_BINOP_LIST(DECLARE_CASE) |
| 233 #undef DECLARE_CASE | 233 #undef DECLARE_CASE |
| 234 | 234 |
| 235 #define DECLARE_CASE(x) \ | 235 #define DECLARE_CASE(x) \ |
| 236 case IrOpcode::k##x: \ | 236 case IrOpcode::k##x: \ |
| (...skipping 1855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2092 // TODO(rossberg): Do we want some ClampedArray type to express this? | 2092 // TODO(rossberg): Do we want some ClampedArray type to express this? |
| 2093 break; | 2093 break; |
| 2094 } | 2094 } |
| 2095 } | 2095 } |
| 2096 return Type::Constant(value, zone()); | 2096 return Type::Constant(value, zone()); |
| 2097 } | 2097 } |
| 2098 | 2098 |
| 2099 } // namespace compiler | 2099 } // namespace compiler |
| 2100 } // namespace internal | 2100 } // namespace internal |
| 2101 } // namespace v8 | 2101 } // namespace v8 |
| OLD | NEW |