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

Issue 7357003: simplification to HClampToUint8 (Closed)

Created:
9 years, 5 months ago by wingo
Modified:
9 years, 5 months ago
CC:
v8-dev
Visibility:
Public.

Description

simplification to HClampToUint8 * src/hydrogen-instructions.h (HClampToUint8): Don't mark as having flexible representation; instead the output is always an Integer32. There is no input representation restriction, so we can still perform input-specific truncation. I tested by looking at the --print-code of var a = PixelArray(1000000) function fill(a,x) { for (var i=0; i<a.len; i++) a[i] = x; } Seems to optimize fine both for double and integer inputs. But perhaps there is a better test, for which the original code does better, and this is a bogus patch. Committed: http://code.google.com/p/v8/source/detail?r=8650

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -24 lines) Patch
M src/hydrogen-instructions.h View 1 chunk +3 lines, -24 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
wingo
I'm not sure about this one, but the old code wasn't clear either and had ...
9 years, 5 months ago (2011-07-13 17:19:31 UTC) #1
danno
LGTM. This is the right approach. It is in fact what HToInt32 does, which serves ...
9 years, 5 months ago (2011-07-14 08:46:36 UTC) #2
wingo
Thanks for the review. It need a commiter to land, at your leisure.
9 years, 5 months ago (2011-07-14 15:55:59 UTC) #3
wingo
9 years, 5 months ago (2011-07-14 16:10:14 UTC) #4
I see now that you had already landed it; thanks!  Apologies for the noise.

Powered by Google App Engine
This is Rietveld 408576698