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

Side by Side Diff: frog/tests/leg/src/mock_compiler.dart

Issue 9863037: Generate prettier loops. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. Created 8 years, 8 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 | « frog/tests/leg/src/LoopTest.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
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 4
5 #library('mock_compiler'); 5 #library('mock_compiler');
6 6
7 #import("../../../../lib/uri/uri.dart"); 7 #import("../../../../lib/uri/uri.dart");
8 8
9 #import("../../../leg/elements/elements.dart"); 9 #import("../../../leg/elements/elements.dart");
10 #import("../../../leg/io/io.dart", prefix: 'io'); 10 #import("../../../leg/io/io.dart", prefix: 'io');
(...skipping 18 matching lines...) Expand all
29 guard$array(x) { return x; } 29 guard$array(x) { return x; }
30 guard$num(x) { return x; } 30 guard$num(x) { return x; }
31 guard$string(x) { return x; } 31 guard$string(x) { return x; }
32 guard$stringOrArray(x) { return x; } 32 guard$stringOrArray(x) { return x; }
33 builtin$add$1(receiver, value) {} 33 builtin$add$1(receiver, value) {}
34 builtin$get$length(var receiver) {} 34 builtin$get$length(var receiver) {}
35 builtin$filter$1(receiver, predicate) {} 35 builtin$filter$1(receiver, predicate) {}
36 builtin$removeLast$0(receiver) {} 36 builtin$removeLast$0(receiver) {}
37 index(a, index) {} 37 index(a, index) {}
38 indexSet(a, index, value) {} 38 indexSet(a, index, value) {}
39 class Closure {} '''; 39 class Closure {}
40 builtin$iterator$0() {}
41 builtin$next$0() {}
42 builtin$hasNext$0() {}''';
40 43
41 final String DEFAULT_CORELIB = @''' 44 final String DEFAULT_CORELIB = @'''
42 print(var obj) {} 45 print(var obj) {}
43 class int {} 46 class int {}
44 class double {} 47 class double {}
45 class bool {} 48 class bool {}
46 class String {} 49 class String {}
47 class Object {}'''; 50 class Object {}''';
48 51
49 class MockCompiler extends Compiler { 52 class MockCompiler extends Compiler {
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 importLibrary(library, compiler.coreLibrary, compiler); 188 importLibrary(library, compiler.coreLibrary, compiler);
186 return library; 189 return library;
187 } 190 }
188 191
189 class StringScript extends Script { 192 class StringScript extends Script {
190 final String code; 193 final String code;
191 StringScript(this.code) : super(null, null); 194 StringScript(this.code) : super(null, null);
192 String get text() => code; 195 String get text() => code;
193 String get name() => "mock script"; 196 String get name() => "mock script";
194 } 197 }
OLDNEW
« no previous file with comments | « frog/tests/leg/src/LoopTest.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698