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

Side by Side Diff: runtime/vm/stub_code_mips.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_ia32.cc ('k') | runtime/vm/stub_code_x64.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_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
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/compiler.h" 10 #include "vm/compiler.h"
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 const intptr_t fixed_size = sizeof(RawArray) + kObjectAlignment - 1; 661 const intptr_t fixed_size = sizeof(RawArray) + kObjectAlignment - 1;
662 __ LoadImmediate(T2, fixed_size); 662 __ LoadImmediate(T2, fixed_size);
663 __ sll(T3, T3, 1); // T3 is a Smi. 663 __ sll(T3, T3, 1); // T3 is a Smi.
664 __ addu(T2, T2, T3); 664 __ addu(T2, T2, T3);
665 ASSERT(kSmiTagShift == 1); 665 ASSERT(kSmiTagShift == 1);
666 __ LoadImmediate(T3, ~(kObjectAlignment - 1)); 666 __ LoadImmediate(T3, ~(kObjectAlignment - 1));
667 __ and_(T2, T2, T3); 667 __ and_(T2, T2, T3);
668 668
669 // T2: Allocation size. 669 // T2: Allocation size.
670 670
671 Heap::Space space = Heap::SpaceForAllocation(cid); 671 Heap::Space space = Heap::kNew;
672 __ LoadIsolate(T3); 672 __ LoadIsolate(T3);
673 __ lw(T3, Address(T3, Isolate::heap_offset())); 673 __ lw(T3, Address(T3, Isolate::heap_offset()));
674 // Potential new object start. 674 // Potential new object start.
675 __ lw(T0, Address(T3, Heap::TopOffset(space))); 675 __ lw(T0, Address(T3, Heap::TopOffset(space)));
676 676
677 __ addu(T1, T0, T2); // Potential next object start. 677 __ addu(T1, T0, T2); // Potential next object start.
678 __ BranchUnsignedLess(T1, T0, &slow_case); // Branch on unsigned overflow. 678 __ BranchUnsignedLess(T1, T0, &slow_case); // Branch on unsigned overflow.
679 679
680 // Check if the allocation fits into the remaining space. 680 // Check if the allocation fits into the remaining space.
681 // T0: potential new object start. 681 // T0: potential new object start.
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 __ addu(T2, T2, T0); 933 __ addu(T2, T2, T0);
934 ASSERT(kSmiTagShift == 1); 934 ASSERT(kSmiTagShift == 1);
935 __ LoadImmediate(T0, ~((kObjectAlignment) - 1)); 935 __ LoadImmediate(T0, ~((kObjectAlignment) - 1));
936 __ and_(T2, T2, T0); 936 __ and_(T2, T2, T0);
937 937
938 __ MaybeTraceAllocation(kContextCid, T4, &slow_case); 938 __ MaybeTraceAllocation(kContextCid, T4, &slow_case);
939 // Now allocate the object. 939 // Now allocate the object.
940 // T1: number of context variables. 940 // T1: number of context variables.
941 // T2: object size. 941 // T2: object size.
942 const intptr_t cid = kContextCid; 942 const intptr_t cid = kContextCid;
943 Heap::Space space = Heap::SpaceForAllocation(cid); 943 Heap::Space space = Heap::kNew;
944 __ LoadIsolate(T5); 944 __ LoadIsolate(T5);
945 __ lw(T5, Address(T5, Isolate::heap_offset())); 945 __ lw(T5, Address(T5, Isolate::heap_offset()));
946 __ lw(V0, Address(T5, Heap::TopOffset(space))); 946 __ lw(V0, Address(T5, Heap::TopOffset(space)));
947 __ addu(T3, T2, V0); 947 __ addu(T3, T2, V0);
948 948
949 // Check if the allocation fits into the remaining space. 949 // Check if the allocation fits into the remaining space.
950 // V0: potential new object. 950 // V0: potential new object.
951 // T1: number of context variables. 951 // T1: number of context variables.
952 // T2: object size. 952 // T2: object size.
953 // T3: potential next object start. 953 // T3: potential next object start.
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
1128 __ lw(T1, Address(SP, 0 * kWordSize)); 1128 __ lw(T1, Address(SP, 0 * kWordSize));
1129 // T1: type arguments. 1129 // T1: type arguments.
1130 } 1130 }
1131 Isolate* isolate = Isolate::Current(); 1131 Isolate* isolate = Isolate::Current();
1132 if (FLAG_inline_alloc && Heap::IsAllocatableInNewSpace(instance_size) && 1132 if (FLAG_inline_alloc && Heap::IsAllocatableInNewSpace(instance_size) &&
1133 !cls.TraceAllocation(isolate)) { 1133 !cls.TraceAllocation(isolate)) {
1134 Label slow_case; 1134 Label slow_case;
1135 // Allocate the object and update top to point to 1135 // Allocate the object and update top to point to
1136 // next object start and initialize the allocated object. 1136 // next object start and initialize the allocated object.
1137 // T1: instantiated type arguments (if is_cls_parameterized). 1137 // T1: instantiated type arguments (if is_cls_parameterized).
1138 Heap::Space space = Heap::SpaceForAllocation(cls.id()); 1138 Heap::Space space = Heap::kNew;
1139 __ lw(T5, Address(THR, Thread::heap_offset())); 1139 __ lw(T5, Address(THR, Thread::heap_offset()));
1140 __ lw(T2, Address(T5, Heap::TopOffset(space))); 1140 __ lw(T2, Address(T5, Heap::TopOffset(space)));
1141 __ LoadImmediate(T4, instance_size); 1141 __ LoadImmediate(T4, instance_size);
1142 __ addu(T3, T2, T4); 1142 __ addu(T3, T2, T4);
1143 // Check if the allocation fits into the remaining space. 1143 // Check if the allocation fits into the remaining space.
1144 // T2: potential new object start. 1144 // T2: potential new object start.
1145 // T3: potential next object start. 1145 // T3: potential next object start.
1146 // T5: heap. 1146 // T5: heap.
1147 __ lw(CMPRES1, Address(T5, Heap::EndOffset(space))); 1147 __ lw(CMPRES1, Address(T5, Heap::EndOffset(space)));
1148 if (FLAG_use_slow_path) { 1148 if (FLAG_use_slow_path) {
(...skipping 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after
2344 } 2344 }
2345 2345
2346 2346
2347 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { 2347 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) {
2348 __ break_(0); 2348 __ break_(0);
2349 } 2349 }
2350 2350
2351 } // namespace dart 2351 } // namespace dart
2352 2352
2353 #endif // defined TARGET_ARCH_MIPS 2353 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_ia32.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698