| 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.
|
|
|