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

Side by Side Diff: test/webkit/function-apply-aliased.js

Issue 1333843002: [runtime] Move binary operator fallbacks into the runtime. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: No need for frame states in bytecode handlers. Add test case. Created 5 years, 3 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 // Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 1. Redistributions of source code must retain the above copyright 7 // 1. Redistributions of source code must retain the above copyright
8 // notice, this list of conditions and the following disclaimer. 8 // notice, this list of conditions and the following disclaimer.
9 // 2. Redistributions in binary form must reproduce the above copyright 9 // 2. Redistributions in binary form must reproduce the above copyright
10 // notice, this list of conditions and the following disclaimer in the 10 // notice, this list of conditions and the following disclaimer in the
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 shouldBe("myFunction.aliasedApply(myObject, ['arg1'])", '[myObject, "myFunction" , "arg1"]'); 61 shouldBe("myFunction.aliasedApply(myObject, ['arg1'])", '[myObject, "myFunction" , "arg1"]');
62 shouldBe("myFunction.aliasedApply()", '[this, "myFunction", undefined]'); 62 shouldBe("myFunction.aliasedApply()", '[this, "myFunction", undefined]');
63 shouldBe("myFunction.aliasedApply(null)", '[this, "myFunction", undefined]'); 63 shouldBe("myFunction.aliasedApply(null)", '[this, "myFunction", undefined]');
64 shouldBe("myFunction.aliasedApply(undefined)", '[this, "myFunction", undefined]' ); 64 shouldBe("myFunction.aliasedApply(undefined)", '[this, "myFunction", undefined]' );
65 shouldBe("myFunctionWithApply.apply(myObject, ['arg1'])", '[myFunctionWithApply, "myFunctionWithApply.apply", myObject]'); 65 shouldBe("myFunctionWithApply.apply(myObject, ['arg1'])", '[myFunctionWithApply, "myFunctionWithApply.apply", myObject]');
66 shouldBe("myFunctionWithApply.aliasedApply(myObject, ['arg1'])", '[myObject, "my FunctionWithApply", "arg1"]'); 66 shouldBe("myFunctionWithApply.aliasedApply(myObject, ['arg1'])", '[myObject, "my FunctionWithApply", "arg1"]');
67 shouldBe("myFunctionWithApply.apply(myObject, arg1Array)", '[myFunctionWithApply , "myFunctionWithApply.apply", myObject]'); 67 shouldBe("myFunctionWithApply.apply(myObject, arg1Array)", '[myFunctionWithApply , "myFunctionWithApply.apply", myObject]');
68 shouldBe("forwarder(myFunctionWithApply, myObject, arg1Array)", '[myFunctionWith Apply, "myFunctionWithApply.apply", myObject]'); 68 shouldBe("forwarder(myFunctionWithApply, myObject, arg1Array)", '[myFunctionWith Apply, "myFunctionWithApply.apply", myObject]');
69 shouldBe("myFunctionWithApply.aliasedApply(myObject, arg1Array)", '[myObject, "m yFunctionWithApply", "arg1"]'); 69 shouldBe("myFunctionWithApply.aliasedApply(myObject, arg1Array)", '[myObject, "m yFunctionWithApply", "arg1"]');
70 70
71 function stackOverflowTest() {
72 try {
73 var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;
74 stackOverflowTest();
75 } catch(e) {
76 // Blow the stack with a sparse array
77 shouldThrow("myFunction.apply(null, new Array(500000))");
78 // Blow the stack with a sparse array that is sufficiently large to caus e int overflow
79 shouldThrow("myFunction.apply(null, new Array(1 << 30))");
80 }
81 }
82 stackOverflowTest();
83
84 // Blow the stack recursing with arguments 71 // Blow the stack recursing with arguments
85 shouldThrow("recurseArguments.apply(null, new Array(50000))"); 72 shouldThrow("recurseArguments.apply(null, new Array(50000))");
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698