Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 RCX with function. | |
|
siva
2012/11/16 23:15:23
load ECX with function
srdjan
2012/11/17 00:47:24
Done.
| |
| 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 Loading... | |
| 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 |
| OLD | NEW |