OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 1786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1797 // fit in a page). | 1797 // fit in a page). |
1798 static const int kMaxNumberOfDescriptors = 1024 + 512; | 1798 static const int kMaxNumberOfDescriptors = 1024 + 512; |
1799 | 1799 |
1800 private: | 1800 private: |
1801 // Conversion from descriptor number to array indices. | 1801 // Conversion from descriptor number to array indices. |
1802 static int ToKeyIndex(int descriptor_number) { | 1802 static int ToKeyIndex(int descriptor_number) { |
1803 return descriptor_number+kFirstIndex; | 1803 return descriptor_number+kFirstIndex; |
1804 } | 1804 } |
1805 | 1805 |
1806 static int ToDetailsIndex(int descriptor_number) { | 1806 static int ToDetailsIndex(int descriptor_number) { |
1807 return( descriptor_number << 1) + 1; | 1807 return (descriptor_number << 1) + 1; |
1808 } | 1808 } |
1809 | 1809 |
1810 static int ToValueIndex(int descriptor_number) { | 1810 static int ToValueIndex(int descriptor_number) { |
1811 return descriptor_number << 1; | 1811 return descriptor_number << 1; |
1812 } | 1812 } |
1813 | 1813 |
1814 bool is_null_descriptor(int descriptor_number) { | 1814 bool is_null_descriptor(int descriptor_number) { |
1815 return PropertyDetails(GetDetails(descriptor_number)).type() == | 1815 return PropertyDetails(GetDetails(descriptor_number)).type() == |
1816 NULL_DESCRIPTOR; | 1816 NULL_DESCRIPTOR; |
1817 } | 1817 } |
(...skipping 3048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4866 } else { | 4866 } else { |
4867 value &= ~(1 << bit_position); | 4867 value &= ~(1 << bit_position); |
4868 } | 4868 } |
4869 return value; | 4869 return value; |
4870 } | 4870 } |
4871 }; | 4871 }; |
4872 | 4872 |
4873 } } // namespace v8::internal | 4873 } } // namespace v8::internal |
4874 | 4874 |
4875 #endif // V8_OBJECTS_H_ | 4875 #endif // V8_OBJECTS_H_ |
OLD | NEW |