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

Side by Side Diff: test/mjsunit/harmony/proxies.js

Issue 1232823002: Fix keyed stores to strings convertible to indices (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/ic/ic.cc ('k') | test/mjsunit/primitive-keyed-access.js » ('j') | 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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 assertEquals(44, p[77] = 44) 375 assertEquals(44, p[77] = 44)
376 assertEquals("77", key) 376 assertEquals("77", key)
377 assertEquals(44, val) 377 assertEquals(44, val)
378 378
379 assertEquals(45, (function(n) { return p[n] = 45 })("c")) 379 assertEquals(45, (function(n) { return p[n] = 45 })("c"))
380 assertEquals("c", key) 380 assertEquals("c", key)
381 assertEquals(45, val) 381 assertEquals(45, val)
382 assertEquals(46, (function(n) { return p[n] = 46 })(99)) 382 assertEquals(46, (function(n) { return p[n] = 46 })(99))
383 assertEquals("99", key) 383 assertEquals("99", key)
384 assertEquals(46, val) 384 assertEquals(46, val)
385
386 assertEquals(47, p["0"] = 47)
387 assertEquals("0", key)
388 assertEquals(47, val)
385 } 389 }
386 390
387 TestSet({ 391 TestSet({
388 set: function(r, k, v) { key = k; val = v; return true } 392 set: function(r, k, v) { key = k; val = v; return true }
389 }) 393 })
390 394
391 TestSet({ 395 TestSet({
392 set: function(r, k, v) { return this.set2(r, k, v) }, 396 set: function(r, k, v) { return this.set2(r, k, v) },
393 set2: function(r, k, v) { key = k; val = v; return true } 397 set2: function(r, k, v) { key = k; val = v; return true }
394 }) 398 })
(...skipping 1922 matching lines...) Expand 10 before | Expand all | Expand 10 after
2317 function f() { 2321 function f() {
2318 return o.x; 2322 return o.x;
2319 } 2323 }
2320 assertEquals(10, f()); 2324 assertEquals(10, f());
2321 assertEquals(10, f()); 2325 assertEquals(10, f());
2322 %OptimizeFunctionOnNextCall(f); 2326 %OptimizeFunctionOnNextCall(f);
2323 assertEquals(10, f()); 2327 assertEquals(10, f());
2324 } 2328 }
2325 2329
2326 TestOptWithProxyPrototype(); 2330 TestOptWithProxyPrototype();
OLDNEW
« no previous file with comments | « src/ic/ic.cc ('k') | test/mjsunit/primitive-keyed-access.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698