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