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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/access-builder.cc
diff --git a/src/compiler/access-builder.cc b/src/compiler/access-builder.cc
index 45173bfcf55e6c5342017aa0778ad1de8ab7b331..5aa71f726a30b8d35d3883d2fe526d4f9e554f8b 100644
--- a/src/compiler/access-builder.cc
+++ b/src/compiler/access-builder.cc
@@ -612,6 +612,29 @@ ElementAccess AccessBuilder::ForFixedArrayElement() {
return access;
}
+// static
+ElementAccess AccessBuilder::ForFixedArrayElement(ElementsKind kind) {
+ ElementAccess access = {kTaggedBase, FixedArray::kHeaderSize, Type::Any(),
+ MachineType::AnyTagged(), kFullWriteBarrier};
+ switch (kind) {
+ case FAST_SMI_ELEMENTS:
+ access.type = TypeCache::Get().kSmi;
+ access.write_barrier_kind = kNoWriteBarrier;
+ break;
+ case FAST_HOLEY_SMI_ELEMENTS:
+ access.type = TypeCache::Get().kHoleySmi;
+ break;
+ case FAST_ELEMENTS:
+ access.type = Type::NonInternal();
+ break;
+ case FAST_HOLEY_ELEMENTS:
+ break;
+ default:
+ UNREACHABLE();
+ break;
+ }
+ return access;
+}
// static
ElementAccess AccessBuilder::ForFixedDoubleArrayElement() {
« 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