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

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

Issue 422483002: Mix in [TreeElementMixin] only on nodes that need it. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 // Test that parameters keep their names in the output. 4 // Test that parameters keep their names in the output.
5 5
6 import 'dart:async'; 6 import 'dart:async';
7 import 'package:expect/expect.dart'; 7 import 'package:expect/expect.dart';
8 import 'package:async_helper/async_helper.dart'; 8 import 'package:async_helper/async_helper.dart';
9 import 'compiler_helper.dart'; 9 import 'compiler_helper.dart';
10 10
(...skipping 15 matching lines...) Expand all
26 main() { 26 main() {
27 var o = null; 27 var o = null;
28 o(1, 2); 28 o(1, 2);
29 } 29 }
30 """; 30 """;
31 31
32 const String TEST_BAILOUT = r""" 32 const String TEST_BAILOUT = r"""
33 class A { 33 class A {
34 var x; 34 var x;
35 foo(_) { // make sure only g has no arguments 35 foo(_) { // make sure only g has no arguments
36 var f = function g() { return 499; }; 36 var f = () { return 499; };
37 return 499 + x + f(); 37 return 499 + x + f();
38 } 38 }
39 } 39 }
40 40
41 main() { new A().foo(1); } 41 main() { new A().foo(1); }
42 """; 42 """;
43 43
44 Future closureInvocation(bool minify, String prefix) { 44 Future closureInvocation(bool minify, String prefix) {
45 return Future.wait([ 45 return Future.wait([
46 compile(TEST_INVOCATION0, minify: minify, check: (String generated) { 46 compile(TEST_INVOCATION0, minify: minify, check: (String generated) {
(...skipping 19 matching lines...) Expand all
66 } 66 }
67 67
68 main() { 68 main() {
69 asyncTest(() => Future.wait([ 69 asyncTest(() => Future.wait([
70 closureInvocation(false, "call"), 70 closureInvocation(false, "call"),
71 closureInvocation(true, ""), 71 closureInvocation(true, ""),
72 closureBailout(false, "call"), 72 closureBailout(false, "call"),
73 closureBailout(true, ""), 73 closureBailout(true, ""),
74 ])); 74 ]));
75 } 75 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/warnings.dart ('k') | tests/compiler/dart2js/dictionary_types_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698