| 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 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 583 | 583 |
| 584 | 584 |
| 585 // Common operators. | 585 // Common operators. |
| 586 | 586 |
| 587 | 587 |
| 588 Bounds Typer::Visitor::TypeParameter(Node* node) { | 588 Bounds Typer::Visitor::TypeParameter(Node* node) { |
| 589 return Bounds::Unbounded(zone()); | 589 return Bounds::Unbounded(zone()); |
| 590 } | 590 } |
| 591 | 591 |
| 592 | 592 |
| 593 Bounds Typer::Visitor::TypeOsrValue(Node* node) { |
| 594 // OSR values explicitly have type {None} before OSR form is deconstructed. |
| 595 if (node->InputAt(0)->opcode() == IrOpcode::kOsrLoopEntry) { |
| 596 return Bounds(Type::None(), Type::None()); |
| 597 } |
| 598 // TODO(turbofan): preserve the type of OSR values after deconstruction. |
| 599 return Bounds::Unbounded(zone()); |
| 600 } |
| 601 |
| 602 |
| 593 Bounds Typer::Visitor::TypeInt32Constant(Node* node) { | 603 Bounds Typer::Visitor::TypeInt32Constant(Node* node) { |
| 594 Factory* f = isolate()->factory(); | 604 Factory* f = isolate()->factory(); |
| 595 Handle<Object> number = f->NewNumber(OpParameter<int32_t>(node)); | 605 Handle<Object> number = f->NewNumber(OpParameter<int32_t>(node)); |
| 596 return Bounds(Type::Intersect( | 606 return Bounds(Type::Intersect( |
| 597 Type::Range(number, number, zone()), Type::UntaggedSigned32(), zone())); | 607 Type::Range(number, number, zone()), Type::UntaggedSigned32(), zone())); |
| 598 } | 608 } |
| 599 | 609 |
| 600 | 610 |
| 601 Bounds Typer::Visitor::TypeInt64Constant(Node* node) { | 611 Bounds Typer::Visitor::TypeInt64Constant(Node* node) { |
| 602 // TODO(rossberg): This actually seems to be a PointerConstant so far... | 612 // TODO(rossberg): This actually seems to be a PointerConstant so far... |
| (...skipping 1489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2092 // TODO(rossberg): Do we want some ClampedArray type to express this? | 2102 // TODO(rossberg): Do we want some ClampedArray type to express this? |
| 2093 break; | 2103 break; |
| 2094 } | 2104 } |
| 2095 } | 2105 } |
| 2096 return Type::Constant(value, zone()); | 2106 return Type::Constant(value, zone()); |
| 2097 } | 2107 } |
| 2098 | 2108 |
| 2099 } // namespace compiler | 2109 } // namespace compiler |
| 2100 } // namespace internal | 2110 } // namespace internal |
| 2101 } // namespace v8 | 2111 } // namespace v8 |
| OLD | NEW |