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

Side by Side Diff: src/objects.cc

Issue 1107853002: Handlify ExecutableAccessorInfo::ClearSetter since it allocates. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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 4229 matching lines...) Expand 10 before | Expand all | Expand 10 after
4240 return value; 4240 return value;
4241 } 4241 }
4242 4242
4243 // Reconfigure the accessor if attributes mismatch. 4243 // Reconfigure the accessor if attributes mismatch.
4244 Handle<ExecutableAccessorInfo> new_data = Accessors::CloneAccessor( 4244 Handle<ExecutableAccessorInfo> new_data = Accessors::CloneAccessor(
4245 it.isolate(), Handle<ExecutableAccessorInfo>::cast(accessors)); 4245 it.isolate(), Handle<ExecutableAccessorInfo>::cast(accessors));
4246 new_data->set_property_attributes(attributes); 4246 new_data->set_property_attributes(attributes);
4247 // By clearing the setter we don't have to introduce a lookup to 4247 // By clearing the setter we don't have to introduce a lookup to
4248 // the setter, simply make it unavailable to reflect the 4248 // the setter, simply make it unavailable to reflect the
4249 // attributes. 4249 // attributes.
4250 if (attributes & READ_ONLY) new_data->clear_setter(); 4250 if (attributes & READ_ONLY) {
4251 ExecutableAccessorInfo::ClearSetter(new_data);
4252 }
4251 SetPropertyCallback(object, name, new_data, attributes); 4253 SetPropertyCallback(object, name, new_data, attributes);
4252 if (is_observed) { 4254 if (is_observed) {
4253 RETURN_ON_EXCEPTION( 4255 RETURN_ON_EXCEPTION(
4254 it.isolate(), 4256 it.isolate(),
4255 EnqueueChangeRecord(object, "reconfigure", name, 4257 EnqueueChangeRecord(object, "reconfigure", name,
4256 it.isolate()->factory()->the_hole_value()), 4258 it.isolate()->factory()->the_hole_value()),
4257 Object); 4259 Object);
4258 } 4260 }
4259 return value; 4261 return value;
4260 } 4262 }
(...skipping 12858 matching lines...) Expand 10 before | Expand all | Expand 10 after
17119 // Deopt when transitioning from a constant type. 17121 // Deopt when transitioning from a constant type.
17120 if (!invalidate && (old_type != new_type)) { 17122 if (!invalidate && (old_type != new_type)) {
17121 auto isolate = dictionary->GetIsolate(); 17123 auto isolate = dictionary->GetIsolate();
17122 cell->dependent_code()->DeoptimizeDependentCodeGroup( 17124 cell->dependent_code()->DeoptimizeDependentCodeGroup(
17123 isolate, DependentCode::kPropertyCellChangedGroup); 17125 isolate, DependentCode::kPropertyCellChangedGroup);
17124 } 17126 }
17125 return value; 17127 return value;
17126 } 17128 }
17127 17129
17128 } } // namespace v8::internal 17130 } } // 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