Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: test/mjsunit/fuzz-natives-part3.js

Issue 12095035: %X => %_X, %_X => %__X (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebase and fix spacing issue Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 try { 108 try {
109 func.apply(void 0, argList); 109 func.apply(void 0, argList);
110 } catch (e) { 110 } catch (e) {
111 // we don't care what happens as long as we don't crash 111 // we don't care what happens as long as we don't crash
112 } 112 }
113 type++; 113 type++;
114 } 114 }
115 } 115 }
116 116
117 var knownProblems = { 117 var knownProblems = {
118 "Abort": true, 118 "_Abort": true,
119 119
120 // Avoid calling the concat operation, because weird lengths 120 // Avoid calling the concat operation, because weird lengths
121 // may lead to out-of-memory. Ditto for StringBuilderJoin. 121 // may lead to out-of-memory. Ditto for StringBuilderJoin.
122 "StringBuilderConcat": true, 122 "_StringBuilderConcat": true,
123 "StringBuilderJoin": true, 123 "_StringBuilderJoin": true,
124 124
125 // These functions use pseudo-stack-pointers and are not robust 125 // These functions use pseudo-stack-pointers and are not robust
126 // to unexpected integer values. 126 // to unexpected integer values.
127 "DebugEvaluate": true, 127 "_DebugEvaluate": true,
128 128
129 // These functions do nontrivial error checking in recursive calls, 129 // These functions do nontrivial error checking in recursive calls,
130 // which means that we have to propagate errors back. 130 // which means that we have to propagate errors back.
131 "SetFunctionBreakPoint": true, 131 "_SetFunctionBreakPoint": true,
132 "SetScriptBreakPoint": true, 132 "_SetScriptBreakPoint": true,
133 "PrepareStep": true, 133 "_PrepareStep": true,
134 134
135 // Too slow. 135 // Too slow.
136 "DebugReferencedBy": true, 136 "_DebugReferencedBy": true,
137 137
138 // Calling disable/enable access checks may interfere with the 138 // Calling disable/enable access checks may interfere with the
139 // the rest of the tests. 139 // the rest of the tests.
140 "DisableAccessChecks": true, 140 "_DisableAccessChecks": true,
141 "EnableAccessChecks": true, 141 "_EnableAccessChecks": true,
142 142
143 // These functions should not be callable as runtime functions. 143 // These functions should not be callable as runtime functions.
144 "NewFunctionContext": true, 144 "_NewFunctionContext": true,
145 "NewArgumentsFast": true, 145 "_NewArgumentsFast": true,
146 "NewStrictArgumentsFast": true, 146 "_NewStrictArgumentsFast": true,
147 "PushWithContext": true, 147 "_PushWithContext": true,
148 "PushCatchContext": true, 148 "_PushCatchContext": true,
149 "PushBlockContext": true, 149 "_PushBlockContext": true,
150 "PushModuleContext": true, 150 "_PushModuleContext": true,
151 "LazyCompile": true, 151 "_LazyCompile": true,
152 "LazyRecompile": true, 152 "_LazyRecompile": true,
153 "ParallelRecompile": true, 153 "_ParallelRecompile": true,
154 "NotifyDeoptimized": true, 154 "_NotifyDeoptimized": true,
155 "NotifyOSR": true, 155 "_NotifyOSR": true,
156 "CreateObjectLiteralBoilerplate": true, 156 "_CreateObjectLiteralBoilerplate": true,
157 "CloneLiteralBoilerplate": true, 157 "_CloneLiteralBoilerplate": true,
158 "CloneShallowLiteralBoilerplate": true, 158 "_CloneShallowLiteralBoilerplate": true,
159 "CreateArrayLiteralBoilerplate": true, 159 "_CreateArrayLiteralBoilerplate": true,
160 "IS_VAR": true, 160 "_IS_VAR": true,
161 "ResolvePossiblyDirectEval": true, 161 "_ResolvePossiblyDirectEval": true,
162 "Log": true, 162 "_Log": true,
163 "DeclareGlobals": true, 163 "_DeclareGlobals": true,
164 164
165 "PromoteScheduledException": true, 165 "_PromoteScheduledException": true,
166 "DeleteHandleScopeExtensions": true, 166 "_DeleteHandleScopeExtensions": true,
167 167
168 // Vararg with minimum number > 0. 168 // Vararg with minimum number > 0.
169 "Call": true, 169 "_Call": true,
170 170
171 // Requires integer arguments to be non-negative. 171 // Requires integer arguments to be non-negative.
172 "Apply": true, 172 "_Apply": true,
173 173
174 // That can only be invoked on Array.prototype. 174 // That can only be invoked on Array.prototype.
175 "FinishArrayPrototypeSetup": true, 175 "_FinishArrayPrototypeSetup": true,
176 176
177 "_SwapElements": true, 177 "__SwapElements": true,
178 178
179 // Performance critical functions which cannot afford type checks. 179 // Performance critical functions which cannot afford type checks.
180 "_IsNativeOrStrictMode": true, 180 "__IsNativeOrStrictMode": true,
181 "_CallFunction": true, 181 "__CallFunction": true,
182 182
183 // Tries to allocate based on argument, and (correctly) throws 183 // Tries to allocate based on argument, and (correctly) throws
184 // out-of-memory if the request is too large. In practice, the 184 // out-of-memory if the request is too large. In practice, the
185 // size will be the number of captures of a RegExp. 185 // size will be the number of captures of a RegExp.
186 "RegExpConstructResult": true,
187 "_RegExpConstructResult": true, 186 "_RegExpConstructResult": true,
187 "__RegExpConstructResult": true,
188 188
189 // This functions perform some checks compile time (they require one of their 189 // This functions perform some checks compile time (they require one of their
190 // arguments to be a compile time smi). 190 // arguments to be a compile time smi).
191 "_DateField": true, 191 "__DateField": true,
192 "_GetFromCache": true, 192 "__GetFromCache": true,
193 193
194 // This function expects its first argument to be a non-smi. 194 // This function expects its first argument to be a non-smi.
195 "_IsStringWrapperSafeForDefaultValueOf" : true, 195 "__IsStringWrapperSafeForDefaultValueOf" : true,
196 196
197 // Only applicable to strings. 197 // Only applicable to strings.
198 "_HasCachedArrayIndex": true, 198 "__HasCachedArrayIndex": true,
199 "_GetCachedArrayIndex": true, 199 "__GetCachedArrayIndex": true,
200 "_OneByteSeqStringSetChar": true, 200 "__OneByteSeqStringSetChar": true,
201 "_TwoByteSeqStringSetChar": true, 201 "__TwoByteSeqStringSetChar": true,
202 202
203 // Only for debugging parallel recompilation. 203 // Only for debugging parallel recompilation.
204 "InstallRecompiledCode": true, 204 "_InstallRecompiledCode": true,
205 "ForceParallelRecompile": true 205 "_ForceParallelRecompile": true
206 }; 206 };
207 207
208 var currentlyUncallable = { 208 var currentlyUncallable = {
209 // We need to find a way to test this without breaking the system. 209 // We need to find a way to test this without breaking the system.
210 "SystemBreak": true 210 "_SystemBreak": true
211 }; 211 };
212 212
213 function testNatives() { 213 function testNatives() {
214 var allNatives = %ListNatives(); 214 var allNatives = %ListNatives();
215 var start = (allNatives.length >> 2)*2; 215 var start = (allNatives.length >> 2)*2;
216 var stop = (allNatives.length >> 2)*3; 216 var stop = (allNatives.length >> 2)*3;
217 for (var i = start; i < stop; i++) { 217 for (var i = start; i < stop; i++) {
218 var nativeInfo = allNatives[i]; 218 var nativeInfo = allNatives[i];
219 var name = nativeInfo[0]; 219 var name = nativeInfo[0];
220 if (name in knownProblems || name in currentlyUncallable) 220 if (name in knownProblems || name in currentlyUncallable)
221 continue; 221 continue;
222 print(name); 222 print(name);
223 var argc = nativeInfo[1]; 223 var argc = nativeInfo[1];
224 testArgumentCount(name, argc); 224 testArgumentCount(name, argc);
225 testArgumentTypes(name, argc); 225 testArgumentTypes(name, argc);
226 } 226 }
227 } 227 }
228 228
229 testNatives(); 229 testNatives();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698