| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 assertEntry(codeMap, 'code1', 0x1500); | 107 assertEntry(codeMap, 'code1', 0x1500); |
| 108 assertEntry(codeMap, 'code2', 0x1700); | 108 assertEntry(codeMap, 'code2', 0x1700); |
| 109 codeMap.moveCode(0x1500, 0x1800); | 109 codeMap.moveCode(0x1500, 0x1800); |
| 110 assertNoEntry(codeMap, 0x1500); | 110 assertNoEntry(codeMap, 0x1500); |
| 111 assertEntry(codeMap, 'code2', 0x1700); | 111 assertEntry(codeMap, 'code2', 0x1700); |
| 112 assertEntry(codeMap, 'code1', 0x1800); | 112 assertEntry(codeMap, 'code1', 0x1800); |
| 113 codeMap.deleteCode(0x1700); | 113 codeMap.deleteCode(0x1700); |
| 114 assertNoEntry(codeMap, 0x1700); | 114 assertNoEntry(codeMap, 0x1700); |
| 115 assertEntry(codeMap, 'code1', 0x1800); | 115 assertEntry(codeMap, 'code1', 0x1800); |
| 116 })(); | 116 })(); |
| 117 |
| 118 |
| 119 (function testDynamicNamesDuplicates() { |
| 120 var codeMap = new devtools.profiler.CodeMap(); |
| 121 // Code entries with same names but different addresses. |
| 122 codeMap.addCode(0x1500, newCodeEntry(0x200, 'code')); |
| 123 codeMap.addCode(0x1700, newCodeEntry(0x100, 'code')); |
| 124 assertEntry(codeMap, 'code', 0x1500); |
| 125 assertEntry(codeMap, 'code {1}', 0x1700); |
| 126 })(); |
| OLD | NEW |