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

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 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)
1237 __ movq(R10, Immediate(kInvalidObjectPointer)); 1236 __ movq(R10, Immediate(kInvalidObjectPointer));
1238 #endif 1237 #endif
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1279 } 1278 }
1280 1279
1281 1280
1282 void FlowGraphCompiler::EmitInstanceCall(ExternalLabel* target_label, 1281 void FlowGraphCompiler::EmitInstanceCall(ExternalLabel* target_label,
1283 const ICData& ic_data, 1282 const ICData& ic_data,
1284 intptr_t argument_count, 1283 intptr_t argument_count,
1285 intptr_t deopt_id, 1284 intptr_t deopt_id,
1286 intptr_t token_pos, 1285 intptr_t token_pos,
1287 LocationSummary* locs) { 1286 LocationSummary* locs) {
1288 ASSERT(Array::Handle(ic_data.arguments_descriptor()).Length() > 0); 1287 ASSERT(Array::Handle(ic_data.arguments_descriptor()).Length() > 0);
1289 __ movq(R10, Immediate(0));
1290 __ LoadObject(RBX, ic_data, PP); 1288 __ LoadObject(RBX, ic_data, PP);
1291 GenerateDartCall(deopt_id, 1289 GenerateDartCall(deopt_id,
1292 token_pos, 1290 token_pos,
1293 target_label, 1291 target_label,
1294 RawPcDescriptors::kIcCall, 1292 RawPcDescriptors::kIcCall,
1295 locs); 1293 locs);
1296 __ Drop(argument_count); 1294 __ Drop(argument_count);
1297 #if defined(DEBUG) 1295 #if defined(DEBUG)
1298 __ movq(R10, Immediate(kInvalidObjectPointer)); 1296 __ movq(R10, Immediate(kInvalidObjectPointer));
1299 #endif 1297 #endif
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
1422 Register right, 1420 Register right,
1423 bool needs_number_check, 1421 bool needs_number_check,
1424 intptr_t token_pos) { 1422 intptr_t token_pos) {
1425 if (needs_number_check) { 1423 if (needs_number_check) {
1426 StubCode* stub_code = isolate()->stub_code(); 1424 StubCode* stub_code = isolate()->stub_code();
1427 __ pushq(left); 1425 __ pushq(left);
1428 __ pushq(right); 1426 __ pushq(right);
1429 if (is_optimizing()) { 1427 if (is_optimizing()) {
1430 __ CallPatchable(&stub_code->OptimizedIdenticalWithNumberCheckLabel()); 1428 __ CallPatchable(&stub_code->OptimizedIdenticalWithNumberCheckLabel());
1431 } else { 1429 } else {
1432 __ movq(R10, Immediate(0));
1433 __ movq(RBX, Immediate(0));
1434 __ CallPatchable(&stub_code->UnoptimizedIdenticalWithNumberCheckLabel()); 1430 __ CallPatchable(&stub_code->UnoptimizedIdenticalWithNumberCheckLabel());
1435 } 1431 }
1436 if (token_pos != Scanner::kNoSourcePos) { 1432 if (token_pos != Scanner::kNoSourcePos) {
1437 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall, 1433 AddCurrentDescriptor(RawPcDescriptors::kRuntimeCall,
1438 Isolate::kNoDeoptId, 1434 Isolate::kNoDeoptId,
1439 token_pos); 1435 token_pos);
1440 } 1436 }
1441 #if defined(DEBUG) 1437 #if defined(DEBUG)
1442 // Do this *after* adding the pc descriptor! 1438 // Do this *after* adding the pc descriptor!
1443 if (!is_optimizing()) { 1439 if (!is_optimizing()) {
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
1729 __ movups(reg, Address(RSP, 0)); 1725 __ movups(reg, Address(RSP, 0));
1730 __ AddImmediate(RSP, Immediate(kFpuRegisterSize), PP); 1726 __ AddImmediate(RSP, Immediate(kFpuRegisterSize), PP);
1731 } 1727 }
1732 1728
1733 1729
1734 #undef __ 1730 #undef __
1735 1731
1736 } // namespace dart 1732 } // namespace dart
1737 1733
1738 #endif // defined TARGET_ARCH_X64 1734 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698