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

Side by Side Diff: src/objects.cc

Issue 1711813003: [classes] Support AccessorInfo-style data properties in super property stores. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | test/mjsunit/es6/classes-super.js » ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 "src/objects.h" 5 #include "src/objects.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <iomanip> 8 #include <iomanip>
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 4265 matching lines...) Expand 10 before | Expand all | Expand 10 after
4276 4276
4277 for (; own_lookup.IsFound(); own_lookup.Next()) { 4277 for (; own_lookup.IsFound(); own_lookup.Next()) {
4278 switch (own_lookup.state()) { 4278 switch (own_lookup.state()) {
4279 case LookupIterator::ACCESS_CHECK: 4279 case LookupIterator::ACCESS_CHECK:
4280 if (!own_lookup.HasAccess()) { 4280 if (!own_lookup.HasAccess()) {
4281 return JSObject::SetPropertyWithFailedAccessCheck(&own_lookup, value, 4281 return JSObject::SetPropertyWithFailedAccessCheck(&own_lookup, value,
4282 should_throw); 4282 should_throw);
4283 } 4283 }
4284 break; 4284 break;
4285 4285
4286 case LookupIterator::ACCESSOR:
4287 if (own_lookup.GetAccessors()->IsAccessorInfo()) {
4288 if (own_lookup.IsReadOnly()) {
4289 return WriteToReadOnlyProperty(&own_lookup, value, should_throw);
4290 }
4291 return JSObject::SetPropertyWithAccessor(&own_lookup, value,
4292 should_throw);
4293 }
4294 // Fall through.
4286 case LookupIterator::INTEGER_INDEXED_EXOTIC: 4295 case LookupIterator::INTEGER_INDEXED_EXOTIC:
4287 case LookupIterator::ACCESSOR:
4288 return RedefineIncompatibleProperty(isolate, it->GetName(), value, 4296 return RedefineIncompatibleProperty(isolate, it->GetName(), value,
4289 should_throw); 4297 should_throw);
4290 4298
4291 case LookupIterator::DATA: { 4299 case LookupIterator::DATA: {
4292 if (own_lookup.IsReadOnly()) { 4300 if (own_lookup.IsReadOnly()) {
4293 return WriteToReadOnlyProperty(&own_lookup, value, should_throw); 4301 return WriteToReadOnlyProperty(&own_lookup, value, should_throw);
4294 } 4302 }
4295 return SetDataProperty(&own_lookup, value); 4303 return SetDataProperty(&own_lookup, value);
4296 } 4304 }
4297 4305
(...skipping 15577 matching lines...) Expand 10 before | Expand all | Expand 10 after
19875 if (cell->value() != *new_value) { 19883 if (cell->value() != *new_value) {
19876 cell->set_value(*new_value); 19884 cell->set_value(*new_value);
19877 Isolate* isolate = cell->GetIsolate(); 19885 Isolate* isolate = cell->GetIsolate();
19878 cell->dependent_code()->DeoptimizeDependentCodeGroup( 19886 cell->dependent_code()->DeoptimizeDependentCodeGroup(
19879 isolate, DependentCode::kPropertyCellChangedGroup); 19887 isolate, DependentCode::kPropertyCellChangedGroup);
19880 } 19888 }
19881 } 19889 }
19882 19890
19883 } // namespace internal 19891 } // namespace internal
19884 } // namespace v8 19892 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/es6/classes-super.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698