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

Unified Diff: src/compiler/typer.cc

Issue 1701673002: [turbofan] Assign better types to various String builtins. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 months 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 | « no previous file | src/objects.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 ae79a73b4622e705d978c3a77be9cad1b522a684..973deb86603e1d39972944b7d33acf8b6cb218a8 100644
--- a/src/compiler/typer.cc
+++ b/src/compiler/typer.cc
@@ -1529,8 +1529,14 @@ Type* Typer::Visitor::JSCallFunctionTyper(Type* fun, Typer* t) {
case kMathClz32:
return t->cache_.kZeroToThirtyTwo;
// String functions.
+ case kStringCharCodeAt:
+ return Type::Union(Type::Range(0, kMaxUInt16, t->zone()), Type::NaN(),
+ t->zone());
case kStringCharAt:
+ case kStringConcat:
case kStringFromCharCode:
+ case kStringToLowerCase:
+ case kStringToUpperCase:
return Type::String();
// Array functions.
case kArrayIndexOf:
@@ -1580,6 +1586,7 @@ Type* Typer::Visitor::TypeJSCallRuntime(Node* node) {
case Runtime::kInlineRegExpConstructResult:
return Type::OtherObject();
case Runtime::kInlineSubString:
+ case Runtime::kInlineStringCharFromCode:
return Type::String();
case Runtime::kInlineToInteger:
return TypeUnaryOp(node, ToInteger);
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698