| 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 // This functions perform some checks compile time (they require one of their | 188 // This functions perform some checks compile time (they require one of their |
| 189 // arguments to be a compile time smi). | 189 // arguments to be a compile time smi). |
| 190 "_DateField": true, | 190 "_DateField": true, |
| 191 "_GetFromCache": true, | 191 "_GetFromCache": true, |
| 192 | 192 |
| 193 // This function expects its first argument to be a non-smi. | 193 // This function expects its first argument to be a non-smi. |
| 194 "_IsStringWrapperSafeForDefaultValueOf" : true, | 194 "_IsStringWrapperSafeForDefaultValueOf" : true, |
| 195 | 195 |
| 196 // Only applicable to strings. | 196 // Only applicable to strings. |
| 197 "_HasCachedArrayIndex": true, | 197 "_HasCachedArrayIndex": true, |
| 198 "_GetCachedArrayIndex": true | 198 "_GetCachedArrayIndex": true, |
| 199 |
| 200 // Internal helper that expects a Code reference |
| 201 "CatchInOptimizedCode": true |
| 199 }; | 202 }; |
| 200 | 203 |
| 201 var currentlyUncallable = { | 204 var currentlyUncallable = { |
| 202 // We need to find a way to test this without breaking the system. | 205 // We need to find a way to test this without breaking the system. |
| 203 "SystemBreak": true | 206 "SystemBreak": true |
| 204 }; | 207 }; |
| 205 | 208 |
| 206 function testNatives() { | 209 function testNatives() { |
| 207 var allNatives = %ListNatives(); | 210 var allNatives = %ListNatives(); |
| 208 for (var i = 0; i < allNatives.length; i++) { | 211 for (var i = 0; i < allNatives.length; i++) { |
| 209 var nativeInfo = allNatives[i]; | 212 var nativeInfo = allNatives[i]; |
| 210 var name = nativeInfo[0]; | 213 var name = nativeInfo[0]; |
| 211 if (name in knownProblems || name in currentlyUncallable) | 214 if (name in knownProblems || name in currentlyUncallable) |
| 212 continue; | 215 continue; |
| 213 print(name); | 216 print(name); |
| 214 var argc = nativeInfo[1]; | 217 var argc = nativeInfo[1]; |
| 215 testArgumentCount(name, argc); | 218 testArgumentCount(name, argc); |
| 216 testArgumentTypes(name, argc); | 219 testArgumentTypes(name, argc); |
| 217 } | 220 } |
| 218 } | 221 } |
| 219 | 222 |
| 220 testNatives(); | 223 testNatives(); |
| OLD | NEW |