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