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

Side by Side Diff: tests/compiler/dart2js/side_effect_tdiv_regression_test.dart

Issue 111553003: Fix regression on side effects of tdiv. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years 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
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 import "package:async_helper/async_helper.dart";
7
8 import 'compiler_helper.dart';
9 import 'parser_helper.dart';
10
11 const String TEST = r'''
12 class A {
13 var field = 42;
14 }
15 main() {
16 var a = new A();
17 var b = [42, -1];
18 // Force a setter on [field].
19 if (false) a.field = 12;
20 var c = a.field;
21 print(b[0] ~/ b[1]);
22 return c + a.field;
23 }
24 ''';
25
26 void main() {
27 asyncTest(() => compileAll(TEST).then((generated) {
28 Expect.isTrue(generated.contains('return c + c;'));
sra1 2013/12/11 09:45:24 How does adding the side effect in the mock librar
ngeoffray 2013/12/16 13:31:41 In order to get a.field GVN'ed, we need to see tha
29 }));
30 }
OLDNEW
« tests/compiler/dart2js/mock_compiler.dart ('K') | « tests/compiler/dart2js/mock_compiler.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698