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

Unified Diff: src/compiler/typer.cc

Issue 2531463002: [turbofan] Assign appropriate types to RegExp builtins. (Closed)
Patch Set: 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 | « 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 99c8fa887267fdf0358191a23aa197158d81aad6..00eafe0d4809896e6cbff200a33cf841d63a7558 100644
--- a/src/compiler/typer.cc
+++ b/src/compiler/typer.cc
@@ -1415,6 +1415,16 @@ Type* Typer::Visitor::JSCallFunctionTyper(Type* fun, Typer* t) {
case kObjectHasOwnProperty:
return Type::Boolean();
+ // RegExp functions.
+ case kRegExpCompile:
+ return Type::OtherObject();
+ case kRegExpExec:
+ return Type::Union(Type::OtherObject(), Type::Null(), t->zone());
+ case kRegExpTest:
+ return Type::Boolean();
+ case kRegExpToString:
+ return Type::String();
+
// Function functions.
case kFunctionHasInstance:
return Type::Boolean();
« 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