OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 14734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14745 } | 14745 } |
14746 | 14746 |
14747 | 14747 |
14748 PropertyCell* GlobalObject::GetPropertyCell(LookupResult* result) { | 14748 PropertyCell* GlobalObject::GetPropertyCell(LookupResult* result) { |
14749 ASSERT(!HasFastProperties()); | 14749 ASSERT(!HasFastProperties()); |
14750 Object* value = property_dictionary()->ValueAt(result->GetDictionaryEntry()); | 14750 Object* value = property_dictionary()->ValueAt(result->GetDictionaryEntry()); |
14751 return PropertyCell::cast(value); | 14751 return PropertyCell::cast(value); |
14752 } | 14752 } |
14753 | 14753 |
14754 | 14754 |
14755 Handle<PropertyCell> GlobalObject::EnsurePropertyCell( | 14755 Handle<PropertyCell> JSGlobalObject::EnsurePropertyCell( |
14756 Handle<GlobalObject> global, | 14756 Handle<JSGlobalObject> global, |
14757 Handle<Name> name) { | 14757 Handle<Name> name) { |
14758 ASSERT(!global->HasFastProperties()); | 14758 ASSERT(!global->HasFastProperties()); |
14759 int entry = global->property_dictionary()->FindEntry(*name); | 14759 int entry = global->property_dictionary()->FindEntry(*name); |
14760 if (entry == NameDictionary::kNotFound) { | 14760 if (entry == NameDictionary::kNotFound) { |
14761 Isolate* isolate = global->GetIsolate(); | 14761 Isolate* isolate = global->GetIsolate(); |
14762 Handle<PropertyCell> cell = isolate->factory()->NewPropertyCell( | 14762 Handle<PropertyCell> cell = isolate->factory()->NewPropertyCell( |
14763 isolate->factory()->the_hole_value()); | 14763 isolate->factory()->the_hole_value()); |
14764 PropertyDetails details(NONE, NORMAL, 0); | 14764 PropertyDetails details(NONE, NORMAL, 0); |
14765 details = details.AsDeleted(); | 14765 details = details.AsDeleted(); |
14766 Handle<NameDictionary> dictionary = NameDictionaryAdd( | 14766 Handle<NameDictionary> dictionary = NameDictionaryAdd( |
(...skipping 1632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16399 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16399 #define ERROR_MESSAGES_TEXTS(C, T) T, |
16400 static const char* error_messages_[] = { | 16400 static const char* error_messages_[] = { |
16401 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16401 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
16402 }; | 16402 }; |
16403 #undef ERROR_MESSAGES_TEXTS | 16403 #undef ERROR_MESSAGES_TEXTS |
16404 return error_messages_[reason]; | 16404 return error_messages_[reason]; |
16405 } | 16405 } |
16406 | 16406 |
16407 | 16407 |
16408 } } // namespace v8::internal | 16408 } } // namespace v8::internal |
OLD | NEW |