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

Side by Side Diff: test/mjsunit/array-push7.js

Issue 1257063003: Add a --harmony-object-observe runtime flag (on by default) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move some initialization back to the snapshot Created 5 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/object-observe.js ('k') | test/mjsunit/es6/debug-stepin-microtasks.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Flags: --harmony-object-observe
5 // Flags: --allow-natives-syntax 6 // Flags: --allow-natives-syntax
6 7
7 var v = 0; 8 var v = 0;
8 9
9 function push_wrapper(array, value) { 10 function push_wrapper(array, value) {
10 array.push(value); 11 array.push(value);
11 } 12 }
12 function pop_wrapper(array) { 13 function pop_wrapper(array) {
13 return array.pop(); 14 return array.pop();
14 } 15 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 assertEquals(6, v); 51 assertEquals(6, v);
51 %OptimizeFunctionOnNextCall(pop_wrapper); 52 %OptimizeFunctionOnNextCall(pop_wrapper);
52 pop_wrapper(array); 53 pop_wrapper(array);
53 %RunMicrotasks(); 54 %RunMicrotasks();
54 assertEquals(1, array.length); 55 assertEquals(1, array.length);
55 assertEquals(7, v); 56 assertEquals(7, v);
56 pop_wrapper(array); 57 pop_wrapper(array);
57 %RunMicrotasks(); 58 %RunMicrotasks();
58 assertEquals(0, array.length); 59 assertEquals(0, array.length);
59 assertEquals(8, v); 60 assertEquals(8, v);
OLDNEW
« no previous file with comments | « src/object-observe.js ('k') | test/mjsunit/es6/debug-stepin-microtasks.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698