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

Side by Side Diff: src/objects.cc

Issue 1142763002: Revert of Mark internal AccessorInfo properties as "special data properties" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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.h ('k') | src/objects-inl.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 #include <iomanip> 5 #include <iomanip>
6 #include <sstream> 6 #include <sstream>
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/accessors.h" 10 #include "src/accessors.h"
(...skipping 3176 matching lines...) Expand 10 before | Expand all | Expand 10 after
3187 JSObject::GetPropertyAttributesWithInterceptor( 3187 JSObject::GetPropertyAttributesWithInterceptor(
3188 it->GetHolder<JSObject>(), it->GetReceiver(), it->name()); 3188 it->GetHolder<JSObject>(), it->GetReceiver(), it->name());
3189 if (!maybe_attributes.IsJust()) return MaybeHandle<Object>(); 3189 if (!maybe_attributes.IsJust()) return MaybeHandle<Object>();
3190 done = maybe_attributes.FromJust() != ABSENT; 3190 done = maybe_attributes.FromJust() != ABSENT;
3191 if (done && (maybe_attributes.FromJust() & READ_ONLY) != 0) { 3191 if (done && (maybe_attributes.FromJust() & READ_ONLY) != 0) {
3192 return WriteToReadOnlyProperty(it, value, language_mode); 3192 return WriteToReadOnlyProperty(it, value, language_mode);
3193 } 3193 }
3194 } 3194 }
3195 break; 3195 break;
3196 3196
3197 case LookupIterator::ACCESSOR: { 3197 case LookupIterator::ACCESSOR:
3198 if (it->property_details().IsReadOnly()) { 3198 if (it->property_details().IsReadOnly()) {
3199 return WriteToReadOnlyProperty(it, value, language_mode); 3199 return WriteToReadOnlyProperty(it, value, language_mode);
3200 } 3200 }
3201 Handle<Object> accessors = it->GetAccessors();
3202 if (accessors->IsAccessorInfo() &&
3203 !it->HolderIsReceiverOrHiddenPrototype() &&
3204 AccessorInfo::cast(*accessors)->is_special_data_property()) {
3205 done = true;
3206 break;
3207 }
3208 return SetPropertyWithAccessor(it->GetReceiver(), it->name(), value, 3201 return SetPropertyWithAccessor(it->GetReceiver(), it->name(), value,
3209 it->GetHolder<JSObject>(), accessors, 3202 it->GetHolder<JSObject>(),
3210 language_mode); 3203 it->GetAccessors(), language_mode);
3211 } 3204
3212 case LookupIterator::INTEGER_INDEXED_EXOTIC: 3205 case LookupIterator::INTEGER_INDEXED_EXOTIC:
3213 done = true; 3206 done = true;
3214 break; 3207 break;
3215 3208
3216 case LookupIterator::DATA: 3209 case LookupIterator::DATA:
3217 if (it->property_details().IsReadOnly()) { 3210 if (it->property_details().IsReadOnly()) {
3218 return WriteToReadOnlyProperty(it, value, language_mode); 3211 return WriteToReadOnlyProperty(it, value, language_mode);
3219 } 3212 }
3220 if (it->HolderIsReceiverOrHiddenPrototype()) { 3213 if (it->HolderIsReceiverOrHiddenPrototype()) {
3221 return SetDataProperty(it, value); 3214 return SetDataProperty(it, value);
(...skipping 14023 matching lines...) Expand 10 before | Expand all | Expand 10 after
17245 void PropertyCell::SetValueWithInvalidation(Handle<PropertyCell> cell, 17238 void PropertyCell::SetValueWithInvalidation(Handle<PropertyCell> cell,
17246 Handle<Object> new_value) { 17239 Handle<Object> new_value) {
17247 if (cell->value() != *new_value) { 17240 if (cell->value() != *new_value) {
17248 cell->set_value(*new_value); 17241 cell->set_value(*new_value);
17249 Isolate* isolate = cell->GetIsolate(); 17242 Isolate* isolate = cell->GetIsolate();
17250 cell->dependent_code()->DeoptimizeDependentCodeGroup( 17243 cell->dependent_code()->DeoptimizeDependentCodeGroup(
17251 isolate, DependentCode::kPropertyCellChangedGroup); 17244 isolate, DependentCode::kPropertyCellChangedGroup);
17252 } 17245 }
17253 } 17246 }
17254 } } // namespace v8::internal 17247 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698