| 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 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 7 | 7 |
| 8 #include "vm/intrinsifier.h" | 8 #include "vm/intrinsifier.h" |
| 9 | 9 |
| 10 #include "vm/assembler.h" | 10 #include "vm/assembler.h" |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 RBX); | 360 RBX); |
| 361 __ ret(); | 361 __ ret(); |
| 362 return true; | 362 return true; |
| 363 } | 363 } |
| 364 | 364 |
| 365 | 365 |
| 366 // Add an element to growable array if it doesn't need to grow, otherwise | 366 // Add an element to growable array if it doesn't need to grow, otherwise |
| 367 // call into regular code. | 367 // call into regular code. |
| 368 // On stack: growable array (+2), value (+1), return-address (+0). | 368 // On stack: growable array (+2), value (+1), return-address (+0). |
| 369 bool Intrinsifier::GrowableArray_add(Assembler* assembler) { | 369 bool Intrinsifier::GrowableArray_add(Assembler* assembler) { |
| 370 // TODO(srdjan): Enable once crash in apidoc.dart is fixed. |
| 371 return false; |
| 370 // In checked mode we need to check the incoming argument. | 372 // In checked mode we need to check the incoming argument. |
| 371 if (FLAG_enable_type_checks) return false; | 373 if (FLAG_enable_type_checks) return false; |
| 372 Label fall_through; | 374 Label fall_through; |
| 373 __ movq(RAX, Address(RSP, + 2 * kWordSize)); // Array. | 375 __ movq(RAX, Address(RSP, + 2 * kWordSize)); // Array. |
| 374 __ movq(RCX, FieldAddress(RAX, GrowableObjectArray::length_offset())); | 376 __ movq(RCX, FieldAddress(RAX, GrowableObjectArray::length_offset())); |
| 375 // RCX: length. | 377 // RCX: length. |
| 376 __ movq(RDX, FieldAddress(RAX, GrowableObjectArray::data_offset())); | 378 __ movq(RDX, FieldAddress(RAX, GrowableObjectArray::data_offset())); |
| 377 // RDX: data. | 379 // RDX: data. |
| 378 // Compare length with capacity. | 380 // Compare length with capacity. |
| 379 __ cmpq(RCX, FieldAddress(RDX, GrowableObjectArray::length_offset())); | 381 __ cmpq(RCX, FieldAddress(RDX, GrowableObjectArray::length_offset())); |
| (...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1349 __ LoadObject(RAX, bool_true); | 1351 __ LoadObject(RAX, bool_true); |
| 1350 __ ret(); | 1352 __ ret(); |
| 1351 return true; | 1353 return true; |
| 1352 } | 1354 } |
| 1353 | 1355 |
| 1354 #undef __ | 1356 #undef __ |
| 1355 | 1357 |
| 1356 } // namespace dart | 1358 } // namespace dart |
| 1357 | 1359 |
| 1358 #endif // defined TARGET_ARCH_X64 | 1360 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |