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

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

Issue 426633002: Encapsulate type in the PropertyHandlerCompiler (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
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 6753 matching lines...) Expand 10 before | Expand all | Expand 10 after
6764 return AttributesField::decode(static_cast<uint32_t>(flag()->value())); 6764 return AttributesField::decode(static_cast<uint32_t>(flag()->value()));
6765 } 6765 }
6766 6766
6767 6767
6768 void AccessorInfo::set_property_attributes(PropertyAttributes attributes) { 6768 void AccessorInfo::set_property_attributes(PropertyAttributes attributes) {
6769 set_flag(Smi::FromInt(AttributesField::update(flag()->value(), attributes))); 6769 set_flag(Smi::FromInt(AttributesField::update(flag()->value(), attributes)));
6770 } 6770 }
6771 6771
6772 6772
6773 bool AccessorInfo::IsCompatibleReceiver(Object* receiver) { 6773 bool AccessorInfo::IsCompatibleReceiver(Object* receiver) {
6774 Object* function_template = expected_receiver_type(); 6774 if (!HasExpectedReceiverType()) return true;
6775 if (!function_template->IsFunctionTemplateInfo()) return true; 6775 if (!receiver->IsJSObject()) return false;
6776 return FunctionTemplateInfo::cast(function_template)->IsTemplateFor(receiver); 6776 return FunctionTemplateInfo::cast(expected_receiver_type())
6777 ->IsTemplateFor(JSObject::cast(receiver)->map());
6777 } 6778 }
6778 6779
6779 6780
6780 void ExecutableAccessorInfo::clear_setter() { 6781 void ExecutableAccessorInfo::clear_setter() {
6781 set_setter(GetIsolate()->heap()->undefined_value(), SKIP_WRITE_BARRIER); 6782 set_setter(GetIsolate()->heap()->undefined_value(), SKIP_WRITE_BARRIER);
6782 } 6783 }
6783 6784
6784 6785
6785 template<typename Derived, typename Shape, typename Key> 6786 template<typename Derived, typename Shape, typename Key>
6786 void Dictionary<Derived, Shape, Key>::SetEntry(int entry, 6787 void Dictionary<Derived, Shape, Key>::SetEntry(int entry,
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
7227 #undef READ_SHORT_FIELD 7228 #undef READ_SHORT_FIELD
7228 #undef WRITE_SHORT_FIELD 7229 #undef WRITE_SHORT_FIELD
7229 #undef READ_BYTE_FIELD 7230 #undef READ_BYTE_FIELD
7230 #undef WRITE_BYTE_FIELD 7231 #undef WRITE_BYTE_FIELD
7231 #undef NOBARRIER_READ_BYTE_FIELD 7232 #undef NOBARRIER_READ_BYTE_FIELD
7232 #undef NOBARRIER_WRITE_BYTE_FIELD 7233 #undef NOBARRIER_WRITE_BYTE_FIELD
7233 7234
7234 } } // namespace v8::internal 7235 } } // namespace v8::internal
7235 7236
7236 #endif // V8_OBJECTS_INL_H_ 7237 #endif // V8_OBJECTS_INL_H_
OLDNEW
« src/objects.cc ('K') | « src/objects.cc ('k') | src/stub-cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698