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

Side by Side Diff: src/compiler/access-builder.cc

Issue 2239703002: [turbofan] Add inlined Array.prototype.pop support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Only convert hole to undefined for holey elements Created 4 years, 4 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 | « src/compiler/access-builder.h ('k') | src/compiler/js-builtin-reducer.h » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 4
5 #include "src/compiler/access-builder.h" 5 #include "src/compiler/access-builder.h"
6 6
7 #include "src/contexts.h" 7 #include "src/contexts.h"
8 #include "src/frames.h" 8 #include "src/frames.h"
9 #include "src/handles-inl.h" 9 #include "src/handles-inl.h"
10 #include "src/heap/heap.h" 10 #include "src/heap/heap.h"
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 return access; 605 return access;
606 } 606 }
607 607
608 // static 608 // static
609 ElementAccess AccessBuilder::ForFixedArrayElement() { 609 ElementAccess AccessBuilder::ForFixedArrayElement() {
610 ElementAccess access = {kTaggedBase, FixedArray::kHeaderSize, Type::Tagged(), 610 ElementAccess access = {kTaggedBase, FixedArray::kHeaderSize, Type::Tagged(),
611 MachineType::AnyTagged(), kFullWriteBarrier}; 611 MachineType::AnyTagged(), kFullWriteBarrier};
612 return access; 612 return access;
613 } 613 }
614 614
615 // static
616 ElementAccess AccessBuilder::ForFixedArrayElement(ElementsKind kind) {
617 ElementAccess access = {kTaggedBase, FixedArray::kHeaderSize, Type::Any(),
618 MachineType::AnyTagged(), kFullWriteBarrier};
619 switch (kind) {
620 case FAST_SMI_ELEMENTS:
621 access.type = TypeCache::Get().kSmi;
622 access.write_barrier_kind = kNoWriteBarrier;
623 break;
624 case FAST_HOLEY_SMI_ELEMENTS:
625 access.type = TypeCache::Get().kHoleySmi;
626 break;
627 case FAST_ELEMENTS:
628 access.type = Type::NonInternal();
629 break;
630 case FAST_HOLEY_ELEMENTS:
631 break;
632 default:
633 UNREACHABLE();
634 break;
635 }
636 return access;
637 }
615 638
616 // static 639 // static
617 ElementAccess AccessBuilder::ForFixedDoubleArrayElement() { 640 ElementAccess AccessBuilder::ForFixedDoubleArrayElement() {
618 ElementAccess access = {kTaggedBase, FixedDoubleArray::kHeaderSize, 641 ElementAccess access = {kTaggedBase, FixedDoubleArray::kHeaderSize,
619 TypeCache::Get().kFloat64, MachineType::Float64(), 642 TypeCache::Get().kFloat64, MachineType::Float64(),
620 kNoWriteBarrier}; 643 kNoWriteBarrier};
621 return access; 644 return access;
622 } 645 }
623 646
624 647
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 } 695 }
673 UNREACHABLE(); 696 UNREACHABLE();
674 ElementAccess access = {kUntaggedBase, 0, Type::None(), MachineType::None(), 697 ElementAccess access = {kUntaggedBase, 0, Type::None(), MachineType::None(),
675 kNoWriteBarrier}; 698 kNoWriteBarrier};
676 return access; 699 return access;
677 } 700 }
678 701
679 } // namespace compiler 702 } // namespace compiler
680 } // namespace internal 703 } // namespace internal
681 } // namespace v8 704 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/access-builder.h ('k') | src/compiler/js-builtin-reducer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698