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