| 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 5494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5505 | 5505 |
| 5506 Node* delta = IntPtrOrSmiConstant(JSObject::kFieldsAdded, mode); | 5506 Node* delta = IntPtrOrSmiConstant(JSObject::kFieldsAdded, mode); |
| 5507 Node* new_capacity = IntPtrAdd(length, delta); | 5507 Node* new_capacity = IntPtrAdd(length, delta); |
| 5508 | 5508 |
| 5509 // Grow properties array. | 5509 // Grow properties array. |
| 5510 ElementsKind kind = FAST_ELEMENTS; | 5510 ElementsKind kind = FAST_ELEMENTS; |
| 5511 DCHECK(kMaxNumberOfDescriptors + JSObject::kFieldsAdded < | 5511 DCHECK(kMaxNumberOfDescriptors + JSObject::kFieldsAdded < |
| 5512 FixedArrayBase::GetMaxLengthForNewSpaceAllocation(kind)); | 5512 FixedArrayBase::GetMaxLengthForNewSpaceAllocation(kind)); |
| 5513 // The size of a new properties backing store is guaranteed to be small | 5513 // The size of a new properties backing store is guaranteed to be small |
| 5514 // enough that the new backing store will be allocated in new space. | 5514 // enough that the new backing store will be allocated in new space. |
| 5515 CSA_ASSERT(this, UintPtrLessThan(new_capacity, | 5515 CSA_ASSERT(this, UintPtrLessThan(new_capacity, IntPtrOrSmiConstant( |
| 5516 IntPtrConstant(kMaxNumberOfDescriptors + | 5516 kMaxNumberOfDescriptors + |
| 5517 JSObject::kFieldsAdded))); | 5517 JSObject::kFieldsAdded, |
| 5518 mode))); |
| 5518 | 5519 |
| 5519 Node* new_properties = AllocateFixedArray(kind, new_capacity, mode); | 5520 Node* new_properties = AllocateFixedArray(kind, new_capacity, mode); |
| 5520 | 5521 |
| 5521 FillFixedArrayWithValue(kind, new_properties, length, new_capacity, | 5522 FillFixedArrayWithValue(kind, new_properties, length, new_capacity, |
| 5522 Heap::kUndefinedValueRootIndex, mode); | 5523 Heap::kUndefinedValueRootIndex, mode); |
| 5523 | 5524 |
| 5524 // |new_properties| is guaranteed to be in new space, so we can skip | 5525 // |new_properties| is guaranteed to be in new space, so we can skip |
| 5525 // the write barrier. | 5526 // the write barrier. |
| 5526 CopyFixedArrayElements(kind, properties, new_properties, length, | 5527 CopyFixedArrayElements(kind, properties, new_properties, length, |
| 5527 SKIP_WRITE_BARRIER, mode); | 5528 SKIP_WRITE_BARRIER, mode); |
| (...skipping 2698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8226 | 8227 |
| 8227 Node* CodeStubAssembler::IsDebugActive() { | 8228 Node* CodeStubAssembler::IsDebugActive() { |
| 8228 Node* is_debug_active = Load( | 8229 Node* is_debug_active = Load( |
| 8229 MachineType::Uint8(), | 8230 MachineType::Uint8(), |
| 8230 ExternalConstant(ExternalReference::debug_is_active_address(isolate()))); | 8231 ExternalConstant(ExternalReference::debug_is_active_address(isolate()))); |
| 8231 return WordNotEqual(is_debug_active, Int32Constant(0)); | 8232 return WordNotEqual(is_debug_active, Int32Constant(0)); |
| 8232 } | 8233 } |
| 8233 | 8234 |
| 8234 } // namespace internal | 8235 } // namespace internal |
| 8235 } // namespace v8 | 8236 } // namespace v8 |
| OLD | NEW |