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

Unified Diff: src/compiler/access-info.cc

Issue 1433193003: [turbofan] Add support for fast elements access to sloppy/strict arguments. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | src/compiler/js-native-context-specialization.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/access-info.cc
diff --git a/src/compiler/access-info.cc b/src/compiler/access-info.cc
index 218e21af0cc641b412e30ac39445f0e1e31e0a09..436181b1750d277e82cdcc7f3b3b47f4d17d708a 100644
--- a/src/compiler/access-info.cc
+++ b/src/compiler/access-info.cc
@@ -19,10 +19,9 @@ namespace compiler {
namespace {
bool CanInlineElementAccess(Handle<Map> map) {
- // TODO(bmeurer): IsJSObjectMap
- // TODO(bmeurer): !map->has_dictionary_elements()
- // TODO(bmeurer): !map->has_sloppy_arguments_elements()
- return map->IsJSArrayMap() && map->has_fast_elements() &&
+ // TODO(bmeurer): Add support for holey elements.
+ return map->IsJSObjectMap() &&
+ IsFastPackedElementsKind(map->elements_kind()) &&
!map->has_indexed_interceptor() && !map->is_access_check_needed();
}
@@ -130,9 +129,7 @@ bool AccessInfoFactory::ComputeElementAccessInfo(
// Check if it is safe to inline element access for the {map}.
if (!CanInlineElementAccess(map)) return false;
- // TODO(bmeurer): Add support for holey elements.
ElementsKind elements_kind = map->elements_kind();
- if (IsHoleyElementsKind(elements_kind)) return false;
// Certain (monomorphic) stores need a prototype chain check because shape
// changes could allow callbacks on elements in the chain that are not
« no previous file with comments | « no previous file | src/compiler/js-native-context-specialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698