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

Unified Diff: src/hydrogen.cc

Issue 7014033: Support conversion of clamped double values for pixel arrays in Crankshaft. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: tweaks Created 9 years, 7 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
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index ddba47f9a5c39d630adaf60b7fef073556839d6c..84c487bfd9e85a70604e4a93048c91a8d1cff990 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -3722,6 +3722,11 @@ HInstruction* HGraphBuilder::BuildStoreKeyedSpecializedArrayElement(
HLoadExternalArrayPointer* external_elements =
new(zone()) HLoadExternalArrayPointer(elements);
AddInstruction(external_elements);
+ if (expr->external_array_type() == kExternalPixelArray) {
+ HClampToUint8* clamp = new(zone()) HClampToUint8(val);
+ AddInstruction(clamp);
+ val = clamp;
+ }
return new(zone()) HStoreKeyedSpecializedArrayElement(
external_elements,
key,

Powered by Google App Engine
This is Rietveld 408576698