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

Side by Side Diff: runtime/vm/intrinsifier_ia32.cc

Issue 12093071: - Change the layout of external typed array objects to avoid the extra indirection when accessing e… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | runtime/vm/intrinsifier_x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // The intrinsic code below is executed before a method has built its frame. 5 // The intrinsic code below is executed before a method has built its frame.
6 // The return address is on the stack and the arguments below it. 6 // The return address is on the stack and the arguments below it.
7 // Registers EDX (arguments descriptor) and ECX (function) must be preserved. 7 // Registers EDX (arguments descriptor) and ECX (function) must be preserved.
8 // Each intrinsification method returns true if the corresponding 8 // Each intrinsification method returns true if the corresponding
9 // Dart method was intrinsified. 9 // Dart method was intrinsified.
10 10
(...skipping 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 return false; 971 return false;
972 } 972 }
973 973
974 974
975 bool Intrinsifier::ExternalUint8Array_getIndexed(Assembler* assembler) { 975 bool Intrinsifier::ExternalUint8Array_getIndexed(Assembler* assembler) {
976 Label fall_through; 976 Label fall_through;
977 TestByteArrayGetIndex(assembler, &fall_through); 977 TestByteArrayGetIndex(assembler, &fall_through);
978 // EBX: index as Smi. 978 // EBX: index as Smi.
979 // EAX: array. 979 // EAX: array.
980 __ SmiUntag(EBX); 980 __ SmiUntag(EBX);
981 __ movl(EAX, FieldAddress(EAX, ExternalUint8Array::external_data_offset())); 981 __ movl(EAX, FieldAddress(EAX, ExternalUint8Array::data_offset()));
982 __ movl(EAX, Address(EAX, ExternalByteArrayData<uint8_t>::data_offset()));
983 __ movzxb(EAX, Address(EAX, EBX, TIMES_1, 0)); 982 __ movzxb(EAX, Address(EAX, EBX, TIMES_1, 0));
984 __ SmiTag(EAX); 983 __ SmiTag(EAX);
985 __ ret(); 984 __ ret();
986 __ Bind(&fall_through); 985 __ Bind(&fall_through);
987 return false; 986 return false;
988 } 987 }
989 988
990 989
991 // Tests if two top most arguments are smis, jumps to label not_smi if not. 990 // Tests if two top most arguments are smis, jumps to label not_smi if not.
992 // Topmost argument is in EAX. 991 // Topmost argument is in EAX.
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after
1826 __ Bind(&is_true); 1825 __ Bind(&is_true);
1827 __ LoadObject(EAX, Bool::True()); 1826 __ LoadObject(EAX, Bool::True());
1828 __ ret(); 1827 __ ret();
1829 return true; 1828 return true;
1830 } 1829 }
1831 1830
1832 #undef __ 1831 #undef __
1833 } // namespace dart 1832 } // namespace dart
1834 1833
1835 #endif // defined TARGET_ARCH_IA32 1834 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | runtime/vm/intrinsifier_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698