OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 5127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5138 if (this->HasFastProperties()) { | 5138 if (this->HasFastProperties()) { |
5139 // If the object has fast properties, check whether the first slot in the | 5139 // If the object has fast properties, check whether the first slot in the |
5140 // descriptor array matches the hidden symbol. Since the hidden symbols | 5140 // descriptor array matches the hidden symbol. Since the hidden symbols |
5141 // hash code is zero it will always occupy the first entry if present. | 5141 // hash code is zero it will always occupy the first entry if present. |
5142 DescriptorArray* descriptors = this->map()->instance_descriptors(); | 5142 DescriptorArray* descriptors = this->map()->instance_descriptors(); |
5143 if (descriptors->number_of_descriptors() > 0) { | 5143 if (descriptors->number_of_descriptors() > 0) { |
5144 if (descriptors->GetKey(0) == key) { | 5144 if (descriptors->GetKey(0) == key) { |
5145 #ifdef DEBUG | 5145 #ifdef DEBUG |
5146 PropertyDetails details(descriptors->GetDetails(0)); | 5146 PropertyDetails details(descriptors->GetDetails(0)); |
5147 ASSERT(details.type() == FIELD); | 5147 ASSERT(details.type() == FIELD); |
5148 #endif // DEBUG | 5148 #endif // DEBUG |
5149 Object* value = descriptors->GetValue(0); | 5149 Object* value = descriptors->GetValue(0); |
5150 return FastPropertyAt(Descriptor::IndexFromValue(value)); | 5150 return FastPropertyAt(Descriptor::IndexFromValue(value)); |
5151 } | 5151 } |
5152 } | 5152 } |
5153 } | 5153 } |
5154 | 5154 |
5155 // Only attempt to find the hidden properties in the local object and not | 5155 // Only attempt to find the hidden properties in the local object and not |
5156 // in the prototype chain. | 5156 // in the prototype chain. |
5157 if (!this->HasLocalProperty(key)) { | 5157 if (!this->HasLocalProperty(key)) { |
5158 // Hidden properties object not found. Allocate a new hidden properties | 5158 // Hidden properties object not found. Allocate a new hidden properties |
(...skipping 2216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7375 // No break point. | 7375 // No break point. |
7376 if (break_point_objects()->IsUndefined()) return 0; | 7376 if (break_point_objects()->IsUndefined()) return 0; |
7377 // Single beak point. | 7377 // Single beak point. |
7378 if (!break_point_objects()->IsFixedArray()) return 1; | 7378 if (!break_point_objects()->IsFixedArray()) return 1; |
7379 // Multiple break points. | 7379 // Multiple break points. |
7380 return FixedArray::cast(break_point_objects())->length(); | 7380 return FixedArray::cast(break_point_objects())->length(); |
7381 } | 7381 } |
7382 | 7382 |
7383 | 7383 |
7384 } } // namespace v8::internal | 7384 } } // namespace v8::internal |
OLD | NEW |