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

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

Issue 2555693004: Sav: [turbofan][stubs] Further adapting machine graph verifier to code stubs. (Closed)
Patch Set: 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 | « no previous file | src/compiler/machine-graph-verifier.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 5494 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « no previous file | src/compiler/machine-graph-verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698