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

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

Issue 1237953002: Simplify PrepareForDataProperty in the IsElement case (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Only used to modify an existing value, so don't make holey 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/objects.cc ('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 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 688
689 bool Object::IsJSReceiver() const { 689 bool Object::IsJSReceiver() const {
690 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); 690 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE);
691 return IsHeapObject() && 691 return IsHeapObject() &&
692 HeapObject::cast(this)->map()->instance_type() >= FIRST_JS_RECEIVER_TYPE; 692 HeapObject::cast(this)->map()->instance_type() >= FIRST_JS_RECEIVER_TYPE;
693 } 693 }
694 694
695 695
696 bool Object::IsJSObject() const { 696 bool Object::IsJSObject() const {
697 STATIC_ASSERT(LAST_JS_OBJECT_TYPE == LAST_TYPE); 697 STATIC_ASSERT(LAST_JS_OBJECT_TYPE == LAST_TYPE);
698 return IsHeapObject() && 698 return IsHeapObject() && HeapObject::cast(this)->map()->IsJSObjectMap();
699 HeapObject::cast(this)->map()->instance_type() >= FIRST_JS_OBJECT_TYPE;
700 } 699 }
701 700
702 701
703 bool Object::IsJSProxy() const { 702 bool Object::IsJSProxy() const {
704 if (!Object::IsHeapObject()) return false; 703 if (!Object::IsHeapObject()) return false;
705 return HeapObject::cast(this)->map()->IsJSProxyMap(); 704 return HeapObject::cast(this)->map()->IsJSProxyMap();
706 } 705 }
707 706
708 707
709 TYPE_CHECKER(JSFunctionProxy, JS_FUNCTION_PROXY_TYPE) 708 TYPE_CHECKER(JSFunctionProxy, JS_FUNCTION_PROXY_TYPE)
(...skipping 6587 matching lines...) Expand 10 before | Expand all | Expand 10 after
7297 #undef READ_SHORT_FIELD 7296 #undef READ_SHORT_FIELD
7298 #undef WRITE_SHORT_FIELD 7297 #undef WRITE_SHORT_FIELD
7299 #undef READ_BYTE_FIELD 7298 #undef READ_BYTE_FIELD
7300 #undef WRITE_BYTE_FIELD 7299 #undef WRITE_BYTE_FIELD
7301 #undef NOBARRIER_READ_BYTE_FIELD 7300 #undef NOBARRIER_READ_BYTE_FIELD
7302 #undef NOBARRIER_WRITE_BYTE_FIELD 7301 #undef NOBARRIER_WRITE_BYTE_FIELD
7303 7302
7304 } } // namespace v8::internal 7303 } } // namespace v8::internal
7305 7304
7306 #endif // V8_OBJECTS_INL_H_ 7305 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698