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

Side by Side Diff: vm/flow_graph_compiler_ia32.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 | « no previous file | vm/flow_graph_compiler_x64.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_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 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 1100
1101 1101
1102 void FlowGraphCompiler::EmitStaticCall(const Function& function, 1102 void FlowGraphCompiler::EmitStaticCall(const Function& function,
1103 const Array& arguments_descriptor, 1103 const Array& arguments_descriptor,
1104 intptr_t argument_count, 1104 intptr_t argument_count,
1105 intptr_t deopt_id, 1105 intptr_t deopt_id,
1106 intptr_t token_pos, 1106 intptr_t token_pos,
1107 LocationSummary* locs) { 1107 LocationSummary* locs) {
1108 __ LoadObject(ECX, function); 1108 __ LoadObject(ECX, function);
1109 __ LoadObject(EDX, arguments_descriptor); 1109 __ LoadObject(EDX, arguments_descriptor);
1110 if (function.HasCode()) { 1110 // Do not use the code from the function, but let the code be patched so that
1111 const Code& code = Code::Handle(function.CurrentCode()); 1111 // we can record the outgoing edges to other code.
1112 ExternalLabel target_label(function.ToFullyQualifiedCString(), 1112 GenerateDartCall(deopt_id,
1113 code.EntryPoint()); 1113 token_pos,
1114 GenerateDartCall(deopt_id, 1114 &StubCode::CallStaticFunctionLabel(),
1115 token_pos, 1115 PcDescriptors::kFuncCall,
1116 &target_label, 1116 locs);
1117 PcDescriptors::kFuncCall,
1118 locs);
1119 } else {
1120 GenerateDartCall(deopt_id,
1121 token_pos,
1122 &StubCode::CallStaticFunctionLabel(),
1123 PcDescriptors::kFuncCall,
1124 locs);
1125 }
1126 __ Drop(argument_count); 1117 __ Drop(argument_count);
1127 } 1118 }
1128 1119
1129 1120
1130 void FlowGraphCompiler::EmitEqualityRegConstCompare(Register reg, 1121 void FlowGraphCompiler::EmitEqualityRegConstCompare(Register reg,
1131 const Object& obj) { 1122 const Object& obj) {
1132 if (obj.IsSmi() && (Smi::Cast(obj).Value() == 0)) { 1123 if (obj.IsSmi() && (Smi::Cast(obj).Value() == 0)) {
1133 __ testl(reg, reg); 1124 __ testl(reg, reg);
1134 } else { 1125 } else {
1135 __ CompareObject(reg, obj); 1126 __ CompareObject(reg, obj);
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
1407 __ popl(ECX); 1398 __ popl(ECX);
1408 __ popl(EAX); 1399 __ popl(EAX);
1409 } 1400 }
1410 1401
1411 1402
1412 #undef __ 1403 #undef __
1413 1404
1414 } // namespace dart 1405 } // namespace dart
1415 1406
1416 #endif // defined TARGET_ARCH_IA32 1407 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698