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 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1127 if (FLAG_use_slow_path) { | 1127 if (FLAG_use_slow_path) { |
1128 __ jmp(&slow_case); | 1128 __ jmp(&slow_case); |
1129 } else { | 1129 } else { |
1130 __ j(ABOVE_EQUAL, &slow_case); | 1130 __ j(ABOVE_EQUAL, &slow_case); |
1131 } | 1131 } |
1132 | 1132 |
1133 // Successfully allocated the object(s), now update top to point to | 1133 // Successfully allocated the object(s), now update top to point to |
1134 // next object start and initialize the object. | 1134 // next object start and initialize the object. |
1135 __ movq(RDI, Immediate(heap->TopAddress())); | 1135 __ movq(RDI, Immediate(heap->TopAddress())); |
1136 __ movq(Address(RDI, 0), RBX); | 1136 __ movq(Address(RDI, 0), RBX); |
| 1137 __ BumpAllocationCount(Heap::kNew, cls.id()); |
1137 | 1138 |
1138 if (is_cls_parameterized) { | 1139 if (is_cls_parameterized) { |
1139 // Initialize the type arguments field in the object. | 1140 // Initialize the type arguments field in the object. |
1140 // RAX: new object start. | 1141 // RAX: new object start. |
1141 // RCX: potential new object end and, if RCX != RBX, potential new | 1142 // RCX: potential new object end and, if RCX != RBX, potential new |
1142 // InstantiatedTypeArguments object start. | 1143 // InstantiatedTypeArguments object start. |
1143 // RBX: next object start. | 1144 // RBX: next object start. |
1144 Label type_arguments_ready; | 1145 Label type_arguments_ready; |
1145 __ movq(RDI, Address(RSP, kObjectTypeArgumentsOffset)); | 1146 __ movq(RDI, Address(RSP, kObjectTypeArgumentsOffset)); |
1146 __ cmpq(RCX, RBX); | 1147 __ cmpq(RCX, RBX); |
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2165 | 2166 |
2166 __ movq(left, Address(RSP, 2 * kWordSize)); | 2167 __ movq(left, Address(RSP, 2 * kWordSize)); |
2167 __ movq(right, Address(RSP, 1 * kWordSize)); | 2168 __ movq(right, Address(RSP, 1 * kWordSize)); |
2168 GenerateIdenticalWithNumberCheckStub(assembler, left, right); | 2169 GenerateIdenticalWithNumberCheckStub(assembler, left, right); |
2169 __ ret(); | 2170 __ ret(); |
2170 } | 2171 } |
2171 | 2172 |
2172 } // namespace dart | 2173 } // namespace dart |
2173 | 2174 |
2174 #endif // defined TARGET_ARCH_X64 | 2175 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |