| OLD | NEW |
| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 ReloadPropertyInformation(); | 95 ReloadPropertyInformation(); |
| 96 } | 96 } |
| 97 | 97 |
| 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, NORMAL, 0); | 105 PropertyDetails details(attributes, FIELD, 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::ReconfigureDataProperty(holder_map_, descriptor_number(), |
| 109 attributes); | 109 attributes); |
| 110 JSObject::MigrateToMap(holder, holder_map_); | 110 JSObject::MigrateToMap(holder, holder_map_); |
| 111 } | 111 } |
| 112 | 112 |
| 113 ReloadPropertyInformation(); | 113 ReloadPropertyInformation(); |
| 114 } | 114 } |
| 115 | 115 |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 } | 329 } |
| 330 return false; | 330 return false; |
| 331 } | 331 } |
| 332 | 332 |
| 333 | 333 |
| 334 void LookupIterator::InternalizeName() { | 334 void LookupIterator::InternalizeName() { |
| 335 if (name_->IsUniqueName()) return; | 335 if (name_->IsUniqueName()) return; |
| 336 name_ = factory()->InternalizeString(Handle<String>::cast(name_)); | 336 name_ = factory()->InternalizeString(Handle<String>::cast(name_)); |
| 337 } | 337 } |
| 338 } } // namespace v8::internal | 338 } } // namespace v8::internal |
| OLD | NEW |