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

Side by Side Diff: src/objects-inl.h

Issue 1222543003: Micro-optimize lookupiterator: faster path for fast-mode objects (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « src/lookup-inl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 (HeapObject::cast(this)->map()->instance_type() == 1021 (HeapObject::cast(this)->map()->instance_type() ==
1022 JS_GLOBAL_PROXY_TYPE); 1022 JS_GLOBAL_PROXY_TYPE);
1023 DCHECK(!result || 1023 DCHECK(!result ||
1024 HeapObject::cast(this)->map()->is_access_check_needed()); 1024 HeapObject::cast(this)->map()->is_access_check_needed());
1025 return result; 1025 return result;
1026 } 1026 }
1027 1027
1028 1028
1029 bool Object::IsGlobalObject() const { 1029 bool Object::IsGlobalObject() const {
1030 if (!IsHeapObject()) return false; 1030 if (!IsHeapObject()) return false;
1031 1031 return HeapObject::cast(this)->map()->IsGlobalObjectMap();
1032 InstanceType type = HeapObject::cast(this)->map()->instance_type();
1033 return type == JS_GLOBAL_OBJECT_TYPE ||
1034 type == JS_BUILTINS_OBJECT_TYPE;
1035 } 1032 }
1036 1033
1037 1034
1038 TYPE_CHECKER(JSGlobalObject, JS_GLOBAL_OBJECT_TYPE) 1035 TYPE_CHECKER(JSGlobalObject, JS_GLOBAL_OBJECT_TYPE)
1039 TYPE_CHECKER(JSBuiltinsObject, JS_BUILTINS_OBJECT_TYPE) 1036 TYPE_CHECKER(JSBuiltinsObject, JS_BUILTINS_OBJECT_TYPE)
1040 1037
1041 1038
1042 bool Object::IsUndetectableObject() const { 1039 bool Object::IsUndetectableObject() const {
1043 return IsHeapObject() 1040 return IsHeapObject()
1044 && HeapObject::cast(this)->map()->is_undetectable(); 1041 && HeapObject::cast(this)->map()->is_undetectable();
(...skipping 6259 matching lines...) Expand 10 before | Expand all | Expand 10 after
7304 #undef READ_SHORT_FIELD 7301 #undef READ_SHORT_FIELD
7305 #undef WRITE_SHORT_FIELD 7302 #undef WRITE_SHORT_FIELD
7306 #undef READ_BYTE_FIELD 7303 #undef READ_BYTE_FIELD
7307 #undef WRITE_BYTE_FIELD 7304 #undef WRITE_BYTE_FIELD
7308 #undef NOBARRIER_READ_BYTE_FIELD 7305 #undef NOBARRIER_READ_BYTE_FIELD
7309 #undef NOBARRIER_WRITE_BYTE_FIELD 7306 #undef NOBARRIER_WRITE_BYTE_FIELD
7310 7307
7311 } } // namespace v8::internal 7308 } } // namespace v8::internal
7312 7309
7313 #endif // V8_OBJECTS_INL_H_ 7310 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/lookup-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698