| 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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 | 406 |
| 407 | 407 |
| 408 // Set data of growable object array. | 408 // Set data of growable object array. |
| 409 // On stack: growable array (+2), data (+1), return-address (+0). | 409 // On stack: growable array (+2), data (+1), return-address (+0). |
| 410 bool Intrinsifier::GrowableArray_setData(Assembler* assembler) { | 410 bool Intrinsifier::GrowableArray_setData(Assembler* assembler) { |
| 411 if (FLAG_enable_type_checks) { | 411 if (FLAG_enable_type_checks) { |
| 412 return false; | 412 return false; |
| 413 } | 413 } |
| 414 __ movl(EAX, Address(ESP, + 2 * kWordSize)); | 414 __ movl(EAX, Address(ESP, + 2 * kWordSize)); |
| 415 __ movl(EBX, Address(ESP, + 1 * kWordSize)); | 415 __ movl(EBX, Address(ESP, + 1 * kWordSize)); |
| 416 __ movl(FieldAddress(EAX, GrowableObjectArray::data_offset()), EBX); | 416 __ StoreIntoObject(EAX, |
| 417 FieldAddress(EAX, GrowableObjectArray::data_offset()), |
| 418 EBX); |
| 417 __ ret(); | 419 __ ret(); |
| 418 return true; | 420 return true; |
| 419 } | 421 } |
| 420 | 422 |
| 421 | 423 |
| 422 // Gets the length of a ByteArray. | 424 // Gets the length of a ByteArray. |
| 423 bool Intrinsifier::ByteArrayBase_getLength(Assembler* assembler) { | 425 bool Intrinsifier::ByteArrayBase_getLength(Assembler* assembler) { |
| 424 __ movl(EAX, Address(ESP, + 1 * kWordSize)); | 426 __ movl(EAX, Address(ESP, + 1 * kWordSize)); |
| 425 __ movl(EAX, FieldAddress(EAX, ByteArray::length_offset())); | 427 __ movl(EAX, FieldAddress(EAX, ByteArray::length_offset())); |
| 426 __ ret(); | 428 __ ret(); |
| (...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1361 __ Bind(&is_true); | 1363 __ Bind(&is_true); |
| 1362 __ LoadObject(EAX, bool_true); | 1364 __ LoadObject(EAX, bool_true); |
| 1363 __ ret(); | 1365 __ ret(); |
| 1364 return true; | 1366 return true; |
| 1365 } | 1367 } |
| 1366 | 1368 |
| 1367 #undef __ | 1369 #undef __ |
| 1368 } // namespace dart | 1370 } // namespace dart |
| 1369 | 1371 |
| 1370 #endif // defined TARGET_ARCH_IA32 | 1372 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |