OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 | 198 |
199 // Only applicable to strings. | 199 // Only applicable to strings. |
200 "_HasCachedArrayIndex": true, | 200 "_HasCachedArrayIndex": true, |
201 "_GetCachedArrayIndex": true, | 201 "_GetCachedArrayIndex": true, |
202 "_OneByteSeqStringSetChar": true, | 202 "_OneByteSeqStringSetChar": true, |
203 "_TwoByteSeqStringSetChar": true, | 203 "_TwoByteSeqStringSetChar": true, |
204 | 204 |
205 // Only applicable to generators. | 205 // Only applicable to generators. |
206 "_GeneratorNext": true, | 206 "_GeneratorNext": true, |
207 "_GeneratorThrow": true, | 207 "_GeneratorThrow": true, |
| 208 |
| 209 // Only applicable to DataViews. |
| 210 "DataViewGetBuffer": true, |
| 211 "DataViewGetByteLength": true, |
| 212 "DataViewGetByteOffset": true |
208 }; | 213 }; |
209 | 214 |
210 var currentlyUncallable = { | 215 var currentlyUncallable = { |
211 // We need to find a way to test this without breaking the system. | 216 // We need to find a way to test this without breaking the system. |
212 "SystemBreak": true | 217 "SystemBreak": true |
213 }; | 218 }; |
214 | 219 |
215 function testNatives() { | 220 function testNatives() { |
216 var allNatives = %ListNatives(); | 221 var allNatives = %ListNatives(); |
217 var start = 0; | 222 var start = 0; |
218 var stop = (allNatives.length >> 2); | 223 var stop = (allNatives.length >> 2); |
219 for (var i = start; i < stop; i++) { | 224 for (var i = start; i < stop; i++) { |
220 var nativeInfo = allNatives[i]; | 225 var nativeInfo = allNatives[i]; |
221 var name = nativeInfo[0]; | 226 var name = nativeInfo[0]; |
222 if (name in knownProblems || name in currentlyUncallable) | 227 if (name in knownProblems || name in currentlyUncallable) |
223 continue; | 228 continue; |
224 print(name); | 229 print(name); |
225 var argc = nativeInfo[1]; | 230 var argc = nativeInfo[1]; |
226 testArgumentCount(name, argc); | 231 testArgumentCount(name, argc); |
227 testArgumentTypes(name, argc); | 232 testArgumentTypes(name, argc); |
228 } | 233 } |
229 } | 234 } |
230 | 235 |
231 testNatives(); | 236 testNatives(); |
OLD | NEW |