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

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
« no previous file with comments | « runtime/vm/flow_graph_compiler_mips.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('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 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after
1218 uword label_address = 0; 1218 uword label_address = 0;
1219 StubCode* stub_code = isolate()->stub_code(); 1219 StubCode* stub_code = isolate()->stub_code();
1220 if (ic_data.NumArgsTested() == 0) { 1220 if (ic_data.NumArgsTested() == 0) {
1221 label_address = stub_code->ZeroArgsUnoptimizedStaticCallEntryPoint(); 1221 label_address = stub_code->ZeroArgsUnoptimizedStaticCallEntryPoint();
1222 } else if (ic_data.NumArgsTested() == 2) { 1222 } else if (ic_data.NumArgsTested() == 2) {
1223 label_address = stub_code->TwoArgsUnoptimizedStaticCallEntryPoint(); 1223 label_address = stub_code->TwoArgsUnoptimizedStaticCallEntryPoint();
1224 } else { 1224 } else {
1225 UNIMPLEMENTED(); 1225 UNIMPLEMENTED();
1226 } 1226 }
1227 ExternalLabel target_label(label_address); 1227 ExternalLabel target_label(label_address);
1228 __ movq(R10, Immediate(0));
1229 __ LoadObject(RBX, ic_data, PP); 1228 __ LoadObject(RBX, ic_data, PP);
1230 GenerateDartCall(deopt_id, 1229 GenerateDartCall(deopt_id,
1231 token_pos, 1230 token_pos,
1232 &target_label, 1231 &target_label,
1233 RawPcDescriptors::kUnoptStaticCall, 1232 RawPcDescriptors::kUnoptStaticCall,
1234 locs); 1233 locs);
1235 __ Drop(argument_count); 1234 __ Drop(argument_count);
1236 #if defined(DEBUG) 1235 #if defined(DEBUG)
1236 __ movq(RBX, Immediate(kInvalidObjectPointer));
1237 __ movq(R10, Immediate(kInvalidObjectPointer)); 1237 __ movq(R10, Immediate(kInvalidObjectPointer));
1238 #endif 1238 #endif
1239 } 1239 }
1240 1240
1241 1241
1242 void FlowGraphCompiler::EmitEdgeCounter() { 1242 void FlowGraphCompiler::EmitEdgeCounter() {
1243 // We do not check for overflow when incrementing the edge counter. The 1243 // We do not check for overflow when incrementing the edge counter. The
1244 // function should normally be optimized long before the counter can 1244 // function should normally be optimized long before the counter can
1245 // overflow; and though we do not reset the counters when we optimize or 1245 // overflow; and though we do not reset the counters when we optimize or
1246 // deoptimize, there is a bound on the number of 1246 // deoptimize, there is a bound on the number of
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1279 } 1279 }
1280 1280
1281 1281
1282 void FlowGraphCompiler::EmitInstanceCall(ExternalLabel* target_label, 1282 void FlowGraphCompiler::EmitInstanceCall(ExternalLabel* target_label,
1283 const ICData& ic_data, 1283 const ICData& ic_data,
1284 intptr_t argument_count, 1284 intptr_t argument_count,
1285 intptr_t deopt_id, 1285 intptr_t deopt_id,
1286 intptr_t token_pos, 1286 intptr_t token_pos,
1287 LocationSummary* locs) { 1287 LocationSummary* locs) {
1288 ASSERT(Array::Handle(ic_data.arguments_descriptor()).Length() > 0); 1288 ASSERT(Array::Handle(ic_data.arguments_descriptor()).Length() > 0);
1289 __ movq(R10, Immediate(0));
1290 __ LoadObject(RBX, ic_data, PP); 1289 __ LoadObject(RBX, ic_data, PP);
1291 GenerateDartCall(deopt_id, 1290 GenerateDartCall(deopt_id,
1292 token_pos, 1291 token_pos,
1293 target_label, 1292 target_label,
1294 RawPcDescriptors::kIcCall, 1293 RawPcDescriptors::kIcCall,
1295 locs); 1294 locs);
1296 __ Drop(argument_count); 1295 __ Drop(argument_count);
1297 #if defined(DEBUG) 1296 #if defined(DEBUG)
1298 __ movq(R10, Immediate(kInvalidObjectPointer)); 1297 __ movq(R10, Immediate(kInvalidObjectPointer));
1299 #endif 1298 #endif
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
1422 Register right, 1421 Register right,
1423 bool needs_number_check, 1422 bool needs_number_check,
1424 intptr_t token_pos) { 1423 intptr_t token_pos) {
1425 if (needs_number_check) { 1424 if (needs_number_check) {
1426 StubCode* stub_code = isolate()->stub_code(); 1425 StubCode* stub_code = isolate()->stub_code();
1427 __ pushq(left); 1426 __ pushq(left);
1428 __ pushq(right); 1427 __ pushq(right);
1429 if (is_optimizing()) { 1428 if (is_optimizing()) {
1430 __ CallPatchable(&stub_code->OptimizedIdenticalWithNumberCheckLabel()); 1429 __ CallPatchable(&stub_code->OptimizedIdenticalWithNumberCheckLabel());
1431 } else { 1430 } else {
1432 __ movq(R10, Immediate(0));
1433 __ movq(RBX, Immediate(0));
1434 __ CallPatchable(&stub_code->UnoptimizedIdenticalWithNumberCheckLabel()); 1431 __ CallPatchable(&stub_code->UnoptimizedIdenticalWithNumberCheckLabel());
1435 } 1432 }
1436 if (token_pos != Scanner::kNoSourcePos) { 1433 if (token_pos != Scanner::kNoSourcePos) {
1437 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall, 1434 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall,
1438 Isolate::kNoDeoptId, 1435 Isolate::kNoDeoptId,
1439 token_pos); 1436 token_pos);
1440 } 1437 }
1441 #if defined(DEBUG) 1438 #if defined(DEBUG)
1442 // Do this *after* adding the pc descriptor! 1439 // Do this *after* adding the pc descriptor!
1443 if (!is_optimizing()) { 1440 if (!is_optimizing()) {
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
1729 __ movups(reg, Address(RSP, 0)); 1726 __ movups(reg, Address(RSP, 0));
1730 __ AddImmediate(RSP, Immediate(kFpuRegisterSize), PP); 1727 __ AddImmediate(RSP, Immediate(kFpuRegisterSize), PP);
1731 } 1728 }
1732 1729
1733 1730
1734 #undef __ 1731 #undef __
1735 1732
1736 } // namespace dart 1733 } // namespace dart
1737 1734
1738 #endif // defined TARGET_ARCH_X64 1735 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_mips.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698