| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 "Log": true, | 164 "Log": true, |
| 165 "DeclareGlobals": true, | 165 "DeclareGlobals": true, |
| 166 "ArrayConstructor": true, | 166 "ArrayConstructor": true, |
| 167 "InternalArrayConstructor": true, | 167 "InternalArrayConstructor": true, |
| 168 | 168 |
| 169 "PromoteScheduledException": true, | 169 "PromoteScheduledException": true, |
| 170 "DeleteHandleScopeExtensions": true, | 170 "DeleteHandleScopeExtensions": true, |
| 171 | 171 |
| 172 // Vararg with minimum number > 0. | 172 // Vararg with minimum number > 0. |
| 173 "Call": true, | 173 "Call": true, |
| 174 "SetAllocationTimeout": true, |
| 174 | 175 |
| 175 // Requires integer arguments to be non-negative. | 176 // Requires integer arguments to be non-negative. |
| 176 "Apply": true, | 177 "Apply": true, |
| 177 | 178 |
| 178 // That can only be invoked on Array.prototype. | 179 // That can only be invoked on Array.prototype. |
| 179 "FinishArrayPrototypeSetup": true, | 180 "FinishArrayPrototypeSetup": true, |
| 180 | 181 |
| 181 "_SwapElements": true, | 182 "_SwapElements": true, |
| 182 | 183 |
| 183 // Performance critical functions which cannot afford type checks. | 184 // Performance critical functions which cannot afford type checks. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 208 "TypedArrayInitialize": true, | 209 "TypedArrayInitialize": true, |
| 209 | 210 |
| 210 // Only applicable to generators. | 211 // Only applicable to generators. |
| 211 "_GeneratorNext": true, | 212 "_GeneratorNext": true, |
| 212 "_GeneratorThrow": true, | 213 "_GeneratorThrow": true, |
| 213 | 214 |
| 214 // Only applicable to DataViews. | 215 // Only applicable to DataViews. |
| 215 "DataViewInitialize":true, | 216 "DataViewInitialize":true, |
| 216 "DataViewGetBuffer": true, | 217 "DataViewGetBuffer": true, |
| 217 "DataViewGetByteLength": true, | 218 "DataViewGetByteLength": true, |
| 218 "DataViewGetByteOffset": true | 219 "DataViewGetByteOffset": true, |
| 219 }; | 220 }; |
| 220 | 221 |
| 221 var currentlyUncallable = { | 222 var currentlyUncallable = { |
| 222 // We need to find a way to test this without breaking the system. | 223 // We need to find a way to test this without breaking the system. |
| 223 "SystemBreak": true, | 224 "SystemBreak": true, |
| 224 // Inserts an int3/stop instruction when run with --always-opt. | 225 // Inserts an int3/stop instruction when run with --always-opt. |
| 225 "_DebugBreakInOptimizedCode": true | 226 "_DebugBreakInOptimizedCode": true |
| 226 }; | 227 }; |
| 227 | 228 |
| 228 function testNatives() { | 229 function testNatives() { |
| 229 var allNatives = %ListNatives(); | 230 var allNatives = %ListNatives(); |
| 230 var start = (allNatives.length >> 2)*2; | 231 var start = (allNatives.length >> 2)*2; |
| 231 var stop = (allNatives.length >> 2)*3; | 232 var stop = (allNatives.length >> 2)*3; |
| 232 for (var i = start; i < stop; i++) { | 233 for (var i = start; i < stop; i++) { |
| 233 var nativeInfo = allNatives[i]; | 234 var nativeInfo = allNatives[i]; |
| 234 var name = nativeInfo[0]; | 235 var name = nativeInfo[0]; |
| 235 if (name in knownProblems || name in currentlyUncallable) | 236 if (name in knownProblems || name in currentlyUncallable) |
| 236 continue; | 237 continue; |
| 237 print(name); | 238 print(name); |
| 238 var argc = nativeInfo[1]; | 239 var argc = nativeInfo[1]; |
| 239 testArgumentCount(name, argc); | 240 testArgumentCount(name, argc); |
| 240 testArgumentTypes(name, argc); | 241 testArgumentTypes(name, argc); |
| 241 } | 242 } |
| 242 } | 243 } |
| 243 | 244 |
| 244 testNatives(); | 245 testNatives(); |
| OLD | NEW |