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

Side by Side Diff: runtime/vm/flow_graph_compiler_ia32.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_ia32.h ('k') | runtime/vm/flow_graph_compiler_x64.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) 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_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
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 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after
1085 __ Drop(argument_count); 1085 __ Drop(argument_count);
1086 } 1086 }
1087 1087
1088 1088
1089 void FlowGraphCompiler::EmitStaticCall(const Function& function, 1089 void FlowGraphCompiler::EmitStaticCall(const Function& function,
1090 const Array& arguments_descriptor, 1090 const Array& arguments_descriptor,
1091 intptr_t argument_count, 1091 intptr_t argument_count,
1092 intptr_t deopt_id, 1092 intptr_t deopt_id,
1093 intptr_t token_pos, 1093 intptr_t token_pos,
1094 LocationSummary* locs) { 1094 LocationSummary* locs) {
1095 // TODO(srdjan): Remove load ECX with function.
1095 __ LoadObject(ECX, function); 1096 __ LoadObject(ECX, function);
1096 __ LoadObject(EDX, arguments_descriptor); 1097 __ LoadObject(EDX, arguments_descriptor);
1097 // Do not use the code from the function, but let the code be patched so that 1098 // Do not use the code from the function, but let the code be patched so that
1098 // we can record the outgoing edges to other code. 1099 // we can record the outgoing edges to other code.
1099 GenerateDartCall(deopt_id, 1100 GenerateDartCall(deopt_id,
1100 token_pos, 1101 token_pos,
1101 &StubCode::CallStaticFunctionLabel(), 1102 &StubCode::CallStaticFunctionLabel(),
1102 PcDescriptors::kFuncCall, 1103 PcDescriptors::kFuncCall,
1103 locs); 1104 locs);
1105 AddStaticCallTarget(function);
1104 __ Drop(argument_count); 1106 __ Drop(argument_count);
1105 } 1107 }
1106 1108
1107 1109
1108 void FlowGraphCompiler::EmitEqualityRegConstCompare(Register reg, 1110 void FlowGraphCompiler::EmitEqualityRegConstCompare(Register reg,
1109 const Object& obj) { 1111 const Object& obj) {
1110 if (obj.IsSmi() && (Smi::Cast(obj).Value() == 0)) { 1112 if (obj.IsSmi() && (Smi::Cast(obj).Value() == 0)) {
1111 __ testl(reg, reg); 1113 __ testl(reg, reg);
1112 } else { 1114 } else {
1113 __ CompareObject(reg, obj); 1115 __ CompareObject(reg, obj);
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
1385 __ popl(ECX); 1387 __ popl(ECX);
1386 __ popl(EAX); 1388 __ popl(EAX);
1387 } 1389 }
1388 1390
1389 1391
1390 #undef __ 1392 #undef __
1391 1393
1392 } // namespace dart 1394 } // namespace dart
1393 1395
1394 #endif // defined TARGET_ARCH_IA32 1396 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_ia32.h ('k') | runtime/vm/flow_graph_compiler_x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698