OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 10342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10353 return result.IsFound() && (result.type() == CALLBACKS); | 10353 return result.IsFound() && (result.type() == CALLBACKS); |
10354 } | 10354 } |
10355 | 10355 |
10356 | 10356 |
10357 int JSObject::NumberOfLocalProperties(PropertyAttributes filter) { | 10357 int JSObject::NumberOfLocalProperties(PropertyAttributes filter) { |
10358 if (HasFastProperties()) { | 10358 if (HasFastProperties()) { |
10359 DescriptorArray* descs = map()->instance_descriptors(); | 10359 DescriptorArray* descs = map()->instance_descriptors(); |
10360 int result = 0; | 10360 int result = 0; |
10361 for (int i = 0; i < descs->number_of_descriptors(); i++) { | 10361 for (int i = 0; i < descs->number_of_descriptors(); i++) { |
10362 PropertyDetails details(descs->GetDetails(i)); | 10362 PropertyDetails details(descs->GetDetails(i)); |
10363 if (details.IsProperty() && (details.attributes() & filter) == 0) { | 10363 if (descs->IsProperty(i) && (details.attributes() & filter) == 0) { |
10364 result++; | 10364 result++; |
10365 } | 10365 } |
10366 } | 10366 } |
10367 return result; | 10367 return result; |
10368 } else { | 10368 } else { |
10369 return property_dictionary()->NumberOfElementsFilterAttributes(filter); | 10369 return property_dictionary()->NumberOfElementsFilterAttributes(filter); |
10370 } | 10370 } |
10371 } | 10371 } |
10372 | 10372 |
10373 | 10373 |
(...skipping 2665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13039 if (break_point_objects()->IsUndefined()) return 0; | 13039 if (break_point_objects()->IsUndefined()) return 0; |
13040 // Single break point. | 13040 // Single break point. |
13041 if (!break_point_objects()->IsFixedArray()) return 1; | 13041 if (!break_point_objects()->IsFixedArray()) return 1; |
13042 // Multiple break points. | 13042 // Multiple break points. |
13043 return FixedArray::cast(break_point_objects())->length(); | 13043 return FixedArray::cast(break_point_objects())->length(); |
13044 } | 13044 } |
13045 #endif // ENABLE_DEBUGGER_SUPPORT | 13045 #endif // ENABLE_DEBUGGER_SUPPORT |
13046 | 13046 |
13047 | 13047 |
13048 } } // namespace v8::internal | 13048 } } // namespace v8::internal |
OLD | NEW |