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 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 return Type::Intersect(Type::Range(number, number, zone()), | 577 return Type::Intersect(Type::Range(number, number, zone()), |
578 Type::UntaggedIntegral32(), zone()); | 578 Type::UntaggedIntegral32(), zone()); |
579 } | 579 } |
580 | 580 |
581 | 581 |
582 Type* Typer::Visitor::TypeInt64Constant(Node* node) { | 582 Type* Typer::Visitor::TypeInt64Constant(Node* node) { |
583 // TODO(rossberg): This actually seems to be a PointerConstant so far... | 583 // TODO(rossberg): This actually seems to be a PointerConstant so far... |
584 return Type::Internal(); // TODO(rossberg): Add int64 bitset type? | 584 return Type::Internal(); // TODO(rossberg): Add int64 bitset type? |
585 } | 585 } |
586 | 586 |
| 587 // TODO(gdeepti) : Fix this to do something meaningful. |
| 588 Type* Typer::Visitor::TypeRelocatableInt32Constant(Node* node) { |
| 589 return Type::Internal(); |
| 590 } |
| 591 |
| 592 Type* Typer::Visitor::TypeRelocatableInt64Constant(Node* node) { |
| 593 return Type::Internal(); |
| 594 } |
587 | 595 |
588 Type* Typer::Visitor::TypeFloat32Constant(Node* node) { | 596 Type* Typer::Visitor::TypeFloat32Constant(Node* node) { |
589 return Type::Intersect(Type::Of(OpParameter<float>(node), zone()), | 597 return Type::Intersect(Type::Of(OpParameter<float>(node), zone()), |
590 Type::UntaggedFloat32(), zone()); | 598 Type::UntaggedFloat32(), zone()); |
591 } | 599 } |
592 | 600 |
593 | 601 |
594 Type* Typer::Visitor::TypeFloat64Constant(Node* node) { | 602 Type* Typer::Visitor::TypeFloat64Constant(Node* node) { |
595 return Type::Intersect(Type::Of(OpParameter<double>(node), zone()), | 603 return Type::Intersect(Type::Of(OpParameter<double>(node), zone()), |
596 Type::UntaggedFloat64(), zone()); | 604 Type::UntaggedFloat64(), zone()); |
(...skipping 1869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2466 } | 2474 } |
2467 if (Type::IsInteger(*value)) { | 2475 if (Type::IsInteger(*value)) { |
2468 return Type::Range(value->Number(), value->Number(), zone()); | 2476 return Type::Range(value->Number(), value->Number(), zone()); |
2469 } | 2477 } |
2470 return Type::Constant(value, zone()); | 2478 return Type::Constant(value, zone()); |
2471 } | 2479 } |
2472 | 2480 |
2473 } // namespace compiler | 2481 } // namespace compiler |
2474 } // namespace internal | 2482 } // namespace internal |
2475 } // namespace v8 | 2483 } // namespace v8 |
OLD | NEW |