| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 state_ = TRANSITION; | 138 state_ = TRANSITION; |
| 139 transition_ = transition; | 139 transition_ = transition; |
| 140 | 140 |
| 141 if (receiver->IsGlobalObject()) { | 141 if (receiver->IsGlobalObject()) { |
| 142 // Install a property cell. | 142 // Install a property cell. |
| 143 InternalizeName(); | 143 InternalizeName(); |
| 144 auto cell = GlobalObject::EnsurePropertyCell( | 144 auto cell = GlobalObject::EnsurePropertyCell( |
| 145 Handle<GlobalObject>::cast(receiver), name()); | 145 Handle<GlobalObject>::cast(receiver), name()); |
| 146 DCHECK(cell->value()->IsTheHole()); | 146 DCHECK(cell->value()->IsTheHole()); |
| 147 transition_ = cell; | 147 transition_ = cell; |
| 148 PropertyCell::SetValueInferType(cell, value); |
| 148 } else if (transition->GetBackPointer()->IsMap()) { | 149 } else if (transition->GetBackPointer()->IsMap()) { |
| 149 property_details_ = transition->GetLastDescriptorDetails(); | 150 property_details_ = transition->GetLastDescriptorDetails(); |
| 150 has_property_ = true; | 151 has_property_ = true; |
| 151 } | 152 } |
| 152 } | 153 } |
| 153 | 154 |
| 154 | 155 |
| 155 void LookupIterator::ApplyTransitionToDataProperty() { | 156 void LookupIterator::ApplyTransitionToDataProperty() { |
| 156 DCHECK_EQ(TRANSITION, state_); | 157 DCHECK_EQ(TRANSITION, state_); |
| 157 | 158 |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 } | 354 } |
| 354 return false; | 355 return false; |
| 355 } | 356 } |
| 356 | 357 |
| 357 | 358 |
| 358 void LookupIterator::InternalizeName() { | 359 void LookupIterator::InternalizeName() { |
| 359 if (name_->IsUniqueName()) return; | 360 if (name_->IsUniqueName()) return; |
| 360 name_ = factory()->InternalizeString(Handle<String>::cast(name_)); | 361 name_ = factory()->InternalizeString(Handle<String>::cast(name_)); |
| 361 } | 362 } |
| 362 } } // namespace v8::internal | 363 } } // namespace v8::internal |
| OLD | NEW |