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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
306 | 306 |
307 | 307 |
308 Handle<Object> LookupIterator::GetDataValue() const { | 308 Handle<Object> LookupIterator::GetDataValue() const { |
309 DCHECK_EQ(DATA, state_); | 309 DCHECK_EQ(DATA, state_); |
310 Handle<Object> value = FetchValue(); | 310 Handle<Object> value = FetchValue(); |
311 return value; | 311 return value; |
312 } | 312 } |
313 | 313 |
314 | 314 |
315 Handle<Object> LookupIterator::WriteDataValue(Handle<Object> value) { | 315 Handle<Object> LookupIterator::WriteDataValue(Handle<Object> value) { |
316 DCHECK_EQ(DATA, state_); | 316 DCHECK(DATA == state_ || ACCESSOR == state_); |
arv (Not doing code reviews)
2015/02/26 22:30:37
Toon, this cannot be right.
What is the right way
Toon Verwaest
2015/02/27 12:44:10
This isn't right indeed. Are you sure you need thi
| |
317 Handle<JSObject> holder = GetHolder<JSObject>(); | 317 Handle<JSObject> holder = GetHolder<JSObject>(); |
318 if (holder_map_->is_dictionary_map()) { | 318 if (holder_map_->is_dictionary_map()) { |
319 NameDictionary* property_dictionary = holder->property_dictionary(); | 319 NameDictionary* property_dictionary = holder->property_dictionary(); |
320 if (holder->IsGlobalObject()) { | 320 if (holder->IsGlobalObject()) { |
321 Handle<PropertyCell> cell( | 321 Handle<PropertyCell> cell( |
322 PropertyCell::cast(property_dictionary->ValueAt(dictionary_entry()))); | 322 PropertyCell::cast(property_dictionary->ValueAt(dictionary_entry()))); |
323 value = PropertyCell::SetValueInferType(cell, value); | 323 value = PropertyCell::SetValueInferType(cell, value); |
324 } else { | 324 } else { |
325 property_dictionary->ValueAtPut(dictionary_entry(), *value); | 325 property_dictionary->ValueAtPut(dictionary_entry(), *value); |
326 } | 326 } |
(...skipping 26 matching lines...) Expand all Loading... | |
353 } | 353 } |
354 return false; | 354 return false; |
355 } | 355 } |
356 | 356 |
357 | 357 |
358 void LookupIterator::InternalizeName() { | 358 void LookupIterator::InternalizeName() { |
359 if (name_->IsUniqueName()) return; | 359 if (name_->IsUniqueName()) return; |
360 name_ = factory()->InternalizeString(Handle<String>::cast(name_)); | 360 name_ = factory()->InternalizeString(Handle<String>::cast(name_)); |
361 } | 361 } |
362 } } // namespace v8::internal | 362 } } // namespace v8::internal |
OLD | NEW |