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

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

Issue 10538064: Implement inlined LoadIndexed operation for arrays on x64. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 __ movl(ECX, Immediate(reinterpret_cast<uword>(native_c_function()))); 259 __ movl(ECX, Immediate(reinterpret_cast<uword>(native_c_function())));
260 __ movl(EDX, Immediate(argument_count())); 260 __ movl(EDX, Immediate(argument_count()));
261 compiler->GenerateCall(token_index(), 261 compiler->GenerateCall(token_index(),
262 try_index(), 262 try_index(),
263 &StubCode::CallNativeCFunctionLabel(), 263 &StubCode::CallNativeCFunctionLabel(),
264 PcDescriptors::kOther); 264 PcDescriptors::kOther);
265 __ popl(result); 265 __ popl(result);
266 } 266 }
267 267
268 268
269 LocationSummary* LoadIndexedComp::MakeLocationSummary() const {
270 return MakeCallSummary();
271 }
272
273
274 void LoadIndexedComp::EmitNativeCode(FlowGraphCompiler* compiler) {
275 const String& function_name =
276 String::ZoneHandle(String::NewSymbol(Token::Str(Token::kINDEX)));
277
278 const intptr_t kNumArguments = 2;
279 const intptr_t kNumArgsChecked = 1; // Type-feedback.
280 compiler->GenerateInstanceCall(cid(),
281 token_index(),
282 try_index(),
283 function_name,
284 kNumArguments,
285 Array::ZoneHandle(), // No optional arguments.
286 kNumArgsChecked);
287 }
288
289
269 LocationSummary* StoreIndexedComp::MakeLocationSummary() const { 290 LocationSummary* StoreIndexedComp::MakeLocationSummary() const {
270 const intptr_t kNumInputs = 3; 291 const intptr_t kNumInputs = 3;
271 return LocationSummary::Make(kNumInputs, Location::NoLocation()); 292 return LocationSummary::Make(kNumInputs, Location::NoLocation());
272 } 293 }
273 294
274 295
275 void StoreIndexedComp::EmitNativeCode(FlowGraphCompiler* compiler) { 296 void StoreIndexedComp::EmitNativeCode(FlowGraphCompiler* compiler) {
276 Register receiver = locs()->in(0).reg(); 297 Register receiver = locs()->in(0).reg();
277 Register index = locs()->in(1).reg(); 298 Register index = locs()->in(1).reg();
278 Register value = locs()->in(2).reg(); 299 Register value = locs()->in(2).reg();
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 UNREACHABLE(); 907 UNREACHABLE();
887 } 908 }
888 } 909 }
889 910
890 911
891 } // namespace dart 912 } // namespace dart
892 913
893 #undef __ 914 #undef __
894 915
895 #endif // defined TARGET_ARCH_X64 916 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698