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

Unified Diff: src/ia32/stub-cache-ia32.cc

Issue 6881003: Prevent deopt when assigning double values to typed arrays (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixes to make ia32 tests run Created 9 years, 8 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/ia32/stub-cache-ia32.cc
diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc
index 27d28868f393eeb4878750b349d8c7d9941b592b..31bc58ddf5a914185781584ef3ebf48b110d335a 100644
--- a/src/ia32/stub-cache-ia32.cc
+++ b/src/ia32/stub-cache-ia32.cc
@@ -3546,14 +3546,7 @@ MaybeObject* ExternalArrayStubCompiler::CompileKeyedStoreStub(
// ecx: base pointer of external storage
switch (array_type) {
case kExternalPixelArray:
- { // Clamp the value to [0..255].
- NearLabel done;
- __ test(ecx, Immediate(0xFFFFFF00));
- __ j(zero, &done);
- __ setcc(negative, ecx); // 1 if negative, 0 if positive.
- __ dec_b(ecx); // 0 if negative, 255 if positive.
- __ bind(&done);
- }
+ __ ClampUInt8(ecx);
__ mov_b(Operand(edi, ebx, times_1, 0), ecx);
break;
case kExternalByteArray:
« src/hydrogen.cc ('K') | « src/ia32/macro-assembler-ia32.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698