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

Side by Side Diff: test/mjsunit/regress/regress-crbug-631917.js

Issue 2191663004: [fullcode][mips][mips64][ppc][s390] Avoid trashing of a home object when doing a count operation wi… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixes Created 4 years, 4 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/full-codegen/s390/full-codegen-s390.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
(Empty)
1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 var b = { toString: function() { return "b"; } };
6 var c = { toString: function() { return "c"; } };
7
8 (function() {
9 var expected_receiver;
10 var obj1 = {
11 a: 100,
12 b_: 200,
13 get b() { assertEquals(expected_receiver, this); return this.b_; },
14 set b(v) { assertEquals(expected_receiver, this); this.b_ = v; },
15 c_: 300,
16 get c() { assertEquals(expected_receiver, this); return this.c_; },
17 set c(v) { assertEquals(expected_receiver, this); this.c_ = v; },
18 };
19 var obj2 = {
20 boom() {
21 super.a++;
22 super[b]++;
23 super[c]++;
24 },
25 }
26 Object.setPrototypeOf(obj2, obj1);
27
28 expected_receiver = obj2;
29 obj2.boom();
30 assertEquals(101, obj2.a);
31 assertEquals(201, obj2[b]);
32 assertEquals(301, obj2[c]);
33
34 expected_receiver = obj1;
35 assertEquals(100, obj1.a);
36 assertEquals(200, obj1[b]);
37 assertEquals(300, obj1[c]);
38 }());
OLDNEW
« no previous file with comments | « src/full-codegen/s390/full-codegen-s390.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698