Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: src/compiler/typer.cc

Issue 2494753003: [turbofan] Introduce an ExternalPointer type. (Closed)
Patch Set: Stronger ducktape. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/simplified-lowering.cc ('k') | src/compiler/types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/typer.cc
diff --git a/src/compiler/typer.cc b/src/compiler/typer.cc
index a9a51ff8d397a0a2d4e7cae9f96147df98834db0..8695fad166630c7c962f77e01931cc4ac4ea1e0a 100644
--- a/src/compiler/typer.cc
+++ b/src/compiler/typer.cc
@@ -598,15 +598,13 @@ Type* Typer::Visitor::TypeRetain(Node* node) {
}
Type* Typer::Visitor::TypeInt32Constant(Node* node) {
- double number = OpParameter<int32_t>(node);
- return Type::Intersect(Type::Range(number, number, zone()),
- Type::Integral32(), zone());
+ UNREACHABLE();
+ return nullptr;
}
-
Type* Typer::Visitor::TypeInt64Constant(Node* node) {
- // TODO(rossberg): This actually seems to be a PointerConstant so far...
- return Type::Internal(); // TODO(rossberg): Add int64 bitset type?
+ UNREACHABLE();
+ return nullptr;
}
Type* Typer::Visitor::TypeRelocatableInt32Constant(Node* node) {
@@ -624,13 +622,11 @@ Type* Typer::Visitor::TypeFloat32Constant(Node* node) {
return nullptr;
}
-
Type* Typer::Visitor::TypeFloat64Constant(Node* node) {
UNREACHABLE();
return nullptr;
}
-
Type* Typer::Visitor::TypeNumberConstant(Node* node) {
double number = OpParameter<double>(node);
return Type::NewConstant(number, zone());
@@ -640,11 +636,13 @@ Type* Typer::Visitor::TypeHeapConstant(Node* node) {
return TypeConstant(OpParameter<Handle<HeapObject>>(node));
}
-
Type* Typer::Visitor::TypeExternalConstant(Node* node) {
- return Type::Internal();
+ return Type::ExternalPointer();
}
+Type* Typer::Visitor::TypePointerConstant(Node* node) {
+ return Type::ExternalPointer();
+}
Type* Typer::Visitor::TypeSelect(Node* node) {
return Type::Union(Operand(node, 1), Operand(node, 2), zone());
« no previous file with comments | « src/compiler/simplified-lowering.cc ('k') | src/compiler/types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698