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 4948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4959 // If the object has fast properties, check whether the first slot | 4959 // If the object has fast properties, check whether the first slot |
4960 // in the descriptor array matches the hidden string. Since the | 4960 // in the descriptor array matches the hidden string. Since the |
4961 // hidden strings hash code is zero (and no other name has hash | 4961 // hidden strings hash code is zero (and no other name has hash |
4962 // code zero) it will always occupy the first entry if present. | 4962 // code zero) it will always occupy the first entry if present. |
4963 DescriptorArray* descriptors = this->map()->instance_descriptors(); | 4963 DescriptorArray* descriptors = this->map()->instance_descriptors(); |
4964 if (descriptors->number_of_descriptors() > 0) { | 4964 if (descriptors->number_of_descriptors() > 0) { |
4965 int sorted_index = descriptors->GetSortedKeyIndex(0); | 4965 int sorted_index = descriptors->GetSortedKeyIndex(0); |
4966 if (descriptors->GetKey(sorted_index) == GetHeap()->hidden_string() && | 4966 if (descriptors->GetKey(sorted_index) == GetHeap()->hidden_string() && |
4967 sorted_index < map()->NumberOfOwnDescriptors()) { | 4967 sorted_index < map()->NumberOfOwnDescriptors()) { |
4968 ASSERT(descriptors->GetType(sorted_index) == FIELD); | 4968 ASSERT(descriptors->GetType(sorted_index) == FIELD); |
4969 MaybeObject* maybe_value = this->FastPropertyAt( | 4969 ASSERT(descriptors->GetDetails(sorted_index).representation(). |
4970 descriptors->GetDetails(sorted_index).representation(), | 4970 IsCompatibleForLoad(Representation::Tagged())); |
| 4971 inline_value = this->RawFastPropertyAt( |
4971 descriptors->GetFieldIndex(sorted_index)); | 4972 descriptors->GetFieldIndex(sorted_index)); |
4972 if (!maybe_value->To(&inline_value)) return maybe_value; | |
4973 } else { | 4973 } else { |
4974 inline_value = GetHeap()->undefined_value(); | 4974 inline_value = GetHeap()->undefined_value(); |
4975 } | 4975 } |
4976 } else { | 4976 } else { |
4977 inline_value = GetHeap()->undefined_value(); | 4977 inline_value = GetHeap()->undefined_value(); |
4978 } | 4978 } |
4979 } else { | 4979 } else { |
4980 PropertyAttributes attributes; | 4980 PropertyAttributes attributes; |
4981 // You can't install a getter on a property indexed by the hidden string, | 4981 // You can't install a getter on a property indexed by the hidden string, |
4982 // so we can be sure that GetLocalPropertyPostInterceptor returns a real | 4982 // so we can be sure that GetLocalPropertyPostInterceptor returns a real |
(...skipping 11413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16396 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16396 #define ERROR_MESSAGES_TEXTS(C, T) T, |
16397 static const char* error_messages_[] = { | 16397 static const char* error_messages_[] = { |
16398 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16398 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
16399 }; | 16399 }; |
16400 #undef ERROR_MESSAGES_TEXTS | 16400 #undef ERROR_MESSAGES_TEXTS |
16401 return error_messages_[reason]; | 16401 return error_messages_[reason]; |
16402 } | 16402 } |
16403 | 16403 |
16404 | 16404 |
16405 } } // namespace v8::internal | 16405 } } // namespace v8::internal |
OLD | NEW |