OLD | NEW |
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 "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/allocation-site-scopes.h" | 8 #include "src/allocation-site-scopes.h" |
9 #include "src/api.h" | 9 #include "src/api.h" |
10 #include "src/arguments.h" | 10 #include "src/arguments.h" |
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 DCHECK(!HasFastProperties()); | 623 DCHECK(!HasFastProperties()); |
624 Object* value = property_dictionary()->ValueAt(result->GetDictionaryEntry()); | 624 Object* value = property_dictionary()->ValueAt(result->GetDictionaryEntry()); |
625 if (IsGlobalObject()) { | 625 if (IsGlobalObject()) { |
626 value = PropertyCell::cast(value)->value(); | 626 value = PropertyCell::cast(value)->value(); |
627 } | 627 } |
628 DCHECK(!value->IsPropertyCell() && !value->IsCell()); | 628 DCHECK(!value->IsPropertyCell() && !value->IsCell()); |
629 return value; | 629 return value; |
630 } | 630 } |
631 | 631 |
632 | 632 |
| 633 Handle<Object> JSObject::GetNormalizedProperty(Handle<JSObject> object, |
| 634 const LookupResult* result) { |
| 635 DCHECK(!object->HasFastProperties()); |
| 636 Isolate* isolate = object->GetIsolate(); |
| 637 Handle<Object> value( |
| 638 object->property_dictionary()->ValueAt(result->GetDictionaryEntry()), |
| 639 isolate); |
| 640 if (object->IsGlobalObject()) { |
| 641 value = handle(Handle<PropertyCell>::cast(value)->value(), isolate); |
| 642 DCHECK(!value->IsTheHole()); |
| 643 } |
| 644 DCHECK(!value->IsPropertyCell() && !value->IsCell()); |
| 645 return value; |
| 646 } |
| 647 |
| 648 |
633 void JSObject::SetNormalizedProperty(Handle<JSObject> object, | 649 void JSObject::SetNormalizedProperty(Handle<JSObject> object, |
634 Handle<Name> name, | 650 Handle<Name> name, |
635 Handle<Object> value, | 651 Handle<Object> value, |
636 PropertyDetails details) { | 652 PropertyDetails details) { |
637 DCHECK(!object->HasFastProperties()); | 653 DCHECK(!object->HasFastProperties()); |
638 Handle<NameDictionary> property_dictionary(object->property_dictionary()); | 654 Handle<NameDictionary> property_dictionary(object->property_dictionary()); |
639 | 655 |
640 if (!name->IsUniqueName()) { | 656 if (!name->IsUniqueName()) { |
641 name = object->GetIsolate()->factory()->InternalizeString( | 657 name = object->GetIsolate()->factory()->InternalizeString( |
642 Handle<String>::cast(name)); | 658 Handle<String>::cast(name)); |
(...skipping 15992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16635 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16651 #define ERROR_MESSAGES_TEXTS(C, T) T, |
16636 static const char* error_messages_[] = { | 16652 static const char* error_messages_[] = { |
16637 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16653 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
16638 }; | 16654 }; |
16639 #undef ERROR_MESSAGES_TEXTS | 16655 #undef ERROR_MESSAGES_TEXTS |
16640 return error_messages_[reason]; | 16656 return error_messages_[reason]; |
16641 } | 16657 } |
16642 | 16658 |
16643 | 16659 |
16644 } } // namespace v8::internal | 16660 } } // namespace v8::internal |
OLD | NEW |