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

Unified Diff: src/compiler/typer.cc

Issue 2488183002: [turbofan] Address a couple of Type-related TODOs. (Closed)
Patch Set: Now with green bots. 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/type-cache.h ('k') | no next file » | 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 7c2565cc42ee493fa03b185d675b2e8b92191694..faeae6bd77f56e17475ca807ac28e2c1be1778e1 100644
--- a/src/compiler/typer.cc
+++ b/src/compiler/typer.cc
@@ -1473,7 +1473,7 @@ Type* Typer::Visitor::TypeJSForInNext(Node* node) {
Type* Typer::Visitor::TypeJSForInPrepare(Node* node) {
STATIC_ASSERT(Map::EnumLengthBits::kMax <= FixedArray::kMaxLength);
Type* const cache_type =
- Type::Union(typer_->cache_.kSmi, Type::OtherInternal(), zone());
+ Type::Union(Type::SignedSmall(), Type::OtherInternal(), zone());
Type* const cache_array = Type::OtherInternal();
Type* const cache_length = typer_->cache_.kFixedArrayLengthType;
return Type::Tuple(cache_type, cache_array, cache_length, zone());
@@ -1494,7 +1494,7 @@ Type* Typer::Visitor::TypeJSGeneratorStore(Node* node) {
}
Type* Typer::Visitor::TypeJSGeneratorRestoreContinuation(Node* node) {
- return typer_->cache_.kSmi;
+ return Type::SignedSmall();
}
Type* Typer::Visitor::TypeJSGeneratorRestoreRegister(Node* node) {
@@ -1569,8 +1569,7 @@ Type* Typer::Visitor::StringFromCodePointTyper(Type* type, Typer* t) {
}
Type* Typer::Visitor::TypeStringCharCodeAt(Node* node) {
- // TODO(bmeurer): We could do better here based on inputs.
- return Type::Range(0, kMaxUInt16, zone());
+ return typer_->cache_.kUint16;
}
Type* Typer::Visitor::TypeStringFromCharCode(Node* node) {
@@ -1650,8 +1649,6 @@ Type* Typer::Visitor::TypeLoadField(Node* node) {
}
Type* Typer::Visitor::TypeLoadBuffer(Node* node) {
- // TODO(bmeurer): This typing is not yet correct. Since we can still access
- // out of bounds, the type in the general case has to include Undefined.
switch (BufferAccessOf(node->op()).external_array_type()) {
#define TYPED_ARRAY_CASE(ElemType, type, TYPE, ctype, size) \
case kExternal##ElemType##Array: \
« no previous file with comments | « src/compiler/type-cache.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698