Index: src/accessors.cc |
diff --git a/src/accessors.cc b/src/accessors.cc |
index 02b96ca6ae696a26b1bbb0c63c07a2772e5aa022..e08f86fc22af30714250054f3a2aa7b167df5b4c 100644 |
--- a/src/accessors.cc |
+++ b/src/accessors.cc |
@@ -69,20 +69,10 @@ static V8_INLINE bool CheckForName(Handle<Name> name, |
// Returns true for properties that are accessors to object fields. |
// If true, *object_offset contains offset of object field. |
-template <class T> |
-bool Accessors::IsJSObjectFieldAccessor(typename T::TypeHandle type, |
- Handle<Name> name, |
+bool Accessors::IsJSObjectFieldAccessor(Handle<Map> map, Handle<Name> name, |
int* object_offset) { |
Isolate* isolate = name->GetIsolate(); |
- if (type->Is(T::String())) { |
- return CheckForName(name, isolate->factory()->length_string(), |
- String::kLengthOffset, object_offset); |
- } |
- |
- if (!type->IsClass()) return false; |
- Handle<Map> map = type->AsClass()->Map(); |
- |
switch (map->instance_type()) { |
case JS_ARRAY_TYPE: |
return |
@@ -107,23 +97,16 @@ bool Accessors::IsJSObjectFieldAccessor(typename T::TypeHandle type, |
CheckForName(name, isolate->factory()->byte_offset_string(), |
JSDataView::kByteOffsetOffset, object_offset); |
default: |
+ if (map->instance_type() < FIRST_NONSTRING_TYPE) { |
+ return CheckForName(name, isolate->factory()->length_string(), |
+ String::kLengthOffset, object_offset); |
+ } |
+ |
return false; |
} |
} |
-template |
-bool Accessors::IsJSObjectFieldAccessor<Type>(Type* type, |
- Handle<Name> name, |
- int* object_offset); |
- |
- |
-template |
-bool Accessors::IsJSObjectFieldAccessor<HeapType>(Handle<HeapType> type, |
- Handle<Name> name, |
- int* object_offset); |
- |
- |
bool SetPropertyOnInstanceIfInherited( |
Isolate* isolate, const v8::PropertyCallbackInfo<void>& info, |
v8::Local<v8::Name> name, Handle<Object> value) { |