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

Unified Diff: src/compiler/operation-typer.cc

Issue 2489563004: [turbofan] Add support for accessing Uint8ClampedArrays. (Closed)
Patch Set: Fix typing rule. 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 | « src/compiler/opcodes.h ('k') | src/compiler/simplified-lowering.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « src/compiler/opcodes.h ('k') | src/compiler/simplified-lowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698