Index: src/compiler/typer.cc |
diff --git a/src/compiler/typer.cc b/src/compiler/typer.cc |
index ac455235d82abc00516fa19a6fcf73b9c17532b4..c2aa1879ddf9e4efe9acf7153f17f14c3536bf8b 100644 |
--- a/src/compiler/typer.cc |
+++ b/src/compiler/typer.cc |
@@ -1369,6 +1369,7 @@ Type* Typer::Visitor::JSCallFunctionTyper(Type* fun, Typer* t) { |
return t->cache_.kJSDateSecondType; |
case kDateGetTime: |
return t->cache_.kJSDateValueType; |
+ |
// Number functions. |
case kNumberIsFinite: |
case kNumberIsInteger: |
@@ -1381,16 +1382,41 @@ Type* Typer::Visitor::JSCallFunctionTyper(Type* fun, Typer* t) { |
return t->cache_.kIntegerOrMinusZeroOrNaN; |
case kNumberToString: |
return Type::String(); |
+ |
// String functions. |
case kStringCharCodeAt: |
return Type::Union(Type::Range(0, kMaxUInt16, t->zone()), Type::NaN(), |
t->zone()); |
case kStringCharAt: |
+ return Type::String(); |
+ case kStringCodePointAt: |
+ return Type::Union(Type::Range(0.0, String::kMaxCodePoint, t->zone()), |
+ Type::Undefined(), t->zone()); |
case kStringConcat: |
case kStringFromCharCode: |
+ case kStringFromCodePoint: |
+ return Type::String(); |
+ case kStringIndexOf: |
+ case kStringLastIndexOf: |
+ return Type::Range(-1.0, String::kMaxLength - 1.0, t->zone()); |
+ case kStringEndsWith: |
+ case kStringIncludes: |
+ return Type::Boolean(); |
+ case kStringRaw: |
+ case kStringRepeat: |
+ case kStringSlice: |
+ return Type::String(); |
+ case kStringStartsWith: |
+ return Type::Boolean(); |
case kStringSubstr: |
+ case kStringSubstring: |
case kStringToLowerCase: |
+ case kStringToString: |
case kStringToUpperCase: |
+ case kStringTrim: |
+ case kStringTrimLeft: |
+ case kStringTrimRight: |
+ case kStringValueOf: |
return Type::String(); |
case kStringIterator: |