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

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

Issue 572913002: Revert r40306 because of crash. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 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
« no previous file with comments | « runtime/vm/flow_graph_compiler_mips.cc ('k') | runtime/vm/intermediate_language.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) 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_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 "vm/ast_printer.h" 10 #include "vm/ast_printer.h"
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 __ Jmp(&stub_code->DeoptimizeLazyLabel(), PP); 1141 __ Jmp(&stub_code->DeoptimizeLazyLabel(), PP);
1142 } 1142 }
1143 } 1143 }
1144 1144
1145 1145
1146 void FlowGraphCompiler::GenerateCall(intptr_t token_pos, 1146 void FlowGraphCompiler::GenerateCall(intptr_t token_pos,
1147 const ExternalLabel* label, 1147 const ExternalLabel* label,
1148 RawPcDescriptors::Kind kind, 1148 RawPcDescriptors::Kind kind,
1149 LocationSummary* locs) { 1149 LocationSummary* locs) {
1150 __ Call(label, PP); 1150 __ Call(label, PP);
1151 RecordCallInfo(token_pos, kind, Isolate::kNoDeoptId, locs, 0); 1151 AddCurrentDescriptor(kind, Isolate::kNoDeoptId, token_pos);
1152 RecordSafepoint(locs);
1152 } 1153 }
1153 1154
1154 1155
1155 void FlowGraphCompiler::GenerateDartCall(intptr_t deopt_id, 1156 void FlowGraphCompiler::GenerateDartCall(intptr_t deopt_id,
1156 intptr_t token_pos, 1157 intptr_t token_pos,
1157 const ExternalLabel* label, 1158 const ExternalLabel* label,
1158 RawPcDescriptors::Kind kind, 1159 RawPcDescriptors::Kind kind,
1159 LocationSummary* locs) { 1160 LocationSummary* locs) {
1160 __ CallPatchable(label); 1161 __ CallPatchable(label);
1161 RecordCallInfo(token_pos, kind, deopt_id, locs, locs->input_count()); 1162 AddCurrentDescriptor(kind, deopt_id, token_pos);
1163 RecordSafepoint(locs);
1164 // Marks either the continuation point in unoptimized code or the
1165 // deoptimization point in optimized code, after call.
1166 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id);
1167 if (is_optimizing()) {
1168 AddDeoptIndexAtCall(deopt_id_after, token_pos);
1169 } else {
1170 // Add deoptimization continuation point after the call and before the
1171 // arguments are removed.
1172 AddCurrentDescriptor(RawPcDescriptors::kDeopt, deopt_id_after, token_pos);
1173 }
1162 } 1174 }
1163 1175
1164 1176
1165 void FlowGraphCompiler::GenerateRuntimeCall(intptr_t token_pos, 1177 void FlowGraphCompiler::GenerateRuntimeCall(intptr_t token_pos,
1166 intptr_t deopt_id, 1178 intptr_t deopt_id,
1167 const RuntimeEntry& entry, 1179 const RuntimeEntry& entry,
1168 intptr_t argument_count, 1180 intptr_t argument_count,
1169 LocationSummary* locs) { 1181 LocationSummary* locs) {
1170 __ CallRuntime(entry, argument_count); 1182 __ CallRuntime(entry, argument_count);
1171 RecordCallInfo(token_pos, RawPcDescriptors::kOther, deopt_id, locs, 0); 1183 AddCurrentDescriptor(RawPcDescriptors::kOther, deopt_id, token_pos);
1184 RecordSafepoint(locs);
1185 if (deopt_id != Isolate::kNoDeoptId) {
1186 // Marks either the continuation point in unoptimized code or the
1187 // deoptimization point in optimized code, after call.
1188 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id);
1189 if (is_optimizing()) {
1190 AddDeoptIndexAtCall(deopt_id_after, token_pos);
1191 } else {
1192 // Add deoptimization continuation point after the call and before the
1193 // arguments are removed.
1194 AddCurrentDescriptor(RawPcDescriptors::kDeopt, deopt_id_after, token_pos);
1195 }
1196 }
1172 } 1197 }
1173 1198
1174 1199
1175 void FlowGraphCompiler::EmitUnoptimizedStaticCall( 1200 void FlowGraphCompiler::EmitUnoptimizedStaticCall(
1176 intptr_t argument_count, 1201 intptr_t argument_count,
1177 intptr_t deopt_id, 1202 intptr_t deopt_id,
1178 intptr_t token_pos, 1203 intptr_t token_pos,
1179 LocationSummary* locs, 1204 LocationSummary* locs,
1180 const ICData& ic_data) { 1205 const ICData& ic_data) {
1181 StubCode* stub_code = isolate()->stub_code(); 1206 StubCode* stub_code = isolate()->stub_code();
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1302 // proper target for the given name and arguments descriptor. If the 1327 // proper target for the given name and arguments descriptor. If the
1303 // illegal class id was found, the target is a cache miss handler that can 1328 // illegal class id was found, the target is a cache miss handler that can
1304 // be invoked as a normal Dart function. 1329 // be invoked as a normal Dart function.
1305 __ movq(RAX, FieldAddress(RDI, RCX, TIMES_8, base + kWordSize)); 1330 __ movq(RAX, FieldAddress(RDI, RCX, TIMES_8, base + kWordSize));
1306 __ movq(RCX, FieldAddress(RAX, Function::instructions_offset())); 1331 __ movq(RCX, FieldAddress(RAX, Function::instructions_offset()));
1307 __ LoadObject(RBX, ic_data, PP); 1332 __ LoadObject(RBX, ic_data, PP);
1308 __ LoadObject(R10, arguments_descriptor, PP); 1333 __ LoadObject(R10, arguments_descriptor, PP);
1309 __ AddImmediate( 1334 __ AddImmediate(
1310 RCX, Immediate(Instructions::HeaderSize() - kHeapObjectTag), PP); 1335 RCX, Immediate(Instructions::HeaderSize() - kHeapObjectTag), PP);
1311 __ call(RCX); 1336 __ call(RCX);
1312 RecordCallInfo( 1337 AddCurrentDescriptor(RawPcDescriptors::kOther,
1313 token_pos, RawPcDescriptors::kOther, deopt_id, locs, locs->input_count()); 1338 Isolate::kNoDeoptId, token_pos);
1339 RecordSafepoint(locs);
1340 AddDeoptIndexAtCall(Isolate::ToDeoptAfter(deopt_id), token_pos);
1314 __ Drop(argument_count); 1341 __ Drop(argument_count);
1315 } 1342 }
1316 1343
1317 1344
1318 void FlowGraphCompiler::EmitOptimizedStaticCall( 1345 void FlowGraphCompiler::EmitOptimizedStaticCall(
1319 const Function& function, 1346 const Function& function,
1320 const Array& arguments_descriptor, 1347 const Array& arguments_descriptor,
1321 intptr_t argument_count, 1348 intptr_t argument_count,
1322 intptr_t deopt_id, 1349 intptr_t deopt_id,
1323 intptr_t token_pos, 1350 intptr_t token_pos,
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
1697 __ movups(reg, Address(RSP, 0)); 1724 __ movups(reg, Address(RSP, 0));
1698 __ AddImmediate(RSP, Immediate(kFpuRegisterSize), PP); 1725 __ AddImmediate(RSP, Immediate(kFpuRegisterSize), PP);
1699 } 1726 }
1700 1727
1701 1728
1702 #undef __ 1729 #undef __
1703 1730
1704 } // namespace dart 1731 } // namespace dart
1705 1732
1706 #endif // defined TARGET_ARCH_X64 1733 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_mips.cc ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698