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

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

Issue 339183010: Specialize breakpoint stubs by set of live registers of the stubs they are intercepting. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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
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 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after
1212 const ICData& ic_data) { 1212 const ICData& ic_data) {
1213 uword label_address = 0; 1213 uword label_address = 0;
1214 if (ic_data.NumArgsTested() == 0) { 1214 if (ic_data.NumArgsTested() == 0) {
1215 label_address = StubCode::ZeroArgsUnoptimizedStaticCallEntryPoint(); 1215 label_address = StubCode::ZeroArgsUnoptimizedStaticCallEntryPoint();
1216 } else if (ic_data.NumArgsTested() == 2) { 1216 } else if (ic_data.NumArgsTested() == 2) {
1217 label_address = StubCode::TwoArgsUnoptimizedStaticCallEntryPoint(); 1217 label_address = StubCode::TwoArgsUnoptimizedStaticCallEntryPoint();
1218 } else { 1218 } else {
1219 UNIMPLEMENTED(); 1219 UNIMPLEMENTED();
1220 } 1220 }
1221 ExternalLabel target_label(label_address); 1221 ExternalLabel target_label(label_address);
1222 __ movq(R10, Immediate(0));
1223 __ LoadObject(RBX, ic_data, PP); 1222 __ LoadObject(RBX, ic_data, PP);
1224 GenerateDartCall(deopt_id, 1223 GenerateDartCall(deopt_id,
1225 token_pos, 1224 token_pos,
1226 &target_label, 1225 &target_label,
1227 PcDescriptors::kUnoptStaticCall, 1226 PcDescriptors::kUnoptStaticCall,
1228 locs); 1227 locs);
1229 __ Drop(argument_count); 1228 __ Drop(argument_count);
1230 #if defined(DEBUG) 1229 #if defined(DEBUG)
1231 __ movq(R10, Immediate(kInvalidObjectPointer)); 1230 __ movq(R10, Immediate(kInvalidObjectPointer));
1232 #endif 1231 #endif
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 } 1272 }
1274 1273
1275 1274
1276 void FlowGraphCompiler::EmitInstanceCall(ExternalLabel* target_label, 1275 void FlowGraphCompiler::EmitInstanceCall(ExternalLabel* target_label,
1277 const ICData& ic_data, 1276 const ICData& ic_data,
1278 intptr_t argument_count, 1277 intptr_t argument_count,
1279 intptr_t deopt_id, 1278 intptr_t deopt_id,
1280 intptr_t token_pos, 1279 intptr_t token_pos,
1281 LocationSummary* locs) { 1280 LocationSummary* locs) {
1282 ASSERT(Array::Handle(ic_data.arguments_descriptor()).Length() > 0); 1281 ASSERT(Array::Handle(ic_data.arguments_descriptor()).Length() > 0);
1283 __ movq(R10, Immediate(0));
1284 __ LoadObject(RBX, ic_data, PP); 1282 __ LoadObject(RBX, ic_data, PP);
1285 GenerateDartCall(deopt_id, 1283 GenerateDartCall(deopt_id,
1286 token_pos, 1284 token_pos,
1287 target_label, 1285 target_label,
1288 PcDescriptors::kIcCall, 1286 PcDescriptors::kIcCall,
1289 locs); 1287 locs);
1290 __ Drop(argument_count); 1288 __ Drop(argument_count);
1291 #if defined(DEBUG) 1289 #if defined(DEBUG)
1292 __ movq(R10, Immediate(kInvalidObjectPointer)); 1290 __ movq(R10, Immediate(kInvalidObjectPointer));
1293 #endif 1291 #endif
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
1412 void FlowGraphCompiler::EmitEqualityRegRegCompare(Register left, 1410 void FlowGraphCompiler::EmitEqualityRegRegCompare(Register left,
1413 Register right, 1411 Register right,
1414 bool needs_number_check, 1412 bool needs_number_check,
1415 intptr_t token_pos) { 1413 intptr_t token_pos) {
1416 if (needs_number_check) { 1414 if (needs_number_check) {
1417 __ pushq(left); 1415 __ pushq(left);
1418 __ pushq(right); 1416 __ pushq(right);
1419 if (is_optimizing()) { 1417 if (is_optimizing()) {
1420 __ CallPatchable(&StubCode::OptimizedIdenticalWithNumberCheckLabel()); 1418 __ CallPatchable(&StubCode::OptimizedIdenticalWithNumberCheckLabel());
1421 } else { 1419 } else {
1422 __ movq(R10, Immediate(0));
1423 __ movq(RBX, Immediate(0));
1424 __ CallPatchable(&StubCode::UnoptimizedIdenticalWithNumberCheckLabel()); 1420 __ CallPatchable(&StubCode::UnoptimizedIdenticalWithNumberCheckLabel());
1425 } 1421 }
1426 if (token_pos != Scanner::kNoSourcePos) { 1422 if (token_pos != Scanner::kNoSourcePos) {
1427 AddCurrentDescriptor(PcDescriptors::kRuntimeCall, 1423 AddCurrentDescriptor(PcDescriptors::kRuntimeCall,
1428 Isolate::kNoDeoptId, 1424 Isolate::kNoDeoptId,
1429 token_pos); 1425 token_pos);
1430 } 1426 }
1431 #if defined(DEBUG) 1427 #if defined(DEBUG)
1432 // Do this *after* adding the pc descriptor! 1428 // Do this *after* adding the pc descriptor!
1433 if (!is_optimizing()) { 1429 if (!is_optimizing()) {
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
1717 __ movups(reg, Address(RSP, 0)); 1713 __ movups(reg, Address(RSP, 0));
1718 __ AddImmediate(RSP, Immediate(kFpuRegisterSize), PP); 1714 __ AddImmediate(RSP, Immediate(kFpuRegisterSize), PP);
1719 } 1715 }
1720 1716
1721 1717
1722 #undef __ 1718 #undef __
1723 1719
1724 } // namespace dart 1720 } // namespace dart
1725 1721
1726 #endif // defined TARGET_ARCH_X64 1722 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698