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

Unified Diff: runtime/vm/intrinsifier_x64.cc

Issue 11280121: Intrinsify ExternalUint8Array.[]. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Consistently use OFFSET_OF Created 8 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 | « runtime/vm/intrinsifier_ia32.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intrinsifier_x64.cc
diff --git a/runtime/vm/intrinsifier_x64.cc b/runtime/vm/intrinsifier_x64.cc
index 5f3f96d8e5b114a0b0cf5ff58e4b5a6e36ffdc75..e5dd2b404a8b3a05d09cea8633227cf100ecabae 100644
--- a/runtime/vm/intrinsifier_x64.cc
+++ b/runtime/vm/intrinsifier_x64.cc
@@ -700,6 +700,20 @@ bool Intrinsifier::Float64Array_setIndexed(Assembler* assembler) {
}
+bool Intrinsifier::ExternalUint8Array_getIndexed(Assembler* assembler) {
+ Label fall_through;
+ TestByteArrayIndex(assembler, &fall_through);
+ __ SmiUntag(R12);
+ __ movq(RAX, FieldAddress(RAX, ExternalUint8Array::external_data_offset()));
+ __ movq(RAX, Address(RAX, ExternalByteArrayData<uint8_t>::data_offset()));
+ __ movzxb(RAX, Address(RAX, R12, TIMES_1, 0));
+ __ SmiTag(RAX);
+ __ ret();
+ __ Bind(&fall_through);
+ return false;
+}
+
+
// Tests if two top most arguments are smis, jumps to label not_smi if not.
// Topmost argument is in RAX.
static void TestBothArgumentsSmis(Assembler* assembler, Label* not_smi) {
« no previous file with comments | « runtime/vm/intrinsifier_ia32.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698