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_X64) | 6 #if defined(TARGET_ARCH_X64) |
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 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1185 __ incl(FieldAddress(func_reg, Function::usage_counter_offset())); | 1185 __ incl(FieldAddress(func_reg, Function::usage_counter_offset())); |
1186 } | 1186 } |
1187 | 1187 |
1188 | 1188 |
1189 // Loads function into 'temp_reg', preserves 'ic_reg'. | 1189 // Loads function into 'temp_reg', preserves 'ic_reg'. |
1190 void StubCode::GenerateUsageCounterIncrement(Assembler* assembler, | 1190 void StubCode::GenerateUsageCounterIncrement(Assembler* assembler, |
1191 Register temp_reg) { | 1191 Register temp_reg) { |
1192 Register ic_reg = RBX; | 1192 Register ic_reg = RBX; |
1193 Register func_reg = temp_reg; | 1193 Register func_reg = temp_reg; |
1194 ASSERT(ic_reg != func_reg); | 1194 ASSERT(ic_reg != func_reg); |
| 1195 __ Comment("Increment function counter"); |
1195 __ movq(func_reg, FieldAddress(ic_reg, ICData::owner_offset())); | 1196 __ movq(func_reg, FieldAddress(ic_reg, ICData::owner_offset())); |
1196 __ incl(FieldAddress(func_reg, Function::usage_counter_offset())); | 1197 __ incl(FieldAddress(func_reg, Function::usage_counter_offset())); |
1197 } | 1198 } |
1198 | 1199 |
1199 | 1200 |
1200 // Note: RBX must be preserved. | 1201 // Note: RBX must be preserved. |
1201 // Attempt a quick Smi operation for known operations ('kind'). The ICData | 1202 // Attempt a quick Smi operation for known operations ('kind'). The ICData |
1202 // must have been primed with a Smi/Smi check that will be used for counting | 1203 // must have been primed with a Smi/Smi check that will be used for counting |
1203 // the invocations. | 1204 // the invocations. |
1204 static void EmitFastSmiOp(Assembler* assembler, | 1205 static void EmitFastSmiOp(Assembler* assembler, |
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2068 | 2069 |
2069 __ movq(left, Address(RSP, 2 * kWordSize)); | 2070 __ movq(left, Address(RSP, 2 * kWordSize)); |
2070 __ movq(right, Address(RSP, 1 * kWordSize)); | 2071 __ movq(right, Address(RSP, 1 * kWordSize)); |
2071 GenerateIdenticalWithNumberCheckStub(assembler, left, right); | 2072 GenerateIdenticalWithNumberCheckStub(assembler, left, right); |
2072 __ ret(); | 2073 __ ret(); |
2073 } | 2074 } |
2074 | 2075 |
2075 } // namespace dart | 2076 } // namespace dart |
2076 | 2077 |
2077 #endif // defined TARGET_ARCH_X64 | 2078 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |