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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 bool Intrinsifier::GrowableArray_setLength(Assembler* assembler) { | 407 bool Intrinsifier::GrowableArray_setLength(Assembler* assembler) { |
408 Label fall_through; | 408 Label fall_through; |
409 __ movl(EAX, Address(ESP, + 2 * kWordSize)); | 409 __ movl(EAX, Address(ESP, + 2 * kWordSize)); |
410 __ movl(EBX, Address(ESP, + 1 * kWordSize)); | 410 __ movl(EBX, Address(ESP, + 1 * kWordSize)); |
411 __ movl(EDI, FieldAddress(EAX, GrowableObjectArray::data_offset())); | 411 __ movl(EDI, FieldAddress(EAX, GrowableObjectArray::data_offset())); |
412 __ cmpl(EBX, FieldAddress(EDI, Array::length_offset())); | 412 __ cmpl(EBX, FieldAddress(EDI, Array::length_offset())); |
413 __ j(ABOVE, &fall_through, Assembler::kNearJump); | 413 __ j(ABOVE, &fall_through, Assembler::kNearJump); |
414 __ movl(FieldAddress(EAX, GrowableObjectArray::length_offset()), EBX); | 414 __ movl(FieldAddress(EAX, GrowableObjectArray::length_offset()), EBX); |
415 __ ret(); | 415 __ ret(); |
416 __ Bind(&fall_through); | 416 __ Bind(&fall_through); |
417 return true; | 417 return false; |
418 } | 418 } |
419 | 419 |
420 | 420 |
421 // Set data of growable object array. | 421 // Set data of growable object array. |
422 // On stack: growable array (+2), data (+1), return-address (+0). | 422 // On stack: growable array (+2), data (+1), return-address (+0). |
423 bool Intrinsifier::GrowableArray_setData(Assembler* assembler) { | 423 bool Intrinsifier::GrowableArray_setData(Assembler* assembler) { |
424 if (FLAG_enable_type_checks) { | 424 if (FLAG_enable_type_checks) { |
425 return false; | 425 return false; |
426 } | 426 } |
427 __ movl(EAX, Address(ESP, + 2 * kWordSize)); | 427 __ movl(EAX, Address(ESP, + 2 * kWordSize)); |
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1293 __ Bind(&is_true); | 1293 __ Bind(&is_true); |
1294 __ LoadObject(EAX, bool_true); | 1294 __ LoadObject(EAX, bool_true); |
1295 __ ret(); | 1295 __ ret(); |
1296 return true; | 1296 return true; |
1297 } | 1297 } |
1298 | 1298 |
1299 #undef __ | 1299 #undef __ |
1300 } // namespace dart | 1300 } // namespace dart |
1301 | 1301 |
1302 #endif // defined TARGET_ARCH_IA32 | 1302 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |