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

Unified Diff: runtime/vm/intrinsifier_x64.cc

Issue 11794038: Bug fix and improvements to clamped arrays. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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
« no previous file with comments | « runtime/vm/intrinsifier_ia32.cc ('k') | tests/standalone/byte_array_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intrinsifier_x64.cc
===================================================================
--- runtime/vm/intrinsifier_x64.cc (revision 16756)
+++ runtime/vm/intrinsifier_x64.cc (working copy)
@@ -520,7 +520,17 @@
bool Intrinsifier::UintClamped8Array_getIndexed(Assembler* assembler) {
- return Uint8Array_setIndexed(assembler);
+ Label fall_through;
+ TestByteArrayIndex(assembler, &fall_through);
+ __ SmiUntag(R12);
+ __ movzxb(RAX, FieldAddress(RAX,
+ R12,
+ TIMES_1,
+ Uint8ClampedArray::data_offset()));
+ __ SmiTag(RAX);
+ __ ret();
+ __ Bind(&fall_through);
+ return false;
}
@@ -547,7 +557,8 @@
__ movq(RDI, Immediate(0xFF));
__ Bind(&store_value);
- __ movb(FieldAddress(RAX, R12, TIMES_1, Uint8Array::data_offset()), RDI);
+ __ movb(
+ FieldAddress(RAX, R12, TIMES_1, Uint8ClampedArray::data_offset()), RDI);
__ ret();
__ Bind(&fall_through);
return false;
« no previous file with comments | « runtime/vm/intrinsifier_ia32.cc ('k') | tests/standalone/byte_array_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698