Index: src/compiler/operation-typer.cc |
diff --git a/src/compiler/operation-typer.cc b/src/compiler/operation-typer.cc |
index 0cdb6d1031f0cefad000682a7479dd69b40bfbc1..9198f4b9a9132ca870f43f2be92fdd42c3b26cfc 100644 |
--- a/src/compiler/operation-typer.cc |
+++ b/src/compiler/operation-typer.cc |
@@ -490,6 +490,13 @@ Type* OperationTyper::NumberToUint32(Type* type) { |
return Type::Unsigned32(); |
} |
+Type* OperationTyper::NumberToUint8Clamped(Type* type) { |
+ DCHECK(type->Is(Type::Number())); |
+ |
+ if (type->Is(cache_.kUint8)) return type; |
+ return cache_.kUint8; |
+} |
+ |
Type* OperationTyper::NumberSilenceNaN(Type* type) { |
DCHECK(type->Is(Type::Number())); |
// TODO(jarin): This is a terrible hack; we definitely need a dedicated type |