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

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

Issue 386027: Merge r3294 and r3295 to 1.3 branch.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/1.3/
Patch Set: Created 11 years, 1 month 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
« no previous file with comments | « src/objects.cc ('k') | src/version.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3025 matching lines...) Expand 10 before | Expand all | Expand 10 after
3036 3036
3037 Object* JSObject::GetPrototype() { 3037 Object* JSObject::GetPrototype() {
3038 return JSObject::cast(this)->map()->prototype(); 3038 return JSObject::cast(this)->map()->prototype();
3039 } 3039 }
3040 3040
3041 3041
3042 PropertyAttributes JSObject::GetPropertyAttribute(String* key) { 3042 PropertyAttributes JSObject::GetPropertyAttribute(String* key) {
3043 return GetPropertyAttributeWithReceiver(this, key); 3043 return GetPropertyAttributeWithReceiver(this, key);
3044 } 3044 }
3045 3045
3046 // TODO(504): this may be useful in other places too where JSGlobalProxy
3047 // is used.
3048 Object* JSObject::BypassGlobalProxy() {
3049 if (IsJSGlobalProxy()) {
3050 Object* proto = GetPrototype();
3051 if (proto->IsNull()) return Heap::undefined_value();
3052 ASSERT(proto->IsJSGlobalObject());
3053 return proto;
3054 }
3055 return this;
3056 }
3057
3058
3059 bool JSObject::HasHiddenPropertiesObject() {
3060 ASSERT(!IsJSGlobalProxy());
3061 return GetPropertyAttributePostInterceptor(this,
3062 Heap::hidden_symbol(),
3063 false) != ABSENT;
3064 }
3065
3066
3067 Object* JSObject::GetHiddenPropertiesObject() {
3068 ASSERT(!IsJSGlobalProxy());
3069 PropertyAttributes attributes;
3070 return GetLocalPropertyPostInterceptor(this,
3071 Heap::hidden_symbol(),
3072 &attributes);
3073 }
3074
3075
3076 Object* JSObject::SetHiddenPropertiesObject(Object* hidden_obj) {
3077 ASSERT(!IsJSGlobalProxy());
3078 return SetPropertyPostInterceptor(Heap::hidden_symbol(),
3079 hidden_obj,
3080 DONT_ENUM);
3081 }
3082
3046 3083
3047 bool JSObject::HasElement(uint32_t index) { 3084 bool JSObject::HasElement(uint32_t index) {
3048 return HasElementWithReceiver(this, index); 3085 return HasElementWithReceiver(this, index);
3049 } 3086 }
3050 3087
3051 3088
3052 bool AccessorInfo::all_can_read() { 3089 bool AccessorInfo::all_can_read() {
3053 return BooleanBit::get(flag(), kAllCanReadBit); 3090 return BooleanBit::get(flag(), kAllCanReadBit);
3054 } 3091 }
3055 3092
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
3149 #undef WRITE_INT_FIELD 3186 #undef WRITE_INT_FIELD
3150 #undef READ_SHORT_FIELD 3187 #undef READ_SHORT_FIELD
3151 #undef WRITE_SHORT_FIELD 3188 #undef WRITE_SHORT_FIELD
3152 #undef READ_BYTE_FIELD 3189 #undef READ_BYTE_FIELD
3153 #undef WRITE_BYTE_FIELD 3190 #undef WRITE_BYTE_FIELD
3154 3191
3155 3192
3156 } } // namespace v8::internal 3193 } } // namespace v8::internal
3157 3194
3158 #endif // V8_OBJECTS_INL_H_ 3195 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698