| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |