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

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

Issue 11361225: In optimized code use IC calls for instance calls that have no IC data instead of deoptimizing. The… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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 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_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 1039
1040 void FlowGraphCompiler::GenerateCallRuntime(intptr_t token_pos, 1040 void FlowGraphCompiler::GenerateCallRuntime(intptr_t token_pos,
1041 const RuntimeEntry& entry, 1041 const RuntimeEntry& entry,
1042 LocationSummary* locs) { 1042 LocationSummary* locs) {
1043 __ CallRuntime(entry); 1043 __ CallRuntime(entry);
1044 AddCurrentDescriptor(PcDescriptors::kOther, Isolate::kNoDeoptId, token_pos); 1044 AddCurrentDescriptor(PcDescriptors::kOther, Isolate::kNoDeoptId, token_pos);
1045 RecordSafepoint(locs); 1045 RecordSafepoint(locs);
1046 } 1046 }
1047 1047
1048 1048
1049 void FlowGraphCompiler::EmitOptimizedInstanceCall(
1050 ExternalLabel* target_label,
1051 const ICData& ic_data,
1052 const Array& arguments_descriptor,
1053 intptr_t argument_count,
1054 intptr_t deopt_id,
1055 intptr_t token_pos,
1056 LocationSummary* locs) {
1057 // Load top function since it may not correspond to the ICData function.
1058 __ LoadObject(RDI, parsed_function().function());
1059 __ LoadObject(RBX, ic_data);
1060 __ LoadObject(R10, arguments_descriptor);
1061 GenerateDartCall(deopt_id,
1062 token_pos,
1063 target_label,
1064 PcDescriptors::kIcCall,
1065 locs);
1066 __ Drop(argument_count);
1067 }
1068
1069
1049 void FlowGraphCompiler::EmitInstanceCall(ExternalLabel* target_label, 1070 void FlowGraphCompiler::EmitInstanceCall(ExternalLabel* target_label,
1050 const ICData& ic_data, 1071 const ICData& ic_data,
1051 const Array& arguments_descriptor, 1072 const Array& arguments_descriptor,
1052 intptr_t argument_count, 1073 intptr_t argument_count,
1053 intptr_t deopt_id, 1074 intptr_t deopt_id,
1054 intptr_t token_pos, 1075 intptr_t token_pos,
1055 LocationSummary* locs) { 1076 LocationSummary* locs) {
1056 __ LoadObject(RBX, ic_data); 1077 __ LoadObject(RBX, ic_data);
1057 __ LoadObject(R10, arguments_descriptor); 1078 __ LoadObject(R10, arguments_descriptor);
1058 GenerateDartCall(deopt_id, 1079 GenerateDartCall(deopt_id,
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
1337 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { 1358 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) {
1338 __ Exchange(mem1, mem2); 1359 __ Exchange(mem1, mem2);
1339 } 1360 }
1340 1361
1341 1362
1342 #undef __ 1363 #undef __
1343 1364
1344 } // namespace dart 1365 } // namespace dart
1345 1366
1346 #endif // defined TARGET_ARCH_X64 1367 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698