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

Side by Side Diff: runtime/vm/flow_graph_compiler_ia32.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
« no previous file with comments | « runtime/vm/flow_graph_compiler_ia32.h ('k') | runtime/vm/flow_graph_compiler_x64.h » ('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) 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/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after
1035 1035
1036 void FlowGraphCompiler::GenerateCallRuntime(intptr_t token_pos, 1036 void FlowGraphCompiler::GenerateCallRuntime(intptr_t token_pos,
1037 const RuntimeEntry& entry, 1037 const RuntimeEntry& entry,
1038 LocationSummary* locs) { 1038 LocationSummary* locs) {
1039 __ CallRuntime(entry); 1039 __ CallRuntime(entry);
1040 AddCurrentDescriptor(PcDescriptors::kOther, Isolate::kNoDeoptId, token_pos); 1040 AddCurrentDescriptor(PcDescriptors::kOther, Isolate::kNoDeoptId, token_pos);
1041 RecordSafepoint(locs); 1041 RecordSafepoint(locs);
1042 } 1042 }
1043 1043
1044 1044
1045 void FlowGraphCompiler::EmitOptimizedInstanceCall(
1046 ExternalLabel* target_label,
1047 const ICData& ic_data,
1048 const Array& arguments_descriptor,
1049 intptr_t argument_count,
1050 intptr_t deopt_id,
1051 intptr_t token_pos,
1052 LocationSummary* locs) {
1053 // Each ICData propagated from unoptimized to optimized code contains the
1054 // function that corresponds to the Dart function of that IC call. Due
1055 // to inlining in optimized code, that function may not correspond to the
1056 // top-level function (parsed_function().function()) which could be
1057 // reoptimized and which counter needs to be incremented.
1058 // Pass the function explicitly.
1059 __ LoadObject(EDI, parsed_function().function());
1060 __ LoadObject(ECX, ic_data);
1061 __ LoadObject(EDX, arguments_descriptor);
1062 GenerateDartCall(deopt_id,
1063 token_pos,
1064 target_label,
1065 PcDescriptors::kIcCall,
1066 locs);
1067 __ Drop(argument_count);
1068 }
1069
1070
1045 void FlowGraphCompiler::EmitInstanceCall(ExternalLabel* target_label, 1071 void FlowGraphCompiler::EmitInstanceCall(ExternalLabel* target_label,
1046 const ICData& ic_data, 1072 const ICData& ic_data,
1047 const Array& arguments_descriptor, 1073 const Array& arguments_descriptor,
1048 intptr_t argument_count, 1074 intptr_t argument_count,
1049 intptr_t deopt_id, 1075 intptr_t deopt_id,
1050 intptr_t token_pos, 1076 intptr_t token_pos,
1051 LocationSummary* locs) { 1077 LocationSummary* locs) {
1052 __ LoadObject(ECX, ic_data); 1078 __ LoadObject(ECX, ic_data);
1053 __ LoadObject(EDX, arguments_descriptor); 1079 __ LoadObject(EDX, arguments_descriptor);
1054 GenerateDartCall(deopt_id, 1080 GenerateDartCall(deopt_id,
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
1359 __ popl(ECX); 1385 __ popl(ECX);
1360 __ popl(EAX); 1386 __ popl(EAX);
1361 } 1387 }
1362 1388
1363 1389
1364 #undef __ 1390 #undef __
1365 1391
1366 } // namespace dart 1392 } // namespace dart
1367 1393
1368 #endif // defined TARGET_ARCH_IA32 1394 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_ia32.h ('k') | runtime/vm/flow_graph_compiler_x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698