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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 // This function expects its first argument to be a non-smi. | 200 // This function expects its first argument to be a non-smi. |
201 "_IsStringWrapperSafeForDefaultValueOf" : true, | 201 "_IsStringWrapperSafeForDefaultValueOf" : true, |
202 | 202 |
203 // Only applicable to strings. | 203 // Only applicable to strings. |
204 "_HasCachedArrayIndex": true, | 204 "_HasCachedArrayIndex": true, |
205 "_GetCachedArrayIndex": true, | 205 "_GetCachedArrayIndex": true, |
206 "_OneByteSeqStringSetChar": true, | 206 "_OneByteSeqStringSetChar": true, |
207 "_TwoByteSeqStringSetChar": true, | 207 "_TwoByteSeqStringSetChar": true, |
208 | 208 |
209 // Only applicable to TypedArrays. | 209 // Only applicable to TypedArrays. |
210 "TypedArrayInitialize": true, | 210 "_TypedArrayInitialize": true, |
211 | 211 |
212 // Only applicable to generators. | 212 // Only applicable to generators. |
213 "_GeneratorNext": true, | 213 "_GeneratorNext": true, |
214 "_GeneratorThrow": true, | 214 "_GeneratorThrow": true, |
215 | 215 |
216 // Only applicable to DataViews. | 216 // Only applicable to DataViews. |
217 "DataViewInitialize": true, | 217 "_DataViewInitialize": true, |
218 "DataViewGetBuffer": true, | |
219 "DataViewGetByteLength": true, | |
220 "DataViewGetByteOffset": true | |
221 }; | 218 }; |
222 | 219 |
223 var currentlyUncallable = { | 220 var currentlyUncallable = { |
224 // We need to find a way to test this without breaking the system. | 221 // We need to find a way to test this without breaking the system. |
225 "SystemBreak": true, | 222 "SystemBreak": true, |
226 // Inserts an int3/stop instruction when run with --always-opt. | 223 // Inserts an int3/stop instruction when run with --always-opt. |
227 "_DebugBreakInOptimizedCode": true | 224 "_DebugBreakInOptimizedCode": true |
228 }; | 225 }; |
229 | 226 |
230 function testNatives() { | 227 function testNatives() { |
231 var allNatives = %ListNatives(); | 228 var allNatives = %ListNatives(); |
232 var start = allNatives.length >> 2; | 229 var start = allNatives.length >> 2; |
233 var stop = (allNatives.length >> 2)*2; | 230 var stop = (allNatives.length >> 2)*2; |
234 for (var i = start; i < stop; i++) { | 231 for (var i = start; i < stop; i++) { |
235 var nativeInfo = allNatives[i]; | 232 var nativeInfo = allNatives[i]; |
236 var name = nativeInfo[0]; | 233 var name = nativeInfo[0]; |
237 if (name in knownProblems || name in currentlyUncallable) | 234 if (name in knownProblems || name in currentlyUncallable) |
238 continue; | 235 continue; |
239 print(name); | 236 print(name); |
240 var argc = nativeInfo[1]; | 237 var argc = nativeInfo[1]; |
241 testArgumentCount(name, argc); | 238 testArgumentCount(name, argc); |
242 testArgumentTypes(name, argc); | 239 testArgumentTypes(name, argc); |
243 } | 240 } |
244 } | 241 } |
245 | 242 |
246 testNatives(); | 243 testNatives(); |
OLD | NEW |