| 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/compiler/typer.h" | 5 #include "src/compiler/typer.h" |
| 6 | 6 |
| 7 #include "src/base/flags.h" | 7 #include "src/base/flags.h" |
| 8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
| 9 #include "src/compilation-dependencies.h" | 9 #include "src/compilation-dependencies.h" |
| 10 #include "src/compiler/common-operator.h" | 10 #include "src/compiler/common-operator.h" |
| (...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 643 | 643 |
| 644 Type* Typer::Visitor::TypeTypedStateValues(Node* node) { | 644 Type* Typer::Visitor::TypeTypedStateValues(Node* node) { |
| 645 return Type::Internal(zone()); | 645 return Type::Internal(zone()); |
| 646 } | 646 } |
| 647 | 647 |
| 648 | 648 |
| 649 Type* Typer::Visitor::TypeCall(Node* node) { return Type::Any(); } | 649 Type* Typer::Visitor::TypeCall(Node* node) { return Type::Any(); } |
| 650 | 650 |
| 651 | 651 |
| 652 Type* Typer::Visitor::TypeProjection(Node* node) { | 652 Type* Typer::Visitor::TypeProjection(Node* node) { |
| 653 // TODO(bmeurer): Make this beautiful! Use tuple type here. |
| 654 if (node->InputAt(0)->opcode() == IrOpcode::kJSForInPrepare && |
| 655 ProjectionIndexOf(node->op()) == 2) { |
| 656 return typer_->cache_.kSmi; |
| 657 } |
| 653 // TODO(titzer): use the output type of the input to determine the bounds. | 658 // TODO(titzer): use the output type of the input to determine the bounds. |
| 654 return Type::Any(); | 659 return Type::Any(); |
| 655 } | 660 } |
| 656 | 661 |
| 657 | 662 |
| 658 Type* Typer::Visitor::TypeDead(Node* node) { return Type::Any(); } | 663 Type* Typer::Visitor::TypeDead(Node* node) { return Type::Any(); } |
| 659 | 664 |
| 660 | 665 |
| 661 // JS comparison operators. | 666 // JS comparison operators. |
| 662 | 667 |
| (...skipping 1778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2441 } | 2446 } |
| 2442 if (Type::IsInteger(*value)) { | 2447 if (Type::IsInteger(*value)) { |
| 2443 return Type::Range(value->Number(), value->Number(), zone()); | 2448 return Type::Range(value->Number(), value->Number(), zone()); |
| 2444 } | 2449 } |
| 2445 return Type::Constant(value, zone()); | 2450 return Type::Constant(value, zone()); |
| 2446 } | 2451 } |
| 2447 | 2452 |
| 2448 } // namespace compiler | 2453 } // namespace compiler |
| 2449 } // namespace internal | 2454 } // namespace internal |
| 2450 } // namespace v8 | 2455 } // namespace v8 |
| OLD | NEW |