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

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

Issue 10091037: Clean up handling of types. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove debug code. 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
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("dart:uri"); 7 #import("dart:uri");
8 8
9 #import("../../../../lib/compiler/implementation/elements/elements.dart"); 9 #import("../../../../lib/compiler/implementation/elements/elements.dart");
10 #import("../../../../lib/compiler/implementation/leg.dart"); 10 #import("../../../../lib/compiler/implementation/leg.dart");
(...skipping 17 matching lines...) Expand all
28 guard$array(x) { return x; } 28 guard$array(x) { return x; }
29 guard$num(x) { return x; } 29 guard$num(x) { return x; }
30 guard$string(x) { return x; } 30 guard$string(x) { return x; }
31 guard$stringOrArray(x) { return x; } 31 guard$stringOrArray(x) { return x; }
32 builtin$add$1(receiver, value) {} 32 builtin$add$1(receiver, value) {}
33 builtin$get$length(var receiver) {} 33 builtin$get$length(var receiver) {}
34 builtin$filter$1(receiver, predicate) {} 34 builtin$filter$1(receiver, predicate) {}
35 builtin$removeLast$0(receiver) {} 35 builtin$removeLast$0(receiver) {}
36 index(a, index) {} 36 index(a, index) {}
37 indexSet(a, index, value) {} 37 indexSet(a, index, value) {}
38 class Closure {}
39 builtin$iterator$0() {} 38 builtin$iterator$0() {}
40 builtin$next$0() {} 39 builtin$next$0() {}
41 builtin$hasNext$0() {}'''; 40 builtin$hasNext$0() {}''';
42 41
43 final String DEFAULT_CORELIB = @''' 42 final String DEFAULT_CORELIB = @'''
44 print(var obj) {} 43 print(var obj) {}
45 class int {} 44 class int {}
46 class double {} 45 class double {}
47 class bool {} 46 class bool {}
48 class String {} 47 class String {}
49 class Object {}'''; 48 class Object {}
49 class num {}
50 class Function {}
51 class List {}
52 class Closure {}
53 class Null {}
54 class Dynamic {}''';
50 55
51 class MockCompiler extends Compiler { 56 class MockCompiler extends Compiler {
52 List<WarningMessage> warnings; 57 List<WarningMessage> warnings;
53 List<WarningMessage> errors; 58 List<WarningMessage> errors;
54 final Map<String, String> sources; 59 final Map<String, String> sources;
55 Node parsedTree; 60 Node parsedTree;
56 61
57 MockCompiler([String coreSource = DEFAULT_CORELIB, 62 MockCompiler([String coreSource = DEFAULT_CORELIB,
58 String helperSource = DEFAULT_HELPERLIB]) 63 String helperSource = DEFAULT_HELPERLIB])
59 : warnings = [], errors = [], 64 : warnings = [], errors = [],
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 importLibrary(library, compiler.coreLibrary, compiler); 192 importLibrary(library, compiler.coreLibrary, compiler);
188 return library; 193 return library;
189 } 194 }
190 195
191 class StringScript extends Script { 196 class StringScript extends Script {
192 final String code; 197 final String code;
193 StringScript(this.code) : super(null, null); 198 StringScript(this.code) : super(null, null);
194 String get text() => code; 199 String get text() => code;
195 String get name() => "mock script"; 200 String get name() => "mock script";
196 } 201 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698