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

Unified Diff: src/compiler/typer.cc

Issue 2647833004: [turbofan] Properly implement %_ClassOf intrinsic. (Closed)
Patch Set: Created 3 years, 11 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 | « src/compiler/opcodes.h ('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 b2994a2721a42aa127381eee9ae7a72fb4ab1030..357e5fef4b728fe0ab88598ba3dc740d9e28113d 100644
--- a/src/compiler/typer.cc
+++ b/src/compiler/typer.cc
@@ -1052,6 +1052,9 @@ Type* Typer::Visitor::JSModulusTyper(Type* lhs, Type* rhs, Typer* t) {
// JS unary operators.
+Type* Typer::Visitor::TypeJSClassOf(Node* node) {
+ return Type::InternalizedStringOrNull();
+}
Type* Typer::Visitor::TypeJSTypeOf(Node* node) {
return Type::InternalizedString();
@@ -1561,9 +1564,8 @@ Type* Typer::Visitor::TypeJSCallRuntime(Node* node) {
return TypeUnaryOp(node, ToObject);
case Runtime::kInlineToString:
return TypeUnaryOp(node, ToString);
- case Runtime::kClassOf:
case Runtime::kInlineClassOf:
- return Type::Union(Type::InternalizedString(), Type::Null(), zone());
+ return Type::InternalizedStringOrNull();
case Runtime::kHasInPrototypeChain:
return Type::Boolean();
default:
« no previous file with comments | « src/compiler/opcodes.h ('k') | src/compiler/types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698