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

Side by Side Diff: src/lookup.cc

Issue 888623002: Property reconfiguring implemented. Tests added. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Prototype transitions printing removed Created 5 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 | src/objects.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/deoptimizer.h" 8 #include "src/deoptimizer.h"
9 #include "src/lookup.h" 9 #include "src/lookup.h"
10 #include "src/lookup-inl.h" 10 #include "src/lookup-inl.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 void LookupIterator::ReconfigureDataProperty(Handle<Object> value, 99 void LookupIterator::ReconfigureDataProperty(Handle<Object> value,
100 PropertyAttributes attributes) { 100 PropertyAttributes attributes) {
101 DCHECK(state_ == DATA || state_ == ACCESSOR); 101 DCHECK(state_ == DATA || state_ == ACCESSOR);
102 DCHECK(HolderIsReceiverOrHiddenPrototype()); 102 DCHECK(HolderIsReceiverOrHiddenPrototype());
103 Handle<JSObject> holder = GetHolder<JSObject>(); 103 Handle<JSObject> holder = GetHolder<JSObject>();
104 if (holder_map_->is_dictionary_map()) { 104 if (holder_map_->is_dictionary_map()) {
105 PropertyDetails details(attributes, v8::internal::DATA, 0); 105 PropertyDetails details(attributes, v8::internal::DATA, 0);
106 JSObject::SetNormalizedProperty(holder, name(), value, details); 106 JSObject::SetNormalizedProperty(holder, name(), value, details);
107 } else { 107 } else {
108 holder_map_ = Map::ReconfigureDataProperty(holder_map_, descriptor_number(), 108 holder_map_ = Map::ReconfigureExistingProperty(
109 attributes); 109 holder_map_, descriptor_number(), i::kData, attributes);
110 holder_map_ =
111 Map::PrepareForDataProperty(holder_map_, descriptor_number(), value);
110 JSObject::MigrateToMap(holder, holder_map_); 112 JSObject::MigrateToMap(holder, holder_map_);
111 } 113 }
112 114
113 ReloadPropertyInformation(); 115 ReloadPropertyInformation();
114 } 116 }
115 117
116 118
117 void LookupIterator::PrepareTransitionToDataProperty( 119 void LookupIterator::PrepareTransitionToDataProperty(
118 Handle<Object> value, PropertyAttributes attributes, 120 Handle<Object> value, PropertyAttributes attributes,
119 Object::StoreFromKeyed store_mode) { 121 Object::StoreFromKeyed store_mode) {
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 } 353 }
352 return false; 354 return false;
353 } 355 }
354 356
355 357
356 void LookupIterator::InternalizeName() { 358 void LookupIterator::InternalizeName() {
357 if (name_->IsUniqueName()) return; 359 if (name_->IsUniqueName()) return;
358 name_ = factory()->InternalizeString(Handle<String>::cast(name_)); 360 name_ = factory()->InternalizeString(Handle<String>::cast(name_));
359 } 361 }
360 } } // namespace v8::internal 362 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698