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

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

Issue 11418046: First part of static call cleanup: store static call targets into code object, referenced by code-o… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
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 | « runtime/vm/flow_graph_compiler_x64.h ('k') | runtime/vm/native_entry_test.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) 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 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after
1089 __ Drop(argument_count); 1089 __ Drop(argument_count);
1090 } 1090 }
1091 1091
1092 1092
1093 void FlowGraphCompiler::EmitStaticCall(const Function& function, 1093 void FlowGraphCompiler::EmitStaticCall(const Function& function,
1094 const Array& arguments_descriptor, 1094 const Array& arguments_descriptor,
1095 intptr_t argument_count, 1095 intptr_t argument_count,
1096 intptr_t deopt_id, 1096 intptr_t deopt_id,
1097 intptr_t token_pos, 1097 intptr_t token_pos,
1098 LocationSummary* locs) { 1098 LocationSummary* locs) {
1099 // TODO(srdjan): Remove load RBX with function.
1099 __ LoadObject(RBX, function); 1100 __ LoadObject(RBX, function);
1100 __ LoadObject(R10, arguments_descriptor); 1101 __ LoadObject(R10, arguments_descriptor);
1101 // Do not use the code from the function, but let the code be patched so that 1102 // Do not use the code from the function, but let the code be patched so that
1102 // we can record the outgoing edges to other code. 1103 // we can record the outgoing edges to other code.
1103 GenerateDartCall(deopt_id, 1104 GenerateDartCall(deopt_id,
1104 token_pos, 1105 token_pos,
1105 &StubCode::CallStaticFunctionLabel(), 1106 &StubCode::CallStaticFunctionLabel(),
1106 PcDescriptors::kFuncCall, 1107 PcDescriptors::kFuncCall,
1107 locs); 1108 locs);
1109 AddStaticCallTarget(function);
1108 __ Drop(argument_count); 1110 __ Drop(argument_count);
1109 } 1111 }
1110 1112
1111 1113
1112 void FlowGraphCompiler::EmitEqualityRegConstCompare(Register reg, 1114 void FlowGraphCompiler::EmitEqualityRegConstCompare(Register reg,
1113 const Object& obj) { 1115 const Object& obj) {
1114 if (obj.IsSmi() && (Smi::Cast(obj).Value() == 0)) { 1116 if (obj.IsSmi() && (Smi::Cast(obj).Value() == 0)) {
1115 __ testq(reg, reg); 1117 __ testq(reg, reg);
1116 } else { 1118 } else {
1117 __ CompareObject(reg, obj); 1119 __ CompareObject(reg, obj);
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
1363 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { 1365 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) {
1364 __ Exchange(mem1, mem2); 1366 __ Exchange(mem1, mem2);
1365 } 1367 }
1366 1368
1367 1369
1368 #undef __ 1370 #undef __
1369 1371
1370 } // namespace dart 1372 } // namespace dart
1371 1373
1372 #endif // defined TARGET_ARCH_X64 1374 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.h ('k') | runtime/vm/native_entry_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698