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

Side by Side Diff: vm/flow_graph_compiler_x64.cc

Issue 11266022: - Do not pre-resolve static calls. This makes it easier to (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 1 month 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 | « vm/flow_graph_compiler_ia32.cc ('k') | no next file » | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after
1105 1105
1106 1106
1107 void FlowGraphCompiler::EmitStaticCall(const Function& function, 1107 void FlowGraphCompiler::EmitStaticCall(const Function& function,
1108 const Array& arguments_descriptor, 1108 const Array& arguments_descriptor,
1109 intptr_t argument_count, 1109 intptr_t argument_count,
1110 intptr_t deopt_id, 1110 intptr_t deopt_id,
1111 intptr_t token_pos, 1111 intptr_t token_pos,
1112 LocationSummary* locs) { 1112 LocationSummary* locs) {
1113 __ LoadObject(RBX, function); 1113 __ LoadObject(RBX, function);
1114 __ LoadObject(R10, arguments_descriptor); 1114 __ LoadObject(R10, arguments_descriptor);
1115 if (function.HasCode()) { 1115 // Do not use the code from the function, but let the code be patched so that
1116 const Code& code = Code::Handle(function.CurrentCode()); 1116 // we can record the outgoing edges to other code.
1117 ExternalLabel target_label(function.ToFullyQualifiedCString(), 1117 GenerateDartCall(deopt_id,
1118 code.EntryPoint()); 1118 token_pos,
1119 GenerateDartCall(deopt_id, 1119 &StubCode::CallStaticFunctionLabel(),
1120 token_pos, 1120 PcDescriptors::kFuncCall,
1121 &target_label, 1121 locs);
1122 PcDescriptors::kFuncCall,
1123 locs);
1124 } else {
1125 GenerateDartCall(deopt_id,
1126 token_pos,
1127 &StubCode::CallStaticFunctionLabel(),
1128 PcDescriptors::kFuncCall,
1129 locs);
1130 }
1131 __ Drop(argument_count); 1122 __ Drop(argument_count);
1132 } 1123 }
1133 1124
1134 1125
1135 void FlowGraphCompiler::EmitEqualityRegConstCompare(Register reg, 1126 void FlowGraphCompiler::EmitEqualityRegConstCompare(Register reg,
1136 const Object& obj) { 1127 const Object& obj) {
1137 if (obj.IsSmi() && (Smi::Cast(obj).Value() == 0)) { 1128 if (obj.IsSmi() && (Smi::Cast(obj).Value() == 0)) {
1138 __ testq(reg, reg); 1129 __ testq(reg, reg);
1139 } else { 1130 } else {
1140 __ CompareObject(reg, obj); 1131 __ CompareObject(reg, obj);
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
1386 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { 1377 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) {
1387 __ Exchange(mem1, mem2); 1378 __ Exchange(mem1, mem2);
1388 } 1379 }
1389 1380
1390 1381
1391 #undef __ 1382 #undef __
1392 1383
1393 } // namespace dart 1384 } // namespace dart
1394 1385
1395 #endif // defined TARGET_ARCH_X64 1386 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « vm/flow_graph_compiler_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698