| 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 #include "vm/globals.h" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 7 | 7 |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 void StubCode::GenerateAllocateArrayStub(Assembler* assembler) { | 465 void StubCode::GenerateAllocateArrayStub(Assembler* assembler) { |
| 466 Label slow_case; | 466 Label slow_case; |
| 467 const Immediate& raw_null = | 467 const Immediate& raw_null = |
| 468 Immediate(reinterpret_cast<intptr_t>(Object::null())); | 468 Immediate(reinterpret_cast<intptr_t>(Object::null())); |
| 469 | 469 |
| 470 if (FLAG_inline_alloc) { | 470 if (FLAG_inline_alloc) { |
| 471 // Compute the size to be allocated, it is based on the array length | 471 // Compute the size to be allocated, it is based on the array length |
| 472 // and is computed as: | 472 // and is computed as: |
| 473 // RoundedAllocationSize((array_length * kwordSize) + sizeof(RawArray)). | 473 // RoundedAllocationSize((array_length * kwordSize) + sizeof(RawArray)). |
| 474 // Assert that length is a Smi. | 474 // Assert that length is a Smi. |
| 475 __ testq(R10, Immediate(kSmiTagSize)); | 475 __ testq(R10, Immediate(kSmiTagMask)); |
| 476 if (FLAG_use_slow_path) { | 476 if (FLAG_use_slow_path) { |
| 477 __ jmp(&slow_case); | 477 __ jmp(&slow_case); |
| 478 } else { | 478 } else { |
| 479 __ j(NOT_ZERO, &slow_case); | 479 __ j(NOT_ZERO, &slow_case); |
| 480 } | 480 } |
| 481 __ movq(R13, FieldAddress(CTX, Context::isolate_offset())); | 481 __ movq(R13, FieldAddress(CTX, Context::isolate_offset())); |
| 482 __ movq(R13, Address(R13, Isolate::heap_offset())); | 482 __ movq(R13, Address(R13, Isolate::heap_offset())); |
| 483 __ movq(R13, Address(R13, Heap::new_space_offset())); | 483 __ movq(R13, Address(R13, Heap::new_space_offset())); |
| 484 | 484 |
| 485 // Calculate and align allocation size. | 485 // Calculate and align allocation size. |
| (...skipping 1586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2072 __ cmpq(left, right); | 2072 __ cmpq(left, right); |
| 2073 __ Bind(&done); | 2073 __ Bind(&done); |
| 2074 __ popq(right); | 2074 __ popq(right); |
| 2075 __ popq(left); | 2075 __ popq(left); |
| 2076 __ ret(); | 2076 __ ret(); |
| 2077 } | 2077 } |
| 2078 | 2078 |
| 2079 } // namespace dart | 2079 } // namespace dart |
| 2080 | 2080 |
| 2081 #endif // defined TARGET_ARCH_X64 | 2081 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |