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 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 | 591 |
592 | 592 |
593 // Common operators. | 593 // Common operators. |
594 | 594 |
595 | 595 |
596 Bounds Typer::Visitor::TypeParameter(Node* node) { | 596 Bounds Typer::Visitor::TypeParameter(Node* node) { |
597 return Bounds::Unbounded(zone()); | 597 return Bounds::Unbounded(zone()); |
598 } | 598 } |
599 | 599 |
600 | 600 |
| 601 Bounds Typer::Visitor::TypeOsrValue(Node* node) { |
| 602 // OSR values explicitly have type {None} before OSR form is deconstructed. |
| 603 if (node->InputAt(0)->opcode() == IrOpcode::kOsrLoopEntry) { |
| 604 return Bounds(Type::None(), Type::None()); |
| 605 } |
| 606 // TODO(turbofan): preserve the type of OSR values after deconstruction. |
| 607 return Bounds::Unbounded(zone()); |
| 608 } |
| 609 |
| 610 |
601 Bounds Typer::Visitor::TypeInt32Constant(Node* node) { | 611 Bounds Typer::Visitor::TypeInt32Constant(Node* node) { |
602 Factory* f = isolate()->factory(); | 612 Factory* f = isolate()->factory(); |
603 Handle<Object> number = f->NewNumber(OpParameter<int32_t>(node)); | 613 Handle<Object> number = f->NewNumber(OpParameter<int32_t>(node)); |
604 return Bounds(Type::Intersect( | 614 return Bounds(Type::Intersect( |
605 Type::Range(number, number, zone()), Type::UntaggedSigned32(), zone())); | 615 Type::Range(number, number, zone()), Type::UntaggedSigned32(), zone())); |
606 } | 616 } |
607 | 617 |
608 | 618 |
609 Bounds Typer::Visitor::TypeInt64Constant(Node* node) { | 619 Bounds Typer::Visitor::TypeInt64Constant(Node* node) { |
610 // TODO(rossberg): This actually seems to be a PointerConstant so far... | 620 // TODO(rossberg): This actually seems to be a PointerConstant so far... |
(...skipping 1500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2111 TYPED_ARRAYS(TYPED_ARRAY_CASE) | 2121 TYPED_ARRAYS(TYPED_ARRAY_CASE) |
2112 #undef TYPED_ARRAY_CASE | 2122 #undef TYPED_ARRAY_CASE |
2113 } | 2123 } |
2114 } | 2124 } |
2115 return Type::Constant(value, zone()); | 2125 return Type::Constant(value, zone()); |
2116 } | 2126 } |
2117 | 2127 |
2118 } // namespace compiler | 2128 } // namespace compiler |
2119 } // namespace internal | 2129 } // namespace internal |
2120 } // namespace v8 | 2130 } // namespace v8 |
OLD | NEW |