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

Side by Side Diff: tests/language/issue10321_test.dart

Issue 14602011: Fix issue 10321 by invalidating previous "generate at use site" optimizations based on a pure instr… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/codegen_helpers.dart ('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 (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 import "package:expect/expect.dart";
6
7 // Regression test for dart2js that used to miscompile [A.foo].
8
9 var global = 54;
10
11 class A {
12 int a = 0;
13 int b = 42;
14 final int c = global;
15 foo() {
16 int start = a - 1;
17 a = 54;
18 if (b == 42) {
19 b = 32;
20 } else {
21 b = 42;
22 }
23 Expect.equals(-1, start);
24 }
25
26 bar() {
27 int start = a - c - 1;
28 a = 42;
29 if (b == 42) {
30 b = 32;
31 } else {
32 b = 42;
33 }
34 Expect.equals(-55, start);
35 }
36 }
37
38 main() {
39 new A().foo();
40 new A().bar();
41 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/codegen_helpers.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698