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

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

Issue 1409163007: [turbofan] We can inline property access for all primitives. (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/objects.h » ('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 ea93ed1ecb32c83369a9fd2f88fe75e13b5ddd9a..218e21af0cc641b412e30ac39445f0e1e31e0a09 100644
--- a/src/compiler/access-info.cc
+++ b/src/compiler/access-info.cc
@@ -28,8 +28,12 @@ bool CanInlineElementAccess(Handle<Map> map) {
bool CanInlinePropertyAccess(Handle<Map> map) {
- if (map->instance_type() == HEAP_NUMBER_TYPE) return true;
- if (map->instance_type() < FIRST_NONSTRING_TYPE) return true;
+ // We can inline property access to prototypes of all primitives, except
+ // the special Oddball ones that have no wrapper counterparts (i.e. Null,
+ // Undefined and TheHole).
+ STATIC_ASSERT(ODDBALL_TYPE == LAST_PRIMITIVE_TYPE);
+ if (map->IsBooleanMap()) return true;
+ if (map->instance_type() < LAST_PRIMITIVE_TYPE) return true;
return map->IsJSObjectMap() && !map->is_dictionary_map() &&
!map->has_named_interceptor() &&
// TODO(verwaest): Whitelist contexts to which we have access.
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698