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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 203 |
204 // Only applicable to generators. | 204 // Only applicable to generators. |
205 "_GeneratorNext": true, | 205 "_GeneratorNext": true, |
206 "_GeneratorThrow": true | 206 "_GeneratorThrow": true, |
207 }; | 207 }; |
208 | 208 |
209 var currentlyUncallable = { | 209 var currentlyUncallable = { |
210 // 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. |
211 "SystemBreak": true | 211 "SystemBreak": true |
212 }; | 212 }; |
213 | 213 |
214 function testNatives() { | 214 function testNatives() { |
215 var allNatives = %ListNatives(); | 215 var allNatives = %ListNatives(); |
216 var start = (allNatives.length >> 2)*3; | 216 var start = (allNatives.length >> 2)*3; |
217 var stop = allNatives.length; | 217 var stop = allNatives.length; |
218 for (var i = start; i < stop; i++) { | 218 for (var i = start; i < stop; i++) { |
219 var nativeInfo = allNatives[i]; | 219 var nativeInfo = allNatives[i]; |
220 var name = nativeInfo[0]; | 220 var name = nativeInfo[0]; |
221 if (name in knownProblems || name in currentlyUncallable) | 221 if (name in knownProblems || name in currentlyUncallable) |
222 continue; | 222 continue; |
223 print(name); | 223 print(name); |
224 var argc = nativeInfo[1]; | 224 var argc = nativeInfo[1]; |
225 testArgumentCount(name, argc); | 225 testArgumentCount(name, argc); |
226 testArgumentTypes(name, argc); | 226 testArgumentTypes(name, argc); |
227 } | 227 } |
228 } | 228 } |
229 | 229 |
230 testNatives(); | 230 testNatives(); |
OLD | NEW |