Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 // Load top function since it may not correspond to the ICData function. | |
|
Kevin Millikin (Google)
2012/11/13 17:56:53
Expand this comment to include why it can be diffe
srdjan
2012/11/13 18:21:39
Done:
// Each ICData propagated from unoptimize
| |
| 1054 __ LoadObject(EDI, parsed_function().function()); | |
| 1055 __ LoadObject(ECX, ic_data); | |
| 1056 __ LoadObject(EDX, arguments_descriptor); | |
| 1057 GenerateDartCall(deopt_id, | |
| 1058 token_pos, | |
| 1059 target_label, | |
| 1060 PcDescriptors::kIcCall, | |
| 1061 locs); | |
| 1062 __ Drop(argument_count); | |
| 1063 } | |
| 1064 | |
| 1065 | |
| 1045 void FlowGraphCompiler::EmitInstanceCall(ExternalLabel* target_label, | 1066 void FlowGraphCompiler::EmitInstanceCall(ExternalLabel* target_label, |
| 1046 const ICData& ic_data, | 1067 const ICData& ic_data, |
| 1047 const Array& arguments_descriptor, | 1068 const Array& arguments_descriptor, |
| 1048 intptr_t argument_count, | 1069 intptr_t argument_count, |
| 1049 intptr_t deopt_id, | 1070 intptr_t deopt_id, |
| 1050 intptr_t token_pos, | 1071 intptr_t token_pos, |
| 1051 LocationSummary* locs) { | 1072 LocationSummary* locs) { |
| 1052 __ LoadObject(ECX, ic_data); | 1073 __ LoadObject(ECX, ic_data); |
| 1053 __ LoadObject(EDX, arguments_descriptor); | 1074 __ LoadObject(EDX, arguments_descriptor); |
| 1054 GenerateDartCall(deopt_id, | 1075 GenerateDartCall(deopt_id, |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1359 __ popl(ECX); | 1380 __ popl(ECX); |
| 1360 __ popl(EAX); | 1381 __ popl(EAX); |
| 1361 } | 1382 } |
| 1362 | 1383 |
| 1363 | 1384 |
| 1364 #undef __ | 1385 #undef __ |
| 1365 | 1386 |
| 1366 } // namespace dart | 1387 } // namespace dart |
| 1367 | 1388 |
| 1368 #endif // defined TARGET_ARCH_IA32 | 1389 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |