| OLD | NEW |
| 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/flow_graph_compiler.h" | 8 #include "vm/flow_graph_compiler.h" |
| 9 | 9 |
| 10 #include "vm/ast_printer.h" | 10 #include "vm/ast_printer.h" |
| (...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1163 const StubEntry& stub_entry, | 1163 const StubEntry& stub_entry, |
| 1164 RawPcDescriptors::Kind kind, | 1164 RawPcDescriptors::Kind kind, |
| 1165 LocationSummary* locs) { | 1165 LocationSummary* locs) { |
| 1166 __ Call(stub_entry); | 1166 __ Call(stub_entry); |
| 1167 AddCurrentDescriptor(kind, deopt_id, token_pos); | 1167 AddCurrentDescriptor(kind, deopt_id, token_pos); |
| 1168 RecordSafepoint(locs); | 1168 RecordSafepoint(locs); |
| 1169 // Marks either the continuation point in unoptimized code or the | 1169 // Marks either the continuation point in unoptimized code or the |
| 1170 // deoptimization point in optimized code, after call. | 1170 // deoptimization point in optimized code, after call. |
| 1171 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id); | 1171 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id); |
| 1172 if (is_optimizing()) { | 1172 if (is_optimizing()) { |
| 1173 AddDeoptIndexAtCall(deopt_id_after, token_pos); | 1173 AddDeoptIndexAtCall(deopt_id_after); |
| 1174 } else { | 1174 } else { |
| 1175 // Add deoptimization continuation point after the call and before the | 1175 // Add deoptimization continuation point after the call and before the |
| 1176 // arguments are removed. | 1176 // arguments are removed. |
| 1177 AddCurrentDescriptor(RawPcDescriptors::kDeopt, deopt_id_after, token_pos); | 1177 AddCurrentDescriptor(RawPcDescriptors::kDeopt, deopt_id_after, token_pos); |
| 1178 } | 1178 } |
| 1179 } | 1179 } |
| 1180 | 1180 |
| 1181 | 1181 |
| 1182 void FlowGraphCompiler::GenerateRuntimeCall(TokenPosition token_pos, | 1182 void FlowGraphCompiler::GenerateRuntimeCall(TokenPosition token_pos, |
| 1183 intptr_t deopt_id, | 1183 intptr_t deopt_id, |
| 1184 const RuntimeEntry& entry, | 1184 const RuntimeEntry& entry, |
| 1185 intptr_t argument_count, | 1185 intptr_t argument_count, |
| 1186 LocationSummary* locs) { | 1186 LocationSummary* locs) { |
| 1187 __ CallRuntime(entry, argument_count); | 1187 __ CallRuntime(entry, argument_count); |
| 1188 AddCurrentDescriptor(RawPcDescriptors::kOther, deopt_id, token_pos); | 1188 AddCurrentDescriptor(RawPcDescriptors::kOther, deopt_id, token_pos); |
| 1189 RecordSafepoint(locs); | 1189 RecordSafepoint(locs); |
| 1190 if (deopt_id != Thread::kNoDeoptId) { | 1190 if (deopt_id != Thread::kNoDeoptId) { |
| 1191 // Marks either the continuation point in unoptimized code or the | 1191 // Marks either the continuation point in unoptimized code or the |
| 1192 // deoptimization point in optimized code, after call. | 1192 // deoptimization point in optimized code, after call. |
| 1193 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id); | 1193 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id); |
| 1194 if (is_optimizing()) { | 1194 if (is_optimizing()) { |
| 1195 AddDeoptIndexAtCall(deopt_id_after, token_pos); | 1195 AddDeoptIndexAtCall(deopt_id_after); |
| 1196 } else { | 1196 } else { |
| 1197 // Add deoptimization continuation point after the call and before the | 1197 // Add deoptimization continuation point after the call and before the |
| 1198 // arguments are removed. | 1198 // arguments are removed. |
| 1199 AddCurrentDescriptor(RawPcDescriptors::kDeopt, deopt_id_after, token_pos); | 1199 AddCurrentDescriptor(RawPcDescriptors::kDeopt, deopt_id_after, token_pos); |
| 1200 } | 1200 } |
| 1201 } | 1201 } |
| 1202 } | 1202 } |
| 1203 | 1203 |
| 1204 | 1204 |
| 1205 void FlowGraphCompiler::EmitUnoptimizedStaticCall( | 1205 void FlowGraphCompiler::EmitUnoptimizedStaticCall( |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1315 __ call(EBX); | 1315 __ call(EBX); |
| 1316 | 1316 |
| 1317 __ Bind(&done); | 1317 __ Bind(&done); |
| 1318 AddCurrentDescriptor(RawPcDescriptors::kOther, | 1318 AddCurrentDescriptor(RawPcDescriptors::kOther, |
| 1319 Thread::kNoDeoptId, token_pos); | 1319 Thread::kNoDeoptId, token_pos); |
| 1320 RecordSafepoint(locs, slow_path_argument_count); | 1320 RecordSafepoint(locs, slow_path_argument_count); |
| 1321 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id); | 1321 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id); |
| 1322 // Precompilation not implemented on ia32 platform. | 1322 // Precompilation not implemented on ia32 platform. |
| 1323 ASSERT(!FLAG_precompiled_mode); | 1323 ASSERT(!FLAG_precompiled_mode); |
| 1324 if (is_optimizing()) { | 1324 if (is_optimizing()) { |
| 1325 AddDeoptIndexAtCall(deopt_id_after, token_pos); | 1325 AddDeoptIndexAtCall(deopt_id_after); |
| 1326 } else { | 1326 } else { |
| 1327 // Add deoptimization continuation point after the call and before the | 1327 // Add deoptimization continuation point after the call and before the |
| 1328 // arguments are removed. | 1328 // arguments are removed. |
| 1329 AddCurrentDescriptor(RawPcDescriptors::kDeopt, deopt_id_after, token_pos); | 1329 AddCurrentDescriptor(RawPcDescriptors::kDeopt, deopt_id_after, token_pos); |
| 1330 } | 1330 } |
| 1331 __ Drop(argument_count); | 1331 __ Drop(argument_count); |
| 1332 } | 1332 } |
| 1333 | 1333 |
| 1334 | 1334 |
| 1335 void FlowGraphCompiler::EmitSwitchableInstanceCall( | 1335 void FlowGraphCompiler::EmitSwitchableInstanceCall( |
| (...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1862 __ movups(reg, Address(ESP, 0)); | 1862 __ movups(reg, Address(ESP, 0)); |
| 1863 __ addl(ESP, Immediate(kFpuRegisterSize)); | 1863 __ addl(ESP, Immediate(kFpuRegisterSize)); |
| 1864 } | 1864 } |
| 1865 | 1865 |
| 1866 | 1866 |
| 1867 #undef __ | 1867 #undef __ |
| 1868 | 1868 |
| 1869 } // namespace dart | 1869 } // namespace dart |
| 1870 | 1870 |
| 1871 #endif // defined TARGET_ARCH_IA32 | 1871 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |