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

Side by Side Diff: src/code-stub-assembler.cc

Issue 2555703003: [stubs] Add option to allow LO space allocation (Closed)
Patch Set: Address comments Created 4 years 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 | « src/code-stub-assembler.h ('k') | src/runtime/runtime-internal.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 #include "src/code-stub-assembler.h" 4 #include "src/code-stub-assembler.h"
5 #include "src/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/frames-inl.h" 6 #include "src/frames-inl.h"
7 #include "src/frames.h" 7 #include "src/frames.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 Node* top_address, 776 Node* top_address,
777 Node* limit_address) { 777 Node* limit_address) {
778 Node* top = Load(MachineType::Pointer(), top_address); 778 Node* top = Load(MachineType::Pointer(), top_address);
779 Node* limit = Load(MachineType::Pointer(), limit_address); 779 Node* limit = Load(MachineType::Pointer(), limit_address);
780 780
781 // If there's not enough space, call the runtime. 781 // If there's not enough space, call the runtime.
782 Variable result(this, MachineRepresentation::kTagged); 782 Variable result(this, MachineRepresentation::kTagged);
783 Label runtime_call(this, Label::kDeferred), no_runtime_call(this); 783 Label runtime_call(this, Label::kDeferred), no_runtime_call(this);
784 Label merge_runtime(this, &result); 784 Label merge_runtime(this, &result);
785 785
786 if (flags & kAllowLargeObjectAllocation) {
787 Label next(this);
788 GotoIf(IsRegularHeapObjectSize(size_in_bytes), &next);
789
790 Node* runtime_flags = SmiConstant(
791 Smi::FromInt(AllocateDoubleAlignFlag::encode(false) |
792 AllocateTargetSpace::encode(AllocationSpace::LO_SPACE)));
793 Node* const runtime_result =
794 CallRuntime(Runtime::kAllocateInTargetSpace, NoContextConstant(),
795 SmiTag(size_in_bytes), runtime_flags);
796 result.Bind(runtime_result);
797 Goto(&merge_runtime);
798
799 Bind(&next);
800 }
801
786 Node* new_top = IntPtrAdd(top, size_in_bytes); 802 Node* new_top = IntPtrAdd(top, size_in_bytes);
787 Branch(UintPtrGreaterThanOrEqual(new_top, limit), &runtime_call, 803 Branch(UintPtrGreaterThanOrEqual(new_top, limit), &runtime_call,
788 &no_runtime_call); 804 &no_runtime_call);
789 805
790 Bind(&runtime_call); 806 Bind(&runtime_call);
791 Node* runtime_result; 807 Node* runtime_result;
792 if (flags & kPretenured) { 808 if (flags & kPretenured) {
793 Node* runtime_flags = SmiConstant( 809 Node* runtime_flags = SmiConstant(
794 Smi::FromInt(AllocateDoubleAlignFlag::encode(false) | 810 Smi::FromInt(AllocateDoubleAlignFlag::encode(false) |
795 AllocateTargetSpace::encode(AllocationSpace::OLD_SPACE))); 811 AllocateTargetSpace::encode(AllocationSpace::OLD_SPACE)));
(...skipping 7410 matching lines...) Expand 10 before | Expand all | Expand 10 after
8206 8222
8207 Node* CodeStubAssembler::IsDebugActive() { 8223 Node* CodeStubAssembler::IsDebugActive() {
8208 Node* is_debug_active = Load( 8224 Node* is_debug_active = Load(
8209 MachineType::Uint8(), 8225 MachineType::Uint8(),
8210 ExternalConstant(ExternalReference::debug_is_active_address(isolate()))); 8226 ExternalConstant(ExternalReference::debug_is_active_address(isolate())));
8211 return WordNotEqual(is_debug_active, Int32Constant(0)); 8227 return WordNotEqual(is_debug_active, Int32Constant(0));
8212 } 8228 }
8213 8229
8214 } // namespace internal 8230 } // namespace internal
8215 } // namespace v8 8231 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stub-assembler.h ('k') | src/runtime/runtime-internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698