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

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

Issue 17554003: Change static calls in unoptimized code to always call via a stub. Using ICData, the call count of … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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/native_entry_test.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 "lib/error.h" 10 #include "lib/error.h"
(...skipping 1423 matching lines...) Expand 10 before | Expand all | Expand 10 after
1434 GenerateDartCall(deopt_id, 1434 GenerateDartCall(deopt_id,
1435 token_pos, 1435 token_pos,
1436 &StubCode::CallStaticFunctionLabel(), 1436 &StubCode::CallStaticFunctionLabel(),
1437 PcDescriptors::kFuncCall, 1437 PcDescriptors::kFuncCall,
1438 locs); 1438 locs);
1439 AddStaticCallTarget(function); 1439 AddStaticCallTarget(function);
1440 __ Drop(argument_count); 1440 __ Drop(argument_count);
1441 } 1441 }
1442 1442
1443 1443
1444 void FlowGraphCompiler::EmitUnoptimizedStaticCall(
1445 const Function& target_function,
1446 const Array& arguments_descriptor,
1447 intptr_t argument_count,
1448 intptr_t deopt_id,
1449 intptr_t token_pos,
1450 LocationSummary* locs) {
1451 const ICData& ic_data = ICData::ZoneHandle(
1452 ICData::New(parsed_function().function(), // Caller function.
1453 String::Handle(target_function.name()),
1454 arguments_descriptor,
1455 deopt_id,
1456 0)); // No arguments checked.
1457 ic_data.AddTarget(target_function);
1458 __ LoadObject(RBX, ic_data);
1459 GenerateDartCall(deopt_id,
1460 token_pos,
1461 &StubCode::UnoptimizedStaticCallLabel(),
1462 PcDescriptors::kFuncCall,
1463 locs);
1464 __ Drop(argument_count);
1465 }
1466
1467
1444 void FlowGraphCompiler::EmitEqualityRegConstCompare(Register reg, 1468 void FlowGraphCompiler::EmitEqualityRegConstCompare(Register reg,
1445 const Object& obj, 1469 const Object& obj,
1446 bool needs_number_check, 1470 bool needs_number_check,
1447 intptr_t token_pos) { 1471 intptr_t token_pos) {
1448 if (needs_number_check) { 1472 if (needs_number_check) {
1449 if (!obj.IsMint() && !obj.IsDouble() && !obj.IsBigint()) { 1473 if (!obj.IsMint() && !obj.IsDouble() && !obj.IsBigint()) {
1450 needs_number_check = false; 1474 needs_number_check = false;
1451 } 1475 }
1452 } 1476 }
1453 1477
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
1903 __ movups(reg, Address(RSP, 0)); 1927 __ movups(reg, Address(RSP, 0));
1904 __ addq(RSP, Immediate(kFpuRegisterSize)); 1928 __ addq(RSP, Immediate(kFpuRegisterSize));
1905 } 1929 }
1906 1930
1907 1931
1908 #undef __ 1932 #undef __
1909 1933
1910 } // namespace dart 1934 } // namespace dart
1911 1935
1912 #endif // defined TARGET_ARCH_X64 1936 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_mips.cc ('k') | runtime/vm/native_entry_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698