Lines Matching refs:codeMap
37 function assertEntry(codeMap, expected_name, addr) { argument
38 var entry = codeMap.findEntry(addr);
44 function assertNoEntry(codeMap, addr) { argument
45 assertNull(codeMap.findEntry(addr), 'at ' + addr.toString(16));
50 var codeMap = new CodeMap();
51 codeMap.addLibrary(0x1500, newCodeEntry(0x3000, 'lib1'));
52 codeMap.addLibrary(0x15500, newCodeEntry(0x5000, 'lib2'));
53 codeMap.addLibrary(0x155500, newCodeEntry(0x10000, 'lib3'));
54 assertNoEntry(codeMap, 0);
55 assertNoEntry(codeMap, 0x1500 - 1);
56 assertEntry(codeMap, 'lib1', 0x1500);
57 assertEntry(codeMap, 'lib1', 0x1500 + 0x100);
58 assertEntry(codeMap, 'lib1', 0x1500 + 0x1000);
59 assertEntry(codeMap, 'lib1', 0x1500 + 0x3000 - 1);
60 assertNoEntry(codeMap, 0x1500 + 0x3000);
61 assertNoEntry(codeMap, 0x15500 - 1);
62 assertEntry(codeMap, 'lib2', 0x15500);
63 assertEntry(codeMap, 'lib2', 0x15500 + 0x100);
64 assertEntry(codeMap, 'lib2', 0x15500 + 0x1000);
65 assertEntry(codeMap, 'lib2', 0x15500 + 0x5000 - 1);
66 assertNoEntry(codeMap, 0x15500 + 0x5000);
67 assertNoEntry(codeMap, 0x155500 - 1);
68 assertEntry(codeMap, 'lib3', 0x155500);
69 assertEntry(codeMap, 'lib3', 0x155500 + 0x100);
70 assertEntry(codeMap, 'lib3', 0x155500 + 0x1000);
71 assertEntry(codeMap, 'lib3', 0x155500 + 0x10000 - 1);
72 assertNoEntry(codeMap, 0x155500 + 0x10000);
73 assertNoEntry(codeMap, 0xFFFFFFFF);
75 codeMap.addStaticCode(0x1510, newCodeEntry(0x30, 'lib1-f1'));
76 codeMap.addStaticCode(0x1600, newCodeEntry(0x50, 'lib1-f2'));
77 codeMap.addStaticCode(0x15520, newCodeEntry(0x100, 'lib2-f1'));
78 assertEntry(codeMap, 'lib1', 0x1500);
79 assertEntry(codeMap, 'lib1', 0x1510 - 1);
80 assertEntry(codeMap, 'lib1-f1', 0x1510);
81 assertEntry(codeMap, 'lib1-f1', 0x1510 + 0x15);
82 assertEntry(codeMap, 'lib1-f1', 0x1510 + 0x30 - 1);
83 assertEntry(codeMap, 'lib1', 0x1510 + 0x30);
84 assertEntry(codeMap, 'lib1', 0x1600 - 1);
85 assertEntry(codeMap, 'lib1-f2', 0x1600);
86 assertEntry(codeMap, 'lib1-f2', 0x1600 + 0x30);
87 assertEntry(codeMap, 'lib1-f2', 0x1600 + 0x50 - 1);
88 assertEntry(codeMap, 'lib1', 0x1600 + 0x50);
89 assertEntry(codeMap, 'lib2', 0x15500);
90 assertEntry(codeMap, 'lib2', 0x15520 - 1);
91 assertEntry(codeMap, 'lib2-f1', 0x15520);
92 assertEntry(codeMap, 'lib2-f1', 0x15520 + 0x80);
93 assertEntry(codeMap, 'lib2-f1', 0x15520 + 0x100 - 1);
94 assertEntry(codeMap, 'lib2', 0x15520 + 0x100);
100 var codeMap = new CodeMap();
101 codeMap.addCode(0x1500, newCodeEntry(0x200, 'code1'));
102 codeMap.addCode(0x1700, newCodeEntry(0x100, 'code2'));
103 codeMap.addCode(0x1900, newCodeEntry(0x50, 'code3'));
104 codeMap.addCode(0x1950, newCodeEntry(0x10, 'code4'));
105 assertNoEntry(codeMap, 0);
106 assertNoEntry(codeMap, 0x1500 - 1);
107 assertEntry(codeMap, 'code1', 0x1500);
108 assertEntry(codeMap, 'code1', 0x1500 + 0x100);
109 assertEntry(codeMap, 'code1', 0x1500 + 0x200 - 1);
110 assertEntry(codeMap, 'code2', 0x1700);
111 assertEntry(codeMap, 'code2', 0x1700 + 0x50);
112 assertEntry(codeMap, 'code2', 0x1700 + 0x100 - 1);
113 assertNoEntry(codeMap, 0x1700 + 0x100);
114 assertNoEntry(codeMap, 0x1900 - 1);
115 assertEntry(codeMap, 'code3', 0x1900);
116 assertEntry(codeMap, 'code3', 0x1900 + 0x28);
117 assertEntry(codeMap, 'code4', 0x1950);
118 assertEntry(codeMap, 'code4', 0x1950 + 0x7);
119 assertEntry(codeMap, 'code4', 0x1950 + 0x10 - 1);
120 assertNoEntry(codeMap, 0x1950 + 0x10);
121 assertNoEntry(codeMap, 0xFFFFFFFF);
126 var codeMap = new CodeMap();
127 codeMap.addCode(0x1500, newCodeEntry(0x200, 'code1'));
128 codeMap.addCode(0x1700, newCodeEntry(0x100, 'code2'));
129 assertEntry(codeMap, 'code1', 0x1500);
130 assertEntry(codeMap, 'code2', 0x1700);
131 codeMap.moveCode(0x1500, 0x1800);
132 assertNoEntry(codeMap, 0x1500);
133 assertEntry(codeMap, 'code2', 0x1700);
134 assertEntry(codeMap, 'code1', 0x1800);
135 codeMap.deleteCode(0x1700);
136 assertNoEntry(codeMap, 0x1700);
137 assertEntry(codeMap, 'code1', 0x1800);
142 var codeMap = new CodeMap();
144 codeMap.addCode(0x1500, newCodeEntry(0x200, 'code'));
145 codeMap.addCode(0x1700, newCodeEntry(0x100, 'code'));
146 assertEntry(codeMap, 'code', 0x1500);
147 assertEntry(codeMap, 'code {1}', 0x1700);
149 assertEntry(codeMap, 'code', 0x1500);
150 assertEntry(codeMap, 'code {1}', 0x1700);
155 var codeMap = new CodeMap();
156 codeMap.addStaticCode(0x1500, newCodeEntry(0x3000, 'lib1'));
157 codeMap.addStaticCode(0x15500, newCodeEntry(0x5000, 'lib2'));
158 codeMap.addStaticCode(0x155500, newCodeEntry(0x10000, 'lib3'));
159 var allStatics = codeMap.getAllStaticEntries();
167 var codeMap = new CodeMap();
168 codeMap.addCode(0x1500, newCodeEntry(0x200, 'code1'));
169 codeMap.addCode(0x1700, newCodeEntry(0x100, 'code2'));
170 codeMap.addCode(0x1900, newCodeEntry(0x50, 'code3'));
171 var allDynamics = codeMap.getAllDynamicEntries();
175 codeMap.deleteCode(0x1700);
176 var allDynamics2 = codeMap.getAllDynamicEntries();
180 codeMap.deleteCode(0x1500);
181 var allDynamics3 = codeMap.getAllDynamicEntries();