Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: runtime/vm/assembler_ia32.cc

Issue 2119633002: Remove support for pretenuring as it is not fully implemented and is currently turned on for a very… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address self review changes. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/assembler_arm64.cc ('k') | runtime/vm/assembler_mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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" // NOLINT 5 #include "vm/globals.h" // NOLINT
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 2755 matching lines...) Expand 10 before | Expand all | Expand 10 after
2766 Register instance_reg, 2766 Register instance_reg,
2767 Register temp_reg) { 2767 Register temp_reg) {
2768 ASSERT(failure != NULL); 2768 ASSERT(failure != NULL);
2769 ASSERT(temp_reg != kNoRegister); 2769 ASSERT(temp_reg != kNoRegister);
2770 if (FLAG_inline_alloc) { 2770 if (FLAG_inline_alloc) {
2771 // If this allocation is traced, program will jump to failure path 2771 // If this allocation is traced, program will jump to failure path
2772 // (i.e. the allocation stub) which will allocate the object and trace the 2772 // (i.e. the allocation stub) which will allocate the object and trace the
2773 // allocation call site. 2773 // allocation call site.
2774 MaybeTraceAllocation(cls.id(), temp_reg, failure, near_jump); 2774 MaybeTraceAllocation(cls.id(), temp_reg, failure, near_jump);
2775 const intptr_t instance_size = cls.instance_size(); 2775 const intptr_t instance_size = cls.instance_size();
2776 Heap::Space space = Heap::SpaceForAllocation(cls.id()); 2776 Heap::Space space = Heap::kNew;
2777 movl(temp_reg, Address(THR, Thread::heap_offset())); 2777 movl(temp_reg, Address(THR, Thread::heap_offset()));
2778 movl(instance_reg, Address(temp_reg, Heap::TopOffset(space))); 2778 movl(instance_reg, Address(temp_reg, Heap::TopOffset(space)));
2779 addl(instance_reg, Immediate(instance_size)); 2779 addl(instance_reg, Immediate(instance_size));
2780 // instance_reg: potential next object start. 2780 // instance_reg: potential next object start.
2781 cmpl(instance_reg, Address(temp_reg, Heap::EndOffset(space))); 2781 cmpl(instance_reg, Address(temp_reg, Heap::EndOffset(space)));
2782 j(ABOVE_EQUAL, failure, near_jump); 2782 j(ABOVE_EQUAL, failure, near_jump);
2783 // Successfully allocated the object, now update top to point to 2783 // Successfully allocated the object, now update top to point to
2784 // next object start and store the class in the class field of object. 2784 // next object start and store the class in the class field of object.
2785 movl(Address(temp_reg, Heap::TopOffset(space)), instance_reg); 2785 movl(Address(temp_reg, Heap::TopOffset(space)), instance_reg);
2786 UpdateAllocationStats(cls.id(), temp_reg, space); 2786 UpdateAllocationStats(cls.id(), temp_reg, space);
(...skipping 17 matching lines...) Expand all
2804 Register instance, 2804 Register instance,
2805 Register end_address, 2805 Register end_address,
2806 Register temp_reg) { 2806 Register temp_reg) {
2807 ASSERT(failure != NULL); 2807 ASSERT(failure != NULL);
2808 ASSERT(temp_reg != kNoRegister); 2808 ASSERT(temp_reg != kNoRegister);
2809 if (FLAG_inline_alloc) { 2809 if (FLAG_inline_alloc) {
2810 // If this allocation is traced, program will jump to failure path 2810 // If this allocation is traced, program will jump to failure path
2811 // (i.e. the allocation stub) which will allocate the object and trace the 2811 // (i.e. the allocation stub) which will allocate the object and trace the
2812 // allocation call site. 2812 // allocation call site.
2813 MaybeTraceAllocation(cid, temp_reg, failure, near_jump); 2813 MaybeTraceAllocation(cid, temp_reg, failure, near_jump);
2814 Heap::Space space = Heap::SpaceForAllocation(cid); 2814 Heap::Space space = Heap::kNew;
2815 movl(temp_reg, Address(THR, Thread::heap_offset())); 2815 movl(temp_reg, Address(THR, Thread::heap_offset()));
2816 movl(instance, Address(temp_reg, Heap::TopOffset(space))); 2816 movl(instance, Address(temp_reg, Heap::TopOffset(space)));
2817 movl(end_address, instance); 2817 movl(end_address, instance);
2818 2818
2819 addl(end_address, Immediate(instance_size)); 2819 addl(end_address, Immediate(instance_size));
2820 j(CARRY, failure); 2820 j(CARRY, failure);
2821 2821
2822 // Check if the allocation fits into the remaining space. 2822 // Check if the allocation fits into the remaining space.
2823 // EAX: potential new object start. 2823 // EAX: potential new object start.
2824 // EBX: potential next object start. 2824 // EBX: potential next object start.
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
3178 3178
3179 const char* Assembler::FpuRegisterName(FpuRegister reg) { 3179 const char* Assembler::FpuRegisterName(FpuRegister reg) {
3180 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); 3180 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters));
3181 return xmm_reg_names[reg]; 3181 return xmm_reg_names[reg];
3182 } 3182 }
3183 3183
3184 3184
3185 } // namespace dart 3185 } // namespace dart
3186 3186
3187 #endif // defined TARGET_ARCH_IA32 3187 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm64.cc ('k') | runtime/vm/assembler_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698