| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 | 285 |
| 286 // Successfully allocated the object(s), now update top to point to | 286 // Successfully allocated the object(s), now update top to point to |
| 287 // next object start and initialize the object. | 287 // next object start and initialize the object. |
| 288 __ movl(Address::Absolute(heap->TopAddress()), EBX); | 288 __ movl(Address::Absolute(heap->TopAddress()), EBX); |
| 289 __ addl(EAX, Immediate(kHeapObjectTag)); | 289 __ addl(EAX, Immediate(kHeapObjectTag)); |
| 290 | 290 |
| 291 // Initialize the tags. | 291 // Initialize the tags. |
| 292 // EAX: new growable array object start as a tagged pointer. | 292 // EAX: new growable array object start as a tagged pointer. |
| 293 const Class& cls = Class::Handle( | 293 const Class& cls = Class::Handle( |
| 294 isolate->object_store()->growable_object_array_class()); | 294 isolate->object_store()->growable_object_array_class()); |
| 295 intptr_t tags = 0; | 295 uword tags = 0; |
| 296 tags = RawObject::SizeTag::update(fixed_size, tags); | 296 tags = RawObject::SizeTag::update(fixed_size, tags); |
| 297 tags = RawObject::ClassTag::update(cls.index(), tags); | 297 tags = RawObject::ClassTag::update(cls.index(), tags); |
| 298 __ movl(FieldAddress(EAX, GrowableObjectArray::tags_offset()), | 298 __ movl(FieldAddress(EAX, GrowableObjectArray::tags_offset()), |
| 299 Immediate(tags)); | 299 Immediate(tags)); |
| 300 | 300 |
| 301 // Store backing array object in growable array object. | 301 // Store backing array object in growable array object. |
| 302 __ movl(EBX, Address(ESP, kArrayOffset)); // data argument. | 302 __ movl(EBX, Address(ESP, kArrayOffset)); // data argument. |
| 303 __ StoreIntoObject(EAX, | 303 __ StoreIntoObject(EAX, |
| 304 FieldAddress(EAX, GrowableObjectArray::data_offset()), | 304 FieldAddress(EAX, GrowableObjectArray::data_offset()), |
| 305 EBX); | 305 EBX); |
| (...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1337 __ Bind(&is_true); | 1337 __ Bind(&is_true); |
| 1338 __ LoadObject(EAX, bool_true); | 1338 __ LoadObject(EAX, bool_true); |
| 1339 __ ret(); | 1339 __ ret(); |
| 1340 return true; | 1340 return true; |
| 1341 } | 1341 } |
| 1342 | 1342 |
| 1343 #undef __ | 1343 #undef __ |
| 1344 } // namespace dart | 1344 } // namespace dart |
| 1345 | 1345 |
| 1346 #endif // defined TARGET_ARCH_IA32 | 1346 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |