| OLD | NEW | 
|---|
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 169   // out-of-memory if the request is too large. In practice, the | 169   // out-of-memory if the request is too large. In practice, the | 
| 170   // size will be the number of captures of a RegExp. | 170   // size will be the number of captures of a RegExp. | 
| 171   "RegExpConstructResult": true, | 171   "RegExpConstructResult": true, | 
| 172   "_RegExpConstructResult": true, | 172   "_RegExpConstructResult": true, | 
| 173 | 173 | 
| 174   // This function performs some checks compile time (it requires its first | 174   // This function performs some checks compile time (it requires its first | 
| 175   // argument to be a compile time smi). | 175   // argument to be a compile time smi). | 
| 176   "_GetFromCache": true, | 176   "_GetFromCache": true, | 
| 177 | 177 | 
| 178   // This function expects its first argument to be a non-smi. | 178   // This function expects its first argument to be a non-smi. | 
| 179   "_IsStringWrapperSafeForDefaultValueOf" : true | 179   "_IsStringWrapperSafeForDefaultValueOf" : true, | 
|  | 180 | 
|  | 181   // Only applicable to strings. | 
|  | 182   "_HasCachedArrayIndex": true, | 
|  | 183   "_GetCachedArrayIndex": true | 
| 180 }; | 184 }; | 
| 181 | 185 | 
| 182 var currentlyUncallable = { | 186 var currentlyUncallable = { | 
| 183   // We need to find a way to test this without breaking the system. | 187   // We need to find a way to test this without breaking the system. | 
| 184   "SystemBreak": true | 188   "SystemBreak": true | 
| 185 }; | 189 }; | 
| 186 | 190 | 
| 187 function testNatives() { | 191 function testNatives() { | 
| 188   var allNatives = %ListNatives(); | 192   var allNatives = %ListNatives(); | 
| 189   for (var i = 0; i < allNatives.length; i++) { | 193   for (var i = 0; i < allNatives.length; i++) { | 
| 190     var nativeInfo = allNatives[i]; | 194     var nativeInfo = allNatives[i]; | 
| 191     var name = nativeInfo[0]; | 195     var name = nativeInfo[0]; | 
| 192     if (name in knownProblems || name in currentlyUncallable) | 196     if (name in knownProblems || name in currentlyUncallable) | 
| 193       continue; | 197       continue; | 
| 194     print(name); | 198     print(name); | 
| 195     var argc = nativeInfo[1]; | 199     var argc = nativeInfo[1]; | 
| 196     testArgumentCount(name, argc); | 200     testArgumentCount(name, argc); | 
| 197     testArgumentTypes(name, argc); | 201     testArgumentTypes(name, argc); | 
| 198   } | 202   } | 
| 199 } | 203 } | 
| 200 | 204 | 
| 201 testNatives(); | 205 testNatives(); | 
| OLD | NEW | 
|---|