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

Side by Side Diff: runtime/vm/intermediate_language_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/dart_api_message.cc ('k') | runtime/vm/intermediate_language_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 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1181 Register result = locs()->out().reg(); 1181 Register result = locs()->out().reg();
1182 const Address& element_address = index.IsRegister() 1182 const Address& element_address = index.IsRegister()
1183 ? FlowGraphCompiler::ExternalElementAddressForRegIndex( 1183 ? FlowGraphCompiler::ExternalElementAddressForRegIndex(
1184 class_id(), result, index.reg()) 1184 class_id(), result, index.reg())
1185 : FlowGraphCompiler::ExternalElementAddressForIntIndex( 1185 : FlowGraphCompiler::ExternalElementAddressForIntIndex(
1186 class_id(), result, Smi::Cast(index.constant()).Value()); 1186 class_id(), result, Smi::Cast(index.constant()).Value());
1187 if (index.IsRegister()) { 1187 if (index.IsRegister()) {
1188 __ SmiUntag(index.reg()); 1188 __ SmiUntag(index.reg());
1189 } 1189 }
1190 __ movl(result, 1190 __ movl(result,
1191 FieldAddress(array, ExternalUint8Array::external_data_offset())); 1191 FieldAddress(array, ExternalUint8Array::data_offset()));
1192 __ movl(result,
1193 Address(result, ExternalByteArrayData<uint8_t>::data_offset()));
1194 __ movzxb(result, element_address); 1192 __ movzxb(result, element_address);
1195 __ SmiTag(result); 1193 __ SmiTag(result);
1196 if (index.IsRegister()) { 1194 if (index.IsRegister()) {
1197 __ SmiTag(index.reg()); // Re-tag. 1195 __ SmiTag(index.reg()); // Re-tag.
1198 } 1196 }
1199 return; 1197 return;
1200 } 1198 }
1201 1199
1202 FieldAddress element_address = index.IsRegister() 1200 FieldAddress element_address = index.IsRegister()
1203 ? FlowGraphCompiler::ElementAddressForRegIndex( 1201 ? FlowGraphCompiler::ElementAddressForRegIndex(
(...skipping 2164 matching lines...) Expand 10 before | Expand all | Expand 10 after
3368 PcDescriptors::kOther, 3366 PcDescriptors::kOther,
3369 locs()); 3367 locs());
3370 __ Drop(2); // Discard type arguments and receiver. 3368 __ Drop(2); // Discard type arguments and receiver.
3371 } 3369 }
3372 3370
3373 } // namespace dart 3371 } // namespace dart
3374 3372
3375 #undef __ 3373 #undef __
3376 3374
3377 #endif // defined TARGET_ARCH_IA32 3375 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/dart_api_message.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698