| 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 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1124 // ECX: potential new object end and, if ECX != EBX, potential new | 1124 // ECX: potential new object end and, if ECX != EBX, potential new |
| 1125 // InstantiatedTypeArguments object start. | 1125 // InstantiatedTypeArguments object start. |
| 1126 } | 1126 } |
| 1127 // Check if the allocation fits into the remaining space. | 1127 // Check if the allocation fits into the remaining space. |
| 1128 // EAX: potential new object start. | 1128 // EAX: potential new object start. |
| 1129 // EBX: potential next object start. | 1129 // EBX: potential next object start. |
| 1130 __ cmpl(EBX, Address::Absolute(heap->EndAddress())); | 1130 __ cmpl(EBX, Address::Absolute(heap->EndAddress())); |
| 1131 if (FLAG_use_slow_path) { | 1131 if (FLAG_use_slow_path) { |
| 1132 __ jmp(&slow_case); | 1132 __ jmp(&slow_case); |
| 1133 } else { | 1133 } else { |
| 1134 __ j(ABOVE_EQUAL, &slow_case, Assembler::kNearJump); | 1134 __ j(ABOVE_EQUAL, &slow_case); |
| 1135 } | 1135 } |
| 1136 | 1136 |
| 1137 // Successfully allocated the object(s), now update top to point to | 1137 // Successfully allocated the object(s), now update top to point to |
| 1138 // next object start and initialize the object. | 1138 // next object start and initialize the object. |
| 1139 __ movl(Address::Absolute(heap->TopAddress()), EBX); | 1139 __ movl(Address::Absolute(heap->TopAddress()), EBX); |
| 1140 __ BumpAllocationCount(cls.id(), EDI); |
| 1140 | 1141 |
| 1141 if (is_cls_parameterized) { | 1142 if (is_cls_parameterized) { |
| 1142 // Initialize the type arguments field in the object. | 1143 // Initialize the type arguments field in the object. |
| 1143 // EAX: new object start. | 1144 // EAX: new object start. |
| 1144 // ECX: potential new object end and, if ECX != EBX, potential new | 1145 // ECX: potential new object end and, if ECX != EBX, potential new |
| 1145 // InstantiatedTypeArguments object start. | 1146 // InstantiatedTypeArguments object start. |
| 1146 // EBX: next object start. | 1147 // EBX: next object start. |
| 1147 Label type_arguments_ready; | 1148 Label type_arguments_ready; |
| 1148 __ movl(EDI, Address(ESP, kObjectTypeArgumentsOffset)); | 1149 __ movl(EDI, Address(ESP, kObjectTypeArgumentsOffset)); |
| 1149 __ cmpl(ECX, EBX); | 1150 __ cmpl(ECX, EBX); |
| (...skipping 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2208 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); | 2209 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); |
| 2209 __ popl(temp); | 2210 __ popl(temp); |
| 2210 __ popl(right); | 2211 __ popl(right); |
| 2211 __ popl(left); | 2212 __ popl(left); |
| 2212 __ ret(); | 2213 __ ret(); |
| 2213 } | 2214 } |
| 2214 | 2215 |
| 2215 } // namespace dart | 2216 } // namespace dart |
| 2216 | 2217 |
| 2217 #endif // defined TARGET_ARCH_IA32 | 2218 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |