| OLD | NEW |
| 1 # Copyright 2017 The Chromium Authors. All rights reserved. | 1 # Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 """Classes that comprise the data model for binary size analysis. | 4 """Classes that comprise the data model for binary size analysis. |
| 5 | 5 |
| 6 The primary classes are Symbol, and SymbolGroup. | 6 The primary classes are Symbol, and SymbolGroup. |
| 7 | 7 |
| 8 Description of common properties: | 8 Description of common properties: |
| 9 * address: The start address of the symbol. | 9 * address: The start address of the symbol. |
| 10 May be 0 (e.g. for .bss or for SymbolGroups). | 10 May be 0 (e.g. for .bss or for SymbolGroups). |
| (...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 | 676 |
| 677 def _ExtractPrefixBeforeSeparator(string, separator, count=1): | 677 def _ExtractPrefixBeforeSeparator(string, separator, count=1): |
| 678 idx = -len(separator) | 678 idx = -len(separator) |
| 679 prev_idx = None | 679 prev_idx = None |
| 680 for _ in xrange(count): | 680 for _ in xrange(count): |
| 681 idx = string.find(separator, idx + len(separator)) | 681 idx = string.find(separator, idx + len(separator)) |
| 682 if idx < 0: | 682 if idx < 0: |
| 683 break | 683 break |
| 684 prev_idx = idx | 684 prev_idx = idx |
| 685 return string[:prev_idx] | 685 return string[:prev_idx] |
| OLD | NEW |