| 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 "_GetFromCache": true, | 193 "_GetFromCache": true, |
| 194 | 194 |
| 195 // This function expects its first argument to be a non-smi. | 195 // This function expects its first argument to be a non-smi. |
| 196 "_IsStringWrapperSafeForDefaultValueOf" : true, | 196 "_IsStringWrapperSafeForDefaultValueOf" : true, |
| 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 |
| 204 // Only applicable to generators. |
| 205 "_GeneratorSend": true, |
| 206 "_GeneratorThrow": true |
| 203 }; | 207 }; |
| 204 | 208 |
| 205 var currentlyUncallable = { | 209 var currentlyUncallable = { |
| 206 // We need to find a way to test this without breaking the system. | 210 // We need to find a way to test this without breaking the system. |
| 207 "SystemBreak": true | 211 "SystemBreak": true |
| 208 }; | 212 }; |
| 209 | 213 |
| 210 function testNatives() { | 214 function testNatives() { |
| 211 var allNatives = %ListNatives(); | 215 var allNatives = %ListNatives(); |
| 212 var start = (allNatives.length >> 2)*3; | 216 var start = (allNatives.length >> 2)*3; |
| 213 var stop = allNatives.length; | 217 var stop = allNatives.length; |
| 214 for (var i = start; i < stop; i++) { | 218 for (var i = start; i < stop; i++) { |
| 215 var nativeInfo = allNatives[i]; | 219 var nativeInfo = allNatives[i]; |
| 216 var name = nativeInfo[0]; | 220 var name = nativeInfo[0]; |
| 217 if (name in knownProblems || name in currentlyUncallable) | 221 if (name in knownProblems || name in currentlyUncallable) |
| 218 continue; | 222 continue; |
| 219 print(name); | 223 print(name); |
| 220 var argc = nativeInfo[1]; | 224 var argc = nativeInfo[1]; |
| 221 testArgumentCount(name, argc); | 225 testArgumentCount(name, argc); |
| 222 testArgumentTypes(name, argc); | 226 testArgumentTypes(name, argc); |
| 223 } | 227 } |
| 224 } | 228 } |
| 225 | 229 |
| 226 testNatives(); | 230 testNatives(); |
| OLD | NEW |