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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 | 181 |
182 // Only applicable to TypedArrays. | 182 // Only applicable to TypedArrays. |
183 "_TypedArrayInitialize": true, | 183 "_TypedArrayInitialize": true, |
184 | 184 |
185 // Only applicable to generators. | 185 // Only applicable to generators. |
186 "_GeneratorNext": true, | 186 "_GeneratorNext": true, |
187 "_GeneratorThrow": true, | 187 "_GeneratorThrow": true, |
188 | 188 |
189 // Only applicable to DataViews. | 189 // Only applicable to DataViews. |
190 "_DataViewInitialize": true, | 190 "_DataViewInitialize": true, |
191 | |
192 // Internal calls from the Object.observe API | |
193 "NativeObjectObserve": true, | |
194 "NativeObjectNotifierPerformChange": true, | |
195 "NativeObjectGetNotifier": true | |
196 }; | 191 }; |
197 | 192 |
198 var currentlyUncallable = { | 193 var currentlyUncallable = { |
199 // We need to find a way to test this without breaking the system. | 194 // We need to find a way to test this without breaking the system. |
200 "SystemBreak": true, | 195 "SystemBreak": true, |
201 // Inserts an int3/stop instruction when run with --always-opt. | 196 // Inserts an int3/stop instruction when run with --always-opt. |
202 "_DebugBreakInOptimizedCode": true | 197 "_DebugBreakInOptimizedCode": true |
203 }; | 198 }; |
204 | 199 |
205 function testNatives() { | 200 function testNatives() { |
206 var allNatives = %ListNatives(); | 201 var allNatives = %ListNatives(); |
207 var start = allNatives.length >> 2; | 202 var start = allNatives.length >> 2; |
208 var stop = (allNatives.length >> 2)*2; | 203 var stop = (allNatives.length >> 2)*2; |
209 for (var i = start; i < stop; i++) { | 204 for (var i = start; i < stop; i++) { |
210 var nativeInfo = allNatives[i]; | 205 var nativeInfo = allNatives[i]; |
211 var name = nativeInfo[0]; | 206 var name = nativeInfo[0]; |
212 if (name in knownProblems || name in currentlyUncallable) | 207 if (name in knownProblems || name in currentlyUncallable) |
213 continue; | 208 continue; |
214 print(name); | 209 print(name); |
215 var argc = nativeInfo[1]; | 210 var argc = nativeInfo[1]; |
216 testArgumentCount(name, argc); | 211 testArgumentCount(name, argc); |
217 testArgumentTypes(name, argc); | 212 testArgumentTypes(name, argc); |
218 } | 213 } |
219 } | 214 } |
220 | 215 |
221 testNatives(); | 216 testNatives(); |
OLD | NEW |