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