Chromium Code Reviews| Index: test/mjsunit/keyed-array-call.js |
| diff --git a/test/mjsunit/compiler/increment-typefeedback.js b/test/mjsunit/keyed-array-call.js |
| similarity index 82% |
| copy from test/mjsunit/compiler/increment-typefeedback.js |
| copy to test/mjsunit/keyed-array-call.js |
| index 798959296c43014f252d65ae5dd11e00563bfd04..376e18d291a8f0ccde38247afa9d3bdfe12d2290 100644 |
| --- a/test/mjsunit/compiler/increment-typefeedback.js |
| +++ b/test/mjsunit/keyed-array-call.js |
| @@ -25,15 +25,17 @@ |
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| -// Flags: --allow-natives-syntax |
| - |
| -function f(x) { |
| - x++; |
| - return x; |
| +var a = [function(a) { return a+10; }, |
| + function(a) { return a+20; }]; |
| +a.test = function(a) { return a+30; } |
|
danno
2013/10/02 08:49:11
How about tests that actually test the holey versi
|
| +function f(i) { |
| + return "r" + (1, a[i](i+1), a[i](i+2)); |
| } |
| -f(0.5); |
| -f(0.5); |
| -%OptimizeFunctionOnNextCall(f); |
| -f(0.5); |
| -assertOptimized(f); |
| +assertEquals("r12", f(0)); |
| +assertEquals("r12", f(0)); |
| +assertEquals("r23", f(1)); |
| +assertEquals("r23", f(1)); |
| + |
| +// Deopt the stub. |
| +assertEquals("rtest230", f("test")); |