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

Side by Side Diff: runtime/vm/stub_code_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/stub_code_arm64.cc ('k') | runtime/vm/stub_code_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" 5 #include "vm/globals.h"
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/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 const intptr_t fixed_size = sizeof(RawArray) + kObjectAlignment - 1; 569 const intptr_t fixed_size = sizeof(RawArray) + kObjectAlignment - 1;
570 __ leal(EBX, Address(EDX, TIMES_2, fixed_size)); // EDX is Smi. 570 __ leal(EBX, Address(EDX, TIMES_2, fixed_size)); // EDX is Smi.
571 ASSERT(kSmiTagShift == 1); 571 ASSERT(kSmiTagShift == 1);
572 __ andl(EBX, Immediate(-kObjectAlignment)); 572 __ andl(EBX, Immediate(-kObjectAlignment));
573 573
574 // ECX: array element type. 574 // ECX: array element type.
575 // EDX: array length as Smi. 575 // EDX: array length as Smi.
576 // EBX: allocation size. 576 // EBX: allocation size.
577 577
578 const intptr_t cid = kArrayCid; 578 const intptr_t cid = kArrayCid;
579 Heap::Space space = Heap::SpaceForAllocation(cid); 579 Heap::Space space = Heap::kNew;
580 __ movl(EDI, Address(THR, Thread::heap_offset())); 580 __ movl(EDI, Address(THR, Thread::heap_offset()));
581 __ movl(EAX, Address(EDI, Heap::TopOffset(space))); 581 __ movl(EAX, Address(EDI, Heap::TopOffset(space)));
582 __ addl(EBX, EAX); 582 __ addl(EBX, EAX);
583 __ j(CARRY, &slow_case); 583 __ j(CARRY, &slow_case);
584 584
585 // Check if the allocation fits into the remaining space. 585 // Check if the allocation fits into the remaining space.
586 // EAX: potential new object start. 586 // EAX: potential new object start.
587 // EBX: potential next object start. 587 // EBX: potential next object start.
588 // EDI: heap. 588 // EDI: heap.
589 // ECX: array element type. 589 // ECX: array element type.
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 __ andl(EBX, Immediate(-kObjectAlignment)); 799 __ andl(EBX, Immediate(-kObjectAlignment));
800 800
801 __ MaybeTraceAllocation(kContextCid, 801 __ MaybeTraceAllocation(kContextCid,
802 EAX, 802 EAX,
803 &slow_case, 803 &slow_case,
804 Assembler::kFarJump); 804 Assembler::kFarJump);
805 805
806 // Now allocate the object. 806 // Now allocate the object.
807 // EDX: number of context variables. 807 // EDX: number of context variables.
808 const intptr_t cid = kContextCid; 808 const intptr_t cid = kContextCid;
809 Heap::Space space = Heap::SpaceForAllocation(cid); 809 Heap::Space space = Heap::kNew;
810 __ movl(ECX, Address(THR, Thread::heap_offset())); 810 __ movl(ECX, Address(THR, Thread::heap_offset()));
811 __ movl(EAX, Address(ECX, Heap::TopOffset(space))); 811 __ movl(EAX, Address(ECX, Heap::TopOffset(space)));
812 __ addl(EBX, EAX); 812 __ addl(EBX, EAX);
813 // Check if the allocation fits into the remaining space. 813 // Check if the allocation fits into the remaining space.
814 // EAX: potential new object. 814 // EAX: potential new object.
815 // EBX: potential next object start. 815 // EBX: potential next object start.
816 // EDX: number of context variables. 816 // EDX: number of context variables.
817 __ cmpl(EBX, Address(ECX, Heap::EndOffset(space))); 817 __ cmpl(EBX, Address(ECX, Heap::EndOffset(space)));
818 if (FLAG_use_slow_path) { 818 if (FLAG_use_slow_path) {
819 __ jmp(&slow_case); 819 __ jmp(&slow_case);
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 __ movl(EDX, Address(ESP, kObjectTypeArgumentsOffset)); 1011 __ movl(EDX, Address(ESP, kObjectTypeArgumentsOffset));
1012 // EDX: instantiated type arguments. 1012 // EDX: instantiated type arguments.
1013 } 1013 }
1014 Isolate* isolate = Isolate::Current(); 1014 Isolate* isolate = Isolate::Current();
1015 if (FLAG_inline_alloc && Heap::IsAllocatableInNewSpace(instance_size) && 1015 if (FLAG_inline_alloc && Heap::IsAllocatableInNewSpace(instance_size) &&
1016 !cls.TraceAllocation(isolate)) { 1016 !cls.TraceAllocation(isolate)) {
1017 Label slow_case; 1017 Label slow_case;
1018 // Allocate the object and update top to point to 1018 // Allocate the object and update top to point to
1019 // next object start and initialize the allocated object. 1019 // next object start and initialize the allocated object.
1020 // EDX: instantiated type arguments (if is_cls_parameterized). 1020 // EDX: instantiated type arguments (if is_cls_parameterized).
1021 Heap::Space space = Heap::SpaceForAllocation(cls.id()); 1021 Heap::Space space = Heap::kNew;
1022 __ movl(EDI, Address(THR, Thread::heap_offset())); 1022 __ movl(EDI, Address(THR, Thread::heap_offset()));
1023 __ movl(EAX, Address(EDI, Heap::TopOffset(space))); 1023 __ movl(EAX, Address(EDI, Heap::TopOffset(space)));
1024 __ leal(EBX, Address(EAX, instance_size)); 1024 __ leal(EBX, Address(EAX, instance_size));
1025 // Check if the allocation fits into the remaining space. 1025 // Check if the allocation fits into the remaining space.
1026 // EAX: potential new object start. 1026 // EAX: potential new object start.
1027 // EBX: potential next object start. 1027 // EBX: potential next object start.
1028 // EDI: heap. 1028 // EDI: heap.
1029 __ cmpl(EBX, Address(EDI, Heap::EndOffset(space))); 1029 __ cmpl(EBX, Address(EDI, Heap::EndOffset(space)));
1030 if (FLAG_use_slow_path) { 1030 if (FLAG_use_slow_path) {
1031 __ jmp(&slow_case); 1031 __ jmp(&slow_case);
(...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after
2091 2091
2092 2092
2093 2093
2094 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { 2094 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) {
2095 __ int3(); 2095 __ int3();
2096 } 2096 }
2097 2097
2098 } // namespace dart 2098 } // namespace dart
2099 2099
2100 #endif // defined TARGET_ARCH_IA32 2100 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_arm64.cc ('k') | runtime/vm/stub_code_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698