| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 7 | 7 |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1170 __ incl(FieldAddress(func_reg, Function::usage_counter_offset())); | 1170 __ incl(FieldAddress(func_reg, Function::usage_counter_offset())); |
| 1171 } | 1171 } |
| 1172 | 1172 |
| 1173 | 1173 |
| 1174 // Loads function into 'temp_reg'. | 1174 // Loads function into 'temp_reg'. |
| 1175 void StubCode::GenerateUsageCounterIncrement(Assembler* assembler, | 1175 void StubCode::GenerateUsageCounterIncrement(Assembler* assembler, |
| 1176 Register temp_reg) { | 1176 Register temp_reg) { |
| 1177 Register ic_reg = ECX; | 1177 Register ic_reg = ECX; |
| 1178 Register func_reg = temp_reg; | 1178 Register func_reg = temp_reg; |
| 1179 ASSERT(ic_reg != func_reg); | 1179 ASSERT(ic_reg != func_reg); |
| 1180 __ Comment("Increment function counter"); |
| 1180 __ movl(func_reg, FieldAddress(ic_reg, ICData::owner_offset())); | 1181 __ movl(func_reg, FieldAddress(ic_reg, ICData::owner_offset())); |
| 1181 __ incl(FieldAddress(func_reg, Function::usage_counter_offset())); | 1182 __ incl(FieldAddress(func_reg, Function::usage_counter_offset())); |
| 1182 } | 1183 } |
| 1183 | 1184 |
| 1184 | 1185 |
| 1185 // Note: ECX must be preserved. | 1186 // Note: ECX must be preserved. |
| 1186 // Attempt a quick Smi operation for known operations ('kind'). The ICData | 1187 // Attempt a quick Smi operation for known operations ('kind'). The ICData |
| 1187 // must have been primed with a Smi/Smi check that will be used for counting | 1188 // must have been primed with a Smi/Smi check that will be used for counting |
| 1188 // the invocations. | 1189 // the invocations. |
| 1189 static void EmitFastSmiOp(Assembler* assembler, | 1190 static void EmitFastSmiOp(Assembler* assembler, |
| (...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2038 const Register temp = ECX; | 2039 const Register temp = ECX; |
| 2039 __ movl(left, Address(ESP, 2 * kWordSize)); | 2040 __ movl(left, Address(ESP, 2 * kWordSize)); |
| 2040 __ movl(right, Address(ESP, 1 * kWordSize)); | 2041 __ movl(right, Address(ESP, 1 * kWordSize)); |
| 2041 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); | 2042 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); |
| 2042 __ ret(); | 2043 __ ret(); |
| 2043 } | 2044 } |
| 2044 | 2045 |
| 2045 } // namespace dart | 2046 } // namespace dart |
| 2046 | 2047 |
| 2047 #endif // defined TARGET_ARCH_IA32 | 2048 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |