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

Side by Side Diff: test/mjsunit/compiler/inline-arguments.js

Issue 356773002: Allow inlining of functions containing %_Arguments. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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
« no previous file with comments | « src/hydrogen.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 ); 302 );
303 } 303 }
304 304
305 outer(); 305 outer();
306 outer(); 306 outer();
307 %OptimizeFunctionOnNextCall(outer); 307 %OptimizeFunctionOnNextCall(outer);
308 outer(); 308 outer();
309 delete forceDeopt.deopt; 309 delete forceDeopt.deopt;
310 outer(); 310 outer();
311 })(); 311 })();
312
313
314 // Test inlining of functions with %_Arguments and %_ArgumentsLength intrinsic.
315 (function () {
316 function inner(len,a,b,c) {
317 assertSame(len, %_ArgumentsLength());
318 for (var i = 1; i < len; ++i) {
319 var c = String.fromCharCode(96 + i);
320 assertSame(c, %_Arguments(i));
321 }
322 }
323
324 function outer() {
325 inner(1);
326 inner(2, 'a');
327 inner(3, 'a', 'b');
328 inner(4, 'a', 'b', 'c');
329 inner(5, 'a', 'b', 'c', 'd');
330 inner(6, 'a', 'b', 'c', 'd', 'e');
331 }
332
333 outer();
334 outer();
335 %OptimizeFunctionOnNextCall(outer);
336 outer();
337 })();
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698