| 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 // The intrinsic code below is executed before a method has built its frame. | 5 // The intrinsic code below is executed before a method has built its frame. |
| 6 // The return address is on the stack and the arguments below it. | 6 // The return address is on the stack and the arguments below it. |
| 7 // Registers EDX (arguments descriptor) and ECX (function) must be preserved. | 7 // Registers EDX (arguments descriptor) and ECX (function) must be preserved. |
| 8 // Each intrinsification method returns true if the corresponding | 8 // Each intrinsification method returns true if the corresponding |
| 9 // Dart method was intrinsified. | 9 // Dart method was intrinsified. |
| 10 | 10 |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 // Store the type argument field in the growable array object. | 160 // Store the type argument field in the growable array object. |
| 161 __ movl(EBX, Address(ESP, kTypeArgumentsOffset)); // type argument. | 161 __ movl(EBX, Address(ESP, kTypeArgumentsOffset)); // type argument. |
| 162 __ StoreIntoObjectNoBarrier( | 162 __ StoreIntoObjectNoBarrier( |
| 163 EAX, | 163 EAX, |
| 164 FieldAddress(EAX, GrowableObjectArray::type_arguments_offset()), | 164 FieldAddress(EAX, GrowableObjectArray::type_arguments_offset()), |
| 165 EBX); | 165 EBX); |
| 166 | 166 |
| 167 // Set the length field in the growable array object to 0. | 167 // Set the length field in the growable array object to 0. |
| 168 __ movl(FieldAddress(EAX, GrowableObjectArray::length_offset()), | 168 __ movl(FieldAddress(EAX, GrowableObjectArray::length_offset()), |
| 169 Immediate(0)); | 169 Immediate(0)); |
| 170 __ UpdateAllocationStats(kGrowableObjectArrayCid, EBX); | |
| 171 __ ret(); // returns the newly allocated object in EAX. | 170 __ ret(); // returns the newly allocated object in EAX. |
| 172 | 171 |
| 173 __ Bind(&fall_through); | 172 __ Bind(&fall_through); |
| 174 } | 173 } |
| 175 | 174 |
| 176 | 175 |
| 177 // Get length of growable object array. | 176 // Get length of growable object array. |
| 178 // On stack: growable array (+1), return-address (+0). | 177 // On stack: growable array (+1), return-address (+0). |
| 179 void Intrinsifier::GrowableList_getLength(Assembler* assembler) { | 178 void Intrinsifier::GrowableList_getLength(Assembler* assembler) { |
| 180 __ movl(EAX, Address(ESP, + 1 * kWordSize)); | 179 __ movl(EAX, Address(ESP, + 1 * kWordSize)); |
| (...skipping 1567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1748 Isolate::current_tag_offset()); | 1747 Isolate::current_tag_offset()); |
| 1749 // Set return value to Isolate::current_tag_. | 1748 // Set return value to Isolate::current_tag_. |
| 1750 __ movl(EAX, current_tag_addr); | 1749 __ movl(EAX, current_tag_addr); |
| 1751 __ ret(); | 1750 __ ret(); |
| 1752 } | 1751 } |
| 1753 | 1752 |
| 1754 #undef __ | 1753 #undef __ |
| 1755 } // namespace dart | 1754 } // namespace dart |
| 1756 | 1755 |
| 1757 #endif // defined TARGET_ARCH_IA32 | 1756 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |